Random forest algorithm-based Chinese style cigarette product market state classification method

The weighted K-Means random forest classification algorithm and AHP-entropy method are used to construct a Chinese cigarette product market status evaluation index system, which solves the accuracy and real-time problems of Chinese cigarette product market status identification and provides precise marketing support.

CN118536002APending Publication Date: 2024-08-23CHINA TOBACCO ZHEJIANG IND CO LTD

Patent Information

Application Number
CN202410579766.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-11
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

There are difficulties in real-time and accurate evaluation and identification of the market status of Chinese cigarette products. Traditional methods rely on experience and are inaccurate, and lack status label data, making it difficult to achieve precise marketing.

Method used

The weighted K-Means random forest classification algorithm is used to construct a market status evaluation index system for Chinese cigarette products, and the AHP-entropy value method is used to determine the index weight, and feature vector learning and training are performed to achieve cluster analysis and identification of market status.

Benefits of technology

It achieves accurate classification and identification of the market status of Chinese cigarette products, provides precise marketing decision support for the tobacco industry, and improves the real-time and accuracy of marketing management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118536002A
    Figure CN118536002A
Patent Text Reader

Abstract

The invention discloses a Chinese style cigarette product market state classification method based on a random forest algorithm, and the method comprises the steps: S1, obtaining the sales historical data of a Chinese style cigarette product market, and obtaining factors affecting the product market state and a feature vector time sequence; s2, cigarette product market state types and schemes are set, an evaluation index system of the Chinese style cigarette product market state is constructed, and an AHP-entropy method is adopted to determine evaluation indexes and weights; s3, related feature vectors are screened out from the indexes capable of representing the market state, and three feature vectors of the price, the demand enthusiasm and the stock-sales ratio of the first-level criterion layer are obtained; s4, based on a weighted K-means random forest classification algorithm, learning and training are carried out according to the set cigarette product market state types and number and the input feature vectors, a market state clustering result of the Chinese style cigarette product in the life cycle of the Chinese style cigarette product is obtained, and then the current market state of the Chinese style cigarette product is determined; and S5, formulating and implementing an accurate marketing strategy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of digital marketing of Chinese cigarette products, and in particular relates to a method for classifying the market status of Chinese cigarette products based on a random forest algorithm. Background Art

[0002] Affected by many uncertain factors such as policy restrictions, seasonal fluctuations, imbalanced supply and demand, and macroeconomic changes, it is very difficult for the tobacco industry to achieve precision marketing based on digitalization and intelligence. Real-time and accurate evaluation and identification of the market status of Chinese cigarette products is the basis for achieving precision marketing, but the traditional market status evaluation method that relies on the experience of marketers and after-the-fact is extremely inaccurate.

[0003] The rapid development of artificial intelligence, especially machine learning algorithms, has made it possible to classify business data sets in many fields with higher accuracy. However, the marketing data of Chinese cigarette products only has more feature data but lacks state label data.

[0004] Therefore, it is necessary to design an algorithm that can learn and train the time series vectors that affect the market status of Chinese cigarette products by performing multi-dimensional feature analysis on historical marketing data without label information, and obtain a cluster analysis of the market status of Chinese cigarette products. Summary of the invention

[0005] In order to solve the above technical problems existing in the prior art, the present invention provides a classification method for the market status of Chinese cigarette products based on a random forest algorithm. The present invention adopts a weighted K-Means random forest classification algorithm, and by constructing a Chinese cigarette product market status evaluation index system, the evaluation, classification and identification of the market status of Chinese cigarette products are achieved, which has high real-time performance and accuracy, and can provide decision support for marketers of Chinese cigarette products to implement precision marketing.

[0006] The technical solution adopted by the present invention is:

[0007] A method for classifying the market status of Chinese cigarette products based on a random forest algorithm, characterized in that it specifically comprises the following steps:

[0008] S1: Obtain the historical data of the market sales of Chinese cigarette products. After processing and cleaning the historical data, the factors affecting the product market status and the feature vector time series that can characterize the product market status are obtained;

[0009] S2: Set the types and plans of cigarette product market status, build an evaluation index system for the market status of Chinese cigarette products based on the correlation analysis of market status influencing factors, and use the AHP-entropy method to determine each evaluation index and weight;

[0010] S3: Based on the evaluation index system of the market status of Chinese cigarette products, relevant feature vectors are selected from the indicators that can characterize the market status. After dimension reduction and normalization, three feature vectors of the first-level criterion layer, namely, price, demand enthusiasm and inventory-to-sales ratio, are obtained;

