Micro-grid dynamic scheduling method based on deep learning
By using multi-resolution wavelet transform and Fourier transform decomposition, spatial adjacency matrix and multi-scale attention network to dynamically adjust feature weights, the problems of feature adaptation and cross-scenario generalization in microgrid scheduling are solved, and high-precision and stable microgrid prediction is achieved.
Patent Information
- Application Number
- CN202511126156.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-11-28
AI Technical Summary
Existing deep learning models lack the ability to adapt features across multiple spatiotemporal scales in microgrid scheduling, making it difficult to accurately integrate key variables. Furthermore, their cross-scenario generalization ability is insufficient, resulting in weak prediction generalization and easy model failure.
Multi-resolution wavelet transform and Fourier transform are used to decompose multivariate data. By combining spatial adjacency matrix and multi-scale attention gating network, feature weights are dynamically adjusted. The model is optimized through online parameter update and meta-learning backtracking mechanism to achieve high spatiotemporal resolution prediction.
The model's interpretability and modeling accuracy for key dynamic changes in microgrids have been improved, its ability to capture spatial relationships and its prediction accuracy have been enhanced, and the model's stability and cross-scenario adaptability in complex scenarios have been ensured.
Smart Images

Figure CN121032255A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of microgrid scheduling technology, and in particular to a microgrid dynamic scheduling method based on deep learning. Background Technology
[0002] Currently, microgrid systems are increasingly becoming an important foundation for distributed energy access and smart distribution networks. Driven by the high proportion of renewable energy, the widespread adoption of power electronic equipment, and the dynamic changes of multi-source heterogeneous loads, microgrid scheduling and status prediction face a complex and ever-changing operating environment. To achieve high-precision prediction of key indicators such as microgrid load, power supply status, and equipment health, and to support the dynamic optimization of energy production and storage scheduling, effectively integrating operational characteristic information across multiple spatiotemporal scales has become a mainstream research direction in academia and industry.
[0003] The existing solutions have the following main technical challenges and shortcomings:
[0004] (1) Limited feature adaptability under multiple temporal and spatial scales: Existing deep temporal and graph network methods usually pre-set the feature weight allocation to static or semi-static, lacking the ability to dynamically adjust the contribution of variables in different time periods and different spatial regions in real time. This results in the model responding slowly to uncertainties in multiple scenarios and environments, and the prediction generalization ability is not strong.
[0005] (2) Feature coupling and interference from weakly correlated variables: Current feature fusion often relies on static weights or simple splicing, making it difficult to accurately select the variables that play the most dominant role in a specific spatiotemporal local interval. Weakly correlated or redundant features are prone to "noise pollution" under complex working conditions, affecting the stability and interpretability of the model.
[0006] (3) Weak cross-scenario generalization and online adaptability: Microgrids face transient changes in scenarios such as seasonal transitions, equipment aging, and sudden events. Currently, the parameters of mainstream prediction models often need to be retrained offline, making it difficult to efficiently migrate online or adaptively correct parameters based on real-time feedback, which leads to the model easily "failing" in actual operation. Summary of the Invention
[0007] To address the aforementioned technical problems, this invention provides a microgrid dynamic scheduling method based on deep learning.
[0008] The technical solution of this invention is implemented as follows: A microgrid dynamic scheduling method based on deep learning, comprising:
[0009] S1: Acquire historical and real-time multivariate operating data of each node in the microgrid system at multiple spatiotemporal locations, and simultaneously record the geographical location information and physical connection relationship of each sensor point;
[0010] S2: The acquired multivariate time series data is preprocessed using outlier detection and distribution normalization algorithms to obtain normalized multivariate feature sequences;
[0011] S3: Based on the normalized multivariate feature sequence, multi-resolution wavelet transform and Fourier transform are used to decompose each variable at different time scales to generate the corresponding multi-scale time series feature set.
[0012] S4: Combine the geographical location information of each sensor point with the physical connection relationship of the device to construct a spatial adjacency matrix;
[0013] S5: Input the multi-scale temporal feature set and the spatial adjacency matrix into the multi-scale attention gating network, and independently calculate the attention weight coefficients of each variable in the current spatiotemporal segment in each time window and spatial region.
[0014] S6: Based on the attention weight coefficients and the spatial adjacency matrix, a dynamic topological graph convolutional network and a temporal neural network are used for joint modeling. The weighted feature sequence is embedded into the graph temporal fusion prediction structure to capture nonlinear coupling patterns in multiple spatiotemporal dimensions.
[0015] S7: Perform multi-step prediction on the output of the graph time-series fusion prediction structure to generate high spatiotemporal resolution prediction values of microgrid load and power supply status in future time periods, and add dynamic contribution weights of each spatiotemporal feature.
[0016] S8: Input the prediction results into the feedback channel in real time, collect data on the actual operation status and abnormal events of the microgrid, and continuously adjust the multi-scale attention weights and model parameters using an online parameter update algorithm;
[0017] S9: When a cross-scene drift in sample distribution or a change in environmental category label is detected, the meta-learning backtracking mechanism is triggered to review and compare the feature weight configuration and prediction error in each scene, and optimize the model transfer strategy accordingly.
[0018] S10: Output the final multi-step prediction values and the dynamic weight distribution results of key features, and record the full-process performance and parameter logs for continuous system performance optimization.
[0019] This application provides a microgrid dynamic scheduling method based on deep learning, which has the following advantages:
[0020] (1) By integrating multi-resolution wavelet transform and Fourier transform with historical and real-time multivariate data collected from multi-source sensor nodes, feature decomposition is achieved at multiple time scales such as minutes, hours, days, and seasons. This enables the hierarchical capture of local high-frequency disturbances, abrupt events, and global periodic trends in complex systems, greatly improving the model's sensitivity to the "hidden dynamics" and multi-scale non-stationarity of the original data. Compared with traditional single-scale or directly input deep time series models, feature hierarchical refinement and fusion can significantly improve the interpretability and modeling accuracy of key dynamic changes in microgrids.
[0021] (2) Combining the geographical distribution of nodes with the physical connectivity of equipment, a spatial distance-physical topology weighted fusion algorithm is adopted to automatically construct a spatiotemporal dynamic adjacency matrix. This not only accurately describes the spatial correlation of heterogeneous nodes within the microgrid area but also fully reflects the actual engineering attributes such as physical trunk lines and branches. Compared with the traditional fixed regular adjacency matrix or manually set weight mode, automatic modeling enables spatial dependency information to dynamically adapt to the scene, improves the model's ability to capture complex spatial relationships, increases the accuracy of predicting the effects of changes in inter-node correlations, and significantly enhances the early warning capability of topology anomalies / remote anomalies.
[0022] (3) By designing a multi-scale attention gating network under spatiotemporal partitioning, each spatiotemporal region independently and dynamically calculates the attention and gating weights for each variable and multi-scale feature, enabling key variables (such as sudden loads and abnormal equipment) to adaptively highlight when affecting scheduling prediction, while local irrelevant disturbances are automatically suppressed. This mechanism breaks through the bottleneck of traditional static feature weighting and ordinary attention mechanisms, which can only perform global averaging or single-scale adjustments, and achieves accurate, agile, and interpretable quantification of variable contributions.
[0023] (4) Attention-weighted multi-scale features are input into a dynamic graph convolutional network and fused with temporal recursive units such as LSTM / GRU to effectively jointly model spatial dependencies and temporal dynamics between nodes. This not only captures direct relationships between nodes but also uncovers complex cross-regional, multi-scale long / short-term couplings. This structure overcomes the limitations of traditional models that only perform horizontal (spatial) or vertical (temporal) modeling and ignore spatiotemporal coupling, thus significantly improving prediction performance in complex scenarios.
[0024] (5) By introducing a feedback channel between prediction and actual operation, integrating online parameter updates and anomaly labeling-driven weight fine-tuning, the model structure and weights can be continuously self-corrected for non-stationary disturbances such as environmental drift, equipment aging, and sudden events, maintaining stable prediction accuracy over long-term operation. Combined with the meta-learning scenario backtracking mechanism, the model can quickly adjust parameter configurations for new business areas or scenario switching, greatly expanding the system's generalization capabilities across regions, seasons, and devices. Attached Figure Description
[0025] Figure 1 This is the main flowchart of a microgrid dynamic scheduling method based on deep learning according to the present invention;
[0026] Figure 2 This is a sub-flowchart of a microgrid dynamic scheduling method based on deep learning according to the present invention.
[0027] Figure 3 This is a sub-flowchart of a microgrid dynamic scheduling method based on deep learning according to the present invention. Detailed Implementation
[0028] To make the objectives and advantages of the present invention clearer, the present invention will be further described below with reference to embodiments; it should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.
[0029] Preferred embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.
[0030] When used herein, the singular forms of “a,” “an,” and “the” may also include the plural forms unless the context clearly indicates otherwise. It should also be understood that terms such as “comprising / including” or “having” specify the presence of the stated features, integrals, steps, operations, components, parts, or combinations thereof, but do not preclude the possibility of the presence or addition of one or more other features, integrals, steps, operations, components, parts, or combinations thereof. Meanwhile, the term “and / or” as used in this specification includes any and all combinations of the associated listed items.
[0031] Please see Figures 1-3 As shown, a microgrid dynamic scheduling method based on deep learning includes:
[0032] As attached Figure 1 As shown, this application provides a microgrid dynamic scheduling method based on deep learning, specifically including:
[0033] S1: Acquire historical and real-time multivariate operating data of each node of the microgrid system at multiple spatiotemporal points. The multivariate data includes meteorological information, load, power status and key equipment operating parameters, and synchronously record the geographical location information and physical connection relationship of each sensor point.
[0034] S2: Preprocess the acquired multivariate time series data by using outlier detection and distribution normalization algorithms to remove invalid data and eliminate data scale differences between different sampling points, thereby obtaining a normalized multivariate feature sequence.
[0035] S3: Based on the normalized multivariate feature sequence, multi-resolution wavelet transform and Fourier transform are used to decompose each variable at different time scales (including minutes, hours, days, seasons, etc.) to generate the corresponding multi-scale time series feature set.
[0036] S4: Combining the geographical location information of each sensor point with the physical connection relationship of the device, construct a dynamic adjacency matrix based on spatial dependence to describe the spatial correlation and regional structural differences between nodes, and provide a basis for modeling spatial feature distribution.
[0037] S5: The multi-scale temporal feature set and spatial adjacency matrix are used as inputs to the multi-scale attention gating network. The attention weight coefficients of each variable in the current spatiotemporal segment are calculated independently in each time window and spatial region to achieve adaptive dynamic allocation of feature weights.
[0038] S6: Based on multi-scale attention weight coefficients and spatial adjacency matrix, a dynamic topological graph convolutional network and a temporal neural network are jointly modeled to embed weighted feature sequences into the graph temporal fusion prediction structure, thereby capturing nonlinear coupling patterns in multiple spatiotemporal dimensions.
[0039] S7: Perform multi-step prediction on the output of the graph time-series fusion prediction structure to generate high spatiotemporal resolution prediction values of microgrid load and power supply status in future time periods, and add dynamic contribution weights of each spatiotemporal feature.
[0040] S8: Input the prediction results into the feedback channel in real time, collect data on the actual operation status and abnormal events of the microgrid, and continuously adjust the multi-scale attention weights and model parameters using an online parameter update algorithm to enhance the dynamic adaptability to environmental changes, equipment aging and sudden events.
[0041] S9: When a cross-scene drift in sample distribution or a change in environmental category label is detected, the meta-learning backtracking mechanism is triggered to review and compare the feature weight configuration and prediction error in previous scenarios, and optimize the model transfer strategy accordingly to achieve efficient generalization prediction capability in multiple scenarios.
[0042] S10: Outputs the final multi-step predicted values and the dynamic weight distribution results of key features, providing data support for subsequent intelligent scheduling decisions and abnormal state analysis of the microgrid, and records the full-process performance and parameter logs for continuous system performance optimization.
[0043] Step S1: Acquire historical and real-time multivariate operational data of each node in the microgrid system at multiple spatiotemporal locations. The multivariate data includes meteorological information, load, power status, and key equipment operating parameters. Simultaneously, record the geographical location information and physical connection relationships of each sensor point. Specifically, this includes:
[0044] S1.1: Deploy multivariable sensor integrated terminals at each typical node of the microgrid system to collect historical and real-time raw data based on industrial IoT acquisition protocols, including meteorological information (such as temperature, humidity, wind speed, and radiation intensity), load curves, power output status, and key equipment operating parameters, aiming to build a foundation of raw multivariable time-series data covering multiple spatiotemporal points;
[0045] The input includes: the sorted microgrid network topology, a list of typical nodes, and the multivariate data collection requirements for the historical and real-time operation periods of each node;
[0046] By adopting on-site layout analysis and process criteria, key nodes in the microgrid system were selected, including main load nodes, renewable energy access points, energy storage system interfaces and core monitoring equipment nodes. Node deployment plans were formulated, and the types of variables and collection frequencies to be covered by each node were clarified.
[0047] A multivariable sensor integrated terminal (configured with multiple types of sensors such as temperature, humidity, wind speed, radiation intensity, current, voltage, and power) is physically installed at each typical node to ensure that the sensor node has comprehensive coverage of meteorological information (parameters: temperature, humidity, wind speed, radiation intensity), regional load, power output status, and key equipment operating parameters.
[0048] Furthermore, by using industrial IoT acquisition protocols (such as Modbus TCP, DL / T 645, IEC 61850), high-frequency synchronous acquisition of sensor data from multiple nodes is achieved, supporting a basic sampling period of 1 to 10 seconds, with 1 second being preferred. A gateway-based data station buffer mechanism is established to collect historical data and raw data from the current operating period in real time. Data from each node is transmitted via wired industrial Ethernet or dedicated wireless 4G / 5G links, ensuring that data packet latency jitter is less than 5ms and packet loss rate is less than 0.01%.
[0049] Furthermore, the raw data collected is initially standardized, timestamped, and locally buffered through the edge computing gateway, which improves the fault tolerance and data stability against sudden environmental disturbances and single-node anomalies.
[0050] The data frame structured coding method is adopted to archive the original observation values of each variable in an orderly manner according to sensor label, physical quantity type, acquisition timestamp and data distinction mark, and lay the data structure foundation for subsequent spatial mapping and multi-temporal alignment processing;
[0051] Through the above chain of actions, the deployment of multivariable sensor integrated terminals is combined with the industrial Internet of Things protocol acquisition method to transform into raw multivariable time series data of sensor nodes covering multiple spatiotemporal points. This provides basic support for subsequent feature mining of the core prediction algorithm for microgrid dynamic scheduling, and achieves the goals of wide coverage, high reliability and strong real-time performance of sensor data.
[0052] For example, on a 200kW distributed microgrid test platform, 10 typical nodes were selected to deploy multivariable sensor integrated terminals. Each terminal was equipped with 4 meteorological channels (temperature -40~70℃, humidity 0-100%, wind speed 0-40m / s, radiation 0-1400W / m²). 2 The system includes three power supply modules (voltage 0-500V, current 0-200A, power 0-100kW) and one equipment status monitoring module (switching quantity, temperature rise sensor, fan / pump operation status). All terminals connect to the local edge gateway and continuously collect full raw data for 7×24h using the IEC 61850 acquisition protocol with a basic sampling period of 1 second. Extended 4G communication modules were added to some nodes for signal redundancy transmission verification. During the acquisition, the average raw data latency was less than 3ms, the average packet loss rate per node was 0.007%, and structured multivariate raw time-series data was generated for all nodes, with an overall integrity of 99.98%. This data directly supports subsequent spatial geographic calibration, topology relationship entry, and multi-scale feature extraction, ensuring high-quality spatiotemporal data input is the fundamental technical condition for intelligent load / energy prediction of the microgrid.
[0053] S1.2: Based on microgrid network topology information and geographic information system (GIS) data, the physical location information of each sensor acquisition node is calibrated, and the geographical distribution of each node is encoded using a unified spatial coordinate system to obtain geospatial mapping data that can be used for spatial feature analysis.
[0054] The data frames, microgrid network topology, node list, and typical node physical location information transmitted back after the deployment of the multivariable sensor integrated terminal are used as the data input for this step.
[0055] Using a Geographic Information System (GIS) data interface, the original geographic parameters of the geographical location of each typical sensor acquisition node are extracted, enabling the automated reading of basic geographic attributes such as node longitude, latitude, elevation, and regional administrative number.
[0056] Furthermore, by using microgrid physical design drawings, construction site positioning information, and GIS spatial correction algorithms (parameters: node physical coordinate point set, error correction threshold, and regional boundary constraints), the actual physical location of nodes is corrected, ensuring high-precision consistency between the geographic coordinates of each collected node and the actual physical deployment point.
[0057] A unified spatial coordinate system (such as WGS-84 or China National Geodetic Coordinate System CGCS2000) is adopted to spatially encode the geographical location of each node, perform geographic coordinate standardization mapping, and uniformly transform the original latitude, longitude, elevation and other parameters into spatial vector expressions.
[0058] Furthermore, by associating geographic location codes with unique node IDs, a node spatial metadata table is constructed to enable bidirectional index retrieval of the physical location of each node and the microgrid network structure;
[0059] A spatial projection transformation algorithm is used to perform equal-area or equal-distance projection mapping on geographic element data, eliminating the error effects caused by terrain undulation and map scaling, generating a standardized spatial distribution point set, and realizing the comparability and superposition of nodes under a unified spatial reference system.
[0060] Based on the overall layout requirements of the microgrid, and combined with the relationship between node physical coordinates and network topology expansion, data files that can be used for spatial feature analysis and subsequent spatial dependency modeling are output, mainly including standardized node spatial coordinate matrices and spatial distribution visualization parameters.
[0061] Through the chain-like derivation process of the above-mentioned multi-level geographic calibration and spatial mapping, the physical location information of the microgrid acquisition nodes is transformed into structured geospatial mapping data that can be directly used for multi-temporal and spatial feature modeling. This provides a basic support for spatial dimension modeling and feature fusion algorithms for multi-temporal and spatial scale state prediction of microgrids, and realizes the standardized and accurate expression of node spatial relationships.
[0062] For example, in a smart microgrid test area, 10 data acquisition nodes were deployed at physical locations such as the main control transformer, branch loads, photovoltaic access points, wind power access points, and energy storage converters. The original field location records ranged from 117.1050°E to 117.1100°E, 36.6700°N to 36.6750°N, with elevations ranging from 8.5 to 9.2 meters. The physical coordinates of all nodes were extracted using a GIS geographic data interface, and the field layout map was read. The least squares method was used for coordinate correction, reducing the error to less than 0.15 meters. The CGCS2000 spatial coordinate system was selected, and the node latitude and longitude were uniformly standardized and mapped to (x, y, z) spatial coordinates. Elevation matching and regional boundary discrimination were performed on the node spatial point sets to eliminate map boundary artifacts. The generated node spatial coordinate matrix is as follows:
[0063]
[0064] The node spatial distribution data is archived as a structured JSON file, providing standard input for subsequent spatial correlation analysis, adjacency relationship construction, and dynamic spatial feature modeling. Field measurements verify that the average node spatial calibration error is 0.09 meters, with a maximum deviation not exceeding 0.18 meters, meeting the requirements for microgrid spatial analysis and high-precision location coding. This significantly improves the spatial consistency and correspondence between node physical attributes and data characteristics, providing a spatial interpretability foundation for the overall scheduling system.
[0065] S1.3: Collect information on the physical connection relationships, energy flow and signal flow topology between nodes, and generate the connection matrix between nodes based on the automatic network structure recognition algorithm, so as to provide a structural description basis for subsequent construction of spatial dependency modeling and dynamic graph structure;
[0066] S1.4: Perform data synchronization processing on historical and real-time multivariate time series data and spatial location information, unify timestamps and spatiotemporal scales, and use time alignment and spatial correspondence algorithms to generate spatiotemporally aligned multivariate datasets to ensure the consistency and accuracy of data in subsequent processing.
[0067] S1.5: Perform data integrity and reliability checks on the spatiotemporally aligned multivariate dataset, use industrial data quality assessment criteria to identify and mark abnormal or missing data information, provide a basis for data cleaning and completion for subsequent preprocessing modules, and finally output the original dataset of multi-spatial-time points of the structured microgrid.
[0068] Step S2: Preprocessing the acquired multivariate time-series data, employing outlier detection and distribution normalization algorithms to remove invalid data and eliminate data scale differences between different sampling points, to obtain a normalized multivariate feature sequence, specifically including:
[0069] S2.1: Perform preliminary consistency checks on historical and real-time acquired multivariate time-series data, and label and record missing values, abnormal acquisition periods or abrupt data segments based on data integrity detection algorithms to obtain labeled multivariate time-series data, providing a clean input object for subsequent outlier detection;
[0070] The input object is historical and real-time multivariate time series raw data collected through the Industrial Internet of Things protocol. The data has been identified with structured fields such as variable type, node number, and sampling timestamp.
[0071] A data consistency verification algorithm (parameters: timestamp integrity check, node data full recording rate threshold, variable coverage discrimination threshold) is used to perform preliminary screening of the consistency, synchronization, and integrity of the acquisition cycle in the raw data. Furthermore, missing value detection methods (such as Boolean mask detection and continuous missing acquisition interval statistics) are used to identify, quantify, and locate abnormal missing segments and zero-filled segments for each node and variable across the entire time series, and to form a missing event index list.
[0072] Furthermore, through the sampling anomaly window detection algorithm (parameters: reference sampling period, period fluctuation tolerance threshold), the abnormal sampling period segments in the time series—that is, timestamp breaks, perturbation periods and redundant interpolated frames caused by device restart, transmission jitter or manual operation—are automatically identified and accurately segmented to generate period anomaly marker vectors.
[0073] Furthermore, by using the mutation fragment detection method, combined with data gradient change rate threshold control and multivariate synchronous mutation logic, it is determined that there are sudden and drastic abnormal fluctuations in the acquired values within a short time window (such as measurement errors caused by sensor component failure, electromagnetic interference, circuit breaker control, etc.), and the data anomaly is identified by fragment-level masking.
[0074] Furthermore, through a labeling and merging algorithm based on three dimensions—data missing, periodic anomalies, and mutation events—various anomaly and defect labels are uniformly stored in a labeled multivariate time-series data structure. Through dedicated field partitioning, including normal sampling, missing segments, periodic anomaly segments, and mutation segments, complete labeling of each data point and segment is achieved.
[0075] Through the above algorithm chain processing, the original multivariate time series data is transformed into labeled multivariate time series data that has completed preliminary consistency screening and has detailed defect and anomaly labels, so as to realize unambiguous input for subsequent outlier detection, data cleaning and completion processes;
[0076] For example, in a smart microgrid platform, 10 nodes collect multivariate data 24 hours a day at 1-second intervals. The original collection results contain 864,000 samples (10 nodes × 24 hours × 3600 seconds). Among them, node 3 experienced intermittent communication module disconnection, resulting in 300 consecutive missing data points between 08:00 and 08:05. During the device self-test in the early morning, node 7 experienced sampling timing errors, leading to multiple frames of repeated sampling every 0.5 seconds between 05:00 and 05:02. At 16:30, the current measurement point of node 5 experienced a sudden observation value exceeding the normal range of ±5σ due to short-term interference. The system sequentially performs timestamp consistency verification, missing value mask detection, sampling frequency anomaly analysis, and abrupt change segment identification. The system automatically inserts corresponding tags for the missing segments, periodic anomaly segments, and abrupt change segments. The output tokenized multivariate time series data has added status identifiers (such as "normal", "missing", "cycle_abnormal", "outlier_surge") in the JSON fields. All defective data points are accurately segmented, located, and labeled. After manual review, the detection rate of missing, abnormal and mutation segments can reach 99.93%, which is more than 10 times more efficient than manual static verification. This ensures that subsequent anomaly detection and data imputation stages can be directly and accurately cleaned, completed and standardized based on this tokenized dataset, supporting high-quality input of multi-temporal features and robust operation of subsequent deep prediction algorithms.
[0077] S2.2: Based on tokenized multivariate time series data, statistical outlier detection algorithms (including IQR distribution analysis, z-score method or time series point outlier detection network) are used to intelligently identify and remove outliers of each variable at different sampling points, generating a multivariate time series dataset after outlier cleaning.
[0078] S2.3: For the multivariate time series dataset after outlier cleaning, interpolation completion algorithms (including linear interpolation and mean interpolation of segments before and after the time series) are used to reasonably complete the detected missing data positions, ensuring the integrity of the feature dimensions of subsequent distribution normalization operations, and outputting the completed multivariate time series data;
[0079] S2.4: Based on the completed multivariate time series data, a distribution normalization algorithm (including min-max normalization or z-score normalization) is used to standardize the variables with different sampling points and different physical quantity characteristics, eliminate the differences in distribution mean and scale among the variables, and obtain the normalized multivariate feature matrix.
[0080] S2.5: Perform consistency verification on the normalized multivariate feature matrix. Use error analysis and feature correlation alarm mechanism to check the rationality of the distribution of the normalized feature vector. If new extreme anomalies or batch distribution drift are found, automatically backtrack to the S2.2-2.4 process to perform iterative correction until the input consistency standard is met, and generate the final normalized multivariate feature sequence as the standard input for subsequent multi-scale feature extraction and dynamic modeling.
[0081] Step S3: Based on the normalized multivariate feature sequence, multi-resolution wavelet transform and Fourier transform are used to decompose each variable at different time scales (including minutes, hours, days, seasons, etc.) to generate corresponding multi-scale time series feature sets, such as... Figure 2 As shown, it specifically includes:
[0082] S3.1: Perform time-series window segmentation on the normalized multivariate feature sequence, and use the sliding window algorithm to segment historical and real-time data to form a set of basic time-series segments for different observation periods (such as minutes, hours, days, and seasons), laying the data structure foundation for multi-resolution analysis;
[0083] S3.2: Based on the segmented time series segments, wavelet transform algorithm is applied to each type of multivariate feature for multi-resolution decomposition. By selecting appropriate wavelet basis functions, high-frequency and low-frequency wavelet coefficients are extracted from each variable data to achieve hierarchical refinement of local instantaneous fluctuations and long-term trends.
[0084] The time series segments obtained by dividing the normalized multivariate feature sequence by a time series window are used as input objects.
[0085] A wavelet transform algorithm (parameters: multi-resolution decomposition level N, wavelet basis function type Ψ, boundary processing method, energy cutoff threshold) is used to perform multi-scale time-domain decomposition for each type of multivariate feature, thereby realizing fine-grained modeling of the local and global wave structure of each feature at different periodic scales.
[0086] Furthermore, by selecting wavelet basis functions with good time-frequency localization performance (such as Daubechies, Symlet, Coiflet, etc.), and specifying the optimal decomposition order N based on the physical meaning of the features and the sampling frequency matching characteristics, a hierarchical recursive algorithm is used to perform discrete wavelet decomposition on each time series segment, splitting the original feature signal into wavelet coefficient sequences of different levels along the scale domain, covering high-frequency detail components (Detail Coefficient, D) and low-frequency approximation components (Approximation Coefficient, A), so as to independently store high and low frequency energies;
[0087] Furthermore, for each decomposition level, the following recursive formula is used:
[0088]
[0089] Among them, A j [n] represents the approximate coefficient sequence of the j-th layer, D j [n] represents the sequence of detail coefficients for the j-th layer, and h[k] and g[k] represent the low-pass and high-pass filter coefficients of the wavelet basis, respectively;
[0090] Furthermore, energy statistics are performed on the high and low frequency components of each decomposition level using the energy cutoff criterion. Effective components with an energy cumulative contribution rate reaching a preset threshold (e.g., above 95%) are selected, and irrelevant wavelet coefficients that may be caused by noise or atypical sampling disturbances are removed to improve feature stability and sensitivity to local instantaneous fluctuations.
[0091] Furthermore, edge truncation caused by data segment lengths that are not integer powers of 2 during wavelet transform is effectively corrected by boundary processing methods (such as symmetric extension, zero filling, etc.), ensuring the consistency of coefficient distribution of features in all sampling periods under full-scale decomposition.
[0092] Through the chain derivation of the wavelet transform algorithm described above, the original segmented multivariate feature signals are transformed into a structured multi-resolution wavelet coefficient matrix, realizing a hierarchical fine-grained characterization of various microgrid operation data at the levels of local mutations, short-period changes and long-term trends, providing a highly expressive feature foundation for subsequent time-frequency feature fusion and dynamic weight allocation.
[0093] For example, in the scenario of analyzing historical voltage, current, and temperature feature data of 10 monitoring nodes in a microgrid area, the acquisition cycle is 1 second, and the length of a single analysis segment is selected as 1024 points. The Daubechies-4 (Db4) wavelet basis is adopted, the decomposition level is configured to be 5, and the energy cutoff threshold is set to 95%. For each feature, a 5-level discrete wavelet transform is performed segment by segment to recursively generate complete multi-scale feature components containing one set of low-frequency approximation coefficients A5 and five sets of high-frequency detail coefficients D1 to D5.
[0094] After energy contribution statistics, the high-frequency components of the current data in layers D2 and D3 show significant energy, accounting for 68% of the total energy, reflecting the abrupt change characteristics of the early peak. Temperature characteristics, on the other hand, show a concentrated increase in the low-frequency components in layers A5 and D5, with a cumulative energy proportion reaching 72%, reflecting diurnal periodic steady-state changes. Performing boundary symmetric extension to prevent data tail loss, the output multivariate wavelet coefficient matrix can improve anomaly detection accuracy and multi-period prediction consistency by more than 10% in subsequent feature fusion and weight prediction experiments, achieving the expected effect of adaptive multi-temporal scale feature hierarchical sensitivity modeling.
[0095] S3.3: Perform Fourier transform on the time series segments of each variable simultaneously to obtain the spectral components of each multivariate feature at different time scales. Use amplitude and phase parameters to extract its periodic changes and dominant frequency components to achieve supplementary modeling of global time series patterns.
[0096] The time segments obtained by dividing the normalized multivariate feature sequence into time segments are used as the input for Fourier transform processing;
[0097] The Discrete Fourier Transform (DFT) algorithm (parameters: window length L, sampling interval Δt, window function type) is used to perform spectral analysis on the multivariate features of each segment, thereby extracting the harmonic distribution of each feature at the full-cycle scale.
[0098] Furthermore, the frequency domain complex coefficients of the characteristics of each segment are calculated using the following discrete Fourier transform formula:
[0099]
[0100] Where, x n For time-domain sampling points, X k Let L be the Fourier coefficient of the k-th frequency component, L be the segment length, and j be the imaginary unit.
[0101] Furthermore, by calculating the amplitude and phase of the complex coefficients in the frequency domain, the periodicity and dominant frequency components of each variable's characteristic segment can be quantitatively determined.
[0102]
[0103] Among them, |X k | represents the amplitude spectrum, θ k For phase spectrum; Re(X) k ), Im(X k () represent the real and imaginary parts of the Fourier coefficients, respectively;
[0104] Furthermore, a dominant frequency detection and power spectral density analysis algorithm (parameters: energy accumulation threshold, sideband bandwidth) is adopted to identify the dominant frequency, significant period and energy concentration range of each variable feature in each segment, and the characteristic response of the main frequency band is obtained through peak search;
[0105] Furthermore, for long-period observation segments, frequency domain envelope analysis and periodic energy weighting algorithms are used to aggregate highly correlated main frequencies and their harmonic components, thereby enhancing the ability to characterize global time-series patterns such as daily cycle changes and seasonal trends.
[0106] By normalizing the spectral parameters and encoding the feature labels, the dominant frequency, amplitude, correlation strength and other indicators of each variable and segment are output in a structured manner as multivariate multiscale spectral characteristic parameters, providing supplementary input for multiscale feature fusion and dynamic weight modeling.
[0107] For example, in a microgrid load forecasting and analysis scenario, the historical active load data of a node with a 1-hour cycle is sampled at a 1-minute period with a segment length L=60. After weighting using the Hanning window function, a Discrete Fourier Transform (DFT) is performed. Through the DFT calculation, 60-dimensional complex spectral coefficients are obtained. All amplitude spectra are normalized, and the dominant component is determined based on the 95% energy accumulation threshold. The main peaks are detected at k=4 (15-minute cycle) and k=1 (60-minute cycle). Further calculation shows an amplitude |X4|=28.7 and a phase θ4=0.21, indicating that the load during this period exhibits significant 15-minute periodic fluctuations, with energy concentrated in the low-frequency principal component. After synchronous processing of multivariate data across all nodes, the dominant frequency, main amplitude, and phase of each variable segment are output, significantly improving the model's ability to capture seasonal load peaks and valleys and power supply cycle scheduling characteristics, laying a frequency characteristic foundation for subsequent feature fusion and dynamic modeling.
[0108] S3.4: Feature aggregation is performed on the wavelet coefficient matrix obtained by wavelet transform and the spectral parameters obtained by Fourier transform. A multi-scale feature fusion algorithm is designed to splice and map local high-frequency and global periodic information in a unified feature space to generate a multi-variable, multi-scale joint temporal feature expression.
[0109] The wavelet coefficient matrix obtained by wavelet transform and the spectrum parameters obtained by Fourier transform are used as parallel input objects, which correspond to the local time-frequency characteristics and global spectrum characteristics of each node and multivariate characteristics of the microgrid in the segmented time-series interval, respectively.
[0110] The feature aggregation coding method (parameters: wavelet decomposition level N, number of dominant frequencies K, splicing mode type) is adopted to perform feature column merging and splicing on the wavelet high and low frequency coefficient sequences and corresponding spectral dominant feature parameters of each variable in all time segments to form a multivariate multiscale feature base vector.
[0111] Furthermore, by using a feature-unified mapping algorithm (such as multi-scale feature standardization mapping and vector-level normalization), the wavelet coefficient matrix and spectral feature parameters are normalized on the principal scale axis and variable axis, so as to realize the expression of dominant features of different proportions, scales and physical quantities in the same feature space, and improve the compatibility of local details and global trend information.
[0112] Furthermore, hierarchical feature fusion techniques (such as dominant frequency weighting algorithms, multi-scale fragmented feature group convolution, or high-dimensional feature flattening strategies) are employed to concatenate the amplitude and phase of each variable's wavelet components at different resolutions with their corresponding dominant frequencies in the order of segment, variable, and time scale, forming a unified multivariate, multi-scale time-series feature representation vector. For the aggregation of dominant frequencies and wavelet components, the following linear weighting mapping formula is used:
[0113]
[0114] Among them, F agg [i] represents the i-th multi-scale temporal feature fusion component. D represents the low-frequency approximate wavelet coefficients of the l-th layer. j [i] represents the high-frequency detail wavelet coefficients of the j-th layer, |X k | and θ k The amplitude spectrum and phase spectrum of the k-th dominant frequency are respectively, α l β j γ k δ k Each fusion channel is assigned a weighting coefficient, which is dynamically allocated based on the principal scale energy distribution and the cumulative rate of spectral energy.
[0115] Furthermore, through adaptive feature channel filtering algorithms (such as feature contribution rate evaluation and normalization, energy density threshold discrimination), irrelevant features with low contribution or high redundancy are automatically removed, and only information components that can reflect the dominant dynamics in the multi-scale range are retained.
[0116] Through the above series of multi-domain time-frequency feature aggregation and mapping processes, the local high-frequency mutation and slow-varying trend information generated by wavelet decomposition are organically combined with the global periodic dynamic structure of Fourier transform to generate a high-dimensional joint-coded multivariate and multi-scale time-series feature expression. This provides a high-information and high-resolution input feature set for subsequent attention gating weight allocation and spatiotemporal coupling dynamic modeling, achieving the technical effect of multi-spatiotemporal scale feature collaborative representation under complex operating conditions of microgrids.
[0117] For example, in the multivariate load forecasting task application of the energy management platform of a 35-node microgrid, the voltage, current, output temperature, and other data of each node are decomposed using a 5-layer Daubechies-4 wavelet decomposition. The principal scale energy contribution rate is allocated to the low-frequency layer (α5 = 0.42) and three high-frequency layers (β2 = 0.21, β3 = 0.17, β4 = 0.09). After Fourier analysis, the principal frequency energy converges to the first two dominant components (γ1 = 0.07, γ2 = 0.04). The system uses 0-1 normalization to standardize all components and automatically splices and weights them according to the above weight coefficients to form a 30-dimensional multi-scale time series feature expression for each node. After processing by the subsequent correlation analysis module, the final fused features achieved a dominant dynamic information retention rate of 97.8%, which is significantly higher than that of single wavelet coefficient or spectral feature input methods. Correlation analysis and contribution rate heatmap show that the fusion structure significantly improves the sensitivity of model prediction input to the coexistence of sudden fluctuations and periodic loads, and provides a high-throughput and interpretable feature foundation for dynamic adjustment of backend deep learning model weights and cross-node knowledge transfer.
[0118] S3.5: Perform feature statistical analysis on each set of fused multi-scale temporal feature representations, use feature correlation analysis and principal component analysis to measure the dominant role of components at different time scales, screen significant features, optimize feature dimensions, and output a standardized multi-scale temporal feature set to provide input for subsequent attention gating and graph temporal modeling modules.
[0119] Step S4: Combining the geographical location information of each sensor point with the physical connection relationship of the device, a dynamic adjacency matrix based on spatial dependence is constructed to describe the spatial correlation and regional structural differences between nodes, providing a foundation for modeling spatial feature distribution, such as... Figure 3 As shown, it specifically includes:
[0120] S4.1: Standardize the encoding of the unique identifier and geographic location information of each sensor point, and use the Geographic Information System (GIS) data interface to extract and automatically correct the standardized geographic location parameters (such as latitude and longitude, elevation, and regional boundaries) to form spatial positioning metadata, providing basic spatial coordinate parameters for subsequent measurement of spatial adjacency relationships;
[0121] Using the sensor terminal numbers, unique identifiers of sensing and acquisition devices, and their raw geospatial parameters reported in real time via acquisition protocols as the initial input objects, a metadata dataset of node basic identity and spatial information is constructed.
[0122] Using data extraction and aggregation methods (parameters: unique device number, original latitude and longitude, collection timestamp), the geospatial raw data fields of each node are automatically parsed and standardized to achieve unified archiving of basic physical information;
[0123] Furthermore, by integrating the Geographic Information System (GIS) data interface (parameters: geographic coordinate system type, data interface specification, API key), data extraction and correction are performed on the original latitude and longitude, elevation, and regional boundaries of all nodes to ensure the consistency, integrity, and uniformity of spatial reference standards of geographic location information;
[0124] Furthermore, based on automated coordinate correction algorithms (such as WGS-84 coordinate transformation and Earth ellipsoidal datum transformation), coordinate projection transformation is performed on the collected node spatial parameters, and the original geographic coordinates (extLat, extLon, extElev) are mapped to the target standard coordinate system (X, Y, H) using the following transformation relationship:
[0125] X=Ncos( )cos(λ)Y=Ncos( )sin(λ)H=N(1-e 2 sin( )+h
[0126] Where is the node latitude, λ is the node longitude, and h is the node elevation. a is the radius of the Earth ellipsoid, and e is the eccentricity of the ellipsoid.
[0127] Furthermore, through the spatial location normalization process, the (X,Y,H) coordinates of all nodes are normalized (parameters: maximum and minimum normalization, local area translation scaling factor) to achieve a consistent expression of relative spatial distribution and eliminate spatial offset caused by differences in observation scale or geographic data sources.
[0128] Through the above series of processing methods, a unified and standardized node spatial positioning metadata dataset is formed, which provides a high-precision spatial coordinate reference for subsequent weight measurement of spatial adjacency relationships and generation of dynamic adjacency matrices, and realizes the data standardization of spatial feature analysis and fusion modeling among multiple nodes in microgrid systems.
[0129] For example, in a typical 35-node microgrid geospatial calibration application, each data acquisition node is equipped with an embedded GNSS positioning module. The initial output longitude in the WGS-84 coordinate system ranges from 110.010000 to 110.015000, latitude from 34.100000 to 34.110000, and elevation ranges from 95m to 105m. The system retrieves terrain elevation and block boundary information in batches via GIS data API, automatically converts the geographic location field of each node to the National 2000 coordinate system, and after spatial normalization, the (X, Y) coordinate range reaches the [0,1] interval. The regional boundary is automatically extracted and associated with the node's affiliation attribute. The entire process is completed within 100ms, and the node spatial positioning metadata missing rate is less than 0.2%, achieving high-precision, non-manually-intervened spatial information standardization, laying a highly reliable foundation for adjacency weight calculation and subsequent spatial dependency modeling. The final output data structure consists of a unique number for each node, three-dimensional spatial coordinates, regional affiliation label, and spatial accuracy evaluation index, enabling intelligent and standardized modeling of the spatial distribution of multiple nodes in a microgrid scenario, and providing solid data support for in-depth mining of spatial features for dynamic scheduling optimization.
[0130] S4.2: Based on the physical connection table of each physical node, the network topology is modeled. The initial physical connection graph is generated using the node-edge adjacency list method, which realizes the physical connectivity description between device nodes and edges, and provides basic network topology parameters for the spatial structure expression of the dynamic adjacency matrix.
[0131] The input consists of a table showing the physical connection relationships of devices at each node of the microgrid system, which includes the unique identifier of the node, device type, physical connection relationship, and port attribute data.
[0132] The node-edge adjacency list modeling method (parameters: node set V, physical edge set E, port connection identifier, edge attribute field) is adopted to realize the data structuring of all physical acquisition terminals, key devices and their physical interconnection relationships in the system;
[0133] Furthermore, the original physical connection table is logically sorted out by a structured connection relationship parsing algorithm (parameters: connection direction, single / bidirectional link attributes, device partition identifier), redundant or invalid connection information is eliminated, the actual physical connection edge and connection directionality between each pair of nodes are clarified, and an initial connection edge set E' is generated.
[0134] Furthermore, using an adjacency list automatic generation algorithm, for each node i, all nodes j directly physically connected to it are recursively searched, establishing the following data structure:
[0135]
[0136] Where Adj[i] represents the list of all physical adjacent nodes of the i-th node, j k The index of node k that is directly physically connected to node i;
[0137] Furthermore, by storing edge attribute fields (such as line type, voltage level, bandwidth, transmission capacity, etc.), corresponding engineering attribute values are assigned to each physical connection edge, thereby realizing the qualitative and quantitative expression of different physical connection forms (such as trunk lines, branch lines, redundant branches, etc.).
[0138] Furthermore, the generated adjacency list structure data is subjected to consistency verification using connectivity verification algorithms (such as depth / breadth-first traversal) to ensure that the device's physical network has no isolated nodes or closed-loop anomalies, and abnormal structures are automatically recorded and alarms are marked.
[0139] Through the above algorithm chain derivation, a complete initial physical connection diagram of the microgrid system is output. Its data form is a standard adjacency list structure, which includes node index, adjacency node list and connection edge attributes, realizing an accurate description of the connectivity between physical nodes and providing basic network topology parameters for subsequent dynamic adjacency matrix space modeling and weight parameter calculation.
[0140] For example, in the topology modeling scenario of a typical 35-node microgrid dynamic dispatch system, the physical connection table records the unique number of each node (e.g., N1 to N35), node type (data acquisition terminal, micro-source, battery pack, load), port identifier, and physical connection list. For instance, there is a 10kV trunk line between nodes N3 and N7, physically connected to P3 via port P1, with attributes {"type":"trunk line","voltage":10000V,"capability":500kW}. Using an adjacency list generation algorithm, after globally parsing the node-edge relationships, the adjacent nodes of N3 are [N2, N5, N7], and the attributes of each edge are automatically archived. The system uses breadth-first traversal to check the consistency of the adjacency list structure and finds that nodes N15 and N20 are temporarily disconnected due to recent maintenance, generating an isolated node alarm log. The final output adjacency list structure contains the adjacency list of all nodes and the engineering data of each edge, which has been vectorized into JSON format. It serves as the core input for the next step of spatial adjacency weight calculation and dynamic spatial dependency modeling, realizing automated topology modeling, full coverage of engineering features, and traceability of abnormal structures.
[0141] S4.3: The above spatial positioning metadata and physical connectivity graph are fused together. Spatial distance measurement algorithms (such as weighted Euclidean distance or geographic neighborhood criteria) and physical connectivity weight models are used to jointly calculate the spatial correlation and physical influence weights between each pair of nodes, generating a candidate adjacency weight matrix that reflects the strength of spatial relationships, and constructing a preliminary weight parameter set for dynamically adjusting spatial dependencies.
[0142] The input objects are the spatial positioning metadata of each node coded through the Geographic Information System (GIS) interface and the physical connection diagram of the equipment generated by the physical connection relationship table;
[0143] A spatial distance metric algorithm is used (parameters: weighted Euclidean distance is selected, and the spatial coordinate weight vector is w = (w x w y w h Calculate the weighted distance between any pair of nodes (i, j) in the spatial coordinate system, and obtain the spatial distance weights using the following formula:
[0144]
[0145] Among them, X i ,Y i H i Let w be the spatial coordinates of node i. x ,w y ,w h These are the normalized weights of the spatial components;
[0146] Furthermore, the spatial correlation coefficient is converted into a spatial correlation coefficient using a spatial distance weighting normalization function (such as a Gaussian radial basis function, parameter: scale coefficient σ).
[0147]
[0148] Among them, S ij σ represents the spatial correlation strength between nodes i and j, and is set based on the average distance distribution of nodes or empirically.
[0149] Furthermore, a geographical neighborhood criterion (parameter: neighborhood radius R or fixed number of neighbors K) is used to identify the spatial nearest neighbors of each node. The spatial correlation coefficient of nodes that exceed the specified spatial radius R or whose ranking weight is greater than the Kth position is set to zero, thereby realizing local constraints on spatial dependence.
[0150] Furthermore, based on the established physical connection graph, a physical connectivity weight model is adopted (parameter: edge type weight w). e The equipment engineering attribute factor θ) is an additional physical influence weight assigned to node pairs that have direct physical connections;
[0151] Construct the physical connectivity weight matrix P ij The physical edge attributes are integrated using the following assignment principle:
[0152]
[0153] Where, θ eBased on experience, parameters such as line type (trunk, branch, redundant), voltage level, and capacity are set.
[0154] Furthermore, a comprehensive candidate adjacency weight matrix W is generated through a joint weight fusion algorithm (parameters: spatial connectivity weighting factor α, physical connectivity weighting factor β, and normalization method). ij :
[0155] W ij =αS ij +βP ij
[0156] Where α+β=1, typically α=0.6, β=0.4 to balance regional spatial structure and engineering physical characteristics;
[0157] By normalizing (parameter: normalize the L1 or L2 norm of the matrix), W ij The candidate adjacency weight matrix is normalized to a uniform size, and a preliminary set of weight parameters is constructed for dynamic spatial dependency adjustment.
[0158] Through the above algorithm chain derivation, a candidate adjacency weight matrix that reflects the strength of spatial relationships and physical influence characteristics is obtained with high precision. This provides a structural basis for subsequent dynamic correction of environmental sensitivity and adaptive optimization of the adjacency matrix, and realizes accurate modeling of the spatial characteristic relationships of multiple nodes in the microgrid.
[0159] For example, in a typical 35-node microgrid application scenario, the spatial coordinates of each node, after being extracted via a GIS interface, are normalized to the range of [0,1], and the spatial coordinate weight w is taken. x ,w y ,w h The values are 0.4, 0.4, and 0.2 respectively. The spatial distance between all node pairs is calculated using weighted Euclidean distance, with D representing the distance between typical node pairs. ij The value is in the range of 0.08 to 0.65. The σ parameter for the Gaussian radial basis transformation is set to 0.2, and the calculated spatial correlation coefficient S... ij The main distribution peak is between 0.9 and 0.2. Physical connection table statistics show that node pairs with a main trunk are assigned θ. 主干 =1.0, assign θ to the branch 支路 =0.6, unconnected node P ij =0. After weighting and fusion with joint weighting factors α = 0.65 and β = 0.35, the candidate adjacency weight matrix W is... ij The main diagonal is 0, and the W values between physically direct and spatially nearest neighbor nodes are... ijIn the range of 0.4-1.0, the weights of distant and unconnected nodes are below 0.08. After matrix normalization, all node pairs are included in the metric space. Actual testing in various scenarios shows that the output candidate adjacency weight matrix accurately reflects the spatial nearest neighbor grouping of nodes, the physical structure of the backbone / branch, and the network partition topology. Subsequent experiments with dynamic correction and prediction models show a 12% improvement in spatial dependency modeling accuracy, achieving efficient modeling and adaptive adjustment of the coupling characteristics of spatial relationships and physical structures in complex microgrids across multiple scenarios.
[0160] S4.4: Based on normalized multivariate feature sequences and candidate adjacency weight matrices, environmental sensitivity calculation algorithms (such as feature correlation coefficient analysis and node activity measurement) are adopted to dynamically adjust the adjacency weights between spatial nodes for different time periods and operating scenarios, so as to realize the adaptive update of the adjacency matrix in the spatiotemporal dimension and improve the dynamic reflection capability of spatial dependency information.
[0161] S4.5: The spatiotemporally dynamically corrected adjacency weight matrix is output in a normalized matrix data structure and stored as a dynamic adjacency matrix, realizing the real-time description of the spatial dependence of each node and the differences in regional structure, providing core input feature parameters for modeling the spatial feature distribution of multi-scale attention gating networks and dynamic topology graph convolutional networks.
[0162] Step S5: The multi-scale temporal feature set and spatial adjacency matrix are input to a multi-scale attention gating network. Attention weight coefficients for each variable within the current spatiotemporal segment are calculated independently in each time window and spatial region, achieving adaptive dynamic allocation of feature weights. Specifically, this includes:
[0163] S5.1: The multi-scale temporal feature set is indexed and divided according to time window and spatial region. Based on the specified spatiotemporal resolution, the multi-scale temporal features of each variable are classified into the corresponding spatiotemporal segment set to form multi-scale feature input for each time window and spatial region, laying the input foundation for subsequent attention gating modeling.
[0164] S5.2: Using the constructed spatial adjacency matrix, the spatial correlation weights of the multi-scale feature inputs in each spatiotemporal segment are initialized. The graph structure constraint algorithm (such as graph regularization and Laplace smoothing) is used to perform prior correction on the feature importance distribution of adjacent nodes / regions in order to preserve the fundamental role of physical connection and spatial correlation in feature weight allocation.
[0165] The multi-scale temporal feature segments indexed according to step S5.1 and the dynamic spatial adjacency matrix already output in S4.5 are used as input objects;
[0166] A spatial association weight initialization method (parameters: dynamic adjacency matrix, spatiotemporal segment index) is adopted. For the feature input set in each spatiotemporal segment, the spatial connection weights between nodes are extracted according to the corresponding spatial adjacency matrix segment to realize the prior spatial weight mapping of each node feature.
[0167] Furthermore, through a graph structure constraint algorithm (as shown in the regularization algorithm, parameters: adjacency matrix, regularization factor λ), each feature input vector is initially weighted according to the spatial graph structure. The influence of the neighborhood node features on the importance of the central node features is introduced in each segment, thereby forming an initial feature weight distribution with spatial prior.
[0168] Furthermore, the Laplace smoothing method (parameters: degree matrix D, adjacency matrix W, smoothing scale α) is used to spatially smooth the initial distribution of feature importance of nodes in each spatiotemporal segment, and the weighted feature smoothing value is calculated according to the following formula:
[0169] F'=(I-αL)F
[0170] Where F is the original spatial feature importance vector, F ' Let I be the spatially smoothed feature distribution, and let L = D be the identity matrix. -1 / 2 (DW)D -1 / 2 Let α be the normalized Laplace matrix, and α be the space smoothing factor.
[0171] Furthermore, by using the node-edge weight accumulation algorithm (parameters: node degree, number of directly adjacent nodes), the cooperative inhibition and promotion effect of directly connected nodes is strengthened in the spatial feature importance distribution, the response sensitivity of feature contribution in physically directly connected regions is improved, and the basic role of physical connection and spatial correlation in feature weight allocation is effectively preserved.
[0172] Through the above combination of spatial correlation weight initialization, graph regularization and spatial smoothing, the multi-scale features of each spatiotemporal segment are optimized a priori in terms of spatial structure, and the feature weight initialization matrix after spatial structure constraint correction is output. This provides a structured prior input for the adaptive dynamic allocation of the subsequent multi-scale attention gating network, and realizes the effective injection of spatial dependence and physical correlation.
[0173] For example, in a typical 35-node microgrid scenario, a sliding time window of 15 minutes is set. The spatial adjacency matrix uses the Laplace normalized weight matrix output from step S4, with a spatial smoothing factor α of 0.2 and an average node adjacency of 3. For a multi-scale feature set containing 12 nodes within the 15-minute window, adjacency matrix segments are indexed according to node neighborhood relationships. Graph regularization is used to emphasize spatial connectivity features. After normalization, the initial weight vector increases the feature weights of master nodes by approximately 22% and decreases the weights of boundary nodes by approximately 15%. Further application of Laplace smoothing reduces the feature weight range, with the spatial difference in weights of cooperating nodes falling below 0.12. Finally, the output initial feature weight matrix is a 12×20 weight table, where 20 represents the feature dimension. This matrix serves as the input to the S5.3 attention-gated subnetwork, achieving structural coupling of feature inputs in the spatial dimension and effectively improving the model's adaptability to spatial heterogeneity and network topology changes. In actual model training and evaluation, the addition of spatial structure constraints improved the prediction accuracy by an average of 6% and significantly improved the stability, supporting the generalization modeling requirements of complex cross-regional scheduling scenarios in microgrids.
[0174] S5.3: The multi-scale feature input after being divided into spatiotemporal segments and the corresponding spatial adjacency matrix segments are used as inputs to the multi-scale attention gating sub-network. Based on the self-attention mechanism and gating control (such as additive attention, gating factor network), the weight coefficients of each variable in each spatiotemporal segment are calculated to realize the dynamic effect of each variable on the prediction target of the current segment.
[0175] The input objects are multi-scale temporal feature segments and spatial adjacency matrix segments that have been indexed and divided in step S5.1 and initialized with spatial structure weights in step S5.2;
[0176] A multi-scale attention-gated subnetwork is employed (parameters: number of attention heads h, gating activation function σ, attention scale factor γ), with the feature input tensor of each specified spatiotemporal segment. (N is the number of nodes / regions, d is the feature dimension) and its corresponding adjacency matrix segment For joint input, adaptive weight allocation of features is achieved;
[0177] Furthermore, a self-attention mechanism (parameters: query matrix Q, key matrix K, value matrix V, temperature scaling factor τ) is used to calculate the correlation weight distribution of each variable in the same spatial neighborhood and at the same scale for each spatiotemporal segment. Specifically, the following additive attention function is employed:
[0178]
[0179] in A ijLet d be the relevance attention weight of node i to node j in the current spatiotemporal segment. k For the key / query vector dimension. Softmax normalization ensures that the sum of the output weights of each node is 1.
[0180] Furthermore, a gated factor network (parameters: sigmoid or swish gated activation, gate weight μ) is used to output weight coefficients for multi-scale variables within each spatiotemporal segment. Specifically, the attention output and the gated output are element-wise weighted and fused:
[0181] G i =σ(γW) t,s,i +μX t,s,i )
[0182]
[0183] Among them, G i As the gating factor, A i For self-attention score, The output is the feature weights after fusion, and \odot represents element-wise multiplication;
[0184] Furthermore, by combining multiple attention heads (parameter: number of attention heads h), h sets of the above self-attention and gating calculations are executed in parallel within each spatiotemporal segment, improving the model's ability to express the interaction relationships of features at different scales. Linear concatenation and reprojection techniques are used to fuse the multi-head weights into the final feature weight set.
[0185]
[0186] Through the above chain derivation process, structured and adaptive multivariate weight coefficients are generated for the input and output of multi-scale features of each spatiotemporal segment, laying the foundation for the allocation of spatiotemporal feature importance and dynamic modeling, and realizing the quantitative measurement of the dynamic force of each variable on the prediction target in complex scenarios.
[0187] For example, in a typical 35-node microgrid scenario, a 15-minute time window and 8 spatial regions are used as spatiotemporal division units, with a multi-scale feature dimension of 24. A multi-head attention gating network is set to contain 4 attention heads, with a sigmoid activation function, a gating factor weight μ = 1, and a temperature scaling factor τ = 0.8. For the 7th spatial region and the 3rd time window, the input feature tensor X... t,s The adjacency matrix segment W is 5×24 (5 nodes, 24 features). t,s It is 5×5. The self-attention module calculates A for each pair of nodes. ij The average attention span is 0.19-0.34, with the maximum weight pointing towards the core load node. The gated output G... iThe mean is 0.65–0.82, and the multivariate fusion weights are combined with the attention score. The range is 0.13 to 0.29. All head weights are concatenated and linearly reprojected to output a 5×24 structured feature weight table. In actual testing, core variables (such as actual node power and regional meteorological temperature) received higher adaptive weights, and the dynamic weights of key features were highly correlated with the regional operating status. In subsequent prediction and scheduling simulations, the multi-scale gating weighting mechanism improved the accuracy of early warning of local load anomalies at nodes by 8%, and significantly enhanced the model's predictive stability under feature perturbations.
[0188] S5.4: Further perform spatiotemporal consistency enhancement processing on the initial weight coefficients of the multi-scale attention gating network, and use temporal smoothing operators (such as moving average and temporal filtering) and spatial consistency incentives (such as the weight correlation promotion factor of edge neighbor nodes) to suppress the drastic fluctuation of weights with environmental noise, and ensure the optimization of the adaptive allocation process in terms of spatiotemporal continuity and model stability.
[0189] S5.5: The multivariate feature weight coefficients, which have undergone multi-scale attention gating and consistency enhancement, are fused element-wise with the original multi-scale temporal feature set to generate a weighted feature input sequence. This provides the input features with completed adaptive feature allocation for the subsequent joint modeling of dynamic topological graph convolutional network and temporal neural network, and connects to the graph temporal fusion prediction module.
[0190] Step S6: Based on multi-scale attention weight coefficients and spatial adjacency matrix, a dynamic topological graph convolutional network and a temporal neural network are jointly used for modeling. The weighted feature sequence is embedded into the graph temporal fusion prediction structure to capture nonlinear coupling patterns in multiple spatiotemporal dimensions. Specifically, this includes:
[0191] S6.1: The multi-scale attention weight coefficients and spatial adjacency matrix output from the previous steps are fused together. The weighted multi-scale temporal feature set is used as input to form a spatiotemporal weighted feature tensor, which provides a high-quality basic data structure containing multi-spatiotemporal information for subsequent graph structure modeling.
[0192] S6.2: Based on the spatiotemporal weighted feature tensor, a dynamic topological graph convolutional network is used to perform feature propagation and aggregation on the relationship between different spatial nodes, so as to extract the interactive feature components under multi-scale spatial dependence and obtain the node representation vector with enhanced spatial structure.
[0193] Using spatiotemporal weighted feature tensors as input, dynamic topological graph convolutional feature propagation and aggregation processing is carried out for composite structure data with multiple variables, time windows, and spatial nodes.
[0194] Employs a Dynamic Graph Convolutional Network (parameter: dynamic adjacency matrix). Convolution weights W g The activation function ReLU / ELU (time step t) is used to model the spatial topological dependencies between nodes over time, and the spatial structure features are extracted using convolution operators.
[0195] Furthermore, the spatiotemporal weighted feature tensor is processed using graph convolution operators. Feature aggregation is performed based on the following formula:
[0196]
[0197] in, For adjacency matrices with self-loops, for The degree matrix, H (l) The node features of the l-th layer are input. The parameters are learnable convolutional weights, and σ(·) is a non-linear activation function. This enables dynamic multi-scale feature interaction between nodes and their neighborhoods.
[0198] Furthermore, a multi-layer graph convolutional network stacked structure is used (parameters: number of convolutional layers L, output dimension d of each layer). ' This method progressively aggregates node neighborhood information, enhances feature representation capabilities under complex spatial dependencies, and obtains spatial structural features with multi-level semantic expression.
[0199] By using node feature residual connections (parameter: residual weight eta), information is kept flowing smoothly between the output of each convolutional layer and the initial input, alleviating the gradient vanishing problem caused by deep aggregation and achieving feature fidelity.
[0200] Furthermore, by using a node normalization layer (such as layer normal or batch normal, parameters: normalization range, batch size), the output distribution of each layer is standardized to prevent feature scale shift and improve the convergence stability of model training.
[0201] Finally, the output is a spatial structure-enhanced node representation vector processed by dynamic topological graph convolution. This provides spatial embedding features for the subsequent spatiotemporal weight modeling process of temporal recursive units, enabling a structured expression of multi-scale interaction information between complex nodes;
[0202] For example, in a 35-node microgrid scheduling scenario, the input spatiotemporal weighted feature tensor X t The size is 35×24, and the dynamic adjacency matrix A is... tThe dynamic graph is dynamically refreshed every 15 minutes based on the energy flow and physical connectivity of each node. The convolutional structure is set to 3 layers, with the output dimensions of each layer increasing sequentially from 24 to 32 to 16, and the activation function being ReLU. Normalized adjacency matrices and node normalization are employed to mitigate the impact of imbalanced node degree distribution. During convolution propagation, the weight difference in spatial feature representation between backbone nodes (high connectivity, rapid load changes) and boundary nodes is reduced by 9% after convolution aggregation, reducing node spatial feature redundancy and improving model generalization accuracy. The residual connection weights are set to eta = 0.3 to avoid representation degradation caused by an increase in convolutional layers. The node representation matrix Z output after convolution is... t With a size of 35×16, the quantization of spatially active node representation is improved to 0.82 (normalized units), effectively capturing the interaction effects of multi-regional nodes in actual scheduling and prediction tasks, significantly enhancing the system's ability to model cross-regional fluctuations and complex spatial dependencies. The final output spatial structure-enhanced node representation vector serves as the embedding input for subsequent temporal recursive units LSTM / GRU, realizing the reliable transfer of structured features in the spatiotemporal multidimensional dynamic modeling link;
[0203] S6.3: Input the node representation vector with enhanced spatial structure into the temporal neural network component (including Long Short-Term Memory Unit LSTM or Gated Recurrent Unit GRU) to recursively model the temporal features of the nodes, capture the nonlinear evolution law under temporal dynamics, and output the spatiotemporal coupled temporal feature sequence.
[0204] S6.4: Residual connections and normalization layers are introduced between graph convolution and temporal recursive units to regularize the spatiotemporally coupled temporal feature sequences, thereby alleviating the gradient vanishing and feature redundancy problems in the deep feature fusion process and improving the stability and generalization performance of the overall fusion structure.
[0205] S6.5: Predictive features are extracted from the spatiotemporal coupled time-series feature sequences after regularization. The final fused predictive prior features are output through a fully connected projection layer, providing highly expressive input data for the multi-step microgrid load and power supply status prediction output module. At the same time, the correlation strength of each node and feature in the spatiotemporal fusion process is fed back, providing support for model interpretability and dynamic scheduling.
[0206] Step S7: Perform multi-step prediction on the output of the graph-time-series fusion prediction structure to generate high spatiotemporal resolution prediction values of microgrid load and power supply status for future time periods, and add dynamic contribution weights for each spatiotemporal feature, specifically including:
[0207] S7.1: The spatiotemporal weighted feature tensor after being fused by the dynamic topology graph convolutional network and the temporal neural network is input into the multi-step prediction recursive unit. The recursive neural network (such as LSTM or GRU type multi-step decoder) is used to infer the temporal evolution trend of each node step by step to obtain the initial values of the load and energy supply status prediction at each future time.
[0208] S7.2: Based on the initial values of multi-step prediction, the dynamic feature weight coefficients output by the multi-scale attention gating network are retrieved, and the weight coefficients are element-wise weighted with the initial values of prediction for each spatiotemporal segment to quantify the actual contribution of different multivariate features to the prediction results of future time periods, and obtain the weighted multi-step spatiotemporal prediction results.
[0209] Using the initial values of load and energy supply status predictions for each node and each time period output by the multi-step prediction recursive unit, as well as the dynamic feature weight coefficients output by the multi-scale attention gating network, as input, element-level weighting processing is carried out to realize feature contribution measurement and weighted prediction result generation.
[0210] The dynamic feature weight mapping method is adopted (parameter: weight coefficient matrix α). i,j,k Predicting initial value tensors This allows for the allocation of weights for each variable to a future target within a specified spatiotemporal segment.
[0211] Furthermore, through element-wise Hadamard product operations, the weight coefficients output by the multi-scale attention gating network are element-wise weighted with the initial prediction values of each spatiotemporal segment. The specific operation is as follows:
[0212]
[0213] in, The weighted prediction result for node i, time step j, and variable type k; α i,j,k These are the dynamic weighting coefficients corresponding to the spatiotemporal segments and variable channels; To predict initial values;
[0214] Furthermore, through the normalization and interpretability constraint algorithm (parameters: weight sum normalization threshold ∈, weight reset confidence interval δ), all weighted results are normalized and adjusted to ensure the physical interpretability and superposition comparability of the feature weights of each spatiotemporal segment, and realize the quantitative distribution of multivariate features on the overall prediction results;
[0215] Furthermore, using a contribution analysis algorithm (parameters: cumulative contribution rate, eigenquantile threshold), the component contribution C of key feature variables for each month (or any specified time period) and each spatial node to the final prediction result is calculated. i,j,k It outputs multi-step, multi-node, and multi-variable weighted contribution results in a tensor structure;
[0216] By using the above-mentioned multi-scale dynamic weighting and contribution measurement processing method, the recursive prediction initial value is transformed into a high spatiotemporal resolution weighted prediction result that takes into account the importance of features, thereby quantifying the actual contribution of different variables to the result under multi-step prediction.
[0217] For example, in a 35-node microgrid scheduling scenario, for each node, the LSTM recursive unit outputs an initial value prediction tensor for the next 24 hours (96 time slices). The dimensions are 35×96×4 (4 main variables). The multi-scale attention-gated network outputs dynamic weight coefficients α. i,j,k The weighting range for different variables during main load fluctuations is [0.11, 0.27], and the weighting range for environmental meteorological variables is [0.05, 0.18]. After element-wise weighted calculation, the weighted prediction tensor... Synchronous output. The weighted results are normalized and analyzed. In the main load-sensitive sections, the contribution of the main load variable C increases to 68%, while the contribution of other variables is dynamically adjusted according to actual operating conditions. In the actual operation statistics of May 2023, the final weighted multi-step spatiotemporal prediction results showed that the prediction mean square error was reduced by 12% compared with the unweighted model, and the prediction confidence interval of high contribution sections converged significantly, meeting the data requirements for microgrid dynamic dispatch and supporting subsequent anomaly analysis. Comparing different variables and different spatiotemporal segments, the characteristic contribution distribution has clear physical interpretability, which can provide an important reference for subsequent dispatch strategies.
[0218] S7.3: For the weighted multi-step spatiotemporal prediction results, high spatiotemporal resolution segmentation and reconstruction are implemented. A multidimensional dataset hierarchical reorganization method is adopted to assemble the predicted values of each node and each time window into a standard prediction matrix, so as to achieve a unified format output at the node level and time segment level.
[0219] S7.4: The above prediction matrix and the corresponding dynamic feature weight coefficients are stored synchronously. The feature contribution visualization mapping algorithm is used to generate a multi-dimensional intermediate structure such as a spatiotemporal heat map with weight distribution and contribution curve, which provides decision support data for subsequent microgrid intelligent scheduling strategy optimization and anomaly monitoring module.
[0220] S7.5: For the high spatiotemporal resolution weighted prediction results and intermediate weight distribution structure, perform prediction confidence assessment and outlier labeling, use residual error analysis algorithm to dynamically define the confidence interval of the output prediction interval, and label the prediction output that deviates significantly from the expectation. Finally, obtain the results of multi-step prediction values, dynamic contribution weights and confidence label triplet, providing complete data basis for subsequent system performance evaluation and feedback loop.
[0221] Step S8: The prediction results are input into the feedback channel in real time, data on the actual operation status and abnormal events of the microgrid are collected, and an online parameter update algorithm is used to continuously adjust the multi-scale attention weights and model parameters to enhance the dynamic adaptability to environmental changes, equipment aging, and sudden events. Specifically, this includes:
[0222] S8.1: Obtain the prediction results output by the graph time-series fusion prediction structure, compare the prediction results with the actual operation status and abnormal event data of the microgrid in real time, so as to build a feedback channel for continuous collection and obtain a dataset with prediction deviation labels.
[0223] S8.2: Based on the dataset with prediction deviation labels obtained from the feedback channel, an anomaly detection algorithm is used to analyze the characteristics of microgrid operation deviations and abnormal events, realize the automatic identification of prediction accuracy decay and abnormal states, and output an anomaly label feature set;
[0224] S8.3: Using the anomaly label feature set as input, combined with the current configuration of multi-scale attention weights, an incremental online parameter adjustment algorithm (such as adaptive gradient descent) is used to dynamically optimize the parameters of the multi-scale attention weight generation module to obtain the updated multi-scale attention weights.
[0225] The anomaly annotation feature set and the current multi-scale attention weight configuration have been obtained, providing input conditions for dynamically optimizing the parameters of the multi-scale attention weight generation module.
[0226] An incremental online parameter adjustment algorithm (taking the adaptive gradient descent algorithm as an example) is adopted. The anomaly label feature set ε is used as the error feedback signal. The feedback input is embedded into the multi-scale attention weight generation network. For each spatiotemporal segment and multivariate feature channel, a loss function L(α) is constructed to characterize the error between the current attention weight α configuration and the expected feature contribution.
[0227] Furthermore, the weight adjustment amount in each round of parameter iteration is dynamically calculated using the following formula:
[0228]
[0229] in, η represents the gated attention weight on the i-th spatiotemporal segment and the j-th variable channel at round t. (t) The adaptive learning rate is L, and the loss target is L based on the current prediction bias and anomaly labeling.
[0230] An adaptive learning rate strategy is adopted, and η is adjusted for each gate weight reorganization based on the historical gradient variance. (t) To accelerate convergence and avoid local extremum traps, the step size of each parameter channel is adjusted by referring to optimization variants such as RMSProp and Adam.
[0231] Furthermore, anomaly constraint regularization is performed on the weight configuration of the multi-scale attention gating network output, through penalty terms.
[0232]
[0233] Outlier fluctuations during the weight update process are penalized, where λ is the regularization coefficient. Use historical or batch average values to enhance the stability of multivariate gating weights;
[0234] By incrementally iteratively optimizing the global gating parameter set, the parameters of each layer of the multi-scale attention weight generation network are continuously updated until the loss L(α) fed back by the abnormal feature set converges to within the threshold, and finally the optimized attention weight configuration set of the current round is output.
[0235] Through the above algorithm processing method, the anomaly detection and feedback results obtained in the previous step are transformed into a new multi-scale attention weight configuration, thereby improving the adaptive response capability to the microgrid system's operating status, anomaly distribution and environmental dynamics.
[0236] For example, in a real-world microgrid scenario, with the feedback channel connected, the input anomaly labeling feature set ε contains 10 recent load surges (mean deviation exceeding 20%) and 2 equipment-level anomalies (anomaly probability greater than 0.8). The current multi-scale attention weight configuration... The distribution is in the range [0.03, 0.15]. During the online parameter tuning phase, the Adam optimizer is used with an initial adaptive learning rate η = 0.005 and a regularization coefficient λ = 0.05. In each iteration, for all outlier locations, the cumulative prediction bias loss L is applied, along with a regularization penalty L. reg The gate weights were updated across the board. After 50 iterations, the attention weight of the main control load feature channel was increased to 0.22, while the weights of other auxiliary variables were adjusted to range from 0.04 to 0.11. The overall gate weight distribution became more concentrated and reflected the importance of sudden loads. In the backtesting of the downstream time-series fusion prediction module, the mean square error of system load prediction decreased by 17% after incorporating the optimized weights, and the accuracy of outlier prediction increased to 92%. Finally, the output multi-scale attention weight sequence can serve as a key input for subsequent model parameter fine-tuning and dynamic scheduling decisions, fully realizing the dynamic adaptive capability against environmental disturbances and abnormal events.
[0237] S8.4: Based on the updated multi-scale attention weights, the historical multivariate normalized feature sequence and the newly measured anomaly label feature set are jointly input into the deep learning prediction model. The model's neural network structure parameters are locally adjusted through an online fine-tuning strategy to generate a model parameter set that adapts to environmental changes in real time.
[0238] S8.5: Backtrack and verify the effect of updating the model parameter set, archive the optimized prediction results, anomaly detection accuracy and attention weight configuration changes in real time, and dynamically evaluate the model adaptation process through performance indicators, and finally output the optimal parameter configuration and prediction performance log that meet the actual operation requirements of the microgrid.
[0239] Step S9: When a cross-scene drift in sample distribution or a change in environmental category label is detected, a meta-learning backtracking mechanism is triggered to review and compare the feature weight configuration and prediction error under previous scenarios, and optimize the model transfer strategy accordingly to achieve efficient generalization prediction capability under multiple scenarios, specifically including:
[0240] S9.1: For the real-time collected multivariate normalized feature sequences and environmental category label distribution, a statistical distribution comparison algorithm and drift detection mechanism are used to determine the magnitude of change between the current input data in feature statistics or category distribution and the sample distribution of historical business scenarios, and output cross-scenario drift flags and corresponding change categories.
[0241] S9.2: Based on drift flags and change categories, automatically retrieve the feature weight configuration parameters and prediction error archives corresponding to each historical business scenario, extract the scenario archives most similar to the current environment category, submit them to the meta-learning index comparison module, and form a scenario weight snapshot and error curve record;
[0242] S9.3: The similarity between the scene weight snapshot and the current spatiotemporal feature weight distribution is measured. A multi-scale attention weight reconstruction algorithm is used to backtrack the pattern and extract the change trend of the weight distribution, and the optimal feature weight evolution path is obtained as a meta-learning reference template.
[0243] S9.4: Based on the weight evolution path and scene error curve, the meta-learning parameter transfer optimization algorithm is used to quickly adjust the key gating parameters and feature fusion coefficients of the dynamic topology graph convolutional network and the temporal neural network to obtain an adaptive initial weight configuration for the new scene.
[0244] S9.5: The adaptive weight initial configuration is applied to the graph temporal fusion prediction structure. The prediction is quickly calibrated using new samples in the current scene as input. The prediction error is monitored in real time, and the meta-learning transfer parameters are further fine-tuned with a dynamic online feedback mechanism. Finally, the optimal feature weight configuration and efficient generalization model parameters across scenes are generated for subsequent spatiotemporal multivariate prediction.
[0245] Step S10: Output the final multi-step predicted values and the dynamic weight distribution results of key features, providing data support for subsequent intelligent scheduling decisions and abnormal state analysis of the microgrid, and recording the entire process performance and parameter logs for continuous system performance optimization, specifically including:
[0246] S10.1: Collect and process the multi-step prediction results of the graph time-series fusion prediction structure to obtain high spatiotemporal resolution multivariate prediction values covering all future time periods and all microgrid nodes, forming a prediction result matrix;
[0247] S10.2: Based on the dynamic feature weight coefficients generated by the multi-scale attention gating network, the corresponding feature weight distribution is added to the prediction results of each step, multiple nodes, and multiple variables, so as to realize the synchronous output of dynamic weight information of multi-temporal features and multi-step prediction values.
[0248] S10.3: The prediction result matrix and its dynamic feature weight distribution are presented in a structured manner using a result visualization module in multiple dimensions, such as heat maps, time series curves and node feature contribution, to facilitate subsequent intelligent scheduling decisions and manual review;
[0249] S10.4: Archive and log all prediction results, dynamic weight distribution and core operating parameters of this period in a standard format according to timestamp and node number, and output system performance indicators (such as mean square error, generalization accuracy, etc.) and model online adaptive adjustment logs.
[0250] S10.5: Based on archived multi-step predicted values, dynamic feature weight distribution and historical operating data, generate a feature contribution analysis report for microgrid intelligent dispatch strategy optimization and anomaly monitoring, provide a decision basis for subsequent strategy modules, and provide closed-loop feedback to the system parameter self-optimization mechanism.
[0251] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.
[0252] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and rules of the present invention should be included within the scope of protection of the present invention.
Claims
1. A deep learning-based microgrid dynamic scheduling method, characterized in that, The method comprises the following steps: S1: obtaining historical and real-time multivariate operation data of each node of the micro-grid system at multiple space-time points, and synchronously recording geographical position information and physical connection relationship of each sensing point; S2: pre-processing the obtained multivariate time series data by using an outlier detection and distribution normalization algorithm to obtain a normalized multivariate feature sequence; S3: based on the normalized multivariate feature sequence, decomposing each variable at different time scales by using a multi-resolution wavelet transform and a Fourier transform to generate a corresponding multi-scale time series feature set; S4: combining the geographical position information and the physical connection relationship of each sensing point to construct a space adjacency matrix; S5: taking the multi-scale time series feature set and the space adjacency matrix as inputs, inputting a multi-scale attention gate network to independently calculate attention weight coefficients of each variable in a current space-time segment in each time window and space region; S6: based on the attention weight coefficients and the space adjacency matrix, jointly modeling by using a dynamic topological graph convolution network and a time series neural network to embed a weighted feature sequence into a graph time series fusion prediction structure to capture a nonlinear coupling mode in multiple space-time dimensions; S7: performing multi-step prediction on an output result of the graph time series fusion prediction structure to generate high space-time resolution prediction values of micro-grid load and energy supply state in future time periods, and additionally adding dynamic contribution weights of each space-time feature; S8: inputting the prediction result into a feedback channel in real time, collecting actual operation conditions and abnormal event data of the micro-grid, and continuously adjusting multi-scale attention weights and model parameters by using an online parameter updating algorithm.
2. The method of claim 1, wherein, The step S8 further comprises: S9: when detecting that sample distribution drifts across scenes or environment class labels change, triggering a meta-learning backtracking mechanism to review and compare feature weight configurations and prediction errors in all previous scenes, and optimizing model migration strategies accordingly; S10: outputting final multi-step prediction values and dynamic weight distribution results of key features, and recording performance and parameter logs of the whole process for continuous optimization of system performance. 3.The deep learning-based microgrid dynamic scheduling method of claim 1, wherein, The step S1 specifically comprises: deploying multivariate sensor integrated terminals on each typical node of the micro-grid system, collecting historical and real-time operation raw data based on an industrial Internet of Things collection protocol, and constructing original multivariate time series data based on multiple space-time points; based on micro-grid network topology information and geographic information system data, performing physical position information calibration on each sensing and collecting node, encoding geographical distribution of each node by using a unified space coordinate system to obtain geographical space mapping data available for spatial feature analysis; collecting information of physical connection relationship, energy flow and signal flow topology between nodes, and generating a connection matrix between nodes based on an automatic network structure recognition algorithm; synchronously processing historical and real-time multivariate time series data and spatial position information, unifying time stamp and space-time scale, and generating a space-time aligned multivariate data set by using time alignment and space correspondence algorithms; Data integrity and reliability detection is performed on the spatio-temporal alignment multivariate data set, abnormal or missing data information is identified and marked using industrial data quality evaluation criteria, and a structured micro-grid multi-time and space point original data set is output.
4. The deep learning-based microgrid dynamic scheduling method of claim 2, wherein, The multivariate sensor integrated terminal collects data from multiple nodes at a high frequency through an industrial Internet of Things collection protocol, supports a basic sampling period of 1-10 seconds, preferably 1 second, and uses an edge computing gateway to standardize and locally buffer the raw collected data.
5. The deep learning-based microgrid dynamic scheduling method of claim 1, wherein, The step S2 specifically includes: Performing preliminary consistency verification on the historical and real-time collected multivariate time series data, marking and recording missing values, abnormal collection periods or sudden data segments based on a data integrity detection algorithm, and obtaining marked multivariate time series data; Based on the marked multivariate time series data, using a statistical outlier detection algorithm to intelligently identify and eliminate abnormal data of each variable at different sampling points, generating a multivariate time series data set after outlier cleaning; Based on the multivariate time series data set after outlier cleaning, using an interpolation completion algorithm to reasonably complete the detected missing data positions, and outputting the completed multivariate time series data; Based on the completed multivariate time series data, using a distribution normalization algorithm to standardize variables with different sampling points and different physical quantity characteristics, and obtaining a normalized multivariate feature matrix; Performing consistency checking on the normalized multivariate feature matrix, using error analysis and feature correlation alarm mechanism to check the rationality of the normalized feature vector distribution, and generating a final normalized multivariate feature sequence.
6. The deep learning-based microgrid dynamic scheduling method of claim 5, wherein, The outlier detection algorithm uses IQR distribution analysis, z-score method or time series point anomaly detection network to intelligently eliminate abnormal points, linear interpolation or time series segment mean completion for missing values, and min-max normalization or z-score normalization for normalization.
7. The deep learning-based microgrid dynamic scheduling method of claim 1, wherein, The step S3 specifically includes: Dividing the normalized multivariate feature sequence into time series windows, using a sliding window algorithm to segment the historical and real-time data, forming a group of basic time series segments for different observation periods; Based on the divided time series segments, applying a wavelet transform algorithm to each type of multivariate feature for multi-resolution decomposition, extracting high-frequency and low-frequency wavelet coefficients for each variable data by selecting appropriate wavelet basis functions; Performing Fourier transform processing on the time series segments of each variable, obtaining the frequency spectrum components of each multivariate feature at different time scales, and extracting its periodic variation and dominant frequency component using amplitude and phase parameters; Performing feature aggregation on the wavelet coefficient matrix obtained by wavelet transform and the frequency spectrum parameters obtained by Fourier transform, designing a multi-scale feature fusion algorithm to splice and map local high-frequency and global periodic information in a unified feature space, and generating a multivariate, multi-scale joint time series feature expression; For each set of fused multi-scale time series feature representations, feature statistical analysis is performed. Feature correlation analysis and principal component analysis are used to measure the dominant role of components at different time scales, screen significant features, optimize feature dimensions, and output a standardized multi-scale time series feature set.
8. The deep learning-based microgrid dynamic scheduling method of claim 7, wherein, The specific method for feature aggregation of the wavelet coefficient matrix obtained by wavelet transform and the spectral parameters obtained by Fourier transform is as follows: the high and low frequency coefficients obtained by wavelet transform and the dominant amplitude and phase of the spectrum obtained by Fourier transform are spliced and normalized according to linear weights, and the weight coefficients are dynamically allocated according to the principal scale energy distribution. 9.The deep learning based microgrid dynamic scheduling method of claim 1, wherein, Step S4 specifically includes: The unique identifier and geographic location information of each sensor point are standardized and encoded. The standardized geographic location parameters are extracted and automatically corrected using the geographic information system data interface to form spatial positioning metadata. Based on the physical connection table of each physical node, the network topology is modeled, and the initial physical connection graph is generated using the node-edge adjacency list method. The spatial positioning metadata is fused with the physical connection graph. A spatial distance metric algorithm and a physical connectivity weight model are used to jointly calculate the spatial correlation and physical influence weights between each pair of nodes, generating a candidate adjacency weight matrix that reflects the strength of spatial relationships. Based on the normalized multivariate feature sequence and the candidate adjacency weight matrix, an environmental sensitivity calculation algorithm is used to dynamically adjust the adjacency weights between spatial nodes for different time periods and operating scenarios. The adjacency weight matrix after spatiotemporal dynamic correction is output in a normalized matrix data structure and stored as a dynamic adjacency matrix.
10. The deep learning-based microgrid dynamic scheduling method of claim 1, wherein, Step S5 specifically includes: The multi-scale temporal feature set is divided into indexes according to time windows and spatial regions. Based on the specified spatiotemporal resolution, the multi-scale temporal features of each variable are classified into the corresponding spatiotemporal segment set to form multi-scale feature input for each time window and spatial region. Using the constructed spatial adjacency matrix, spatial association weights are initialized for multi-scale feature inputs within each spatiotemporal segment, and a graph structure constraint algorithm is used to perform prior correction on the feature importance distribution of adjacent nodes or regions. The multi-scale feature input after being divided into spatiotemporal segments and the corresponding spatial adjacency matrix segment are used as inputs to the multi-scale attention gating sub-network. Based on the self-attention mechanism and gating control, the weight coefficients of each variable in each spatiotemporal segment are calculated respectively. The initial weight coefficients of the multi-scale attention gating network are further subjected to spatiotemporal consistency enhancement processing; The multivariate feature weight coefficients, which have undergone multi-scale attention gating and consistency enhancement, are then fused element-wise with the original multi-scale temporal feature set to generate a weighted feature input sequence.
Citation Information
Cited By
Machine learning-based intensive power distribution system and method for unattended power distribution room
CN121395682A
Power distribution scheduling system and method based on dynamic load prediction
CN121863691A
Purification system load distribution prediction method, system, equipment and medium
CN121981336A
A method, system, equipment, and medium for predicting load distribution in a purification system.
CN121981336B
UPFC submodule adaptive time scale data missing value estimation method and system
CN122220713A