Rural microgrid group dynamic optimization method, system, device, medium and product

By using a spatiotemporal twin CNN-LSTM model and a multi-agent reinforcement learning algorithm, the problems of control delay and deviation in rural microgrids were solved, enabling real-time state prediction and dynamic optimization scheduling of rural microgrid groups, thereby improving energy distribution efficiency and system stability.

CN121367209APending Publication Date: 2026-01-20NORTH CHINA ELECTRIC POWER UNIV +1

Patent Information

Application Number
CN202511870200.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-12
Publication Date
2026-01-20

AI Technical Summary

Technical Problem

The control technology of rural microgrids suffers from delays and biases, making it difficult to adapt to the volatility of renewable energy and the complexity of load demand, resulting in power shortages and energy waste. Furthermore, there is a lack of effective power interaction and dispatch capabilities between microgrids.

Method used

By employing a spatiotemporal twin CNN-LSTM model and a multi-agent reinforcement learning algorithm, combined with dynamic perceptual convolutional spatial feature extraction, temporal adaptive LSTM temporal feature extraction, and spatiotemporal feature fusion, real-time state prediction and dynamic optimization scheduling of rural microgrid groups can be achieved.

Benefits of technology

It enables real-time coordinated control of photovoltaics, energy storage, and loads, improves the efficient distribution of energy among microgrids and system stability, reduces fault response time, and provides multi-dimensional decision support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121367209A_ABST
    Figure CN121367209A_ABST
Patent Text Reader

Abstract

The invention discloses a rural micro-grid group dynamic optimization method, system and device, a medium and a product, and relates to the field of power grid optimization control, and the method comprises the steps: obtaining the operation data of a rural micro-grid group; preprocessing the operation data to obtain preprocessed data; constructing a space-time twin CNN-LSTM model comprising a dynamic perception convolution space feature extraction module, a time sequence adaptive LSTM time feature extraction module and a space-time feature fusion module; inputting the preprocessed data into a time-space twin CNN-LSTM model to obtain a state prediction result of the rural microgrid group in a set time; and taking each micro-grid in the rural micro-grid group as an agent, and realizing dynamic optimization scheduling of the rural micro-grid group by combining a multi-agent reinforcement learning algorithm based on a state prediction result. According to the invention, the problem of delay and deviation in monitoring the overall operation state of the micro-grid by a control center at present can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of power grid optimization control, in particular to a rural micro-grid group dynamic optimization method, system, device, medium and product. BACKGROUND

[0002] In today's rural areas, power supply is facing complex challenges. In terms of power generation, renewable energy power generation represented by photovoltaic power generation occupies an important position, but it is greatly affected by weather conditions. On sunny days, sufficient light can make photovoltaic panels work efficiently, output higher power; but once it rains, the light intensity is greatly weakened, and the power generation is sharply reduced, and at night it is completely unable to generate electricity. This large fluctuation in power generation capacity caused by weather makes it difficult for photovoltaic power generation to continuously and stably supply power to the rural power grid. Energy storage devices have not fully played their due role in the rural power system. Most of the energy storage devices equipped in rural areas lack refinement and intelligence in management, and cannot flexibly and efficiently charge and discharge according to real-time power generation and load power consumption. The characteristics of rural load demand exacerbate the difficulty of matching power supply and demand, and seasonal changes have a profound impact on rural power demand. In summer, the widespread use of air conditioning and other cooling devices causes the power load to rise rapidly; in winter, the use of electric heaters, stoves and other heating devices in some areas also causes a peak in power consumption, making the rural load demand complex and variable, making it difficult to accurately match power generation and energy storage.

[0003] The existing rural micro-grid control technology has many limitations. From the perspective of technology application, when connecting renewable energy such as solar and wind energy to the micro-grid, due to the intermittent and volatile nature of these energy sources, traditional control technology is difficult to accurately adapt to their complex and variable power generation characteristics. In terms of scheduling strategy, most rural micro-grids use a single scheduling mechanism that is difficult to adapt to the complex and variable characteristics of rural power load demand. Existing scheduling technology cannot optimize energy distribution in real time and accurately according to these changes, resulting in power supply shortages during peak power consumption periods and energy waste during low periods. Micro-grids in different geographical locations often operate independently, and when there is excess or insufficient power generation, they cannot quickly and effectively interact and allocate power with other micro-grids, making it difficult to optimize the allocation of regional power resources. In terms of communication and monitoring technology, the rural area is vast, and the communication infrastructure in some remote areas is weak, with poor signal coverage and low transmission rate. This makes it difficult for the equipment operating data in the micro-grid to be transmitted to the control center in a timely and accurate manner, resulting in delays and deviations in the control center's monitoring of the overall operation of the micro-grid. SUMMARY

[0004] The purpose of the present application is to provide a rural micro-grid group dynamic optimization method, system, device, medium and product, which can solve the problem of delay and deviation of the overall operation state monitoring of the micro-grid by the control center.

[0005] To achieve the above-mentioned purpose, the present application provides the following solutions: In a first aspect, the present application provides a rural micro-grid group dynamic optimization method, comprising: acquiring operation data of a rural micro-grid group; the operation data includes power generation data, load data and energy storage data; preprocessing the operation data to obtain preprocessed data; constructing a spatio-temporal twin CNN-LSTM model; the spatio-temporal twin CNN-LSTM model includes a dynamic perception convolution spatial feature extraction module, a time sequence adaptive LSTM time feature extraction module and a spatio-temporal feature fusion module; the dynamic perception convolution spatial feature extraction module is a CNN algorithm model that fuses dynamic spatial features; the time sequence adaptive LSTM time feature extraction module is an LSTM algorithm model that fuses time features; inputting the preprocessed data into the spatio-temporal twin CNN-LSTM model to obtain a state prediction result of the rural micro-grid group within a set time; regarding each micro-grid in the rural micro-grid group as an agent, and based on the state prediction result, combining a multi-agent reinforcement learning algorithm to realize dynamic optimization scheduling of the rural micro-grid group.

