Variable prediction method and device, equipment and storage medium
By constructing a variable prediction method based on a multi-teacher knowledge distillation framework and attention mechanism, the nonlinear coupling and data sensitivity problems of multi-factor time series variable prediction in existing technologies are solved, achieving efficient and robust prediction results that can adapt to the changes of multi-factor time series variables in complex environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FUJIAN AGRI & FORESTRY UNIV
- Filing Date
- 2025-12-04
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies cannot fully characterize the nonlinear coupling and time-varying correlation between variables when dealing with time-series variables driven by multiple factors. They are sensitive to data integrity, and missing values or noise reduce prediction accuracy and stability. Their generalization ability is limited and they are difficult to adapt to new working conditions or changes in variable combinations.
By constructing a multi-teacher knowledge distillation framework and attention mechanism, the model is trained on multi-source datasets based on a teacher-student model to generate prediction results for different factors. Multi-factor data is processed using sliding window, spatiotemporal alignment, normalization and standardization. Nonlinear enhanced activation function is used to improve the model's prediction accuracy and generalization ability, and robust prediction is achieved under the edge-cloud collaborative computing architecture.
It provides a general, efficient, and robust solution for predicting multi-factor time-series variables in complex environments, improving prediction accuracy and stability, adapting to dynamic changes in different scenarios, and reducing the model's sensitivity to missing data.
Smart Images

