A service evaluation method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202211193473.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-28
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2042-09-28
AI Technical Summary
[0004]本申请提供一种业务评估方法、装置、电子设备及存储介质,用以解决由于训练数据集中样本类别数量不平衡造成的模型评估准确性较差的技术问题
[0063]This application provides a business evaluation method, apparatus, electronic device, and storage medium. The method involves acquiring data of a business to be evaluated and using a pre-configured network model to evaluate and process the data to obtain evaluation results. The pre-configured network model is acquired as follows: a first imbalanced dataset related to the business to be evaluated is acquired. This first imbalanced dataset includes a minority class dataset and a majority class dataset. The minority class dataset contains a few data groups, and the majority class dataset contains a majority of data groups. Each data group includes feature values corresponding to a multi-dimensional feature. Based on the missing data of the feature values corresponding to each dimension in the minority and majority class datasets, and the data type of the feature values corresponding to each dimension, the first imbalanced dataset is pre-processed to obtain a second imbalanced dataset. Subsequently, the minority class data in the acquired second imbalanced dataset is processed... The feature values corresponding to each dimension of the centralized dataset are subjected to min-max normalization, and white noise is added to the processed minority class dataset to obtain a third imbalanced dataset. Based on the minority class dataset in the third imbalanced dataset and a preset minimum error condition, a pre-configured autoencoder is trained to obtain the final autoencoder. Based on the final autoencoder, the third imbalanced dataset is balanced to obtain a balanced dataset, and the feature values corresponding to each dimension of the minority class dataset in the balanced dataset are restored to obtain the input dataset. Based on the input dataset, the network model to be trained is trained to obtain a pre-configured network model. Using the method provided in this application, the minority class dataset of the first imbalanced dataset related to the business to be evaluated is expanded to have the same number of data groups as the majority class dataset, and then used as the input dataset for the network model to be trained. This allows the network model to fully learn the features of the originally very small minority class dataset, resulting in a pre-configured network model. The pre-configured network model obtained in this way can make a comprehensive and accurate evaluation of the data of the business to be evaluated, effectively improving the accuracy of business evaluation.
Smart Images