[0006] In a second aspect, the present application provides a rural micro-grid group dynamic optimization system, regarding each micro-grid in the rural micro-grid group as an agent, and setting the rural micro-grid group dynamic optimization system in the agent; the rural micro-grid group dynamic optimization system includes: a data acquisition module for acquiring operation data of a rural micro-grid group; the operation data includes power generation data, load data and energy storage data; a preprocessing module for preprocessing the operation data to obtain preprocessed data; a model construction module for constructing a spatio-temporal twin CNN-LSTM model; the spatio-temporal twin CNN-LSTM model includes a dynamic perception convolution spatial feature extraction module, a time sequence adaptive LSTM time feature extraction module and a spatio-temporal feature fusion module; the dynamic perception convolution spatial feature extraction module is a CNN algorithm model that fuses dynamic spatial features; the time sequence adaptive LSTM time feature extraction module is an LSTM algorithm model that fuses time features; a state prediction module for inputting the preprocessed data into the spatio-temporal twin CNN-LSTM model to obtain a state prediction result of the rural micro-grid group within a set time; The optimization scheduling module is configured to take each micro-grid in the rural micro-grid group as an agent, and to realize dynamic optimization scheduling of the rural micro-grid group based on the state prediction result and in combination with a multi-agent reinforcement learning algorithm.

[0007] In a third aspect, the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps of the above-provided dynamic optimization method for a rural micro-grid group.

[0008] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and the computer program is executed by a processor to implement the steps of the above-provided dynamic optimization method for a rural micro-grid group.

[0009] In a fifth aspect, the present application provides a computer program product comprising a computer program, and the computer program is executed by a processor to implement the steps of the above-provided dynamic optimization method for a rural micro-grid group.

[0010] According to the specific embodiments provided by the present application, the present application has the following technical effects: The present application provides a dynamic optimization method, system, device, medium and product for a rural micro-grid group, which realizes real-time collaborative regulation of photovoltaic, energy storage and load by fusing space-time feature modeling (i.e., constructing a space-time twin CNN-LSTM model comprising a dynamic perception convolution spatial feature extraction module, a time sequence adaptive LSTM time feature extraction module and a space-time feature fusion module) and multi-agent collaborative decision-making, and further realizes efficient distribution of energy among micro-grids, improvement of system stability and rapid response to faults, so as to solve the problems of strong volatility, high scheduling complexity, delay and deviation in the overall operation state monitoring of micro-grids (i.e., rural area energy supply and demand) by the control center, and provide multi-dimensional decision support for rural power grid operators, new energy investors and electric power supervision departments. BRIEF DESCRIPTION OF DRAWINGS

[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0012] Figure 1 A flowchart of a dynamic optimization method for a rural micro-grid group provided by an embodiment of the present application is shown in the figure; Figure 2An implementation flowchart of a rural micro-grid group dynamic optimization method provided by an embodiment of the present application is shown in the figure. Figure 3 A framework establishment flowchart of a space-time twin CNN-LSTM prediction model provided by an embodiment of the present application is shown in the figure. Figure 4 A basic framework diagram of a multi-agent reinforcement learning algorithm provided by an embodiment of the present application is shown in the figure. Figure 5 An evaluation decision flowchart of a reward mechanism provided by an embodiment of the present application is shown in the figure. Figure 6 A flowchart of a diffusion model for fault detection and isolation provided by an embodiment of the present application is shown in the figure. Figure 7 A structure diagram of a rural micro-grid group dynamic optimization system provided by an embodiment of the present application is shown in the figure. Figure 8 A structure diagram of a computer device provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION

[0013] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.

[0014] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.

[0015] In an exemplary embodiment, the present application provides a rural micro-grid group dynamic optimization method, which is executed by a computer device, specifically, can be executed by a terminal or a server alone or by a terminal and a server together. In the embodiments of the present application, the method is taken as an example applied to a server for description. As shown in the figure, the method comprises the following steps. Figure 1 Step 100: obtaining operation data of a rural micro-grid group. The operation data comprises power generation data, load data and energy storage data.

[0016] Step 101: preprocessing the operation data to obtain preprocessed data.

[0017] ​Step 102: Constructing the spatio-temporal twin CNN-LSTM model. The spatio-temporal twin CNN-LSTM model includes a dynamic perception convolution spatial feature extraction module, a time sequence adaptive LSTM time feature extraction module, and a spatio-temporal feature fusion module. The dynamic perception convolution spatial feature extraction module is a CNN algorithm model that fuses dynamic spatial features. The time sequence adaptive LSTM time feature extraction module is an LSTM algorithm model that fuses time features. For example, the spatial features of the microgrid operation data are extracted by a convolutional neural network (CNN), the time sequence features are extracted by a long short-term memory network (LSTM), and then the future 1-hour microgrid operation state prediction result (e.g., prediction step 5 minutes, error ≤8%) is obtained through a dynamic fusion mechanism.

[0018] Step 103: Input the preprocessed data into the spatio-temporal twin CNN-LSTM model to obtain the state prediction result of the rural microgrid group within a specified time (e.g., 1 hour).

[0019] Step 104: Take each microgrid in the rural microgrid group as an intelligent agent, and based on the state prediction result, realize the dynamic optimization and scheduling of the rural microgrid group by combining a multi-agent reinforcement learning algorithm.

[0020] By implementing the above steps 100-104, the present application can break through the limitations of traditional microgrid control technology and provide an intelligent solution for efficient management of distributed energy in rural areas.

[0021] In another exemplary embodiment of the present application, in order to provide real-time interactive dynamic feedback, real-time physical constraint feedback such as line loss, device aging coefficient, and other dynamic parameters of the microgrid can be introduced to form the spatio-temporal twin CNN-LSTM model, which is a rural microgrid-specific prediction model. Based on this, the implementation process of the above step 103 can be replaced by the following steps 200 and 201.

[0022] Step 200: Input the preprocessed data into the dynamic perception convolution spatial feature extraction module and the time sequence adaptive LSTM time feature extraction module respectively to obtain the spatial feature map and the time feature map.

[0023] Among them, the dynamic perception convolution spatial feature extraction module can better suppress the influence of redundant data in empty areas and natural interference than the traditional CNN algorithm model. This module can use a unique architecture to preprocess and extract features from noisy operation data. Based on this, the implementation process of inputting the preprocessed data into the dynamic perception convolution spatial feature extraction module to obtain the spatial feature map in step 200 can include: Step 200-1: Determine the physical constraints of the rural microgrid devices. The physical constraints include: line transmission constraints, device capacity constraints, and photovoltaic panel aging constraints.