[0011] S4: Based on the weighted K-means random forest classification algorithm, according to the set types and quantities of cigarette product market status, feature vectors are input for learning and training, and the market status clustering results of Chinese cigarette products in their life cycle are obtained, thereby determining the current market status of Chinese cigarette products;

[0012] S5: Based on the current market status of Chinese cigarette products, precise marketing strategies can be formulated and implemented.

[0013] Furthermore, in step S1, the specific process is as follows:

[0014] S1.1 Obtain historical market sales data of Chinese cigarette products to form various data sets based on time series;

[0015] S1.2 Process and clean missing or erroneous abnormal data in the initial data obtained; according to the characteristics of abnormal data that deviates from the normal range in the sales process of Chinese cigarette products, set abnormal data processing rules to process and clean the abnormal data, and form a feature vector time series that can affect the market status of Chinese cigarette products and characterize the market status of products.

[0016] Furthermore, in step S2, the specific process is as follows:

[0017] S2.1 According to the tobacco industry enterprises’ own conditions and the actual marketing business, determine the number and types of Chinese cigarette product market conditions, as well as the content of marketing plans for different product market conditions;

[0018] S2.2 performs correlation calculation on the market sales history data obtained after cleaning and processing in step S1.2 to obtain a correlation coefficient matrix between various factors affecting the market status of Chinese cigarette products;

[0019] Assuming that x1 and x2 are two factors that affect the product market status, the correlation coefficient between the two factors can be expressed as:

[0020]

[0021] Among them, Cov(x1,x2) is the covariance of factor x1 and factor x2, Var(x1) is the variance of factor x1, and Var(x2) is the variance of x2;

[0022] By calculating the correlation coefficients of all factors that affect the market status of products, we can obtain the correlation coefficient matrix between the factors that affect the market status of Chinese cigarette products.

[0023] S2.3 Based on the correlation coefficient matrix obtained in step S2.2, after screening, the best indicator characterizing the market status of Chinese cigarette products can be obtained, which can be used to evaluate the market status of Chinese cigarette products, and different classifications of market status can also be obtained through machine learning and training of its time series data;

[0024] S2.4 Use the AHP method to construct an evaluation index system for the market status of Chinese cigarette products;

[0025] For the n Chinese cigarette product market status evaluation indicators obtained from step S2.3, based on the AHP method, different levels of evaluation factor sets are established according to the attributes of each evaluation indicator to form a hierarchical structure model;

[0026] S2.5 uses the entropy method to calculate the weight of each indicator based on the difference coefficient of each indicator;

[0027] For m evaluation objects with n evaluation indicators, the initial evaluation matrix can be constructed:

[0028] A m×n =(a ij ) m×n (2)

[0029] Among them, A is the initial evaluation matrix, a ij is the value of the jth indicator of the i-th evaluation object (i=1,2,3,…,m; j=1,2,3,…,n). The initial evaluation matrix is ​​normalized to obtain the standardized matrix:

[0030] R m×n =(r ij ) m×n (3)

[0031] Among them, R is the standardized matrix obtained after normalization, r ij is the normalized value of the jth indicator of the i-th evaluation object (i=1,2,3,…,m; j=1,2,3,…,n). Then the proportion of the jth indicator in the i-th evaluation object can be expressed as:

[0032]

[0033] Among them, p ij is the proportion of the jth indicator in the i-th evaluation object. Then the information entropy of the jth indicator is:

[0034]

[0035] Among them, e j is the information entropy of the j-th indicator, satisfying e≥0.

[0036]

[0037] Among them, k is a coefficient, satisfying k>0. Thus, the difference coefficient of each indicator can be calculated:

[0038] d j =1-e j (7)

[0039] Among them, d j is the difference coefficient of the jth indicator. The weights of each indicator are finally obtained as follows:

[0040]

[0041] Among them, w j is the weight of the j-th indicator, j = 1, 2, 3, …, n.

[0042] Furthermore, in step S3, the specific process is as follows:

[0043] S3.1, based on the Chinese cigarette product market status evaluation index system obtained in step S2, obtain the feature vector time series corresponding to each evaluation index from the data sequence processed and cleaned in step S1.2;

[0044] S3.2 performs dimensionality reduction processing on the feature vector;

[0045] According to the constructed Chinese cigarette product market status evaluation index system, the feature vector time series corresponding to each evaluation index obtained in step S3.1 is used as input to obtain the first-level criterion layer feature vector time series that can be used for cluster analysis;