Figure CN115630283B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information technology, and in particular to a business evaluation method, apparatus, electronic device, and storage medium. Background Technology
[0002] In existing technologies, pre-trained network models are frequently used to achieve assessment purposes such as business classification, identification, and prediction, thereby simplifying the calculation process and improving assessment efficiency. However, the datasets of the businesses to be assessed often exhibit a severe imbalance in the number of different sample categories. This extreme imbalance in the number of sample categories in the dataset used to train the model can cause the assessment results output by the model trained on this imbalanced dataset to favor the category with the larger number of samples, thus affecting the accuracy of the business assessment results.
[0003] It is evident that balancing the amount of data among sample categories in the input dataset is crucial when training the corresponding model. Currently, there is an urgent need for a method that can achieve this balance to improve the accuracy of business evaluation using network models. Summary of the Invention
[0004] This application provides a business evaluation method, apparatus, electronic device, and storage medium to solve the technical problem of poor model evaluation accuracy caused by the imbalance of the number of sample categories in the training dataset.
[0005] Firstly, this application provides a business evaluation method, including:
[0006] Obtain data on the business to be evaluated;
[0007] A pre-configured mathematical model is used to evaluate the data of the business to be evaluated in order to obtain the evaluation results;
[0008] The pre-configured mathematical model is obtained in the following way:
[0009] Obtain a first imbalanced dataset related to the business to be evaluated; the first imbalanced dataset includes a minority class dataset and a majority class dataset; wherein, the minority class dataset includes a few data groups, the majority class dataset includes a majority of data groups, and each data group includes feature value data corresponding to a multidimensional feature;
[0010] Based on the missing data of the feature value data corresponding to each feature in the minority class dataset and the majority class dataset, and the data type of the feature value data corresponding to each feature, the first imbalanced dataset is preprocessed to obtain the second imbalanced dataset.
[0011] The feature values corresponding to each feature in the minority class dataset of the second imbalanced dataset are subjected to min-max normalization, and white noise is added to the processed minority class dataset to obtain the third imbalanced dataset.
[0012] Based on the minority class dataset in the third imbalanced dataset and the preset minimum error condition, the pre-configured autoencoder is trained to obtain the final autoencoder.
[0013] Based on the final autoencoder, the third imbalanced dataset is balanced to obtain a balanced dataset, and the feature value data corresponding to each dimension of the minority class dataset in the balanced dataset is restored to obtain the dataset to be input.
[0014] The mathematical model to be trained is trained based on the input dataset to obtain the pre-configured mathematical model.
[0015] In one specific implementation, the step of preprocessing the first imbalanced dataset to obtain a second imbalanced dataset based on the missing data of the feature values corresponding to each dimension in the minority class and majority class datasets, and the data type of the feature values corresponding to each dimension, includes:
[0016] For each feature dimension, the first missing rate of the feature value data corresponding to the feature in the minority class dataset and the second missing rate of the feature value data corresponding to the feature in the majority class dataset are obtained respectively. When both the first missing rate and the second missing rate are greater than a preset missing threshold, the feature and the feature value data corresponding to the feature are deleted in the first imbalanced dataset.
[0017] When the data type of the feature value corresponding to the retained feature in the first imbalanced dataset is character type, for each dimension of the retained feature, it is determined whether there are missing feature value data corresponding to the retained feature in the minority class dataset. If there are missing features, the mode is determined from the non-missing feature value data corresponding to the retained feature in the minority class dataset, and the mode is added to the corresponding position where the feature value data of the retained feature is missing.
[0018] When the data type of the feature value corresponding to the retained feature is character type, for each dimension of the retained feature, it is determined whether there are missing feature value data corresponding to the retained feature in the majority class dataset. If there are missing data, the mode is determined from the non-missing feature value data corresponding to the retained feature in the majority class dataset, and the mode is added to the corresponding position where the retained feature has missing feature value data.
[0019] When the data type of the feature value corresponding to the retained feature is non-character type, for each dimension of the retained feature, it is determined whether there are missing feature value data corresponding to the retained feature in the minority class dataset. If there are missing data, the average value is determined from the non-missing feature value data corresponding to the retained feature in the minority class dataset, and the average value is added to the corresponding position where the retained feature has missing feature value data.
[0020] When the data type of the feature value corresponding to the retained feature is non-character type, for each dimension of the retained feature, it is determined whether there are missing feature value data corresponding to the retained feature in the majority class dataset. If there are missing data, the average value is determined from the non-missing feature value data corresponding to the retained feature in the majority class dataset, and the average value is added to the corresponding position where the retained feature has missing feature value data.
[0021] When the data type of the feature value corresponding to the retained feature is character type, dummy encoding is performed on the feature value data corresponding to the retained feature to obtain the second imbalanced dataset.
[0022] In one specific implementation, training a pre-configured autoencoder based on the minority class dataset in the third imbalanced dataset and a preset minimum error condition to obtain the final autoencoder includes:
[0023] A predetermined number of data groups are extracted from the minority class dataset in the third imbalanced dataset in batches, and the data groups are input into a pre-configured autoencoder for training to obtain the corresponding minority class dataset. The minimum error is obtained based on the generated corresponding minority class dataset, the dataset of the minority class dataset in the second imbalanced dataset after undergoing max-min normalization, and the predetermined number.
[0024] When the minimum error meets the preset minimum error condition, training of the pre-configured autoencoder is stopped, and the pre-configured autoencoder at this time is taken as the final autoencoder.
[0025] In one specific implementation, obtaining the minimum error based on the generated corresponding minority class dataset, the minority class dataset in the second imbalanced dataset after max-min normalization, and the preset quantity includes:
[0026] Based on the generated corresponding minority class dataset The minority class dataset in the second imbalanced dataset, after undergoing max-min normalization, and the preset number n, are defined using the following formula:
[0027]
[0028] Get the minimum error
[0029] In one specific implementation, after balancing the third imbalanced dataset according to the final autoencoder to obtain a balanced dataset, the method further includes:
[0030] For each feature dimension, the feature of the minority class dataset in the balanced dataset is compared with the feature in the dataset corresponding to the minority class dataset in the second imbalanced dataset after the minus-max normalization process, and the test value of each feature dimension is obtained.
[0031] If the test value corresponding to each feature dimension is greater than 0.01, then the feature value data of each feature dimension of the minority class dataset in the balanced dataset is restored to obtain the dataset to be input.
[0032] If there are features with a test value less than or equal to 0.01, then those features are deleted from the balanced dataset to obtain an updated balanced dataset.
[0033] The feature value data of each dimension of the minority class dataset in the updated balanced dataset are restored to obtain the dataset to be input.
[0034] Secondly, this application provides a business evaluation apparatus, comprising:
[0035] The acquisition module is used to acquire data from the business to be evaluated.
[0036] The processing module is used to evaluate the data of the business to be evaluated using a pre-configured mathematical model in order to obtain the evaluation result.
[0037] The acquisition module is further configured to acquire a first imbalanced dataset related to the business to be evaluated; the first imbalanced dataset includes a minority class dataset and a majority class dataset; wherein, the minority class dataset includes a few data groups, the majority class dataset includes a majority of data groups, and each data group includes feature value data corresponding to each of the multidimensional features;
[0038] The processing module is further configured to preprocess the first imbalanced dataset according to the missing data of the feature value data corresponding to each feature in the minority class dataset and the majority class dataset, and the data type of the feature value data corresponding to each feature, so as to obtain a second imbalanced dataset.
[0039] The processing module is further configured to perform max-min normalization processing on the feature value data corresponding to each dimension of the minority class dataset in the second imbalanced dataset, and add white noise to the processed minority class dataset to obtain a third imbalanced dataset.
[0040] The first training module is used to train a pre-configured autoencoder based on the minority class dataset in the third imbalanced dataset and a preset minimum error condition, so as to obtain the final autoencoder.
[0041] The processing module is further configured to balance the third imbalanced dataset according to the final autoencoder to obtain a balanced dataset, and to restore the feature value data corresponding to each feature dimension in the minority class dataset of the balanced dataset to obtain the dataset to be input.
[0042] The second training module is used to train the mathematical model to be trained based on the input dataset to obtain the pre-configured mathematical model.
[0043] Optionally, the processing module is specifically used to obtain, for each feature dimension, the first missing rate of the feature value data corresponding to the feature in the minority class dataset and the second missing rate of the feature value data corresponding to the feature in the majority class dataset, and delete the feature and the feature value data corresponding to the feature in the first imbalanced dataset when both the first missing rate and the second missing rate are greater than a preset missing threshold.
[0044] The processing module is specifically used to determine whether there are missing feature value data corresponding to the retained feature in the minority class dataset for each dimension of the retained feature when the feature value data corresponding to the retained feature in the first imbalanced dataset is of character type. If there are missing features, the mode is determined from the non-missing feature value data corresponding to the retained feature in the minority class dataset, and the mode is added to the corresponding position where the feature value data of the retained feature is missing.
[0045] The processing module is specifically used to determine whether there are missing feature value data corresponding to the retained feature in the majority class dataset for each dimension of the retained feature when the feature value data corresponding to the retained feature is of character type. If there are missing features, the mode is determined from the non-missing feature value data corresponding to the retained feature in the majority class dataset, and the mode is added to the corresponding position where the feature value data of the retained feature is missing.
[0046] The processing module is specifically used to determine whether there are missing feature value data corresponding to the retained feature in the minority class dataset for each dimension of the retained feature when the feature value data corresponding to the retained feature is of non-character type. If there are missing features, the average value is determined from the non-missing feature value data corresponding to the retained feature in the minority class dataset, and the average value is added to the corresponding position where the feature value data of the retained feature is missing.
[0047] The processing module is specifically used to determine whether there are missing feature value data corresponding to the retained feature in the majority class dataset for each dimension of the retained feature when the feature value data corresponding to the retained feature is of non-character type. If there are missing data, the average value is determined from the non-missing feature value data corresponding to the retained feature in the majority class dataset, and the average value is added to the corresponding position where the feature value data of the retained feature is missing.
[0048] The processing module is specifically used to perform dummy encoding on the feature value data corresponding to the retained feature when the data type of the feature value corresponding to the retained feature is character type, so as to obtain a second imbalanced dataset.
[0049] Optionally, the first training module is specifically used to extract a preset number of data groups from the minority class dataset in the third imbalanced dataset in batches, and input the data groups into a pre-configured autoencoder for training to obtain the corresponding minority class dataset, and obtain the minimum error based on the generated corresponding minority class dataset, the dataset of the minority class dataset in the second imbalanced dataset after max-min normalization processing, and the preset number.
[0050] The first training module is specifically used to stop training the pre-configured autoencoder when the minimum error meets the preset minimum error condition, and to use the pre-configured autoencoder at this time as the final autoencoder.
[0051] Optionally, the acquisition module is specifically used to obtain the corresponding minority class dataset generated. The minority class dataset in the second imbalanced dataset, after undergoing max-min normalization, and the preset number n, are defined using the following formula:
[0052]
[0053] Get the minimum error
[0054] Optionally, it also includes: a testing module, used to perform a KS test on the features of the minority class dataset in the balanced dataset and the corresponding features in the dataset of the minority class dataset in the second imbalanced dataset after the minus-max normalization process for each feature dimension, and obtain the test value of each feature dimension.
[0055] The acquisition module is further configured to, if the test value corresponding to each dimension of the feature is greater than 0.01, restore the feature value data of each dimension of the minority class dataset in the balanced dataset to obtain the dataset to be input.
[0056] The acquisition module is further configured to delete features in the balanced dataset if there are features with a test value less than or equal to 0.01, so as to obtain an updated balanced dataset.
[0057] The acquisition module is further configured to restore the feature value data of each dimension of the minority class dataset in the updated balanced dataset to obtain the dataset to be input.
[0058] Thirdly, this application provides an electronic device, comprising:
[0059] Processor, memory, communication interface;
[0060] The memory is used to store the executable instructions of the processor;
[0061] The processor is configured to execute the method as described in the first aspect by executing the executable instructions.
[0062] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in the first aspect.
[0063] This application provides a business evaluation method, apparatus, electronic device, and storage medium. The method involves acquiring data of a business to be evaluated and using a pre-configured network model to evaluate and process the data to obtain evaluation results. The pre-configured network model is acquired as follows: a first imbalanced dataset related to the business to be evaluated is acquired. This first imbalanced dataset includes a minority class dataset and a majority class dataset. The minority class dataset contains a few data groups, and the majority class dataset contains a majority of data groups. Each data group includes feature values corresponding to a multi-dimensional feature. Based on the missing data of the feature values corresponding to each dimension in the minority and majority class datasets, and the data type of the feature values corresponding to each dimension, the first imbalanced dataset is pre-processed to obtain a second imbalanced dataset. Subsequently, the minority class data in the acquired second imbalanced dataset is processed... The feature values corresponding to each dimension of the centralized dataset are subjected to min-max normalization, and white noise is added to the processed minority class dataset to obtain a third imbalanced dataset. Based on the minority class dataset in the third imbalanced dataset and a preset minimum error condition, a pre-configured autoencoder is trained to obtain the final autoencoder. Based on the final autoencoder, the third imbalanced dataset is balanced to obtain a balanced dataset, and the feature values corresponding to each dimension of the minority class dataset in the balanced dataset are restored to obtain the input dataset. Based on the input dataset, the network model to be trained is trained to obtain a pre-configured network model. Using the method provided in this application, the minority class dataset of the first imbalanced dataset related to the business to be evaluated is expanded to have the same number of data groups as the majority class dataset, and then used as the input dataset for the network model to be trained. This allows the network model to fully learn the features of the originally very small minority class dataset, resulting in a pre-configured network model. The pre-configured network model obtained in this way can make a comprehensive and accurate evaluation of the data of the business to be evaluated, effectively improving the accuracy of business evaluation. Attached Figure Description
[0064] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0065] Figure 1 and Figure 2 A flowchart illustrating an embodiment of a business evaluation method provided in this application;
[0066] Figure 3A flowchart illustrating a second embodiment of a business evaluation method provided in this application;
[0067] Figure 4 A flowchart illustrating a third embodiment of a business evaluation method provided in this application;
[0068] Figure 5 A schematic diagram of the structure of an embodiment of a business evaluation device provided in this application;
[0069] Figure 6 This is a schematic diagram of an embodiment of an electronic device provided in this application. Detailed Implementation
[0070] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments made by those skilled in the art under the guidance of these embodiments are within the scope of protection of this application.
[0071] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0072] In existing technologies, with the integration of computer technology with various disciplines, when evaluating target businesses such as classification, identification, or prediction, the approach is to first build a network learning model, then train the model using a corresponding dataset to enable it to distinguish between different samples in the input dataset. This trained model is then used to evaluate the target business. However, the number of sample categories in the input dataset often exhibits a severe imbalance. This imbalance causes the network model to learn better from categories with larger sample counts, and in severe cases, it may even ignore the smaller sample counts as noise. Consequently, the final evaluation result of the trained network model is biased towards the categories with larger sample counts in the input dataset, making the final evaluation result unreliable.
[0073] The technical concept of this application is: how to expand the minority class dataset in the input dataset of the network learning model so that the imbalanced minority class dataset and the majority class dataset in the input dataset are balanced, so as to improve the evaluation effect of the finally trained network model.
[0074] The technical solution of this application will now be described in detail through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0075] Figure 1 and Figure 2 This is a flowchart illustrating an embodiment of a business evaluation method provided in this application. (Refer to...) Figure 1 The method includes:
[0076] Step S101: Obtain data for the business to be evaluated.
[0077] In this embodiment, the business to be evaluated includes, but is not limited to, car sales, anti-fraud, or medical diagnosis, etc.
[0078] Step S102: Use a pre-configured network model to evaluate the data of the service to be evaluated in order to obtain the evaluation results.
[0079] The method for obtaining the pre-configured network model in step S102 is as follows: Figure 2 As shown:
[0080] Step S1021: Obtain the first imbalanced dataset related to the business to be evaluated; the first imbalanced dataset includes a minority class dataset and a majority class dataset; wherein, the minority class dataset includes a few data groups, the majority class dataset includes a majority of data groups, and each data group includes feature value data corresponding to the multidimensional features.
[0081] In this embodiment, an imbalanced dataset refers to a dataset where the number of samples in each class differs significantly. Taking a binary classification problem as an example, if the number of samples in one class is much greater than the number of samples in the other class, such a dataset is called an imbalanced dataset.
[0082] Step S1022: Based on the missing data of the feature value data corresponding to each dimension in the minority class dataset and the majority class dataset, and the data type of the feature value data corresponding to each dimension, preprocess the first imbalanced dataset to obtain the second imbalanced dataset.
[0083] Step S1023: Perform max-min normalization on the feature value data corresponding to each dimension of the minority class dataset in the second imbalanced dataset, and add white noise to the processed minority class dataset to obtain the third imbalanced dataset.
[0084] Step S1024: Train the pre-configured autoencoder based on the minority class dataset in the third imbalanced dataset and the preset minimum error condition to obtain the final autoencoder.
[0085] Step S1025: Based on the final autoencoder, balance the third imbalanced dataset to obtain a balanced dataset, and restore the feature value data corresponding to each dimension of the minority class dataset in the balanced dataset to obtain the dataset to be input.
[0086] Step S1026: Train the network model to be trained based on the input dataset to obtain a pre-configured network model.
[0087] In this embodiment, the business to be evaluated is a car sales business. A pre-configured network model can be used to predict users' car purchase intentions based on the user data related to the car sales business.
[0088] In this embodiment, a first imbalanced dataset related to car sales can be obtained from the China Unicom user database. Typically, users who have already purchased a car constitute a very small proportion of this first imbalanced dataset. For example, data from a certain month shows 3113 users who have purchased a car that month, while the first imbalanced dataset contains a total of 74949 users. This proportion is only 4.2%. Therefore, data on users who have purchased a car corresponds to the minority class dataset, and data on users who have not purchased a car corresponds to the majority class dataset. Each user's multidimensional characteristics consist of multiple feature values forming a data group. Both the minority and majority class datasets contain multiple data groups, but the number of data groups in the minority class dataset is much smaller than the number in the majority class dataset. The multidimensional characteristics of users mentioned here include basic characteristics, such as user age, as well as user behavioral characteristics, such as the frequency of access to car-related applications.
[0089] In this embodiment, since all types of data in the Unicom user database are obtained with the user's consent and authorization, there may be cases where the feature value data of some features is missing, and the feature value types of different features are different. Therefore, it is necessary to preprocess the first imbalanced dataset to obtain a second imbalanced dataset with complete feature value data and a unified data type of non-character data.
[0090] In this embodiment, the minority class dataset of the second imbalanced dataset is standardized to eliminate the influence of dimensional data on the training of the pre-configured autoencoder and accelerate the iteration speed of the autoencoder. Optionally, the standardization method can be the min-max normalization method. Min-max normalization, as the name suggests, uses the maximum and minimum eigenvalues of a feature column to process the data, ensuring that all eigenvalues of the processed feature are between [0,1]. Specifically, the following formula can be used:
[0091]
[0092] In the formula: y′ represents the normalized value of the target feature column of the minority class dataset in the second imbalanced dataset after taking the maximum and minimum values of y, y represents the target feature value of the target feature column of the minority class dataset in the second imbalanced dataset, min is the minimum feature value of the target feature column where the data is located, and max is the maximum feature value of the target feature column where the data is located.
[0093] In this embodiment, white noise randomly selected within the value range [0,1] is added to the minority class dataset after max-min normalization to slightly perturb its distribution. To prevent this white noise perturbation from disrupting the original distribution characteristics of the minority class dataset, it should be multiplied by a preset coefficient. This preset coefficient can be obtained through multiple experiments and can be any value within the range [0.2, 0.4]. Furthermore, the number of data groups and the feature dimension of the white noise dataset should be the same as those of the minority class dataset. The white noise dataset multiplied by the preset coefficient is then added to the aforementioned minority class dataset after max-min normalization. To ensure that the feature value range within the dataset remains within [0,1] after addition, feature values exceeding this range are truncated to 1, resulting in a third imbalanced dataset.
[0094] In this embodiment, the pre-configured autoencoder parameters are trained based on the minority class dataset in the third imbalanced dataset. The pre-configured autoencoder includes an encoder and a decoder, satisfying the following algorithm formula:
[0095]
[0096] In the formula: x noiseThis represents the minority class dataset in the third imbalanced dataset. This represents the generated minority class dataset, g represents the encoder, and h represents the decoder.
[0097] In this embodiment, when the corresponding minority class dataset is generated in the pre-configured autoencoder If the error between the dataset x and the minority class dataset in the second imbalanced dataset after max-min normalization satisfies the minimum error condition, then the pre-configured autoencoder parameters are considered to have been trained and can be used as the final autoencoder to generate the minority class dataset.
[0098] In this embodiment, the minority class dataset from the third imbalanced dataset is input into the final autoencoder to ensure that the number of data groups in the generated minority class dataset, plus the number of data groups in the third imbalanced dataset, matches the number of data groups in the majority class dataset, thus obtaining a balanced dataset. At this point, the feature values of the corresponding features in the original minority class dataset and the dataset generated by the final autoencoder are still between [0,1]. To ensure that the feature values of each feature in the generated dataset represent the dimensions of its corresponding feature and are recognized by the network model to be trained, each feature is restored based on its maximum and minimum values during min-max normalization to obtain a balanced dataset to be input into the network model to be trained. The network model to be trained is then trained using this dataset to obtain a pre-configured network model. Finally, the data of the service to be evaluated is input into the pre-configured network model to output the evaluation results for the service to be evaluated.
[0099] In this embodiment, data of the service to be evaluated is acquired and a pre-configured network model is used to evaluate the data to obtain evaluation results. The pre-configured network model is acquired as follows: a first imbalanced dataset related to the service to be evaluated is acquired, comprising a minority class dataset and a majority class dataset; the minority class dataset contains a few data groups, and the majority class dataset contains a majority of data groups, each containing feature values corresponding to a multi-dimensional feature; based on the missing data of the feature values corresponding to each dimension in the minority and majority class datasets, and the data type of the feature values corresponding to each dimension, the first imbalanced dataset is pre-processed to obtain a second imbalanced dataset; subsequently, the minority class data in the acquired second imbalanced dataset is processed... The feature values corresponding to each dimension of the centralized dataset are subjected to min-max normalization, and white noise is added to the processed minority class dataset to obtain a third imbalanced dataset. Based on the minority class dataset in the third imbalanced dataset and a preset minimum error condition, a pre-configured autoencoder is trained to obtain the final autoencoder. Based on the final autoencoder, the third imbalanced dataset is balanced to obtain a balanced dataset, and the feature values corresponding to each dimension of the minority class dataset in the balanced dataset are restored to obtain the input dataset. Based on the input dataset, the network model to be trained is trained to obtain a pre-configured network model. Using the method provided in this application, the minority class dataset of the first imbalanced dataset related to the business to be evaluated is expanded to have the same number of data groups as the majority class dataset, thus obtaining a balanced dataset, which is then used as the input dataset for the network model to be trained. This allows the network model to learn the features of both the minority class dataset (which originally had very few data groups) and the majority class dataset in the first imbalanced dataset in a balanced and sufficient manner, resulting in a pre-configured network model. This pre-configured network model can make a comprehensive and accurate evaluation of the data of the business to be evaluated, effectively improving the accuracy of business evaluation.
[0100] Based on the above embodiments, after balancing the third imbalanced dataset according to the final autoencoder to obtain a balanced dataset in step S1025, the method further includes:
[0101] For each feature dimension, a KS test is performed on the features of the minority class dataset in the balanced dataset and the corresponding features in the minority class dataset in the second imbalanced dataset after min-max normalization, to obtain the test value for each feature dimension. If the test value for each feature dimension is greater than 0.01, the feature value data of each feature dimension in the minority class dataset in the balanced dataset is restored to obtain the dataset to be input. If there is a feature with a test value less than or equal to 0.01, that feature is deleted from the balanced dataset to obtain the updated balanced dataset. The feature value data of each feature dimension in the minority class dataset in the updated balanced dataset is then restored to obtain the dataset to be input.
[0102] In this embodiment, after balancing the third imbalanced dataset using the final autoencoder, a KS test is performed on each dimension of the corresponding minority class dataset generated by the final autoencoder in the obtained balanced dataset and the dataset after max-min normalization of the minority class dataset in the second imbalanced dataset. This verifies whether the features in the corresponding minority class dataset generated by the final autoencoder and the corresponding corresponding features in the input minority class dataset without white noise interference are independent and identically distributed. If the KS test values of all corresponding feature columns are greater than 0.01, it is considered that the feature value data columns composed of the corresponding features in the corresponding minority class dataset generated by the final autoencoder in the balanced dataset and the dataset after max-min normalization of the minority class dataset in the second imbalanced dataset meet the condition of independent and identically distributed. Then, the feature value data of each dimension of the minority class dataset in the balanced dataset is restored by max-min normalization to obtain the dataset to be input. If a certain feature has a corresponding KS test value less than or equal to 0.01, then the feature in the generated minority class dataset is considered not to meet the requirements. In order to maintain the consistency of features in the entire balanced dataset, the feature and its corresponding feature value data in the entire balanced dataset are deleted to obtain the updated balanced dataset. The feature value data of each feature in the updated balanced dataset are then restored to obtain the dataset to be input.
[0103] In this embodiment, the KS test for the corresponding feature column can be repeated multiple times. If 60% of the test values in the multiple tests meet the above conditions, they are all considered to be eligible for the corresponding subsequent processing.
[0104] Figure 3 This is a flowchart illustrating a second embodiment of a business evaluation method provided in this application. (Refer to...) Figure 3 The above Figure 1 One specific implementation of step S1022 in the embodiment includes:
[0105] Step S301: For each feature dimension, obtain the first missing rate of the feature value data corresponding to the feature in the minority class dataset and the second missing rate of the feature value data corresponding to the feature in the majority class dataset. When both the first missing rate and the second missing rate are greater than the preset missing threshold, delete the feature and the feature value data corresponding to the feature in the first imbalanced dataset.
[0106] Step S302: When the data type of the feature value corresponding to the retained feature in the first imbalanced dataset is character type, for each dimension of the retained feature, determine whether there are missing feature value data corresponding to the retained feature in the minority class dataset. If there are missing data, determine the mode from the non-missing feature value data corresponding to the retained feature in the minority class dataset and add the mode to the corresponding position where the feature value data of the retained feature is missing.
[0107] Step S303: When the data type of the feature value corresponding to the retained feature is character type, for each dimension of the retained feature, determine whether there are missing feature value data corresponding to the retained feature in the majority class dataset. If there are missing data, determine the mode from the non-missing feature value data corresponding to the retained feature in the majority class dataset, and add the mode to the corresponding position where the feature value data of the retained feature is missing.
[0108] Step S304: When the data type of the feature value corresponding to the retained feature is non-character type, for each dimension of the retained feature, determine whether there are missing feature value data corresponding to the retained feature in the minority class dataset. If there are missing data, determine the average value from the non-missing feature value data corresponding to the retained feature in the minority class dataset, and add the average value to the corresponding position where the retained feature has missing feature value data.
[0109] Step S305: When the data type of the feature value corresponding to the retained feature is non-character type, for each dimension of the retained feature, determine whether there are missing feature value data corresponding to the retained feature in the majority class dataset. If there are missing data, determine the average value from the non-missing feature value data corresponding to the retained feature in the majority class dataset, and add the average value to the corresponding position where the retained feature has missing feature value data.
[0110] Step S306: When the data type of the feature value corresponding to the retained feature is character type, perform dummy encoding on the feature value data corresponding to the retained feature to obtain the second imbalanced dataset.
[0111] In this embodiment, to ensure that each feature dimension of the dataset used for training the pre-configured autoencoder is a real and valid feature obtained from the database, the first missing rate in the minority class dataset and the second missing rate in the majority class dataset are obtained for each feature dimension in the first imbalanced dataset. If a feature dimension has both its first and second missing rates greater than a preset missing threshold, the feature value data corresponding to that feature is considered unrepresentative and invalid data. The feature and its corresponding feature value data are then deleted from the first imbalanced dataset. "Missing" refers to a feature where no feature value data has been obtained, resulting in a gap in the data position. The "missing rate" refers to the proportion of data groups with no feature value data obtained for a given feature to the total number of data groups in the entire dataset. Optionally, the preset missing threshold can be any value greater than 0.5.
[0112] In this embodiment, although features with both a first missing rate and a second missing rate greater than a preset missing threshold have been deleted from the first imbalanced dataset, it is possible that features that do not meet the above deletion conditions but still have missing feature value data may be retained, such as features with a first missing rate of 0.3 and a second missing rate of 0.2. To ensure the integrity of the feature value data for such features, the missing feature value data should be supplemented.
[0113] In this embodiment, if the data type of the retained feature value with missing feature value data is character type, and if the missing feature value data is from the minority class dataset, then the mode is determined from the non-missing feature value data corresponding to the retained feature in the minority class dataset, and the mode is added to the corresponding position where the retained feature has missing feature value data; if the missing feature value data is from the majority class dataset, then the mode is determined from the non-missing feature value data corresponding to the retained feature in the majority class dataset, and the mode is added to the corresponding position where the retained feature has missing feature value data.
[0114] In this embodiment, if the data type of the feature value that is retained and has missing feature value data is non-character type, then what should be added to the missing position should be the average value of the non-missing feature value data corresponding to that feature in the dataset where the feature value is missing.
[0115] In this embodiment, for the retained feature values that are character-type, dummy encoding is performed according to a preset mapping relationship to transform them into discrete non-character data. This enhances the stability of the dataset and improves the learning efficiency of the subsequently pre-configured autoencoder. Optionally, the preset mapping relationship is a mapping relationship between non-negative integers and character-type feature values, such as 1 corresponding to male and 2 corresponding to female. The first imbalanced dataset after the above preprocessing is then used as the second imbalanced dataset.
[0116] In this embodiment, by preprocessing the first imbalanced dataset, features with both the first and second missing rates exceeding a preset missing threshold are removed. Missing feature values are then added to the retained features. Finally, character-type feature values are converted to non-character-type data using dummy encoding. The method provided in this application optimizes the first imbalanced dataset, resulting in a second imbalanced dataset that better represents the data characteristics of the business to be evaluated. Furthermore, the dataset after dummy encoding is uniformly non-character-type, allowing for faster iteration speeds when training the pre-configured autoencoder, effectively improving the efficiency of the entire business evaluation process.
[0117] Figure 4 This is a flowchart illustrating a third embodiment of a business evaluation method provided in this application. (Refer to...) Figure 4 In combination with the above Figure 1 , Figure 2 and Figure 3 In one embodiment, a specific implementation of step S1024 above includes:
[0118] Step S401: Extract a preset number of data groups from the minority class dataset in the third imbalanced dataset in batches, and input the data groups into the pre-configured autoencoder for training to obtain the corresponding minority class dataset. Based on the generated corresponding minority class dataset, the dataset after max-min normalization of the minority class dataset in the second imbalanced dataset, and the preset number, obtain the minimum error.
[0119] Step S402: When the minimum error meets the preset minimum error condition, stop training the pre-configured autoencoder and use the pre-configured autoencoder at this time as the final autoencoder.
[0120] In this embodiment, to maximize the training performance of the pre-configured autoencoder, a predetermined number of data sets are extracted in batches and input into the pre-configured autoencoder for training rounds to obtain the corresponding minority class dataset. One round is defined as the period after all minority class datasets from the third imbalanced dataset have participated in one training iteration. Optionally, the predetermined number can be one percent of the number of minority class datasets in the third imbalanced dataset, allowing the pre-configured autoencoder to optimize its parameters based on a learning rate of 0.00001.
[0121] In one possible implementation, the minimum error is obtained based on the generated corresponding minority class dataset, the minority class dataset in the second imbalanced dataset after max-min normalization, and a preset number, including:
[0122] The corresponding minority class dataset generated based on the output dataset. The minority class dataset in the second imbalanced dataset, after undergoing max-min normalization, and the preset number n, are defined using the following formula:
[0123]
[0124] Get the minimum error
[0125] In this embodiment, training of the pre-configured autoencoder stops when the minimum error condition is met, and the pre-configured autoencoder at this point is used as the final autoencoder. In this embodiment, the minimum error condition refers to the minimum error obtained. It has remained stable at a certain value that is close to 0 but not zero, or fluctuates slightly around that value.
[0126] In this embodiment, a pre-configured autoencoder is trained by epochs on the minority class dataset in the third imbalanced dataset to obtain the final autoencoder. The corresponding minority class dataset generated by the final autoencoder represents all the features of the minority class dataset in the imbalanced dataset. This ensures that the input dataset of the network model to be trained not only achieves balance in the number of sample classes, but also represents all the data features of the business to be evaluated. This allows the pre-configured network model to fully learn the corresponding features of different class samples of the business to be evaluated, improving the accuracy of the evaluation results of the pre-configured network model for the business to be evaluated.
[0127] Figure 5 This is a schematic diagram illustrating the structure of an embodiment of a business evaluation device provided in this application. (Refer to...) Figure 5 The device 500 includes: an acquisition module 501, a processing module 502, a first training module 503, a second training module 504, and a verification module 505. The acquisition module 501 is used to acquire data of the business to be evaluated; the processing module 502 is used to evaluate the data of the business to be evaluated using a pre-configured mathematical model to obtain evaluation results.
[0128] The acquisition module 501 is also used to acquire a first imbalanced dataset related to the business to be evaluated; the first imbalanced dataset includes a minority class dataset and a majority class dataset; wherein, the minority class dataset includes a few data groups, the majority class dataset includes a majority of data groups, and each data group includes feature value data corresponding to the multidimensional features.
[0129] The processing module 502 is further configured to preprocess the first imbalanced dataset according to the missing data of the feature value data corresponding to each dimension in the minority class dataset and the majority class dataset, and the data type of the feature value data corresponding to each dimension, so as to obtain the second imbalanced dataset.
[0130] The processing module 502 is also used to perform max-min normalization on the feature value data corresponding to each dimension of the minority class dataset in the second imbalanced dataset, and to add white noise to the processed minority class dataset to obtain the third imbalanced dataset.
[0131] The first training module 503 is used to train a pre-configured autoencoder based on the minority class dataset in the third imbalanced dataset and a preset minimum error condition, so as to obtain the final autoencoder.
[0132] The processing module 502 is also used to balance the third imbalanced dataset according to the final autoencoder to obtain a balanced dataset, and to restore the feature value data corresponding to each dimension of the minority class dataset in the balanced dataset to obtain the dataset to be input.
[0133] The second training module 504 is used to train the mathematical model to be trained based on the input dataset in order to obtain a pre-configured mathematical model.
[0134] Optionally, the processing module 502 is specifically used to obtain, for each feature dimension, the first missing rate of the feature value data corresponding to the feature in the minority class dataset and the second missing rate of the feature value data corresponding to the feature in the majority class dataset, and delete the feature and the feature value data corresponding to the feature in the first imbalanced dataset when both the first missing rate and the second missing rate are greater than a preset missing threshold.
[0135] The processing module 502 is specifically used to determine whether there are missing feature values in the minority class dataset for each dimension of the retained feature when the data type of the feature value corresponding to the retained feature in the first imbalanced dataset is character type. If there are missing features, the mode is determined from the non-missing feature value data of the retained feature in the minority class dataset and added to the corresponding position where the feature value data of the retained feature is missing.
[0136] The processing module 502 is specifically used to determine whether there are missing feature value data corresponding to the retained feature in the majority class dataset for each dimension of the retained feature when the feature value data corresponding to the retained feature is of the character type. If there are missing data, the mode is determined from the non-missing feature value data corresponding to the retained feature in the majority class dataset and the mode is added to the corresponding position where the feature value data of the retained feature is missing.
[0137] The processing module 502 is specifically used to determine whether there are missing feature value data corresponding to the retained feature in the minority class dataset for each dimension of the retained feature when the data type of the feature value corresponding to the retained feature is non-character type. If there are missing data, the average value is determined from the non-missing feature value data corresponding to the retained feature in the minority class dataset, and the average value is added to the corresponding position where the feature value data of the retained feature is missing.
[0138] The processing module 502 is specifically used to determine whether there are missing feature value data corresponding to the retained feature in the majority class dataset for each dimension of the retained feature when the data type of the feature value corresponding to the retained feature is non-character type. If there are missing data, the average value is determined from the non-missing feature value data corresponding to the retained feature in the majority class dataset, and the average value is added to the corresponding position where the feature value data of the retained feature is missing.
[0139] The processing module 502 is specifically used to perform dummy encoding on the feature value data corresponding to the retained feature when the data type of the feature value corresponding to the retained feature is character type, so as to obtain the second imbalanced dataset.
[0140] Optionally, the first training module 503 is specifically used to extract a preset number of data groups from the minority class dataset in the third imbalanced dataset in batches, and input the data groups into a pre-configured autoencoder for training to obtain the corresponding minority class dataset. Based on the generated corresponding minority class dataset, the dataset after the minority class dataset in the second imbalanced dataset has undergone max-min normalization processing, and the preset number, the minimum error is obtained.
[0141] The first training module 503 is specifically used to stop training the pre-configured autoencoder when the minimum error meets the preset minimum error condition, and to use the pre-configured autoencoder at this time as the final autoencoder.
[0142] Optionally, module 501 is used to obtain the corresponding minority class dataset. The minority class dataset in the second imbalanced dataset, after undergoing max-min normalization, and the preset number n, are defined using the following formula:
[0143]
[0144] Get the minimum error
[0145] Additionally, optionally, a testing module 505 is included, used to perform a KS test on the features of the minority class dataset in the balanced dataset and the corresponding features in the dataset of the minority class dataset in the second imbalanced dataset after the minus-max normalization process for each feature dimension, and to obtain the test value for each feature dimension.
[0146] The acquisition module 501 is also used to perform feature value data restoration processing on the minority class dataset in the balanced dataset for each feature if the test corresponding to each feature dimension is greater than 0.01, so as to obtain the dataset to be input.
[0147] The acquisition module 501 is also used to delete features in the balanced dataset if there are features with a test value less than or equal to 0.01, so as to obtain an updated balanced dataset.
[0148] The acquisition module 501 is also used to restore the feature value data of each dimension of the minority class dataset in the updated balanced dataset to obtain the dataset to be input.
[0149] The business evaluation device provided in this application embodiment can be used to implement the technical solutions in any of the foregoing method embodiments. Its implementation principle and technical effect are similar, and will not be repeated here.
[0150] Figure 6 This is a schematic diagram illustrating the structure of an embodiment of an electronic device provided in this application. (Refer to...) Figure 6 The electronic device 600 includes a memory 601, a processor 602, and a communication interface 603. The memory 601 stores executable instructions from the processor.
[0151] The processor 602 is configured to execute any of the foregoing method embodiments by executing executable instructions.
[0152] Optionally, the memory 601 can be either independent or integrated with the processor 602. When the memory 601 is configured independently, the electronic device 600 also includes a bus for connecting the memory 601 and the processor 602.
[0153] The electronic device provided in this application can be used to execute the technical solutions in any of the foregoing method embodiments. Its implementation principle and technical effect are similar, and will not be repeated here.
[0154] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the technical solutions provided in any of the foregoing method embodiments.
[0155] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0156] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. An electronic device, characterized in that, Includes a processor and a memory for storing computer programs for the processor; The processor is configured as follows: Obtain data on the business to be evaluated; A pre-configured mathematical model is used to evaluate the data of the business to be evaluated in order to obtain the evaluation results; The pre-configured mathematical model is obtained in the following way: Obtain a first imbalanced dataset related to the business to be evaluated; the first imbalanced dataset includes a minority class dataset and a majority class dataset; wherein, the minority class dataset includes a few data groups, and the majority class dataset includes a majority of data groups, each data group including feature value data corresponding to a multidimensional feature; wherein, the data in the first imbalanced dataset is related to the car sales business, the minority class dataset includes data of users who have purchased cars, and the majority class dataset includes data of users who have not purchased cars; both the minority class dataset and the majority class dataset contain multiple data groups, the number of data groups in the minority class dataset is much smaller than the number of data groups in the majority class dataset; a data group consists of multiple feature value data corresponding to the multidimensional features of each user, the multidimensional features of the user include basic features; the basic features include the user's age and the frequency of access to car-related applications; Based on the missing value data of each feature in the minority class dataset and the majority class dataset, and the data type of the feature value data of each feature, the missing value processing is performed on the minority class dataset and the majority class dataset in the first imbalanced dataset to obtain the second imbalanced dataset. The feature values corresponding to each feature in the minority class dataset of the second imbalanced dataset are subjected to min-max normalization, and white noise is added to the processed minority class dataset to obtain the third imbalanced dataset. Based on the minority class dataset in the third imbalanced dataset and the preset minimum error condition, the pre-configured autoencoder is trained to obtain the final autoencoder. Based on the final autoencoder, the third imbalanced dataset is balanced to obtain a balanced dataset. For each feature dimension, the features of the minority class dataset in the balanced dataset are compared with the corresponding features in the dataset of the minority class dataset in the second imbalanced dataset after min-max normalization. The test value of each feature dimension is obtained. If the test value of each feature dimension is greater than 0.01, the feature value data of each feature dimension in the minority class dataset in the balanced dataset is restored to obtain the dataset to be input. If there is a feature with a test value less than or equal to 0.01, the feature is deleted from the balanced dataset to obtain an updated balanced dataset. The feature value data of each feature dimension in the minority class dataset in the updated balanced dataset is restored to obtain the dataset to be input. Based on the input dataset, the mathematical model to be trained is trained to obtain the pre-configured mathematical model, wherein the pre-configured data model is used to predict users' car purchase intentions based on the acquired user data related to car sales business.
2. The electronic device according to claim 1, characterized in that, The step of processing missing values in the minority and majority class datasets of the first imbalanced dataset according to the missing data of the feature value data corresponding to each feature dimension in the minority and majority class datasets, and the data type of the feature value data corresponding to each feature dimension, to obtain the second imbalanced dataset, includes: For each feature dimension, the first missing rate of the feature value data corresponding to the feature in the minority class dataset and the second missing rate of the feature value data corresponding to the feature in the majority class dataset are obtained respectively. When both the first missing rate and the second missing rate are greater than a preset missing threshold, the feature and the feature value data corresponding to the feature are deleted in the first imbalanced dataset. When the data type of the feature value corresponding to the retained feature in the first imbalanced dataset is character type, for each dimension of the retained feature, it is determined whether there are missing feature value data corresponding to the retained feature in the minority class dataset. If there are missing features, the mode is determined from the non-missing feature value data corresponding to the retained feature in the minority class dataset, and the mode is added to the corresponding position where the feature value data of the retained feature is missing. When the data type of the feature value corresponding to the retained feature is character type, for each dimension of the retained feature, it is determined whether there are missing feature value data corresponding to the retained feature in the majority class dataset. If there are missing data, the mode is determined from the non-missing feature value data corresponding to the retained feature in the majority class dataset, and the mode is added to the corresponding position where the retained feature has missing feature value data. When the data type of the feature value corresponding to the retained feature is non-character type, for each dimension of the retained feature, it is determined whether there are missing feature value data corresponding to the retained feature in the minority class dataset. If there are missing data, the average value is determined from the non-missing feature value data corresponding to the retained feature in the minority class dataset, and the average value is added to the corresponding position where the retained feature has missing feature value data. When the data type of the feature value corresponding to the retained feature is non-character type, for each dimension of the retained feature, it is determined whether there are missing feature value data corresponding to the retained feature in the majority class dataset. If there are missing data, the average value is determined from the non-missing feature value data corresponding to the retained feature in the majority class dataset, and the average value is added to the corresponding position where the retained feature has missing feature value data. When the data type of the feature value corresponding to the retained feature is character type, dummy encoding is performed on the feature value data corresponding to the retained feature to obtain the second imbalanced dataset.
3. The electronic device according to claim 1 or 2, characterized in that, The step of training a pre-configured autoencoder based on the minority class dataset in the third imbalanced dataset and a preset minimum error condition to obtain the final autoencoder includes: A predetermined number of data groups are extracted from the minority class dataset in the third imbalanced dataset in batches, and the data groups are input into a pre-configured autoencoder for training to obtain the corresponding minority class dataset. The minimum error is obtained based on the generated corresponding minority class dataset, the dataset of the minority class dataset in the second imbalanced dataset after undergoing max-min normalization, and the predetermined number. When the minimum error meets the preset minimum error condition, training of the pre-configured autoencoder is stopped, and the pre-configured autoencoder at this time is taken as the final autoencoder.
4. The electronic device according to claim 3, characterized in that, The step of obtaining the minimum error based on the generated corresponding minority class dataset, the minority class dataset in the second imbalanced dataset after undergoing max-min normalization, and the preset number includes: Based on the generated corresponding minority class dataset The second imbalanced dataset is the minority class dataset after undergoing max-min normalization. and the preset quantity The following formula is used: Get the minimum error .
5. A business evaluation device, characterized in that, include: The acquisition module is used to acquire data from the business to be evaluated. The processing module is used to evaluate the data of the business to be evaluated using a pre-configured mathematical model in order to obtain the evaluation result. The acquisition module is further configured to acquire a first imbalanced dataset related to the business to be evaluated; the first imbalanced dataset includes a minority class dataset and a majority class dataset; wherein, the minority class dataset includes a few data groups, and the majority class dataset includes a majority of data groups, each data group including feature value data corresponding to its multidimensional features; wherein, the data in the first imbalanced dataset is related to the car sales business, the minority class dataset includes data of users who have purchased cars, and the majority class dataset includes data of users who have not purchased cars; both the minority class dataset and the majority class dataset contain multiple data groups, the number of data groups in the minority class dataset is much smaller than the number of data groups in the majority class dataset; a data group consists of multiple feature value data corresponding to the multidimensional features of each user, the multidimensional features of the user include basic features; the basic features include the user's age and the frequency of access to car-related applications; The processing module is further configured to perform missing value processing on the minority class dataset and the majority class dataset in the first imbalanced dataset according to the missing status of the feature value data corresponding to each feature in the minority class dataset and the majority class dataset, and the data type of the feature value data corresponding to each feature, so as to obtain a second imbalanced dataset. The processing module is further configured to perform max-min normalization processing on the feature value data corresponding to each dimension of the minority class dataset in the second imbalanced dataset, and add white noise to the processed minority class dataset to obtain a third imbalanced dataset. The first training module is used to train a pre-configured autoencoder based on the minority class dataset in the third imbalanced dataset and a preset minimum error condition, so as to obtain the final autoencoder. The processing module is further configured to balance the third imbalanced dataset according to the final autoencoder to obtain a balanced dataset; for each feature dimension, perform a KS test on the features of the minority class dataset in the balanced dataset and the corresponding features in the dataset of the minority class dataset in the second imbalanced dataset after max-min normalization to obtain the test value of each feature dimension; if the test value of each feature dimension is greater than 0.01, then the feature value data of each feature dimension of the minority class dataset in the balanced dataset is restored to obtain the dataset to be input; if there is a feature with a test value less than or equal to 0.01, then the feature is deleted from the balanced dataset to obtain an updated balanced dataset; and the feature value data of each feature dimension of the minority class dataset in the updated balanced dataset is restored to obtain the dataset to be input. The second training module is used to train the mathematical model to be trained based on the input dataset to obtain the pre-configured mathematical model, wherein the pre-configured data model is used to predict users' car purchase intentions based on the user data related to car sales business obtained.
6. The apparatus according to claim 5, characterized in that: The processing module is specifically used to obtain, for each feature dimension, the first missing rate of the feature value data corresponding to the feature in the minority class dataset and the second missing rate of the feature value data corresponding to the feature in the majority class dataset, and delete the feature and the feature value data corresponding to the feature in the first imbalanced dataset when both the first missing rate and the second missing rate are greater than a preset missing threshold. The processing module is specifically used to determine whether there are missing feature value data corresponding to the retained feature in the minority class dataset for each dimension of the retained feature when the feature value data corresponding to the retained feature in the first imbalanced dataset is of character type. If there are missing features, the mode is determined from the non-missing feature value data corresponding to the retained feature in the minority class dataset, and the mode is added to the corresponding position where the feature value data of the retained feature is missing. The processing module is specifically used to determine whether there are missing feature value data corresponding to the retained feature in the majority class dataset for each dimension of the retained feature when the feature value data corresponding to the retained feature is of character type. If there are missing features, the mode is determined from the non-missing feature value data corresponding to the retained feature in the majority class dataset, and the mode is added to the corresponding position where the feature value data of the retained feature is missing. The processing module is specifically used to determine whether there are missing feature value data corresponding to the retained feature in the minority class dataset for each dimension of the retained feature when the feature value data corresponding to the retained feature is of non-character type. If there are missing features, the average value is determined from the non-missing feature value data corresponding to the retained feature in the minority class dataset, and the average value is added to the corresponding position where the feature value data of the retained feature is missing. The processing module is specifically used to determine whether there are missing feature value data corresponding to the retained feature in the majority class dataset for each dimension of the retained feature when the feature value data corresponding to the retained feature is of non-character type. If there are missing data, the average value is determined from the non-missing feature value data corresponding to the retained feature in the majority class dataset, and the average value is added to the corresponding position where the feature value data of the retained feature is missing. The processing module is specifically used to perform dummy encoding on the feature value data corresponding to the retained feature when the data type of the feature value corresponding to the retained feature is character type, so as to obtain a second imbalanced dataset.
7. The apparatus according to claim 5 or 6, characterized in that: The first training module is specifically used to extract a preset number of data groups from the minority class dataset in the third imbalanced dataset in batches, and input the data groups into a pre-configured autoencoder for training to obtain the corresponding minority class dataset generated, and obtain the minimum error based on the corresponding minority class dataset generated, the minority class dataset in the second imbalanced dataset after undergoing max-min normalization processing, and the preset number. The first training module is specifically used to stop training the pre-configured autoencoder when the minimum error meets the preset minimum error condition, and to use the pre-configured autoencoder at this time as the final autoencoder.
8. The apparatus according to claim 7, characterized in that: The acquisition module is specifically used to obtain the corresponding minority class dataset generated by the module. The second imbalanced dataset is the minority class dataset after undergoing max-min normalization. and the preset quantity The following formula is used: Get the minimum error .
Citation Information
Patent Citations
Network intrusion detection method based on conditional variation auto-encoder
CN111967502A