Business data set generation method, business prediction method, device and electronic equipment

By generating a target synthetic core dataset from imbalanced business data, and using a kernel guide point framework and Focal Loss to optimize the objective function, the problem of low prediction accuracy and inefficiency in existing technologies is solved, achieving efficient and accurate minority class event recognition and model training.

CN122471040APending Publication Date: 2026-07-28BEIJING JIZHI DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610603654.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-30
Publication Date
2026-07-28

AI Technical Summary

Technical Problem

Existing technologies suffer from low prediction accuracy, low efficiency, and high computational resource consumption when processing business data with imbalanced categories. This is especially true in dynamic pricing models for the long-term rental apartment industry, where the ability to identify critical minority events is poor, the model training process consumes a lot of computational resources, and the generated synthetic samples may introduce noise, affecting the robustness of the model.

Method used

By acquiring multi-dimensional raw business training data, preprocessing it, generating an initial synthetic core dataset in the same feature space, constructing a regression prediction model for training loss calculation, and generating a target synthetic core dataset through gradient updates, the objective function is optimized using a kernel guide point framework and Focal Loss to optimize the synthetic dataset, retain key minority class information, and reduce the data size.

Benefits of technology

It improves the prediction accuracy of the context learning model for minority class data, enhances model training efficiency, reduces computational resource consumption, and strengthens the model's generalization ability and performance stability on real-world data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122471040A_ABST
    Figure CN122471040A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of machine learning and data processing, and discloses a business data set generation method, a business prediction method and device, and electronic equipment. The business data set generation method comprises the following steps: obtaining multi-dimensional original business training data, and preprocessing the multi-dimensional original business training data to obtain an original training data set; in the same feature space as the original training data set, an initial synthetic core data set associated with the original training data set is randomly generated; a regression prediction model is constructed based on the initial synthetic core data set, and regression prediction is performed on the original training data set based on the regression prediction model to obtain a training loss of the original training data set; and the initial synthetic core data set is updated based on the training loss of the original training data set to obtain a target synthetic core data set. The method can greatly reduce the size of the training data while retaining key minority class information, and improve the model training efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of machine learning and data processing technology, and in particular to a method for generating business datasets, a business prediction method, an apparatus, and an electronic device. Background Technology

[0002] In modern business decision-making, data-driven predictive models play a crucial role. For example, in the long-term rental apartment industry, dynamic pricing models need to be built based on massive amounts of business data to predict future price trends. However, a typical characteristic of such predictive tasks is the severe class imbalance in the data. This data characteristic leads to problems such as low prediction accuracy and inefficiency when predictive models perform business-related forecasting tasks. Summary of the Invention

[0003] The embodiments of this application aim to at least partially address one of the technical problems in the related art. To this end, embodiments of this application propose a business dataset generation method, a business forecasting method, an apparatus, and an electronic device.

[0004] The embodiments of this application provide a method for generating a business dataset, which is applied to a context learning model. The method includes: acquiring multi-dimensional original business training data and preprocessing the multi-dimensional original business training data to obtain an original training dataset; randomly generating an initial synthetic core dataset associated with the original training dataset in the same feature space as the original training dataset; constructing a regression prediction model based on the initial synthetic core dataset, and performing regression prediction on the original training dataset based on the regression prediction model to obtain the training loss of the original training dataset; and updating the initial synthetic core dataset using gradients according to the training loss of the original training dataset to obtain a target synthetic core dataset.

[0005] In some implementations, the initial synthetic core dataset is updated with gradients based on the training loss of the original training dataset to obtain the target synthetic core dataset. This includes: calculating the gradient of the training loss of the original training dataset relative to each value in the initial synthetic core dataset using a backpropagation algorithm; and fine-tuning the feature values ​​and label values ​​in the initial synthetic core dataset based on the gradient of each value to obtain the target synthetic core dataset.

[0006] In some implementations, the training loss of the original training dataset is obtained by performing regression prediction on the original training dataset based on a regression prediction model, including: arbitrarily extracting a single batch of test data from the original training dataset based on a preset number of iterations; performing iterative prediction on the single batch of test data through the regression prediction model to obtain the prediction result; and determining the training loss of the original training dataset based on the prediction result.

[0007] In some implementations, the training loss of the original training dataset is determined based on the prediction results, including: calculating the loss between the prediction results and the corresponding true labels based on the prediction focus parameter and the class weight parameter, thereby obtaining the training loss of the original training dataset, wherein the class weight parameter is associated with the test sample class.

[0008] In some implementations, the training loss of the original training dataset is obtained by calculating the loss between the prediction result and the corresponding true label based on the prediction focus parameter and the class weight parameter, using the following formula:

[0009] in, This represents the predicted probability of the regression prediction model for the class of the test sample. Indicates the predicted focusing parameters, This represents the category weight parameter.