[0024] Step 200-2: Introduce the rural micro-grid device distribution prior mask, and extract the features of the pre-processed data through lightweight convolution. After global average pooling aggregates spatial information, the basic attention matrix is output by the fully connected layer combined with the Sigmoid activation function. This step is mainly to extract the spatial features of the collected micro-grid operation data to design a spatial attention predictor that adapts to the rural scene. Among them, the input dimension of the micro-grid spatial data matrix is HxWxC (where HxW is the spatial grid, and C is the feature parameter channel). The dynamic perception convolution spatial feature extraction module introduces the rural micro-grid device distribution prior mask M , differentiating the initial attention of different regions.

[0025] For example, in the generation process of the spatial attention matrix, the input data is first extracted by a 1-layer 3x3 lightweight convolution to extract preliminary features. After global average pooling aggregates spatial information, the basic attention matrix is output by the fully connected layer combined with the Sigmoid activation function.

[0026] Step 200-3: The initial physical boundary of the pre-processed data is constrained by the physical constraints of the rural micro-grid device, and the physical constraint data is obtained.

[0027] Among them, the real-time physical constraint feedback is added, and the physical characteristics of the micro-grid (such as line loss, device capacity, aging characteristics, etc.) are considered in the spatio-temporal twin CNN-LSTM model, which is set as a quantifiable constraint term to reflect the physical characteristics of the rural micro-grid device aging. Based on this, the physical constraint data includes pre-configuration data and real-time dynamic data. The pre-configuration data includes device rated capacity, line inherent parameters, device installation age, etc., and the real-time data includes line temperature, light intensity, energy storage state of charge and other parameters.

[0028] Among them, the physical constraints include line transmission constraints, device capacity constraints, and photovoltaic panel aging constraints.

[0029] (1) Line transmission constraint: .

[0030] In the formula, is the real-time transmission power of the line at time t, is the maximum allowable transmission power of the line.

[0031] (2) Device capacity constraint: .

[0032] In the formula, is the maximum output of the photovoltaic device, is the real-time output of the photovoltaic device at time t.

[0033] (3) Photovoltaic panel aging constraint: The spatial features of the photovoltaic panel area are corrected for aging to ensure that the power generation capacity of the aging equipment is truly reflected in the spatial features. Based on the operating life of the photovoltaic panel (obtained through the equipment account), the aging attenuation coefficient is calculated, and the formula is as follows: .

[0034] .

[0035] In the formula, is the photovoltaic panel aging attenuation coefficient, is the operating life, is the photovoltaic power feature before correction, is the corrected feature.

[0036] Step 200-4: After introducing the physical constraint data into the basic attention matrix, the basic attention matrix and the rural micro-grid equipment distribution prior mask are fused to obtain the final attention matrix. The pre-configuration data and the spatial data are introduced into the dynamic perception convolution spatial feature extraction module at the same time to constrain the initial physical boundary. Real-time dynamic data is introduced into the basic attention matrix to dynamically correct the feature intensity in real time.

[0037] The final attention matrix is represented as: .

[0038] In the formula, W is the final attention matrix, W base is the basic attention matrix after introducing the real-time dynamic constraint data, M is the rural micro-grid equipment distribution prior mask.

[0039] When extracting spatial features, a 2-layer convolution structure can be used, with 32 3×3 convolution kernels in the first layer and 64 3×3 convolution kernels in the second layer, and the step is 1. Based on this, the convolution operation formula is: .

[0040] In the formula, is the value of the output feature map at position ( i , j ) of the l th channel. is the value of the input data at the corresponding position and channel. is the weight value of the l th convolution kernel at position ( m , n ) of the corresponding input channel C. is the bias of the l th convolution kernel.

[0041] Step 200-5: Real-time dynamic correction of the feature intensity of the extracted features using the final attention matrix to obtain a spatial feature map. The spatial feature map is denoted as S.

[0042] For example, through experimental verification, in the output spatial feature map S (dimension HxWx128), the feature intensity of the high-attention region is improved by 30% compared with the traditional convolution extraction method, the medium-attention region is improved by 12%, and the low-attention region achieves 30% of redundant information suppression, which can provide accurate spatial feature support for subsequent spatio-temporal fusion and prediction.

[0043] Through the above steps 200-1 to 200-4, it is ensured that the spatio-temporal twin CNN-LSTM model can fully consider the physical characteristics under the actual situation of the rural micro-grid.

[0044] Further, the time sequence adaptive LSTM time feature extraction module can dynamically adjust the window size according to the fluctuation intensity of the time sequence data of the rural micro-grid, and accurately capture the time variation law under the scenes of busy farming, slack farming, and meteorological mutation. Based on this, the input data of the time sequence adaptive LSTM time feature extraction module is time sequence data, and this time sequence data can be the load power within a certain time (for example, 1 hour), and the sampling frequency of the related data is 5 minutes / time. Based on this, the sliding window method is used to slice the time sequence data (1 hour window, 15 minute step), and input the LSTM model. The time sequence adaptive LSTM time feature extraction module first calculates the power change rate of the adjacent 6 time points, and then calculates the mean value of the 6 change rates to obtain the sliding window fluctuation index. Based on the fluctuation index, the module follows the following window dynamic adjustment rules: .

[0045] .

[0046] In the formula, P t P(t) is the power of the rural micro-grid equipment at time t, P t-1 P(t-1) is the power of the rural micro-grid equipment at time t-1, P'(t) is the change rate of the power of the rural micro-grid equipment at time t, P'(t-2) is the change rate of the power of the rural micro-grid equipment at time t-2, P'(t-1) is the change rate of the power of the rural micro-grid equipment at time t-1 , σ t P'(t) is the change rate of the power of the rural micro-grid equipment at time t,

[0047] Unlike the traditional LSTM algorithm model, the design focus of the time sequence adaptive LSTM time feature extraction module adopted by the application is to improve the forgetting gate. Among them, the volatility index σ t Positive correlation time sequence attention factor is introduced to dynamically adjust the retention weight of historical information. Based on this, the forgetting gate decides whether to retain the memory cell information, and the result is obtained by multiplying the forgetting gate weight matrix at the current moment with the hidden state at the previous moment through the sigmoid function, that is: .

[0048] .

[0049] In the formula, is the forgetting gate output result at t moment, t is the forgetting gate weight matrix. is the input at t moment. is the hidden state at t-1 moment. is the forgetting gate bias parameter. is the sigmoid function.

[0050] The input gate decides the increase of new information, and the formula is: .

[0051] In the formula, is the input gate weight matrix. is the input gate bias parameter, is the input gate output result at t moment. t

[0052] The tanh function is used to calculate the new candidate value: .

