Data processing method and device
By performing feature transformation and neural network encoding and decoding on historical feature data, highly interpretable deep learning features are generated, which solves the problems of low efficiency and poor interpretability in existing technologies and improves the performance of the model.
Patent Information
- Application Number
- CN202411147244.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2026-03-03
AI Technical Summary
Existing automated feature engineering techniques are inefficient and poorly interpretable when processing high-dimensional feature data, making it difficult to generate features with rich information.
By obtaining the original feature dataset from the historical feature dataset, performing feature transformation and splitting, using a neural network model for encoding and decoding, generating derived features, and optimizing the model through feature importance and prediction loss, a candidate feature set with deep learning feature vector information is generated.
The generated features are highly interpretable and rich in information, which improves the model's performance, avoids the problem of feature combination dimensionality explosion, and improves processing efficiency.
Smart Images

Figure CN121598070A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method and apparatus for data processing. Background Technology
[0002] Automated feature engineering involves automatically constructing candidate features from data and selecting better features from these candidates to train the model, thereby improving its performance. Related technologies applied to automated feature engineering mainly include traditional feature extraction methods, machine learning-based feature selection algorithms, automated feature generation methods, and deep learning feature factory methods. However, these methods suffer from limitations such as inability to handle high-dimensional feature data, low efficiency, and poor interpretability. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a data processing method and apparatus that perform feature transformation and derivation based on an automated feature engineering method of deep learning, so that the obtained features have rich information in the deep learning feature vector, while having high interpretability and improving model performance.
[0004] To achieve the above objectives, according to one aspect of the present invention, a method for training a data classification model is provided, comprising:
[0005] Multiple raw feature datasets are obtained from a historical feature dataset, each raw feature dataset including multiple raw features. Feature transformation is performed on the multiple raw features to obtain a first feature dataset. The first feature dataset is split into multiple first subsets, each first subset including multiple target raw features.
[0006] For each first subset, a preset number of first target original features are obtained from multiple target original features of the first subset. The first target original features are encoded and decoded to generate first derived features corresponding to the first target original features. A candidate feature set for the first subset is determined based on the first derived features.
[0007] The set of candidate feature sets of each of the multiple first subsets is taken as the original candidate feature set corresponding to the original feature dataset, and the set of original candidate feature sets corresponding to each of the multiple original feature datasets is taken as the historical candidate feature set corresponding to the historical feature dataset.
[0008] A data classification model is trained based on the historical candidate feature set.
[0009] Optionally, feature transformation is performed on the plurality of original features to obtain a first feature dataset, including:
[0010] For each original feature, a univariate transformation is performed on the original feature to obtain the corresponding first features;
[0011] Perform a binary transformation on all first features corresponding to all original features to obtain each second feature, and use the set of each second feature as the first feature dataset.
[0012] Optionally, the original features of the first target are encoded and decoded, including:
[0013] The original features of the first target are encoded and decoded using a neural network model;
[0014] The neural network model was trained using the following method:
[0015] For each original feature of the first target, the original feature of the first target is encoded to generate a corresponding feature vector; the predicted label corresponding to the feature vector is determined, and the prediction loss is calculated based on the true label of the feature vector and the predicted label;
[0016] The feature vector is decoded to obtain the derived features corresponding to the feature vector; the reconstruction loss is calculated based on the derived features and the original features of the first target.
[0017] The neural network model is trained based on the prediction loss and the reconstruction loss.
[0018] Optionally, determining the candidate feature set of the first subset based on the first derived feature includes:
[0019] Obtain the preset number of second target original features from multiple target original features of the first subset;
[0020] The original features of each second target and the derived features of each first target constitute the first candidate feature set of the first subset.
[0021] Calculate the feature weight of each first candidate feature in the first candidate feature set, and sort the first candidate features in descending order of feature weight;
[0022] The first candidate features are cumulatively input into the classification model according to the ranking results, and the first candidate features that constitute the candidate feature set of the first subset are selected according to the classification results.
[0023] Optionally, a predetermined number of first target original features are obtained from multiple target original features of the first subset, including:
[0024] Calculate the feature importance value for each original feature of the target in the first subset;
[0025] Based on the feature importance values in descending order, a preset number of first target original features are selected from multiple target original features.
[0026] According to another aspect of the present invention, a data processing method is provided, comprising:
[0027] Obtain input data, which includes multiple raw features to be processed;
[0028] The feature transformation rules for each original feature are determined from the historical candidate feature set;
[0029] According to the feature transformation rules, the multiple original features to be processed are transformed to obtain the target feature set corresponding to the input data;
[0030] The target feature set is input into the data classification model to obtain the target classification result corresponding to the input data.
[0031] The data classification model is obtained using the training method of the data classification model according to an embodiment of the present invention.
[0032] According to another aspect of the present invention, a training apparatus for a data classification model is provided, comprising:
[0033] The first transformation module obtains multiple original feature datasets from the historical feature dataset, each of which includes multiple original features; performs feature transformation on the multiple original features to obtain a first feature dataset; and splits the first feature dataset into multiple first subsets; each first subset includes multiple target original features.
[0034] The derivation module, for each first subset, obtains a preset number of first target original features from multiple target original features of the first subset, performs encoding and decoding processing on the first target original features sequentially, generates first derived features corresponding to the first target original features, and determines the candidate feature set of the first subset based on the first derived features;
[0035] The first determining module takes the set of candidate feature sets of each of the plurality of first subsets as the original candidate feature set corresponding to the original feature dataset, and takes the set of original candidate feature sets corresponding to each of the plurality of original feature datasets as the historical candidate feature set corresponding to the historical feature dataset.
[0036] The training module trains a data classification model based on the historical candidate feature set.
[0037] According to another aspect of the present invention, a data processing apparatus is provided, comprising:
[0038] The acquisition module acquires input data, which includes multiple raw features to be processed.
[0039] The second determining module determines the feature transformation rules for each original feature from the historical candidate feature set;
[0040] The second transformation module performs feature transformation on the plurality of original features to be processed according to the feature transformation rules to obtain the target feature set corresponding to the input data;
[0041] The prediction module inputs the target feature set into the data classification model to obtain the target classification result corresponding to the input data.
[0042] The data classification model is obtained using the training method of the data classification model according to an embodiment of the present invention.
[0043] According to another aspect of the present invention, an electronic device is provided, comprising:
[0044] One or more processors;
[0045] Storage device for storing one or more programs.
[0046] When the one or more programs are executed by the one or more processors, the one or more processors implement the training method or data processing method of the data classification model provided by the present invention.
[0047] According to another aspect of the present invention, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements a training method or a data processing method for a data classification model provided by the present invention.
[0048] One embodiment of the above invention has the following advantages or beneficial effects: By obtaining an original feature dataset from a historical feature dataset, performing feature transformation on multiple original features in the original feature dataset to obtain a first feature dataset, and splitting the first feature dataset into multiple first subsets; performing feature derivation processing on the first target original features in each first subset to generate first derived features; obtaining candidate feature sets for the first subsets based on the first derived features; using the set of candidate feature sets of each first subset as the original candidate feature set of the original feature dataset; obtaining historical candidate feature sets for the historical feature dataset based on each original candidate feature set; and using the historical candidate feature sets for model training to obtain a data classification model. This data processing method uses automated feature engineering to create features, introduces a multi-task learning method from deep learning, and adopts an encoder-decoder framework. By jointly modeling prediction loss and reconstruction loss to optimize the feature representation of the encoding module, the derived features retain the information of the original features to the greatest extent. The obtained features simultaneously possess rich information from deep learning feature vectors, have high interpretability, and are highly efficient, thus improving the model's performance.
[0049] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description
[0050] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein:
[0051] Figure 1 This is a schematic diagram of the main flow of a training method for a data classification model according to an embodiment of the present invention;
[0052] Figure 2 This is a schematic diagram of the main flow of a training method for another data classification model according to an embodiment of the present invention;
[0053] Figure 3 This is a schematic diagram of a process for determining a candidate feature set of a first subset according to an embodiment of the present invention;
[0054] Figure 4 This is a schematic diagram of the main flow of a data processing method according to an embodiment of the present invention;
[0055] Figure 5 This is a schematic diagram of the main modules of a training device for a data classification model according to an embodiment of the present invention;
[0056] Figure 6 This is a schematic diagram of the main modules of a data processing apparatus according to an embodiment of the present invention;
[0057] Figure 7This is an exemplary system architecture diagram in which embodiments of the present invention can be applied;
[0058] Figure 8 This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers of the present invention. Detailed Implementation
[0059] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0060] Automated feature engineering is a method that automatically creates candidate features from a dataset and selects several better features for model training. Existing automated feature engineering techniques mainly include: feature selection algorithms, feature extraction methods, automated feature generation algorithms, and deep learning-based feature engineering. Feature selection algorithms select more relevant features by evaluating their importance in model training. Common feature selection algorithms include statistical methods (such as variance thresholding and chi-square tests) and machine learning methods (such as decision trees and random forests). However, these algorithms are inefficient and require significant time and manpower to fine-tune parameters for feature extraction, selection, and transformation. Feature extraction algorithms transform raw data into more representative feature labels. Common feature extraction algorithms include principal component analysis and linear discriminant analysis. However, these algorithms typically assume linear relationships between features and cannot effectively handle nonlinear relationships, limiting their effectiveness when dealing with high-dimensional data or features. Automated feature generation methods generate new features by combining, transforming, and deriving from original features. For example, multinomial-based feature generation methods use combinations of original features as new feature inputs to the model. However, generating a large number of new features can lead to dimensionality explosion, increasing computational and storage costs and potentially making the model more complex and difficult to interpret. Automated feature engineering methods based on deep learning can effectively represent data by learning high-level abstract features. Using deep learning architectures such as convolutional neural networks and recurrent neural networks, more complex feature representations can be automatically extracted and learned. However, the generated features are difficult to interpret the model's decision-making process and prediction results. To address these issues, this invention provides a method and apparatus for data processing based on automated feature engineering, capable of generating features with rich information and high interpretability, thereby improving model performance.
[0061] Figure 1This is a schematic diagram illustrating the main flow of a data classification model training method according to an embodiment of the present invention, as shown below. Figure 1 As shown, the training method for this data classification model includes the following steps:
[0062] Step S101: Obtain multiple original feature datasets from the historical feature dataset. Each original feature dataset includes multiple original features. Perform feature transformation on the multiple original features to obtain the first feature dataset. Split the first feature dataset into multiple first subsets. Each first subset includes multiple target original features.
[0063] Step S102: For each first subset, obtain a preset number of first target original features from multiple target original features of the first subset, encode and decode the first target original features to generate first derived features corresponding to the first target original features; determine the candidate feature set of the first subset based on the first derived features;
[0064] Step S103: Take the set of candidate feature sets of each first subset in the multiple first subsets as the original candidate feature set corresponding to the original feature dataset, and take the set of original candidate feature sets corresponding to each original feature dataset in the multiple original feature datasets as the historical candidate feature set corresponding to the historical feature dataset.
[0065] Step S104: Train a data classification model based on the historical candidate feature set.
[0066] In this embodiment of the invention, the training method of the data classification model is based on automated feature engineering, which obtains a historical candidate feature set from the historical feature dataset. First, multiple original feature datasets are obtained from the historical feature dataset. Each original feature dataset can be obtained by random sampling from the historical feature dataset. Random sampling reduces the feature dimensionality and avoids the problem of feature combination dimensionality explosion. That is, the multiple original features in each original feature dataset are obtained by randomly sampling all features in the historical feature dataset.
[0067] For each original feature dataset, feature transformation is performed on multiple original features to obtain the first feature dataset, including:
[0068] For each original feature, perform a univariate transformation on the original feature to obtain the corresponding first features;
[0069] Perform a binary transformation on all first features corresponding to all original features to obtain each second feature, and use the set of each second feature as the first feature dataset.
[0070] In this embodiment of the invention, each original feature in the original feature dataset can undergo one or more transformations to generate new features based on the original features, thus obtaining a first feature dataset. Specifically, a univariate transformation rule can be used to perform a univariate transformation on the original features to obtain each first feature. The univariate transformation rule can include one or more of the following, such as normalization, reciprocal, logarithm, absolute value, square root, maximum value, minimum value, etc. For example, the corresponding first feature can be obtained by taking the reciprocal of the original feature. Then, a binary transformation rule can be used to perform a binary transformation on all the first features. The binary transformation rule can include one or more of the following, such as addition, subtraction, multiplication, division, modulo, etc. The binary transformation can obtain each second feature, that is, the second feature obtained by the binary transformation is obtained by adding, subtracting, multiplying, dividing, or taking the modulo of two first features. After obtaining each second feature, the set of each second feature is used as the first feature dataset. Alternatively, the set of multiple original features, each first feature, and each second feature can be used as the first feature dataset.
[0071] After obtaining the first feature dataset, it is split into multiple first subsets. Each first subset includes multiple target original features, which are some of the second features from all the second features in the first feature dataset. The method of splitting the first feature dataset is not specifically limited; the number of first subsets can be customized; and the number of target original features in each first subset can be approximately equal or customized.
[0072] In this embodiment of the invention, obtaining a preset number of first target original features from a plurality of target original features in a first subset includes:
[0073] Calculate the feature importance value for each original feature of the target in the first subset;
[0074] Based on the feature importance values in descending order, a preset number of first target original features are selected from multiple target original features.
[0075] In this embodiment of the invention, for each first subset, multiple target original features of the first subset can be sorted. Based on the sorting result, a predetermined number of first target original features are obtained from the multiple target original features of the first subset. Specifically, the feature importance score of each target original feature can be calculated using the XGBoost (eXtreme Gradient Boosting) model. Then, the target original features in the first subset are sorted in descending order of feature importance score, and a predetermined number of first target original features with the highest sorting score are selected from the sorting result. The feature importance score can be obtained based on one or more calculation methods among feature usage frequency, performance gain, and coverage.
[0076] In this embodiment of the invention, after obtaining the first target original features of each first subset, the first target original features are encoded and decoded, including:
[0077] The original features of the first target are encoded and decoded using a neural network model.
[0078] Among them, such as Figure 2 As shown, the neural network model is trained using the following method:
[0079] Step S201: For each original feature of the first target, encode the original feature of the first target to generate the corresponding feature vector; determine the prediction label corresponding to the feature vector, and calculate the prediction loss based on the true label and the prediction label of the feature vector;
[0080] Step S201: Decode the feature vector to obtain the derived features corresponding to the feature vector; calculate the reconstruction loss based on the derived features and the original features of the first target;
[0081] Step S203: Train the neural network model based on the prediction loss and reconstruction loss.
[0082] In this embodiment of the invention, the neural network model may include an encoding module, a decoding module, and a fully connected neural network module. For each first target original feature, the encoding module can be used to encode the first target original feature, that is, to vectorize the first target original feature to obtain the first target feature vector corresponding to the first target original feature. Then, the decoding module can be used to decode the first target feature vector to obtain the first derived feature corresponding to the first target original feature.
[0083] In training the neural network model, i.e., the deep learning network model, the encoding module encodes the original features of the first target to generate feature vectors. Then, the decoding module decodes the feature vectors to obtain the derived features corresponding to the feature vectors, i.e., the derived features corresponding to the original features of the first target. The reconstruction loss is calculated using the original features and the derived features. The fully connected neural network module predicts the labels of the feature vectors to obtain the predicted labels. The prediction loss is calculated based on the true label and the predicted label of each feature vector. The prediction loss and the reconstruction loss are weighted and summed to obtain the total loss. By iteratively training the total loss, the encoding module, the decoding module, and the fully connected neural network module are optimized to obtain the parameters of the neural network model. The neural network model is then trained, and the first derived feature corresponding to each original feature of the first target can be obtained using the trained neural network model.
[0084] In this embodiment of the invention, after determining the first derived features corresponding to each original feature of the first target in the first subset, the feature importance score of each first derived feature can be calculated using the XGBoost model. The first derived features are sorted in descending order of feature importance score. Then, the first derived features are accumulated and input into the classification model according to the sorting result. The candidate feature set of the first subset is obtained according to the classification result. The first first derived feature is input into the classification model according to the sorting result to obtain the classification result. Then, the second first derived feature is accumulated in sequence. If the classification result indicates that the classification effect is improved, the subsequent first derived features are accumulated until the effect no longer improves. The accumulated set of each first derived feature is the candidate feature set of the first subset.
[0085] In this embodiment of the invention, determining the candidate feature set of the first subset based on the first derived feature includes:
[0086] Obtain a predetermined number of second target original features from multiple target original features in the first subset;
[0087] The original features of each second target and the derived features of each first target constitute the first candidate feature set of the first subset.
[0088] Calculate the feature weight of each first candidate feature in the first candidate feature set, and sort the first candidate features in descending order of feature weight;
[0089] The first candidate features are cumulatively input into the classification model according to the ranking results, and the first candidate features that constitute the candidate feature set of the first subset are selected according to the classification results.
[0090] In this embodiment of the invention, to enrich the feature information, a preset number of second target original features are randomly obtained from multiple target original features of the first subset. For example, if there are k first target original features, where k is an integer greater than or equal to 1, then k second target original features are randomly selected from the multiple target original features to form a first candidate feature set containing 2k first candidate features. The first candidate features are either first target original features or second target original features. Then, the XGBoost model is used to calculate the feature importance score of the feature weight set for each first candidate feature. Then, the feature weights are sorted in descending order. According to the sorting result, the first candidate features are sequentially accumulated and input into the classification model such as the XGBoost model. For example, inputting the first candidate features yields a classification result. Then, the input of second candidate features is accumulated, and it is determined whether the classification effect is improved after adding the second candidate features. If so, the input of third candidate features continues until the effect no longer improves, thereby filtering out each first candidate feature that constitutes the candidate feature set of the first subset. The candidate feature set of each first subset can be obtained according to the above method.
[0091] The set of candidate feature sets of each first subset is taken as the original candidate feature set corresponding to the original feature dataset. Then, the set of original candidate feature sets corresponding to each original feature dataset is taken as the historical candidate feature set of the historical feature dataset. The original features in the historical feature dataset can be transformed into historical candidate features through feature transformation rules. The feature transformation rules indicate the process of feature transformation and derivation from original features to historical candidate features, thus achieving interpretability.
[0092] After obtaining the historical candidate feature set corresponding to the historical feature dataset, the model can be trained based on the historical candidate feature set, such as training the XGBoost model to obtain a data classification model. The historical candidate feature set obtained through automated feature engineering improves the model's performance.
[0093] Figure 3This is a flowchart illustrating a training method for a data classification model according to an embodiment of the present invention. The first subset contains m target original features (e.g., A1, ..., Ak, ..., Am), where m is a positive integer. The feature importance score of each target original feature is calculated. Based on the feature importance scores from highest to lowest, the top k target original features are obtained. An encoding module (Encoder) is used to represent each of the k target original features as a vector, obtaining a feature vector. Then, a fully connected network module (MLP) is used to predict the predicted label of the feature vector, and the prediction loss is calculated. A decoding module (Decoder) is used to decode each feature vector to obtain derived features. The reconstruction loss is calculated using the derived features and the target original features. The training is performed by jointly applying the reconstruction loss and the prediction loss. The process involves training to obtain a deep learning neural network model, and then using this model to obtain the first derived features corresponding to k target original features. From the m target original features, k additional target original features (excluding the k target original features) are randomly selected and combined with the first derived features to form 2k first candidate features. These 2k first candidate features are sorted according to their feature importance scores, and the accumulated first candidate features are input into the classification model to obtain the classification result. For each accumulated first candidate feature, the model's performance is assessed based on the classification result. If the performance improves, the model continues to accumulate and input the next first candidate feature; otherwise, accumulation stops. The accumulated first candidate features form the candidate feature set of the first subset.
[0094] According to another aspect of the embodiments of the present invention, such as Figure 4 As shown, a data processing method is provided, including:
[0095] Step S401: Obtain input data, which includes multiple raw features to be processed;
[0096] Step S402: Determine the feature transformation rules for each original feature from the historical candidate feature set;
[0097] Step S403: Perform feature transformation on multiple original features to be processed according to the feature transformation rules to obtain the target feature set corresponding to the input data;
[0098] Step S404: Input the target feature set into the data classification model to obtain the target classification result corresponding to the input data.
[0099] The data classification model is obtained using the training method of the data classification model according to an embodiment of the present invention.
[0100] In this embodiment of the invention, a trained data classification model can be used for data processing. First, input data is obtained, which includes multiple original features to be processed. Based on the historical candidate feature set, the feature transformation rules for each original feature can be obtained. Each original feature to be processed is transformed and derived according to the corresponding feature transformation rules to obtain a target feature set composed of various target features. The target feature set is then input into the data classification model to obtain the target classification result.
[0101] The data processing method of this invention involves obtaining an original feature dataset from a historical feature dataset, performing feature transformation on multiple original features in the original feature dataset to obtain a first feature dataset, and splitting the first feature dataset into multiple first subsets; performing feature derivation processing on the first target original features in each first subset to generate first derived features, obtaining candidate feature sets for the first subsets based on the first derived features, using the set of candidate feature sets of each first subset as the original candidate feature set of the original feature dataset, obtaining historical candidate feature sets of the historical feature dataset based on each original candidate feature set, using the historical candidate feature sets for model training to obtain a data classification model; then, when using the data classification model to predict input data, obtaining feature transformation rules for the original features from the historical candidate feature set, performing feature transformation on the input data according to the feature transformation rules to obtain a target feature set, and inputting the target feature set into the data classification model to obtain the data classification result. This data processing method employs automated feature engineering to create features, introduces a multi-task learning approach from deep learning, and uses an encoder-decoder framework. By jointly modeling prediction loss and reconstruction loss, the feature representation of the encoding module is optimized, ensuring that the derived features retain the information of the original features to the greatest extent. The resulting features not only possess rich information from deep learning feature vectors but also have high interpretability and efficiency, thus improving model performance. Furthermore, this method effectively avoids the problem of feature combination dimensionality explosion by using random sampling and splitting sorting.
[0102] According to another aspect of the embodiments of the present invention, such as Figure 5 As shown, a training device 500 for a data classification model is provided, comprising:
[0103] The first transformation module 501 obtains multiple original feature datasets from the historical feature dataset, each original feature dataset including multiple original features, performs feature transformation on the multiple original features to obtain a first feature dataset; splits the first feature dataset into multiple first subsets; the first subsets include multiple target original features;
[0104] The derivation module 502, for each first subset, obtains a preset number of first target original features from multiple target original features of the first subset, performs encoding and decoding processing on the first target original features in sequence, generates first derived features corresponding to the first target original features, and determines the candidate feature set of the first subset based on the first derived features;
[0105] The first determining module 503 takes the set of candidate feature sets of each first subset in the multiple first subsets as the original candidate feature set corresponding to the original feature dataset, and takes the set of original candidate feature sets corresponding to each original feature dataset in the multiple original feature datasets as the historical candidate feature set corresponding to the historical feature dataset.
[0106] Training module 504 trains a data classification model based on historical candidate feature sets.
[0107] In this embodiment of the invention, the first transformation module 501 is further configured to: perform a univariate transformation on each original feature to obtain each first feature corresponding to the original feature; perform a binary transformation on all first features corresponding to all original features to obtain each second feature, and use the set of each second feature as the first feature dataset.
[0108] In this embodiment of the invention, the derivative module 502 is further configured to: encode and decode the original features of the first target using a neural network model; wherein the neural network model is trained using the following method:
[0109] For each original feature of the first target, the original feature of the first target is encoded to generate the corresponding feature vector; the predicted label corresponding to the feature vector is determined, and the prediction loss is calculated based on the true label and the predicted label of the feature vector;
[0110] The feature vectors are decoded to obtain the derived features corresponding to the feature vectors; the reconstruction loss is calculated based on the derived features and the original features of the first target.
[0111] The neural network model is trained based on the prediction loss and reconstruction loss.
[0112] In this embodiment of the invention, the derivative module 502 is further configured to: obtain a preset number of second target original features from a plurality of target original features of the first subset;
[0113] The original features of each second target and the derived features of each first target constitute the first candidate feature set of the first subset.
[0114] Calculate the feature weight of each first candidate feature in the first candidate feature set, and sort the first candidate features in descending order of feature weight;
[0115] The first candidate features are cumulatively input into the classification model according to the ranking results, and the first candidate features that constitute the candidate feature set of the first subset are selected according to the classification results.
[0116] In this embodiment of the invention, the derivative module 502 is further configured to: calculate the feature importance value of each target original feature in the first subset; and select a preset number of first target original features from multiple target original features according to the feature importance values in descending order.
[0117] According to another aspect of the embodiments of the present invention, such as Figure 6 As shown, a data processing apparatus 600 is provided, comprising:
[0118] The acquisition module 601 acquires input data, which includes multiple raw features to be processed.
[0119] The second determining module 602 determines the feature transformation rules for each original feature from the historical candidate feature set;
[0120] The second transformation module 603 performs feature transformation on multiple original features to be processed according to feature transformation rules to obtain the target feature set corresponding to the input data;
[0121] Prediction module 604 inputs the target feature set into the data classification model to obtain the target classification result corresponding to the input data.
[0122] The data classification model is obtained using the training method of the data classification model according to an embodiment of the present invention.
[0123] According to another aspect of the present invention, an electronic device is provided, comprising: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the training method or data processing method of the data classification model provided by the present invention.
[0124] According to another aspect of the present invention, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements a training method or a data processing method for a data classification model provided by the present invention.
[0125] Figure 7 An exemplary system architecture 700 is shown, which can be used to train a data classification model or a data classification model training apparatus, as well as a data processing method or a data processing apparatus.
[0126] like Figure 7As shown, system architecture 700 may include terminal devices 701, 702, and 703, a network 704, and a server 705. Network 704 serves as the medium for providing communication links between terminal devices 701, 702, and 703 and server 705. Network 704 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0127] Users can use terminal devices 701, 702, and 703 to interact with server 705 via network 704 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 701, 702, and 703, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0128] Terminal devices 701, 702, and 703 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0129] Server 705 can be a server providing various services, such as a backend management server supporting shopping websites browsed by users using terminal devices 701, 702, and 703 (for example only). The backend management server can process the input data to obtain the target feature set, input the target feature set into the data classification model, and feed back the target classification result to the terminal device.
[0130] It should be noted that the training method or data processing method of the data classification model provided in the embodiments of the present invention is generally executed by the server 705, and correspondingly, the training device or data processing device of the data classification model is generally set in the server 705.
[0131] It should be understood that Figure 7 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0132] The following is for reference. Figure 8 It shows a schematic diagram of the structure of a computer system 800 suitable for implementing a terminal device of the present invention. Figure 8 The terminal device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0133] like Figure 8As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 802 or programs loaded from storage section 808 into random access memory (RAM) 803. The RAM 803 also stores various programs and data required for the operation of the system 800. The CPU 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0134] The following components are connected to I / O interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to I / O interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 810 as needed so that computer programs read from it can be installed into storage section 808 as needed.
[0135] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 809, and / or installed from removable medium 811. When the computer program is executed by central processing unit (CPU) 801, it performs the functions defined above in the system of this invention.
[0136] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0137] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0138] The modules described in the embodiments of the present invention can be implemented in software or hardware. The described modules can also be housed in a processor; for example, a processor can be described as including a first transformation module, a derivation module, a first determination module, and a training module. The names of these modules do not necessarily limit the module itself. For example, the first transformation module can also be described as "a module that obtains multiple original feature datasets from a historical feature dataset, each original feature dataset including multiple original features, performs feature transformation on the multiple original features to obtain a first feature dataset; and splits the first feature dataset into multiple first subsets."
[0139] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs, which, when executed by the device, cause the device to include: obtaining multiple original feature datasets from a historical feature dataset, each original feature dataset including multiple original features; performing feature transformation on the multiple original features to obtain a first feature dataset; splitting the first feature dataset into multiple first subsets; each first subset including multiple target original features; for each first subset, obtaining a preset number of first target original features from the multiple target original features of the first subset; encoding and decoding the first target original features to generate first derived features corresponding to the first target original features; determining a candidate feature set for the first subset based on the first derived features; using the set of candidate feature sets of each first subset in the multiple first subsets as the original candidate feature set corresponding to the original feature dataset; using the set of original candidate feature sets corresponding to each original feature dataset in the multiple original feature datasets as the historical candidate feature set corresponding to the historical feature dataset; and training a data classification model based on the historical candidate feature set.
[0140] According to the technical solution of the embodiments of the present invention, the data processing method of the present invention obtains an original feature dataset from a historical feature dataset, performs feature transformation on multiple original features in the original feature dataset to obtain a first feature dataset, and splits the first feature dataset into multiple first subsets; performs feature derivation processing on the first target original features in each first subset to generate a first derived feature, obtains a candidate feature set of the first subset based on the first derived feature, uses the set of candidate feature sets of each first subset as the original candidate feature set of the original feature dataset, obtains a historical candidate feature set of the historical feature dataset based on each original candidate feature set, uses the historical candidate feature set to train a model to obtain a data classification model; then, when using the data classification model to predict input data, obtains the feature transformation rules of the original features from the historical candidate feature set, performs feature transformation on the input data according to the feature transformation rules to obtain a target feature set, and inputs the target feature set into the data classification model to obtain the data classification result. This data processing method employs automated feature engineering to create features, introduces a multi-task learning approach from deep learning, and uses an encoder-decoder framework. By jointly modeling prediction loss and reconstruction loss, the feature representation of the encoding module is optimized, ensuring that the derived features retain the information of the original features to the greatest extent. The resulting features not only possess rich information from deep learning feature vectors but also have high interpretability and efficiency, thus improving model performance. Furthermore, this method effectively avoids the problem of feature combination dimensionality explosion by using random sampling and splitting sorting.
[0141] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for training a data classification model, characterized in that, include: Multiple raw feature datasets are obtained from a historical feature dataset, each raw feature dataset including multiple raw features. Feature transformation is performed on the multiple raw features to obtain a first feature dataset. The first feature dataset is split into multiple first subsets; each first subset includes multiple target original features; For each first subset, a preset number of first target original features are obtained from multiple target original features of the first subset, and the first target original features are encoded and decoded to generate a first derived feature corresponding to the first target original features; The candidate feature set of the first subset is determined based on the first derived feature; The set of candidate feature sets of each of the multiple first subsets is taken as the original candidate feature set corresponding to the original feature dataset, and the set of original candidate feature sets corresponding to each of the multiple original feature datasets is taken as the historical candidate feature set corresponding to the historical feature dataset. A data classification model is trained based on the historical candidate feature set.
2. The method according to claim 1, characterized in that, The multiple original features are transformed to obtain a first feature dataset, including: For each original feature, a univariate transformation is performed on the original feature to obtain the corresponding first features; Perform a binary transformation on all first features corresponding to all original features to obtain each second feature, and use the set of each second feature as the first feature dataset.
3. The method according to claim 1, characterized in that, Encoding and decoding the original features of the first target include: The original features of the first target are encoded and decoded using a neural network model; The neural network model was trained using the following method: For each original feature of the first target, the original feature of the first target is encoded to generate a corresponding feature vector; the predicted label corresponding to the feature vector is determined, and the prediction loss is calculated based on the true label of the feature vector and the predicted label; The feature vector is decoded to obtain the derived features corresponding to the feature vector; the reconstruction loss is calculated based on the derived features and the original features of the first target. The neural network model is trained based on the prediction loss and the reconstruction loss.
4. The method according to claim 1, characterized in that, Determining the candidate feature set of the first subset based on the first derived feature includes: Obtain the preset number of second target original features from multiple target original features of the first subset; The original features of each second target and the derived features of each first target constitute the first candidate feature set of the first subset. Calculate the feature weight of each first candidate feature in the first candidate feature set, and sort the first candidate features in descending order of feature weight; The first candidate features are cumulatively input into the classification model according to the ranking results, and the first candidate features that constitute the candidate feature set of the first subset are selected according to the classification results.
5. The method according to claim 1, characterized in that, Obtain a predetermined number of first target original features from multiple target original features in the first subset, including: Calculate the feature importance value for each original feature of the target in the first subset; Based on the feature importance values in descending order, a preset number of first target original features are selected from multiple target original features.
6. A data processing method, characterized in that, include: Obtain input data, which includes multiple raw features to be processed; The feature transformation rules for each original feature are determined from the historical candidate feature set; According to the feature transformation rules, the multiple original features to be processed are transformed to obtain the target feature set corresponding to the input data; The target feature set is input into the data classification model to obtain the target classification result corresponding to the input data. The data classification model is obtained using the training method described in any one of claims 1-5.
7. A training device for a data classification model, characterized in that, include: The first transformation module obtains multiple original feature datasets from the historical feature dataset, each of which includes multiple original features, and performs feature transformation on the multiple original features to obtain the first feature dataset; The first feature dataset is split into multiple first subsets; each first subset includes multiple target original features; The derivation module, for each first subset, obtains a preset number of first target original features from multiple target original features of the first subset, and performs encoding and decoding processing on the first target original features in sequence to generate first derived features corresponding to the first target original features; The candidate feature set of the first subset is determined based on the first derived feature; The first determining module takes the set of candidate feature sets of each of the plurality of first subsets as the original candidate feature set corresponding to the original feature dataset, and takes the set of original candidate feature sets corresponding to each of the plurality of original feature datasets as the historical candidate feature set corresponding to the historical feature dataset. The training module trains a data classification model based on the historical candidate feature set.
8. A data processing apparatus, characterized in that, include: The acquisition module acquires input data, which includes multiple raw features to be processed. The second determining module determines the feature transformation rules for each original feature from the historical candidate feature set; The second transformation module performs feature transformation on the plurality of original features to be processed according to the feature transformation rules to obtain the target feature set corresponding to the input data; The prediction module inputs the target feature set into the data classification model to obtain the target classification result corresponding to the input data. The data classification model is obtained using the training method described in any one of claims 1-5.
9. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-6.
10. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-6.