Personalized used car source recommendation method, computer device and related storage medium
By constructing user characteristics and used car source characteristics, and using the XGBoost model to optimize parameters, a personalized used car source recommendation list is generated, which solves the problems of difficult user screening and high communication costs in the used car market, and achieves efficient and accurate car source recommendation.
Patent Information
- Application Number
- CN202410974678.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2044-07-19
AI Technical Summary
The used car market has a large number of vehicles available, making it difficult for users to quickly find vehicles that meet their needs. There is a lack of professional car buying guidance, and the communication costs between users and sellers are high. Information asymmetry makes it difficult to reach a consensus.
By acquiring user historical information and used car information, user features and vehicle source features are constructed. An XGBoost model is used to build a ranking model to generate a personalized used car source recommendation list. This includes preprocessing of user basic features and behavioral features, construction of interaction features and similarity calculation, and optimization of model parameters to improve recommendation accuracy.
It can automatically filter out vehicles that meet user criteria from a massive pool of used car listings, with high recommendation accuracy, reducing communication costs between users and sellers, improving the reliability and accuracy of recommendations, and predicting users' car purchase intentions.
Smart Images

Figure CN118981758B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of data processing, in particular to a personalized used car source recommendation method, computer equipment and related storage medium. BACKGROUND
[0002] With the rapid development of the automobile market and the increasing diversification of consumer car purchase demand, the used car market has gradually emerged as an indispensable part of the automobile industry chain. However, the current used car market also faces the following problems: 1. There are many car sources, and various brands, models, prices and years of used cars are mixed together, making it difficult for users to filter out the car source that meets their needs from the vast amount of car source information in a short time; 2. Most users need to understand vehicle knowledge, market conditions, car purchase process and other information when purchasing a car, but users often lack professional car purchase guidance when searching for used car sources; 3. When searching for used car sources, users usually need to communicate with multiple brokers or sellers to understand vehicle details, specific prices and other information, but due to the asymmetry of information between the two parties, the communication cost is too high or even cannot reach a consensus. SUMMARY
[0003] To solve the above technical problems, the present application provides a personalized used car source recommendation method, comprising the following steps:
[0004] S1, obtaining user historical information and used car source information, constructing user features according to user historical information, and constructing used car source features according to used car source information;
[0005] S2, preprocessing the user features and the used car source features to construct training samples;
[0006] S3, constructing a ranking model based on the XGBoost model according to the training samples;
[0007] S4, inputting user data and used car source data into the ranking model to generate a used car source recommendation list.
[0008] Further, the user features include user basic features and user behavior features.
[0009] Among them,
[0010] The user basic features include car purchase area, gender, age, car purchase budget, intended brand, intended vehicle model and series, intended vehicle age, and vehicle condition expectation.
[0011] The user behavior features include browsing history, search history, browsing time, sharing frequency, repeated browsing, whether to collect, and browsing frequency.
[0012] Further, the second-hand car source features include a region, a brand, a brand code, a vehicle type, a price, an age, a mileage, a color, and a condition.
[0013] Further, the preprocessing includes constructing interaction features of the user features and the second-hand car source features.
[0014] wherein,
[0015] The interaction features of the user features and the second-hand car source features include a ratio of a user's car purchase budget to a second-hand car source price, a user's preference for luxury cars, and a matching degree of a user's intended vehicle type to a second-hand car source vehicle type.
[0016] Further, the preprocessing further includes calculating a similarity of the user features and the second-hand car source features in the training samples.
[0017] Further, the similarity of the user features and the second-hand car source features includes a similarity of the user's car purchase budget to the second-hand car source price, a similarity of the user's intended brand to the second-hand car source brand, a similarity of the user's condition expectation to the second-hand car source condition, and a similarity of the user's car purchase region to the second-hand car source region.
[0018] Further, the step S3 includes:
[0019] S3.1, in the XGBoost model, selecting "rank: pairwise" as a target function;
[0020] S3.2, setting initial parameters of the XGBoost model;
[0021] S3.3, training the XGBoost model using the training samples, and in the training process, the XGBoost model gradually generates a series of tree models, and each subsequent tree model in the series of tree models learns a residual error on the basis of a previous tree model;
[0022] S3.4, observing a normalized loss cumulative gain of the XGBoost model in the training process, evaluating an actual performance of the XGBoost model in the ranking task through the normalized loss cumulative gain, and obtaining a ranking model when the normalized loss cumulative gain reaches 0.8.
[0023] Further, the step S3.2 further includes optimizing the parameters of the XGBoost model, including the following steps:
[0024] S3.2.1, determining a parameter range of the parameters of the XGBoost model;
[0025] S3.2.2, performing k-fold cross-validation on the training samples to divide training sets and validation sets;
[0026] S3.2.3, for each k-fold, search all possible parameter combinations in the parameter range using Grid Search, and evaluate the actual performance of the XGBoost model by the normalized fold loss cumulative gain on the validation set;
[0027] S3.2.4, use each parameter combination to train the XGBoost model on the training set;
[0028] S3.2.5, after each round of training, evaluate the actual performance of the XGBoost model on the validation set, observe the change of the normalized fold loss cumulative gain and adjust the parameter combination;
[0029] S3.2.6, the parameter combination when the normalized fold loss cumulative gain value on the validation set is the largest is taken as the optimal parameter combination.
[0030] The application also provides a computer device, comprising a memory, a first processor and a first computer program stored in the memory and executable on the first processor, when the first computer program is executed by the first processor, the personalized used car source recommendation method is realized.
[0031] The application further provides a computer readable storage medium, the computer readable storage medium is used for storing a second computer program, the second computer program can be executed by at least one second processor, so that the at least one second processor executes the personalized used car source recommendation method.
[0032] Compared with the prior art, the personalized used car source recommendation method provided by the application can automatically analyze the preferences and needs of users, automatically screen the used cars meeting the conditions of the users from a large number of used car sources, and can quickly screen according to multiple dimensions of the used car sources, recommend more accurate used cars with high matching degree with the purchase intention of the users, and predict the potential purchase intention of the users according to the search history and behavior mode of the users. BRIEF DESCRIPTION OF DRAWINGS
[0033] Figure 1 A flowchart of the personalized used car source recommendation method according to the embodiment of the application is shown. DETAILED DESCRIPTION
[0034] The specific embodiments of the present application are described in detail below, it should be understood that the embodiments of the present application are not limited to the examples shown in the drawings, and the protection scope of the present application is not limited by the specific embodiments. The "first", "second" and similar words used in the present application do not represent any order, quantity or importance, but are only used to distinguish different components. Similarly, "one", "a" or "the" and similar words do not represent a quantity limit, but represent the existence of at least one. Unless otherwise explicitly stated, throughout the specification and claims, the term "comprise" or its variants such as "include" or "comprising" and the like will be understood to include the stated element or component, without excluding other elements or components. "Connected" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to represent relative positional relationships, which may change accordingly when the absolute position of the described object changes.
[0035] Unless otherwise defined, all technical and scientific terms used in the present application have the same meaning as commonly understood by one of ordinary skill in the art. In addition, technical and scientific terms used in the present application should be interpreted as having the same meaning as the corresponding terms defined in the common technical manual, and should not be interpreted as having an idealized or overly formal meaning, unless the present application is explicitly so limited.
[0036] Figure 1 A flowchart of the personalized used car source recommendation method of the embodiment of the present application is shown, see Figure 1 The personalized used car source recommendation method comprises the following steps:
[0037] S1, obtaining user historical information and used car source information, constructing user features according to user historical information, and constructing used car source features according to used car source information.
[0038] Specifically, the user features include user basic features and user behavior features. The user basic features include car purchase region (Region), gender (Gender), age (Age), car purchase budget (Budget), intended brand (Brand), intended car model and series, intended car age (CarAge), and car condition expectation. The user behavior features include browsing history, search history, browsing time, sharing times, whether repeated browsing, whether collecting, browsing frequency, etc. The used car source features include the region, brand (Brand), brand code (Encoded Brand), car model and series (Model), price (Price), car age (CarAge), mileage (Mileage), color (Color), and car condition.
[0039] S2, preprocessing the user features and the second-hand vehicle source features, and constructing training samples.
[0040] Specifically, the preprocessing includes at least one of missing value processing, abnormal value processing, feature encoding, feature scaling, feature selection, and data balancing processing.
[0041] The missing value processing includes deleting samples containing missing values, filling missing values (such as using mean, median, mode filling), or using a prediction model for prediction filling, etc.
[0042] The abnormal value processing: using the Isolation Forest algorithm to identify points that do not conform to the distribution of most data, i.e. abnormal values, and then deleting, replacing or data transforming the abnormal values.
[0043] The feature encoding: encoding non-numeric features, and the encoding methods include One-Hot Encoding and Label Encoding.
[0044] The feature scaling: scaling the features to have similar scales, and the scaling methods include Standardization and Normalization.
[0045] The data balancing processing: adjusting the sampling frequency (such as oversampling and undersampling) to balance the data, preventing the difference between the positive and negative sample proportions from being too large, and avoiding the bias to the minority class samples.
[0046] Further, the preprocessing further includes constructing interaction features of the user features and the second-hand vehicle source features.
[0047] Specifically, the interaction features include a Budget to Price Ratio of a car purchase budget and a second-hand vehicle source price, a Luxury Car Preference of a user, and a matching degree of a user intended vehicle model and a second-hand vehicle source vehicle model.
[0048] Further, the step S2 further includes calculating the similarity of the user features and the second-hand vehicle source features in the training samples.
[0049] Wherein, in order to facilitate the subsequent use of the XGBoost model, the training sample is in the form of Query-Document (query-candidate relevance feature) Pair, each Query corresponds to a user, and the Document is a candidate, usually a used car source to be sorted. In order to ensure that the training sample can effectively reflect the user's interest and the relevance of the car source, the similarity of the user features corresponding to the Query and the used car source features corresponding to the Document needs to be calculated.
[0050] Specifically, the similarity of the user features corresponding to the Query and the used car source features corresponding to the Document includes: the similarity of the user's car purchase budget and the price of the used car source, the similarity of the user's intended brand and the brand of the used car source, the similarity of the user's car condition expectation and the car condition of the used car source, and the similarity of the user's car purchase region and the region where the used car source is located.
[0051] Specifically, the above similarity is a cosine similarity. The cosine similarity evaluates the similarity of two vectors in a multi-dimensional space by calculating the cosine value of the included angle of the two vectors (in this embodiment, the corresponding vectors converted from the user features and the used car source features). According to the obtained cosine similarity value, the similarity between the user features and the used car source features is judged. The closer the cosine similarity value is to 1, the higher the similarity is.
[0052] S3, constructing a ranking model based on the XGBoost model according to the training sample.
[0053] Wherein, the ranking model usually learns features and derives ranking rules through the XGBoost model. In actual application, the XGBoost model is used as the ranking part of the ranking model to learn the importance and influence of the features, and then affect the ranking order of the candidate. In addition, the ranking model introduces more professional feature engineering based on the XGBoost model, such as query-candidate relevance features, to better capture key information in search or recommendation scenarios. In the recall stage of used car source recommendation, the ranking model can effectively learn the user's preference for different used car sources and rank the candidate used car sources.
[0054] Further, step S3 includes the following steps:
[0055] S3.1, selecting a target function.
[0056] Specifically, for Pairwise Ranking (Pairwise Ranking), the goal is to learn a ranking function so that the ranking score of the positive example (i.e. the used car source that the user likes) is higher than that of the negative example (i.e. the used car source that the user does not like). In the XGBoost model, "rank:pairwise" is selected as the target function.
[0057] S3.2, setting parameters.
[0058] Specifically, the initial parameters of the XGBoost model are set, including the depth of the tree such as 6, the learning rate such as 0.1, the L1 regularization term such as 0, the L2 regularization term such as 1, and the subsample ratio such as 0.8.
[0059] The learning rate is used to control the step size of each iteration; the L1 regularization term and the L2 regularization term are used to control the complexity of the XGBoost model and avoid overfitting; the subsample ratio is used to control the proportion of training samples used to build each tree, and 0.8 means that 80% of the training samples are used to build each tree.
[0060] S3.3, training the XGBoost model.
[0061] Specifically, the XGBoost model is trained using the training samples, and the training target is to maximize the loss function of PairwiseRanking. During the training process, the XGBoost model gradually generates a series of tree models, and each subsequent tree model in the series learns the residual based on the previous tree model.
[0062] S3.4, evaluating the XGBoost model, and obtaining the ranking model when the actual performance meets the standard.
[0063] During the training process, the performance indicators of the XGBoost model are observed, such as NDCG (Normalized Discounted Cumulative Gain). The actual performance of the XGBoost model in the ranking task is evaluated through the performance indicators such as NDCG, and the ranking model is obtained when the actual performance meets the standard, such as NDCG reaching 0.8.
[0064] The numerical range of NDCG is 0-1, and the closer the value is to 1, the better the ranking effect is. In this embodiment, by analyzing historical data and business requirements, the threshold of NDCG is determined to be 0.8, that is, when NDCG reaches 0.8, it is determined that the actual performance of the XGBoost model meets the standard, and the ranking model is obtained.
[0065] Specifically, step S3.2 further includes optimizing the parameters of the XGBoost model, which includes the following steps:
[0066] S3.2.1, determining the parameter range.
[0067] The parameter range of the parameters of the XGBoost model is determined, the depth of the tree is 3-10, the learning rate is 0.01-0.1, the L1 regularization term is 0-10, the L2 regularization term is 1-100, and the subsample ratio is 0.5-1.0.
[0068] S3.2.2, k-fold cross-validation is performed.
[0069] K-fold cross-validation is performed on the training samples to divide the training set and the validation set.
[0070] S3.2.3, Grid Search optimization is performed.
[0071] For each k-fold, Grid Search is used to search all possible parameter combinations within the parameter range, and the actual performance of the XGBoost model is evaluated by NDCG on the validation set.
[0072] S3.2.4, training XGBoost model.
[0073] Using each parameter combination to train the XGBoost model on the training set, the goal is to maximize NDCG.
[0074] S3.2.5, evaluation and tuning.
[0075] After each round of training, the actual performance of the XGBoost model is evaluated on the validation set, the change of NDCG is observed and the parameter combination is adjusted.
[0076] S3.2.6, select the optimal parameter combination.
[0077] The parameter combination with the best NDCG performance on the validation set, i.e. the maximum value, is selected as the optimal parameter combination, i.e. the final tuning result, which is used to build the ranking model.
[0078] S4, input user data and used car source data into the ranking model to generate a recommended list of used car sources.
[0079] Prepare the user data to be pushed and the used car source data for recommendation, use the ranking model built in step 3 to predict the candidate used car sources, get the ranking score of each candidate used car source, which reflects the attractiveness of the candidate used car source to the user. The user can filter and truncate the candidate used car sources according to the ranking score. Specifically, a threshold of the ranking score can be set to keep only the candidate used car sources with a ranking score higher than the threshold, or all candidate used car sources can be ranked according to the ranking score, and only the top-ranked candidate used car sources can be kept to generate a recommended list of used car sources. The candidate used car sources with a ranking score less than the threshold or ranking at the back are filtered and truncated, and a recall list is generated based on the filtered and truncated candidate used car sources and returned to the user. The recommended information of the recommended list usually includes the basic information of the used car source (such as brand, model, price, age, mileage, etc.) and the network link to the detail page of the used car source.
[0080] The threshold value is set according to the result of comprehensive evaluation based on at least one of user feedback (such as a ranking model updated based on historical user feedback data and real-time data, or user preferences determined by analyzing user click and purchase behavior), interaction data (historical user interaction with the used car source to ensure that the recommended used car source has a high relevance to the user in history), and business requirements (commercial goals of the used car source recommendation, such as improving click rate or promoting used car transactions).
[0081] In summary, the present application provides a personalized used car source recommendation method, which first constructs user features according to user historical information, constructs used car source features according to used car source information parameters, then pre-processes the user features and used car source features, constructs training samples, and further constructs a ranking model based on the XGBoost model according to the training samples, and finally generates a recommendation list of used car sources based on the ranking model. After determining the parameter range of the XGBoost model, k-fold cross-validation and Grid Search optimization are performed, and then the XGBoost model is trained and evaluated, and finally the optimal parameters are selected to realize the parameter optimization of the XGBoost model. The personalized used car source recommendation method can automatically analyze the user's preferences and needs, automatically filter out used cars that meet the user's conditions from a large number of used car sources, and can quickly filter according to multiple dimensions such as brand, model, price, age, mileage, etc. of the used car source, recommend more accurate and high-matching used cars, and there is no need to communicate with multiple brokers or sellers, ensuring that the recommended used car source is real and reliable, and it can also predict the user's potential car-buying intention according to the user's search history and behavior patterns, and actively push related used car source information.
[0082] The present application also provides a computer device comprising a memory, a first processor and a first computer program stored on the memory and executable on the first processor, wherein the first computer program is executed by the first processor to implement the personalized used car source recommendation method described above.
[0083] The present application also provides a computer readable storage medium for storing a second computer program, wherein the second computer program is executable by at least one second processor to make the at least one second processor execute the personalized used car source recommendation method described above.
[0084] The foregoing description of specific exemplary embodiments of the application has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit the application to the precise forms disclosed, and obviously many modifications and variations are possible in light of the above teaching. It is intended that the scope of the application be limited not with this detailed description, but rather by the claims appended hereto.
Claims
1. A personalized method for recommending used car sources, characterized in that, Includes the following steps: S1. Obtain user historical information and used car source information, construct user characteristics based on the user historical information, and construct used car source characteristics based on the used car source information; S2. Preprocess the user features and used car source features to construct training samples; S3. Based on the training samples, construct a ranking model using the XGBoost model; S4. Input user data and used car source data into the sorting model to generate a recommended list of used car sources; in, Step S3 includes: S3.1 In the XGBoost model, select "rank:pairwise" as the objective function; S3.2 Set the initial parameters of the XGBoost model: tree depth is 6, learning rate is 0.1, L1 regularization term is 0, L2 regularization term is 1, and subsampling ratio is 0.
8. S3.
3. The XGBoost model is trained using the training samples. During the training process, the XGBoost model generates a series of tree models step by step. Each subsequent tree model in the series of tree models learns the residual based on the previous tree model. S3.4 During training, observe the normalized depreciation cumulative gain of the XGBoost model, and evaluate the actual performance of the XGBoost model in the ranking task through the normalized depreciation cumulative gain. When the normalized depreciation cumulative gain reaches 0.8, the ranking model is obtained. Step S3.2 also includes tuning the parameters of the XGBoost model, including the following steps: S3.2.1 Determine the parameter range of the XGBoost model; S3.2.2 Perform k-fold cross-validation on the training samples to divide the training set and validation set; S3.2.3 For each k-fold, use Grid Search to search for all possible parameter combinations within the parameter range, and evaluate the actual performance of the XGBoost model by the normalized folding cumulative gain on the validation set; S3.2.4 Train the XGBoost model on the training set using each of the parameter combinations; S3.2.5 After each round of training, evaluate the actual performance of the XGBoost model on the validation set, observe the changes in the normalized loss cumulative gain, and adjust the parameter combination; S3.2.
6. The parameter combination that maximizes the normalized cumulative gain on the validation set is taken as the optimal parameter combination.
2. The personalized used car source recommendation method according to claim 1, characterized in that, The user characteristics include basic user characteristics and user behavior characteristics; in, The basic user characteristics include at least one of the following: car purchase region, gender, age, car purchase budget, intended brand, intended model series, intended vehicle age, and expected vehicle condition; The user behavior characteristics include at least one of the following: browsing history, search history, browsing duration, number of shares, whether the user browsed repeatedly, whether the user saved the content, and browsing frequency.
3. The personalized used car source recommendation method according to claim 1, characterized in that, The characteristics of the used car sources include at least one of the following: region, brand, brand code, model series, price, age, mileage, color, and condition.
4. The personalized used car source recommendation method according to claim 1, characterized in that, The preprocessing includes: constructing interaction features between user features and used car source features; in, The interaction features between user characteristics and used car source characteristics include: the ratio of user's car purchase budget to used car source price, user's preference for luxury cars or the matching degree between user's intended car model and used car source model.
5. The personalized used car source recommendation method according to claim 4, characterized in that, The preprocessing also includes calculating the similarity between user features and used car source features in the training samples.
6. The personalized used car source recommendation method according to claim 5, characterized in that, The similarity of user characteristics and used car source characteristics includes at least one of the following: the similarity between the user's car purchase budget and the price of the used car source, the similarity between the user's preferred brand and the brand of the used car source, the similarity between the user's expected car condition and the condition of the used car source, and the similarity between the user's car purchase area and the region where the used car source is located.
7. A computer device, comprising a memory, a first processor, and a first computer program stored in the memory and executable on the first processor, wherein when the first computer program is executed by the first processor, it implements the personalized used car source recommendation method according to any one of claims 1 to 6.
8. A computer-readable storage medium for storing a second computer program, the second computer program being executable by at least one second processor to cause the at least one second processor to perform the personalized used car source recommendation method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Commodity recommendation method based on mobile electronic commerce of big data
CN107909433A
Vehicle recommendation information processing method and system, computer equipment and storage medium
CN113450169A