Target object classification method and apparatus, electronic device, and storage medium
By extracting features and predicting contributions from time-series data of the target object, constructing a meta-model using pre-trained features, and selecting high-contribution features for classification, the problem of poor feature extraction quality in existing technologies is solved, achieving more efficient and accurate classification.
Patent Information
- Application Number
- CN202111423883.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-26
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2041-11-26
AI Technical Summary
Existing technologies suffer from poor feature extraction quality in target object classification, leading to increased computational load and decreased classification efficiency and accuracy.
By acquiring time-series data of the target object, feature extraction is performed, feature distribution vectors are calculated, and a meta-model is constructed using pre-trained features to predict feature contribution. Features with high contribution are then selected for classification.
It improves the accuracy and computational efficiency of target object classification and reduces the manual cost in the feature construction process.
Smart Images

Figure CN114239697B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of information technology, and in particular to a target object classification method and device, electronic equipment and storage medium. BACKGROUND
[0002] At present, the application of target classification has become more and more extensive. Target classification can be used to classify target objects according to historical data of target objects, for example. By analyzing the historical consumption records of a user, it can be determined whether the user is a potential customer. When classifying target objects, the features of the target objects are generally extracted first, and then the target objects are classified according to the features of the target objects.
[0003] However, at present, feature extraction is often performed by manual methods or the like. The extracted features often include poor quality features, which not only increases the amount of calculation and affects the efficiency of classification, but also affects the accuracy of classification when classifying target objects according to the extracted features. SUMMARY
[0004] The purpose of the embodiments of the present application is to provide a target object classification method, device, electronic equipment and storage medium to improve the accuracy of target object classification. The specific technical solutions are as follows:
[0005] The first aspect of the embodiments of the present application provides a target object classification method, which comprises:
[0006] Obtaining time series data of a target object;
[0007] Performing feature extraction on the time series data to obtain a plurality of classification features;
[0008] Calculating the feature distribution vector of each classification feature by a preset feature construction algorithm;
[0009] Predicting the contribution degree of each classification feature according to the feature distribution vector of each classification feature by a pre-trained feature construction meta-model;
[0010] Selecting a classification feature with a contribution degree greater than a preset contribution degree threshold as a current feature of the target object;
[0011] Classifying the target object according to the current feature to obtain a classification result corresponding to the target object.
[0012] Optionally, the method of predicting the contribution degree of each classification feature according to the feature distribution vector of each classification feature by a pre-trained feature construction meta-model comprises:
[0013] calculate a similarity between the feature distribution vector of each feature to be classified and a sample feature distribution vector corresponding to the sample historical data;
[0014] For the feature distribution vector of any feature to be classified, the contribution degree of the sample historical data corresponding to the feature distribution vector of the feature to be classified and having a similarity greater than a preset similarity threshold is taken as the contribution degree of the feature to be classified.
[0015] Optionally, the calculation of the feature distribution vector of each feature to be classified by the preset feature construction algorithm comprises:
[0016] calculating a proportion of a plurality of preset classification categories corresponding to each feature to be classified;
[0017] The feature distribution vector of the feature to be classified is created by calculating the proportion of the plurality of preset classification categories corresponding to each feature to be classified.
[0018] Optionally, the training process of the pre-trained feature construction meta-model comprises:
[0019] obtaining sample historical data;
[0020] performing feature extraction on the sample historical data to obtain sample features;
[0021] calculating a sample feature distribution vector corresponding to the sample features by a preset feature construction algorithm;
[0022] calculating the contribution degree of the sample features by a preset contribution degree algorithm;
[0023] merging the sample feature distribution vector corresponding to the sample features and the contribution degree of the sample features to obtain a feature distribution dataset;
[0024] training a feature construction meta-model to be trained by the feature distribution dataset to obtain the pre-trained feature construction meta-model.
[0025] Optionally, the calculation of the contribution degree of the sample features by the preset contribution degree algorithm comprises:
[0026] classifying the sample historical data by a preset evaluation model to obtain a first classification result; and calculating a classification accuracy according to the first classification result to obtain a first classification accuracy;
[0027] classifying the sample historical data by the preset evaluation model according to the sample historical data and the sample feature distribution vector corresponding to the sample historical data to obtain a second classification result; and calculating a classification accuracy according to the second classification result to obtain a second classification accuracy;
[0028] The first classification accuracy is compared with the second classification accuracy to obtain a contribution degree corresponding to the sample feature distribution vector, wherein when a difference between the first classification accuracy and the second classification accuracy is greater than a preset difference threshold, the corresponding contribution degree is a first numerical value, and when the difference between the first classification accuracy and the second classification accuracy is less than or equal to the preset difference threshold, the corresponding contribution degree is a second numerical value.
[0029] Optionally, the feature extraction on the time series data to obtain a plurality of classification features comprises:
[0030] The feature extraction on the time series data by using a unary operator and / or a binary operator to obtain a plurality of classification features.
[0031] According to a second aspect of the embodiment of the present application, a classification device of a target object is provided, and the device comprises:
[0032] a data acquisition module configured to acquire time series data of the target object;
[0033] a feature extraction module configured to perform feature extraction on the time series data to obtain a plurality of classification features;
[0034] a distribution vector calculation module configured to calculate a feature distribution vector of each classification feature by using a preset feature construction algorithm;
[0035] a contribution degree prediction module configured to predict the contribution degree of each classification feature according to the feature distribution vector of each classification feature by using a pre-trained feature construction meta-model;
[0036] a feature selection module configured to select a classification feature with a contribution degree greater than a preset contribution degree threshold as a current feature of the target object;
[0037] a result acquisition module configured to classify the target object according to the current feature to obtain a classification result corresponding to the target object.
[0038] Optionally, the contribution degree prediction module comprises:
[0039] a similarity calculation sub-module configured to calculate a similarity between the feature distribution vector of each classification feature and a sample feature distribution vector corresponding to sample historical data by using the pre-trained feature construction meta-model;
[0040] a contribution degree calculation sub-module configured to, for the feature distribution vector of any classification feature, take a contribution degree corresponding to sample historical data with a similarity greater than a preset similarity threshold with the feature distribution vector of the classification feature as the contribution degree of the classification feature.
[0041] Optionally, the distribution vector calculation module comprises:
[0042] a proportion calculation sub-module, configured to calculate proportions of the plurality of preset classification categories corresponding to each of the features to be classified;
[0043] a distribution vector creation sub-module, configured to create a feature distribution vector of the feature to be classified by calculating the proportions of the plurality of preset classification categories corresponding to each of the features to be classified.
[0044] Optionally, the apparatus further comprises:
[0045] a sample acquisition module, configured to acquire sample historical data;
[0046] a sample feature extraction module, configured to perform feature extraction on the sample historical data to obtain sample features;
[0047] a sample distribution calculation module, configured to calculate a sample feature distribution vector corresponding to the sample features by using a preset feature construction algorithm;
[0048] a sample contribution degree calculation module, configured to calculate a contribution degree of the sample features by using a preset contribution degree algorithm;
[0049] a contribution degree merging module, configured to merge the sample feature distribution vector corresponding to the sample features and the contribution degree of the sample features to obtain a feature distribution dataset;
[0050] a model training module, configured to train a feature construction meta-model to be trained by using the feature distribution dataset to obtain the pre-trained feature construction meta-model.
[0051] Optionally, the sample contribution degree calculation module comprises:
[0052] a first accuracy rate calculation sub-module, configured to perform classification on the sample historical data by using a preset evaluation model to obtain a first classification result, and calculate a classification accuracy rate according to the first classification result to obtain a first classification accuracy rate;
[0053] a second accuracy rate calculation sub-module, configured to perform classification on the sample historical data according to the sample historical data and a sample feature distribution vector corresponding to the sample historical data by using the preset evaluation model to obtain a second classification result, and calculate a classification accuracy rate according to the second classification result to obtain a second classification accuracy rate;
[0054] The accuracy comparison submodule is configured to compare the first classification accuracy with the second classification accuracy to obtain a contribution degree corresponding to the sample feature distribution vector, wherein the contribution degree is a first value when a difference between the first classification accuracy and the second classification accuracy is greater than a preset difference threshold, and the contribution degree is a second value when the difference between the first classification accuracy and the second classification accuracy is less than or equal to the preset difference threshold.
[0055] Optionally, the feature extraction module is specifically configured to extract features from the time series data by using a unary operator and / or a binary operator to obtain a plurality of features to be classified.
[0056] Another aspect of the embodiments of the present application further provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus.
[0057] The memory is configured to store a computer program.
[0058] The processor is configured to execute the program stored on the memory to implement the classification method steps of any of the target objects.
[0059] Another aspect of the embodiments of the present application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the classification method steps of any of the target objects.
[0060] Another aspect of the embodiments of the present application further provides a computer program product containing instructions, which, when executed on a computer, cause the computer to perform the classification method steps of any of the target objects.
[0061] The embodiments of the present application have the following beneficial effects:
[0062] The target object classification method, device, electronic equipment and storage medium provided by the embodiments of the present application can obtain time sequence data of a target object, perform feature extraction on the time sequence data to obtain a plurality of classification features, calculate a feature distribution vector of each classification feature through a preset feature construction algorithm, predict the contribution degree of each classification feature according to the feature distribution vector of each classification feature through a pre-trained feature construction meta model, select a classification feature with a contribution degree greater than a preset contribution degree threshold as a current feature of the target object, and classify the target object according to the current feature to obtain a classification result corresponding to the target object. Not only can the time sequence data be extracted to obtain a plurality of classification features, but also the contribution degree of each classification feature can be predicted according to the feature distribution vector of each classification feature through the pre-trained feature construction meta model, so that the top N classification features with the highest contribution degrees are selected as the current features of the target object, the target object is classified, and the classification result corresponding to the target object is obtained. The computing efficiency can be improved, and the classification accuracy can be improved.
[0063] The target feature of the to-be-processed data set is constructed, and the labor cost in the feature construction process can be reduced.
[0064] Of course, implementing any product or method of the present application does not necessarily require achieving all the advantages described above at the same time. BRIEF DESCRIPTION OF DRAWINGS
[0065] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description only constitute some embodiments of the present application, and other embodiments can also be obtained by those skilled in the art based on these drawings.
[0066] Figure 1 A flowchart of a target object classification method provided by the embodiments of the present application;
[0067] Figure 2 A flowchart of a training method of a feature construction meta model provided by the embodiments of the present application;
[0068] Figure 3 A flowchart of a method for calculating the contribution degree of a sample feature provided by the embodiments of the present application;
[0069] Figure 4 A flowchart of a method for calculating a feature distribution vector provided by the embodiments of the present application;
[0070] Figure 5 A structural diagram of a target object classification device provided by the embodiments of the present application;
[0071] Figure 6 Another flowchart of a classification method of a target object provided by an embodiment of the present application is shown in FIG. 6.
[0072] Figure 7 Another structural diagram of a classification device of a target object provided by an embodiment of the present application is shown in FIG. 7.
[0073] Figure 8 A structural diagram of an electronic device provided by an embodiment of the present application is shown in FIG. 8. DETAILED DESCRIPTION
[0074] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art based on the present application belong to the scope of protection of the present application.
[0075] First, the professional terms possibly used in the embodiments of the present application are explained:
[0076] Meta-model: a model providing a solution for a new data set.
[0077] Meta-learning: in the field of data mining, learning how to build a model from a historical data set, when there is a new data set, the model can be automatically built to achieve the data mining goal.
[0078] Automated feature engineering: using a feature construction algorithm to automatically build features for a data set, which can extract a large number of features.
[0079] Feature construction hot start: using historical experience to directly recommend features for a new data set; without trying various feature construction methods again.
[0080] The first aspect of the embodiments of the present application first provides a classification method of a target object, the method comprising:
[0081] obtaining time series data of the target object;
[0082] performing feature extraction on the time series data to obtain a plurality of classification features;
[0083] calculating a feature distribution vector of each classification feature by a preset feature construction algorithm;
[0084] predicting the contribution degree of each classification feature according to the feature distribution vector of each classification feature by a pre-trained feature construction meta-model;
[0085] selecting a classification feature with a contribution degree greater than a preset contribution degree threshold as a current feature of the target object;
[0086] According to the current features, the target object is classified, and a classification result corresponding to the target object is obtained.
[0087] It can be seen that, by the method of the embodiment of the application, not only can the time series data be extracted to obtain a plurality of features to be classified, but also the contribution degree of each feature to be classified can be predicted according to the feature distribution vector of each feature to be classified by using the pre-trained feature construction meta-model, so that the first N features to be classified with the highest contribution degree are selected as the current features of the target object, the classification of the target object is performed, and the classification result corresponding to the target object is obtained. The method can not only improve the calculation efficiency, but also improve the accuracy of classification.
[0088] Specifically, referring to Figure 1 , Figure 1 A flowchart of a classification method of a target object provided by the embodiment of the application is shown in FIG. 1. The method includes the following steps.
[0089] In step S11, time series data of a target object is obtained.
[0090] The time series data of the target object in the embodiment of the application can be a plurality of types of historical data of the target object. The data can be data sorted or recorded in time sequence. For example, the time series data of the target object can be historical consumption records, historical browsing records, and the like of the target object.
[0091] The method of the embodiment of the application can be applied to a smart terminal and can be implemented by the smart terminal. The smart terminal can be used to classify the target object by importing the trained feature construction meta-model, or can be used to train the model and then classify the target object by using the trained feature construction meta-model. Specifically, the smart terminal can be a computer, a mobile phone, a server, or the like.
[0092] In step S12, features are extracted from the time series data, and a plurality of features to be classified are obtained.
[0093] In the embodiment of the application, the features can be extracted from the time series data by using a plurality of types of feature extraction methods. In actual use, the type of the time series data can be analyzed, and then the time series data can be extracted by using the feature extraction method corresponding to the data type. Specifically, the feature extraction method can be LSI (Latent Semantic Indexing), PCA (Principal Component Analysis), LDA (Latent Dirichlet Allocation), or the like.
[0094] Optionally, the time series data is subjected to feature extraction to obtain a plurality of features to be classified, including: the time series data is subjected to feature extraction by a unary operator and / or a binary operator to obtain a plurality of features to be classified. When the time series data is subjected to feature extraction, the time series data can be subjected to feature extraction by a unary operator, such as ++ (self-increment), -- (self-decrement), etc., or can be subjected to feature extraction by a binary operator, such as + (addition), - (subtraction), * (multiplication), / (division), % (remainder), etc. For example, the consumption amount of the target object within a certain time period is summed by a binary operator to obtain the total consumption amount of the target object within a certain time period, and the total consumption amount is taken as a feature to be classified.
[0095] In step S13, a feature distribution vector of each feature to be classified is calculated by a preset feature construction algorithm.
[0096] The feature distribution vector of each feature to be classified is calculated by a preset feature construction algorithm, which can calculate the feature distribution vector of each feature to be classified by calculating the distribution feature of the feature to be classified. Specifically, the distribution feature of the feature to be classified can be calculated by various algorithms, such as binning method, histogram, etc. For example, the feature distribution vector of the feature to be classified can be calculated by calculating the proportion of each bin corresponding to the feature to be classified by the binning method.
[0097] In step S14, the contribution degree of each feature to be classified is predicted according to the feature distribution vector of each feature to be classified by a pre-trained feature construction meta-model.
[0098] The contribution degree of each feature to be classified is predicted according to the feature distribution vector of each feature to be classified by a pre-trained feature construction meta-model, which can input the feature distribution vector of each feature to be classified into the pre-trained feature construction meta-model and output the contribution degree of each feature to be classified by the pre-trained feature construction meta-model. The pre-trained feature construction meta-model can be a model trained by sample historical data, and the specific training process can be referred to in subsequent embodiments, which will not be described here.
[0099] Optionally, the contribution degree of each feature to be classified is predicted according to the feature distribution vector of each feature to be classified by a pre-trained feature construction meta-model, which can predict the contribution degree of each feature to be classified by collaborative filtering. Specifically, it can include: calculating the similarity between the feature distribution vector of each feature to be classified and the sample feature distribution vector corresponding to the sample historical data by a pre-trained feature construction meta-model; for the feature distribution vector of any feature to be classified, the contribution degree corresponding to the sample historical data with a similarity greater than a preset similarity threshold to the feature distribution vector of the feature to be classified is taken as the contribution degree of the feature to be classified.
[0100] Specifically, the contribution degree of the to-be-classified feature obtained by the prediction can include a plurality of numerical values, and the numerical value of the contribution degree obtained by the calculation indicates whether the to-be-classified feature contributes. For example, the contribution degree can be represented by 0 and 1, 0 indicating no contribution and 1 indicating contribution.
[0101] In step S15, the to-be-classified feature with the contribution degree greater than the preset contribution degree threshold is selected as the current feature of the target object.
[0102] In the method, the contribution degree of each to-be-classified feature obtained by the prediction is compared with the preset contribution degree threshold, and the to-be-classified feature with the contribution degree greater than the preset contribution degree threshold is selected as the current feature of the target object. The preset contribution degree threshold can be set according to actual conditions. For example, when the contribution degree is represented by 0 and 1, 0 indicating no contribution and 1 indicating contribution, the contribution degree threshold can be set to 0.5, so that when the to-be-classified feature with the contribution degree greater than the preset contribution degree threshold is selected as the current feature of the target object, all to-be-classified features with the contribution degree of 1 are selected as the current feature of the target object.
[0103] In step S16, the target object is classified according to the current feature to obtain a classification result corresponding to the target object.
[0104] In the method, the target object can be classified by a plurality of methods. Specifically, the probability of the current feature corresponding to a plurality of preset classifications can be calculated to determine the classification of the target object and obtain a classification result corresponding to the target object. For example, the similarity of the current feature corresponding to a plurality of preset classifications can be calculated to determine the classification to which the target object belongs and obtain a classification result corresponding to the target object.
[0105] It can be seen that the method of the present application can not only extract features from time series data to obtain a plurality of to-be-classified features, but also predict the contribution degree of each to-be-classified feature according to the feature distribution vector of each to-be-classified feature by using a pre-trained feature construction meta-model, select the top N to-be-classified features with the highest contribution degree as the current feature of the target object, classify the target object, and obtain a classification result corresponding to the target object. The method can not only improve the calculation efficiency, but also improve the accuracy of classification.
[0106] Optionally, referring to Figure 2 , the training process of the pre-trained feature construction meta-model includes:
[0107] In step S21, sample historical data is obtained.
[0108] In step S22, features of the sample historical data are extracted to obtain sample features.
[0109] Step S23, calculating the sample feature distribution vector corresponding to the sample feature through a preset feature construction algorithm.
[0110] Step S24, calculating the contribution degree of the sample feature through a preset contribution degree algorithm.
[0111] Step S25, merging the sample feature distribution vector corresponding to the sample feature and the contribution degree of the sample feature to obtain a feature distribution data set.
[0112] Step S26, training the feature construction meta-model to be trained through the feature distribution data set to obtain a pre-trained feature construction meta-model.
[0113] The historical sample data can be pre-stored historical data or data obtained through a third-party database. For example, historical consumption records, historical browsing records, and the like of each user are pre-recorded and stored.
[0114] Feature extraction can be performed on the sample historical data through the same or similar method as that of step S12 for feature extraction on time series data. Specifically, it can be LSI, PCA, LDA, and the like. Optionally, feature extraction can be performed on the sample historical data through a unary operator and / or a binary operator.
[0115] The sample feature distribution vector corresponding to the sample feature can be calculated through the same or similar method as that of step S13 for calculating the feature distribution vector of each feature to be classified through a preset feature construction algorithm. Specifically, it can be through a binning method, a histogram, and the like.
[0116] The contribution degree of the sample feature can be calculated through a variety of preset algorithms, such as a random forest algorithm. Specifically, the contribution degree of the sample feature can be determined by comparing the accuracy of model classification after adding the sample feature and the accuracy before adding. For example, when the difference between the accuracy of model classification after adding the sample feature and the accuracy before adding is greater than a preset threshold, it is determined that the sample feature has a contribution, and the contribution degree of the sample feature is 1; when the difference is less than or equal to the preset threshold, it is determined that the sample feature has no contribution, and the contribution degree of the sample feature is 0.
[0117] The feature distribution data set is input into the feature construction meta model to be trained for classification, a corresponding classification result is obtained, the classification result is compared with the preset sample, the accuracy of the feature construction meta model to be trained is obtained, the model parameters of the feature construction meta model to be trained are corrected, and the step of inputting the feature distribution data set into the feature construction meta model to be trained for classification is returned to continue to be executed until the accuracy of the feature construction meta model to be trained is greater than a preset value, and a trained feature construction meta model is obtained.
[0118] It can be seen that by the method of the embodiment of the application, sample historical data can be subjected to feature extraction to obtain sample features, and the contribution degree of the sample features can be calculated, so that the sample feature distribution vector corresponding to the sample features and the contribution degree of the sample features are combined to obtain a feature distribution data set, and then the feature construction meta model to be trained is trained by using the feature distribution data set to obtain a pre-trained feature construction meta model, so that the contribution degree of each feature to be classified can be predicted according to the feature distribution vector of each feature to be classified by using the pre-trained feature construction meta model.
[0119] Optionally, referring to Figure 3 , the contribution degree of the sample features is calculated by using a preset contribution degree algorithm, including:
[0120] In step S241, the sample historical data is classified by using a preset evaluation model to obtain a first classification result, and the classification accuracy is calculated according to the first classification result to obtain a first classification accuracy.
[0121] In step S242, the sample historical data is classified by using a preset evaluation model according to the sample historical data and the sample feature distribution vector corresponding to the sample historical data to obtain a second classification result, and the classification accuracy is calculated according to the second classification result to obtain a second classification accuracy.
[0122] In step S243, the first classification accuracy and the second classification accuracy are compared to obtain the contribution degree corresponding to the sample feature distribution vector, wherein when the difference between the first classification accuracy and the second classification accuracy is greater than a preset difference threshold, the corresponding contribution degree is a first value, and when the difference between the first classification accuracy and the second classification accuracy is less than or equal to the preset difference threshold, the corresponding contribution degree is a second value.
[0123] The first classification result can be obtained by classifying the sample historical data through the preset evaluation model to obtain a category to which the sample historical data belongs, and then comparing the calculated category to which the sample historical data belongs with the preset sample category, calculating the current classification accuracy, and taking the accuracy as the first classification accuracy. For example, after classifying the sample historical data to obtain the first classification result, 3 sample data are classified incorrectly in 10 sample data by comparing with the preset sample category, and the current classification accuracy is 70%, that is, the first classification accuracy is 70%. The classification of the sample historical data is performed by the preset evaluation model according to the sample historical data and the sample feature distribution vector corresponding to the sample historical data. The classification can be performed by the same method as step S241, and then the classification accuracy is calculated through the classification result to obtain the second classification accuracy.
[0124] The comparison between the first classification accuracy and the second classification accuracy can be performed by a random forest algorithm. The first classification accuracy is obtained as baseline by calculating the classification accuracy according to the first classification result, and the second classification accuracy is obtained as T by calculating the sample historical data and the sample feature distribution vector corresponding to the sample historical data. If T-baseline> threshold value, the contribution degree of the sample feature is the first value; otherwise, the contribution degree is the second value. Specifically, the first value and the second value can be 1 and 0 respectively.
[0125] It can be seen that by the method of the embodiment of the application, the first classification accuracy and the second classification accuracy can be calculated and compared, the contribution degree corresponding to the sample feature distribution vector is obtained, and the sample feature distribution vector corresponding to the sample feature and the contribution degree of the sample feature are combined to obtain the feature distribution data set, so that the training of the to-be-trained feature construction meta-model is realized.
[0126] Optionally, referring to Figure 4 , step S13 calculates the feature distribution vector of each to-be-classified feature by a preset feature construction algorithm, including:
[0127] Step S131 calculates the proportion of each to-be-classified feature corresponding to a plurality of preset classification categories;
[0128] Step S132 creates the feature distribution vector of the to-be-classified feature by calculating the proportion of each to-be-classified feature corresponding to a plurality of preset classification categories.
[0129] The proportion of each to-be-classified feature corresponding to a plurality of preset classification categories can be calculated by using a binning method, so as to create a feature distribution vector of the to-be-classified feature by calculating the proportion of each to-be-classified feature corresponding to a plurality of preset classification categories. For example, for a to-be-classified feature A, the proportions corresponding to three preset classification categories are 0.2, 0.3, and 0.5 respectively, and the created feature distribution vector of the to-be-classified feature is (0.2, 0.3, 0.5).
[0130] It can be seen that by the method of the embodiment of the application, the proportion of each to-be-classified feature corresponding to a plurality of preset classification categories can be calculated to create a feature distribution vector of the to-be-classified feature, so as to realize the prediction of the contribution degree of each to-be-classified feature according to the feature distribution vector of each to-be-classified feature by using the pre-trained feature construction meta-model.
[0131] Referring to Figure 5 , Figure 5 A structure schematic diagram of a classification device of a target object provided by the embodiment of the application includes:
[0132] The feature extraction module 501 uses a unary operator and a binary operator to extract features from the data set.
[0133] The index evaluation module 502 uses a machine learning algorithm to evaluate the classification index of the data set.
[0134] The feature distribution calculation module 503 classifies the feature values according to the label categories, then uses a binning method to bin the features under each category and calculates the proportion of each bin, and uses the proportion of each bin as the feature distribution vector.
[0135] The meta-model training module 504 uses the feature distribution vector and the feature contribution as the features and labels respectively to train a classification model.
[0136] The feature recommendation module 505 uses the trained meta-model to predict the feature distribution vector of the new data set to obtain the contribution label of each feature distribution vector.
[0137] Referring to Figure 6 , Figure 6 Another flowchart of a classification method of a target object provided by the embodiment of the application includes:
[0138] A, training process:
[0139] 1. Each feature in the data set is subjected to feature extraction operation by using a unary operation operator and a binary operation operator, and the features extracted in the previous step are stored in a feature set;
[0140] 2. For each feature in the feature set in the previous step, classify according to the label, and then use the binning method to obtain the proportion falling in each bin to create a feature distribution vector;
[0141] 3. Cross-train the original data set using the model to obtain the baseline;
[0142] 4. Add the features in the feature set obtained in step 2 to the original data set respectively for model evaluation to obtain classification indicators;
[0143] 5. Determine the contribution of each feature in the feature set obtained in step 2: if the classification indicator of the model after adding the feature is greater than the baseline, it is considered that the contribution is 1; otherwise, it is 0;
[0144] 6. Combine the feature distribution vector obtained in step 3 and the contribution obtained in step 6 to obtain a feature distribution data set;
[0145] 7. Train the meta-model using the feature distribution data set;
[0146] B. Prediction process:
[0147] 1. For each feature in the new data set, perform feature extraction operation using unary operation operator and binary operation operator respectively;
[0148] 2. Store the features extracted in the previous step to the feature set;
[0149] 3. For each feature in the feature set in the previous step, classify according to the label, and then use the binning method to obtain the proportion falling in each bin to create a feature distribution vector;
[0150] 4. Use the trained meta-model to predict the feature vector obtained in the previous step to obtain the contribution of each feature;
[0151] 5. Recommend the features with high contribution to the new data set.
[0152] The second aspect of the embodiment of the application provides a classification device of a target object, referring to Figure 7 The device comprises:
[0153] The data acquisition module 701 is configured to acquire time series data of the target object;
[0154] The feature extraction module 702 is configured to perform feature extraction on the time series data to obtain a plurality of features to be classified;
[0155] The distribution vector calculation module 703 is configured to calculate the feature distribution vector of each feature to be classified through a preset feature construction algorithm;
[0156] The contribution degree prediction module 704 is configured to predict the contribution degree of each feature to be classified according to the feature distribution vector of each feature to be classified by using the pre-trained feature construction meta-model.
[0157] The feature selection module 705 is configured to select the feature to be classified with the contribution degree greater than the preset contribution degree threshold as the current feature of the target object.
[0158] The result acquisition module 706 is configured to classify the target object according to the current feature, and obtain a classification result corresponding to the target object.
[0159] Optionally, the contribution degree prediction module 704 comprises:
[0160] The similarity calculation sub-module is configured to calculate the similarity between the feature distribution vector of each feature to be classified and the sample feature distribution vector corresponding to the sample historical data by using the pre-trained feature construction meta-model.
[0161] The contribution degree calculation sub-module is configured to, for the feature distribution vector of any feature to be classified, take the contribution degree of the sample historical data corresponding to the feature distribution vector of the feature to be classified as the contribution degree of the feature to be classified, where the similarity between the feature distribution vector of the feature to be classified and the feature distribution vector of the sample historical data is greater than a preset similarity threshold.
[0162] Optionally, the distribution vector calculation module 703 comprises:
[0163] The proportion calculation sub-module is configured to calculate the proportion of each feature to be classified corresponding to the plurality of preset classification categories.
[0164] The distribution vector creation sub-module is configured to create the feature distribution vector of each feature to be classified by calculating the proportion of each feature to be classified corresponding to the plurality of preset classification categories.
[0165] Optionally, the apparatus further comprises:
[0166] The sample acquisition module is configured to acquire sample historical data.
[0167] The sample feature extraction module is configured to perform feature extraction on the sample historical data to obtain sample features.
[0168] The sample distribution calculation module is configured to calculate a sample feature distribution vector corresponding to the sample features by using a preset feature construction algorithm.
[0169] The sample contribution degree calculation module is configured to calculate the contribution degree of the sample features by using a preset contribution degree algorithm.
[0170] The contribution degree merging module is configured to merge the sample feature distribution vector corresponding to the sample features and the contribution degree of the sample features to obtain a feature distribution data set.
[0171] The model training module is configured to train the feature construction meta-model to be trained by using the feature distribution dataset, and obtain a pre-trained feature construction meta-model.
[0172] Optionally, the sample contribution degree calculation module comprises:
[0173] The first accuracy calculation submodule is configured to classify the sample historical data by using the preset evaluation model, obtain a first classification result, and calculate the classification accuracy according to the first classification result, and obtain a first classification accuracy.
[0174] The second accuracy calculation submodule is configured to classify the sample historical data by using the preset evaluation model according to the sample historical data and the sample feature distribution vector corresponding to the sample historical data, obtain a second classification result, and calculate the classification accuracy according to the second classification result, and obtain a second classification accuracy.
[0175] The accuracy comparison submodule is configured to compare the first classification accuracy with the second classification accuracy, and obtain the contribution degree corresponding to the sample feature distribution vector, wherein when the difference between the first classification accuracy and the second classification accuracy is greater than a preset difference threshold, the corresponding contribution degree is a first value, and when the difference between the first classification accuracy and the second classification accuracy is less than or equal to the preset difference threshold, the corresponding contribution degree is a second value.
[0176] Optionally, the feature extraction module is specifically configured to extract features from the time series data by using a unary operator and / or a binary operator, and obtain a plurality of features to be classified.
[0177] It can be seen that by using the method of the embodiment of the application, the features of the time series data can be extracted to obtain a plurality of features to be classified, the contribution degree of each feature to be classified can be predicted according to the feature distribution vector of each feature to be classified by using the pre-trained feature construction meta-model, the first N features to be classified with the highest contribution degree can be selected as the current features of the target object, the classification of the target object can be performed, and the classification result corresponding to the target object can be obtained, thereby improving the calculation efficiency and the classification accuracy.
[0178] The embodiment of the application further provides an electronic device, as shown in the figure. Figure 8 The processor 801, the communication interface 802 and the memory 803 can communicate with each other through the communication bus 804.
[0179] The memory 803 is configured to store a computer program.
[0180] The processor 801 is configured to execute the program stored in the memory 803, and implement the following steps:
[0181] Acquire time series data of a target object;
[0182] Feature extraction is performed on the time series data to obtain a plurality of features to be classified;
[0183] A feature distribution vector of each feature to be classified is calculated by a preset feature construction algorithm;
[0184] The contribution degree of each feature to be classified is predicted according to the feature distribution vector of each feature to be classified by a pre-trained feature construction meta-model;
[0185] Select a feature to be classified with a contribution degree greater than a preset contribution degree threshold as a current feature of the target object;
[0186] Classify the target object according to the current feature to obtain a classification result corresponding to the target object.
[0187] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.
[0188] The communication interface is used for communication between the above-mentioned electronic device and other devices.
[0189] The memory can include a Random Access Memory (RAM) and can also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.
[0190] The processor mentioned above can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0191] In yet another embodiment provided by the present application, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the steps of the classification method of any of the above target objects.
[0192] In yet another embodiment provided by the present application, a computer program product containing instructions which, when executed on a computer, cause the computer to perform the classification method of any of the above target objects.
[0193] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be magnetic media (for example, floppy disk, hard disk, magnetic tape), optical media (for example, DVD), or semiconductor media (for example, solid state disk (SSD)) and the like.
[0194] It should be noted that, in this document, the terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the processes, methods, articles or devices including a series of elements not only include those elements, but also include other elements not explicitly listed or inherent to such processes, methods, articles or devices. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0195] Each of the embodiments in the specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. In particular, for the device, electronic device, storage medium, and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiment.
[0196] The above only describes the preferred embodiments of the present application, and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method of classifying a target object, characterized by, The method comprises: obtaining time series data of a target object, the time series data being historical consumption records and / or historical browsing records of the target object; extracting features from the time series data to obtain a plurality of features to be classified; calculating proportions of the plurality of preset classification categories corresponding to each feature to be classified; the proportions of the plurality of preset classification categories corresponding to each feature to be classified are obtained by calculation, and a feature distribution vector of the feature to be classified is created; predicting contribution degrees of the features to be classified according to the feature distribution vectors of the features to be classified by using a pre-trained feature construction meta-model; selecting a feature to be classified with a contribution degree greater than a preset contribution degree threshold as a current feature of the target object; classifying the target object according to the current feature to obtain a classification result corresponding to the target object, the classification result indicating whether the target object is a potential customer.
2. The method of claim 1, wherein, The method of predicting the contribution degrees of the features to be classified according to the feature distribution vectors of the features to be classified by using the pre-trained feature construction meta-model comprises: calculating similarities between the feature distribution vectors of the features to be classified and sample feature distribution vectors corresponding to sample historical data by using the pre-trained feature construction meta-model; for the feature distribution vector of any feature to be classified, a contribution degree corresponding to sample historical data with a similarity greater than a preset similarity threshold to the feature distribution vector of the feature to be classified is taken as the contribution degree of the feature to be classified.
3. The method of claim 1, wherein, The training process of the pre-trained feature construction meta-model comprises: obtaining sample historical data; extracting sample features from the sample historical data; calculating sample feature distribution vectors corresponding to the sample features by using a preset feature construction algorithm; calculating contribution degrees of the sample features by using a preset contribution degree algorithm; merging the sample feature distribution vectors corresponding to the sample features and the contribution degrees of the sample features to obtain a feature distribution data set; training a feature construction meta-model to be trained by using the feature distribution data set to obtain the pre-trained feature construction meta-model.
4. The method of claim 3, wherein, The method of calculating the contribution degrees of the sample features by using the preset contribution degree algorithm comprises: classifying the sample historical data by using a preset evaluation model to obtain a first classification result; calculating a classification accuracy according to the first classification result to obtain a first classification accuracy; classifying the sample historical data according to the sample historical data and the sample feature distribution vectors corresponding to the sample historical data by using the preset evaluation model to obtain a second classification result; calculating a classification accuracy according to the second classification result to obtain a second classification accuracy; comparing the first classification accuracy with the second classification accuracy to obtain a contribution degree corresponding to the sample feature distribution vector, wherein when a difference between the first classification accuracy and the second classification accuracy is greater than a preset difference threshold, the contribution degree corresponding to the sample feature distribution vector is a first value, and when the difference between the first classification accuracy and the second classification accuracy is less than or equal to the preset difference threshold, the contribution degree corresponding to the sample feature distribution vector is a second value.
5. The method of claim 1, wherein, The feature extraction on the time series data obtains a plurality of features to be classified, comprising: The feature extraction on the time series data obtains a plurality of features to be classified through a unary operator and / or a binary operator.
6. An apparatus for classifying a target object, characterized by comprising: The device comprises: A data acquisition module is configured to acquire time series data of a target object, wherein the time series data is historical consumption records and / or historical browsing records of the target object; A feature extraction module is configured to perform feature extraction on the time series data to obtain a plurality of features to be classified; A distribution vector calculation module is configured to calculate a feature distribution vector of each feature to be classified through a preset feature construction algorithm; A contribution degree prediction module is configured to predict the contribution degree of each feature to be classified according to the feature distribution vector of each feature to be classified through a pre-trained feature construction meta-model; A feature selection module is configured to select a feature to be classified with a contribution degree greater than a preset contribution degree threshold as a current feature of the target object; A result acquisition module is configured to classify the target object according to the current feature to obtain a classification result corresponding to the target object, wherein the classification result indicates whether the target object is a potential customer; The distribution vector calculation module comprises: A proportion calculation submodule is configured to calculate the proportion of a plurality of preset classification categories corresponding to each feature to be classified; A distribution vector creation submodule is configured to create a feature distribution vector of each feature to be classified by calculating the proportion of a plurality of preset classification categories corresponding to each feature to be classified.
7. The apparatus of claim 6, wherein, The contribution degree prediction module comprises: A similarity calculation submodule is configured to calculate the similarity between the feature distribution vector of each feature to be classified and a sample feature distribution vector corresponding to sample historical data through the pre-trained feature construction meta-model; A contribution degree calculation submodule is configured to, for the feature distribution vector of any feature to be classified, take the contribution degree of sample historical data corresponding to the feature distribution vector of the feature to be classified as the contribution degree of the feature to be classified, wherein the similarity between the feature distribution vector of the feature to be classified and the sample feature distribution vector is greater than a preset similarity threshold.
8. The apparatus of claim 6, wherein, The device further comprises: A sample acquisition module is configured to acquire sample historical data; A sample feature extraction module is configured to perform feature extraction on the sample historical data to obtain sample features; A sample distribution calculation module is configured to calculate a sample feature distribution vector corresponding to the sample features through a preset feature construction algorithm; A sample contribution degree calculation module is configured to calculate the contribution degree of the sample features through a preset contribution degree algorithm; A contribution degree merging module is configured to merge the sample feature distribution vector corresponding to the sample features and the contribution degree of the sample features to obtain a feature distribution dataset; A model training module is configured to train a feature construction meta-model to be trained through the feature distribution dataset to obtain the pre-trained feature construction meta-model.
9. The apparatus of claim 8, wherein, The sample contribution degree calculation module comprises: A first accuracy calculation submodule is configured to classify the sample historical data through a preset evaluation model to obtain a first classification result; and calculate the classification accuracy according to the first classification result to obtain a first classification accuracy; The second accuracy rate calculation submodule is configured to perform classification on the sample historical data according to the sample historical data and the sample feature distribution vector corresponding to the sample historical data by using the preset evaluation model, to obtain a second classification result; and to calculate the classification accuracy according to the second classification result, to obtain a second classification accuracy rate. The accuracy rate comparison submodule is configured to compare the first classification accuracy rate with the second classification accuracy rate, to obtain the contribution degree corresponding to the sample feature distribution vector, wherein the contribution degree is a first value when the difference between the first classification accuracy rate and the second classification accuracy rate is greater than a preset difference threshold, and the contribution degree is a second value when the difference between the first classification accuracy rate and the second classification accuracy rate is less than or equal to the preset difference threshold.
10. An electronic device, comprising: The device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are in communication with each other through the communication bus. The memory is configured to store a computer program. The processor is configured to execute the program stored on the memory, to implement the method steps of any one of claims 1-5.
11. A computer readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method steps of any one of claims 1-5.
Citation Information
Patent Citations
Sample generation method, classification model training method, recognition method and corresponding devices
CN111476296A
Data set contribution degree evaluation method, device, equipment and readable storage medium
CN111652381A
Training model and small sample classification method and device
CN112598091A