Data prediction method and device, electronic equipment and storage medium
By combining diffusion models and time series prediction models, the problems of low efficiency in filling missing data and large error in multi-object time series prediction tasks are solved, and efficient and accurate data updates are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-03-13
AI Technical Summary
In existing technologies, the filling of missing data in multi-object time series prediction tasks is inefficient and results in large errors, especially in heterogeneous multi-object scenarios where it is difficult to accurately reconstruct the data.
The original conditional data is denoised using a diffusion model, and the prediction results are obtained by combining it with a temporal prediction model. The diffusion model is built based on some functional layers of the temporal prediction model, including a feature embedding layer, a temporal embedding layer, a heterogeneous graph embedding layer, a multi-head attention fusion layer, and an output layer, to handle missing and outlier parameters.
It improves the efficiency and accuracy of data filling and correction processes, and enables effective updating of real data in heterogeneous multi-object scenarios.
Smart Images

Figure CN121658792A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing and model calculation, and in particular to a data prediction method, apparatus, electronic device and storage medium. Background Technology
[0002] Time series forecasting is a predictive task that infers future trends by analyzing patterns or regularities in historical data. Because it transforms uncertainty into quantifiable action guidelines, it provides foresight for various tasks.
[0003] Multivariate time series prediction refers to the prediction task of using multiple interrelated time series variables to predict the future value of a single variable or the future state of multiple variables. In existing technologies, due to the diversity of input data types in multivariate time series prediction tasks, there are often missing data in historical data. This requires the use of missing value imputation methods, such as mean imputation, linear interpolation, or matrix factorization, to fill in the missing values in historical data and then obtain the predicted value based on the complete historical data.
[0004] However, this data interpolation method not only requires a lot of computation time, resulting in low data filling efficiency, but also often fails to accurately restore the actual value of the missing data. In particular, it is difficult to effectively recover the real data in heterogeneous scenarios with multiple objects, and the filling results have large errors. Summary of the Invention
[0005] This invention provides a data prediction method, apparatus, electronic device, and storage medium to address the problem of low accuracy in missing data filling results.
[0006] According to another aspect of the present invention, a data prediction method is provided, comprising:
[0007] In response to obtaining the original condition data, it is determined whether there are missing or abnormal parameters in the original condition data; wherein, the original condition data includes multiple heterogeneous known parameters;
[0008] If it is determined that there are missing or abnormal parameters in the original conditional data, the original conditional data is input into the trained diffusion model so that the diffusion model can be used to denoise the original conditional data.
[0009] The denoised original conditional data is input into a time series prediction model to obtain the prediction result of the original conditional data through the time series prediction model; wherein the prediction result includes multiple heterogeneous prediction parameters.
[0010] The diffusion model is constructed based on a portion of the functional layers of the time-series prediction model.
[0011] The temporal prediction model includes a feature embedding layer, a temporal embedding layer, a heterogeneous graph embedding layer, a first shared temporal embedding layer, a multi-head attention fusion layer, and a first output layer.
[0012] The data prediction method further includes: randomly selecting continuous time periods or intervals for each known parameter in the prediction training samples, and masking the parameter values of the continuous time periods or intervals to obtain diffusion training samples; inputting the diffusion training samples into the initial diffusion model, so as to obtain the trained diffusion model based on reverse denoising learning through the diffusion training samples.
[0013] The data prediction method further includes: using the feature embedding layer, the temporal embedding layer, and the heterogeneous graph embedding layer as transfer layers, and constructing an initial diffusion model based on the transfer layer, the second shared temporal embedding layer, and the second output layer; freezing the parameters of the transfer layer, and inputting the diffusion training samples into the initial diffusion model, so as to train the second shared temporal embedding layer and the second output layer through the diffusion training samples to obtain the trained diffusion model.
[0014] The data prediction method further includes: taking a portion of the functional layers in the time series prediction model as a migration layer based on the training time, deployment resource consumption, and denoising accuracy, so as to construct an initial diffusion model based on the migration layer.
[0015] According to another aspect of the present invention, a data prediction apparatus is provided, comprising:
[0016] The parameter judgment module is used to determine whether there are missing or abnormal parameters in the original condition data in response to the acquisition of the original condition data; wherein, the original condition data includes multiple heterogeneous known parameters;
[0017] The denoising execution module is used to input the original conditional data into the trained diffusion model if it is determined that there are missing or abnormal parameters in the original conditional data, so as to denoise the original conditional data through the diffusion model.
[0018] The prediction execution module is used to input the denoised original conditional data into the time series prediction model so as to obtain the prediction result of the original conditional data through the time series prediction model; wherein, the prediction result includes multiple heterogeneous prediction parameters.
[0019] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the data prediction method described in any embodiment of the present invention.
[0020] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the data prediction method described in any embodiment of the present invention.
[0021] According to another aspect of the present invention, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the data prediction method described in any embodiment of the present invention.
[0022] The technical solution of this invention, in response to obtaining the original conditional data, determines whether there are missing or abnormal parameters in the original conditional data; if it is determined that there are missing or abnormal parameters in the original conditional data, the original conditional data is input into a trained diffusion model to denoise the original conditional data; the denoised original conditional data is then input into a time-series prediction model to obtain the prediction result of the original conditional data. Thus, by using the trained diffusion model to denoise the original conditional data, not only is the computation time consumed in the data filling and correction process reduced, and the data update efficiency improved, but the accuracy of the data filling and correction results is also enhanced, achieving effective updating of real data in multi-object heterogeneous scenarios.
[0023] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 This is a flowchart of a data prediction method provided in Embodiment 1 of the present invention;
[0026] Figure 2This is a schematic diagram of the structure of a time series prediction model provided in Embodiment 1 of the present invention;
[0027] Figure 3 This is a schematic flowchart of a diffusion model acquisition process according to Embodiment 1 of the present invention;
[0028] Figure 4 This is a flowchart of another data prediction method provided in Embodiment 2 of the present invention;
[0029] Figure 5 This is a flowchart of another data prediction method provided in Embodiment 3 of the present invention;
[0030] Figure 6 This is a schematic diagram of the structure of a data prediction device according to Embodiment 4 of the present invention;
[0031] Figure 7 This is a schematic diagram of the structure of an electronic device that implements the data prediction method of this invention. Detailed Implementation
[0032] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0033] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention 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 the invention 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 a 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.
[0034] Example 1
[0035] Figure 1This is a flowchart of a data prediction method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where multiple heterogeneous known parameters in the original conditional data are denoised using a diffusion model. This method can be executed by a data prediction device, which can be implemented in hardware and / or software and can be configured in an electronic device (e.g., a server). Figure 1 As shown, the method includes:
[0036] S101. In response to obtaining the original condition data, determine whether there are missing parameters or abnormal parameters in the original condition data; wherein, the original condition data includes multiple heterogeneous known parameters.
[0037] Original conditional data refers to the known values of each parameter, which serve as known conditions for the parameter to be predicted; heterogeneous means that the known parameters come from at least two data sources, that is, at least two parameters have different data sources; data prediction is actually the process of predicting the parameter values of unknown parameters for a future period of time based on the numerical characteristics of the original conditional data; among them, the known parameters can include the historical parameter values of each parameter, or they can include the future parameter values of some parameters, that is, using the future parameter values of some parameters as specified conditions to predict the future parameter values of other parameters.
[0038] Taking the scenario of indoor space temperature and air conditioning by a fan coil air conditioning system as an example, based on the indoor environmental parameters and air conditioning system parameters of the past period (e.g., two days), and some indoor environmental parameters and air conditioning system parameters of the future period (e.g., one day), the values of another part of the indoor environmental parameters and some air conditioning system parameters for the future period are predicted. Taking a sampling period of 15 minutes as an example, a total of 192 sampling points were included in the past two days, and the indoor environmental parameters of each sampling point included time, indoor temperature, carbon dioxide concentration, and humidity. A total of 96 prediction points were included in the future day, and the time, number of people indoors, and fresh air volume of each prediction point were also known values.
[0039] Since a fan coil air conditioning system consists of a fan coil unit and a chilled water source, it achieves temperature regulation and purification of indoor air by circulating indoor air through chilled water coils. Therefore, the air conditioning system parameters include fan coil unit parameters and chilled water source parameters. Among them, the fan coil unit parameters at each sampling point can include time, operating status, water valve opening degree, speed, supply air temperature, return air temperature, inlet water temperature, outlet water temperature, and flow rate. The time, operating status, water valve opening degree, and speed at each prediction point are also known values.
[0040] The cold source parameters for each sampling point may include time, chilled water outlet temperature, chilled water recovery temperature, and chilled water flow rate; the time, chilled water outlet temperature, and chilled water flow rate for each prediction point are also known values; the indoor environmental parameters to be predicted may include the indoor temperature, carbon dioxide concentration, and humidity at the prediction point; the fan coil unit parameters to be predicted may include the supply air temperature, return air temperature, inlet water temperature, and outlet water temperature at the prediction point; the cold source parameters to be predicted may include the chilled water return temperature.
[0041] Missing parameters refer to parameters whose values are missing. Taking the above technical solution as an example, the known parameters should include indoor temperature values from 192 sampling points. However, if the number of indoor temperature values is less than 192 (i.e., the threshold number of sampling points), it can be determined that there is a missing parameter phenomenon in the indoor temperature data. Abnormal parameters refer to parameters whose values deviate from the preset threshold range and have significant differences from normal values. For example, for indoor temperature, normal room temperature is usually within the range of 0 degrees to 40 degrees above zero (i.e., the preset threshold range). If the indoor temperature of a certain sampling point in the known parameters is 50 degrees, it may be due to errors in the data collection, transmission and storage process, causing the value to deviate significantly from the normal range, and it can be determined that there is an abnormal parameter phenomenon in the indoor temperature.
[0042] S102. If it is determined that there are missing or abnormal parameters in the original conditional data, the original conditional data is input into the trained diffusion model so that the original conditional data can be denoised by the diffusion model.
[0043] The diffusion model is used to denoise input data by learning inversely from the neural network training process, thereby filling in missing values in the input data. The diffusion model is trained on a diffusion training set and the training results are evaluated using a pre-configured loss function. If the evaluation result meets the convergence requirements, the diffusion model is considered to have completed training. If the evaluation result does not meet the convergence requirements, training continues until the evaluation result meets the convergence requirements, at which point the trained diffusion model is obtained.
[0044] When missing or outlier parameters are identified in the original conditional data, if outlier parameters are present, they are removed and treated as missing parameters. The original conditional data containing these missing parameters is then input into the trained diffusion model. If only missing parameters exist, the original conditional data is directly input into the trained diffusion model to obtain high-fidelity time-series data, thus ensuring the completeness and accuracy of the original conditional data. If no missing or outlier parameters exist, the data can be directly input into the time-series prediction model.
[0045] S103. Input the denoised original conditional data into the time series prediction model to obtain the prediction result of the original conditional data through the time series prediction model; wherein, the prediction result includes multiple heterogeneous prediction parameters.
[0046] Temporal prediction models are mathematical models used to analyze data sequences arranged in chronological order and predict future values based on historical patterns. They are trained on a prediction training set. Each sample in the training dataset can include label information (i.e., the true result), allowing the initial temporal prediction model to learn the mapping relationship between input features and label information to improve prediction accuracy and efficiency. Alternatively, each sample in the training dataset can also be unlabeled, allowing the initial temporal prediction model to find the inherent structure and correlation of the data itself, thus addressing the problem of scarce labeled data. Furthermore, the training dataset can also contain some labeled samples and some unlabeled samples, combining the characteristics of supervised and unsupervised learning to improve the generalization ability of the initial temporal prediction model through semi-supervised learning.
[0047] Optionally, in this embodiment of the invention, the temporal prediction model includes a feature embedding layer, a temporal embedding layer, a heterogeneous graph embedding layer, a first shared temporal embedding layer, a multi-head attention fusion layer, and a first output layer. For example... Figure 2 As shown, when the original conditional parameters after the above denoising process are sent as input parameters to the time series prediction model, they first enter the feature embedding layer. The feature embedding layer includes multiple feature embedding sub-layers, each of which corresponds to a type of input parameter. That is, the parameter objects of each feature embedding sub-layer are independent of each other, and each type of parameter object is designed with encoding modules for static features and dynamic features. Static variables are transformed into fixed-length vectors through a fully connected layer or an embedding mapping layer. Thus, the input parameters are identified as feature vectors that the time series prediction model can recognize through the feature embedding layer.
[0048] The output of the feature embedding layer serves as the input to the temporal embedding layer. The temporal embedding layer comprises multiple temporal embedding sub-layers, each matched one-to-one with the feature embedding sub-layer. This is used to correlate different parameter values of various input parameters over time, ensuring the continuity and correlation of the same input parameters. For example, for the water valve opening of a fan coil unit, 192 sampling point values and 96 predicted point values are correlated over time; for indoor temperature, 192 sampling point values are correlated over time. Thus, the temporal embedding layer obtains the vertical correlation between input parameters of the same type.
[0049] The output of the temporal embedding layer serves as the input to the heterogeneous graph embedding layer. This layer models each input parameter based on the heterogeneous graph, using graph attention mechanisms such as Graph Attention Network (GAT) and Heterogeneous Graph Transformer (HGT) to extract multi-relationship structure information between different types of edges and nodes. This constructs a unified graph-based feature representation, thereby obtaining the correlation between different types of input parameters. For example, the chilled water outlet temperature and indoor temperature are two different types of input parameters, but they actually influence each other. Therefore, the heterogeneous graph embedding layer obtains the lateral correlation between different types of input parameters.
[0050] The output of the heterogeneous graph embedding layer serves as the input to the first shared temporal embedding layer. This layer handles the relationships between time-series data with the same type of input parameters and those with different types of input parameters, learning a consistent representation space through shared weights to share the vertical and horizontal relationships between different types of input parameters. The output of the first shared temporal embedding layer also serves as the input to the multi-head attention fusion layer. This layer integrates different types of input parameters through a parallel multi-head attention mechanism. Specifically, it maps the input information to multiple subspaces, calculates attention separately for each, and then concatenates the results into a fused information, achieving the fusion of graph structural features and temporal features.
[0051] The first output layer outputs parameters (i.e., prediction parameters) through different fully connected layers based on their type. Taking the above technical solution as an example, the output parameters include indoor temperature, carbon dioxide concentration, humidity, supply air temperature, return air temperature, inlet water temperature, outlet water temperature, and chilled water return water temperature at 96 prediction points within the next day. Each prediction parameter is output through a different output path. Thus, the time-series prediction model, through the sequentially connected feature embedding layer, time embedding layer, heterogeneous graph embedding layer, first shared time embedding layer, multi-head attention fusion layer, and first output layer, strengthens both the vertical correlation of the input parameters themselves and the horizontal correlation between different input parameters, achieving accurate acquisition of multiple heterogeneous prediction parameters under conditions of multiple heterogeneous known parameters.
[0052] Optionally, in this embodiment of the invention, the diffusion model is constructed based on a portion of the functional layers of the time-series prediction model. For example... Figure 3As shown, one or more of the feature embedding layer, temporal embedding layer, and heterogeneous graph embedding layer of the time series prediction model can be used as transfer layers to transfer to the new model (i.e., the diffusion model), and other functional layers of the initial structure can be configured for the diffusion model. During the training of the diffusion model, the layer structure and inter-layer parameters of the transfer layer remain unchanged, and only the functional layers of other initial structures are trained, thereby reducing the training time of the diffusion model and improving the training efficiency of the diffusion model.
[0053] Optionally, in this embodiment of the invention, the data prediction method further includes: using the feature embedding layer, the temporal embedding layer, and the heterogeneous graph embedding layer as transfer layers, and constructing an initial diffusion model based on the transfer layer, the second shared temporal embedding layer, and the second output layer; freezing the parameters of the transfer layer, and inputting the diffusion training samples into the initial diffusion model, so as to train the second shared temporal embedding layer and the second output layer using the diffusion training samples, thereby obtaining a trained diffusion model.
[0054] Specifically, the feature embedding layer, temporal embedding layer, and heterogeneous graph embedding layer can all be used as transfer layers and transferred to the new model (i.e., the diffusion model). At the same time, a new shared temporal embedding layer (i.e., the second shared temporal embedding layer) and a new output layer (i.e., the second output layer) are configured for the diffusion model. During the training of the diffusion model, the layer structure and inter-layer parameters of the transfer layers remain unchanged, and only the second shared temporal embedding layer and the second output layer are trained to obtain the trained diffusion model. This greatly reduces the training time of the diffusion model and improves its training efficiency. At the same time, since the diffusion model uses the feature embedding layer, temporal embedding layer, and heterogeneous graph embedding layer of the temporal prediction model, the resources occupied by the model deployment are greatly reduced.
[0055] The technical solution of this invention, in response to obtaining the original conditional data, determines whether there are missing or abnormal parameters in the original conditional data; if it is determined that there are missing or abnormal parameters in the original conditional data, the original conditional data is input into a trained diffusion model to denoise the original conditional data; the denoised original conditional data is then input into a time-series prediction model to obtain the prediction result of the original conditional data. Thus, by using the trained diffusion model to denoise the original conditional data, not only is the computation time consumed in the data filling and correction process reduced, and the data update efficiency improved, but the accuracy of the data filling and correction results is also enhanced, achieving effective updating of real data in multi-object heterogeneous scenarios.
[0056] Example 2
[0057] Figure 4This is a flowchart of a data prediction method provided in Embodiment 2 of the present invention. The relationship between this embodiment and the above embodiments is that the diffusion model is trained through a forward noise addition process and a backward noise reduction process, such as... Figure 4 As shown, the method specifically includes:
[0058] S201. For each known parameter in the prediction training sample, randomly select a continuous time period or an interval time point, and mask the parameter values of the continuous time period or interval time point to obtain the diffusion training sample.
[0059] A continuous time period refers to a set of points consisting of multiple adjacent sampling points or prediction points, while an interval time point refers to a set of points consisting of multiple non-adjacent sampling points or prediction points. Predictive training samples refer to the training samples used in the training process of the time series prediction model. In order to ensure the training effect of the time series prediction model, the predictive training samples are obviously data samples with complete values, that is, training samples without missing parameters or abnormal parameters. For the parameter values in the predictive training samples, a continuous time period or an interval time is randomly selected, and the parameter values of the above continuous time period or interval time point are masked, that is, the parameter values of that part are deleted, thereby generating diffusion training samples.
[0060] S202. Input the diffusion training samples into the initial diffusion model, so as to obtain the trained diffusion model based on the reverse denoising learning through the diffusion training samples.
[0061] Inverse denoising learning refers to the process of learning to recover the original signal from a noisy sequence. In the inference stage of the initial diffusion model, the missing values are filled in through the denoising process to obtain high-fidelity time series data. Thus, by masking the parameter values of randomly selected continuous time periods or intervals in the prediction training samples to generate diffusion training samples, the complexity of constructing diffusion training samples is reduced, and the diversity of missing data in the diffusion training samples is increased, thereby improving the denoising capability and applicability of the diffusion model.
[0062] Optionally, in this embodiment of the invention, the data prediction method further includes: using some functional layers in the time series prediction model as transfer layers based on training time, deployment resource consumption, and denoising accuracy, to construct an initial diffusion model based on the transfer layers. Specifically, the more transfer layers there are, the fewer functional layers need to be iteratively trained, and the shorter the training time of the diffusion model; at the same time, since the training time required for each functional layer is different, the training time required for different combinations of functional layers with the same number of transfer layers is also different; wherein, the training time required for each functional layer can be pre-configured based on empirical or experimental values.
[0063] Similarly, since the transfer layer is a shared layer for both the diffusion model and the time series prediction model, it only needs to be deployed once when deploying the diffusion model and the time series prediction model. Therefore, the more transfer layers there are, the lower the deployment resource consumption. At the same time, since the deployment resources required for each functional layer are different, the training time required for different combinations of functional layers will also be different with the same number of transfer layers. The deployment resources required for each functional layer can also be pre-configured based on empirical or experimental values.
[0064] Furthermore, since the transfer layers of the diffusion model are not specifically trained during the training process, but still use the layer structure and parameters of the time series prediction model, the adaptability of the transfer layers to the functions of the diffusion model itself differs from that of the functional layers trained by diffusion. Therefore, the diffusion model built based on the transfer layers has a lower denoising ability compared to the diffusion model in which all functional layers have undergone complete diffusion training, which means that the accuracy of the denoising results is reduced; the more transfer layers there are, the worse the denoising accuracy.
[0065] Therefore, based on the actual needs in the business scenario, different weights can be configured for training time, deployment resource consumption, and denoising accuracy. Then, the training time score, deployment resource consumption score, and denoising accuracy score are multiplied by their respective weights, and the sum of the product results is used as the score for each migration scheme. Among them, training time and training time score are negatively correlated, deployment resource consumption and deployment resource consumption score are also negatively correlated, and denoising accuracy and denoising accuracy score are positively correlated.
[0066] The number of migration layers and / or the types of functional layers included in each migration scheme are different. Based on the score of each migration scheme, the migration scheme with the highest score is obtained, and the functional layer corresponding to the migration scheme with the highest score is used as the migration layer to complete the construction of the initial diffusion model. Accordingly, based on the different needs under different business scenarios, some functional layers in the time series prediction model are selected as migration layers from three dimensions: training time, deployment resource consumption, and denoising accuracy, so as to obtain the optimal construction scheme of the diffusion model.
[0067] The technical solution of this invention involves randomly selecting consecutive time periods or intervals for each known parameter in the prediction training samples, and masking the parameter values at these time periods to obtain diffusion training samples. These diffusion training samples are then input into an initial diffusion model, allowing for the acquisition of a trained diffusion model based on reverse denoising learning. By masking the parameter values at randomly selected consecutive time periods or intervals in the prediction training samples to generate diffusion training samples, the complexity of constructing diffusion training samples is reduced, while the diversity of missing data in the diffusion training samples is increased, thereby improving the denoising capability and applicability of the diffusion model.
[0068] Example 3
[0069] Figure 5 This is a flowchart of a data prediction method provided in Embodiment 3 of the present invention. The relationship between this embodiment and the above embodiments is that, firstly, during the training process, the time-series prediction model and the diffusion model are trained sequentially; then, during the actual prediction process, denoising is performed sequentially using the diffusion model and prediction is performed sequentially using the time-series prediction model. Figure 5 As shown, the method specifically includes:
[0070] S301. Obtain the trained temporal prediction model based on the predicted training samples; wherein, the temporal prediction model includes a feature embedding layer, a temporal embedding layer, a heterogeneous graph embedding layer, a first shared temporal embedding layer, a multi-head attention fusion layer, and a first output layer.
[0071] S302. For each known parameter in the prediction training sample, randomly select a continuous time period or an interval time point, and mask the parameter values of the continuous time period or interval time point to obtain the diffusion training sample.
[0072] S303. The feature embedding layer, the temporal embedding layer and the heterogeneous graph embedding layer are used as transfer layers, and an initial diffusion model is constructed based on the transfer layer, the second shared temporal embedding layer and the second output layer.
[0073] S304. Freeze the parameters of the transfer layer and input the diffusion training samples into the initial diffusion model to train the second shared-time embedding layer and the second output layer using the diffusion training samples to obtain the trained diffusion model.
[0074] S305. In response to obtaining the original condition data, determine whether there are missing parameters or abnormal parameters in the original condition data; wherein, the original condition data includes multiple heterogeneous known parameters.
[0075] S306. If it is determined that there are missing or abnormal parameters in the original conditional data, the original conditional data is input into the trained diffusion model so that the original conditional data is denoised by the diffusion model.
[0076] S307. Input the denoised original conditional data into the time series prediction model to obtain the prediction result of the original conditional data through the time series prediction model; wherein, the prediction result includes multiple heterogeneous prediction parameters.
[0077] The technical solution of this invention generates diffusion training samples by masking parameter values at randomly selected continuous time periods or intervals in the prediction training samples. This reduces the complexity of constructing diffusion training samples and increases the diversity of missing data in the diffusion training samples, thereby improving the denoising capability and applicability of the diffusion model. At the same time, the denoising processing of the original conditional data through the trained diffusion model not only reduces the computation time consumed in the data filling and correction process and improves the data update efficiency, but also improves the accuracy of the data filling and correction results, realizing the effective updating of real data in heterogeneous multi-object scenarios.
[0078] Example 4
[0079] Figure 6 This is a structural block diagram of a data prediction device provided in Embodiment 4 of the present invention. The device specifically includes:
[0080] The parameter judgment module 401 is used to determine whether there are missing or abnormal parameters in the original condition data in response to obtaining the original condition data.
[0081] The denoising execution module 402 is used to input the original conditional data into the trained diffusion model if it is determined that there are missing or abnormal parameters in the original conditional data, so as to denoise the original conditional data through the diffusion model; wherein, the original conditional data includes multiple heterogeneous known parameters;
[0082] The prediction execution module 403 is used to input the denoised original conditional data into the time series prediction model so as to obtain the prediction result of the original conditional data through the time series prediction model; wherein, the prediction result includes multiple heterogeneous prediction parameters.
[0083] The technical solution of this invention, in response to obtaining the original conditional data, determines whether there are missing or abnormal parameters in the original conditional data; if it is determined that there are missing or abnormal parameters in the original conditional data, the original conditional data is input into a trained diffusion model to denoise the original conditional data; the denoised original conditional data is then input into a time-series prediction model to obtain the prediction result of the original conditional data. Thus, by using the trained diffusion model to denoise the original conditional data, not only is the computation time consumed in the data filling and correction process reduced, and the data update efficiency improved, but the accuracy of the data filling and correction results is also enhanced, achieving effective updating of real data in multi-object heterogeneous scenarios.
[0084] Optionally, the diffusion model is constructed based on a portion of the functional layers of the time-series prediction model.
[0085] Optionally, the temporal prediction model includes a feature embedding layer, a temporal embedding layer, a heterogeneous graph embedding layer, a first shared temporal embedding layer, a multi-head attention fusion layer, and a first output layer.
[0086] Optionally, the data prediction device is further configured to randomly select consecutive time periods or intervals for each known parameter in the prediction training samples, and mask the parameter values of the consecutive time periods or intervals to obtain diffusion training samples; input the diffusion training samples to the initial diffusion model, so as to obtain the trained diffusion model based on the reverse denoising learning through the diffusion training samples.
[0087] Optionally, the data prediction device is further configured to use the feature embedding layer, the temporal embedding layer, and the heterogeneous graph embedding layer as transfer layers, and construct an initial diffusion model based on the transfer layer, the second shared temporal embedding layer, and the second output layer; freeze the parameters of the transfer layer, and input the diffusion training samples into the initial diffusion model, so as to train the second shared temporal embedding layer and the second output layer through the diffusion training samples to obtain the trained diffusion model.
[0088] Optionally, the data prediction device is further configured to use a portion of the functional layers in the time series prediction model as a transfer layer based on the training time, deployment resource consumption, and denoising accuracy, so as to construct an initial diffusion model based on the transfer layer.
[0089] The above-described apparatus can execute the data prediction method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in this embodiment can be found in the data prediction method provided in any embodiment of the present invention.
[0090] Example 5
[0091] Figure 7 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, electronic devices, blade electronic devices, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), 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 invention described and / or claimed herein.
[0092] like Figure 7 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0093] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0094] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 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 processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as data prediction methods.
[0095] In some embodiments, the data prediction method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on a heterogeneous hardware accelerator via ROM and / or a communication unit. When the computer program is loaded into RAM and executed by a processor, one or more steps of the data prediction method described above may be performed. Alternatively, in other embodiments, the processor may be configured to perform the data prediction method by any other suitable means (e.g., by means of firmware).
[0096] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0097] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0098] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0099] To provide user interaction, the systems and techniques described herein can be implemented on a heterogeneous hardware accelerator, which includes: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the heterogeneous hardware accelerator. Other types of devices can also be used to provide user interaction; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or haptic feedback); and input from the user can be received in any form (including sound input, voice input, or haptic input).
[0100] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0101] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0102] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0103] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A data prediction method, characterized in that, include: In response to obtaining the original condition data, it is determined whether there are missing or abnormal parameters in the original condition data; wherein, the original condition data includes multiple heterogeneous known parameters; If it is determined that there are missing or abnormal parameters in the original conditional data, the original conditional data is input into the trained diffusion model so that the diffusion model can be used to denoise the original conditional data. The denoised original conditional data is input into a time series prediction model to obtain the prediction result of the original conditional data through the time series prediction model; wherein the prediction result includes multiple heterogeneous prediction parameters.
2. The data prediction method according to claim 1, characterized in that, The diffusion model is constructed based on a portion of the functional layers of the time-series prediction model.
3. The data prediction method according to claim 1, characterized in that, The temporal prediction model includes a feature embedding layer, a temporal embedding layer, a heterogeneous graph embedding layer, a first shared temporal embedding layer, a multi-head attention fusion layer, and a first output layer.
4. The data prediction method according to claim 1, characterized in that, The data prediction method also includes: For each known parameter in the prediction training sample, a continuous time period or an interval time point is randomly selected, and the parameter values of the continuous time period or the interval time point are masked to obtain the diffusion training sample. The diffusion training samples are input into the initial diffusion model so that the trained diffusion model can be obtained based on the reverse denoising learning using the diffusion training samples.
5. The data prediction method according to claim 3, characterized in that, The data prediction method also includes: The feature embedding layer, the temporal embedding layer, and the heterogeneous graph embedding layer are used as transfer layers, and an initial diffusion model is constructed based on the transfer layer, the second shared temporal embedding layer, and the second output layer. The parameters of the transfer layer are frozen, and the diffusion training samples are input into the initial diffusion model to train the second shared-time embedding layer and the second output layer using the diffusion training samples, so as to obtain the trained diffusion model.
6. The data prediction method according to claim 2, characterized in that, The data prediction method also includes: Based on training time, deployment resource consumption, and denoising accuracy, some functional layers in the time series prediction model are used as transfer layers to construct an initial diffusion model.
7. A data prediction device, characterized in that, include: The parameter judgment module is used to determine whether there are missing or abnormal parameters in the original condition data in response to the acquisition of the original condition data; wherein, the original condition data includes multiple heterogeneous known parameters; The denoising execution module is used to input the original conditional data into the trained diffusion model if it is determined that there are missing or abnormal parameters in the original conditional data, so as to denoise the original conditional data through the diffusion model. The prediction execution module is used to input the denoised original conditional data into the time series prediction model so as to obtain the prediction result of the original conditional data through the time series prediction model; wherein, the prediction result includes multiple heterogeneous prediction parameters.
8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor to enable the at least one processor to perform the data prediction method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the data prediction method according to any one of claims 1-6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the data prediction method according to any one of claims 1-6.