Flow time sequence prediction method and device based on learning decomposition and context gating multi-expert fusion
By decomposing runoff sequences into trend, seasonal, and residual components, and using heterogeneous expert ensembles and gated networks for dynamic weight calculation, the problem of nonlinear interaction and dynamic changes in long-term time series forecasting is solved, achieving stable and robust forecasting for complex environments.
Patent Information
- Application Number
- CN202511770429.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-02-10
AI Technical Summary
Existing technologies struggle to capture complex nonlinear interactions and dynamic changes in long-term time series forecasting, and are poor at predicting sparse extreme events, lacking robustness and adaptability to changes in data distribution.
A learnable decomposition and context-gated multi-expert fusion method is adopted to decompose the runoff sequence into trend, seasonal and residual components. The weights are dynamically calculated through heterogeneous expert set and gating network to output multi-step prediction sequence, and dynamic prediction is performed by combining hydrological context state vector.
It achieves stable prediction of complex dynamic environments, improves the prediction accuracy and data utilization efficiency of sparse extreme events, and ensures the interpretability and robustness of the prediction process.
Smart Images

Figure CN121503814A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of traffic prediction technology, specifically relating to a traffic time series prediction method and apparatus based on learnable decomposition and context-gated multi-expert fusion. Background Technology
[0002] Long-term time series forecasting (such as runoff forecasting) faces multiple challenges: the series contains a mixture of slowly drifting trends, multi-scale seasonal cycles, mechanism transitions, and sparse extreme events. Existing methods generally suffer from two drawbacks: (1) Classical statistical decomposition or linear models are easy to implement and interpret, but struggle to capture complex nonlinear interactions and mechanism-dependent dynamics. (2) While end-to-end deep learning models (such as Transformer and LSTM) excel in pattern extraction, they tend to entangle seasonality and stochastic energy, require large amounts of labeled data, and perform poorly on extreme events that are less frequent than the main flow data. Furthermore, most methods rely on a single inductive bias (such as periodicity, long-range dependence, or local memory), lack adaptability to dynamic contextual conditions, and fail to fully utilize unlabeled or low-confidence data segments, which limits their generalization ability and deployment reliability under complex dynamics in the real world. Summary of the Invention
[0003] To address the problems existing in the prior art, this invention provides a traffic time series prediction method and apparatus based on learnable decomposition and context-gated multi-expert fusion. The aim is to stably and explicitly convert two types of information, "historical observation sequence" and "current context state", into "future multi-step prediction sequence", and ensure that this prediction process is interpretable and robust to changes in data distribution.
[0004] To achieve the above objectives, the present invention provides the following solution: A traffic time-series prediction method based on learnable decomposition and context-gated multi-expert fusion, the method comprising: The variance of the original runoff sequence is softly partitioned by learning-trend seasonal residual decomposition; The soft partitioning results are input into a heterogeneous set of experts, and the hydrological context state vector is input into a gating network. The convex combination weights of each expert are dynamically calculated, and the runoff prediction sequence is output.
[0005] Preferably, the method for softly partitioning the variance of the original runoff sequence through learnable trend seasonal residual decomposition includes: Input sequence ,in, Indicates time runoff observations The historical window length is decomposed into three additive components: ; in, The trend component represents the slowly changing baseline in the sequence. The seasonal component represents the quasi-periodic fluctuations in the sequence. The residual component represents the remaining portion not explained by the trend and seasonal components.
[0006] Preferably, a preset includes A collection of heterogeneous experts Each expert will set a residual window And optional covariates are mapped to a multi-step prediction vector. .
[0007] Preferably, the preset methods for hydrological context state vectors include: The hydrological mechanism context is encoded as a time... Constructed vector : ; in, Represents the accumulated days of a year, with a range of values. or This indicates the day of the year and is used to capture the phase of the annual cycle. This represents the previous precipitation index, calculated using the following formula: , Indicates the first Rainfall of the day, This indicates the number of days prior to the consideration. Indicates the attenuation factor. This indicates the residual sequence in the short window. within variance, The window length is used to capture recent volatility. Indicates the current daily precipitation The percentile of the historical daily precipitation record in the basin, with a range of values. , This indicates the indicator function, given the current runoff observation value. Exceeding the 90th percentile of historical runoff data The value is 1 when the flood is in progress and 0 otherwise, serving as a marker for the onset of a potential flood.
[0008] Preferred methods for dynamically calculating the convex combination weights of each expert include: ; in, Indicates the first One expert The predicted residual value at time step, Indicates the first Normalized weights of individual experts To predict the step size, This indicates the number of heterogeneous experts.
[0009] Preferably, the final runoff prediction is obtained by superimposing the back-decomposition structure: ; in, By respectively learning the linear projection weights and seasonal spectrum base Scroll forward Step extrapolation is obtained, Indicates the first The learnable cosine and sine coefficients corresponding to each harmonic. This indicates the number of harmonics retained, controlling seasonal complexity.
[0010] The present invention also provides a traffic time series prediction device based on learnable decomposition and context-gated multi-expert fusion, the device being used to implement the aforementioned method, the device comprising: a partitioning module and a prediction module; The partitioning module is used to softly partition the variance of the original runoff sequence through learnable trend seasonal residual decomposition. The prediction module is used to input the soft partitioning results into a heterogeneous set of experts, input the hydrological context state vector into a gating network, dynamically calculate the convex combination weights of each expert, and output the runoff prediction sequence.
[0011] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention proposes three guiding principles: (1) In any evaluation or comparison, the trend, seasonality, and residual components in the sequence should be clearly separated and modeled accordingly; (2) Conditional adaptability should always be regarded as the core, and the most suitable model experts should be dynamically selected or combined through a context-aware mechanism; (3) Maximize data utilization efficiency, and transform unlabeled periods from passive backgrounds into effective signals that actively shape representations through semi-supervised and self-supervised learning objectives. This invention aims to stably and explicitly transform the two types of information, "historical observation sequence" and "current context state," into "future multi-step prediction sequence," and ensure that this prediction process is interpretable and robust to changes in data distribution. Attached Figure Description
[0012] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments are briefly introduced below. Obviously, the 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.
[0013] Figure 1 This is a schematic diagram of the flow chart of the traffic time series prediction method based on learnable decomposition and context-gated multi-expert fusion according to an embodiment of the present invention. Detailed Implementation
[0014] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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 are within the scope of protection of the present invention.
[0015] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0016] Example 1 The core problem addressed by this invention is: how to make accurate, stable, and deployable traffic prediction decisions in the context of non-stationary, multi-scale, and sparse extreme events in long-term time-series prediction, while ensuring robustness to data distributions not seen during training, especially given the dynamic nature and uncertainty of these environments. To this end, as... Figure 1 As shown, this invention proposes a flow time-series prediction method based on learnable decomposition and context-gated multi-expert fusion: First, the variance of the original sequence is softly partitioned through learnable trend seasonal residual decomposition to reduce the non-stationarity faced by downstream modules; then, the residuals are input into a compact set of heterogeneous experts; in the fusion stage, the hydrological context state vector is input into the gating network, the convex combination weights of each expert are dynamically calculated, and a unique and physically meaningful prediction sequence is output. Training is completed through semi-supervised multi-task objectives, integrating supervision error, mask reconstruction, multi-scale contrast alignment, enhanced consistency, and variance filtering pseudo-labels. Optionally, frozen prior knowledge of the underlying time encoder is efficiently injected through an adapter or LoRA layer. Evaluation uniformly uses mean squared error and mean absolute error, while reporting peak error and timing accuracy on extreme events, and performs ablation tests on components such as decomposition, gating, and semi-supervised methods to verify the effectiveness and generalization ability of the method. The specific implementation process is as follows: First, let's explain the input and output: Input: Historical Time Series Window in, Indicates time Observed values (e.g., runoff, in units) ), The length of the history window (unit: number of time points).
[0017] Output: Future Predicted sequence of steps ,in, For prediction step size (unit: number of time points).
[0018] Context state : Refers to the environmental summary information related to the prediction target at the current moment.
[0019] Learnable trend seasonal residual decomposition: First, the input sequence It can be decomposed into three additive components: ; in: Trend component: Represents the slowly changing baseline in the sequence. Seasonal component: representing quasi-periodic fluctuations in a sequence. The residual component represents the remaining portion that is not explained by the trend and seasonal components, and typically contains high-frequency noise, sudden events, or mechanism transition signals.
[0020] Composition and calculation: Trend Components Learning through a linear projection: ; in: Learnable weight vector, each element The corresponding history window The importance of observations at each time point. Learnable bias terms. Historical observation vector.
[0021] Seasonal portion Parameterization by truncated Fourier basis classes: ; in: The number of harmonics retained controls the seasonal complexity. : Base period, usually initialized to 365 (for an annual period), but can be learned or fine-tuned during validation. The learnable cosine and sine coefficients corresponding to each harmonic. Time index.
[0022] residual components Calculations show that: ; This invention is not mandatory. Instead of processing it as white noise, we delegate it to a downstream complementary expert group for processing.
[0023] Residual expert ensemble and adaptive gating: Define a containing A collection of heterogeneous experts Each expert will set a residual window. And optional covariates are mapped to a multi-step prediction vector. .
[0024] The core of heterogeneous expert ensembles lies in achieving precise capture of different features (high-frequency noise, sudden events, mechanism transitions) in residual components through differentiation in model structure, inductive preferences, and attention scales, distinguishing it from the "homogeneous expert repetitive stacking" design in existing technologies. The definition includes... A collection of heterogeneous experts Each expert has a mapping function with a unique structure, the specific expression of which is as follows: The specific structural and functional differences among the experts are as follows: : 1D-CNN expert, with a kernel size of 3, capturing local spatiotemporal correlation features of residual sequences (such as short-term fluctuation clustering); : Bidirectional LSTM expert (64 hidden layer dimensions) to capture long-range dependency features of residual sequences (such as cross-time mechanism transformation). Attention-enhanced MLP expert (3 fully connected layers + self-attention layer) to capture the nonlinear interaction features between residuals and covariates; Graph Convolutional Network (GCN) expert (based on watershed sub-unit adjacency matrix) captures the spatial correlation features of watersheds (such as the impact of upstream sub-watersheds on downstream areas).
[0025] Optional covariates are dynamic hydrological-meteorological-underlying surface characteristics that are strongly correlated with runoff prediction, overcoming the limitations of existing technologies that rely solely on historical precipitation and runoff data. Specifically, these include: ; Average soil volumetric water content in the watershed at time t (unit: ), range of values ; Potential evaporation at time t (in mm), calculated using the Penman-Montes formula; : Daily average temperature at time t (unit: °C); Vegetation cover index of the watershed at time t, with a range of values. This reflects the vegetation's interception capacity; Average flow velocity at time t (unit: ), which is indirectly derived from the flow meter.
[0026] The mapping process consists of three steps: "covariate preprocessing - feature encoding - cross-modal fusion," ensuring the effective combination of covariates and residual sequences. Covariate preprocessing involves temporal alignment of the covariates (with the residual window). Consistent time granularity) and normalization: in The historical mean and standard deviation of covariate i are used (calculated and fixed using offline data). Covariate feature encoding: Low-dimensional covariates are mapped to high-dimensional feature vectors through a learnable embedding layer. in It is a 2-layer fully connected network (input dimension 5, hidden dimension 32, output dimension 64). Cross-modal fusion: The encoded covariate features are concatenated with the residual sequence features and input into the corresponding expert model: Residual sequence feature extraction: (Conv1d kernel size 3, output dimension 64); Fusion features: Expert output: .
[0027] Context vector Composition: The hydrological mechanism context is encoded as a time... Constructed vector : ; in: Yearly accumulated days, range of values or It indicates the day of the year and is used to capture the phase of the annual cycle. The previous precipitation index is calculated using the following formula: . No. Rainfall per day (unit: mm). : The number of days to consider in the early stage, for example . Attenuation factor, range of values ,For example . Residual sequences in short windows within variance, For window length (e.g.) (This is used to capture recent volatility.) Current daily precipitation The percentile of the historical daily precipitation records in this basin, with a range of values. . : Indicator function, when the current runoff observation value Exceeding the 90th percentile of historical runoff data The value is 1 when the flood is in progress and 0 otherwise, serving as a marker for the onset of a potential flood.
[0028] Static watershed descriptor: includes watershed area (unit: km²) 2), average slope (unit: degrees), land cover ratio (e.g., forest, urban, farmland ratio, value range) ) or soil category embedding vector.
[0029] A two-layer MLP (Multilayer Perceptron) As input, generate unnormalized expert scores. The vector is converted to a convex weight vector using softmax. ; in: : No. The unnormalized score logit of each expert. The normalized weights of each expert satisfy the following conditions: And the sum of all weights is 1.
[0030] The multi-step prediction of the residuals is a convex combination of the predictions from various experts: ; in: Indicates the first One expert The predicted residual value at time step.
[0031] The final runoff prediction is obtained by superimposing the back-decomposition structure: ; in: and By respectively learning the linear projection weights and seasonal spectrum base Scroll forward It is obtained by stepping outward.
[0032] 1. Trend Components Calculation (Dynamic Trend Adaptive Extrapolation) Textual description: First, the trend baseline within the historical window is obtained through learnable linear projection. Then, an "adaptive factor for the rate of change of trend" is introduced, which is used to extrapolate the future trend based on the evolution of historical trends. Trend tracking. This factor can dynamically capture the acceleration, deceleration, or steady changes in trends, avoiding the limitations of "static linear extrapolation" in existing technologies.
[0033] Formula derivation: Historical trend baseline calculation (basic learning stage): in, It is a learnable weight vector (corresponding to the importance of each time point in the historical window). For bias terms, This is a historical observation sequence.
[0034] Trend change rate calculation: Based on the K most recent historical trend values, calculate the local change rate of the trend. This reflects the dynamic evolution of trends: Where K is the calculation window for the trend change rate (default value is 5, which can be adjusted according to the data frequency). This formula uses the relative change of adjacent trends to avoid the problem of absolute change being affected by the magnitude.
[0035] future Trend extrapolation: Adaptive extrapolation is performed by combining the trend baseline and rate of change, while adding constraints to prevent excessive trend deviation. in, This is a step size decay factor (ensuring that the further the prediction step, the more gradual the impact of the rate of change, which conforms to the trend evolution law). For regularization terms The standard deviation of the historical trend residuals is used to avoid trend drift.
[0036] 2. Seasonal portion The calculation (multi-scale context adaptive harmonic extrapolation) Text description: Breaking through the limitations of existing technologies with "single fixed period", this method adopts a multi-scale learnable period + context-adaptive harmonic coefficient. By superimposing harmonics at three scales (year, season, and month) and dynamically adjusting the coefficients in conjunction with the hydrological context, it achieves accurate extrapolation of seasonal characteristics.
[0037] Formula derivation: Multi-scale harmonic basis learning: The seasonal component is composed of the superposition of harmonics at three scales: year (Y), season (Q), and month (M). The period of each scale can be learned, and the number of harmonics can be adjusted. in: The initial (annual cycle) is 365 / 366. The initial (quarterly cycle) is 90. The initial value for the (monthly cycle) is 30, and all of these are learnable parameters (fine-tuned during training based on seasonal runoff patterns). (The number of harmonics retained at each scale, balancing complexity and accuracy); Let be the initial learnable coefficients of the m-th harmonic at each scale.
[0038] Context-Adaptive Coefficient Adjustment: Based on Hydrological Context State Vector (Including annual precipitation data (DOY), previous precipitation index (API), etc.), dynamically adjust the harmonic coefficients to adapt seasonal forecasts to the current hydrological scenario: in, Adjust the weights for the coefficients (learnable). For a 2-layer multilayer perceptron (input) Output adjustment factors in the range [0, 0.5] to achieve the mapping of "current hydrological conditions → seasonal coefficient adaptive".
[0039] future Step-seasonal extrapolation: Combining the adjusted harmonic coefficients and the scale phase of future time points, extrapolate the future... Seasonal portion: For phase correction term (from current year day) Calculations are performed to ensure that the seasonal phase matches the actual time.
[0040] 3. Residual components The calculation (dynamic expert fusion for uncertainty calibration). Text description: Based on the prediction of heterogeneous expert ensembles, "expert confidence calibration" and "residual smoothing constraint" are introduced. The gating weights not only depend on the context matching degree, but also combine the historical prediction errors (uncertainty) of experts, while suppressing the interference of extreme residuals, thereby improving the stability and reliability of residual prediction.
[0041] Formula derivation: Initial expert predictions (foundational stage): Heterogeneous expert set For the residual window respectively Make a prediction and output the k-th expert's prediction for the future. Residual prediction values of the step .
[0042] Expert confidence score calculation: Based on the prediction errors of experts in similar historical hydrological scenarios, the confidence score of each expert is calculated. The smaller the error, the higher the confidence level. in, For a set of historical samples similar to the current hydrological context, The number of samples is given by the formula, which maps the error to the confidence level in the interval [0,1] using an exponential function.
[0043] Dynamic gating weight calibration: the original weights output by the gating network. Combined with expert confidence level Perform calibration to obtain the final normalized weights. in, For gating networks based on hydrological context The original weights of the output are calibrated to ensure that high-confidence experts receive higher weights.
[0044] Residual prediction and smoothing constraints: Residual predictions are calculated based on calibrated weights, and a smoothing term is added to suppress extreme values. in, The smoothing factor (default value is 0.01) reduces the excessive influence of high-frequency noise and extreme events by penalizing abrupt changes in the residuals of adjacent steps, while preserving effective burst signals (such as residual spikes caused by short-term heavy rain).
[0045] Semi-supervised multi-task objectives: The overall loss function combines supervised fidelity, self-supervised structure learning, and regularization: ; Each of them The weights are non-negative scalars and are optimized on the validation data.
[0046] Supervised composite loss : For The annotation window at the end defines the point-by-point error. ,in It is the actual value. This is a predicted value.
[0047] MSE+MAE Basics: .
[0048] : The weighting hyperparameter that balances the squared error and the absolute error.
[0049] Extreme flow emphasis: .
[0050] Extreme event weighting coefficient.
[0051] Hydrological efficiency indicators: NashSutcliffe Efficiency: NSE ,loss ,in It is the mean of the true values within the prediction window.
[0052] KlingGupta efficiency: ,loss .
[0053] : The correlation coefficient between the predicted value and the actual value.
[0054] : The ratio of the standard deviation of the predicted value to the actual value.
[0055] The ratio of the predicted value to the mean of the actual value.
[0056] Supervision aggregation: ,in It is the weight of the influence of each modulated part.
[0057] Mask Reconstruction Loss : ; in, It is the set of time indices in the input window that are randomly masked. It is the number of mask positions. It is the model's view of the masked position. The reconstructed value.
[0058] Multi-scale contrast alignment loss : ; in: Time point In scale Potential representation vectors (e.g., day, week, month). : Vector inner product. Temperature parameter used to adjust the sharpness of the distribution.
[0059] The summation term in the denominator includes positive sample pairs. and many negative sample pairs ,in .
[0060] Enhanced consistency loss : ; in These are the predicted values obtained after applying two different random augmentations to the same input.
[0061] Variance filtering pseudo-label loss : ; in: The average of the predictions from various experts is used as a pseudo-label. The variance of each expert's prediction serves as a proxy for uncertainty. :satisfy of For sets, It is the variance threshold (e.g., taking the 25th percentile of the variance distribution).
[0062] Regularization term : ; in: Gating weight vector Shannon entropy encourages sparse activation. : L2 norm (weight decay) of all weight parameters in the model. : The corresponding regularization intensity hyperparameter.
[0063] Example 2 The present invention also provides a traffic time series prediction device based on learnable decomposition and context-gated multi-expert fusion, the device being used to implement the aforementioned method, the device comprising: a partitioning module and a prediction module; The partitioning module is used to softly partition the variance of the original runoff sequence through learnable trend seasonal residual decomposition. The prediction module is used to input the soft partitioning results into a heterogeneous set of experts, input the hydrological context state vector into a gating network, dynamically calculate the convex combination weights of each expert, and output the runoff prediction sequence.
[0064] Example 3 This invention is deployed in a closed-loop industrial control system consisting of a perception layer, a decision-making layer, and an execution layer.
[0065] Sensing layer: Composed of a network of physical sensors deployed across a specific watershed. This network includes, but is not limited to: ultrasonic flow meters (used to monitor the flow velocity at river cross-sections in real time and calculate instantaneous flow rates). ,unit Tipping bucket rain gauge (used to collect real-time precipitation data) ,unit In addition, static watershed descriptors (such as watershed area, average slope, and land cover type) are pre-loaded into the system as prior knowledge.
[0066] Decision-making layer: The core algorithm of this invention, as a software module, runs on an industrial server or edge computing gateway in the watershed management center. This module receives real-time data streams from the perception layer, executes the following processes, and generates prediction and control instructions.
[0067] The execution layer includes the reservoir gate servo controller and the early warning information dissemination terminal. The gate controller, based on instructions from the decision-making layer, drives the motor to adjust the gate opening, thereby precisely controlling the outflow. The early warning terminal, based on predicted extreme events, automatically triggers audible and visual alarms or sends flood warning SMS messages to pre-set mobile terminals via a communication module. The specific implementation process includes: Mapping between data streams and physical objects: All data processed by this invention originates from the aforementioned physical sensors and ultimately acts on control devices in the physical world.
[0068] Physical source of input data: historical time series window Directly from ultrasonic flow meters in the past It consists of a sequence of readings at each time point. Context state vector Each component in the equation has a clear physical correspondence: The system's internal real-time clock chip ensures accurate annual cycle phase.
[0069] Precipitation sequence collected by tipping bucket rain gauge Calculated based on physical hydrological models (such as attenuation models), it reflects the initial moisture level of the watershed soil.
[0070] The fluctuations in recent readings of the flowmeter directly reflect the physical instability of the river flow.
[0071] and It is a statistical measure calculated based on historical sensor data, used to identify abnormal physical events (such as heavy rainfall or the initial appearance of floods).
[0072] Output driving physical devices: the future of model output Step prediction sequence It is directly converted into a control signal: Driven gate controller: The predicted sequence is input into the reservoir scheduling rule model to calculate the optimal gate opening sequence for the next few hours. This sequence is then sent to the gate servo controller, which converts it into motor drive signals to achieve feedforward-feedback composite control of the reservoir discharge. For example, when the predicted... When a flood peak is expected, the system will alert the system in advance. The gate is opened wider at all times to pre-release water, thereby physically reducing the peak flood level in the downstream river channel.
[0073] Triggering the early warning terminal: When the predicted value When the safety threshold is exceeded, the system will immediately send a command to the warning information issuing terminal. The terminal will then activate the audible and visual alarm and send warning information in batches, realizing a physical world response from prediction to alarm.
[0074] Real-world engineering and technical problems solved: This method, through the implementation of the aforementioned combination of hardware and software, solves two prominent engineering and technical problems in traditional hydrological prediction and control systems: Improving the speed and reliability of flood control emergency response: Traditional systems rely on lagging human judgment or simple models with inaccurate predictions, making it impossible to respond quickly and accurately to sudden floods. This invention, through accurate prediction of sparse extreme events, increases the early warning lead time from minutes to hours and provides a reliable decision-making basis for automatic gate control, realizing a shift from "passive response" to "proactive and precise control," significantly reducing the risk of dam failure and downstream loss of life and property.
[0075] Achieving precise scheduling and utilization of water resources: During non-flood seasons, traditional methods often lead to water waste or insufficient supply because they cannot accurately predict runoff changes at multiple scales (daily, weekly, and monthly). The learnable decomposition and multi-expert fusion mechanism of this invention can accurately capture trends and seasonal changes, providing long-term and reliable predictive support for the precise scheduling of urban water supply and agricultural irrigation, directly improving the utilization efficiency of water resources, a core element of industry and daily life.
[0076] Engineering details of algorithm implementation: In specific algorithm deployments, to ensure their stability and reproducibility in industrial environments, the following steps are implemented: All input features received from the sensor (such as...) Static descriptors, etc., are all standardized online, and their mean values are... with standard deviation The calculations are performed on a large amount of historical sensor data and then stored in the system.
[0077] The parameters of the expert network and the gated network are initialized uniformly using Xavier to ensure the convergence stability of the model training.
[0078] Training was performed using the AdamW optimizer, with the learning rate set to... The batch size is 64. During training, batches are sampled and labeled alternately. And unlabeled batches composed of massive amounts of unlabeled historical sensor data To fully explore the value of data.
[0079] During the inference phase, for real-time sensor data, the model executes the following steps sequentially: decomposition → context encoding and gating calculation → expert selection and residual prediction → final prediction synthesis. The entire process has low time complexity, meeting the requirements of online, real-time predictive industrial control, ensuring that calculations are completed and commands are issued before the next control cycle begins.
[0080] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made to the technical solutions of the present invention by those skilled in the art without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.
Claims
1. A traffic time-series prediction method based on learnable decomposition and context-gated multi-expert fusion, characterized in that, The method includes: The variance of the original runoff sequence is softly partitioned by learning-trend seasonal residual decomposition; The soft partitioning results are input into a heterogeneous set of experts, and the hydrological context state vector is input into a gating network. The convex combination weights of each expert are dynamically calculated, and the runoff prediction sequence is output.
2. The method according to claim 1, characterized in that, Methods for softly partitioning the variance of the original runoff series through learnable trend seasonal residual decomposition include: Input sequence ,in, Indicates time runoff observations The historical window length is decomposed into three additive components: ; in, The trend component represents the slowly changing baseline in the sequence. The seasonal component represents the quasi-periodic fluctuations in the sequence. The residual component represents the remaining portion not explained by the trend and seasonal components.
3. The method according to claim 2, characterized in that, Preset a containing A collection of heterogeneous experts Each expert will set a residual window And optional covariates are mapped to a multi-step prediction vector. .
4. The method according to claim 3, characterized in that, Pre-defined methods for hydrological context state vectors include: The hydrological mechanism context is encoded as a time... Constructed vector : ; in, Represents the accumulated days of a year, with a range of values. or This indicates the day of the year and is used to capture the phase of the annual cycle. This represents the previous precipitation index, calculated using the following formula: , Indicates the first Rainfall of the day, This indicates the number of days prior to the consideration. Indicates the attenuation factor. This indicates the residual sequence in the short window. within variance, The window length is used to capture recent volatility. Indicates the current daily precipitation The percentile of the historical daily precipitation record in the basin, with a range of values. , This indicates the indicator function, given the current runoff observation value. Exceeding the 90th percentile of historical runoff data The value is 1 when the flood is in progress and 0 otherwise, serving as a marker for the onset of a potential flood.
5. The method according to claim 1, characterized in that, Methods for dynamically calculating the convex combination weights of each expert include: ; in, Indicates the first One expert The predicted residual value at time step, Indicates the first Normalized weights of individual experts To predict the step size, This indicates the number of heterogeneous experts.
6. The method according to claim 5, characterized in that, The final runoff prediction is obtained by superimposing the back-decomposition structure: ; in, By respectively learning the linear projection weights and seasonal spectrum base Scroll forward Step extrapolation is obtained, Indicates the first The learnable cosine and sine coefficients corresponding to each harmonic. This indicates the number of harmonics retained, controlling seasonal complexity.
7. A traffic time-series prediction device based on learnable decomposition and context-gated multi-expert fusion, the device being used to implement the method described in any one of claims 1-6, characterized in that, The device includes: a division module and a prediction module; The partitioning module is used to softly partition the variance of the original runoff sequence through learnable trend seasonal residual decomposition. The prediction module is used to input the soft partitioning results into a heterogeneous set of experts, input the hydrological context state vector into a gating network, dynamically calculate the convex combination weights of each expert, and output the runoff prediction sequence.