Method and system for predicting power load of rural power grid user based on liquid neural network
Through the biological neuron dynamics and differential equation modeling of liquid neural networks, combined with multi-level time constants and time-gated residual connections, the multi-scale feature extraction and computing resource requirements problems in the power load prediction of rural network users are solved, and efficient and accurate power load prediction is achieved.
Patent Information
- Application Number
- CN202510481036.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-08-08
AI Technical Summary
The existing power load prediction methods in the rural network have problems such as insufficient modeling ability of neurons to model complex nonlinear changes, insufficient multi-scale feature extraction ability, large demand for deep model computing resources, and weak adaptability to new environments.
Using a method based on liquid neural network, liquid neurons are constructed through biological neuron dynamics and differential equation modeling, combining multi-level time constants and time-gated residual connections, a multi-layer perception machine architecture is built to realize multi-scale dynamic response and efficient calculation of power load data of rural network users.
It improves the accuracy and real-time power load prediction of rural network users, enhances the robustness and generalization capabilities of the model, reduces the computing resource requirements, and adapts to the complex and changing power system needs of rural network users.
Smart Images

Figure CN120454019A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of power load forecasting, and in particular relates to a method and system for forecasting power load of rural power grid users based on liquid neural network. Background Art
[0002] Power load forecasting is a core technology for power system operation and management, and its results are directly related to the stable operation of the power grid and the rational allocation of power resources. However, power load data inherently exhibits significant time series characteristics and is influenced by a variety of complex factors, such as weather variations, seasonality, and economic activity. Furthermore, rural power grids are inherently small in scale and geographically dispersed, and rural network terminals have limited computing power for power data. Consequently, power load forecasting still faces many challenges in its practical application. Currently, power load forecasting methods primarily include traditional statistical methods, machine learning methods, and deep learning methods. Traditional statistical methods, such as time series analysis models (e.g., ARIMA), enable simple and efficient load forecasting. Machine learning methods, such as support vector machines and random forests, have improved forecasting accuracy to a certain extent through nonlinear modeling. In recent years, deep learning methods, such as long short-term memory networks (LSTMs) and convolutional neural networks (CNNs), have been widely used in the field of power load forecasting. These methods possess powerful nonlinear modeling capabilities, improving their ability to model long time series data and the accuracy of power load forecasting.
[0003] While the aforementioned methods have achieved some success in power load forecasting, they still face numerous shortcomings when faced with the complexity and diversity of load data. First, the fixed response mechanisms of neurons in traditional neural networks limit the model's ability to capture nonlinear relationships in power loads, making it difficult to accurately reflect dynamic changes. Second, power load data from rural power grid users often exhibit both short-term rapid fluctuations and long-term trend changes, and existing methods are insufficient in capturing multi-scale temporal dynamics. Furthermore, many deep learning models have large parameter counts and high computational overhead, making them difficult to meet the real-time forecasting needs of resource-constrained rural power grid terminals. These methods also have weak generalization capabilities for new user scenarios or changes in data distribution, making them difficult to adapt to the diverse needs of actual power systems.
[0004] To this end, this patent proposes a method and system for predicting the power load of rural power grid users based on liquid neural networks. As an emerging dynamic neural network model, liquid neural networks have unique advantages and can effectively make up for the shortcomings of existing methods. By introducing biological neuron dynamics and differential equation modeling, the dynamic changes of data are captured; the time constants of neurons at different levels are allocated and dynamically adjusted, so that they have the ability to respond to input signals at multiple time scales, thereby better capturing the multi-scale dynamic characteristics of the power load data of rural power grid users. In addition, the LTC model structure is compact and has a small number of parameters. Compared with traditional deep learning models, it has significant computational efficiency advantages in resource-constrained rural power grid application scenarios. At the same time, LTC can significantly improve the feature capture capability through dynamic adjustment of time constants and multi-scale input response characteristics, thereby enhancing the robustness and generalization ability of the model.
[0005] To address the challenges of existing methods in predicting power load for rural grid users, including accuracy, real-time performance, generalization, and computational resource requirements, a new power load forecasting method based on liquid neural networks, using innovative neural network structures and network architecture, offers new insights and technical support for modeling rural power load data. This approach not only improves prediction accuracy and model efficiency but also significantly enhances the model's adaptability and robustness in rural grid applications, possessing significant theoretical and practical value.
[0006] During the implementation of the present invention, the inventors of this application discovered that the current power load forecasting methods have the following challenges:
[0007] (1) Neurons are unable to model complex nonlinear changes. In traditional neural network structures, neurons mostly use fixed response mechanisms and cannot dynamically adjust their sensitivity to input signals, resulting in insufficient performance when modeling complex nonlinear load changes. This defect limits the model's ability to capture nonlinear relationships in power loads, making it difficult to accurately reflect dynamic change characteristics.
[0008] (2) Insufficient ability to extract multi-scale features. Electricity load data from rural grid users often exhibits multi-time-scale characteristics, such as rapid fluctuations and long-term trends. Existing methods often rely on fixed-scale processing when extracting features, making it difficult to effectively integrate dynamic features at multiple time scales. This results in poor performance when processing complex time series load data and an inability to fully capture feature details.
[0009] (3) Deep models have high memory requirements. Although deep learning methods currently demonstrate strong nonlinear modeling capabilities in power load forecasting, they typically require large amounts of training data and computing resources. This is particularly true in resource-constrained rural power grid terminals. Due to their large number of parameters and high computational overhead, these methods struggle to achieve real-time predictions, limiting their practical application in rural power grid user scenarios.
[0010] (4) Insufficient adaptability to new environments and new data. Existing load forecasting methods are highly dependent on training data and have weak generalization capabilities. When faced with changes in user behavior, weather conditions, or other external factors, the model's forecasting performance will significantly decline, making it difficult to adapt to the complex and changing actual needs of rural power grid applications. Summary of the Invention
[0011] In view of this, the present invention provides a method and system for predicting power load of rural power grid users based on liquid neural network, which are used to solve or at least partially solve the difficulties of existing power load prediction.
[0012] Based on the above technical problems, the present invention adopts the following technical solutions:
[0013] Step 1: Collect historical data of power load of rural power grid users containing multi-dimensional features, perform multi-source data fusion on the historical data of power load of rural power grid users, and construct a historical data set of rural power load;
[0014] Step 2: Preprocess the data in the rural power grid load history dataset, segment the rural power grid user historical load characteristic data containing multi-dimensional features based on a multi-scale time window, and perform feature dimension normalization operations;
[0015] Step 3: Construct liquid neurons based on the dynamic characteristics of biological neurons and liquid time constants;
[0016] Step 4: Build a rural power grid user power load prediction model based on liquid neurons;
[0017] Step 5: Divide the pre-processed rural power load data into a training set, a validation set, and a test set, which are used for training, parameter adjustment, and performance evaluation of the rural power load prediction model, and save the optimal model;
[0018] Step 6: Use the actual data from the test set under different electricity usage scenarios to evaluate the performance of the rural grid user power load forecasting model;
[0019] Step 7: Deploy the trained rural power load prediction model on the cloud server and realize online prediction of rural power load through the real-time data upload interface.
[0020] Furthermore, the multidimensional features include time features, user features, weather features, agricultural features, and socioeconomic features. The first step specifically includes:
[0021] Step 11: Collect historical data on power loads of rural power grid users with multi-dimensional features, including time features such as time periods and holidays, user features such as user categories and power usage patterns, weather features such as temperature, humidity, and wind speed, agricultural features such as crop growth cycles and irrigation patterns, and socio-economic features such as electricity prices and subsidy policies.
[0022] In steps one and two, multi-source data fusion is performed on data from different data sources to construct a historical dataset of rural power grid load.
[0023] Furthermore, the preprocessing includes missing value filling, outlier detection and processing, and the second step specifically includes:
[0024] Step 21: preprocess the multidimensional feature data in the rural power grid load history data set and fill in the missing values in the data using a linear interpolation method;
[0025] Step 22: Identify and process abnormal data based on the Z-score method;
[0026] Step 2 and step 3: Based on the multi-scale time window, the historical load characteristic data of rural power grid users containing multi-dimensional characteristics are segmented into short-term, medium-term and long-term time series;
[0027] Step 24: normalize the data based on the maximum-minimum normalization method.
[0028] Furthermore, the step three specifically includes:
[0029] Step 3.1: Introduce the passive leakage characteristics of biological neurons to construct a steady-state driving term. The expression of the steady-state driving term is as follows:
[0030] λ p (R p -s p )
[0031] Among them, s p Represents the state of the neuron, R p Corresponding to the resting potential of biological neurons; λ p Represents the time leakage rate at time p, defined as where τ p is the time constant;
[0032] Step 3.2: Introduce the gated synaptic regulation term ψ(v q ), adjust the stimulus intensity of the pre-neuron state, where v qrepresents the preneuron, gating the synaptic regulation term ψ(v q ) is as follows:
[0033] ψ(v q )=sigm(α q v q +θ q )
[0034] Among them, α q is the slope, θ q is the threshold;
[0035] Step 33, through the neuron state s p With the inversion threshold V rev Dynamic difference (V rev -s p ), achieving chemically driven adaptive regulation of biological neurons;
[0036] Steps 3 and 4: Use differential equations to model the dynamics of liquid neurons. The expressions are as follows:
[0037]
[0038] Where q refers to the previous neuron that has a synaptic connection with the current neuron, U pq Linearly map the input of the upper layer neurons to obtain the synaptic input of the current layer;
[0039] Through the synergistic effect of the steady-state drive term and the gated synaptic input term, the leakage effect and synaptic input of the neuron are dynamically balanced;
[0040] During the neuron state update process, the improved Euler method is used to discretize the differential equation, and the prediction step can be expressed as:
[0041]
[0042] Calculate the prediction gradient using the result of the prediction step sp* Then combine it with the initial gradient Take the average and finally update the state; the correction step is expressed as:
[0043]
[0044] Among them, F(s p )=λ p (R p -s p )+∑ q U pq ψ(v q )(V rev -s p), during the forward propagation of liquid neurons, the improved Euler method calculates the gradient twice (predicted value and corrected value) and performs weighted averaging on the state update, thereby reducing the discretization error.
[0045] Furthermore, the liquid neural network adopts a three-hidden layer structure and has multi-scale feature processing capabilities, specifically including:
[0046] Step 4.1: Construct hidden layers of liquid neurons with different time constant thresholds. Each layer consists of multiple liquid neurons, and a multi-layer liquid neuron stacking structure is used to transmit time series data layer by layer. The state equations of the prediction step and correction step of the liquid neuron in the k-th layer (k = 1, 2, 3...) are as follows:
[0047]
[0048]
[0049] in, W (k) Represents the synaptic connection weight matrix between neurons in the kth layer;
[0050] Step 42: introduce time-gated residual connections, replace the original cross-layer gating with learnable time gating to achieve multi-scale feature fusion; the residual connection weight g from the kth layer to the output is k The expression is as follows:
[0051]
[0052] Among them, τ k As the gate parameter input and the state vector s (k) Splicing, then gated residual matrix with b g Perform linear transformation, and then use the Sigmoid function represented by σ to perform nonlinear transformation;
[0053] Step 4.3: Introduce a multi-layer perceptron architecture to capture the global nonlinear relationship of the original input, which complements the hierarchical processing of time gating. The multi-layer perceptron adopts a three-hidden layer architecture, and the output is as follows:
[0054] MLP(x raw )=φ3(W3·φ2(W2·φ1(W1x raw +b1)+b2)+b3))
[0055] Among them, MLP represents multi-layer perceptron, x raw represents the initial input sequence, Represents the nonlinear activation function of each layer, W i ,b iRepresents the connection weights and bias parameters of the i-th layer;
[0056] Step 4: The output of the rural power grid user power load forecasting model is obtained by combining the gated residual input of the three liquid layers and the output of the independent multi-layer perceptron. The specific expression is as follows:
[0057]
[0058] in, is the weight matrix of the k-th layer output, s (k) represents the state vector of the kth layer, g k represents the gated residual connection parameter of the kth layer, and α is a trainable parameter that controls the fusion weight of the multilayer perceptron branch.
[0059] Furthermore, the liquid neuron hidden layers with different time constant thresholds include: the time constant of the first layer of neurons ranges from 0.5 to 2 hours, dynamically adapting to instantaneous changes with a granularity of half an hour; the time constant of the second layer of neurons ranges from 2 to 12 hours, focusing on medium-range laws within the daily cycle; the time constant of the third layer of neurons is between 12 and 48 hours, modeling the load drift between adjacent dates.
[0060] Furthermore, the step five specifically includes:
[0061] Step 51: divide the pre-processed historical load data containing multi-dimensional features into a training set, a validation set, and a test set, which are used for model training, parameter adjustment, and performance evaluation, respectively;
[0062] Step 52: Use mean square error as the loss function to measure the accuracy of the model prediction by calculating the error between the predicted value and the true value;
[0063] Step 53: Use the gradient descent method and optimization algorithm to adjust the parameters of the rural power grid user power load forecasting model. During the training process, use the Adam optimizer to jointly and dynamically update the network parameters and the time constants of the liquid neurons. The update rule example is as follows:
[0064]
[0065] Among them, η is the learning rate, τ t Express the time constant of a neuron at time t to ensure that the model can continuously adapt to the variability of rural power grid user load during training;
[0066] Step 54: Denormalization: Denormalize the model prediction value and the true value when calculating the loss;
[0067] Step 55: During the training process, the validation set is used to evaluate the performance of the rural power load forecasting model, an early stopping strategy is adopted, and cross-validation is used to further enhance the generalization ability of the model;
[0068] Steps 5 and 6: Based on the training results, save the optimal model with the best effect and record the optimal model parameters.
[0069] Furthermore, the step six specifically includes:
[0070] Step 61: Test the load forecast accuracy under different electricity usage scenarios, use the test set to evaluate the performance of the rural power grid user power load forecasting model, and select different indicators to analyze the prediction accuracy of the model;
[0071] Step 6.2: Verify the generalization capability of the rural power grid user power load forecasting model in short-term, medium-term and long-term forecasting through tests on different user groups and regional scenarios.
[0072] Furthermore, the step seven specifically includes:
[0073] Step 71: Deploy the trained rural power load forecasting model on a cloud server, design a real-time data upload interface, and implement online rolling forecasting of rural power load;
[0074] Step 7.2: Use newly collected multi-dimensional historical data to continuously train and tune the model to dynamically respond to policy changes, climate fluctuations, and agricultural production cycle factors.
[0075] On the other hand, the present invention provides a system for predicting power load of rural power grid users based on liquid neural network, which specifically includes:
[0076] Data upload and preprocessing module: It is responsible for uploading the original rural power grid user power load historical data and preprocessing the original time series data;
[0077] Liquid neuron building block: Based on the core principles of liquid neural networks, it models liquid neurons based on biological neuron dynamics models and assigns different initialization time constants to neurons at different levels, thereby constructing liquid neurons with multi-timescale perception capabilities.
[0078] Load forecasting model construction module: This module is used to build a multi-layer liquid neural network based on liquid hidden layers and multi-layer perceptrons. It uses differential equations to model neuron state changes and uses layer-by-layer propagation of the network layer to perform in-depth modeling of input time series data to obtain a power load forecasting model for rural power grid users.
[0079] Load forecasting and result analysis module: It is used to use the constructed rural power grid user power load forecasting model to forecast the rural power grid user power load, compare the forecast results with the actual load data, calculate the forecast error and generate evaluation indicators.
[0080] Compared with the prior art, the present invention has the following beneficial effects:
[0081] In summary, with the help of the above-mentioned technical solution of the present invention, the state of liquid neurons is modeled using differential equations, which improves the model's ability to model nonlinear data of rural power grid user loads. Secondly, the model introduces biological neuron dynamics and dynamically adjusted time constants, which enables it to have multi-scale response capabilities to input data and effectively extract multi-scale data features. At the same time, the model has a compact structure and a small number of parameters, which has significant computational efficiency advantages in application scenarios with limited rural power grid resources. By combining dynamic time constants and time-gated residual connection structures, the adaptability to different load scenarios is enhanced. When the data distribution changes, the network can dynamically adjust the neuron response, thereby improving the generalization ability to new scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0082] Figure 1 This is a flow chart of an implementation method of a rural power grid user power load prediction method based on a liquid neural network according to the present invention;
[0083] Figure 2 This is a schematic diagram of model load prediction results in a specific embodiment of a method for predicting power load for rural power grid users based on liquid neural network of the present invention. DETAILED DESCRIPTION
[0084] The inventors of this application have discovered through extensive research and practice that current power load forecasting methods have the following challenges:
[0085] (1) Neurons are unable to model complex nonlinear changes. In traditional neural network structures, neurons mostly use fixed response mechanisms and cannot dynamically adjust their sensitivity to input signals, resulting in insufficient performance when modeling complex nonlinear load changes in rural power grid data. This defect limits the model's ability to capture nonlinear relationships in rural power grid users' electricity loads, making it difficult to accurately reflect dynamic change characteristics.
[0086] (2) Insufficient ability to extract multi-scale features. Rural power load data typically exhibits multi-time-scale characteristics, including rapid fluctuations and long-term trends. Existing methods often rely on fixed-scale processing when extracting features, making it difficult to effectively integrate dynamic features at multiple time scales. This results in poor performance when processing complex time series load data and an inability to fully capture feature details.
[0087] (3) Deep models require large amounts of memory. Although deep learning methods currently demonstrate strong nonlinear modeling capabilities in power load forecasting, they typically require large amounts of training data and computing resources. This is particularly true in resource-constrained rural power grid environments, where such methods struggle to achieve real-time predictions due to their large number of parameters and high computational overhead, limiting their practical application.
[0088] (4) Insufficient adaptability to new environments and new data. Existing load forecasting methods are highly dependent on training data and have weak generalization capabilities. When faced with changes in user behavior, weather conditions, or other external factors, the model's prediction performance will significantly decline, making it difficult to adapt to the complex and changing power system needs of rural grid users.
[0089] Based on the above considerations, the present invention proposes a method for predicting the power load of rural power grid users based on liquid neural networks, which mainly solves the problems of insufficient modeling ability of neurons in current deep models for complex dynamic changes, insufficient utilization of multi-scale features, large memory requirements of deep models, and insufficient adaptability of models to new data in new environments.
[0090] In order to achieve the above object, the main concepts of the present invention are as follows:
[0091] First, a method for forecasting power load for rural power grid users based on liquid neural networks is proposed. By constructing a liquid neural network model, it achieves dynamic modeling of complex nonlinear changes and multi-scale dynamic response. To address the shortcomings of traditional load forecasting methods, such as insufficient neuronal modeling capabilities for complex nonlinear changes, poor extraction of multi-timescale features, excessive number of parameters in deep models, and poor adaptability to new environments, this method innovatively incorporates liquid neurons and biological neuron dynamics, using differential equations to model neuron states, enhancing the ability to model complex features. A dynamic feedback mechanism and multi-level time constant settings enable efficient extraction and utilization of multi-scale feature data. Furthermore, the network structure is optimized by combining time-gated residual connections with multi-layer perceptron modules, improving the stability of model training. By dynamically adjusting multi-level time constants to capture both rapid fluctuations and slow trends in the input signal, this method can more accurately forecast complex changes in power load for rural power grid users, while improving adaptability to new scenarios and exhibiting high efficiency and generalization capabilities. Compared to traditional deep models, this method has fewer parameters and requires less memory, providing important technical support for the scheduling and operation of rural power systems.
[0092] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0093] Example 1
[0094] like Figure 1 As shown, this embodiment provides a method for predicting power load of rural power grid users based on liquid neural network. The establishment of this method includes:
[0095] Step 1: In this example, we select power load forecast data for rural users in a certain region of Hebei Province, China, as a power load forecast dataset containing multidimensional features. This dataset includes multidimensional feature data such as weather, electricity prices, regional total load, and agricultural production cycles. Multidimensional features are sampled at multiple scales and fused with data alignment to generate multidimensional time series forecast data, providing basic data support and preparation for the model.
[0096] Step 2: Preprocess the power load forecast data to ensure its integrity and validity. Check for missing values in the data and fill in missing data using interpolation or the mean of historical data. Use the Z-score method to identify outliers in the data and replace them with local mean values. Based on the cyclical characteristics of the power load, set multi-scale time windows to segment the time series data. Finally, normalize the feature data to eliminate dimensionality effects.
[0097] Step 3: Model liquid neurons based on biological neuron dynamics models and differential equations. Use differential equations containing steady-state regulation terms and gated synaptic input regulation terms to discretely model neuron states, enhance the expressive power of neurons, and enable modeling of nonlinear dynamic behaviors at multiple time scales.
[0098] Step 4: Design a liquid neural network model based on liquid neurons to achieve time-series prediction of power load. The model consists of multiple liquid hidden layers and independent multi-layer perceptrons. Different time constant threshold ranges are selected for different levels of the liquid hidden layer, and multi-scale dynamic modeling is achieved by transferring features layer by layer. After the hidden layer, a linear transformation is performed on the output combination of the multi-layer perceptron to map the extracted time series features to the target prediction value. In the network structure design, the liquid hidden layer is combined with time-gated residual connections to mitigate the vanishing gradient problem and improve network training efficiency. Activation functions and regularization operations are also applied to ensure the effectiveness of the model.
[0099] Step 5: Divide the preprocessed data into training, validation, and test sets according to a certain ratio. Determine the loss function and optimizer for model training, and dynamically adjust the learning rate and time constant to perform model training and parameter tuning.
[0100] Step 6: Use the test set to evaluate the trained model's prediction performance in different application scenarios. Use mean squared error (MSE) and mean absolute error (MAE) to assess prediction accuracy. Test the model across diverse user groups and usage scenarios to verify its performance across different electricity usage patterns, focusing on periods with significant fluctuations in electricity consumption, such as morning and evening peaks. For scenarios with large prediction errors, analyze the causes and adjust the model structure or input features.
[0101] Step 7: Encapsulate the trained liquid neural network model as an interface service and deploy it on the cloud server. Based on the multi-dimensional feature data (time, weather, user type, agricultural information, etc.) obtained in real time, real-time rolling load forecasting is achieved.
[0102] In one embodiment, step one specifically includes:
[0103] Step 11. In this embodiment, the data set comes from the power load data of rural power grid users in a certain area of Hebei Province, China, including nine features: date, hour, dry-bulb temperature, dew point temperature, wet-bulb temperature, humidity, electricity price, agricultural cycle, and power load. The time sampling interval is 15 minutes.
[0104] In steps one and two, the time series data is stored as a CSV data file to facilitate data management and processing, and provide data support for subsequent model training.
[0105] In one embodiment, step 2 specifically includes:
[0106] Step 21: In this embodiment, preprocessing is performed on the data to ensure the validity of the data. For the missing values detected, linear interpolation is applied to fill the missing values in the data to ensure the continuity of the time series data. The formula is as follows:
[0107]
[0108] Where (x1, y1) and (x2, y2) are known data points, and x is a missing data point;
[0109] Step 22: Detect abnormal data points and perform outlier processing. Abnormal data will affect the model's learning and modeling of data patterns. Use the Z-score method to identify abnormal points in the data and replace them with the median or local mean. The formula for determining outliers is as follows:
[0110]
[0111] Where μ is the mean of the feature data sample; σ is the sample standard deviation; k is the outlier determination coefficient. Here, the Z score threshold is set to 2, and data points exceeding the threshold are processed using the local average value.
[0112] Step 2 and step 3: divide the time series data into multiple scales. The power load data of rural power grid users usually has significant time dynamic characteristics, including short-term fluctuations and long-term trends. In order to fully capture these characteristics, it is necessary to divide the input time series data into multiple scale time windows. For the time series data X = {x1, x2, ..., x T}, apply different time windows for segmentation:
[0113] X (m) =Window(X,m),m∈{s1,s2,…,s M}
[0114] Where m is the length of the time window, M is the number of multi-scales, and m can be 15 minutes, 60 minutes, 24 hours, or 48 hours. By dividing the input data into multi-scale windows, the input data can provide multi-level temporal dynamic information for the liquid neural network.
[0115] Step 24: Normalize the generated multi-scale data to unify the feature range for easy network input. Use the minimum-maximum normalization method to scale the data to the [0,1] interval and convert the data to the same dimension. The formula is as follows:
[0116]
[0117] Among them, x is the original data point, x min and x max are the minimum and maximum values of the data in the window, respectively, and x′ is the normalized data point.
[0118] In one embodiment, step three specifically includes:
[0119] Step 31: In this embodiment, the core dynamic modeling of liquid neurons is based on the following differential equations to describe the dynamic changes of neurons as data is updated. The passive leakage characteristics of biological neurons are introduced to construct a steady-state driving term to ensure that the neuron state s p Always tend to the preset resting reference value R p , to avoid unbounded drift of state values. The expression of the steady-state driving term is as follows:
[0120] λ p (R p -s p )
[0121] Among them, s pRepresents the state of the neuron, R p Corresponding to the resting potential of biological neurons, it is set here to the average level of load. p Represents the time leakage rate at time p, defined as where τ p is the time constant, λ p Controls the rate at which neurons respond;
[0122] Step 3.2 introduces the gated synaptic regulation term ψ(v q ), adjust the stimulation intensity brought by the front neuron state, where v q Representing the preneuron, the expression for the gated synaptic regulation term is as follows:
[0123] ψ(v q )=sigm(α q v q +θ q )
[0124] Among them, the slope α q The sensitivity of the gating function can be controlled, and the threshold θ q is the activation threshold set. q The activation intensity is converted into a gating signal of [0,1] to solve the overfitting problem of traditional linear weighting;
[0125] Step 3: When a neuron receives stimulation, it can show an activation or inhibition state. In order to simulate the chemical drive of biological neurons, the neuron state s p With the inversion threshold V rev Dynamic difference (V rev -s p ), to achieve adaptive adjustment of input intensity. p <V rev When (V rev -s p )>0, the input current is enhanced. For example, when the load forecast value is lower than the safety threshold, strong input correction is allowed. p >V rev When (V rev -s p )<0, inhibit input and realize reverse drive.
[0126] Steps 3 and 4: Combining the above three adjustment terms, we can use differential equations to model the dynamics of liquid neurons, as shown below. pq Linearly map the input of the upper layer neurons to obtain the synaptic input of the current layer.
[0127]
[0128] Through the synergistic effect of the steady-state drive term and the gated synaptic input term, the leakage effect of the neuron and the synaptic input are dynamically balanced. During the neuron state update process, the differential equation is discretized using the improved Euler method, and the prediction step can be expressed as:
[0129]
[0130] Among them, F(s p )=λ p (R p -s p )+∑ q U pq v(v q )(V rev -s p ). During the forward propagation of liquid neurons, the improved Euler method calculates the gradient twice (predicted value and corrected value) and performs weighted averaging on the state update, thereby reducing the discretization error.
[0131] Step 35: To improve the responsiveness of liquid neurons to input signals of different time scales, different time constants τ are assigned to each layer of neurons. In the initialization phase, time constants are randomly generated within a specified range and initialized, so that each liquid neuron in the network has a different response speed, as shown in the following formula:
[0132] τ i =Random(τ min ,τ max )
[0133] In this embodiment, the time constants of the first layer of neurons range from 0.5 to 2 hours, the time constants of the second layer of neurons range from 2 to 12 hours, and the time constants of the third layer of neurons range from 12 to 48 hours. Neurons with smaller time constants are more sensitive to rapidly changing signals in the input data (such as electricity price fluctuations), while neurons with larger time constants are more sensitive to slowly changing signals in the input data (such as wet-bulb temperature trends).
[0134] To enhance the network's learning capabilities, the time constant is included in the network's training process and dynamically adjusted within a certain range. During backpropagation, the gradient of the time constant is calculated and updated, adapting to the dynamic requirements of tasks at different time scales and improving the network's adaptability.
[0135] In one embodiment, step 4 specifically includes:
[0136] Step 4.1: Construct hidden layers of liquid neurons with different time constant thresholds. Each layer consists of multiple liquid neurons, and a multi-layer liquid neuron stacking structure is used to transmit time series data layer by layer to achieve deeper time series modeling. The state equations of the prediction step and correction step of the liquid neuron in the kth layer (k = 1, 2, 3...) are as follows:
[0137]
[0138]
[0139] in, W (k) Represents the synaptic connection weight matrix between neurons in the kth layer. Its core function is to perform weighted integration of synaptic input signals through linear transformation.
[0140] Step 42: introduce time-gated residual connections, replace the original cross-layer gating with learnable time gating to achieve multi-scale feature fusion. At the same time, it is introduced to avoid the gradient vanishing problem and enhance the ability of information transmission. The residual connection weight g from the kth layer to the output is k The expression is as follows:
[0141]
[0142] Among them, τ k As the gate parameter input and the state vector s (k) Splicing, then gated residual matrix with b g A linear transformation is performed, followed by a nonlinear transformation using the Sigmoid function (denoted by σ) to enhance time scale perception. Through gated residual connections, the weights of temporal features at different scales can be dynamically adjusted while preserving the original instantaneous information, improving the stability of model training.
[0143] Step 4.3: Introduce a multi-layer perceptron architecture to capture the global nonlinear relationship of the original input, which complements the hierarchical processing of time gating. The multi-layer perceptron uses a three-hidden layer architecture, and its output is as follows:
[0144] MLP(x raw )=φ3(W3·φ2(W2·φ1(W1x raw +b1)+b2)+b3))
[0145] Among them, x raw represents the initial input sequence, Represents the nonlinear activation function of each layer, W i ,b i Represents the connection weights and bias parameters of the i-th layer.
[0146] Step 4. The output of the model is obtained by combining the gated residual inputs of the three liquid layers and the outputs of the independent multi-layer perceptrons. The specific expression is as follows:
[0147]
[0148] Among them, x raw represents the initial input sequence, is the weight matrix of the k-th layer output, s (k) represents the state vector of the kth layer, g k represents the gated residual connection parameter of the kth layer, and α is a trainable parameter that controls the fusion weight of the multilayer perceptron branch.
[0149] In one embodiment, step five specifically includes:
[0150] Step 51: In this embodiment, the preprocessed data is divided into a training set, a validation set, and a test set in a ratio of 7:2:1, which are used for model training, parameter adjustment, and performance evaluation, respectively, to ensure the accuracy of model training and testing;
[0151] Step 52: Use mean square error as the loss function to measure the accuracy of the model prediction by calculating the error between the predicted value and the true value. It is defined as follows:
[0152]
[0153] Among them, y i is the actual value of the sample, is the predicted value of the sample, N is the number of samples;
[0154] Step 53: Use gradient descent and optimization algorithms to adjust model parameters. During training, use the Adam optimizer to dynamically update model parameters, dynamically adjusting hyperparameters such as the learning rate and time constant based on validation set performance. The Adam optimizer enables rapid model convergence and adjusts model weights by minimizing the loss function. An example of the Adam optimizer's update rule is as follows:
[0155]
[0156] Among them, η is the learning rate, τ t Express the time constant of a neuron at time t to ensure that the model continuously adapts to the variability of rural power grid user load during training.
[0157] Step 54: Denormalization: Denormalize the model predictions and true values when calculating the loss to ensure that the loss reflects the actual data differences.
[0158] The anti-normalization formula is:
[0159] Ptrue =P′×(P max -P min )+P min
[0160] Denormalization can convert both the predicted value and the true value back to the original data scale to more accurately measure the prediction effect of the model;
[0161] Step 55: Model Validation: Use the validation set to evaluate model performance during training. To avoid overfitting, use an early stopping strategy and further enhance the generalization ability of the model through cross-validation.
[0162] Steps 5 and 6: Based on the training results, save the optimal model with the best effect and record the relevant model parameters.
[0163] In one embodiment, step six specifically includes:
[0164] Step 61: To comprehensively evaluate the performance of the model in the load decomposition task, this embodiment uses multiple evaluation indicators, including mean square error (MSE) and mean absolute error (MAE), to further evaluate the performance of the model. The MAE formula is as follows:
[0165]
[0166] Step 62: Test the model's generalization capabilities across various electricity usage scenarios, as well as its predictive performance and generalization capabilities during the morning and evening peaks and the agricultural production cycle. This ensures the model's stability and robustness in various practical application scenarios, and its reliability and stability in actual rural grid deployment. To visually demonstrate the model's prediction results, this example visualizes the model's prediction results by plotting a comparison chart of predicted and actual values.
[0167] Figure 2 The model's power load prediction for users at different time steps on the test set is plotted.
[0168] In one embodiment, step seven specifically includes:
[0169] Step 71: Deploy the liquid neural network model trained in this embodiment to the cloud server, design the model's data input interface, and ensure that the model can receive uploaded user historical power load and multi-dimensional feature data;
[0170] Step 72: During actual application, automatic adjustment is performed based on the newly collected data to dynamically adapt to the changing electricity consumption patterns of rural grid users.
[0171] This example uses a multidimensional dataset of rural power grid user load data from a region in Hebei Province, China. The dataset contains nine characteristics: date, hour, dry-bulb temperature, dew point temperature, wet-bulb temperature, humidity, electricity price, agricultural cycle, and power load, with a 15-minute time interval. The data was collected in a real-world environment, reflecting actual electricity usage in daily life, enhancing the realism and practicality of the research. The dataset covers a five-year period without any gaps, facilitating analysis and modeling.
[0172] Figure 2 A comparison chart shows the predicted user power load values for multiple future time steps generated by the Liquid Neural Network on a test set, compared to the actual values. This chart demonstrates that the Liquid Neural Network performs well in capturing the dominant trends in power load, effectively modeling diverse load samples while also capturing subtle fluctuations during specific time periods, such as peak hours.
[0173] The advantage of liquid neural networks is that they simulate time series changes through dynamic differential equations. Combined with multi-time constant neuron settings, they can capture short-term fluctuations and long-term trends at the same time, thereby adapting to input data of different time scales, improving the accuracy of user power load forecasts and the adaptability of the model, thereby better carrying out practical applications.
[0174] Example 2
[0175] This embodiment includes a system for predicting power load of rural power grid users based on liquid neural network, including:
[0176] Data upload and preprocessing module: This module is used to upload and obtain the original power load time series data of rural power grid users and related multi-dimensional feature data, and perform comprehensive data preprocessing operations on them. First, the integrity and credibility of the data are ensured by filling missing values and detecting outliers. Then, the time series data is segmented using multi-scale time window partitioning technology to extract feature information from different time scales. Finally, the preprocessed multi-scale data is normalized to adjust all feature values to the same numerical range to improve the stability and efficiency of the model training process. This module provides high-quality multi-scale feature input for the liquid neural network, laying a solid foundation for subsequent prediction models;
[0177] Liquid Neuron Building Block: This module models liquid neurons based on the core principles of liquid neural networks and biological neuron dynamics models. Different initialization time constants are assigned to neurons at different levels, enabling them to respond to input signals at multiple time scales.
[0178] Load forecasting model construction module: This module constructs a multi-layer liquid neural network based on liquid hidden layers and multi-layer perceptrons. It models neuron state changes through differential equations and utilizes layer-by-layer propagation of network layers to deeply model input time series data. Time-gated residual parameters are connected between hidden layers to improve model training efficiency and resistance to the vanishing gradient problem. The output layer maps the generated power load forecast results.
[0179] Load Forecasting and Result Analysis Module: This module uses a constructed liquid neural network to forecast power load and compares the forecast results with the actual load. Model performance is quantified by calculating evaluation metrics such as mean squared error (MSE) and mean absolute error (MAE). Furthermore, the module supports visual analysis of forecast results, such as plotting a time series comparison of actual and forecasted loads, and a distribution graph of forecast errors. These features allow users to intuitively evaluate forecast results, discover model performance at different time scales, and identify potential areas for improvement.
[0180] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0181] Obviously, those skilled in the art may make various changes and modifications to the embodiments of the present invention without departing from the spirit and scope of the embodiments of the present invention. Thus, if such changes and modifications of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is intended to include such changes and modifications.
[0182] Other parts not described in detail are prior art.
Claims
1. A method for predicting power load of rural power grid users based on liquid neural network, characterized in that: include: Step 1: Collect historical data of power load of rural power grid users containing multi-dimensional features, perform multi-source data fusion on the historical data of power load of rural power grid users, and construct a historical data set of rural power load; Step 2: Preprocess the data in the rural power grid load history dataset, segment the rural power grid user historical load characteristic data containing multi-dimensional features based on a multi-scale time window, and perform feature dimension normalization operations; Step 3: Construct liquid neurons based on the dynamic characteristics of biological neurons and liquid time constants; Step 4: Build a rural power grid user power load prediction model based on liquid neurons; Step 5: Divide the pre-processed rural power load data into a training set, a validation set, and a test set, which are used for training, parameter adjustment, and performance evaluation of the rural power load prediction model, and save the optimal model; Step 6: Use the actual data from the test set under different electricity usage scenarios to evaluate the performance of the rural grid user power load forecasting model; Step 7: Deploy the trained rural power load prediction model on the cloud server and realize online prediction of rural power load through the real-time data upload interface.
2. The method for predicting power load of rural power grid users based on liquid neural network according to claim 1, characterized in that: The multidimensional features include time features, user features, weather features, agricultural features, and socioeconomic features. Step 1 specifically includes: Step 11: Collect historical data on power loads of rural power grid users with multi-dimensional features, including time features such as time periods and holidays, user features such as user categories and power usage patterns, weather features such as temperature, humidity, and wind speed, agricultural features such as crop growth cycles and irrigation patterns, and socio-economic features such as electricity prices and subsidy policies. In steps one and two, multi-source data fusion is performed on data from different data sources to construct a historical dataset of rural power grid load.
3. The method for predicting power load of rural power grid users based on liquid neural network according to claim 2, characterized in that: The preprocessing includes missing value filling, outlier detection and processing, and the second step specifically includes: Step 21: preprocess the multidimensional feature data in the rural power grid load history data set and fill in the missing values in the data using a linear interpolation method; Step 22: Identify and process abnormal data based on the Z-score method; Step 2 and step 3: Based on the multi-scale time window, the historical load characteristic data of rural power grid users containing multi-dimensional characteristics are segmented into short-term, medium-term and long-term time series; Step 24: normalize the data based on the maximum-minimum normalization method.
4. The method for predicting power load of rural power grid users based on liquid neural network according to claim 1, characterized in that: The step three specifically includes: Step 3.1: Introduce the passive leakage characteristics of biological neurons to construct a steady-state driving term. The expression of the steady-state driving term is as follows: l p (R p -s p ) Among them, s p Represents the state of the neuron, R p Corresponding to the resting potential of biological neurons; λ p Represents the time leakage rate at time p, defined as where τ p is the time constant; Step 3.2: Introduce the gated synaptic regulation term ψ(v q ), adjust the stimulus intensity of the pre-neuron state, where v q represents the preneuron, gating the synaptic regulation term ψ(v q ) is as follows: ψ(v q )=sigm(α q v q +θ q ) Among them, α q is the slope, θ q is the threshold; Step 33, through the neuron state s p With the inversion threshold V rev Dynamic difference (V rev -s p ), achieving chemically driven adaptive regulation of biological neurons; Steps 3 and 4: Use differential equations to model the dynamics of liquid neurons. The expressions are as follows: Where q refers to the previous neuron that has a synaptic connection with the current neuron, U pq Linearly map the input of the upper layer neurons to obtain the synaptic input of the current layer; Through the synergistic effect of the steady-state drive term and the gated synaptic input term, the leakage effect and synaptic input of the neuron are dynamically balanced; During the neuron state update process, the improved Euler method is used to discretize the differential equation, and the prediction step can be expressed as: Calculate the prediction gradient using the result of the prediction step sp* Then combine it with the initial gradient Take the average and finally update the state; the correction step is expressed as: Among them, F(s p )=λ p (R p -s p )+∑ q U pq ψ(v q )(V rev -s p ), during the forward propagation of liquid neurons, the improved Euler method calculates the gradient twice (predicted value and corrected value) and performs weighted averaging on the state update, thereby reducing the discretization error.
5. The method for predicting power load of rural power grid users based on liquid neural network according to claim 4, characterized in that: The liquid neural network adopts a three-hidden layer structure and has multi-scale feature processing capabilities, specifically including: Step 4.1: Construct hidden layers of liquid neurons with different time constant thresholds. Each layer consists of multiple liquid neurons, and a multi-layer liquid neuron stacking structure is used to transmit time series data layer by layer. The state equations of the prediction step and correction step of the liquid neuron in the k-th layer (k = 1, 2, 3...) are as follows: in, W (k) Represents the synaptic connection weight matrix between neurons in the kth layer; Step 42: introduce time-gated residual connections, replace the original cross-layer gating with learnable time gating to achieve multi-scale feature fusion; the residual connection weight g from the kth layer to the output is k The expression is as follows: Among them, τ k As the gate parameter input and the state vector s (k) Splicing, then gated residual matrix with b g Perform linear transformation, and then use the Sigmoid function represented by σ to perform nonlinear transformation; Step 4.3: Introduce a multi-layer perceptron architecture to capture the global nonlinear relationship of the original input, which complements the hierarchical processing of time gating. The multi-layer perceptron adopts a three-hidden layer architecture, and the output is as follows: MLP(x raw )=φ3(W3·φ2(W2·φ1(W1x raw +b1)+b2)+b3)) Among them, MLP represents multi-layer perceptron, x raw represents the initial input sequence, Represents the nonlinear activation function of each layer, W i ,b i Represents the connection weights and bias parameters of the i-th layer; Step 4: The output of the rural power grid user power load forecasting model is obtained by combining the gated residual input of the three liquid layers and the output of the independent multi-layer perceptron. The specific expression is as follows: in, is the weight matrix of the k-th layer output, s (k) represents the state vector of the kth layer, g k represents the gated residual connection parameter of the kth layer, and α is a trainable parameter that controls the fusion weight of the multilayer perceptron branch.
6. The method for predicting power load of rural power grid users based on liquid neural network according to claim 5, characterized in that: Liquid neuron hidden layers with different time constant thresholds include: the time constant of the first layer of neurons ranges from 0.5 to 2 hours, dynamically adapting to instantaneous changes with a granularity of half an hour; the time constant of the second layer of neurons ranges from 2 to 12 hours, focusing on medium-range laws within the daily cycle; the time constant of the third layer of neurons is between 12 and 48 hours, modeling load drift between adjacent dates.
7. The method for predicting power load of rural power grid users based on liquid neural network according to claim 6, characterized in that: The step five specifically includes: Step 51: divide the pre-processed historical load data containing multi-dimensional features into a training set, a validation set, and a test set, which are used for model training, parameter adjustment, and performance evaluation, respectively; Step 52: Use mean square error as the loss function to measure the accuracy of the model prediction by calculating the error between the predicted value and the true value; Step 53: Use the gradient descent method and optimization algorithm to adjust the parameters of the rural power grid user power load forecasting model. During the training process, use the Adam optimizer to jointly and dynamically update the network parameters and the time constants of the liquid neurons. The update rule example is as follows: Among them, η is the learning rate, τ t Express the time constant of a neuron at time t to ensure that the model can continuously adapt to the variability of rural power grid user load during training; Step 54: Denormalization: Denormalize the model prediction value and the true value when calculating the loss; Step 55: During the training process, the validation set is used to evaluate the performance of the rural power load forecasting model, an early stopping strategy is adopted, and cross-validation is used to further enhance the generalization ability of the model; Steps 5 and 6: Based on the training results, save the optimal model with the best effect and record the optimal model parameters.
8. The method for predicting power load of rural power grid users based on liquid neural network according to claim 7, characterized in that: The step six specifically includes: Step 61: Test the load forecast accuracy under different electricity usage scenarios, use the test set to evaluate the performance of the rural power grid user power load forecasting model, and select different indicators to analyze the prediction accuracy of the model; Step 6.2: Verify the generalization capability of the rural power grid user power load forecasting model in short-term, medium-term and long-term forecasting through tests on different user groups and regional scenarios.
9. The method for predicting power load of rural power grid users based on liquid neural network according to claim 8, characterized in that: The step seven specifically includes: Step 71: Deploy the trained rural power load forecasting model on a cloud server, design a real-time data upload interface, and implement online rolling forecasting of rural power load; Step 7.2: Use newly collected multi-dimensional historical data to continuously train and tune the model to dynamically respond to policy changes, climate fluctuations, and agricultural production cycle factors.
10. A system for predicting power load of rural power grid users based on liquid neural network, characterized in that: Specifically include: Data upload and preprocessing module: It is responsible for uploading the original rural power grid user power load historical data and preprocessing the original time series data; Liquid neuron building block: Based on the core principles of liquid neural networks, it models liquid neurons based on biological neuron dynamics models and assigns different initialization time constants to neurons at different levels, thereby constructing liquid neurons with multi-timescale perception capabilities. Load forecasting model construction module: This module is used to build a multi-layer liquid neural network based on liquid hidden layers and multi-layer perceptrons. It uses differential equations to model neuron state changes and uses layer-by-layer propagation of the network layer to perform in-depth modeling of input time series data to obtain a power load forecasting model for rural power grid users. Load forecasting and result analysis module: It is used to use the constructed rural power grid user power load forecasting model to forecast the power load of rural power grid users, compare the forecast results with the actual load data, calculate the forecast error and generate evaluation indicators; The rural power grid user power load prediction system based on liquid neural network is used to execute the steps in the rural power grid user power load prediction method based on liquid neural network according to any one of claims 1 to 9.
Citation Information
Cited By
Power load prediction method and system based on dynamic driving
CN120728591A
Flight parameter anomaly detection method based on LNN and correlation coefficient
CN121435062A
Dynamic prediction method for SCR (Selective Catalytic Reduction) denitration system of coal-fired power plant based on parameter identification mechanism-data hybrid model
CN121525504A
A dynamic prediction method for a coal-fired power plant SCR denitration system based on a parameter identification mechanism-data hybrid model
CN121525504B
Multi-stage cell culture-oriented adaptive mechanism fusion living cell density prediction method
CN121583333A