[0010] In some implementations, the multi-dimensional original business training data is preprocessed to obtain the original training dataset, including: cleaning the multi-dimensional original business training data and generating derived features based on the cleaned multi-dimensional original business training data; performing feature partitioning on at least one of the multi-dimensional original business training data and derived features to obtain categorical features and numerical features; and standardizing the categorical features and numerical features to obtain the original training dataset.

[0011] The embodiments of this application provide a business prediction method, which includes: acquiring a target synthetic core dataset and business data to be predicted, wherein the target synthetic core dataset is generated according to the method of any of the above embodiments; inputting the target synthetic core dataset and the business data to be predicted into a context learning model, and using the context learning model to analyze the target synthetic core dataset to predict the business data to be predicted, thereby obtaining a business prediction result.

[0012] The embodiments of this application provide a business dataset generation apparatus, wherein the business dataset is applied to a context learning model. The apparatus includes: a processing module for acquiring multi-dimensional original business training data and preprocessing the multi-dimensional original business training data to obtain an original training dataset; a generation module for randomly generating an initial synthetic core dataset associated with the original training dataset in the same feature space as the original training dataset; a first prediction module for constructing a regression prediction model based on the initial synthetic core dataset and performing regression prediction on the original training dataset based on the regression prediction model to obtain the training loss of the original training dataset; and an update module for performing gradient update on the initial synthetic core dataset according to the training loss of the original training dataset to obtain a target synthetic core dataset.

[0013] The embodiments of this application provide a business prediction apparatus, the apparatus comprising: an acquisition module, configured to acquire a target synthetic core dataset and business data to be predicted, wherein the target synthetic core dataset is generated according to the aforementioned business dataset generation device; and a second prediction module, configured to input the target synthetic core dataset and the business data to be predicted into a context learning model, and to analyze the target synthetic core dataset through the context learning model to predict the business data to be predicted, thereby obtaining a business prediction result.

[0014] The embodiments of this application provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method of any of the above embodiments.

[0015] Embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method of any of the above embodiments. Attached Figure Description

[0016] Figure 1 A flowchart illustrating the business dataset generation method provided in this application's implementation; Figure 2 A flowchart illustrating the business forecasting method provided in this application embodiment; Figure 3 A schematic diagram illustrating the principle of the business dataset generation and business prediction system provided for the implementation of this application; Figure 4 A schematic diagram of a business dataset generation apparatus provided for embodiments of this application; Figure 5 A schematic diagram of a business forecasting apparatus provided for an embodiment of this application; Figure 6 A block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0017] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0018] In modern business decision-making, data-driven predictive models play a crucial role. For example, in the long-term rental apartment industry, dynamic pricing models need to be built based on massive amounts of operational, market, and tenant data to predict future price trends. However, a typical characteristic of such predictive tasks is severe data imbalance. Taking pricing as an example, the number of days with stable prices far exceeds the number of days with significant price changes; "increases" and "decreases" are minority categories, while "stable" is generally the majority. This data characteristic poses a significant technical challenge to building high-precision, high-efficiency predictive models, and also leads to problems such as low prediction accuracy and inefficiency when these models perform business-related predictive tasks.

[0019] One technique employs a process of "data preprocessing + standard model training". The specific steps are as follows: Step 1: Data Preparation and Feature Engineering. Collect raw tabular data containing multiple dimensions such as operations and marketing, perform data cleaning, imputation of missing values, and construct derived features.

[0020] Step Two: Handling Class Imbalance. To address the class imbalance problem of the target variable, a sample-level processing technique is employed, the most common being SMOTE (Synthetic Minority Oversampling). The SMOTE algorithm finds the K nearest neighbors for each minority class sample, then randomly selects one neighbor and randomly generates a new synthetic sample along the line connecting that sample and the selected neighbor. This increases the number of minority class samples to achieve class distribution balance.

[0021] Step 3: Model Training. The complete dataset, which has been processed by SMOTE and has relatively balanced classes, is directly input into a standard machine learning classifier (such as XGBoost, LightGBM, or TabNet, several gradient boosting frameworks) for training.

[0022] Step 4: Model Deployment and Prediction. Deploy the trained model online to classify and predict new, unseen data.

[0023] However, the above-mentioned technical solutions have the following drawbacks in practical applications: 1. There is model learning bias, which reduces the prediction accuracy for key minority events.

[0024] Analysis of the cause: The core flaw of existing technologies lies in the fact that, although methods such as SMOTE balance the dataset in terms of quantity, they generate samples through a "mechanical" linear interpolation. The synthetic samples generated in this way may not possess the complex data patterns inherent in real minority class samples, and may even generate "noise" samples that are at the decision boundary and whose features are meaningless.