[0046] S3.3 performs dimensionless and normalized processing on the time series data of the feature vector of the first-level criterion layer;

[0047] Evaluation indicators are divided into positive indicators and negative indicators according to the direction of indicator change. The larger the positive indicator value, the better, and the smaller the negative indicator value, the better;

[0048] Assume there are n decision indicators f j (1≤j≤n), m solutions a to be evaluated i (1≤i≤m), the n index values ​​of m solutions constitute the decision matrix X=(x ij ) m×n ;

[0049] The range transformation method is used to normalize the data, that is, for positive indicators:

[0050]

[0051] Among them, x ij is the value of the jth indicator of the ith solution, max(x ij ) is the maximum value of the jth indicator in each solution, min(x ij ) is the minimum value of the jth indicator in each scheme;

[0052] For contrarian indicators:

[0053]

[0054] By taking the average of the normalized time series data of the first-level criterion layer feature vectors, the evaluation results of different dimensions of each product can be obtained.

[0055] Furthermore, in step S4, the specific process is as follows:

[0056] S4.1 Based on the weight value of the Chinese cigarette product market status evaluation index system constructed in step 2 above, weight the time series data of the first-level criterion layer feature vector obtained in step 3, and randomly select half of the data points from the weighted data set as the status index data set for the next step of clustering calculation;

[0057] S4.2 Based on the K-means algorithm, clustering calculation is performed on the state index data set obtained in the previous step from different dimensions of the first-level criterion layer feature vector representing the market status of Chinese cigarette products;

[0058] S4.3 For a data set X of m products = {x1, x2, …, x m}, where each object has n first-level criterion layer feature vectors, then the data set X is expressed as:

[0059]

[0060] S4.4 Determine the number of clusters k to be clustered based on the number of types of Chinese cigarette product market status determined in S2.1, and randomly select k points as the initial cluster centers μ i (1≤i≤k); the cluster set is expressed as:

[0061] C={c1,c2,...,c k} (12)

[0062] S4.5 Calculate each data point x ij The Euclidean distance to each cluster center is obtained according to the k distance values ​​obtained. ijAssigned to the cluster c with the smallest distance k In which the Euclidean distance is expressed as:

[0063]

[0064] Among them, x i is the i-th product, c j is the jth cluster center, x it and c jt are the tth index value of the i-th product and the j-th cluster center respectively;

[0065] S4.6 Calculate the average value of the data in each cluster and use this average value as a new set of cluster centers μ i '(1≤i≤k) and perform a new round of iterations, while calculating the error square sum SSE of each cluster:

[0066]

[0067] S4.7 Repeat steps S4.5 and S4.6 until convergence (cluster center or SSE no longer changes) or the set maximum number of iterations is reached, and the clustering process ends;

[0068] S4.8 outputs the market status label of the corresponding data point to form a market status label data set; inputs the market status characteristic indicator data set and the status label data set into the random forest classification algorithm model for learning and training; and uses the trained model to perform classification calculation on the normalized first-level criterion layer feature vector time series data obtained in step S3.3;

[0069] S4.9 Extract n sample data of the same number as the original data set from the data set X each time by Bootstraping with replacement, construct a data subset, and perform k rounds of extraction in total. The training sets extracted in each round are T1, T2, ..., T k ;

[0070] S4.10 If there are D features in the feature space, then in each round of decision tree generation, d features (d < D) are randomly selected from the D features to form a new feature set, and k decision trees are generated using the new feature set, and K classification results are obtained;

[0071] S4.11 will vote on the classification results of each decision tree, select the prediction result with the most votes as the final classification result of the random forest algorithm, output the number of types of market status of Chinese cigarette products determined in step S2.1, and obtain the product market status classification results based on the market status label data set.

[0072] Furthermore, in step S5, the specific process is as follows:

[0073] S5.1, according to the Chinese cigarette product market status evaluation index system determined in step S2, calculate the quantitative results of each layer of indicators, and obtain the market status corresponding to the current product according to the clustering result output in step S4;

[0074] S5.2 According to the quantitative results of the evaluation indicators of the market status of Chinese cigarette products and the current market status, the products can be matched with their corresponding marketing strategies.

[0075] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0076] 1. The present invention first analyzes the influencing factors that affect the market status of Chinese cigarette products, constructs an evaluation index system for the market status of Chinese cigarette products using the AHP-entropy method and determines the weight of each evaluation index; uses the K-Means random forest classification algorithm to perform machine learning and training on the key feature vector time series, obtains accurate market status classification results, and provides decision support for achieving precision marketing.

