Vectorization method of sales ordering characteristics for operator potential customer prediction
By vectorizing the sales product ordering characteristics of the operator's prospecting model and introducing time and value correlation coefficients, the shortcomings of traditional models in capturing complex customer behavior patterns are solved, and the accuracy of prospecting prediction and the robustness of the model are improved.
Patent Information
- Application Number
- CN202411648033.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-02-28
AI Technical Summary
The traditional operator's existing customer prospect prediction model has shortcomings in capturing complex customer behavior patterns and multi-factor interaction effects, resulting in limited accuracy of prediction results.
A vectorization method for sales product ordering characteristics used for operator prospects prediction is adopted. By collecting and preprocessing sales product ordering record data, the sales product sequence is vectorized using the Word2Vec model, and a time decay coefficient, value weighting coefficient and average weighting coefficient are introduced to optimize the characteristic structure of the prospect prediction model.
It improves the prediction accuracy of the prospective prediction model, can more effectively retain the differences in customer ordering behavior in the time and value dimensions, reduces the number of feature dimensions, avoids dimensional disasters, and improves the success rate and coverage of marketing activities.
Smart Images

Figure CN119539864A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of big data processing, and in particular to a vectorization method for sales product ordering features used for operator potential customer prediction. Background Art
[0002] Predicting potential customers of existing customers is a key part of the intelligent development of enterprises. It provides enterprises with a more accurate customer insight method by deeply mining the behavioral data and consumption patterns of existing customers. With the continuous development of big data and artificial intelligence technology, enterprises can use various data sources, such as transaction records, website browsing behavior, social media activities, etc., to build complex prediction models, thereby accurately predicting the purchase intentions and behavioral trends of existing customers.
[0003] Through potential customer prediction, companies can better understand customer needs and preferences, accurately grasp market trends, and carry out targeted product promotion and marketing activities. At the same time, potential customer prediction also provides companies with more personalized service opportunities, thereby improving customer experience and loyalty. By continuously optimizing the potential customer prediction model, companies can respond to market changes more flexibly and improve business competitiveness and profitability.
[0004] In addition, the prediction of potential customers of existing customers can also help enterprises allocate resources and manage risks more effectively. By analyzing different types of customers, enterprises can better allocate sales resources, optimize customer service processes, reduce market risks, and achieve more stable development.
[0005] In summary, the prediction of potential customers of existing customers improves the operating efficiency and profitability of enterprises, and creates a sustainable competitive advantage for enterprises. The traditional operator's potential customer prediction model for existing customers can identify potential marketing customers to a certain extent, but its accuracy is still limited. The model is difficult to capture complex customer behavior patterns and the interaction of multiple factors, resulting in errors in the prediction results. Therefore, it is very important to use sales product feature quantization technology to identify and predict potential existing marketing customers. Summary of the invention
[0006] The purpose of the present invention is to provide a vectorization method for sales product ordering features for operator potential customer prediction, optimize the feature structure of the potential customer prediction model for existing customers, increase the information content of the input features of the potential customer prediction model for the importance of the features of the sales product space, and improve the prediction accuracy. The present invention is a technical solution in the direction of digital capabilities in smart marketing projects, which can effectively improve the prediction ability of the potential customer prediction model and improve the success rate and coverage of the marketing activity list.
[0007] The vectorization method of sales product ordering features for operator potential customer prediction includes the following steps: Collect all sales product order record data, clean and pre-process the collected data, including processing missing values, outliers and duplicate values; Handle missing values and fill them through interpolation methods; Outliers are processed using anomaly detection algorithms, such as the Z-Score method, IQR interquartile range method, and clustering-based methods to identify and process outliers, and outliers are directly deleted; Handling duplicate values: Identify and remove duplicate records through deduplication algorithms; The order record table structure includes three fields: customer ID cust_id, sales product ID offer_id, order time create_date; The output sales product sequence table includes two fields: customer ID cust_id, sales product ID sequence offer_seq; Use the sales product sequence table data to train the Word2Vec model; map the element ID in each sequence to a continuous vector space so that element IDs with similar meanings are close in the vector space, and use the Word2Vec Skip-gram method to construct a word embedding vector as the feature input of the machine learning model; use the output features of the Word2Vec model to vectorize and compress the sales product sequence, extract the sales product association features, dependency features, and order sequence features, and obtain the vectorized representation of the corresponding sales product ID basic features; Time decay coefficient: The ordering time of the sales product affects the strength of the sales product vector in the combination process. The exponential decay function is used as a coefficient calculation tool. The calculation expression is alpha_i = exp(-a * T_i), where alpha_i represents the coefficient corresponding to the customer's i-th sales product vector, a represents the decay coefficient, and T_i represents the number of days from the ordering time of the i-th sales product to the training deadline. The vectorized feature corresponding to the time decay coefficient is vector X1=Σ{alpha_i *token_i}, where token_i represents the vector representation of the i-th sales product ID in the sales product sequence after vectorization. By adjusting the decay coefficient, the degree of decay over time can be expressed to adapt to different business scenarios. Value weighted coefficient, the price of the sales product affects the strength of the sales product vector in the combination process; the calculation formula is beta_i = (w_i + b) / (w_1 + w_2 + ... + w_n + b), where beta_i represents the coefficient corresponding to the customer's i-th sales product vector, w_i represents the value corresponding to the i-th sales product, n represents the total number of sales products ordered by the customer, and b is the smoothing coefficient. The vectorized feature of the corresponding value weighted coefficient is vector X2=Σ{beta_i * token_i}, where token_i represents the vector representation of the i-th sales product ID in the sales product sequence after vectorization; the smoothing coefficient adjusts the strength of the value difference to adapt to different business scenarios; Average weighted coefficient, the weighted coefficient corresponding to each sales product vector is equal; the calculation formula is gamma_i=1 / n, where gamma_i represents the coefficient corresponding to the customer's i-th sales product vector, and n represents the total number of sales products ordered by the customer; the vectorized feature corresponding to the average weighted coefficient is vector X3=Σ{gamma_i * token_i}, where token_i represents the vector representation of the i-th sales product ID in the sales product sequence after vectorization.
[0008] The sales product space vector assembly is performed by associating the sales product vector table with the time attenuation coefficient, the value weighted coefficient, and the average weighted coefficient, respectively, and then scaling and summing the coefficients to complete the vector assembly of the sales product space.
[0009] It also includes the following steps Cross-validation and other methods are used to train and tune the random forest potential customer prediction model, grid search and other techniques are used to select the best hyperparameter combination, and the evaluation indicator F1-Score is used to evaluate the model; the specific steps are as follows: 1. Define the hyperparameter range, the number of trees (n_estimators) [10, 50, 100, 200], the maximum number of features (max_features) ['auto', 'sqrt', 'log2'], the maximum tree depth (max_depth) [None, 10, 20,30, 40, 50], the minimum number of sample splits (min_samples_split) [2, 5, 10], the minimum number of sample leaves (min_samples_leaf) [1, 2, 4]; 2. Use GridSearchCV in the Scikit-Learn library to perform grid search to find the best combination of the above hyperparameters; 3. The goal is set to optimize F1-Score, which can balance precision and recall and is suitable for processing unbalanced data sets; 4. Select the best hyperparameter combination through grid search n_estimators=200,max_features='sqrt',max_depth=30,min_samples_split=5,min_samples_leaf=2; Deploy the trained model to the production environment, regularly monitor the marketing results of potential customer prediction, and update the model parameters in a timely manner as needed.
[0010] Beneficial effects of the present invention: The present invention has a more comprehensive feature characterization of the customer's sales product ordering space, and has the following advantages over the traditional sparse matrix representation method: under the same feature dimension, the method of the present invention can provide more sales product ordering information. The dimensions required by the traditional sparse matrix representation method continue to increase with the increase in the number of sales products, and dimensionality disaster will occur in the process of training the model. The method of the present invention compresses all sales product information into a 100-dimensional vector, which can effectively control the number of features while retaining the ordering information of all sales products under the customer's name.
[0011] By introducing the time decay coefficient, the features generated by the method of the present invention include the information of the order time. The traditional sparse matrix method cannot provide the order time information of the sales items, resulting in the model being unable to distinguish the differences in the customer ordering behavior in the time dimension. The method of the present invention introduces the order time of all sales into a 100-dimensional vector in the form of a time decay coefficient, which can retain the differences in the customer ordering behavior in the time dimension.
[0012] By introducing the value weighting coefficient, the features generated by the method of the present invention contain the value information of the sales items. The traditional sparse matrix method cannot provide the value information of the sales items, resulting in the model being unable to distinguish the differences in the value dimension of the sales items ordered by customers. The method of the present invention introduces the value of all sales into a 100-dimensional vector in the form of a value weighting coefficient, which can retain the differences in the value dimension of the sales items ordered by customers.
[0013] By introducing the average weighted coefficient, the features generated by the method of the present invention include the basic information of the sales product. Due to the addition of the time decay coefficient and the value weighted coefficient, the model training process needs to be compared with the basic information to identify the difference. The method of the present invention adds the basic information of the sales product ordered by the customer to a 100-dimensional vector, which can be used as a control group, so that the model can learn the time difference and value difference of the sales product during the training process.
[0014] Prediction effect verification. The verification data set is the order data for the first quarter of 2024 provided by a provincial operator. The verification process is as follows: Initialize the hyperparameter search range, including the number of trees (n_estimators), covering from 10 to 200, with an increment of 40 steps; the maximum number of features (max_features), set to three options: automatic (auto), square root (sqrt), and logarithmic (log2); the maximum tree depth (max_depth), set to unlimited (None) and six levels from 10 to 50; the minimum number of sample splits (min_samples_split), with values of 2, 5, and 10; and the minimum number of sample leaves (min_samples_leaf), set to 1, 2, and 4.
[0015] Grid search determined a set of hyperparameter combinations, namely the number of trees (n_estimators=200), the maximum number of features (max_features='sqrt'), the maximum tree depth (max_depth=30), the minimum number of sample splits (min_samples_split=5), and the minimum number of sample leaves (min_samples_leaf=2). This combination performed best in F1-Score and was used in the final model training.
[0016] The traditional sparse matrix representation method is used as the training baseline model. Due to the dimensionality limitation of the traditional coefficient matrix representation method, some ordering information is missing. The prediction effect of this patent is better than that of the traditional method. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a schematic diagram of the vectorization process of the present invention; Figure 2 It is a schematic diagram of a data feature processing module of the present invention; Figure 3 This is a data flow diagram of the present invention. DETAILED DESCRIPTION
[0018] The present invention provides a sales product feature quantization method for operator potential customer prediction using the following technical solutions: Operator data is divided into B domain, O domain, M domain and DPI data. Each domain contains a relatively independent support system. It is difficult to directly obtain data through each support system. In order to improve the efficiency of data analysis and modeling, a data mart for potential customer prediction is established on the basis of the data lake architecture to store the customer's full sales product order record data to ensure the accuracy and completeness of the data. Clean and preprocess the collected data, including processing missing values, outliers and duplicate values. Use interpolation methods to fill missing values, and use anomaly detection algorithms to identify and process outliers. Processing missing values: Use a variety of interpolation methods (Gaussian distribution data uses the mean, exponential distribution data uses the median, discrete data uses the mode, and amount data uses zero value filling) to fill missing values. Processing outliers: Use anomaly detection algorithms, Z-Score methods, IQR (interquartile range) methods, and clustering-based methods to identify and process outliers. Delete outliers directly. Processing duplicate values: Identify and remove duplicate records by setting unique keys or using deduplication algorithms. The order record table structure needs to include at least three fields: customer ID (cust_id), product ID (offer_id), and order time (create_date).
[0019] Aggregate the sales product IDs in the order record table by converting rows to columns. Aggregation rule: Aggregate by customer ID, and sort the order time by little endian. The output sales product sequence table includes at least two fields: customer ID (cust_id) and sales product ID sequence (offer_seq).
[0020] The Word2Vec model is trained using the sales product sequence list data. Word2Vec is a word vector representation algorithm for natural language processing tasks. It maps the element ID in each sequence to a continuous vector space, so that the element IDs with similar meanings are close in the vector space. The word embedding vector is constructed using the Skip-gram method of Word2Vec as the feature input of the machine learning model (reference paper link https: / / arxiv.org / pdf / 1301.3781). The output features of the Word2Vec model are vectorized and compressed to the sales product sequence, and the sales product association features, dependency features, and order sequence features are extracted to obtain the vectorized representation of the corresponding sales product ID basic features. The dimensions required by the traditional sparse matrix representation method of sales product features continue to increase with the increase in the number of sales products, and dimensional disasters will occur during the training of the model. The method of the present invention compresses all sales product information into a 100-dimensional vector, effectively controlling the number of features while retaining the ordering information of all sales products under the customer's name.
[0021] The input data set size is 1e5, the set size of tokens in the sequence is 1e4, and the average number of tokens in each sequence is 1e2. After the data is input into the Word2Vec model, the model parameters use Skip-Gram, the dimension size of the generated vector is 100, the context window size is 5, and the other parameters select the default values. After the training is completed, the synonym search function is used to verify the training effect.
[0022] Sales product information compression implementation case: For a customer with customer ID 5000****0127, the corresponding sales product ID sequence is [70000812 30060228 … 30150451]. When converted to a sparse matrix representation, the dimension reaches the order of magnitude of 1e4. After all customer data is learned by the Word2Vec model, each sales product ID corresponds to a 100-dimensional vector. For example, the 100-dimensional vectors corresponding to the sales products with sales product IDs 70000812, 30060228, and 30150451 are [-0.319503, -0.023561, …, 0.0377911], [-0.0973853, 0.136437, …, -0.155022], and [0.059318, 0.310895, …, -0.211162], respectively. For each customer, the 100-dimensional vectors corresponding to each sales product ID in the sales product sequence are weighted combined to achieve the effect of using 100-dimensional vectors to represent all sales products. Compared with the sparse matrix, the dimension compression ratio is 1%.
[0023] The vectorization process of sales product ID. After a single label in any sequence is input into the model, the model outputs the corresponding 100-dimensional vector and saves the result to the analysis database. The table structure of the sales product vector table is customer ID, sequence number (1-base sequence number of the single record where the token is located in the sequence table), and result vector (100 fields c001~c100).
[0024] Time decay coefficient. The ordering time of the sales product affects the strength of the sales product vector in the combination process. In order to provide this strength information to the later discriminant model, an exponential decay function is used as a coefficient calculation tool. The specific calculation expression is alpha_i = exp(-a * T_i), where alpha_i represents the coefficient corresponding to the customer's i-th sales product vector, a represents the decay coefficient, and T_i represents the number of days from the ordering time of the i-th sales product to the training deadline. The vectorized feature corresponding to the time decay coefficient is vector X1=Σ{alpha_i * token_i}, where token_i represents the vector representation of the i-th sales product ID in the sales product sequence after vectorization. By adjusting the decay coefficient, the degree of decay over time can be expressed, in order to adapt to different business scenarios.
[0025] Implementation case of time decay coefficient: The customer with customer ID 5000****0127 has the corresponding sales product ID sequence [70000812 (ordered 715 days ago) 30060228 (ordered 312 days ago) … 30150451 (ordered 30 days ago)], and the corresponding vectors of sales products with sales product IDs 70000812, 30060228, and 30150451 are [-0.319503,-0.023561, …, 0.0377911], [-0.0973853,0.136437, …, -0.155022], and [0.059318,0.310895, …, -0.211162] respectively. When the attenuation coefficient a=0.005, the coefficients corresponding to the sales products with product IDs 70000812, 30060228, and 30150451 are [0.280, 0.210, 0.8607], respectively. After weighted averaging with the sales product vector, the weighted average vector of the time attenuation coefficient corresponding to customer 5000****0127 is [0.019694, 0.269006, ..., -0.194079].
[0026] Value weighting coefficient. The price of the sales item affects the strength of the sales item vector in the combination process. The specific calculation formula is beta_i = (w_i + b) / (w_1 + w_2 + ... + w_n + b), where beta_i represents the coefficient corresponding to the customer's i-th sales item vector, w_i represents the value corresponding to the i-th sales item, n represents the total number of sales items ordered by the customer, and b is the smoothing coefficient. The vectorized feature of the corresponding value weighting coefficient is vector X2=Σ{beta_i * token_i}, where token_i represents the vector representation of the i-th sales item ID in the sales item sequence after vectorization. The smoothing coefficient can adjust the strength of the value difference to adapt to different business scenarios.
[0027] Implementation case of value-weighted coefficient: The customer with customer ID 5000****0127 has the corresponding sales product ID sequence [70000812 (39 yuan) 30060228 (5 yuan) … 30150451 (10 yuan)], and the corresponding vectors of the sales products with sales product IDs 70000812, 30060228, and 30150451 are [-0.319503,-0.023561, …, 0.0377911], [-0.0973853,0.136437, …, -0.155022], and [0.059318,0.310895, …, -0.211162] respectively. The values corresponding to the sales products with sales product IDs of 70000812, 30060228, and 30150451 are [39, 5, 10] respectively. After weighted average calculation with the sales product vectors, the weighted average vector of the value weighting coefficient corresponding to customer 5000****0127 is [-0.228784, 0.053190, ..., -0.026164].
[0028] Average weighted coefficient. The weighted coefficient corresponding to each sales product vector is equal. The specific calculation formula is gamma_i=1 / n, where gamma_i represents the coefficient corresponding to the customer's i-th sales product vector, and n represents the total number of sales products ordered by the customer. The vectorized feature corresponding to the average weighted coefficient is vector X3=Σ{gamma_i * token_i}, where token_i represents the vector representation of the i-th sales product ID in the sales product sequence after vectorization.
[0029] Vector assembly of sales product space. The sales product vector table is associated with the coefficient table (time decay coefficient, value weighted coefficient, average weighted coefficient) and then the coefficients are scaled and summed. For example, a customer orders n sales products. The size of the customer's sales product matrix A is n rows and 100 columns, and the size of the coefficient matrix B is 3 rows and n columns. The calculation formula of the result matrix C is matrix B multiplied by the transpose of matrix A. It can be seen that the size of matrix Z is 3 rows and 100 columns. Matrix Z is flattened to form the 300-dimensional feature vector of the customer in the sales product space (that is, matrix Z={vector X1, vector X2, vector X3}), completing the vector assembly of the sales product space.
[0030] The vector features of the sales product space extracted in the above steps (a total of 300 new features) are integrated with the feature set of the traditional random forest potential customer prediction model, and the random forest feature selection method is used to screen out features that have a strong impact on the prediction ability.
[0031] Cross-validation and other methods are used to train and tune the random forest potential customer prediction model, grid search and other techniques are used to select the best hyperparameter combination, and the model is evaluated using the evaluation indicator (F1-Score). The specific steps are as follows: 1. Define the hyperparameter range, the number of trees (n_estimators) [10, 50, 100, 200], the maximum number of features (max_features) ['auto', 'sqrt', 'log2'], the maximum tree depth (max_depth) [None, 10, 20,30, 40, 50], the minimum number of sample splits (min_samples_split) [2, 5, 10], and the minimum number of sample leaves (min_samples_leaf) [1, 2, 4]. 2. Use GridSearchCV in the Scikit-Learn library to perform grid search to find the best combination of the above hyperparameters. 3. The goal is set to optimize F1-Score because it can balance precision and recall and is suitable for processing unbalanced data sets. 4. Through grid search, the best hyperparameter combination is selected: n_estimators=200, max_features='sqrt', max_depth=30, min_samples_split=5, min_samples_leaf=2.
[0032] Deploy the trained model to the production environment, regularly monitor the marketing results of potential customer prediction, and update the model parameters in a timely manner as needed.
[0033] Glossary Potential customer prediction: Existing customers refer to individuals or organizations that are already existing customers of the company. Potential customer prediction refers to the process of predicting and analyzing customer potential needs using data analysis and prediction models. Potential customer prediction for existing customers aims to predict the possible behavior patterns, demand changes or potential purchasing intentions of existing customers, so that operators can better understand the needs and preferences of existing customers and carry out customer relationship management, marketing and sales activities in a targeted manner. Through potential customer prediction for existing customers, companies can improve customer loyalty and retention rates and promote the continued growth and development of their business.
[0034] Word2vec algorithm: A word vector representation algorithm for natural language processing tasks, which maps each word to a continuous vector space so that words with similar semantics are close in the vector space. Word2vec is usually used to construct word embeddings vectors, which can be used as input for deep learning models, such as text classification, sentiment analysis, and machine translation. The Word2vec algorithm includes two main models: Continuous Bag of Words (CBOW) and Skip-gram, which predict target words based on context and predict context words based on target words, respectively. The Word2vec algorithm is widely used in the field of natural language processing and improves the representation and processing of text data.
[0035] Vectorization: Vectorization is the process of converting data into vectors. In machine learning, vectorization can simplify data processing and calculations. By representing data as vectors, mathematical operations and comparisons can be performed more easily. Vectorization can also speed up the calculation process, especially in fields such as deep learning that require a lot of matrix and vector operations. Vectorization usually uses linear algebra and tensor operations to express data, improve computational efficiency and reduce complexity.
[0036] Dimensionality reduction: refers to the process of reducing the feature dimensions of data. In machine learning and data analysis, data often has high-dimensional features, but sometimes these features may be redundant or less important, and the processing and computational costs of high-dimensional data are also high. Therefore, the goal of dimensionality reduction is to retain the most important information in the data while reducing the dimensionality of the data so that model training, visualization or other data analysis tasks can be performed more efficiently. Dimensionality reduction methods include principal component analysis (PCA), linear discriminant analysis (LDA), singular value decomposition (SVD), etc., which can reduce the dimensionality of data by retaining the most important components in the data while trying to minimize the information loss of the data.
[0037] Random Forest: It is an ensemble learning algorithm that builds multiple decision trees and combines their prediction results to make the final prediction. The main advantage of this algorithm is that it runs fast and has a high prediction accuracy. It can handle a large number of input variables without variable preprocessing. It can be used for classification and regression problems and has strong robustness to missing data and unbalanced data. The disadvantage is that when forming an ensemble, the choice of parameters may affect the prediction results, such as the number of decision trees, the depth of the decision trees, etc., which may affect the prediction results.
[0038] F1-Score: It is an indicator used in statistics to measure the accuracy of binary classification (or multi-task binary classification) models. It takes into account both the accuracy and recall of the classification model. F1-Score can be regarded as a weighted average of the accuracy and recall of the model. Its maximum value is 1 and its minimum value is 0. The larger the value, the higher the model availability.
[0039] Domain B: Business domain. Domain B corresponds to the data domain of the business support system (BSS), which mainly includes user data and business data.
[0040] O domain: Operation domain. The O domain corresponds to the data domain of the Operation Support System (OSS), which mainly includes network data.
[0041] M domain: Management domain. The M domain corresponds to the data domain of the Management Support System (MSS), which mainly contains location information.
[0042] DPI data: DPI (Deep Packet Inspection) is a deep packet inspection technology used to analyze the content of data packets in network traffic.
Claims
1. A vectorization method for sales product ordering features for operator potential customer prediction, characterized in that The steps include: Collect all sales product order record data, clean and pre-process the collected data, including processing missing values, outliers and duplicate values; Handle missing values and fill them through interpolation methods; Outliers are processed using anomaly detection algorithms, such as the Z-Score method, IQR interquartile range method, and clustering-based methods to identify and process outliers, and outliers are directly deleted; Handling duplicate values: Identify and remove duplicate records through deduplication algorithms; The order record table structure includes three fields: customer ID cust_id, sales product ID offer_id, order time create_date; The output sales product sequence table includes two fields: customer ID cust_id, sales product ID sequence offer_seq; Use the sales product sequence table data to train the Word2Vec model; map the element ID in each sequence to a continuous vector space so that element IDs with similar meanings are close in the vector space, and use the Word2Vec Skip-gram method to construct a word embedding vector as the feature input of the machine learning model; use the output features of the Word2Vec model to vectorize and compress the sales product sequence, extract the sales product association features, dependency features, and order sequence features, and obtain the vectorized representation of the corresponding sales product ID basic features; Time decay coefficient: the ordering time of the sales product affects the strength of the sales product vector in the combination process. The exponential decay function is used as a coefficient calculation tool. The calculation expression is alpha_i = exp( - a * T_i ), where alpha_i represents the coefficient corresponding to the customer's i-th sales product vector, a represents the attenuation coefficient, and T_i represents the number of days from the i-th sales product order time to the training deadline; the vectorized feature corresponding to the time attenuation coefficient is vector X1=Σ{alpha_i * token_i}, where token_i represents the vector representation of the i-th sales product ID in the sales product sequence after vectorization; by adjusting the attenuation coefficient, the degree of attenuation over time can be expressed to adapt to different business scenarios; Value weighted coefficient, the price of the sales product affects the strength of the sales product vector in the combination process; the calculation formula is beta_i = (w_i + b) / (w_1 + w_2 + ... + w_n + b), where beta_i is the coefficient corresponding to the customer's i-th sales product vector, w_i is the value corresponding to the i-th sales product, n is the total number of sales products ordered by the customer, and b is the smoothing coefficient; The vectorized feature of the corresponding value weighting coefficient is vector X2=Σ{beta_i * token_i}, where token_i represents the vectorized representation of the i-th sales product ID in the sales product sequence; the smoothing coefficient adjusts the strength of the value difference to adapt to different business scenarios; Average weighted coefficient, the weighted coefficient corresponding to each sales product vector is equal; the calculation formula is gamma_i=1 / n, where gamma_i represents the coefficient corresponding to the customer's i-th sales product vector, and n represents the total number of sales products ordered by the customer; the vectorized feature corresponding to the average weighted coefficient is vector X3=Σ{gamma_i * token_i}, where token_i represents the vector representation of the i-th sales product ID in the sales product sequence after vectorization; The sales product space vector assembly is performed by associating the sales product vector table with the time attenuation coefficient, the value weighted coefficient, and the average weighted coefficient, respectively, and then scaling and summing the coefficients to complete the vector assembly of the sales product space.
2. The vectorization method for sales product ordering features for operator potential customer prediction according to claim 1 is characterized in that It also includes the following steps Cross-validation and other methods are used to train and tune the random forest potential customer prediction model, grid search and other techniques are used to select the best hyperparameter combination, and the evaluation indicator F1-Score is used to evaluate the model; the specific steps are as follows:
1. Define the hyperparameter range, the number of trees (n_estimators) [10, 50, 100, 200], the maximum number of features (max_features) ['auto', 'sqrt', 'log2'], the maximum tree depth (max_depth) [None, 10, 20, 30, 40,50], the minimum number of sample splits (min_samples_split) [2, 5, 10], the minimum number of sample leaves (min_samples_leaf) [1, 2, 4]; 2. Use GridSearchCV in the Scikit-Learn library to perform grid search to find the best combination of the above hyperparameters; 3. The goal is set to optimize F1-Score, which can balance precision and recall and is suitable for processing unbalanced data sets; 4. Select the best hyperparameter combination through grid search n_estimators=200,max_features='sqrt',max_depth=30,min_samples_split=5,min_samples_leaf=2; Deploy the trained model to the production environment, regularly monitor the marketing results of potential customer prediction, and update the model parameters in a timely manner as needed.