[0025] The derivation shows that when the model is trained on these large-scale, balanced datasets containing a lot of artificial noise, its learning process is easily misled and it is difficult to capture the inherent patterns of the real minority class samples. Therefore, although the final model performs reasonably well on balanced datasets, its accuracy in identifying key minority classes (such as price "rise" or "fall") remains very low when making predictions on real, unseen, and still imbalanced data.

[0026] 2. This results in high computational resource consumption and low iteration efficiency during model training.

[0027] Cause analysis: Existing technical solutions not only fail to reduce the size of the dataset, but also further increase the total number of samples in the training dataset through oversampling techniques (such as SMOTE).

[0028] The derivation shows that directly training this massive, even amplified, dataset using a complex deep learning model (such as TabNet) would undoubtedly result in enormous computational overhead and lengthy training times. Therefore, this approach makes model tuning and rapid iteration extremely difficult, reducing overall R&D efficiency.

[0029] Specifically, existing technologies for classification prediction using machine learning models when processing tabular data with severe class imbalance have the following problems: 1. Low prediction accuracy for minority class events: In business scenarios such as dynamic pricing, financial risk control, or fault diagnosis, the number of samples for critical events (such as price fluctuations, fraud, and malfunctions) is far less than the number of samples for regular events (stable prices, normal transactions, and normal operation). Existing technologies train models directly on the original imbalanced dataset, which leads to a severe bias towards the majority class, poor ability to identify critical minority class events, high false negative rates, missed business opportunities, or potential risks.

[0030] 2. The problem of high computational cost and low efficiency in model training: Real-world business datasets are usually huge, containing millions or even more records. Training and hyperparameter tuning on the full dataset using complex deep learning models (such as TabNet) or ensemble models requires a lot of computing resources (such as GPUs and memory) and time, which greatly prolongs the model development and iteration cycle.

[0031] 3. Traditional imbalance processing methods introduce noise and impair model robustness: Existing sample-level processing methods, such as SMOTE (Synthetic Minority Oversampling), generate new samples by performing linear interpolation in the feature space. This can easily produce fuzzy samples at the decision boundary or noisy samples that do not conform to the distribution of real data, thereby misleading model learning and reducing the model's generalization ability and performance stability on real-world data.

[0032] Therefore, this application proposes a business dataset generation method, business prediction method, device, and electronic device that can generate a target synthetic core dataset based on the original large-scale training data. This greatly reduces the size of the training data while retaining key minority class information, thereby improving the prediction accuracy of the context learning model for minority class data and increasing the model training efficiency.

[0033] In the technical solution of this application embodiment, firstly, multi-dimensional original business training data is acquired and preprocessed to obtain an original training dataset. Then, in the same feature space as the original training dataset, an initial synthetic core dataset associated with the original training dataset is randomly generated. Next, a regression prediction model is constructed based on the initial synthetic core dataset, and regression prediction is performed on the original training dataset based on the regression prediction model to obtain the training loss of the original training dataset. Finally, gradient updates are performed on the initial synthetic core dataset based on the training loss of the original training dataset to obtain the target synthetic core dataset. This method can generate a target synthetic core dataset based on the original large-scale training data, thereby greatly reducing the scale of the training data while retaining key minority class information, so as to improve the prediction accuracy of the context learning model for minority class data and improve the model training efficiency.

[0034] Figure 1 This is a flowchart illustrating a business dataset generation method provided for an embodiment of this application.

[0035] like Figure 1 As shown, the business dataset generation method 100 provided in this application embodiment applies the business dataset to the context learning model. Method 100 includes steps S110-S140 for example.

[0036] Step S110: Obtain multi-dimensional raw business training data and preprocess the multi-dimensional raw business training data to obtain the raw training dataset.

[0037] For example, the multi-dimensional raw business training data can be multi-dimensional business-related tabular data, such as tabular data containing multi-dimensional information such as historical operations, market, and tenants. Based on business needs, the acquired multi-dimensional raw business training data can be cleaned, and then business-related derived features (such as time series features) can be constructed based on the raw business training data. Data encoding and standardization processes can be performed, such as label encoding of categorical features in the dataset and standardization of numerical features, thereby obtaining the original training dataset. The original training dataset may contain a feature matrix. and multi-category tags .

[0038] Step S120: In the same feature space as the original training dataset, an initial synthetic core dataset associated with the original training dataset is randomly generated.

[0039] For example, based on the data features of the original training dataset, an initial synthetic core dataset associated with the original training dataset can be randomly initialized and generated in the same feature space as the original training dataset. The initial synthetic core dataset is used to represent the intrinsic feature patterns of the original training dataset and contains synthetic features X_synthetic and synthetic labels y_synthetic.

[0040] Step S130: Construct a regression prediction model based on the initial synthetic core dataset, and perform regression prediction on the original training dataset based on the regression prediction model to obtain the training loss of the original training dataset.