[0077] 2. The method of the present invention, which can quickly, accurately and effectively evaluate and identify the market status of Chinese cigarette products, can undoubtedly provide decision-making support for tobacco industry enterprises and Chinese cigarette product marketing departments and personnel to achieve precision marketing, and is also the basis for the digital and intelligent application of tobacco industry marketing business.

[0078] 3. The machine learning method based on the weighted K-Means random forest classification algorithm of the present invention can effectively solve the problem that the traditional product market status evaluation is not accurate and real-time enough, and can flexibly define the number of product market status analogies, greatly enriching the decision-making space of Chinese cigarette product marketing managers; compared with most other machine learning classification algorithms, the weighted K-means random forest algorithm not only has the advantage of high accuracy in classifying business data in more scenarios, but the algorithm also provides classification support for data that lacks status labels.

[0079] 4. The Chinese cigarette product market status evaluation and identification method based on the weighted K-Means random forest classification algorithm provides a basis for tobacco industry enterprises and Chinese cigarette product marketing departments and personnel to quickly determine the current market status of each product and quickly match corresponding marketing strategies, thereby meeting the personalized decision-making needs of Chinese cigarette product marketing managers. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION

[0081] The specific implementation of the embodiment of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the embodiment of the present invention, and is not used to limit the embodiment of the present invention.

[0082] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.

[0083] The present invention will be described in detail below in conjunction with exemplary embodiments with reference to the accompanying drawings.

[0084] refer to Figure 1 The present invention provides a method for classifying the market status of Chinese cigarette products based on a random forest algorithm, which specifically comprises the following steps:

[0085] S1: Obtain the historical market sales data of Chinese cigarette products, and after processing and cleaning, obtain the factors affecting the product market status and the feature vector time series that can characterize the product market status;

[0086] S1.1 Obtain historical market sales data of Chinese cigarette products to form various data sets based on time series;

[0087] The historical market sales data of a Chinese cigarette product (from the 50th week of 2019 to the 18th week of 2022) are obtained, mainly including market price, retail price, purchase area, order-filling rate, order-filling area, average moving sales volume and social inventory, etc., which are time series in weeks, as shown in Table 1.

[0088] Table 1 Historical market sales data of a certain product (week 50 of 2019 to week 18 of 2022)

[0089]

[0090] S1.2 Process and clean missing or erroneous abnormal data in the initial data obtained; according to the characteristics of abnormal data that deviates from the normal range in the sales process of Chinese cigarette products, set abnormal data processing rules to process and clean the abnormal data, and form a feature vector time series that can affect the market status of Chinese cigarette products and characterize the market status of products.

[0091] According to the data characteristics and missing value features, the following missing value and abnormal data processing rules are set:

[0092] For missing weekly data, the missing data is filled with the average value of the two weeks before and after the missing week.

[0093] For missing day data, the data of some days are missing, and the average value of the other days in the week with missing data is used as the data for that week.

[0094] Abnormal data are treated as missing data.

[0095] According to the above rules, missing value data is filled and abnormal data is processed to form a product market sales data set with continuous weeks as the time series, as shown in Table 2.

[0096] Table 2 Historical market sales data after missing values ​​and outliers processing

[0097]

[0098]

[0099] S2: Set the types and plans of cigarette product market status, build an evaluation index system for the market status of Chinese cigarette products based on the correlation analysis of market status influencing factors, and use the AHP-entropy method to determine each evaluation index and weight;

[0100] S2.1 According to the tobacco industry enterprises’ own conditions and the actual marketing business, determine the number and types of Chinese cigarette product market conditions, as well as the content of marketing plans for different product market conditions;

[0101] In the actual marketing process of Chinese cigarette products, the market status is generally divided into five categories, corresponding to the five market statuses of "snappy, tight, flat, loose, and soft".

[0102] S2.2 performs correlation calculation on the market sales related data obtained after cleaning and processing in step S1.2 to obtain a correlation coefficient matrix between various factors affecting the market status of Chinese cigarette products.

[0103] Assuming that x1 and x2 are two factors that affect the product market status, the correlation coefficient between the two factors can be expressed as:

[0104]

[0105] Among them, Cov(x1,x2) is the covariance of factor x1 and factor x2, Var(x1) is the variance of factor x1, and Var(x2) is the variance of x2.

[0106] By calculating the correlation coefficients of all factors that affect the market status of products, we can obtain the correlation coefficient matrix between the factors that affect the market status of Chinese cigarette products. The calculation results of the correlation coefficients of the product indicators in the above example are shown in Table 3.