[0053] In the formula, is the weight matrix of the function. is the corresponding bias parameter. is the new candidate value.

[0054] After the operation of the forgetting gate and the input gate, the memory cell is updated from the candidate value to the candidate value , that is: .

[0055] Finally, the input gate decides the final output result: .

[0056] ​​​ .

[0057] In the formula, for t The output gate outputs the result at all times. Let t be the hidden state at time t. This is the weight matrix of the output gate. These are the output gate bias parameters.

[0058] Step 201: The spatial and temporal feature fusion module is used to fuse the spatial and temporal feature maps to obtain the state prediction results of the rural microgrid group within a set time period. In practical applications, the implementation process of step 201 can be described as follows: The spatiotemporal feature fusion module uses a dynamic spatiotemporal fusion mechanism to perform global average pooling on the spatial feature map S, compressing the spatial grid dimension to 1, to obtain the global spatial feature vector S. global The algorithm is replicated 12 times along the time dimension (matching the time step of the LSTM output). To achieve dynamic adaptation of spatiotemporal features, the fusion weights need to be calculated based on the characteristics of the rural microgrid scenario, and spatial dominance needs to be introduced. and time dominance ,and Spatial dominance From spatial feature sequences The variance (reflecting spatial distribution differences) is determined by both the rural scene parameters and the following formula: .

[0059] Time Dominance Combining temporal fluctuations with dynamic adjustments to the rural setting, the formula is described above for spatial dominance. The formula is calculated by taking the spatial feature sequence. Replace with a time feature series, and change the scene compensation coefficients. Replace with .