[0041] For example, a regression prediction model can be built on the current initial synthetic core dataset. This means the regression prediction model is trained using the initial synthetic core dataset. The regression prediction model can be a Kernel Ridge Regression (KRR) model for instantaneous training. Based on the trained regression prediction model, regression predictions are performed on the original training dataset to obtain the training loss for the original training dataset. The training loss can include the predicted results and the corresponding true labels (e.g., multi-class labels) in the original training dataset. The losses between ).

[0042] Step S140: Based on the training loss of the original training dataset, perform gradient updates on the initial synthetic core dataset to obtain the target synthetic core dataset.

[0043] For example, the training loss of the original training dataset can be calculated and converted into its gradient relative to each value in the initial synthetic core dataset, and then the gradient of the initial synthetic core dataset can be updated to obtain the optimized and updated target synthetic core dataset.

[0044] In the technical solution of this application embodiment, firstly, multi-dimensional original business training data is acquired and preprocessed to obtain an original training dataset. Then, in the same feature space as the original training dataset, an initial synthetic core dataset associated with the original training dataset is randomly generated. Next, a regression prediction model is constructed based on the initial synthetic core dataset, and regression prediction is performed on the original training dataset based on the regression prediction model to obtain the training loss of the original training dataset. Finally, gradient updates are performed on the initial synthetic core dataset based on the training loss of the original training dataset to obtain the target synthetic core dataset. This method can generate a target synthetic core dataset based on the original large-scale training data, thereby greatly reducing the scale of the training data while retaining key minority class information, so as to improve the prediction accuracy of the context learning model for minority class data and improve the model training efficiency.

[0045] The following section provides a detailed explanation of the process for generating the target synthesis core dataset.

[0046] For example, the original business training data of multiple dimensions is preprocessed to obtain the original training dataset. For example, firstly, the original business training data of multiple dimensions is cleaned and derived features are generated based on the cleaned original business training data of multiple dimensions; then, at least one of the original business training data of multiple dimensions and the derived features is segmented to obtain categorical features and numerical features; finally, the categorical features and numerical features are standardized to obtain the original training dataset.

[0047] Specifically, the multi-dimensional raw business training data can be large-scale raw training data, such as tabular data containing multi-dimensional information including historical operations, market, and tenants. Based on business needs, target variables can be generated from the multi-dimensional raw business training data, i.e., from a continuous value target (e.g., price_delta, price change) to a multi-category target variable (y_direction, price change direction). For example, a price change tolerance threshold can be defined, dividing price changes into three categories: "decline" (category 0), "stable" (category 1), and "increase" (category 2). Then, the raw data is cleaned, and derived features are constructed. These derived features include, but are not limited to, time series features and interaction features. Time series features include, for example, the occupancy rate of the past day, the average occupancy rate of the past 7 days, the average occupancy rate of the past 30 days, the maximum occupancy rate of the past 7 days, and the minimum occupancy rate of the past 7 days. Interaction features refer to generating new features through multiple basic features. For example, based on the project occupancy rate and the unit occupancy rate of the day, an occupancy rate interpolation feature can be generated: Occupancy rate = project occupancy rate - unit occupancy rate of the day. Next, the original data and derived features are subjected to feature segmentation and standardization. Specifically, categorical features (such as character-based features like the city where the project is located, apartment type, and type of business district) are labeled, and numerical features (such as rent and occupancy rate) are standardized to make them suitable for subsequent machine learning models. The preprocessed dataset, i.e., the original training dataset, contains the feature matrix. and multi-category tags .

[0048] In the technical solution of this application embodiment, the original business training data of multiple dimensions is first cleaned, and derived features are generated based on the cleaned original business training data of multiple dimensions. Then, at least one of the original business training data of multiple dimensions and the derived features is divided into categorical features and numerical features. Finally, the categorical features and numerical features are standardized to obtain the original training dataset. The original large-scale imbalanced data is preprocessed to be used for subsequent generation of target synthetic core dataset, thereby improving the training efficiency of the prediction model.

[0049] Then, the massive original training dataset is refined (distilled) into a small but highly information-dense target synthetic core dataset. This synthetic core dataset can fully represent the inherent patterns of the original data, especially in preserving and enhancing information from minority class samples. A framework based on kernel inducing points (KIPs) can be adopted, using Focal Loss with multi-class weight vectors as its optimization objective function, as explained below.

[0050] First, the synthetic dataset is initialized. This involves randomly initializing a very small initial synthetic core dataset (e.g., 500 samples) within the same feature space as the original data (original training dataset), containing synthetic features X_synthetic and synthetic labels y_synthetic. Then, optimization learning is performed on each value in this synthetic dataset.