[0107] Table 3 Correlation coefficients of various indicators

[0108]

[0109] S2.3 Based on the correlation coefficient matrix obtained in step 2.2, the best indicator characterizing the market status of Chinese cigarette products can be obtained after screening, which can be used to evaluate the market status of Chinese cigarette products, and different classifications of market status can also be obtained through machine learning and training of its time series data;

[0110] S2.4 Further, the AHP method is used to construct an evaluation index system for the market status of Chinese cigarette products.

[0111] For the n Chinese cigarette product market status evaluation indicators obtained from step S2.3, based on the AHP method, different levels of evaluation factor sets are established according to the attributes of each evaluation indicator to form a hierarchical structure model;

[0112] S2.5 uses the entropy method to calculate the weight of each indicator based on the difference coefficient of each indicator;

[0113] For m evaluation objects with n evaluation indicators, the initial evaluation matrix can be constructed:

[0114] A m×n =(a ij ) m×n (2)

[0115] Among them, A is the initial evaluation matrix, a ij is the value of the jth indicator of the i-th evaluation object (i=1,2,3,…,m; j=1,2,3,…,n). The initial evaluation matrix is ​​normalized to obtain the standardized matrix:

[0116] R m×n =(r ij ) m×n (3)

[0117] Among them, R is the standardized matrix obtained after normalization, r ij is the normalized value of the jth indicator of the i-th evaluation object (i=1,2,3,…,m; j=1,2,3,…,n). Then the proportion of the jth indicator in the i-th evaluation object can be expressed as:

[0118]

[0119] Among them, p ij is the proportion of the jth indicator in the i-th evaluation object. Then the information entropy of the jth indicator is:

[0120]

[0121] Among them, e j is the information entropy of the j-th indicator, satisfying e≥0.

[0122]

[0123] Among them, k is a coefficient, satisfying k>0. From this, the difference coefficient of each indicator can be calculated:

[0124] d j =1-e j (7)

[0125] Among them, d j is the difference coefficient of the jth indicator. The weights of each indicator are finally obtained as follows:

[0126]

[0127] Among them, w j is the weight of the j-th indicator, j = 1, 2, 3, …, n.

[0128] Tobacco industry experts were invited to conduct a questionnaire survey on the classification of each indicator. After collecting and processing relevant results and data, the indicator weights were calculated for the two criterion layers according to the hierarchical analysis method and entropy method steps. Finally, the evaluation index system and its weights for the market status of negative reviews of Chinese cigarettes were obtained, as shown in Table 4.

[0129] Table 4 Evaluation index system and weight distribution of Chinese cigarette product market status

[0130]

[0131] S3: According to the constructed Chinese cigarette product market status evaluation index system, relevant feature vectors are selected from the indicators that can characterize the market status. After dimension reduction and normalization, three feature vectors of the first-level criterion layer, namely, price, demand enthusiasm and inventory-to-sales ratio, are obtained;

[0132] S3.1 Based on the Chinese cigarette product market status evaluation index system obtained in the above steps, the characteristic vector time series corresponding to each evaluation index is obtained from the data sequence processed and cleaned in step S1.2.

[0133] S3.2 performs dimensionality reduction processing on the feature vector.

[0134] According to the constructed Chinese cigarette product market status evaluation index system, the characteristic vector time series corresponding to each evaluation index obtained in step S3.1 is used as input to obtain the first-level criterion layer characteristic vector time series that can be used for cluster analysis.

[0135] S3.3 performs dimensionless and normalized processing on the time series data of the above-mentioned first-level criterion layer feature vector.

[0136] Evaluation indicators are divided into two categories according to the direction of indicator change: positive indicators (the larger the indicator value, the better) and reverse indicators (the smaller the indicator value, the better). Suppose there are n decision indicators f j (1≤j≤n), m solutions a to be evaluated i (1≤i≤m), the n index values ​​of m solutions constitute the decision matrix X=(x ij ) m×n The range transformation method is used to normalize the data, that is, for positive indicators:

[0137]

[0138] Among them, x ij is the value of the jth indicator of the ith solution, max(x ij ) is the maximum value of the jth indicator in each solution, min(x ij ) is the minimum value of the jth indicator in each scheme;

[0139] For contrarian indicators:

[0140]

[0141] By taking the average of the normalized time series data of the first-level criterion layer feature vector, we can get the evaluation results of different dimensions of each product. For the products in the above example, the normalization of price and demand enthusiasm uses weekly data, while the normalization of inventory-to-sales ratio uses daily data, and then the average of the daily data is used as the weekly data. For this example, the average of the normalized weekly data of the first-level indicators is taken to obtain the time series data results of the first-level criterion layer feature vector of the product, as shown in Table 5.