Figure CN121997041A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing, and more particularly to a method, apparatus, device, and storage medium for variable prediction. Background Technology
[0002] In scenarios such as marine, industrial, agricultural, and smart city applications, accurate prediction of time-series variables driven by multiple factors (such as wind and waves, red tide indices, storage temperature, air conditioning energy consumption, traffic flow, equipment vibration, or any environmental monitoring indicators) is crucial for decision-making and control. For example, in marine scenarios, real-time prediction of wave height and red tide indices (sea temperature, chlorophyll, air pressure, etc.) is essential; in storage scenarios, 24-hour advance prediction of internal temperature and air conditioning energy consumption is necessary (affected by the coupling of multiple variables such as external temperature and humidity, internal heat source power, and air circulation). However, existing numerical models, statistical models, and machine learning methods generally face the following shortcomings when dealing with such complex dynamic systems: ignoring nonlinear coupling and time-varying correlations between variables, resulting in an inability to fully characterize the dynamic evolution of the target variable; high sensitivity to data integrity, with missing values or noise significantly reducing prediction accuracy and stability; and limited generalization ability, making it difficult to adapt to new operating conditions or variable combinations not covered by the training data. Summary of the Invention
[0003] This disclosure provides a variable prediction method, apparatus, device, and storage medium to at least solve the above-mentioned technical problems existing in the prior art.
[0004] According to a first aspect of this disclosure, a variable prediction method is provided, the method comprising: Acquire multi-factor data, and construct a first dataset based on the multi-factor data; Based on the first dataset, determine the corresponding first prediction model group; Based on the first prediction model group, the first dataset is trained to generate a first prediction result set; The second prediction model is trained based on the first prediction result set and the first dataset, and the second prediction result is output.
[0005] In one possible implementation, determining the corresponding first prediction model group based on the first dataset includes: The multi-factor data corresponds to at least one data factor in the first dataset, and at least one prediction model is determined based on the at least one data factor. The first prediction model group is formed based on at least one prediction model.
[0006] In one possible implementation, constructing the first dataset based on the multi-factor data includes: Set the window and prediction step size, and perform sliding window processing on the multi-factor data based on the window and prediction step size to obtain multi-sample data; Based on the first time point, the multi-sample data are aligned to a unified time axis and spatial grid using an interpolation algorithm for spatiotemporal alignment processing. The spatiotemporally aligned multi-sample data is normalized and standardized. In response to the completion of the normalization and standardization, a modality identifier is embedded in each channel of the multi-sample data to obtain the first dataset.
[0007] In one possible implementation, training the second prediction model based on the first prediction result set and the first dataset, and outputting the second prediction result, includes: A first loss function is constructed based on the first prediction result set and the predicted values of the second prediction model, and the second prediction model performs optimization learning based on the first loss function; The contribution weights of each prediction model in the at least one prediction model corresponding to the first prediction result set are calculated using an attention mechanism. The second model after optimization learning is calculated based on the first dataset and the contribution weights, and outputs the second prediction result; In this model, the linear transformation results of each layer of the network are nonlinearly mapped based on a nonlinear enhancement activation function.
[0008] In one possible implementation, the method further includes: The second prediction model periodically acquires the first dataset to predict the result and outputs the second prediction result. When the second prediction result is greater than the first threshold, an alarm message is generated. Intermediate features of the first prediction model and the second prediction model are periodically acquired, and periodic rolling predictions are performed based on the intermediate features to update the training parameters of the second prediction model. In response to a network interruption, the first prediction model and the second prediction model are run based on the historical cached data.
[0009] According to a second aspect of this disclosure, a variable prediction apparatus is provided, the apparatus comprising: A data acquisition unit is used to acquire multi-factor data and construct a first dataset based on the multi-factor data. The first prediction model unit is used to determine the corresponding first prediction model group based on the first dataset; and to train the model on the first dataset based on the first prediction model group to generate a first prediction result set. The second prediction model unit is used to train the second prediction model based on the first prediction result set and the first dataset, and output the second prediction result.
[0010] In one embodiment, the first prediction model unit is further configured to: determine at least one prediction model based on the at least one data factor corresponding to the multi-factor data in the first dataset; and construct the first prediction model group based on the at least one prediction model. The second prediction model unit is further configured to: construct a first loss function based on the first prediction result set and the predicted values of the second prediction model; perform optimization learning on the second prediction model based on the first loss function; calculate the contribution weight of each prediction model in the at least one prediction model corresponding to the first prediction result set using an attention mechanism; and calculate and output the second prediction result based on the first dataset and the contribution weights after optimization learning. The linear transformation results of each layer of the second model network are nonlinearly mapped based on a nonlinear enhancement activation function.
[0011] In one embodiment, the data acquisition unit is further configured to: set a window and a prediction step size; perform sliding window processing on the multi-factor data based on the window and the prediction step size to obtain multi-sample data; align the multi-sample data to a unified time axis and spatial raster based on a first time as a reference, and perform spatiotemporal alignment processing; perform normalization and standardization processing on the spatiotemporally aligned multi-sample data; and, in response to the completion of the normalization and standardization processing, embed a modal identifier into each channel of the multi-sample data to obtain the first dataset. The second model prediction unit is further configured to: periodically acquire the first dataset for result prediction, output the second prediction result, and generate an alarm message when the second prediction result exceeds a first threshold; periodically acquire intermediate features of the first prediction model and the second prediction model, perform periodic rolling prediction based on the intermediate features, and update the training parameters of the second prediction model; and, in response to a network interruption, run the first prediction model and the second prediction model based on the historical cached data. According to a third aspect of this disclosure, an electronic device is provided, comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the methods described in this disclosure.
[0012] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions for causing the computer to perform the methods described in this disclosure.
[0013] This disclosure discloses a variable prediction method, apparatus, device, and storage medium. By acquiring multivariate data, cleaning the multi-source data, and constructing a multimodal dataset, the method trains the multi-source dataset using a teacher-student model to generate prediction results for different factors. Through an innovative multi-teacher knowledge distillation framework, an attention-based dynamic fusion strategy for environmental factors, and an efficient edge-cloud collaborative computing architecture, it fundamentally resolves the contradiction between mechanistic models ("accurate but slow") and deep learning models ("fast but inaccurate"), providing a general, efficient, and robust solution for multi-factor time-series variable prediction in complex environments.
[0014] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0015] The above and other objects, features, and advantages of this disclosure will become readily apparent from the following detailed description of exemplary embodiments, taken in conjunction with the accompanying drawings. Several embodiments of this disclosure are illustrated in the drawings by way of example and not limitation, in which: In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
[0016] Figure 1 This illustration shows a schematic diagram of the implementation flow of a variable prediction method according to an embodiment of the present disclosure. Figure 1 ; Figure 2 This illustration shows a schematic diagram of the implementation flow of a variable prediction method according to an embodiment of the present disclosure. Figure 2 ; Figure 3 A schematic diagram of a variable prediction device according to an embodiment of the present disclosure is shown; Figure 4 A schematic diagram of the composition structure of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation
[0017] To make the objectives, features, and advantages of this disclosure more apparent and understandable, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.
[0018] Figure 1 This illustration shows a schematic diagram of the implementation flow of a variable prediction method according to an embodiment of the present disclosure. Figure 1 ,like Figure 1 As shown, the implementation process of a variable prediction method according to an embodiment of this disclosure includes the following steps: Step 101: Obtain multi-factor data and construct a first dataset based on the multi-factor data.
[0019] In this embodiment of the disclosure, multi-factor data is acquired in real time through various types of sensors deployed at field nodes (buoys, warehouse IoT, roadside units, industrial programmable logic controllers (PLCs), etc.). The multi-factor data refers to one or more sets of environmental factors related to the prediction target, such as marine scene data, warehouse scene data, and traffic data, as well as spatial data such as remote sensing / drones / cameras / LiDAR, which are used to construct a multimodal spatiotemporal data stream.
[0020] In this embodiment of the disclosure, the first dataset is a single-modal dataset or a multimodal dataset. Preferably, the first dataset is a multimodal dataset. The first dataset is obtained by performing sliding window processing, spatiotemporal alignment, normalization processing, and modality embedding on multi-factor data. Specifically, the sliding window processing includes setting a window and a prediction step size, and performing sliding window processing on the multi-factor data based on the window and the prediction step size to obtain multi-sample data. Spatiotemporal alignment includes aligning the multi-sample data to a unified time axis and spatial raster based on a first time as a reference using an interpolation algorithm. The normalization processing includes normalizing and standardizing the spatiotemporally aligned multi-sample data. Modality embedding includes embedding a modality identifier into each channel of the multi-sample data in response to the completion of the normalization and standardization processing to obtain the first dataset.
[0021] Step 102: Determine the corresponding first prediction model group based on the first dataset.
[0022] In this embodiment of the disclosure, the linear transformation results of each layer of the second model network are nonlinearly mapped based on a nonlinear enhanced activation function. The multi-factor data corresponds to at least one data factor (i.e., environmental factor) in the first dataset. At least one prediction model is determined based on the at least one data factor. The data factor is intended to cover a single time series variable (e.g., only "chlorophyll concentration"), which can refer to a single variable data stream (e.g., only temperature data) or a set of multiple variable data streams pre-combined according to business logic (e.g., a meteorological data package containing temperature, humidity, and air pressure). The prediction model can be: LSTM (Long Short-Term Memory Network) / GRU (Recurrent Neural Network) / TCN (Temporal Convolutional Network) / Transformer (Attention Mechanism Deep Learning Model) / Informer (Efficient Long-Sequence Time Series Prediction Model). The first prediction model group is formed based on the at least one prediction model. The first prediction model group is a teacher model group that combines the above prediction models. Each teacher model in the model group focuses on a single factor or a set of factors.
[0023] Step 103: Train the model on the first dataset based on the first prediction model group to generate the first prediction result set.
[0024] In this embodiment of the disclosure, the first dataset is trained on each teacher model in the teacher model group in step 102 for different environmental factors (i.e., each teacher focuses on one or a class of environmental factors, such as chlorophyll, temperature, air pressure, remote sensing image, heat source power, etc.) to generate a first prediction result set, wherein the first prediction result set is the soft target output by the teacher model group, which serves as the supervision signal for the student model.
[0025] Step 104: Train the second prediction model based on the first prediction result set and the first dataset, and output the second prediction result.
[0026] In this embodiment, the second prediction model is a student model corresponding to the teacher model. A first loss function is constructed based on the first prediction result set and the predicted values of the second prediction model. The second prediction model performs optimization learning based on the first loss function. Specifically, the first loss function is a distillation loss function, which consists of the true values, the predicted values of the student model, the predicted values of the teacher model, and the prediction knowledge distilled by the student model from the teacher model. The student model learns from the teacher model through the distillation loss function, adaptively weighting the contributions of different teachers.
[0027] In this embodiment of the disclosure, an attention mechanism is used to calculate the contribution weight of each prediction model in the at least one prediction model corresponding to the first prediction result set. The attention mechanism can be a multi-head attention mechanism with shared weights. The shared weights identify that all attention heads share three mapping matrices: query, key, and value, reducing redundant parameters. Based on the above mapping matrices, similarity calculation, scaling, and normalization are performed on the soft target. Finally, a weighted sum is obtained to obtain the contribution weight of each teacher model. This clearly indicates which teacher's knowledge the student model should rely on more when predicting the current target.
[0028] In this embodiment, the optimized second model calculates based on the multimodal data and the contribution weights, and outputs the second prediction result. The second prediction result is the prediction result of future time-series variables output by the second model through a fully connected layer. The linear transformation results of each layer of the second model are nonlinearly mapped based on a nonlinear enhanced activation function. This nonlinear enhanced activation function is a type of activation function that simultaneously possesses smoothness (i.e., the function is continuous and differentiable everywhere) and non-monotonicity (i.e., the function has non-monotonic intervals within its domain). These characteristics enable it to capture complex nonlinear patterns (such as mutations and saturation effects) in input factors more effectively than traditional monotonic activation functions, such as linear rectification functions (ReLU), thereby significantly improving the model's prediction accuracy and generalization ability. The nonlinear enhanced activation function combines linearity and non-monotonicity, significantly improving the model's ability to capture complex nonlinear patterns (such as mutations and saturation effects) in input factors, with particularly noticeable accuracy improvements in scenarios where input factors fluctuate drastically (such as large jumps within a unit of time).
[0029] In this embodiment, the second prediction model periodically acquires the first dataset to predict results and outputs the second prediction result. For example, the lightweight student model infers once every 5 minutes. When the second prediction result is greater than a first threshold, an alarm message is generated. For example, if the second prediction result exceeds the threshold (e.g., temperature > 30°C or DO < 3 mg / L), a local alarm or pulse width modulation (PWM) control is immediately issued. Intermediate features of the first and second prediction models are periodically acquired, and periodic rolling prediction is performed based on the intermediate features to update the training parameters of the second prediction model. Preferably, intermediate features are uploaded every hour, 24-hour full-cycle rolling prediction is performed, and updated weights are issued. In the event of a network interruption, in response to the network interruption, the first and second prediction models are run based on the historical cached data. Preferably, the edge device runs independently for more than 72 hours using cached weights.
[0030] Figure 2 This illustration shows a schematic diagram of the implementation flow of a variable prediction method according to an embodiment of the present disclosure. Figure 2 ,like Figure 2 As shown, the implementation process of a variable prediction method according to an embodiment of this disclosure includes the following steps: Step 201: Multi-factor data collection.
[0031] In this embodiment, multiple types of sensors deployed at field nodes (buoys, warehouse IoT, roadside units, industrial PLCs, etc.) acquire one or more sets of environmental factors related to the predicted target in real time. Examples include: marine scenarios: chlorophyll, air temperature, air pressure, wind speed, and current velocity; warehousing scenarios: external temperature and humidity, internal heat source power, cargo heat capacity, and ventilation volume; and traffic scenarios: vehicle density, weather, and holiday indicators. Simultaneously, spatial data from remote sensing, drones, cameras, and LiDAR are integrated to construct a multimodal spatiotemporal data stream.
[0032] In this embodiment of the disclosure, the edge acquisition module of the acquisition hardware (e.g., NVIDIA Jetson AGX Orin / Xavier NX / Huawei Atlas 200) transmits back via network standards or Ethernet and performs preliminary cleaning and anomaly monitoring locally to achieve millisecond-level noise suppression.
[0033] Step 202: Data cleaning and noise reduction.
[0034] In this embodiment, the collected data is cleaned and denoised, including anomaly detection, missing data imputation, noise removal, and modal enhancement. Specifically, the 3σ principle is used to identify univariate anomalies, and Altman model (Z-score) or interquartile range (IQR) smoothing is applied. For continuous missing data of ≤6 hours, interpolation function (PCHIP) is used; for missing data of >6 hours, cross-modal data imputation is used (e.g., satellite chlorophyll inversion or warehouse thermal imaging temperature amplification). Daubechies 5-level decomposition is used to remove high-frequency noise; if the scene noise is low, the noise removal operation can be omitted, with an accuracy loss of <3%. During periods of severe data loss, high-resolution data from the same or different sources is automatically invoked for imputation, achieving information complementarity.
[0035] Step 203: Construction of the multi-factor fusion dataset.
[0036] In this embodiment, a multi-factor fusion dataset is constructed based on the cleaned data. Preferably, the multi-factor fusion dataset is a multimodal dataset for subsequent model training. Specifically, the original observation data of multimodal data such as "buoy-satellite-UAV" (hereinafter referred to as "heterogeneous data") is cleaned and denoised by wavelet to transform it into standardized samples that can be used for training. This includes sliding window, spatiotemporal alignment, normalization, and modal embedding operations. Specifically, the window length is set to T_in, and the prediction step size is T_out (typical settings: T_in = 24 h, T_out = 24 h). One sample is generated for each sliding step: Input: X = [X_chl, X_at, X_ap, …], dimension (T_in, C), where C is the total number of variables; Output: Y, dimension (T_out, 1), corresponding to the time series variable Y value within the future T_out time period (e.g., input sequence length T_in (typically 72 h), prediction step size T_out (typically 24 h), the step size is adjustable). Using GPS time or Network Protocol Time (NTP) as the reference, linear interpolation, bilinear interpolation, or nearest neighbor interpolation are employed to align data with different sampling frequencies and spatial resolutions to a unified time axis and spatial grid. Z-score or Min-Max normalization is performed on variables for each modality to ensure consistent input dimensions and stable numerical ranges. One-hot modal encoding is added to each channel, where M ∈ R^k (k is the number of modality categories), and concatenated with spatiotemporal features before being fed into the subsequent network, enabling the model to possess "modality awareness" capabilities.
[0037] In this embodiment of the disclosure, by unifying time-series data of different frequencies, accuracies and sources (such as high-frequency sensor data, low-frequency monitoring station data, and spatial image data), a weighted fusion feature (such as feature_{source2target} representing the target variable related information weighted by a certain source data feature) is generated through a cross-attention mechanism, which significantly improves the monitoring sensitivity and prediction accuracy of target variable mutations or key inflection points.
[0038] Step 204: Establishment and training of a multi-teacher attention distillation model.
[0039] In this embodiment, each teacher focuses on one or a class of environmental factors (such as chlorophyll, temperature, air pressure, remote sensing imagery, heat source power, etc.), and independently selects a dedicated teacher model, such as LSTM, Transformer, or CNN-LSTM structure, for training, outputting high-quality soft target y. i ^soft serves as a supervision signal for the student model.
[0040] In this embodiment, a distillation loss function is used to train the soft objectives output by the teacher model group and the prediction results of the student model to obtain a student model focused on the teacher's soft objectives. Specifically, first, multiple single-factor teacher models (each focusing on data from different sources) are trained to generate empirical prediction objectives. The student model learns from the teacher models through distillation loss, adaptively weighting the contributions of different teachers. The distillation loss function combines prediction error and teacher guidance, and is as follows:
[0041] Where MSE is the mean squared error; y: the true value, which is the ultimate target that the model prediction hopes to approximate. "True value label"; Dissolved oxygen levels predicted by the Student Model; y i : The dissolved oxygen value predicted by the i-th teacher model. "Experience label"; : is the predicted knowledge distilled from the i-th teacher model by the student model; α i The weights are generated in real time by the attention mechanism. Specifically, the contribution weight α of each teacher is dynamically calculated using a multi-head attention mechanism. i The multi-teacher soft objective is distilled into the hidden states of the student model, and all attention heads share the Query / Key / Value mapping matrix, reducing redundant parameters.
[0042] In this embodiment of the disclosure, the learnable parameter α is used. iThe framework adaptively adjusts the contribution weights of different teacher models or knowledge sources (e.g., automatically increasing the weight of the corresponding teacher model when a specific environmental factor dominates system behavior), ensuring model stability under changes in input data distribution, extreme events, or new scenarios, and significantly reducing the volatility (standard deviation) of prediction results. This highly scalable framework can be applied to the joint prediction of multiple time-series variables (e.g., predicting multiple interrelated indicators such as A, B, and C), providing a general technical paradigm for intelligent decision-making in fields such as industrial monitoring, energy management, traffic scheduling, and environmental monitoring.
[0043] In this embodiment of the disclosure, the multi-teacher model independently trains the Transformer / LSTM teacher model for key target variables or important auxiliary factors, generating soft objectives that include uncertainty (such as...). (Through distillation loss function) The student model can effectively learn the teacher model's knowledge of missing or noisy data regions.
[0044] In this embodiment, the trained student model takes the aforementioned multimodal data (aligned multimodal sequences and modal embeddings) as input. The student model receives the input data (multi-factor sequences after interpolation and completion) and propagates it through the model's multi-layer network (such as LSTM, Transformer layers, and fully connected layers). In each layer, the input data undergoes a linear transformation (such as matrix multiplication). The transformed result is then nonlinearly mapped using an activation function before being output. The use of a nonlinear activation function instead of a linear function enhances the model's ability to capture complex nonlinear patterns (such as mutations and saturation effects) in the input factors, resulting in a particularly significant improvement in accuracy when the input factors fluctuate drastically (such as large jumps within a unit of time). Specifically, the Swish function is used: Instead of the ReLU function, the swish function combines linearity and non-monotonicity. Here, x is the input value of the activation function, the signal received by a neuron in the neural network after linear weighted summation. β is a learnable parameter or hyperparameter that controls the slope of the sigmoid function at the origin, thus adjusting the shape of the activation function. When β approaches 0, the swish function approximates a linear function f(x) = x / 2. When β approaches infinity, the swish function approximates the ReLU function, but is smoother. The smoothness and non-monotonicity of the swish function make it more effective than the ReLU function in alleviating the gradient vanishing problem, especially when dealing with more complex and fluctuating time series data, resulting in a significant improvement in accuracy. Finally, the fully connected layer outputs the predicted time series variables for the next T_out steps. .
[0045] In this embodiment of the disclosure, real-time interpolation at the edge ensures data continuity. Specifically, the edge layer (such as Jetson AGX Orin) uses PCHIP segmented cubic Hermit interpolation for short-term missing segments (such as ≤6 hours) to ensure first-order smoothness of the data; for long-term missing segments (such as >6 hours), it combines multi-source spatiotemporal context information (such as related sensors and spatially nearby points) for intelligent completion, which significantly reduces the false alarm rate.
[0046] Step 205, Edge-Cloud Collaborative Prediction and Intelligent Control.
[0047] In this embodiment, edge inference is set up based on the aforementioned teacher-student model. Specifically, the lightweight student model infers once every 5 minutes. When the predicted value exceeds a set threshold (e.g., temperature > 30°C or dissolved oxygen < 3 mg / L), control commands (PWM duty cycle, fan speed, alarm signal, etc.) are immediately issued. Cloud fusion mechanism: intermediate features are uploaded every hour, 24-hour full-cycle rolling prediction is performed, and updated weights are issued. These weights are all the learnable training parameters of the student model. A fault tolerance mechanism is also set up so that when the network is interrupted, the edge device can run independently for more than 72 hours using cached weights.
[0048] In this embodiment, ultra-long-range data-driven replacement of unmeasurable parameters is achieved for the mechanistic model. Taking the marine scenario as an example, parameters such as the photosynthetic efficiency of phytoplankton in the marine ecosystem dynamics model are difficult to measure in real time. This invention uses a self-trained "chlorophyll teacher model" to implicitly represent biological processes with high-dimensional data features, avoiding parameter calibration errors. Multivariate simulation of real-world scenarios is introduced: breaking through the limitation of single variables in traditional mechanistic models, taking the marine prediction scenario as an example, multi-dimensional environmental variables such as sea surface temperature, air pressure, nutrient concentration, and light intensity are integrated to construct an input space that more closely resembles real marine dynamics. Attention mechanism coupling of physical processes: through multi-head attention, environmental factor weights are dynamically allocated. For example, the interaction weight of "chlorophyll-dissolved oxygen" is automatically increased before a red tide outbreak, achieving implicit coupling between physical and biological processes.
[0049] In this embodiment, the technology also surpasses deep learning models, with multi-teacher complementarity addressing missing data: Teacher models are independently trained for each key variable (e.g., wind speed, temperature, heat source power). Even if a sensor malfunctions for an extended period, resulting in incomplete data or asynchronous data loss for multiple variables, the student model can adaptively select the knowledge weights of the teacher models to maintain prediction accuracy. Multi-teacher complementarity aligns multimodal asynchronous data: Addressing the issue of varying sampling frequencies, accuracy, and spatiotemporal coverage (multimodal asynchronous) in different scenarios, feature extraction and alignment are performed using experts from their respective domains (teacher models). The student model integrates these heterogeneous knowledge sources through knowledge distillation, forming a unified and coordinated prediction capability. Dynamic weights adapt to different scenarios: An adaptive teacher weight allocation mechanism is designed to dynamically adjust the contribution of different teacher models to the student model's guidance based on the current environmental state (e.g., storms, red tides, advection periods), ensuring optimal predictions under different dominant mechanisms. Edge-cloud collaborative optimization: Data cleaning (3σ anomaly detection + PCHIP interpolation) and lightweight inference are completed at the edge, while global fusion is only performed in the cloud. The overall response latency is lower than a pure cloud solution, and it can still operate independently even during network interruptions.
[0050] Figure 3 A schematic diagram of a variable prediction device according to an embodiment of the present disclosure is shown, such as... Figure 3 As shown, a variable prediction device in an embodiment of this disclosure includes: The data acquisition unit 301 is used to acquire multi-factor data and construct a first dataset based on the multi-factor data.
[0051] The data acquisition unit 301 is further configured to: set a window and a prediction step size; perform sliding window processing on the multi-factor data based on the window and the prediction step size to obtain multi-sample data; align the multi-sample data to a unified time axis and spatial raster based on a first time as a reference, and perform spatiotemporal alignment processing; perform normalization and standardization processing on the spatiotemporally aligned multi-sample data; and, in response to the completion of the normalization and standardization processing, embed a modal identifier into each channel of the multi-sample data to obtain the first dataset.
[0052] The first prediction model unit 302 is used to determine the corresponding first prediction model group based on the first dataset; and to train the model on the first dataset based on the first prediction model group to generate a first prediction result set.
[0053] The first prediction model unit 302 is further configured to: determine at least one prediction model based on at least one data factor in the first dataset corresponding to the multi-factor data; and form the first prediction model group based on the at least one prediction model.
[0054] The second prediction model unit 303 is used to train the second prediction model based on the first prediction result set and the first dataset, and output the second prediction result.
[0055] The second prediction model unit 303 is further configured to: construct a first loss function based on the first prediction result set and the predicted values of the second prediction model; perform optimization learning on the second prediction model based on the first loss function; calculate the contribution weight of each prediction model in the at least one prediction model corresponding to the first prediction result set using an attention mechanism; and calculate and output the second prediction result based on the first dataset and the contribution weights of the optimized second model; wherein the linear transformation results of each layer of the second model network are nonlinearly mapped based on a nonlinear enhancement activation function.
[0056] The second model prediction unit 303 is further configured to: periodically acquire the first dataset to predict the result, output the second prediction result, and generate an alarm message when the second prediction result is greater than a first threshold; periodically acquire intermediate features of the first prediction model and the second prediction model, perform periodic rolling prediction based on the intermediate features, and update the training parameters of the second prediction model; and in response to a network interruption, run the first prediction model and the second prediction model based on the historical cached data.
[0057] In an exemplary embodiment, the data acquisition unit 301, the first prediction model unit 302, the second prediction model unit 303, etc., may be implemented by one or more central processing units (CPUs), graphics processing units (GPUs), application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontroller units (MCUs), microprocessors, or other electronic components.
[0058] Regarding the apparatus in the above embodiments, the specific manner in which each module and unit performs its operations has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0059] According to embodiments of this disclosure, this disclosure also provides an electronic device and a readable storage medium.
[0060] Figure 4 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device 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. The electronic device 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.
[0061] like Figure 4 As shown, device 800 includes a computing unit 801, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 802 or a computer program loaded from storage unit 808 into random access memory (RAM) 803. RAM 803 may also store various programs and data required for the operation of device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via bus 804. Input / output (I / O) interface 805 is also connected to bus 804.
[0062] Multiple components in device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of monitors, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0063] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 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 801 performs the various methods and processes described above, such as a variable prediction method. For example, in some embodiments, a variable prediction method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of a variable prediction method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform a variable prediction method by any other suitable means (e.g., by means of firmware).
[0064] 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.
[0065] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0066] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. 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 fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0067] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0068] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user 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., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0069] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0070] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0071] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means two or more, unless otherwise explicitly specified.
[0072] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.
Claims
1. A variable prediction method, characterized in that, The method includes: Acquire multi-factor data, and construct a first dataset based on the multi-factor data; Based on the first dataset, determine the corresponding first prediction model group; Based on the first prediction model group, the first dataset is trained to generate a first prediction result set; The second prediction model is trained based on the first prediction result set and the first dataset, and the second prediction result is output.
2. The method according to claim 1, characterized in that, The step of determining the corresponding first prediction model group based on the first dataset includes: The multi-factor data corresponds to at least one data factor in the first dataset, and at least one prediction model is determined based on the at least one data factor. The first prediction model group is formed based on at least one prediction model.
3. The method according to claim 1, characterized in that, The construction of the first dataset based on the multi-factor data includes: Set the window and prediction step size, and perform sliding window processing on the multi-factor data based on the window and prediction step size to obtain multi-sample data; Based on the first time point, the multi-sample data are aligned to a unified time axis and spatial grid using an interpolation algorithm for spatiotemporal alignment processing. The spatiotemporally aligned multi-sample data is normalized and standardized. In response to the completion of the normalization and standardization, a modality identifier is embedded in each channel of the multi-sample data to obtain the first dataset.
4. The method according to claim 2, characterized in that, The step of training the second prediction model based on the first prediction result set and the first dataset, and outputting the second prediction result, includes: A first loss function is constructed based on the first prediction result set and the predicted values of the second prediction model, and the second prediction model performs optimization learning based on the first loss function; The contribution weights of each prediction model in the at least one prediction model corresponding to the first prediction result set are calculated using an attention mechanism. The second model after optimization learning is calculated based on the first dataset and the contribution weights, and outputs the second prediction result; In this model, the linear transformation results of each layer of the network are nonlinearly mapped based on a nonlinear enhancement activation function.
5. The method according to claim 1, characterized in that, The method further includes: The second prediction model periodically acquires the first dataset to predict the result and outputs the second prediction result. When the second prediction result is greater than the first threshold, an alarm message is generated. Intermediate features of the first prediction model and the second prediction model are periodically acquired, and periodic rolling predictions are performed based on the intermediate features to update the training parameters of the second prediction model. In response to a network interruption, the first prediction model and the second prediction model are run based on the historical cached data.
6. A variable prediction device, characterized in that, The device includes: A data acquisition unit is used to acquire multi-factor data and construct a first dataset based on the multi-factor data. The first prediction model unit is used to determine the corresponding first prediction model group based on the first dataset; and to train the model on the first dataset based on the first prediction model group to generate a first prediction result set. The second prediction model unit is used to train the second prediction model based on the first prediction result set and the first dataset, and output the second prediction result.
7. The apparatus according to claim 6, characterized in that, The first prediction model unit is further configured to: determine at least one prediction model based on at least one data factor in the first dataset corresponding to the multi-factor data; and construct the first prediction model group based on the at least one prediction model. The second prediction model unit is further configured to construct a first loss function based on the first prediction result set and the predicted values of the second prediction model, and the second prediction model performs optimization learning based on the first loss function; The contribution weights of each prediction model in at least one prediction model corresponding to the first prediction result set are calculated using an attention mechanism; the second model after optimization learning is calculated based on the first dataset and the contribution weights to output the second prediction result; wherein, the linear transformation results of each layer of the second model are nonlinearly mapped based on a nonlinear enhancement activation function.
8. The apparatus according to claim 6, characterized in that, The data acquisition unit is further configured to: set a window and a prediction step size; perform sliding window processing on the multi-factor data based on the window and the prediction step size to obtain multi-sample data; and align the multi-sample data to a unified time axis and spatial grid based on an interpolation algorithm, using a first time as a reference, to perform spatiotemporal alignment processing. The spatiotemporally aligned multi-sample data is normalized and standardized. In response to the completion of the normalization and standardization, a modality identifier is embedded in each channel of the multi-sample data to obtain the first dataset. The second model prediction unit is further configured to: periodically acquire the first dataset to predict the result, output the second prediction result, and generate an alarm message when the second prediction result is greater than a first threshold; periodically acquire intermediate features of the first prediction model and the second prediction model, perform periodic rolling prediction based on the intermediate features, and update the training parameters of the second prediction model; and in response to a network interruption, run the first prediction model and the second prediction model based on the historical cached data.
9. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-5.