[0051] For example, the training loss of the original training dataset is obtained by performing regression prediction on the original training dataset based on the regression prediction model. For example, firstly, a single batch of test data is arbitrarily extracted from the original training dataset based on a preset number of iterations; then, the single batch of test data is iteratively predicted by the regression prediction model to obtain the prediction result; finally, the training loss of the original training dataset is determined based on the prediction result.

[0052] Specifically, within a preset number of iterations, a Kernel Ridge Regression (KRR) model can be built by training on the current initial synthetic core dataset. This model can be instantaneously trained on the initial synthetic core dataset and capture complex nonlinear relationships in the data. Using this model, predictions are made on a batch of data in the original training dataset; that is, completing the prediction of a batch of data represents completing one iteration, obtaining the prediction results (logits). Then, the loss between the prediction results of this batch of data and the true label is calculated to determine the training loss of the original training dataset.

[0053] In the technical solution of this application embodiment, firstly, based on a preset number of iterations, a single batch of test data is arbitrarily extracted from the original training dataset. Then, the single batch of test data is iteratively predicted using a regression prediction model to obtain the prediction result. Finally, based on the prediction result, the training loss of the original training dataset is determined, and the initial synthetic core dataset is optimized based on the training loss. This systematically solves the problems of low accuracy and poor efficiency caused by directly training the model on the original imbalanced, large-scale dataset.

[0054] For example, based on the prediction results, the training loss of the original training dataset is determined. For instance, based on the prediction focus parameter and the class weight parameter, the loss between the prediction results and the corresponding true labels is calculated to obtain the training loss of the original training dataset, wherein the class weight parameter is associated with the test sample class.

[0055] Specifically, based on the prediction results obtained by the regression prediction model on the original training dataset in each iteration, the loss between the prediction results and the true labels is calculated. Compared with the mean squared error or cross-entropy loss used in traditional techniques, this application adopts Focal Loss (focus loss function) based on the prediction focus parameter and class weight parameter to handle sample class imbalance.

[0056] For example, based on the prediction focus parameter and the class weight parameter, the loss between the prediction result and the corresponding true label is calculated to obtain the training loss Focal Loss of the original training dataset, which is calculated by the following formula (1): (1) in, This represents the predicted probability of the regression prediction model for the class of the test sample. Indicate the predicted focusing parameters (e.g.) ), is a constant greater than 0. When When the value is small (i.e., the model misclassifies the sample or lacks confidence). A larger factor amplifies the loss of that sample; conversely, when... When the factor is large (the model is confident in classifying the sample, which is usually a simple majority class sample), it approaches 0, thus suppressing the loss of that sample and forcing the entire optimization process to focus on learning the minority class samples that are difficult to distinguish. The category weight parameter, unlike existing technologies, is represented in this application. It is a configurable weight vector with a length equal to the number of categories (e.g., for "decline, flat, rise", it can be configured as follows). ), The value is selected from the vector based on the true class of the sample, thus enabling different, asymmetric importances to be assigned to different minority classes (such as "fall" and "rise") based on prior business knowledge, achieving more refined control over class imbalance.

[0057] In the technical solution of this application embodiment, based on the prediction focus parameter and the class weight parameter, the loss between the prediction result and the corresponding true label is calculated to obtain the training loss of the original training dataset. On the one hand, the Focal Loss function, which is specifically used to solve the class imbalance problem, is innovatively used as the optimization objective function of the kernel guide point dataset distillation framework. The deep integration makes the information extraction process itself have the "intelligence" of focusing on the minority class, fundamentally solving the imbalance problem, rather than staying at the superficial processing of sample quantity as in the existing technology. On the other hand, Focal Loss has been improved by introducing a flexibly configurable weight vector with the same length as the number of classes, so that different importance weights can be assigned to different minority classes according to business needs, realizing a more refined adjustment and control of the class imbalance problem that is more in line with business logic.

[0058] For example, the initial synthetic core dataset is updated with gradients based on the training loss of the original training dataset to obtain the target synthetic core dataset. For instance, firstly, the gradient of the training loss of the original training dataset with respect to each value in the initial synthetic core dataset is calculated using the backpropagation algorithm; then, based on the gradient of each value, the feature values ​​and label values ​​in the initial synthetic core dataset are fine-tuned to obtain the target synthetic core dataset.

[0059] Specifically, the total loss calculated in the previous step is used to calculate its gradient relative to each value in the initial synthetic core dataset through the backpropagation algorithm. Then, an optimizer (such as Adam) is used to make a small update to the feature values ​​and label values ​​in the initial synthetic core dataset based on the gradient calculated in the previous step. After multiple rounds of iterative optimization, the target synthetic core dataset is finally obtained. The target synthetic core dataset is used for subsequent prediction model configuration and inference prediction.