[0142] Table 5 Normalized time series of first-level criterion layer feature vectors

[0143]

[0144] S4: Based on the weighted K-means random forest classification algorithm, according to the set types and quantities of cigarette product market status, feature vectors are input for learning and training, and the market status clustering results of Chinese cigarette products in their life cycle are obtained, thereby determining the current market status of Chinese cigarette products;

[0145] S4.1 Based on the weight value of the Chinese cigarette product market status evaluation index system constructed in step S2 above, weight the time series data of the first-level criterion layer feature vector obtained in step S3, and randomly extract half of the data points from the weighted data set as the status index data set for the next step of clustering calculation;

[0146] S4.2 Based on the K-means algorithm, clustering calculation is performed on the state index data set obtained in the previous step from different dimensions of the first-level criterion layer feature vector representing the market status of Chinese cigarette products;

[0147] S4.3 For a data set X of m products = {x1, x2, ..., x m}, where each object has n first-level criterion layer feature vectors, then the data set X is expressed as:

[0148]

[0149] S4.4 According to the number of types of Chinese cigarette product market status determined in step S2.1, determine the number of clusters k that need to be clustered, and randomly select k points as the initial cluster center μ i (1≤i≤k). The cluster set is represented as:

[0150] C={c1,c2,...,c k} (12)

[0151] S4.5 Calculate each data point x ij The Euclidean distance to each cluster center is obtained according to the k distance values ​​obtained. ij Assigned to the cluster c with the smallest distance k In which the Euclidean distance is expressed as:

[0152]

[0153] Among them, x i is the i-th product, c j is the jth cluster center, x it and c jt are the tth index value of the i-th product and the j-th cluster center respectively;

[0154] S4.6 Calculate the average value of the data in each cluster and use this average value as a new set of cluster centers μ i '(1≤i≤k) and perform a new round of iterations, while calculating the error square sum SSE of each cluster:

[0155]

[0156] S4.7 Repeat steps S4.5 and S4.6 until convergence (cluster center or SSE no longer changes) or the set maximum number of iterations is reached, and the clustering process ends;

[0157] In this example, the market status is set to five categories "1-5" in step 2.1, corresponding to five market statuses: "hot, tight, flat, loose, soft". Finally, the product market status at the corresponding time point is output, as shown in Table 6.

[0158] Table 6 Clustering results

[0159]

[0160] S4.8 outputs the market status label of the corresponding data point to form a market status label data set; inputs the market status characteristic indicator data set and the status label data set into the random forest classification algorithm model for learning and training. The normalized first-level criterion layer feature vector time series data obtained in step S3.3 is classified and calculated using the trained model;

[0161] S4.9 Extract n sample data of the same number as the original data set from the data set X each time by bootstraping, construct a data subset, and perform k rounds of extraction in total. The training sets extracted in each round are T1, T2, ..., T k ;

[0162] S4.10 If there are D features in the feature space, then in each round of decision tree generation, d features (d < D) are randomly selected from the D features to form a new feature set, and k decision trees are generated using the new feature set, and K classification results are obtained;

[0163] S4.11 will vote on the classification results of each decision tree, select the prediction result with the most votes as the final classification result of the random forest algorithm, output the number of types of market status of Chinese cigarette products determined in step 2.1, and obtain the product market status classification results based on the market status label data set.

[0164] In this example, the calculated product market status classification results based on the number of market status categories specified at the solution level are shown in Table 7.

[0165] Table 7 Market status classification results

[0166]

[0167]

[0168] S5: Based on the current market status of Chinese cigarette products, accurate marketing strategies can be formulated and implemented;

[0169] S5.1, according to the Chinese cigarette product market status evaluation index system determined in step S2, calculate the quantitative results of each layer of indicators, and obtain the market status corresponding to the current product according to the clustering result output in step S4;

[0170] S5.2 According to the quantitative results of the evaluation indicators of the market status of Chinese cigarette products and the current market status, the products can be matched with their corresponding marketing strategies.

