A Multi-Source Intelligent Microgrid Security and Energy Efficiency Co-optimization System Based on Attention Mechanism and RNN-xLSTM-KANs Hybrid Model
Patent Information
- Application Number
- CN202510420203.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2026-10-20
AI Technical Summary
能效优化领域虽已涌现出基于模型预测控制(MPC)、深度强化学习(DRL)等方法,但美国国家可再生能源实验室(NREL)的对比测试表明,现有算法在处理多时间尺度耦合问题时,计算耗时与优化精度的矛盾仍较突出,在128节点测试案例中,求解时间超过实时性要求的比例达41%
[0075]根据本发明所涉及的基于注意力机制及RNN-xLSTM-KANs混合模型的多源智联微电网安全与能效协同优化系统,本发明旨在构建基于智能空开数据感知的园区微电网安全与能效协同调控系统,重点解决设备状态监测碎片化、用户行为建模精度低、源荷互动滞后等问题。通过在建筑末梢回路部署智能微型断路器(采样频率≥4kHz),实时采集电压、电流、温度等12维电气参数,构建覆盖配电层-设备层-用户层的全域监测网络。采集数据经边缘节点提取谐波畸变率、功率波动熵值等特征后,形成动态数据库支撑系统决策。
Smart Images

Figure SMS_1 
Figure SMS_2 
Figure SMS_6
Abstract
Description
Technical Field
[0001] This invention relates to the field of microgrid technology, specifically to a multi-source intelligent microgrid security and energy efficiency collaborative optimization system based on attention mechanism and RNN-xLSTM-KANs hybrid model. Background Technology
[0002] As the global energy structure accelerates its transformation towards low-carbon and intelligent directions, microgrids, as the core carrier of distributed energy systems, have become a key infrastructure for achieving efficient renewable energy consumption and regional energy autonomy. According to the International Energy Agency's (IEA) 2023 "Global Energy Transition Outlook," by the end of 2022, the global installed capacity of grid-connected microgrids had exceeded 85 GW, with integrated wind-solar-storage systems accounting for over 60%, and related investments are projected to reach $220 billion by 2030. However, with the deepening application of energy internet technology, modern microgrids are evolving from traditional single-energy supply systems to multi-source intelligent interconnection. Diverse entities such as photovoltaics, wind power, fuel cells, energy storage devices, electric vehicles, and flexible loads are deeply coupled through power electronic devices, forming a complex energy network with multi-scale spatiotemporal characteristics. While this structural evolution brings flexibility to the system, it also significantly increases operational safety risks and the difficulty of energy efficiency optimization. The "White Paper on the Development of New Power Systems in 2023" points out that in microgrids where the penetration rate of distributed energy in my country has exceeded 35%, voltage overruns and frequency instability accidents caused by the failure of multi-source coordinated control have increased by an average of 21% annually, resulting in direct economic losses of 870 million yuan.
[0003] The security challenges of multi-source intelligent microgrids stem from their inherent dual physical and informational attributes. At the physical level, the high proportion of power electronic devices connected continuously reduces system inertia. Data from the U.S. Department of Energy's "Modern Grid Resilience Assessment Report" (2022) shows that microgrids with inverter-interface power supplies accounting for more than 50% have a 3.8 times higher probability of transient instability than traditional systems. Simultaneously, the differences in charging and discharging characteristics among various types of energy storage devices make coordinated management of state of charge (SOC) difficult. According to statistics from the IEEE P2030.7 standard test case library, the capacity utilization rate of hybrid energy storage systems combining lithium batteries and flow batteries is 12%-15% lower than that of single-type systems. At the informational level, the application of technologies such as 5G communication and edge computing expands the attack surface. The U.S. Department of Homeland Security's 2024 cybersecurity report disclosed that APT attacks targeting energy IoT devices increased by 67% year-on-year, with False Data Injection (FDIA) attacks causing deviations in microgrid economic dispatch reaching as high as 19%. This cross-transmission of risks from the physical and informational domains poses a severe challenge to traditional security systems based on single-dimensional protection.
[0004] In terms of energy efficiency optimization, the spatiotemporal heterogeneity brought about by multi-source intelligent interconnection places higher demands on system-level energy management. A 2023 study by the Fraunhofer Institute in Germany showed that microgrids with V2G functionality for electric vehicles need to simultaneously coordinate second-level power fluctuations, minute-level load transfers, and hourly market transactions, while the existing hierarchical control architecture has significant lags in time-scale coupling. The International Renewable Energy Agency (IRENA) special report on "Smart Energy System Integration" points out that when the source-load matching degree within a microgrid is below 0.75, the economics of conventional day-ahead-real-time two-stage optimization models will decrease by more than 28%. Further complicating matters, the uncertainty of user-side flexible resource behavior exacerbates the optimization difficulty. A 2024 study by Imperial College London based on a sample of 100,000 users showed that the probability of actual participation in residential demand response deviating from the predicted value by more than 40% is as high as 32%, directly leading to a 19%-26% reduction in the execution efficiency of day-ahead scheduling plans.
[0005] Current technological systems still have significant shortcomings in addressing these challenges. Traditional security protection often employs a passive approach of "offline analysis + relay protection," which is ill-suited to the millisecond-level fault propagation speeds in multi-source intelligent interconnection scenarios. A 2024 simulation experiment by the China Electric Power Research Institute showed that when the system simultaneously experiences islanded operation of the photovoltaic array and overcharging faults in the energy storage system, the accurate operation rate of traditional protection devices was only 63.2%. While methods based on Model Predictive Control (MPC) and Deep Reinforcement Learning (DRL) have emerged in the field of energy efficiency optimization, comparative tests by the US National Renewable Energy Laboratory (NREL) indicate that existing algorithms still face a significant contradiction between computational time and optimization accuracy when dealing with multi-timescale coupled problems. In a 128-node test case, the solution time exceeded real-time requirements in 41% of cases. The mid-term evaluation report of the MUSE-GRID project, funded by the EU's Horizon 2020 program, explicitly points out that existing technological solutions have theoretical gaps in the synergistic optimization of safety and energy efficiency, particularly lacking systematic solutions to core issues such as cross-domain risk transmission mechanisms and multi-objective dynamic game theory.
[0006] These practical issues have also received significant attention at the policy level. The "Guiding Opinions on Promoting the Development of the Energy Digital Economy" specifically emphasizes the need for breakthroughs in key technologies such as multi-energy flow collaborative control and cross-domain security protection. The "Global Microgrid Technology Roadmap 2025" released by the Global Energy Interconnection Development and Cooperation Organization (GEIDCO) lists "safety and energy efficiency synergistic optimization" as the top priority among its ten key research directions. Against this backdrop, exploring new technological pathways that can both ensure the safe and stable operation of the system and achieve energy efficiency improvements across all stages has become an inevitable choice for promoting the in-depth development of the energy internet. Summary of the Invention
[0007] This invention is made to solve the above-mentioned problems, and aims to provide a multi-source intelligent microgrid security and energy efficiency collaborative optimization system based on attention mechanism and RNN-xLSTM-KANs hybrid model.
[0008] This invention provides a multi-source intelligent microgrid security and energy efficiency synergistic optimization system based on attention mechanism and RNN-xLSTM-KANs hybrid model. It features: a microgrid intelligent energy storage module, which optimizes data acquisition strategies to protect the power supply safety of the microgrid area, reduce energy waste, and coordinate the "source-load-storage" three-way linkage within the area, achieving intelligent energy storage; a security and energy efficiency synergistic optimization module, including an equipment and sensing layer, a data acquisition layer, an energy consumption monitoring layer, and an analysis and management layer, which optimizes the acquisition strategies in the microgrid intelligent energy storage module to achieve synergistic optimization of security and energy efficiency; and a power load... The load forecasting module adopts a layered and progressive architecture design, which is deeply coupled with the equipment and sensing layer, data acquisition layer, and optimization decision layer of the safety and energy efficiency collaborative optimization module. By integrating multi-source heterogeneous data, it dynamically captures the temporal characteristics and multi-dimensional feature correlations of load changes, providing the system with high-precision forecast results and supporting the generation of energy efficiency optimization strategies under safety constraints. The acquisition strategies include acquisition strategies for user electricity consumption data, acquisition strategies for renewable energy power generation in the park, and acquisition strategies for integrated source-load equipment in the park. The multi-source heterogeneous data includes historical load, meteorological information, user behavior, and equipment status.
[0009] The multi-source intelligent microgrid security and energy efficiency collaborative optimization system based on attention mechanism and RNN-xLSTM-KANs hybrid model provided by this invention can also have the following features: In the user electricity data collection strategy, the system collects the on / off status of user equipment within a unit time period by building, initially setting the time interval to 1 hour. It determines the user's electricity usage based on the location of the room where the electricity is used, and predicts the user's electricity habits by combining historical electricity waveforms. Based on the user's personalized requirements, the system obtains the user's electricity demand and habits, which are then transmitted to the smart circuit breaker for the corresponding reasonable electricity usage duration. The system also monitors the temperature and voltage of the equipment's power lines in real time. By analyzing current and power factors, monitoring data of the power supply lines in the park is obtained to ensure the safety of users' power lines. In the data collection strategy for renewable energy power generation in the park, the safety and energy efficiency synergistic optimization module reflects users' electricity demand, electricity consumption habits, and power supply line monitoring data in the park as features to the system. By inputting additional user-side features and adding real-time seasonal and weather forecast meteorological references, unnecessary and inefficient power generation operating costs are reduced while optimizing safety and energy efficiency strategies. In the data collection strategy for integrated source-load equipment in the park, the safety and energy efficiency synergistic optimization module makes decisions to adjust the integrated source-load equipment and optimize supply and demand to achieve efficient and safe operation.
[0010] The multi-source intelligent microgrid security and energy efficiency collaborative optimization system based on attention mechanism and RNN-xLSTM-KANs hybrid model provided in this invention may also have the following features: The device and sensing layer incorporates smart water and electricity meters, temperature and humidity sensors, light intensity sensors, infrared thermal imaging cameras, and smart circuit breakers to optimize the energy structure, achieve energy conservation and emission reduction by collecting real-time electricity prices, air temperature and humidity, light intensity, and user load usage habits. The data acquisition layer uses 4G / 5G, NB-IoT, ViFi+RFiD, RS485, and Ethernet technologies for support, mainly including data acquisition, data management, data mining, data security, data analysis, edge computing, and analysis tools. The system integrates various technologies, including sensors, configuration services, interface services, and holographic sensing. The data acquisition layer collects multiple sets of data from various sensors, water and electricity meters, and smart circuit breakers, such as voltage, current, power, power factor, electricity consumption, leakage current, and line temperature. It also monitors the automatic reclosing and opening / closing operations of each line. The energy monitoring layer mainly analyzes and processes the collected operational data and "source-storage" system data. It performs self-checks and alarms when significant data anomalies occur to ensure the safe and stable operation of the system. The analysis and management layer displays the safety detection status of each line through a visual interface and APP. Based on the detection data, it provides proactive on / off line management, load power supply plan adjustment, power shortage early warning, and basic information management.
[0011] The multi-source intelligent microgrid safety and energy efficiency synergistic optimization system based on attention mechanism and RNN-xLSTM-KANs hybrid model provided in this invention may also have the following features: The power load forecasting method module includes: a data input and preprocessing layer, which connects to the full-domain monitoring network of the safety and energy efficiency synergistic optimization system, integrates data sources and performs preprocessing to obtain multi-source features; and a multi-head self-attention feature weighting layer, which, considering the heterogeneity of the impact of multi-source features on load, introduces a multi-head self-attention mechanism to dynamically allocate the weights of multi-source features and strengthen the contribution of key factors. The system incorporates several layers: a first layer with embedded safety constraints to suppress abnormal interference; a second layer with an RNN-xLSTM temporal modeling layer, employing a hybrid architecture of RNN and xLSTM to address the nonlinear coupling problem of long-term temporal dependencies and multi-source features, and embedding energy efficiency optimization objectives; a third layer with a KANs function approximation and interpretation layer, constructing a KANs network based on the Kolmogorov-Arnold representation theorem to replace the traditional MLP, solving the high-dimensional feature mapping problem, and enhancing model interpretability; and a fourth layer with a collaborative optimization interface layer, achieving system linkage between safety and energy efficiency collaborative optimization through a prediction-scheduling closed loop and safety early warning linkage.
[0012] The multi-source intelligent microgrid safety and energy efficiency synergistic optimization system based on attention mechanism and RNN-xLSTM-KANs hybrid model provided by this invention can also have the following features: the data input and preprocessing layer is connected to the full-domain monitoring network of the safety and energy efficiency synergistic optimization system, integrating four types of data sources, including: user load data, which collects 12-dimensional electrical parameters of voltage, current, and power through smart circuit breakers to construct historical load sequences, with the smart circuit breaker sampling frequency ≥4kHz; environmental characteristic data, which integrates temperature and humidity sensors, light intensity sensors, and meteorological forecast APIs to obtain external variables such as temperature, humidity, light intensity, and wind speed; equipment status data, which extracts SOC, charge and discharge efficiency, and battery health status from the energy storage device monitoring module; and safety parameter data, which is connected to the real-time risk index of the safety detection module, including parameters such as line temperature rise ΔT, harmonic distortion rate THD, and insulation degradation alarm level.
[0013] The multi-source intelligent microgrid security and energy efficiency collaborative optimization system based on attention mechanism and RNN-xLSTM-KANs hybrid model provided by this invention may also have the following features: the data input and preprocessing process of the preprocessing layer specifically includes the following steps:
[0014] S1, Outlier cleaning: Missing values are filled using Lagrange interpolation, the formula is:
[0015]
[0016] Where, x i For valid data points, y i For the corresponding value;
[0017] S2, Standardization: Z-score method is used to eliminate dimensional differences.
[0018]
[0019] Where μ is the mean and σ is the standard deviation;
[0020] S3, Time Series Stationarization: Periodicity is analyzed using the autocorrelation function (ACF), and the trend term is eliminated by first-order differencing.
[0021] Δy t =y t -y t-1
[0022] S4, Feature Engineering: Extract discrete features and construct an 11-dimensional input matrix. The discrete features are weekday / holiday labels and peak / valley electricity price periods. The dimensions of the 11-dimensional input matrix are timestamps × 43104 hours of data.
[0023] The multi-source intelligent microgrid security and energy efficiency collaborative optimization system based on attention mechanism and RNN-xLSTM-KANs hybrid model provided by this invention can also have the following features: the dynamic allocation of feature weights in the multi-head self-attention feature weighting layer specifically includes the following steps:
[0024] (1) Feature mapping, which divides the input matrix into three sets of vectors: -Query(Q): Feature vector X at the current time step t+1 ;-Key(K): Historical feature matrix [X1,X2,…,X] t -Value(V): Historical load value matrix [y1,y2,…,y] t Upgrade to 64 dimensions via linear projection:
[0025] Q = W Q X t+1 ,
[0026] K = W K X 1:t ,
[0027] V = W V y 1:t ,
[0028] Among them, W Q W K W V The weight matrix is trainable.
[0029] (2) Scaled dot product attention calculation: Calculate the similarity between the query and the key, and then weight the value after Softmax normalization. Where, d k For the dimension of Key, Used to prevent gradient saturation;
[0030] (3) Multi-head attention fusion: Eight sets of attention calculations are performed in parallel, and the concatenated results are then dimensionality-reduced using a fully connected layer: MultiHead(Q,K,V)=Concat(head1,…,head8)W o
[0031] in,
[0032] W o To output the weight matrix;
[0033] (4) Expanding attention to safety constraints and introducing a safety risk index R t As an additional attention head, load forecasting weights are dynamically suppressed during high-risk periods:
[0034]
[0035] in,
[0036]
[0037] The final weighted feature matrix is:
[0038] X'=MultiHead(Q,K,V)+λ·head safe
[0039] Where λ is the safety weight coefficient, and the default weight coefficient is 0.3.
[0040] The multi-source intelligent microgrid safety and energy efficiency collaborative optimization system based on attention mechanism and RNN-xLSTM-KANs hybrid model provided in this invention can also have the following features: The RNN-xLSTM time-series modeling layer includes an RNN-sLSTM module and an xLSTM-mLSTM module. The RNN-sLSTM module includes: an RNN basic unit with a three-layer hidden structure and 22-12-2 neurons, using the Tanh activation function to capture diurnal periodic fluctuations. Where l represents the layer number (1 to 3), and (W, U, b) are the weights and biases; sLSTM parallel extension: the RNN output is fed into sLSTM, i.e., Stable LSTM, replacing the traditional Sigmoid gate with an exponential gate; forget gate and input gate:
[0041]
[0042] Normalization layer: Suppress gradient explosion
[0043] n t =f t ⊙n t-1 +i t
[0044] Stabilizer layer: Adjust the gating output range:
[0045] m t =max(logf t +m t-1 ,logi t ),
[0046]
[0047] Cell status update:
[0048] c t =f' t ⊙c t-1 +i' t ⊙z t
[0049] in,
[0050]
[0051] Candidate state
[0052] The xLSTM-mLSTM module includes: mLSTM multi-head extension: a QKV structure with an attention mechanism to enhance the ability to capture abrupt changes in peak and valley loads.
[0053] QKV projection:
[0054]
[0055] Cell status update:
[0056]
[0057] Hidden state output:
[0058]
[0059] in,
[0060] n t =f t ⊙n t-1 +i t ⊙k t
[0061] Energy efficiency optimization target embedding: The high-efficiency range of the energy storage system's State of Charge (SOC) (85%-92%) is used as prior knowledge and embedded into candidate gate calculations.
[0062]
[0063] Where η is the energy efficiency adjustment coefficient, which is 0.1 by default.
[0064] The multi-source intelligent microgrid safety and energy efficiency collaborative optimization system based on attention mechanism and RNN-xLSTM-KANs hybrid model provided by this invention can also have the following features: The KANs function approximation and interpretation layer construction of the KANs network specifically includes the following steps: a) Network structure: 4 layers of KANs are used, each layer containing 128 one-dimensional basis functions (B-spline), which approximate complex nonlinear relationships through linear combination.
[0065]
[0066] b. Dynamic function selection, introducing feature weights w from the attention layer output. i Dynamically activate relevant basis function branches:
[0067] ψ′ ij (xj)=ω i ·ψ ij (x j )
[0068] c. Safety-Energy Efficiency Joint Loss Function: Defines a multi-objective loss term to force prediction results to satisfy safety constraints and energy efficiency objectives.
[0069]
[0070] Among them, α=0.7, β=0.2, γ=0.1, T line This is due to the temperature rise of the circuit.
[0071] The multi-source intelligent microgrid safety and energy efficiency collaborative optimization system based on attention mechanism and RNN-xLSTM-KANs hybrid model provided by this invention can also have the following features: The linkage between the collaborative optimization interface layer and the safety and energy efficiency collaborative optimization system specifically includes the following steps: I. Prediction-scheduling closed loop: Day-ahead scheduling: Based on the predicted load, the MOPSO algorithm generates an energy storage charging and discharging plan, with the objective function being: minF(s)=αf1+βf2+γf3+δf4, where...
[0072]
[0073] f1 is the balance index, f2 is the peak-valley balance index, f3 is the energy utilization efficiency, and f4 is the cost index. Real-time correction: The DQN network assesses the prediction deviation risk and dynamically adjusts the energy storage output priority. When unexpected load fluctuations are detected, the model is retrained and the MOPSO particle swarm is updated. II. Safety early warning linkage: Abnormal load identification: Compare the predicted value with the actual value. If MAE > 15%, an insulation aging or electricity theft alarm is triggered. Risk source tracing: Visualize the feature contribution through the KANs network to locate the root cause of the anomaly. The root cause of the anomaly includes a sudden drop in photovoltaic panel output.
[0074] The role and effect of invention
[0075] This invention relates to a multi-source intelligent microgrid security and energy efficiency collaborative optimization system based on an attention mechanism and an RNN-xLSTM-KANs hybrid model. The invention aims to construct a campus microgrid security and energy efficiency collaborative control system based on intelligent circuit breaker data sensing, focusing on solving problems such as fragmented equipment status monitoring, low accuracy of user behavior modeling, and lag in source-load interaction. By deploying intelligent miniature circuit breakers (sampling frequency ≥ 4kHz) in building-level peripheral circuits, 12-dimensional electrical parameters such as voltage, current, and temperature are collected in real time, constructing a comprehensive monitoring network covering the distribution layer, equipment layer, and user layer. After extracting features such as harmonic distortion rate and power fluctuation entropy from the collected data at edge nodes, a dynamic database is formed to support system decision-making.
[0076] In terms of safety detection, this invention achieves early warning of potential equipment hazards by analyzing the matching degree between transient waveform characteristics (50-200ms) and a historical fault database (including over 20,000 samples across 7 categories such as arc faults and insulation aging). For example, when the zero-sequence current harmonic component suddenly increases beyond a threshold, an insulation degradation alarm is automatically triggered. Simultaneously, by combining the dynamic deviation monitoring of the user load curve and the safety template, it identifies risks associated with abnormal electricity consumption behaviors, such as generating a risk assessment report when abnormal power factor fluctuations are accompanied by a sharp increase in load.
[0077] In terms of energy efficiency optimization, this invention integrates diverse data such as building temperature and humidity, holidays, and electricity prices to establish a multi-timescale load forecasting model. For high-temperature summer scenarios, it analyzes the correlation between air conditioning load and outdoor temperature, and generates a cooling load forecast curve by combining building thermal inertia parameters, driving minute-level coordination between photovoltaic power generation and energy storage systems. The energy storage charging and discharging strategy is dynamically optimized based on electricity price signals, ensuring that peak-time SOC remains within the high-efficiency range (85%-92%), increasing the photovoltaic self-consumption rate to over 86%.
[0078] This invention innovatively establishes a dynamic coupling mechanism between safety constraints and energy efficiency targets. In day-ahead dispatching, safety boundaries such as transformer load rate ≤75% and cable temperature rise ≤40K are used as hard constraints to optimize energy allocation plans. In real-time control, load priorities are automatically adjusted through a dynamic game between the risk index and the energy efficiency coefficient. When a decrease in line insulation is detected, non-essential lighting loads are preferentially cut off (reduced by 19%-27%) to maintain a safety margin, while simultaneously optimizing energy storage output to compensate for power supply gaps. Actual verification shows that this invention can shorten fault identification time from 25 minutes to 8 seconds and achieve 120ms-level power restoration in the event of an N-1 fault, significantly improving the safety and economy of power use in the industrial park. Attached Figure Description
[0079] Figure 1 This is a schematic diagram of each layer in the safety and energy efficiency synergistic optimization module in this embodiment of the present invention;
[0080] Figure 2This is a schematic diagram of the Attention-RNN-xLSTM-KANs model structure in an embodiment of the present invention;
[0081] Figure 3 This is a schematic diagram of the RNN-sLSTM model structure in an embodiment of the present invention; and
[0082] Figure 4 This is a schematic diagram of the KANs network structure in an embodiment of the present invention. Detailed Implementation
[0083] To make the technical means, creative features, objectives and effects of this invention easy to understand, the following embodiments, in conjunction with the accompanying drawings, specifically illustrate the multi-source intelligent microgrid security and energy efficiency synergistic optimization system based on attention mechanism and RNN-xLSTM-KANs hybrid model.
[0084] In this embodiment, the multi-source intelligent microgrid security and energy efficiency synergistic optimization system based on attention mechanism and RNN-xLSTM-KANs hybrid model includes: a microgrid intelligent energy storage module, a security and energy efficiency synergistic optimization module, and a power load prediction method module.
[0085] The microgrid smart energy storage module optimizes data acquisition strategies to protect the power safety of the microgrid park, reduce energy waste, and coordinate and optimize the "source-load-storage" linkage within the park, thereby achieving smart energy storage for the microgrid.
[0086] The data collection strategies include those for collecting user electricity consumption data, those for collecting renewable energy power generation data in the park, and those for collecting data from integrated source-load equipment in the park.
[0087] Table 1
[0088]
[0089] Table 1 lists the devices used in the user electricity consumption data collection strategy.
[0090] As shown in Table 1, in the data collection strategy for user electricity consumption, the system collects the on / off status of user equipment within a unit building time period using equipment. The initial time interval is set to 1 hour. The system determines the user's electricity consumption based on the location of the room where the electricity is used, and predicts the user's electricity consumption habits by combining historical electricity waveforms. Based on the personalized requirements provided by the user, the system obtains the user's electricity demand and electricity consumption habits, which are then transmitted to the smart circuit breaker for the corresponding reasonable duration of electricity consumption. The system also monitors the temperature, voltage, current, and power factor of the equipment's power lines in real time to obtain power supply line monitoring data for the park, ensuring the safety of the user's power lines.
[0091] Table 2
[0092]
[0093]
[0094] Table 2 shows users' electricity consumption habits, electricity demand, and power supply line monitoring.
[0095] As shown in Table 2, in the data collection strategy for renewable energy power generation in the park, within the "source-grid-load-storage" ecosystem of the microgrid, the main "sources" are solar power and wind power. The supply of this renewable energy is greatly affected by weather or seasonal factors, resulting in unstable capacity and low power quality. Therefore, this unstable power generation method requires accurate assessment of its periodicity to formulate corresponding and effective energy supply plans.
[0096] Through the safety and energy efficiency synergistic optimization module, users' electricity demand, electricity consumption habits, and power supply line monitoring data of the park's lines are reflected to the system in the form of features. By inputting additional user-side features and adding real-time seasonal and weather forecast meteorological references, unnecessary and inefficient power generation operation costs are reduced while optimizing safety and energy efficiency strategies.
[0097] Table 3
[0098]
[0099] Table 3 shows the data collection strategies for charging, energy storage, and discharging of photovoltaic charging piles.
[0100] As shown in Table 3, in the data collection strategy for integrated source-load equipment in the park, the safety and energy efficiency synergistic optimization module is used to make decision adjustments and optimize supply and demand for integrated source-load equipment to achieve efficient and safe operation.
[0101] In modern microgrids, there are often devices that can generate and consume electricity, such as solar photovoltaic charging piles. These devices are often prone to overheating, spontaneous combustion, or aging of their lines. Such integrated source and load devices need to be adjusted and optimized for supply and demand through a safety and energy efficiency system to achieve efficient and safe operation.
[0102] Figure 1 This is a schematic diagram of each layer in the safety and energy efficiency synergistic optimization module in this embodiment of the present invention.
[0103] like Figure 1 As shown, the safety and energy efficiency synergistic optimization module includes an equipment and sensing layer, a data acquisition layer, an energy consumption monitoring layer, and an analysis and management layer. It optimizes the acquisition strategy in the microgrid smart energy storage module to achieve synergistic optimization of safety and energy efficiency.
[0104] The equipment and sensing layer incorporate smart water and electricity meters, temperature and humidity sensors, light intensity sensors, infrared thermal imaging cameras, and smart circuit breakers to optimize the energy structure and reduce energy consumption and emissions by collecting real-time electricity prices, air temperature and humidity, light intensity, and user load usage habits.
[0105] The data acquisition layer is supported by 4G / 5G, NB-IoT, ViFi+RFiD, RS485, and Ethernet technologies. It mainly includes data acquisition, data management, data mining, data security, data analysis, edge computing, analysis tools, configuration services, interface services, and holographic perception. The data acquisition layer will collect multiple sets of data such as voltage, current, power, power factor, power consumption, leakage current, and line temperature from various sensors, water and electricity meters, and smart circuit breakers, and monitor the operation of automatic reclosing and opening / closing of each line.
[0106] The energy monitoring layer mainly analyzes and processes the collected operational data and "source-storage" system data, and performs self-checks and alarms when obvious data anomalies occur, so as to achieve safe and stable operation of the system.
[0107] The management team analyzes and displays the safety testing status of each line through a visual interface and APP. Based on the testing data, it provides proactive line switching management, load power supply plan adjustment, power shortage early warning, and basic information management.
[0108] The power load forecasting method module, as the core module of this invention, adopts a hierarchical and progressive architecture design. It is deeply coupled with the equipment and sensing layer, data acquisition layer, and optimization decision layer of the safety and energy efficiency collaborative optimization module. By integrating multi-source heterogeneous data, including historical load, meteorological information, user behavior, and equipment status, it dynamically captures the temporal characteristics and multi-dimensional feature correlations of load changes, providing the system with high-precision forecasting results and supporting the generation of energy efficiency optimization strategies under safety constraints.
[0109] Figure 2 This is a schematic diagram of the Attention-RNN-xLSTM-KANs model structure in an embodiment of the present invention.
[0110] like Figure 2 As shown, the power load forecasting method module includes: a data input and preprocessing layer, a multi-head self-attention feature weighting layer, an RNN-xLSTM time series modeling layer, a KANs function approximation and interpretation layer, and a collaborative optimization interface layer. The model output is linked with the MOPSO-DQN algorithm through a closed-loop feedback mechanism to achieve full-process collaboration between forecasting, scheduling, and safety early warning. The functions and algorithm flow of each layer are described in detail below.
[0111] The data input and preprocessing layer interfaces with the safety and energy efficiency collaborative optimization system's full-domain monitoring network, integrates data sources and performs preprocessing to obtain multi-source characteristics.
[0112] The data input and preprocessing layer interfaces with the safety and energy efficiency collaborative optimization system's full-domain monitoring network, integrating four types of data sources: user load data, environmental characteristic data, equipment status data, and safety parameter data.
[0113] User load data is collected through smart circuit breakers, which collect 12-dimensional electrical parameters including voltage, current, and power to construct historical load sequences. The sampling frequency of the smart circuit breakers is ≥4kHz.
[0114] Environmental characteristic data are integrated from temperature and humidity sensors, light intensity sensors, and weather forecast APIs to obtain external variables such as temperature, humidity, light intensity, and wind speed.
[0115] Equipment status data, including SOC, charge / discharge efficiency, and battery health status, are extracted from the energy storage device monitoring module.
[0116] Safety parameter data is accessed to the real-time risk index of the safety detection module. The real-time risk index includes parameters such as line temperature rise ΔT, harmonic distortion rate (THD), and insulation degradation alarm level.
[0117] The data input and preprocessing process of the preprocessing layer specifically includes the following steps:
[0118] S1, Outlier cleaning: Missing values are filled using Lagrange interpolation, the formula is:
[0119]
[0120] Where, x i For valid data points, y i This is the corresponding value.
[0121] S2, Standardization: Z-score method is used to eliminate dimensional differences.
[0122]
[0123] Where μ is the mean and σ is the standard deviation;
[0124] S3, Time Series Stationarization: Periodicity is analyzed using the autocorrelation function (ACF), and the trend term is eliminated by first-order differencing.
[0125] Δy t =y t -y t-1
[0126] S4, Feature Engineering: Extract discrete features and construct an 11-dimensional input matrix.
[0127] The discrete features are weekday / holiday labels and peak / valley electricity price periods. The 11-dimensional input matrix has dimensions of timestamp × 43104 hours of data.
[0128] To address the heterogeneity of the impact of multi-source features on the load, the multi-head self-attention feature weighting layer introduces a multi-head self-attention mechanism to dynamically allocate the weights of multi-source features, enhance the contribution of key factors, and embed safety constraints to suppress abnormal interference.
[0129] The dynamic allocation of feature weights in a multi-head self-attention feature weighting layer includes the following steps:
[0130] (1) Feature mapping divides the input matrix into three sets of vectors:
[0131] -Query(Q): Feature vector X at the current time step t+1 ;
[0132] -Key(K): Historical feature matrix [X1,X2,…,X] t ];
[0133] -Value(V): Historical load value matrix [y1,y2,…,y t ],
[0134] Upgrade to 64 dimensions via linear projection:
[0135] Q = W Q X t+1 ,
[0136] K = W K X 1:t ,
[0137] V = W V y 1:t ,
[0138] Among them, W Q W K W V The weight matrix is trainable.
[0139] (2) Scaled dot product attention calculation: Calculate the similarity between the query and the key, and then weight the value after Softmax normalization.
[0140]
[0141] Where, d k For the dimension of Key, Used to prevent gradient saturation;
[0142] (3) Multi-head attention fusion, 8 sets of attention calculations are performed in parallel, and the results are spliced and then reduced in dimensionality by a fully connected layer:
[0143] MultiHead(Q,K,V)=Concat(head1,…,head8)W o
[0144] in,
[0145]
[0146] W o To output the weight matrix;
[0147] (4) Expanding attention to safety constraints and introducing a safety risk index R t As an additional attention head, load forecasting weights are dynamically suppressed during high-risk periods:
[0148]
[0149] in,
[0150]
[0151] The final weighted feature matrix is:
[0152] X'=MultiHead(Q,K,V)+λ·head safe
[0153] Where λ is the safety weight coefficient, and the default weight coefficient is 0.3.
[0154] The RNN-xLSTM temporal modeling layer adopts a hybrid architecture of RNN and xLSTM to solve the nonlinear coupling problem of long temporal dependencies and multi-source features, and embeds energy efficiency optimization objectives.
[0155] The RNN-xLSTM temporal modeling layer includes: the RNN-sLSTM module and the xLSTM-mLSTM module.
[0156] Figure 3 This is a schematic diagram of the RNN-sLSTM model structure in an embodiment of the present invention.
[0157] like Figure 3 As shown, the RNN-sLSTM module includes an RNN basic unit and an sLSTM parallel extension.
[0158] RNN basic unit: Designed with a three-layer hidden structure, 22-12-2 neurons, using the Tanh activation function to capture daily cyclical fluctuations.
[0159]
[0160] Where l represents the layer number (1 to 3), and (W, U, b) are the weights and biases;
[0161] Parallel extension of sLSTM: The RNN output is fed into sLSTM, i.e., Stable LSTM, replacing the traditional sigmoid gate with an exponential gate.
[0162] Forget gate and input gate:
[0163]
[0164] Normalization layer: Suppress gradient explosion
[0165] n t =f t ⊙n t-1 +i t
[0166] Stabilizer layer: Adjust the gating output range:
[0167] m t =max(logf t +m t-1 ,logi t ),
[0168]
[0169] Cell status update:
[0170] c t =f' t ⊙c t-1 +i' t ⊙z t
[0171] in,
[0172]
[0173] It is in the candidate state.
[0174] The xLSTM-mLSTM module includes:
[0175] mLSTM multi-head expansion: Introducing an attention mechanism into the QKV structure to enhance the ability to capture abrupt changes in peak and valley loading:
[0176] QKV projection:
[0177]
[0178] Cell status update:
[0179]
[0180] Hidden state output:
[0181]
[0182] in,
[0183] n t =f t ⊙n t-1 +i t ⊙k t
[0184] Energy efficiency optimization target embedding: The high-efficiency range of the energy storage system's State of Charge (SOC) (85%-92%) is used as prior knowledge and embedded into candidate gate calculations.
[0185]
[0186] Where η is the energy efficiency adjustment coefficient, which is 0.1 by default.
[0187] KANs Function Approximation and Interpretation Layer: Based on the Kolmogorov-Arnold representation theorem, a KANs network is constructed to replace the traditional MLP, solve the problem of high-dimensional feature mapping, and enhance the interpretability of the model.
[0188] Figure 4 This is a schematic diagram of the KANs network structure in an embodiment of the present invention.
[0189] like Figure 4 As shown, the KANs function approximation and interpretation layer construction of the KANs network specifically includes the following steps:
[0190] a. Network structure: A 4-layer KANs network is used, with each layer containing 128 one-dimensional basis functions (B-spline). Complex nonlinear relationships are approximated through linear combination.
[0191]
[0192] b. Dynamic function selection, introducing feature weights w from the attention layer output. i Dynamically activate relevant basis function branches:
[0193] ψ′ ij (x j )=ω i ·ψ ij (x j )
[0194] c. Safety-Energy Efficiency Joint Loss Function: Defines a multi-objective loss term to force prediction results to satisfy safety constraints and energy efficiency objectives.
[0195]
[0196] Among them, α=0.7, β=0.2, γ=0.1, T lineThis is due to the temperature rise of the circuit.
[0197] The collaborative optimization interface layer achieves system linkage for collaborative optimization of safety and energy efficiency through prediction-scheduling closed loop and safety early warning linkage.
[0198] The linkage between the collaborative optimization interface layer and the safety and energy efficiency collaborative optimization system includes the following steps:
[0199] I. Prediction-Scheduling Closed Loop:
[0200] Day-ahead dispatch: Based on the predicted load, the MOPSO algorithm generates an energy storage charging and discharging plan, with the objective function being:
[0201] minF(s)=αf1+βf2+γf3+δf4
[0202] in,
[0203]
[0204]
[0205] f1 is the balance index, f2 is the peak-valley balance index, f3 is the energy utilization efficiency, and f4 is the cost index.
[0206] Real-time correction: The DQN network assesses the risk of prediction bias and dynamically adjusts the priority of energy storage output. When unexpected load fluctuations are detected, the model is retrained and the MOPSO particle swarm is updated.
[0207] II. Security Early Warning Linkage:
[0208] Abnormal load identification: Compare the predicted value with the actual value. If MAE > 15%, trigger insulation aging or electricity theft alarm.
[0209] Risk tracing: By visualizing the feature contribution of KANs networks, the root cause of the anomaly can be located. The root cause of the anomaly includes a sudden drop in photovoltaic panel output.
[0210] This invention has the following innovative advantages:
[0211] Cross-domain feature fusion: Physical safety parameters (THD, ΔT) are embedded into the attention mechanism to achieve joint modeling of safety and energy efficiency.
[0212] Dynamic constraint embedding: Hard coupling of safety boundaries (e.g., cable temperature rise ≤ 40K) is achieved through xLSTM gating and KANs loss function.
[0213] Closed-loop adaptive: Supports online incremental learning, and automatically calls historical data to fine-tune network parameters in island mode.
[0214] Interpretive enhancement: KANs networks provide visual analysis of feature-load correlations to assist in operation and maintenance decisions.
[0215] This invention constructs a high-precision, interpretable short-term load forecasting model for microgrids by deeply integrating attention mechanisms, RNN-xLSTM time-series modeling, and KANs function approximation, and forms a closed-loop linkage mechanism with a safety and energy efficiency co-optimization system. Its innovative design, while ensuring forecast accuracy, rigidly couples safety constraints and energy efficiency targets, providing reliable technical support for the stable operation and efficient scheduling of microgrids.
[0216] The role and effect of the embodiments
[0217] This invention relates to a multi-source intelligent microgrid security and energy efficiency collaborative optimization system based on an attention mechanism and an RNN-xLSTM-KANs hybrid model. The invention aims to construct a campus microgrid security and energy efficiency collaborative control system based on intelligent circuit breaker data sensing, focusing on solving problems such as fragmented equipment status monitoring, low accuracy of user behavior modeling, and lag in source-load interaction. By deploying intelligent miniature circuit breakers (sampling frequency ≥ 4kHz) in building-level peripheral circuits, 12-dimensional electrical parameters such as voltage, current, and temperature are collected in real time, constructing a comprehensive monitoring network covering the distribution layer, equipment layer, and user layer. After extracting features such as harmonic distortion rate and power fluctuation entropy from the collected data at edge nodes, a dynamic database is formed to support system decision-making.
[0218] In terms of safety detection, this invention achieves early warning of potential equipment hazards by analyzing the matching degree between transient waveform characteristics (50-200ms) and a historical fault database (including over 20,000 samples across 7 categories such as arc faults and insulation aging). For example, when the zero-sequence current harmonic component suddenly increases beyond a threshold, an insulation degradation alarm is automatically triggered. Simultaneously, by combining the dynamic deviation monitoring of the user load curve and the safety template, it identifies risks associated with abnormal electricity consumption behaviors, such as generating a risk assessment report when abnormal power factor fluctuations are accompanied by a sharp increase in load.
[0219] In terms of energy efficiency optimization, this invention integrates diverse data such as building temperature and humidity, holidays, and electricity prices to establish a multi-timescale load forecasting model. For high-temperature summer scenarios, it analyzes the correlation between air conditioning load and outdoor temperature, and generates a cooling load forecast curve by combining building thermal inertia parameters, driving minute-level coordination between photovoltaic power generation and energy storage systems. The energy storage charging and discharging strategy is dynamically optimized based on electricity price signals, ensuring that peak-time SOC remains within the high-efficiency range (85%-92%), increasing the photovoltaic self-consumption rate to over 86%.
[0220] This invention innovatively establishes a dynamic coupling mechanism between safety constraints and energy efficiency targets. In day-ahead dispatching, safety boundaries such as transformer load rate ≤75% and cable temperature rise ≤40K are used as hard constraints to optimize energy allocation plans. In real-time control, load priorities are automatically adjusted through a dynamic game between the risk index and the energy efficiency coefficient. When a decrease in line insulation is detected, non-essential lighting loads are preferentially cut off (reduced by 19%-27%) to maintain a safety margin, while simultaneously optimizing energy storage output to compensate for power supply gaps. Actual verification shows that this invention can shorten fault identification time from 25 minutes to 8 seconds and achieve 120ms-level power restoration in the event of an N-1 fault, significantly improving the safety and economy of power use in the industrial park.
[0221] The Yuanzhilian Microgrid Safety and Energy Efficiency Collaborative Optimization System of this invention fully integrates natural factors such as weather and environment with customer needs and system architecture, promoting the practical application of ubiquitous power Internet of Things construction. Through the collection, processing, statistical optimization, and comprehensive energy intelligent safety and energy efficiency management of various factor data, the system achieves deep integration of energy flow, information flow, and data flow. The platform management highlights peak shaving and valley filling, resulting in significant energy conservation and emission reduction effects.
[0222] The intelligent microgrid safety and energy efficiency synergistic optimization system of this invention adopts digital and information technologies to realize online safety monitoring of the new power system. At the system architecture level, in the energy monitoring process of the safety and energy efficiency synergistic optimization module, secondary-developed sensors and new smart circuit breakers are used to extend the data collection and monitoring from a single room to the data collection and monitoring of every unit building in the entire park, which greatly improves the system's compatibility with various parts of the park and realizes the comprehensive collection of various types of data.
[0223] In the intelligent microgrid security and energy efficiency collaborative optimization system of this invention, the underlying data of various subsystems and modules are integrated to form an information infrastructure for energy conservation and emission reduction in a "microgrid smart park," thereby accelerating the realization of the smart city concept. Based on a unified platform compatible with mainstream communication protocols, systems for carbon emission management, intelligent energy efficiency management, safety prediction management, and regional load prediction management are added.
[0224] The intelligent microgrid safety and energy efficiency synergistic optimization system of this invention achieves full lifecycle management, providing customers with a comprehensive digital zero-carbon management solution covering energy design, planning, implementation, operation and maintenance, and management. In the early stages of the project, the safety and energy efficiency synergistic optimization system analyzes the actual conditions of the site survey and uses automatic demand response strategies to plan energy storage devices, system energy consumption, and real-time electricity prices. In the middle stages of the project, a detailed plan is developed for communication with construction units and software platform development. In the later stages of the project, intelligent services are provided through the safety and energy efficiency synergistic optimization system, i.e., personalized energy application solutions are created, thereby achieving a one-stop closed-loop management solution.
[0225] Those skilled in the art should understand that this invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to this invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.
Claims
1. A multi-source intelligent microgrid security and energy efficiency synergistic optimization system based on attention mechanism and RNN-xLSTM-KANs hybrid model, characterized in that, include: The microgrid smart energy storage module optimizes data acquisition strategies to protect the power safety of the microgrid park, reduce energy waste, and coordinate and optimize the "source-load-storage" linkage in the park, thereby realizing smart energy storage for the microgrid. The safety and energy efficiency synergistic optimization module includes an equipment and sensing layer, a data acquisition layer, an energy consumption monitoring layer, and an analysis and management layer. It optimizes the acquisition strategy in the microgrid smart energy storage module to achieve synergistic optimization of safety and energy efficiency. The power load forecasting method module adopts a hierarchical and progressive architecture design, deeply coupled with the equipment and sensing layers, data acquisition layers, and optimization decision layers of the safety and energy efficiency collaborative optimization module. By fusing multi-source heterogeneous data, it dynamically captures the temporal characteristics and multi-dimensional feature correlations of load changes, providing the system with high-precision forecasting results and supporting the generation of energy efficiency optimization strategies under safety constraints. The data collection strategies include strategies for collecting user electricity consumption data, strategies for collecting renewable energy power generation data in the park, and strategies for collecting data from integrated source-load equipment in the park. The multi-source heterogeneous data includes historical load, meteorological information, user behavior, and equipment status.
2. The multi-source intelligent microgrid security and energy efficiency synergistic optimization system based on attention mechanism and RNN-xLSTM-KANs hybrid model as described in claim 1, characterized in that: in, In the aforementioned data collection strategy for user electricity consumption, the system collects data on the on / off status of user equipment within a unit building over a given time period, initially setting the time interval to 1 hour. Based on the location of the room where the electricity is used, the system determines the user's electricity consumption situation and predicts their electricity usage habits by combining historical electricity waveforms. Based on the personalized requirements provided by the user, the system obtains the user's electricity needs and habits, which are then transmitted to the smart circuit breaker for a corresponding reasonable duration of electricity use. The system also monitors the temperature, voltage, current, and power factor of the equipment's power lines in real time, obtaining power supply line monitoring data for the entire park to ensure the safety of the user's power lines. In the data collection strategy for renewable energy power generation in the park, the safety and energy efficiency synergistic optimization module reflects the user's electricity demand, electricity consumption habits, and power supply line monitoring data of the park's power lines in the form of features to the system. By inputting additional user-side features and incorporating real-time seasonal and weather forecast references, the system can optimize safety and energy efficiency strategies while reducing unnecessary and inefficient power generation operating costs. In the data collection strategy for integrated source-load equipment in the park, the safety and energy efficiency synergistic optimization module makes decisions and optimizes supply and demand for integrated source-load equipment to achieve efficient and safe operation.
3. The multi-source intelligent microgrid security and energy efficiency synergistic optimization system based on attention mechanism and RNN-xLSTM-KANs hybrid model as described in claim 1, characterized in that: in, The device and sensing layer incorporate smart water and electricity meters, temperature and humidity sensors, light intensity sensors, infrared thermal imaging cameras, and smart circuit breakers to optimize the energy structure, achieve energy conservation and emission reduction by collecting real-time electricity prices, air temperature and humidity, light intensity, and user load habits. The data acquisition layer is supported by 4G / 5G, NB-IoT, ViFi+RFiD, RS485, and Ethernet technologies. It mainly includes data acquisition, data management, data mining, data security, data analysis, edge computing, analysis tools, configuration services, interface services, and holographic sensing. The data acquisition layer will collect multiple sets of data from various sensors, water and electricity meters, and smart circuit breakers, including voltage, current, power, power factor, electricity consumption, leakage current, and line temperature. It will also monitor the automatic reclosing and tripping operation of each line. The energy consumption monitoring layer primarily analyzes and processes the collected operational data and "source-storage" system data, and performs self-checks and alarms when significant data anomalies occur, in order to ensure the safe and stable operation of the system. The analysis management layer displays the safety testing status of each line through a visual interface and APP. Based on the testing data, it provides proactive line switching management, load power supply plan adjustment, power shortage early warning, and basic information management.
4. The multi-source intelligent microgrid security and energy efficiency collaborative optimization system based on attention mechanism and RNN-xLSTM-KANs hybrid model as described in claim 1, Its features are: in, The power load forecasting method module includes: The data input and preprocessing layer connects to the full-domain monitoring network of the safety and energy efficiency collaborative optimization system, integrates data sources and performs preprocessing to obtain multi-source features; The multi-head self-attention feature weighting layer addresses the heterogeneity of the impact of the multi-source features on the load by introducing a multi-head self-attention mechanism to dynamically allocate the weights of the multi-source features, enhance the contribution of key factors, and embed security constraints to suppress abnormal interference. The RNN-xLSTM temporal modeling layer adopts a hybrid architecture of RNN and xLSTM to solve the nonlinear coupling problem between long temporal dependencies and the multi-source features, and embeds energy efficiency optimization objectives. KANs Function Approximation and Interpretation Layer: Based on the Kolmogorov-Arnold representation theorem, a KANs network is constructed to replace the traditional MLP, solve the problem of high-dimensional feature mapping, and enhance the interpretability of the model. The collaborative optimization interface layer achieves system linkage for collaborative optimization of safety and energy efficiency through prediction-scheduling closed loop and safety early warning linkage.
5. The multi-source intelligent microgrid security and energy efficiency synergistic optimization system based on attention mechanism and RNN-xLSTM-KANs hybrid model according to claim 4, characterized in that: in, The data input and preprocessing layer interfaces with the comprehensive monitoring network of the safety and energy efficiency collaborative optimization system, integrating four types of data sources, including: User load data is collected through smart circuit breakers, which collect 12-dimensional electrical parameters including voltage, current, and power to construct historical load sequences. The sampling frequency of the smart circuit breakers is ≥4kHz. Environmental characteristic data is integrated from temperature and humidity sensors, light intensity sensors, and weather forecast APIs to obtain external variables such as temperature, humidity, light intensity, and wind speed. Equipment status data, including SOC, charge / discharge efficiency, and battery health status, are extracted from the energy storage device monitoring module. Safety parameter data, including the real-time risk index of the safety detection module, such as line temperature rise ΔT, harmonic distortion rate THD, and insulation deterioration alarm level.
6. The multi-source intelligent microgrid security and energy efficiency synergistic optimization system based on attention mechanism and RNN-xLSTM-KANs hybrid model as described in claim 4, characterized in that: in, The data input and preprocessing process of the preprocessing layer specifically includes the following steps: S1, Outlier cleaning: Missing values are filled using Lagrange interpolation, the formula is: Where, x i For valid data points, y i For the corresponding value; S2, Standardization: Z-score method is used to eliminate dimensional differences. Where μ is the mean and σ is the standard deviation; S3, Time Series Stationarization: Periodicity is analyzed using the autocorrelation function (ACF), and the trend term is eliminated by first-order differencing. Dy t y t -y t-1 S4, Feature Engineering: Extracting discrete features and constructing an 11-dimensional input matrix. The discrete features are weekday / holiday labels and peak / valley electricity price periods, and the 11-dimensional input matrix has dimensions of timestamp × 43104 hours of data.
7. The multi-source intelligent microgrid security and energy efficiency synergistic optimization system based on attention mechanism and RNN-xLSTM-KANs hybrid model as described in claim 4, characterized in that: in, The dynamic allocation of feature weights in the multi-head self-attention feature weighting layer specifically includes the following steps: (1) Feature mapping divides the input matrix into three sets of vectors: -Query(Q): Feature vector X at the current time step t+1 ; -Key(K): Historical feature matrix [X1,X2,…,X] t ]; -Value(V): Historical load value matrix [y1,y2,…,y t ], Upgrade to 64 dimensions via linear projection: Q=W Q X t+1 , K=W K X 1:t , V=W V y 1:t , Among them, W Q W K W V The weight matrix is trainable. (2) Scaled dot product attention calculation: Calculate the similarity between the query and the key, and then weight the value after Softmax normalization. Where, d k For the dimension of Key, Used to prevent gradient saturation; (3) Multi-head attention fusion, 8 sets of attention calculations are performed in parallel, and the results are spliced and then reduced in dimensionality by a fully connected layer: MultiHead(Q,K,V)=Concat(head1,…,head8)W o in, W o To output the weight matrix; (4) Expanding attention to safety constraints and introducing a safety risk index R t As an additional attention head, load forecasting weights are dynamically suppressed during high-risk periods: in, The final weighted feature matrix is: X'=MultiHead(Q,K,V)+λ·head safe Wherein, λ is the safety weight coefficient, which is 0.3 by default.
8. The multi-source intelligent microgrid security and energy efficiency synergistic optimization system based on attention mechanism and RNN-xLSTM-KANs hybrid model as described in claim 4, characterized in that: in, The RNN-xLSTM time series modeling layer includes: an RNN-sLSTM module and an xLSTM-mLSTM module. The RNN-sLSTM module includes: RNN basic unit: Designed with a three-layer hidden structure, 22-12-2 neurons, using the Tanh activation function to capture daily cyclical fluctuations. Where l represents the layer number (1 to 3), and (W, U, b) are the weights and biases; Parallel extension of sLSTM: The RNN output is fed into sLSTM, i.e., Stable LSTM, replacing the traditional sigmoid gate with an exponential gate. Forget gate and input gate: Normalization layer: Suppress gradient explosion n t =f t ⊙n t-1 +i t Stabilizer layer: Adjust the gating output range: m t =max(logf t +m t-1 ,logi t ), Cell status update: c t =f' t ⊙c t-1 +i' t ⊙z t in, Candidate state The xLSTM-mLSTM module includes: mLSTM multi-head expansion: Introducing an attention mechanism into the QKV structure to enhance the ability to capture abrupt changes in peak and valley loading: QKV projection: Cell status update: Hidden state output: in, n t =f t ⊙n t-1 +i t ⊙k t Energy efficiency optimization target embedding: The high-efficiency range of the energy storage system's State of Charge (SOC) (85%-92%) is used as prior knowledge and embedded into candidate gate calculations. Wherein, η is the energy efficiency adjustment coefficient, which is defaulted to 0.
1.
9. The multi-source intelligent microgrid security and energy efficiency synergistic optimization system based on attention mechanism and RNN-xLSTM-KANs hybrid model as described in claim 4, characterized in that: in, The construction of the KANs network through the KANs function approximation and interpretation layer specifically includes the following steps: a. Network structure: A 4-layer KANs network is used, with each layer containing 128 one-dimensional basis functions (B-spline). Complex nonlinear relationships are approximated through linear combination. b. Dynamic function selection, introducing feature weights w from the attention layer output. i Dynamically activate relevant basis function branches: ψ′ ij (x j )=ω i ·ψ ij (x j ) c. Safety-Energy Efficiency Joint Loss Function: Defines a multi-objective loss term to force prediction results to satisfy safety constraints and energy efficiency objectives. Among them, α=0.7, β=0.2, γ=0.1, T line This is due to the temperature rise of the circuit.
10. The multi-source intelligent microgrid security and energy efficiency synergistic optimization system based on attention mechanism and RNN-xLSTM-KANs hybrid model according to claim 4, characterized in that: in, The linkage between the collaborative optimization interface layer and the safety and energy efficiency collaborative optimization system specifically includes the following steps: I. Prediction-Scheduling Closed Loop: Day-ahead dispatch: Based on the predicted load, the MOPSO algorithm generates an energy storage charging and discharging plan, with the objective function being: minF(s)=αf1+βf2+γf3+δf4 in, f1 is the balance index, f2 is the peak-valley balance index, f3 is the energy utilization efficiency, and f4 is the cost index. Real-time correction: The DQN network assesses the risk of prediction bias and dynamically adjusts the priority of energy storage output. When unexpected load fluctuations are detected, the model is retrained and the MOPSO particle swarm is updated. II. Security Early Warning Linkage: Abnormal load identification: Compare the predicted value with the actual value. If MAE > 15%, trigger insulation aging or electricity theft alarm. Risk tracing: By visualizing the feature contribution of KANs networks, the root cause of the anomaly can be located, including a sudden drop in photovoltaic panel output.