[0060] In the technical solution of this application embodiment, the gradient of the training loss of the original training dataset relative to each value in the initial synthetic core dataset is first calculated using the backpropagation algorithm. Then, based on the gradient of each value, the feature values ​​and label values ​​in the initial synthetic core dataset are fine-tuned to obtain the target synthetic core dataset. A high-quality synthetic core dataset is generated by using the "class imbalance-aware adaptive dataset distillation" technique. The two-stage modeling method of using the core dataset to train the downstream deep learning model systematically solves the problems of low accuracy and poor efficiency caused by directly training the model on the original imbalanced, large-scale dataset.

[0061] Figure 2 A flowchart illustrating the business forecasting method provided in this application.

[0062] like Figure 2As shown, the business forecasting method 200 provided in this application includes, for example, steps S210-S220.

[0063] Step S210: Obtain the target synthetic core dataset and the business data to be predicted, wherein the target synthetic core dataset is generated according to the method of any of the above embodiments.

[0064] Step S220: Input the target synthetic core dataset and the business data to be predicted into the context learning model. Analyze the target synthetic core dataset through the context learning model to predict the business data to be predicted and obtain the business prediction result.

[0065] For example, the target synthetic core dataset generated by the above-mentioned business dataset generation method can be obtained, along with the business data to be predicted, wherein the business data to be predicted is related to business needs. Then, the target synthetic core dataset is provided as context to a pre-trained context learning model, such as the TabPFN model, or other deep network models. This step does not involve any modification or training of the internal parameters of the TabPFN model (i.e., no gradient update), but rather configures it as an "expert" for the current specific task. Thus, the business data to be predicted and the target synthetic core dataset as context are input into the configured TabPFN model. The model performs context learning, infers new data by analyzing sample patterns in the context, and finally outputs business prediction results, such as the prediction results for the direction of price changes ("decline", "stable", or "rise").

[0066] In the technical solution of this application embodiment, the target synthetic core dataset and the business data to be predicted are first obtained. Then, the target synthetic core dataset and the business data to be predicted are input into the context learning model. The context learning model analyzes the target synthetic core dataset to predict the business data to be predicted and obtains the business prediction result. By using the "class imbalance-aware adaptive dataset distillation" technology to generate a high-quality synthetic core dataset and then using the core dataset to train the downstream deep learning model, the two-stage modeling method systematically solves the problems of low accuracy and poor efficiency caused by directly training the model on the original imbalanced and large-scale dataset.

[0067] In one example, the business dataset generation method and business prediction method of this application can be executed based on a business dataset generation and prediction system. This system can preprocess the original large-scale imbalanced data and generate a high-quality target synthetic core dataset through a "class imbalance-aware adaptive dataset distillation module" to replace the original large-scale data for configuring and inferring a pre-trained context learning model. During the inference phase, the new data to be predicted is fed into the configured model along with the context, ultimately outputting the prediction result. The following describes the process in conjunction with... Figure 3 Detailed description.

[0068] Figure 3 A schematic diagram illustrating the principle of the business dataset generation and business prediction system provided for the implementation of this application.

[0069] like Figure 3 As shown, the business dataset generation and business forecasting system includes a data preprocessing module, a dataset distillation module, and a model configuration and inference module. Generating a business dataset and performing business forecasting through this system includes steps S301-S310.

[0070] S301 inputs raw, large-scale imbalanced data, i.e., multi-dimensional raw business training data, through the data preprocessing module.

[0071] S302 performs data preprocessing on the raw, large-scale imbalanced data.

[0072] S303 outputs the preprocessed dataset, yielding the original training dataset.

[0073] S304 initializes the synthetic dataset through the dataset distillation module to obtain the initial synthetic core dataset.

[0074] S305 involves iterative optimization of the initial synthetic core dataset, which involves performing kernel ridge regression prediction on the preprocessed dataset, calculating the Focal Loss (with class weights) between the prediction results and the true labels, and updating the gradient of the initial synthetic core dataset based on the loss.

[0075] S306, confirm whether the initial synthetic core dataset after gradient update has converged. If it has converged, proceed to step 307; otherwise, proceed to step S305.

[0076] S307 outputs the synthetic core dataset, i.e., the target synthetic core dataset.

[0077] S308, through the model configuration and inference module, configures a pre-trained model (e.g., TabPFN) based on the target synthetic core dataset, that is, uses the target synthetic core dataset as the context of the model.

[0078] S309, based on contextual information, performs model inference through new data input (business data to be predicted) and a configured prediction model (contextual learning model).

[0079] S210 outputs the configured prediction model and the prediction results for the new data.

[0080] Figure 4 A schematic diagram of a business dataset generation apparatus provided in an embodiment of this application.

[0081] like Figure 4 As shown, the business dataset is applied to the context learning model, and the business dataset generation device 400 includes: The processing module 410 is used to acquire multi-dimensional raw business training data and preprocess the multi-dimensional raw business training data to obtain the raw training dataset.