[0171] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A method for classifying the market status of Chinese cigarette products based on a random forest algorithm, characterized in that: The specific steps include: S1: Obtain the historical data of the market sales of Chinese cigarette products. After processing and cleaning the historical data, the factors affecting the product market status and the feature vector time series that can characterize the product market status are obtained; S2: Set the types and plans of cigarette product market status, build an evaluation index system for the market status of Chinese cigarette products based on the correlation analysis of market status influencing factors, and use the AHP-entropy method to determine each evaluation index and weight; S3: Based on the evaluation index system of the market status of Chinese cigarette products, relevant feature vectors are selected from the indicators that can characterize the market status. After dimension reduction and normalization, three feature vectors of the first-level criterion layer, namely, price, demand enthusiasm and inventory-to-sales ratio, are obtained; S4: Based on the weighted K-means random forest classification algorithm, according to the set types and quantities of cigarette product market status, feature vectors are input for learning and training, and the market status clustering results of Chinese cigarette products in their life cycle are obtained, thereby determining the current market status of Chinese cigarette products; S5: Based on the current market status of Chinese cigarette products, precise marketing strategies can be formulated and implemented.

2. The method for classifying the market status of Chinese cigarette products based on random forest algorithm according to claim 1, characterized in that: In step S1, the specific process is as follows: S1.1 Obtain historical market sales data of Chinese cigarette products to form various data sets based on time series; S1.2 Process and clean missing or erroneous abnormal data in the initial data obtained; according to the characteristics of abnormal data that deviates from the normal range in the sales process of Chinese cigarette products, set abnormal data processing rules to process and clean the abnormal data, and form a feature vector time series that can affect the market status of Chinese cigarette products and characterize the market status of products.

3. The method for classifying the market status of Chinese cigarette products based on random forest algorithm according to claim 1, characterized in that: In step S2, the specific process is as follows: S2.1 According to the tobacco industry enterprises’ own conditions and the actual marketing business, determine the number and types of Chinese cigarette product market conditions, as well as the content of marketing plans for different product market conditions; S2.2 performs correlation calculation on the market sales history data obtained after cleaning and processing in step S1.2 to obtain a correlation coefficient matrix between various factors affecting the market status of Chinese cigarette products; Assuming that x1 and x2 are two factors that affect the product market status, the correlation coefficient between the two factors can be expressed as: Among them, Cov(x1,x2) is the covariance of factor x1 and factor x2, Var(x1) is the variance of factor x1, and Var(x2) is the variance of x2; By calculating the correlation coefficients of all factors that affect the market status of products, we can obtain the correlation coefficient matrix between the factors that affect the market status of Chinese cigarette products. S2.3 Based on the correlation coefficient matrix obtained in step S2.2, after screening, the best indicator characterizing the market status of Chinese cigarette products can be obtained, which can be used to evaluate the market status of Chinese cigarette products, and different classifications of market status can also be obtained through machine learning and training of its time series data; S2.4 Use the AHP method to construct an evaluation index system for the market status of Chinese cigarette products; For the n Chinese cigarette product market status evaluation indicators obtained from step S2.3, based on the AHP method, different levels of evaluation factor sets are established according to the attributes of each evaluation indicator to form a hierarchical structure model; S2.5 uses the entropy method to calculate the weight of each indicator based on the difference coefficient of each indicator; For m evaluation objects with n evaluation indicators, the initial evaluation matrix can be constructed: A m×n =(a ij ) m×n (2) Among them, A is the initial evaluation matrix, a ij is the value of the jth indicator of the i-th evaluation object (i=1,2,3,…,m; j=1,2,3,…,n); Normalize the initial evaluation matrix to obtain a standardized matrix: R m×n =(r ij ) m×n (3) Among them, R is the standardized matrix obtained after normalization, r ij is the normalized value of the jth indicator of the ith evaluation object (i=1,2,3,…,m; j=1,2,3,…,n); then the proportion of the jth indicator in the i evaluation objects can be expressed as: Among them, p ij is the proportion of the jth indicator in the i-th evaluation object; then the information entropy of the jth indicator is: Among them, e j is the information entropy of the jth index, satisfying e≥0; Among them, k is a coefficient, satisfying k>0; thus, the difference coefficient of each indicator can be calculated: d j =1-e j (7) Among them, d j is the coefficient of difference of the jth indicator; The final weight of each indicator is: Among them, w j is the weight of the j-th indicator, j = 1, 2, 3, …, n.