[0060] In the formula, It is the variance function. This is a time-featured graph. , These are all scene compensation coefficients. The scene compensation coefficients vary depending on the scene, such as a sunny midday day. =0.2 ( (Maximum 0.8). Photovoltaic cluster areas, =0.1 ( (Maximum 0.8). During the busy farming season, =0.1 ( Upper limit 0.8). Short-term heavy rainfall, =0.2 ( (Maximum 0.8).

[0061] To enhance key features and suppress noise, a gated fusion unit can be introduced to refine the spatiotemporal features. Through a learnable weight matrix and bias, the spatial feature sequence can be optimized. and time feature map Gating processing is performed, and then the fusion weights and gating results are combined to output the final fused features. F (T×128), the formula is: .

[0062] .

[0063] .

[0064] In the formula, , All of these are gating weight matrices obtained by training with historical data from rural microgrids. , For bias terms, , The gating result (the higher the value, the more effective the corresponding feature channel information), This is element-wise multiplication. Specifically, it involves... , Adjusting the overall priority of spatiotemporal features, through , Filter the valid information for each feature channel.

[0065] Will S global Copying the image T times along the time dimension yields a time feature map. The spatial feature sequence of the same dimension is used to fuse spatial and temporal features. This process uncovers the dynamic patterns of data changes in both time and space. A high-precision CNN-LSTM prediction model is obtained through this process. This model is trained using historical and real-time data. Historical data is selected from the past year's microgrid operation data, covering data from different seasons and weather conditions to ensure the model learns comprehensive patterns of change. Real-time data is collected in real-time by sensors within the microgrid and updated every 10 minutes.

[0066] Based on the above description, the framework establishment process of the spatiotemporal twin CNN-LSTM model is as follows: Figure 3 As shown.

[0067] In another exemplary embodiment of this application, in order to accurately capture spatiotemporal correlation characteristics and improve energy utilization during the dynamic optimization process of rural microgrid groups, this embodiment constructs as follows: Figure 4The multi-agent reinforcement learning scheduling framework is shown. In the multi-agent reinforcement learning scheduling algorithm, each microgrid is an agent, each agent has the ability to perceive its own power generation state (real-time power generation, power generation potential, etc.), load state (real-time power consumption, load type and change trend, etc.) and energy storage state (current power, charging and discharging rate, etc.), and predicts the power generation / load trend in the next 1 hour (prediction step 5 minutes) through the LSTM model, while perceiving the historical interaction data of the adjacent 3 microgrids (for example, the power transmission record in the past 24 hours) to capture the spatio-temporal correlation features. At the same time, the agents interact through a communication network based on 5G communication technology, with a communication delay controlled within 10 ms to ensure the timeliness of information transmission. The data is encrypted using AES-256. Each agent has the ability to actively negotiate, and when it detects a power surplus, it can send a power transmission offer containing a premium coefficient to potential demanders, and the receivers feedback counteroffers based on their power purchase costs (energy storage discharge cost, off-grid power purchase price), and through multiple rounds of bargaining, the optimal transaction power is reached. Based on this, the implementation process of the above step 104 of the application can include: For the decision-making process of multiple agents, when a microgrid agent finds that its power generation is surplus (i.e. P gen P load + P charge , and E soc =1, P gen is the real-time power generation, P load is the real-time power consumption, P charge is the current charging power, E soc is the current power), and the energy storage is full, the short-term real-time state and long-term trend prediction (for example, whether it will continue to be surplus in the next 1 hour) are combined, the real-time demand and historical transaction records of adjacent microgrids are obtained through the communication network, and the decision is made within 100 ms. The decision-making process needs to meet two conditions, one is that after power transmission, the safe energy storage threshold of itself is maintained, that is E soc ≥5%, and the optimal power transmission decision quantity is determined by weighted fusion of short-term real-time balance and long-term trend prediction. The second is to consider the line loss caused by the transmission distance, and the net income of long-distance power transmission should be positive, that is: .

[0068] In the formula, is the theoretical power transmission value calculated based on real-time power balance, ​a power transmission value to be predicted based on a trend in the next 1 hour, a dynamic weight.

[0069] .

[0070] wherein, a distance attenuation coefficient, d a distance between two microgrids, a maximum purchase price of the receiving party, a power transmission cost of the sending party.

[0071] The load demand of the adjacent microgrid can be known through communication, so that a decision can be made to transmit excess power to the adjacent microgrid. Through continuous interaction with the environment, each agent makes a decision within 100 ms according to its own state and information of other agents, and calculates the optimal amount of power transmission to the adjacent microgrid through a cost-benefit analysis algorithm.

[0072] For example, when the agent satisfies P gen > P load + P charge and E soc =1, when it is predicted that there will be a surplus for the next 30 minutes, active negotiation is triggered, the surplus agent generates a quote based on the power generation cost and historical transaction data, and the demand party sets the minimum value of the energy storage discharge cost and the off-grid purchase price as the maximum acceptable price, and at most 3 rounds of bargaining are conducted to reach a transaction. Based on this, first, the agent state perception is performed, each agent obtains its own state S agent =[P gen , P load , P charge , E soc , P gen,pred ] (P gen,pred is a future power generation prediction value), and the states S agent of the adjacent 3 agents and the maximum acceptable price D trans are obtained through a 5G network. Then, the power surplus determination and negotiation are performed: when P gen > P load + P charge , E soc =1 and P gen,pred >P load,pred , the surplus agent generates a quote P trans based on the photovoltaic degree cost and the highest historical transaction price in the maximum acceptable price D trans , the quote formula is as follows: .

[0073] The demand side takes the minimum value of the energy storage discharge cost and the off-grid electricity purchase price as the highest acceptable price Price max At most 3 rounds of bargaining (5% price reduction per round) are conducted to determine the initial transaction power W init . Then the cost-benefit and reward are calculated, and the cost-benefit function is expressed as: .

[0074] .

[0075] .

[0076] .

[0077] where E is the cost-benefit function value, is the energy utilization rate related item. is the system stability related item. is the energy storage safety rate related item. is the weight of the energy utilization rate dimension. is the weight of the system stability dimension. is the weight of the energy storage safety rate dimension. is the actual power transmission. is the total surplus power. is the frequency deviation. is the state of charge of the energy storage.

[0078] The reward function is constructed through a multi-objective reward mechanism, and the specific expression is as follows: .

[0079] .

[0080] .

[0081] .

[0082] .

[0083] .

[0084] .

[0085] wherein, R is the reward function value, is the energy utilization rate reward, is the system stability reward, Energy storage safety reward, Emergency response reward, Collaboration trust reward, Actual power transmission at time t, Power generation surplus at time t, System frequency deviation at time t, = 50 Hz is the rated frequency, Maximum allowable transmission power of the line at time t, State of charge of energy storage at time t, Bookstore power to emergency load, Total demand power of emergency load, Real-time trust between agent A and collaborative agent B, Real-time behavior correction term, Historical trust between agent A and collaborative agent B, , and are reward weight parameters.

[0086] Based on the above description, the reward decision evaluation mechanism adopted by the present application is as shown in Figure 5 .

[0087] Finally, Q-learning optimization and scheduling execution are performed, the state space includes local state, adjacent space features, and time trend, the action space is five discrete power transmission, the exploration rate is dynamically adjusted according to the load fluctuation rate (0.3 when the fluctuation rate is greater than 10%), priority experience replay is used (the sampling probability of emergency scene samples is 3 times that of ordinary samples), and after 1000 iterations, the optimal strategy is converged. A new scene is initialized by meta-learning to complete parameter adaptation in 30 minutes. The double constraints of “power transmission after (Esoc≥5%)” and “net income >0” are checked, and if the constraints are met, the optimal power transmission decision is executed, and the optimal power transmission decision and real-time scheduling strategy between microgrids are output.

[0088] This algorithm motivates the agent to make better decisions through a well-designed reward mechanism, which is closely linked to indicators such as improved energy utilization and enhanced system stability. The Q-learning algorithm is employed to consider multi-objective dynamic weight fusion for iterative optimization. The core indicators include energy utilization, system stability, energy storage safety, emergency response, and collaborative trust. Experiments show that in a classic rural microgrid scenario, the Q-learning algorithm, combined with multi-objective dynamic weight fusion, completes parameter adaptation in just 30 minutes after 1000 iterations. In the new scenario, it initializes the Q-table through meta-learning and completes parameter adaptation in only 30 minutes. The iteration process incorporates a priority experience replay mechanism, with high-priority samples (such as those in emergency power transmission scenarios) having a sampling probability three times that of ordinary samples. Energy utilization is improved by an average of 15%, system stability is significantly enhanced, the number of times the system frequency deviation exceeds 0.2Hz is reduced by 65%, line overload events are reduced by 70%, and the emergency load power supply guarantee rate reaches 99.5%. In the new scenario, the algorithm completes parameter adaptation in just 30 minutes, a 75% improvement compared to the traditional 2-hour adaptation time.

[0089] In another exemplary embodiment of this application, in order to reduce the risk of failure, the rural microgrid group dynamic optimization method provided in this application further includes, as follows: Figure 6 The fault detection and isolation process is shown below. Among them: Step 105: Using a diffusion model, compare the preprocessed data with the data in the fault feature library to obtain the comparison results.

[0090] In this step, the fault feature identification technology employed in this application utilizes a diffusion model to determine the feature differences between normal operation data and fault data. The diffusion model is based on the principle of a probabilistic generative model, and identifies the feature differences between normal operation data and fault data through the diffusion model. x Noise is gradually added to 0 to construct the data diffusion process, assuming that on the 0th... s The noise added in the step is The noisy data is x s During the training phase, the diffusion model learns how to gradually recover normal data from noisy fault data, thereby establishing a fault feature library. For example, the input is real-time sensor data, including current I, voltage U, power P (1 time / time) and a microgrid topology diagram (G=(V,E)) (node ​​V represents equipment, and edge E represents line).

[0091] Noisy data x s Represented as: .

[0092] In the formula, To keep pace with time sThe relevant parameters determine the degree of noise addition. For the first s -1 step of the noisy data, For the first s -1 step of the noisy data,

[0093] When the real-time running data is input into the diffusion model, the diffusion model compares the data with the features in the fault feature library after preprocessing (normalizing the data to make the parameters map in the [0, 1] interval), and accurately identifies whether there is a fault feature.

[0094] Step 106: Determine whether the rural micro-grid equipment has failed based on the comparison result.

[0095] Step 107: When the rural micro-grid equipment fails, simulate the propagation path of the corresponding rural micro-grid equipment based on Kirchhoff's law to realize fault identification.

[0096] Based on the above description, the diffusion model analyzes the fault propagation path by simulating the energy flow and signal change after the fault occurs. Considering the topology structure of the micro-grid, the micro-grid is abstracted as a graph structure, where the nodes represent the devices or nodes in the micro-grid, and the lines represent the line connection relationship. At the same time, combined with electrical parameters such as line resistance, reactance, etc., and fault type (short circuit, open circuit, etc.) information, the redistribution process of energy after the fault and the propagation of signals in the network are simulated using Kirchhoff's law. When the feature matching degree is greater than 90%, the fault type is identified within 1 second. Combined with Kirchhoff's current law and line resistance R, reactance X, the fault propagation path and the affected area are predicted. Based on this, the Kirchhoff's law formula is expressed as: .

[0097] .

[0098] In the formula, is the current value of the pth branch, is the voltage value of the pth branch, N is the total number of branches participating in the current constraint, and M is the total number of nodes participating in the voltage constraint.

[0099] When a fault occurs in a node in the micro-grid group, the diffusion model can predict which lines the fault may propagate along and which areas of the micro-grid are affected within 1 second based on the above information, providing accurate basis for rapid response and tracing.

[0100] Step 108: Generate safety control instructions based on the fault identification result. The safety control instructions include: fault isolation instructions and backup power switching instructions.

[0101] For example, perform fault isolation and backup power switching, agent output switch instruction, 100ms disconnect fault area line switch (such as short circuit inverter grid-connected switch). According to the fault area load demand P load,pred With 10kW diesel generator backup power capacity, priority access to the nearest backup power supply, ensure emergency load power supply guarantee rate ≥99.5%, output fault handling results R fault (Including fault type, affected area, recovery time) and system recovery instructions.

[0102] In another exemplary embodiment of the present application, the implementation process of steps 100 and 101 described above can be described as: Step 1: Collect photovoltaic real-time power generation on the power generation side P gen , energy storage side energy storage state of charge (i.e. current power E soc ), charging and discharging rate (i.e. current charging power P charge ), real-time power consumption on the load side (i.e. real-time power consumption P load ) and load type identification. Collect environmental parameters of each environmental sensor and record equipment account synchronously. All collected data is aggregated through the power grid SCADA system to form an original data stream (sampling frequency is 1 minute / time, ensuring the dynamic change of microgrid operation state is captured). All collected data is transmitted to the local database through high-speed line, and the agent also obtains the power transmission record of the adjacent three microgrids in the past 24 hours (including power transmission time, power, transaction price) through the 5G network, and finally forms an original data set containing five types of data of power generation, load, energy storage, environment and account.

[0103] Step 2: Data preprocessing and dynamic database construction.

[0104] The original data set output by step 1 is preprocessed, first data cleaning, missing values with interval ≤30 seconds are supplemented by linear interpolation method, there are: .

[0105] In the formula, x miss is the value after the missing position is supplemented, , is the valid data before and after the missing value, is the missing duration, is the interval between the front and rear data.

[0106] For abnormal values exceeding ±3 range of mean value, 3 The criterion is replaced by the average of the adjacent 5 valid sampling points, and the formula is as follows: .

[0107] In the formula, is the adjacent valid data, x replace is the value after the abnormal value is replaced.

[0108] Then, data standardization is performed. For power P gen , P load , P charge , energy storage E soc The data is mapped to the [0, 1] interval by Min-Max normalization, and the formula is as follows: .

[0109] In the formula, is the data after normalization processing, is the original data, , is the minimum and maximum value of the past 1-year historical data of the original data.

[0110] Finally, the data format is arranged, and a spatial data matrix of (HxWxC) is constructed M space (for example, H=10, W=10 is a spatial grid, and C=5 corresponds to 5 feature channels of “photovoltaic area, energy storage area, residential load area, irrigation area, and industrial and commercial area”). M time (1-hour continuous data is extracted at a sampling frequency of 5 minutes / time, and there are 12 time points, and 3 columns are P gen,norm , P load,norm , E soc,norm ), and the cleaned equipment account data is output D ledger .

[0111] In another exemplary embodiment of the present application, the construction and training of the spatio-temporal twin CNN-LSTM prediction model based on the data obtained in the above embodiment are described.

[0112] Wherein, the input is the standardized spatial data matrix M space , the standardized time sequence matrix M time and the cleaned equipment account data D ledgerIn the spatial feature extraction (dynamically perceptual convolutional spatial feature extraction module) stage, firstly based on D... ledger Generate device distribution prior mask M The photovoltaic cluster area and energy storage station grid are assigned an initial weight of 0.8, while the open area and non-electricity consumption area are assigned a weight of 0.2. A two-layer convolutional structure (32 3×3 convolutional kernels in the first layer and 64 3×3 convolutional kernels in the second layer, with a stride of 1) is used to perform the convolution operation.

[0113] After global average pooling, the convolutional output is processed through a fully connected layer with 64 neurons and a sigmoid activation function to generate a basic attention matrix, which is then fused with a prior mask. M The final attention matrix is ​​obtained. W Simultaneously, the spatial feature map is corrected by introducing photovoltaic panel aging constraints and line transmission constraints, and finally outputs a spatial feature map of (10×10×128).

[0114] In the time feature extraction stage (i.e., the time-series adaptive LSTM time feature extraction module), a 1-hour window and a 15-minute step size are used to extract M. time Slice the data and calculate the rate of change of power at six adjacent time points. The volatility index is obtained by taking the average. .according to >10% window reduction to 70%, The rule of expanding the window to 130% for values ​​less than 5% dynamically adjusts the window size. An improved LSTM forget gate introduces a temporal attention factor. The final output is a time feature map (12×64).

[0115] In the spatiotemporal fusion and model training (i.e., spatiotemporal feature fusion module) stage, global average pooling is performed on the spatial feature map to obtain S (1×128). global The spatial feature sequence S is obtained by copying it 12 times along the time dimension. seq .

[0116] Using operational data from the past year (covering all four seasons and various weather conditions), with MSE as the loss function and a learning rate of 0.001, the model was trained for 500 epochs. The model parameters were updated every 10 minutes based on real-time data, ultimately outputting a prediction of the microgrid's operational status for the next hour, P. pred (including P) gen,pred P load,pred E soc,pred (12 time points, step size 5 minutes, error ≤8%).

[0117] Based on the above description, the overall implementation process of the rural microgrid group dynamic optimization method provided in this application is as follows: Figure 2As shown, it realizes micro-grid operation state prediction through a space-time twin CNN-LSTM model, completes micro-grid energy optimization scheduling in combination with a multi-agent reinforcement learning algorithm, drives intelligent fault detection and processing using a diffusion model, and dynamically monitors micro-grid group operation effect. Based on this, the method provided in the application can include four core links of data acquisition and preprocessing, space-time feature fusion prediction, multi-agent collaborative scheduling, and rapid fault response, and finally realizes the improvement of rural micro-grid group energy utilization rate, the enhancement of system stability and the reduction of fault risk. Among them, by deploying high-precision sensors at key nodes of the micro-grid, real-time generation, load and energy storage data are collected, a CNN-LSTM model combined with a dynamic space-time fusion mechanism is used, real-time physical constraint feedback is added, a rural micro-grid dedicated prediction model is constructed, and future 1-hour operation state prediction is realized. A multi-agent reinforcement learning framework is constructed, each micro-grid is an independent agent, state information is exchanged through a 5G communication network, based on a multi-agent reinforcement learning algorithm, when there is excess power generation, the best power transmission amount is calculated through a cost-benefit function, and the energy utilization rate is improved by more than 15% by optimizing the scheduling strategy through Q-learning iteration 1000 times. A fault feature library is constructed by introducing a diffusion model, the fault propagation path is simulated based on Kirchhoff's law, fault identification within 1 second, isolation within 100ms and standby power source switching are realized, so as to finally realize the improvement of rural micro-grid group energy utilization rate, the enhancement of system stability and the reduction of fault risk.

[0118] Based on the same inventive concept, the embodiments of the application also provide a rural micro-grid group dynamic optimization system for implementing the above-mentioned rural micro-grid group dynamic optimization method. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme described in the above method, so the specific limitations in one or more rural micro-grid group dynamic optimization system embodiments provided below can be referred to the limitations of the rural micro-grid group dynamic optimization method in the above, which will not be repeated here.

[0119] In one exemplary embodiment, each micro-grid in the rural micro-grid group is regarded as an agent, and the rural micro-grid group dynamic optimization system provided by the application is arranged in the agent. Based on this, as shown, Figure 7 The rural micro-grid group dynamic optimization system includes a data acquisition module 700, a preprocessing module 701, a model construction module 702, a state prediction module 703 and an optimization scheduling module 704.

[0120] The data acquisition module 700 is used to acquire the operation data of the rural micro-grid group. The operation data includes generation data, load data and energy storage data.

[0121] The preprocessing module 701 is used to preprocess the operation data to obtain preprocessed data.

[0122] The model construction module 702 is configured to construct a spatio-temporal twin CNN-LSTM model. The spatio-temporal twin CNN-LSTM model comprises a dynamic perception convolution spatial feature extraction module, a time sequence adaptive LSTM time feature extraction module, and a spatio-temporal feature fusion module. The dynamic perception convolution spatial feature extraction module is a CNN algorithm model that fuses dynamic spatial features. The time sequence adaptive LSTM time feature extraction module is an LSTM algorithm model that fuses time features.

[0123] The state prediction module 703 is configured to input the preprocessed data into the spatio-temporal twin CNN-LSTM model to obtain a state prediction result of the rural micro-grid group within a set time.

[0124] The optimal scheduling module 704 is configured to take each micro-grid in the rural micro-grid group as an agent, and to realize dynamic optimal scheduling of the rural micro-grid group based on the state prediction result and in combination with a multi-agent reinforcement learning algorithm.

[0125] As an optional implementation of the present application, based on the intelligent fault detection technology provided above, the present application constructs a micro-grid group operation state real-time monitoring system. In the system, sensors are deployed at key nodes of the micro-grid to collect operation data such as current I, voltage V, and power P in real time, and the data are transmitted to a monitoring center in real time. At the power generation side, current sensors and voltage sensors are deployed at the output end of each photovoltaic power generation device to monitor the power generation power , , is the current detected by the current sensor, is the voltage detected by the voltage sensor. In the charge-discharge circuit of the energy storage device, high-precision current sensors and voltage sensors are installed to accurately measure the energy storage state. At the load side, smart meters are installed in each distribution box to collect real-time power consumption of the load. The data collection frequency of these sensors is 1 second / time, which ensures timely capture of changes in the operation state of the micro-grid. The monitoring center analyzes the data using a diffusion model, and once a fault is detected, it immediately starts a response measure to isolate the fault area from the normally operating micro-grid group within 100 ms, avoiding further expansion of the fault, and at the same time, starts a standby power source switching mechanism to quickly connect the standby power source according to the load demand of the fault area and the capacity of the standby power source, ensuring power supply in the area, thereby ensuring reliable and stable operation of the system.

[0126] In summary, the application essentially provides a fault detection technology driven by a spatiotemporal twin CNN-LSTM prediction, a multi-agent reinforcement learning algorithm, and a diffusion model, and a method and system for dynamic collaborative optimization of power generation-energy storage-load of a rural microgrid group. The technology realizes real-time collaborative regulation of photovoltaic, energy storage, and load by fusing spatiotemporal feature modeling, multi-agent collaborative decision making, and fault propagation analysis, realizes efficient distribution of energy among microgrids, improves system stability, and responds quickly to faults, solves problems such as strong energy supply and demand volatility, high dispatch complexity, communication delay sensitivity, and difficult fault location in rural areas, and provides multi-dimensional decision support for rural power grid operators, new energy investors, and power supervision departments.

[0127] In an exemplary embodiment, a computer device, which can be a server or a terminal, is provided, and an internal structure diagram of the computer device can be as shown in Figure 8 The computer device includes a processor, a memory, an input / output interface (I / O), and a communication interface. The processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The database of the computer device is configured to store dynamic optimization data of a rural microgrid group. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to communicate with external terminals through a network connection. The computer program is executed by the processor to implement a method for dynamic optimization of a rural microgrid group.

[0128] Those skilled in the art can understand that Figure 8 The structure shown in the above

[0129] In an exemplary embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps in the above method embodiments.

[0130] In an exemplary embodiment, a computer readable storage medium is provided, storing a computer program, and the computer program is executed by a processor to implement the steps in the above method embodiments.

[0131] In an example embodiment, a computer program product is provided, including a computer program which, when executed by a processor, implements the steps of any of the above method embodiments.

[0132] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.

[0133] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. Any reference to memory, database or other medium used in the embodiments provided by the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (RRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0134] The database involved in each of the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a blockchain, and the like, without being limited thereto. The processor involved in each of the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, and the like, without being limited thereto.

[0135] The technical features of the above embodiments can be combined in any manner. To make the description concise, all possible combinations of the technical features in the above embodiments are not described, but it should be considered that any combination of the technical features is within the scope of the present disclosure, as long as there is no contradiction.

[0136] The principles and implementation manners of the present application are described by using specific examples herein, and the above embodiments are only used to help understand the method of the present application and its core idea. Meanwhile, for those skilled in the art, the specific implementation manners and application ranges can be changed according to the idea of the present application. In summary, the content of the present description should not be understood as a limitation of the present application.

Claims

1. A rural micro-grid cluster dynamic optimization method, characterized in that, The method comprises the following steps: acquiring operation data of a rural micro-grid group; the operation data comprises power generation data, load data and energy storage data; preprocessing the operation data to obtain preprocessed data; constructing a spatio-temporal twin CNN-LSTM model; the spatio-temporal twin CNN-LSTM model comprises a dynamic perception convolution spatial feature extraction module, a time sequence adaptive LSTM time feature extraction module and a spatio-temporal feature fusion module; the dynamic perception convolution spatial feature extraction module is a CNN algorithm model that fuses dynamic spatial features; the time sequence adaptive LSTM time feature extraction module is an LSTM algorithm model that fuses time features; inputting the preprocessed data into the spatio-temporal twin CNN-LSTM model to obtain a state prediction result of the rural micro-grid group within a set time; regarding each micro-grid in the rural micro-grid group as an agent, and based on the state prediction result, combining a multi-agent reinforcement learning algorithm to realize dynamic optimization and scheduling of the rural micro-grid group. 2.The rural microgrid group dynamic optimization method according to claim 1, characterized in that, inputting the preprocessed data into the spatio-temporal twin CNN-LSTM model to obtain a state prediction result of the rural micro-grid group within a set time, comprising: inputting the preprocessed data into the dynamic perception convolution spatial feature extraction module and the time sequence adaptive LSTM time feature extraction module respectively to obtain a spatial feature map and a time feature map; using the spatio-temporal feature fusion module to perform spatio-temporal feature fusion on the spatial feature map and the time feature map to obtain the state prediction result of the rural micro-grid group within the set time. 3.The rural microgrid group dynamic optimization method according to claim 2, characterized in that, inputting the preprocessed data into the dynamic perception convolution spatial feature extraction module to obtain a spatial feature map, comprising: determining physical constraints of rural micro-grid equipment; the physical constraints comprise line transmission constraints, equipment capacity constraints and photovoltaic panel aging constraints; introducing a rural micro-grid equipment distribution prior mask, and extracting features of the preprocessed data through a lightweight convolution, and after global average pooling is performed to aggregate spatial information, a basic attention matrix is output by a fully connected layer combined with a Sigmoid activation function; using the physical constraints of the rural micro-grid equipment to constrain the initial physical boundary of the preprocessed data to obtain physical constraint data; after introducing the physical constraint data into the basic attention matrix, fusing the basic attention matrix and the rural micro-grid equipment distribution prior mask to obtain a final attention matrix; using the final attention matrix to dynamically correct the feature strength of the extracted features in real time to obtain the spatial feature map.

4. The method of claim 3, wherein, the final attention matrix is expressed as: ; wherein, W is the final attention matrix, W base is the base attention matrix after introducing real-time dynamic constraint data, M is the rural microgrid equipment distribution prior mask.

5. The method of claim 2, wherein, the window dynamic adjustment rule followed by the time sequence adaptive LSTM time feature extraction module is: ; ; In the formula, P t is the power of the rural micro-grid equipment at time t, P t-1 is the power of the rural micro-grid equipment at time t-1, is the rate of change of the power of the rural micro-grid equipment at time t, is the rate of change of the power of the rural micro-grid equipment at time t-2, is the rate of change of the power of the rural micro-grid equipment at time t-1 , σ t is the fluctuation index; a time sequence attention factor positively correlated with the fluctuation index is introduced to improve the forgetting gate in the time sequence adaptive LSTM time feature extraction module. 6.The rural microgrid group dynamic optimization method according to claim 1, characterized in that, The dynamic optimization method of the rural micro-grid group further comprises: using a diffusion model to compare the preprocessed data with data in a fault feature library to obtain a comparison result; determining whether a rural micro-grid equipment has failed based on the comparison result; When the rural micro-grid equipment fails, a propagation path of the corresponding rural micro-grid equipment is simulated based on Kirchhoff's law to realize fault identification; A safety control instruction is generated based on the fault identification result; the safety control instruction includes a fault isolation instruction and a backup power supply switching instruction.

7. A rural micro-grid cluster dynamic optimization system, characterized in that, Each micro-grid in the rural micro-grid group is regarded as an agent, and the rural micro-grid group dynamic optimization system is arranged in the agent; The rural micro-grid group dynamic optimization system includes: A data acquisition module is configured to acquire operation data of the rural micro-grid group; the operation data includes power generation data, load data and energy storage data; A preprocessing module is configured to preprocess the operation data to obtain preprocessed data; A model construction module is configured to construct a space-time twin CNN-LSTM model; the space-time twin CNN-LSTM model includes a dynamic perception convolution spatial feature extraction module, a time sequence adaptive LSTM time feature extraction module and a space-time feature fusion module; the dynamic perception convolution spatial feature extraction module is a CNN algorithm model that fuses dynamic spatial features; the time sequence adaptive LSTM time feature extraction module is an LSTM algorithm model that fuses time features; A state prediction module is configured to input the preprocessed data into the space-time twin CNN-LSTM model to obtain a state prediction result of the rural micro-grid group within a set time; An optimization scheduling module is configured to regard each micro-grid in the rural micro-grid group as an agent, and to realize dynamic optimization scheduling of the rural micro-grid group based on the state prediction result and in combination with a multi-agent reinforcement learning algorithm.

8. A computer device comprising: A memory, a processor and a computer program stored on the memory and capable of running on the processor, characterized in that the processor executes the computer program to implement the rural micro-grid group dynamic optimization method of any one of claims 1-6.

9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the rural micro-grid group dynamic optimization method of any one of claims 1-6.

10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the rural micro-grid group dynamic optimization method of any one of claims 1-6.

Citation Information

Patent Citations

  • CNN-LSTM load prediction-based charging station micro-grid system optimization scheduling method

    CN113887858A

  • Modeling method, device and equipment for wind power prediction model

    CN114861990A

  • Short-term wind power prediction method based on EEMD-CNN-LSTM

    CN115510739A

  • New energy intelligent micro-grid data processing method and system

    CN115828165A

  • Micro-grid system energy management optimization method and system based on big data analysis

    CN120494171A

Cited By

  • Charging pile dynamic operation optimization control method, electronic equipment and storage medium

    CN121618570A

  • Rural multi-region scene microgrid group multi-energy complementary optimization scheduling method and system

    CN121882642A