[0082] The generation module 420 is used to randomly generate an initial synthetic core dataset associated with the original training dataset in the same feature space as the original training dataset.

[0083] The first prediction module 430 is used to build a regression prediction model based on the initial synthetic core dataset, and to perform regression prediction on the original training dataset based on the regression prediction model to obtain the training loss of the original training dataset.

[0084] The update module 440 is used to perform gradient updates on the initial synthetic core dataset based on the training loss of the original training dataset to obtain the target synthetic core dataset.

[0085] For example, the update module 440 is further configured to: calculate the gradient of the training loss of the original training dataset relative to each value in the initial synthetic core dataset using the backpropagation algorithm; and fine-tune the feature values ​​and label values ​​in the initial synthetic core dataset according to the gradient of each value to obtain the target synthetic core dataset.

[0086] For example, the training loss of the original training dataset is obtained by performing regression prediction on the original training dataset based on the regression prediction model, including: arbitrarily extracting a single batch of test data from the original training dataset based on a preset number of iterations; performing iterative prediction on the single batch of test data through the regression prediction model to obtain the prediction result; and determining the training loss of the original training dataset based on the prediction result.

[0087] For example, based on the prediction results, the training loss of the original training dataset is determined by: calculating the loss between the prediction results and the corresponding true labels based on the prediction focus parameter and the class weight parameter, thereby obtaining the training loss of the original training dataset, wherein the class weight parameter is associated with the test sample class.

[0088] For example, based on the prediction focus parameter and the class weight parameter, the loss between the prediction result and the corresponding true label is calculated to obtain the training loss of the original training dataset, which is calculated using the following formula:

[0089] in, This represents the predicted probability of the regression prediction model for the class of the test sample. Indicates the predicted focusing parameters, This represents the category weight parameter.

[0090] For example, preprocessing multi-dimensional raw business training data to obtain a raw training dataset includes: cleaning the multi-dimensional raw business training data and generating derived features based on the cleaned multi-dimensional raw business training data; performing feature partitioning on at least one of the multi-dimensional raw business training data and derived features to obtain categorical features and numerical features; and standardizing the categorical features and numerical features to obtain the raw training dataset.

[0091] It is understood that the specific functions of the business dataset generation device 400 can be referred to the business dataset generation method above, and will not be repeated here.

[0092] Figure 5 A schematic diagram of a business forecasting apparatus provided for an embodiment of this application.

[0093] like Figure 5 As shown, the business forecasting device 500 includes: The acquisition module 510 is used to acquire the target synthetic core dataset and the business data to be predicted, wherein the target synthetic core dataset is generated according to the aforementioned business dataset generation device 400.

[0094] The second prediction module 520 is used to input the target synthetic core dataset and the business data to be predicted into the context learning model, and to analyze the target synthetic core dataset through the context learning model to predict the business data to be predicted, thereby obtaining the business prediction result.

[0095] It is understandable that the specific functions of the business forecasting device 500 can be referred to the business forecasting method above, and will not be repeated here.

[0096] This application provides an electronic device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the method described above.

[0097] This application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method in any of the above embodiments.

[0098] Figure 6 A block diagram of an electronic device provided in an embodiment of this application.

[0099] This application provides an electronic device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method in any of the above embodiments.

[0100] like Figure 6 As shown, for ease of understanding, an embodiment of this application illustrates a specific electronic device 600.

[0101] Electronic device 600 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic device 600 may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0102] like Figure 6 As shown, device 600 includes a computing unit 601, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 602 or a computer program loaded from storage unit 608 into random access memory (RAM) 603. RAM 603 may also store various programs and data required for the operation of electronic device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.

[0103] Multiple components in electronic device 600 are connected to I / O interface 606. These components include: input unit 606, such as a keyboard or mouse; output unit 607, such as various types of displays or speakers; storage unit 608, such as a disk or optical disk; and communication unit 609, such as a network interface card (NIC), modem, or wireless transceiver. Communication unit 609 allows electronic device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0104] The computing unit 601 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods described above. For example, in some embodiments, any one or more of the methods described above can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of any one or more of the methods described above can be performed. Alternatively, in other embodiments, the computing unit 601 can be configured to perform any one or more of the methods described above by any other suitable means (e.g., by means of firmware).

[0105] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this application, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0106] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0107] In the description of this application, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this application, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0108] In the description of this application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc., indicating the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.

[0109] Furthermore, the terms "first," "second," etc., used in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying relative importance, or implicitly specifying the number of technical features indicated in this embodiment. Therefore, features defined with terms such as "first" and "second" in the embodiments of this application can explicitly or implicitly indicate that the embodiment includes at least one of those features. In the description of this application, the word "multiple" means at least two or more, such as two, three, four, etc., unless otherwise explicitly and specifically defined in the embodiments.