4. The method for classifying the market status of Chinese cigarette products based on random forest algorithm according to claim 1, characterized in that: In step S3, the specific process is as follows: S3.1, based on the Chinese cigarette product market status evaluation index system obtained in step S2, obtain the feature vector time series corresponding to each evaluation index from the data sequence processed and cleaned in step S1.2; S3.2 performs dimensionality reduction processing on the feature vector; According to the constructed Chinese cigarette product market status evaluation index system, the feature vector time series corresponding to each evaluation index obtained in step S3.1 is used as input to obtain the first-level criterion layer feature vector time series that can be used for cluster analysis; S3.3 performs dimensionless and normalized processing on the time series data of the feature vector of the first-level criterion layer; Evaluation indicators are divided into positive indicators and negative indicators according to the direction of indicator change. The larger the positive indicator value, the better, and the smaller the negative indicator value, the better; Assume there are n decision indicators f j (1≤j≤n), m solutions a to be evaluated i (1≤i≤m), the n index values ​​of m options constitute the decision matrix X=(x ij ) m×n ; The range transformation method is used to normalize the data, that is, for positive indicators: Among them, x ij is the value of the jth indicator of the ith solution, max(x ij ) is the maximum value of the jth indicator in each solution, min(x ij ) is the minimum value of the jth indicator in each scheme; For contrarian indicators: By taking the average of the normalized time series data of the first-level criterion layer feature vectors, the evaluation results of different dimensions of each product can be obtained.

5. The method for classifying the market status of Chinese cigarette products based on random forest algorithm according to claim 1, characterized in that: In step S4, the specific process is as follows: S4.1 Based on the weight value of the Chinese cigarette product market status evaluation index system constructed in step 2 above, weight the time series data of the first-level criterion layer feature vector obtained in step 3, and randomly select half of the data points from the weighted data set as the status index data set for the next step of clustering calculation; S4.2 Based on the K-means algorithm, clustering calculation is performed on the state index data set obtained in the previous step from different dimensions of the first-level criterion layer feature vector representing the market status of Chinese cigarette products; S4.3 For a data set X of m products = {x1, x2, ..., x m }, where each object has n first-level criterion layer feature vectors, then the data set X is expressed as: S4.4 Determine the number of clusters k to be clustered based on the number of types of Chinese cigarette product market status determined in S2.1, and randomly select k points as the initial cluster centers μ i (1≤i≤k); the cluster set C is expressed as: C={c1,c2,...,c k } (12) S4.5 Calculate each data point x ij The Euclidean distance to each cluster center is obtained according to the k distance values ​​obtained. ij Assigned to the cluster c with the smallest distance k In which the Euclidean distance is expressed as: Among them, x i is the i-th product, c j is the jth cluster center, x it and c jt are the tth index value of the i-th product and the j-th cluster center respectively; S4.6 Calculate the average value of the data in each cluster and use this average value as a new set of cluster centers μ i '(1≤i≤k) and perform a new round of iterations, while calculating the error square sum SSE of each cluster: S4.7 Repeat steps S4.5 and S4.6 until convergence (cluster center or SSE no longer changes) or the set maximum number of iterations is reached, and the clustering process ends; S4.8 outputs the market status label of the corresponding data point to form a market status label data set; inputs the market status characteristic indicator data set and the status label data set into the random forest classification algorithm model for learning and training; and uses the trained model to perform classification calculation on the normalized first-level criterion layer feature vector time series data obtained in step S3.3; S4.9 Extract n sample data of the same number as the original data set from the data set X each time by Bootstraping with replacement, construct a data subset, and perform k rounds of extraction in total. The training sets extracted in each round are T1, T2, ..., T k ; S4.10 If there are D features in the feature space, then in each round of decision tree generation, d features (d < D) are randomly selected from the D features to form a new feature set, and k decision trees are generated using the new feature set, and K classification results are obtained; S4.11 will vote on the classification results of each decision tree, select the prediction result with the most votes as the final classification result of the random forest algorithm, output the number of types of market status of Chinese cigarette products determined in step S2.1, and obtain the product market status classification results based on the market status label data set.

6. The method for classifying the market status of Chinese cigarette products based on random forest algorithm according to claim 1, characterized in that: In step S5, the specific process is as follows: S5.1, according to the Chinese cigarette product market status evaluation index system determined in step S2, calculate the quantitative results of each layer of indicators, and obtain the market status corresponding to the current product according to the clustering result output in step S4; S5.2 According to the quantitative results of the evaluation indicators of the market status of Chinese cigarette products and the current market status, the products can be matched with their corresponding marketing strategies.

Citation Information

Patent Citations

  • Bus load prediction method

    CN106485262A

  • Sales risk point detection method, system and device based on semi-supervised learning

    CN109978358A

  • Cigarette market state comprehensive evaluation model

    CN114240089A

  • Automated Real Estate Valuation System

    US20160292800A1

Cited By

  • Fast moving consumer goods market state evaluation method and system based on clustering algorithm

    CN120494875A