[0110] In this application, unless otherwise explicitly specified or limited in the embodiments, the terms "installation," "connection," "joining," and "fixing" appearing in the embodiments should be interpreted broadly. For example, a connection can be a fixed connection, a detachable connection, or an integral part; it can also be a mechanical connection, an electrical connection, etc. Of course, it can also be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal communication between two components, or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific implementation.

[0111] In this application, unless otherwise expressly specified and limited, "above" or "below" the second feature can mean that the first feature is in direct contact with the second feature, or that the first feature is in indirect contact with the second feature through an intermediate medium. Furthermore, "above," "on top of," and "over" the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply that the first feature is at a lower horizontal level than the second feature.

Claims

1. A method for generating business datasets, characterized in that, The business dataset is applied to the context learning model, and the method includes: Obtain multi-dimensional raw business training data and preprocess the multi-dimensional raw business training data to obtain the raw training dataset; In the same feature space as the original training dataset, an initial synthetic core dataset associated with the original training dataset is randomly generated; A regression prediction model is constructed based on the initial synthetic core dataset, and regression prediction is performed on the original training dataset based on the regression prediction model to obtain the training loss of the original training dataset. Based on the training loss of the original training dataset, the initial synthetic core dataset is updated with gradients to obtain the target synthetic core dataset.

2. The business dataset generation method according to claim 1, characterized in that, The step of updating the initial synthetic core dataset using gradients based on the training loss of the original training dataset to obtain the target synthetic core dataset includes: The gradient of the training loss of the original training dataset with respect to each value in the initial synthetic core dataset is calculated using the backpropagation algorithm. Based on the gradient of each value, the feature values ​​and label values ​​in the initial synthetic core dataset are fine-tuned to obtain the target synthetic core dataset.

3. The business dataset generation method according to claim 1, characterized in that, The step of performing regression prediction on the original training dataset based on the regression prediction model to obtain the training loss of the original training dataset includes: Based on a preset number of iterations, a single batch of test data is arbitrarily extracted from the original training dataset; The regression prediction model is used to iteratively predict the single batch of test data to obtain the prediction results; Based on the prediction results, the training loss of the original training dataset is determined.

4. The business dataset generation method according to claim 3, characterized in that, Determining the training loss of the original training dataset based on the prediction results includes: Based on the prediction focus parameter and the category weight parameter, the loss between the prediction result and the corresponding true label is calculated to obtain the training loss of the original training dataset, wherein the category weight parameter is associated with the test sample category.

5. The business dataset generation method according to claim 4, characterized in that, The training loss of the original training dataset is obtained by calculating the loss between the prediction result and the corresponding true label based on the prediction focus parameter and the class weight parameter, using the following formula: in, This represents the predicted probability of the regression prediction model for the category of the test sample. Indicates the predicted focusing parameters, This represents the category weight parameter.

6. The method for generating a business dataset according to any one of claims 1-5, characterized in that, The preprocessing of the multi-dimensional original business training data to obtain the original training dataset includes: The original multi-dimensional business training data is cleaned and processed, and derived features are generated based on the cleaned original multi-dimensional business training data. The original business training data of the multi-dimensional nature and at least one of the derived features are divided into categorical features and numerical features. The classification features and the numerical features are standardized to obtain the original training dataset.

7. A business forecasting method, characterized in that, The method includes: Obtain the target synthetic core dataset and the business data to be predicted, wherein the target synthetic core dataset is generated by the method according to any one of claims 1-6; The target synthetic core dataset and the business data to be predicted are input into the context learning model. The context learning model analyzes the target synthetic core dataset to predict the business data to be predicted, and obtains the business prediction result.

8. A business dataset generation device, characterized in that, The business dataset is applied to the context learning model, and the device includes: The processing module is used to acquire multi-dimensional raw business training data and preprocess the multi-dimensional raw business training data to obtain the raw training dataset. The generation module is used to randomly generate an initial synthetic core dataset associated with the original training dataset in the same feature space as the original training dataset; The first prediction module is used to construct a regression prediction model based on the initial synthetic core dataset, and to perform regression prediction on the original training dataset based on the regression prediction model to obtain the training loss of the original training dataset. The update module is used to perform gradient updates on the initial synthetic core dataset based on the training loss of the original training dataset to obtain the target synthetic core dataset.

9. A business forecasting device, characterized in that, The device includes: The acquisition module is used to acquire the target synthetic core dataset and the business data to be predicted, wherein the target synthetic core dataset is generated by the device according to claim 8; The second prediction module is used to input the target synthetic core dataset and the business data to be predicted into the context learning model, and to use the context learning model to analyze the target synthetic core dataset to predict the business data to be predicted, thereby obtaining the business prediction result.

10. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-7.