Real-time perception and response system for power demand driven by the Internet of Things, method, electronic device and computer-readable storage medium
By deploying IoT power sensors on the user side and using clustering algorithms and LSTM models, the power resource allocation is dynamically optimized, and the problem that traditional power systems are difficult to perceive and respond to user electricity needs in real time is solved, and the flexibility of the power grid and the stability of user electricity services are achieved.
Patent Information
- Application Number
- CN202510039774.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-01-10
AI Technical Summary
Traditional power systems are difficult to perceive and respond to users' dynamic power needs in real time, resulting in improper allocation of power resources and problems of overpower or shortage of power.
By deploying IoT power sensors on the user side, collecting electricity consumption data in real time, and using the K-means clustering algorithm and long-term short-term memory network LSTM model, a power consumption demand prediction model is built, and the allocation and allocation of power resources are dynamically optimized.
It realizes accurate perception and prediction of users' electricity needs, improves the flexibility and adaptability of the power grid, and ensures stable electricity use services for users.
Smart Images

Figure CN119443746B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric power dispatching, and specifically to a real-time perception and response system and method for electric power demand driven by the Internet of Things, an electronic device and a computer-readable storage medium. Background Art
[0002] With the rapid development of social economy and the continuous improvement of people's living standards, electricity demand has become diversified, dynamic and uncertain. The traditional power system mainly relies on centralized power dispatching and management mode, facing challenges such as delayed perception of power demand and untimely response, and it is difficult to adapt to the increasingly complex changes in power demand.
[0003] On the demand side, users' electricity consumption behaviors show obvious differences and fluctuations. Different types of users (such as industrial users, commercial users, residential users, etc.) have different electricity consumption characteristics and demand patterns.
[0004] Traditional power demand forecasting mainly relies on statistical analysis of historical data, which makes it difficult to capture the dynamic changes in user demand in real time, and the forecast accuracy is limited. Power dispatching decisions are often based on fixed dispatching rules and experience, lacking a precise grasp of user actual needs, leading to improper allocation of power resources and problems such as power surplus or power shortage.
[0005] At the same time, traditional power equipment such as meters and transformers have limited data collection and transmission capabilities and cannot realize real-time collection and analysis of user power consumption data. This makes it difficult for the power system to perceive changes in user power demand in a timely manner and make fast and accurate scheduling decisions.
[0006] Therefore, a new technical solution is urgently needed to collect users' electricity consumption data in real time through IoT power sensors, combine big data analysis and machine learning algorithms to deeply explore and predict users' electricity consumption behaviors, and build an accurate electricity demand prediction model. At the same time, through the intelligent power dispatch response mechanism, according to the actual power demand of users, the allocation and distribution of power resources can be dynamically optimized to improve the flexibility and adaptability of the power grid.
[0007] In view of this, the present invention proposes a real-time perception and response system for electricity demand driven by the Internet of Things, a method, an electronic device and a computer-readable storage medium. Summary of the invention
[0008] To achieve the above purpose, the present invention provides the following technical solution: a real-time perception and response method of power demand driven by the Internet of Things, comprising:
[0009] Deploy power sensors of the Internet of Things on the user side to collect power consumption data, which includes power consumption and power consumption time, and pre-process the collected data;
[0010] Based on the preprocessed electricity consumption data, an electricity consumption power curve is constructed with electricity consumption time as an independent variable and electricity consumption power as a dependent variable, and based on the constructed electricity consumption power curve, electricity consumption features in the electricity consumption power curve are extracted;
[0011] The K-means clustering analysis algorithm is used to cluster the electricity consumption behaviors of different users and divide them into k electricity consumption categories.
[0012] Based on the constructed power consumption curve, the long short-term memory network LSTM model is trained, and the power demand forecasting model is built based on the long short-term memory network LSTM model to predict the trend of the power consumption curve;
[0013] Construct a power dispatch response mechanism, predict future power demand through the power demand prediction model based on the power data collected by power sensors, and make dispatch responses of different frequencies to power behavior in future time periods by charging and discharging power storage devices based on the clustering results of power consumption behavior and the power dispatch response cycle.
[0014] Preferably, an IoT power sensor is deployed on the user side to collect power consumption data, which includes power consumption and electricity usage time , integrating electricity consumption data into time series data , For electricity usage time The number of times electricity consumption data is collected in a time period, z is the user number, ranging from 1 to n; It represents the power consumption of user numbered z when collecting power consumption data for the uth time. Indicates the time when the electricity consumption data is collected for the uth time;
[0015] The collected electricity consumption data is preprocessed, and the preprocessing includes data cleaning and processing of missing values.
[0016] Preferably, the preprocessed power consumption data is connected into a continuous power curve by linear interpolation, and a power consumption curve with power consumption time as the independent variable and power consumption as the dependent variable is constructed. ;
[0017] The linear interpolation formula is:
[0018]
[0019] in, is the power consumption value corresponding to time t, and are adjacent known power values, and the corresponding times are and .
[0020] Preferably, the power consumption characteristics are extracted from the power consumption curve, and the power consumption characteristics include power consumption time The electricity consumption characteristics of the total electricity consumption, average power, power standard deviation, peak-to-valley difference and load factor within the area;
[0021] The total electricity consumption The average power is ; The power standard deviation is ; The peak-to-valley difference is , the peak-to-valley difference represents the power consumption time The difference between the maximum power value and the minimum power value in the internal power consumption curve, is the maximum power value, is the minimum power value; the load rate is , the load rate represents the ratio of the user's average electricity load level to the maximum electricity load, ranging from 1 to n.
[0022] Preferably, the number of electricity users is set to , each user has The electricity consumption characteristics are: , average power , power standard deviation , Peak-to-Valley Difference and load factor ; Set the target number of clusters , ; K-means clustering algorithm is used to cluster the electricity consumption behaviors of different users according to their electricity consumption characteristics. The specific steps are as follows:
[0023] Step a: The electricity consumption characteristic data of each user is organized as The matrix , where the matrix Row indicates the The feature vector of a user ;
[0024] Step b: Initialize the cluster center from Randomly select k users as the initial cluster centers , , As parameters, , The clustering parameters in correspond to the eigenvectors ; Each cluster center is also an m-dimensional feature vector;
[0025] Step c: For each user, calculate the Euclidean distance between it and each cluster center:
[0026]
[0027] The user Assign to the nearest cluster center Category ;
[0028] Step d: For each cluster , recalculate the cluster centers , take the average value of each feature of all users in the cluster as the new cluster center:
[0029]
[0030] in, is the number of users in the jth cluster, is the new cluster center;
[0031] Repeat step c and step d, and stop when the algorithm termination condition is met; the algorithm termination condition includes that the position change distance of the cluster center is less than a threshold value and reaches a preset maximum number of iterations;
[0032] Through the K-means clustering algorithm, n users are clustered into Electricity usage category.
[0033] Preferably, a long short-term memory network LSTM model is constructed based on the power consumption curve data to predict the trend of the power consumption curve;
[0034] Assume that the time series length of the power consumption curve is , the time length is The power consumption curve is divided into The input sequence of time length and The forecast sequence of time length, ; that is, through Power value of time length predicts the future Power value of time length;
[0035] The input and output sequences are generated by sliding windows. The input sequence is: ; The output sequence is: ;in is the current time point, and the input and output sequences are generated repeatedly through the sliding window until the time series length is All data in the power consumption curve are generated as input-output sequences;
[0036] Define the structure of the LSTM model and set the input layer to receive The input sequence is: a multi-layer LSTM layer is used, each layer has h hidden units; the output of the LSTM layer is mapped to the prediction sequence using a fully connected layer, and the output result is: ;The input sequence enters the LSTM layer through the input layer. The LSTM layer processes the input sequence in chronological order, updates the hidden state and memory state, and the output of the last time point of the LSTM layer passes through the output layer to generate a prediction sequence;
[0037] Define mean square error MSE as the loss function, and stop training when the loss function converges.
[0038] Preferably, the trained LSTM model is used to predict the power consumption curve trend in the future time period, and the power data sequence collected by the power sensor is used as the input data. Input the trained LSTM model to get the predicted sequence , the predicted sequence Construct a predicted power consumption curve , is the predicted power consumption, For future time points, based on the constructed electricity demand prediction model, advance electricity scheduling response is made to the user's future electricity demand.
[0039] Preferably, a power dispatch response mechanism is constructed to collect users' power consumption data in real time through power sensors, including power consumption power and power consumption time;
[0040] Input the collected electricity consumption data into the trained LSTM electricity demand forecasting model to predict the trend of electricity power curve in the future;
[0041] According to the power consumption behavior clustering results obtained by the K-means clustering algorithm, the power consumption category to which the user belongs is determined;
[0042] According to different electricity consumption categories, the corresponding electricity dispatch response cycle and frequency are set. By charging and discharging the power storage equipment, the power dispatch response is realized to ensure stable electricity consumption for users.
[0043] The real-time sensing and response system of power demand driven by the Internet of Things, wherein the real-time sensing and response method of power demand driven by the Internet of Things is implemented, comprises: a data collection and preprocessing module, a power consumption curve module, a feature extraction module, a clustering module, a power demand prediction module and a power consumption scheduling response module;
[0044] The data collection and preprocessing module deploys power sensors of the Internet of Things on the user side to collect power consumption data, the power consumption data including power consumption power and power consumption time, and preprocesses the collected data;
[0045] The power consumption curve module constructs a power consumption curve with power consumption time as an independent variable and power consumption as a dependent variable based on the preprocessed power consumption data;
[0046] The feature extraction module extracts the power consumption features in the power consumption curve based on the constructed power consumption curve;
[0047] The clustering module uses a K-means clustering analysis algorithm to cluster the electricity consumption behaviors of different users and divide them into k electricity consumption categories;
[0048] The power demand prediction module trains a long short-term memory network (LSTM) model based on the constructed power consumption curve to predict the trend of the power consumption curve;
[0049] The electricity dispatch response module constructs an electricity dispatch response mechanism, predicts future electricity demand through an electricity demand prediction model based on electricity consumption data collected by power sensors, and performs dispatch responses of different frequencies to electricity consumption behaviors in future time periods based on the clustering results of electricity consumption behaviors and the electricity dispatch response cycle.
[0050] An electronic device of the present invention comprises: a processor and a memory, wherein the memory stores a computer program that can be called by the processor;
[0051] The processor executes the method for real-time perception and response of power demand driven by the Internet of Things by calling the computer program stored in the memory.
[0052] A computer-readable storage medium includes: instructions stored therein, which, when executed on a computer, enable the computer to execute the method for real-time sensing and responding to power demand driven by the Internet of Things.
[0053] Beneficial effect: Through the deployment of Internet of Things power sensors, the present invention can collect users' electricity consumption data in real time and accurately, providing a data basis for subsequent electricity consumption behavior analysis and prediction. Data preprocessing can improve data quality and reduce the impact of data noise and outliers.
[0054] The present invention can intuitively display the user's electricity consumption behavior and rules by constructing an electricity consumption power curve. The extracted electricity consumption characteristics (such as total electricity consumption, average power, power standard deviation, peak-to-valley difference and load rate, etc.) can quantitatively describe the user's electricity consumption behavior and provide feature input for subsequent electricity consumption behavior clustering.
[0055] The present invention uses the K-means clustering algorithm to automatically divide users into different electricity usage categories (such as peak electricity usage type, stable electricity usage type, valley electricity usage type, etc.) according to the similarity of their electricity usage characteristics; through clustering division, power supply response can be made to different types of users, and targeted power dispatching strategies can be formulated.
[0056] By training the LSTM model, the present invention can use historical electricity consumption data to predict the trend of the electricity power curve in the future; the LSTM model can effectively capture the long-term dependency of time series data and improve the accuracy of electricity demand prediction.
[0057] The present invention formulates differentiated power dispatch response strategies according to the user's power consumption category and predicted power consumption demand, thereby ensuring stable power consumption for different users in the power system. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 This is a flow chart of a method for real-time sensing and responding to power demand driven by the Internet of Things according to the present invention;
[0059] Figure 2 This is a schematic diagram of the structure of the real-time perception and response system for power demand driven by the Internet of Things in the present invention;
[0060] Figure 3 It is a schematic diagram of the structure of an electronic device provided by the present invention;
[0061] Figure 4 It is a schematic diagram of the structure of the computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION
[0062] In order to better understand the present application, a more detailed description will be made of various aspects of the present application with reference to the accompanying drawings. It should be understood that these detailed descriptions are only descriptions of exemplary embodiments of the present application, and are not intended to limit the scope of the present application in any way. Throughout the specification, the same reference numerals refer to the same elements. The expression "and / or" includes any and all combinations of one or more of the associated listed items.
[0063] In the accompanying drawings, the size, dimensions and shapes of the elements have been slightly adjusted for ease of illustration. The drawings are for illustration only and are not strictly drawn to scale. As used herein, the terms "substantially", "approximately" and similar terms are used as terms of approximation, not as terms of degree, and are intended to illustrate the inherent deviations in measurements or calculations that will be recognized by those of ordinary skill in the art. In addition, in this application, the order in which the steps are described does not necessarily represent the order in which these processes occur in actual operation, unless otherwise specified or can be derived from the context.
[0064] It should also be understood that expressions such as "include", "including", "have", "contain" and / or "comprising" are open rather than closed expressions in this specification, which indicate the presence of the stated features, elements and / or components, but do not exclude the presence of one or more other features, elements, components and / or combinations thereof. In addition, when expressions such as "at least one of..." appear after a list of listed features, they modify the entire list of features rather than just the individual elements in the list. In addition, when describing embodiments of the present application, "may" is used to mean "one or more embodiments of the present application". And, the term "exemplary" is intended to refer to an example or illustration.
[0065] Unless otherwise defined, all words (including engineering terms and scientific and technological terms) used in this article have the same meaning as those commonly understood by ordinary technicians in the field to which this application belongs. It should also be understood that unless there is a clear explanation in this application, words defined in commonly used dictionaries should be interpreted as having the same meaning as their meaning in the context of the relevant technology, and should not be interpreted in an idealized or overly formal sense.
[0066] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0067] Example 1
[0068] Reference Figure 1 ,The first embodiment of the present invention provides a real-time perception and response method of ,electricity demand driven by the Internet of Things.
[0069] Step 1: Deploy power sensors of the Internet of Things on the user side to collect power consumption data, which includes power consumption power and power consumption time, and pre-process the collected data.
[0070] Deploy IoT power sensors on the user side to collect power consumption data, including power consumption and electricity usage time , integrating electricity consumption data into time series data , For electricity usage time The number of times electricity consumption data is collected in a time period, z is the user number, ranging from 1 to n; It represents the power consumption of user numbered z when collecting power consumption data for the uth time. Indicates the time when the electricity consumption data is collected for the uth time.
[0071] The collected power consumption data is preprocessed, and the preprocessing includes data cleaning and processing of missing values; the data cleaning includes setting a range of power consumption, treating data beyond the range as abnormal values, and replacing the abnormal values by interpolation.
[0072] The processing of missing values includes interpolating and filling the missing data with data from previous and subsequent time points.
[0073] Step 2: Based on the preprocessed electricity consumption data, construct an electricity consumption power curve with electricity consumption time as the independent variable and electricity consumption power as the dependent variable, and based on the constructed electricity consumption power curve, extract the electricity consumption features in the electricity consumption power curve.
[0074] Using the preprocessed power consumption data, the discrete power consumption data points are connected into a continuous power curve using the linear interpolation method, and a power consumption curve with power consumption time as the independent variable and power consumption as the dependent variable is constructed. .
[0075] The linear interpolation formula is:
[0076]
[0077] in, is the power consumption value corresponding to time t, and are adjacent known power values, and the corresponding times are and .
[0078] Extracting electricity consumption characteristics from the electricity consumption power curve, wherein the electricity consumption characteristics include electricity consumption time The electricity consumption characteristics of the total electricity consumption, average power, power standard deviation, peak-to-valley difference and load rate within the area.
[0079] The total electricity consumption The average power is ; The power standard deviation is ; The peak-to-valley difference is , the peak-to-valley difference represents the power consumption time The difference between the maximum power value and the minimum power value in the internal power consumption curve, is the maximum power value, is the minimum power value; the larger the peak-to-valley difference, the greater the fluctuation of the user's power load; conversely, the smaller the peak-to-valley difference, the relatively stable power load of the user; the load rate is The load rate represents the ratio of the user's average electricity load level to the maximum electricity load, and is used to reflect the utilization efficiency of the user's electricity load. The higher the load rate (closer to 1), the closer the user's average electricity consumption level is to the maximum electricity consumption level, and the higher the efficiency of power resource utilization. Conversely, the lower the load rate (closer to 0), the greater the gap between the user's average electricity consumption level and the maximum electricity consumption level, and the lower the efficiency of power resource utilization.
[0080] Step 3: Use the K-means clustering analysis algorithm to cluster the electricity consumption behaviors of different users and divide them into k electricity consumption categories.
[0081] The number of electricity users is , each user has The electricity consumption characteristics are: , average power , power standard deviation , Peak-to-Valley Difference and load factor ; Set the target number of clusters , ; K-means clustering algorithm is used to cluster the electricity consumption behaviors of different users according to their electricity consumption characteristics. The specific steps are as follows:
[0082] Step 301: The electricity consumption characteristic data of each user is organized as The matrix , where the matrix Row indicates the The feature vector of a user ;
[0083] Step 302: Initialize cluster centers from Randomly select k users as the initial cluster centers , , As parameters, , The clustering parameters in correspond to the eigenvectors ; Each cluster center is also an m-dimensional feature vector;
[0084] Step 303: For each user, calculate the Euclidean distance between the user and each cluster center:
[0085]
[0086] The user Assign to the nearest cluster center Category ;
[0087] Step d: For each cluster , recalculate the cluster centers , take the average value of each feature of all users in the cluster as the new cluster center:
[0088]
[0089] in, is the number of users in the jth cluster, is the new cluster center.
[0090] Step 303 and step 304 are repeated and the algorithm stops when the termination condition is met; the termination condition includes that the position change distance of the cluster center is less than a threshold value and the preset maximum number of iterations is reached.
[0091] Through the K-means clustering algorithm, n users are clustered into Electricity usage category.
[0092] Exemplarily, the electricity usage behavior is divided into five specific electricity usage categories according to the K-means clustering algorithm.
[0093] The K-means clustering algorithm is used to divide the electricity consumption into five specific categories, including peak electricity consumption type, stable user type, valley electricity consumption type, irregular electricity consumption type and energy-saving electricity consumption type.
[0094] The peak electricity consumption type has a high total electricity consumption, a high average power, a large power standard deviation, obvious fluctuations in electricity load, a large peak-to-valley difference, obvious differences between peak and valley periods, a low load rate, and electricity efficiency that needs to be improved; such users are generally large commercial or industrial users with large electricity demand, and their electricity load varies significantly over time.
[0095] The stable electricity consumption type has a medium total electricity consumption, medium average power, small power standard deviation, relatively stable electricity load, small peak-to-valley difference, no obvious difference between peak and off-peak periods, high load factor, and good electricity efficiency. This type of user is generally small and medium-sized commercial users or residential users, with relatively stable electricity demand and relatively regular electricity consumption behavior.
[0096] The off-peak electricity consumption type has a low total electricity consumption, a low average power, a small power standard deviation, a relatively stable electricity load, a small peak-to-valley difference, no obvious difference between peak and off-peak periods, a high load rate, and good electricity efficiency. This type of user is generally a small residential user or a vacation home with a small electricity demand, and electricity consumption behavior is concentrated in specific time periods.
[0097] The irregular electricity consumption type has uncertain total electricity consumption and large variations, uncertain average power and large variations, large power standard deviation, obvious fluctuations in electricity load, large peak-to-valley difference, obvious differences between peak and trough periods, low load factor, and electricity efficiency that needs to be improved. This type of user is generally a special industry or seasonal electricity user, and their electricity demand and behavior are affected by specific factors and vary greatly.
[0098] The energy-saving electricity consumption type has a low total electricity consumption, a low average power, a small power standard deviation, a relatively stable electricity load, a small peak-to-valley difference, no obvious difference between peak and low periods of electricity consumption, a high load factor, and good electricity efficiency. This type of user is generally an environmentally friendly user who pays attention to energy efficiency. They take energy-saving measures when using electricity, and their electricity demand and behavior are relatively economical.
[0099] Step 4: Based on the constructed power consumption curve, train the long short-term memory network LSTM model to predict the trend of the power consumption curve.
[0100] According to the power consumption curve data, a long short-term memory network LSTM model is constructed to predict the trend of the power consumption curve. The length of the power consumption curve time series is set to , the time length is The power consumption curve is divided into The input sequence of time length and The forecast sequence of time length, ; that is, through Power value of time length predicts the future The power value for the duration.
[0101] The input and output sequences are generated by sliding windows. The input sequence is: ; The output sequence is: ;in is the current time point, and the input and output sequences are generated repeatedly through the sliding window until the time series length is All data in the power consumption curve are generated as input and output sequences.
[0102] Define the structure of the LSTM model and set the input layer to receive The input sequence is: a multi-layer LSTM layer is used, each layer has h hidden units; the output of the LSTM layer is mapped to the prediction sequence using a fully connected layer, and the output result is: The input sequence enters the LSTM layer through the input layer. The LSTM layer processes the input sequence in chronological order, updates the hidden state and memory state, and the output of the last time point of the LSTM layer passes through the output layer to generate a prediction sequence.
[0103] Define mean square error MSE as the loss function, and stop training when the loss function converges.
[0104] Use the trained LSTM model to predict the power consumption curve trend in the future time period, and use the power data sequence collected by the power sensor as input data Input the trained LSTM model to get the predicted sequence , the predicted sequence Construct a predicted power consumption curve , is the predicted power consumption, For future time points, based on the constructed electricity demand prediction model, advance electricity scheduling response is made to the user's future electricity demand.
[0105] Step 5: Construct a power dispatch response mechanism. Based on the power consumption data collected by the power sensors, the power demand prediction model is used to predict future power demand. Based on the clustering results of power consumption behavior and the power dispatch response cycle, different frequencies of dispatch response are performed on the power consumption behavior in future time periods.
[0106] For different electricity consumption categories, set corresponding electricity scheduling response cycles and frequencies to ensure stable electricity consumption for users.
[0107] For different electricity consumption categories, set corresponding electricity scheduling response cycle and frequency.
[0108] For example, for peak power consumption, since such users have large power demand and significant power load fluctuations, a higher frequency of power dispatch response is required. Power dispatch can be set to be performed once every hour, and power resources can be deployed in advance according to the predicted power consumption curve trend to avoid power shortage during peak power consumption.
[0109] For example, for stable electricity consumption, the electricity demand of such users is relatively stable and the electricity consumption behavior is relatively regular. It can be set to conduct electricity dispatch every 4 hours, and according to the predicted power consumption curve trend, the power resources are appropriately allocated to maintain a stable power supply.
[0110] For example, for off-peak electricity consumption, the electricity demand of this type of user is small, and the electricity consumption behavior is concentrated in a specific period. It can be set to be scheduled every 6 hours to reduce the allocation of power resources during the off-peak period and improve the efficiency of power resource utilization.
[0111] For example, for irregular electricity consumption, the electricity demand and behavior of such users vary greatly and are affected by specific factors. It is necessary to dynamically adjust the power dispatch response frequency based on the real-time collected power consumption data. When the predicted power consumption curve shows obvious fluctuations, increase the power dispatch frequency. With minutes as the time scale, you can set it to be a 10-minute power dispatch. When the predicted power consumption curve is relatively stable, reduce the power dispatch frequency and set it to be a 30-minute power dispatch.
[0112] For example, for energy-saving electricity users, such users focus on energy efficiency, and their electricity demand and behavior are relatively optimized; electricity scheduling can be set every 12 hours, and according to the predicted electricity power curve, power resources can be appropriately allocated to encourage users to maintain energy-saving electricity behavior.
[0113] According to the electricity consumption category to which the user belongs and the corresponding electricity consumption dispatch response cycle, formulate an electricity consumption dispatch plan for a period of time in the future (such as the next 24 hours).
[0114] Through power storage equipment, the allocation and distribution of power resources can be automatically controlled and optimized according to the power dispatch plan, realizing refined power dispatch response.
[0115] According to the user's electricity consumption category and predicted electricity demand, formulate a charging and discharging strategy for power storage equipment to ensure stable electricity supply for users.
[0116] For example, the power storage device is charged during off-peak hours (such as at night) to store electricity. During peak hours, the stored electricity is released to supplement the power supply of the grid and alleviate the pressure of peak hours. The charging and discharging strategy can be set as follows: Exceeding current power consumption When the predicted power demand is 1.2 times, the energy storage device is started to discharge; when the predicted power demand is Lower than current power consumption When the power consumption is 0.8 times of that, the energy storage device starts charging.
[0117] For irregular electricity consumption, power storage equipment needs to dynamically adjust the charging and discharging strategies based on real-time electricity consumption data and short-term forecast results.
[0118] The charging and discharging strategy of the electric energy storage equipment to cope with irregular electricity consumption is set as follows: based on the short-term (such as within the next 1 hour) electricity demand forecast results, when it is predicted that the electricity demand will fluctuate drastically, the energy storage equipment will be started to charge in advance to reserve electricity; when the actual electricity demand exceeds the predicted demand, the energy storage equipment will be started to discharge to supplement the power supply; the charging and discharging power and time of the energy storage equipment will be dynamically adjusted to improve the adaptability of the energy storage equipment to irregular electricity demand.
[0119] When actually implementing the charging and discharging strategy, comprehensively consider the capacity, power, life and other factors of the power storage equipment to optimize the number and depth of charging and discharging. At the same time, establish a monitoring and management system for energy storage equipment to collect equipment operation data in real time, evaluate the effect of the charging and discharging strategy, and adjust and optimize the strategy.
[0120] Continuously monitor users' actual electricity consumption, compare actual electricity consumption data with predicted electricity power curves, and evaluate the accuracy of electricity demand prediction models; based on the evaluation results, regularly retrain and optimize the electricity demand prediction model to improve prediction accuracy.
[0121] According to users' actual electricity consumption and feedback, the electricity dispatch response mechanism is dynamically adjusted, the power resource allocation strategy is optimized, and the flexibility and adaptability of electricity dispatch are improved.
[0122] Example 2
[0123] Reference Figure 2 ,The second embodiment of the present invention provides a real-time sensing and response system for electricity ,demand driven by the Internet of Things.
[0124] The system includes a data collection and preprocessing module, an electricity power curve module, a feature extraction module, a clustering module, an electricity demand prediction module, and an electricity dispatch response module;
[0125] The data collection and preprocessing module deploys power sensors of the Internet of Things on the user side to collect power consumption data, the power consumption data including power consumption power and power consumption time, and preprocesses the collected data;
[0126] The power consumption curve module constructs a power consumption curve with power consumption time as an independent variable and power consumption as a dependent variable based on the preprocessed power consumption data;
[0127] The feature extraction module extracts the power consumption features in the power consumption curve based on the constructed power consumption curve;
[0128] The clustering module uses a K-means clustering analysis algorithm to cluster the electricity consumption behaviors of different users and divide them into k electricity consumption categories;
[0129] The power demand prediction module trains a long short-term memory network (LSTM) model based on the constructed power consumption curve to predict the trend of the power consumption curve;
[0130] The electricity dispatch response module constructs an electricity dispatch response mechanism, predicts future electricity demand through an electricity demand prediction model based on electricity consumption data collected by power sensors, and performs dispatch responses of different frequencies to electricity consumption behaviors in future time periods based on the clustering results of electricity consumption behaviors and the electricity dispatch response cycle.
[0131] Example 3
[0132] Figure 3 FIG. 1 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 3 As shown, according to another aspect of the present invention, an electronic device 500 is also provided. The electronic device 500 may include one or more processors and one or more memories. The memories store computer readable codes, and when the computer readable codes are executed by one or more processors, the real-time perception and response method of power demand driven by the Internet of Things as described above can be executed.
[0133] The method or system according to the embodiment of the present invention can also be used by Figure 3 The architecture of the electronic device shown is implemented.
[0134] like Figure 3 As shown, the electronic device 500 may include a bus 501, one or more CPUs 502, a ROM 503, a RAM 504, a communication port 505 connected to a network, an input / output component 506, a hard disk 507, and the like.
[0135] The storage device in the electronic device 500, such as ROM 503 or hard disk 507, can store the real-time sensing and response method for power demand based on Internet of Things driving provided by the present invention.
[0136] The invention relates to a real-time sensing and response method for power demand driven by the Internet of Things, comprising: deploying power sensors of the Internet of Things on the user side to collect power consumption data, wherein the power consumption data includes power consumption power and power consumption time, and preprocessing the collected data; constructing a power consumption curve with power consumption time as an independent variable and power consumption power as a dependent variable based on the preprocessed power consumption data, and extracting power consumption features in the power consumption curve based on the constructed power consumption curve; clustering and dividing power consumption behaviors of different users by the power consumption characteristics using a K-means clustering analysis algorithm, and dividing k power consumption categories; training a long short-term memory network LSTM model based on the constructed power consumption curve, and constructing a power demand prediction model based on the long short-term memory network LSTM model to predict the trend of the power consumption curve; constructing a power dispatch response mechanism, predicting future power demand through a power demand prediction model according to the power consumption data collected by the power sensors, and performing dispatch responses of different frequencies on power consumption behaviors in future time periods by charging and discharging power storage devices according to the clustering results of power consumption behaviors and the power dispatch response cycle.
[0137] Furthermore, the electronic device 500 may also include a user interface 508. Figure 3 The architecture shown is only exemplary and can be omitted according to actual needs when implementing different devices. Figure 3 One or more components of an electronic device are shown.
[0138] Example 4
[0139] Figure 4 It is a schematic diagram of the structure of a computer-readable storage medium provided by an embodiment of the present invention.
[0140] like Figure 4 As shown, a computer readable storage medium 600 according to one embodiment of the present invention.
[0141] Computer readable storage medium 600 has computer readable instructions stored thereon.
[0142] When the computer-readable instructions are executed by the processor, the real-time sensing and response method for power demand based on the Internet of Things driven according to the embodiments of the present invention described with reference to the above drawings can be executed.
[0143] The storage medium 600 includes, but is not limited to, for example, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. In addition, according to an embodiment of the present invention, the process described above with reference to the flowchart may be implemented as a computer software program.
[0144] For example, the present invention provides a non-transitory machine-readable storage medium, which stores machine-readable instructions, and the machine-readable instructions can be run by a processor to execute instructions corresponding to the method steps provided by the present invention, for example: deploying an Internet of Things power sensor on the user side to collect power consumption data, wherein the power consumption data includes power consumption power and power consumption time, and preprocessing the collected data; based on the preprocessed power consumption data, constructing a power consumption curve with power consumption time as an independent variable and power consumption as a dependent variable, and based on the constructed power consumption curve, extracting power consumption features in the power consumption curve; using K-me The ans clustering analysis algorithm clusters the electricity consumption behaviors of different users according to their electricity consumption characteristics and divides them into k electricity consumption categories; based on the constructed electricity power curve, the long short-term memory network LSTM model is trained, and a power demand forecasting model is constructed based on the long short-term memory network LSTM model to predict the trend of the electricity power curve; a power dispatching response mechanism is constructed, and the future power demand is predicted through the power demand forecasting model based on the power data collected by the power sensor, and according to the clustering results of the power consumption behavior and the power dispatching response cycle, the power storage equipment is charged and discharged to respond to the power consumption behavior in the future time period with different frequencies.
[0145] When the computer program is executed by the central processing unit (CPU), the above functions defined in the method of the present invention are performed. The method and the apparatus and device of the present invention may be implemented in many ways.
[0146] For example, the methods, apparatuses, and devices of the present invention may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware.
[0147] The above sequence for the steps of the method is for illustration only, and the steps of the method of the present invention are not limited to the sequence specifically described above unless otherwise specifically stated.
[0148] In addition, in some embodiments, the present invention can also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present invention. Therefore, the present invention also covers a recording medium storing a program for executing the method according to the present invention.
[0149] In addition, the parts of the above technical solutions provided in the embodiments of the present invention that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail to avoid excessive redundancy.
[0150] The specific implementation modes as described above further describe the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation mode of the present invention and is not intended to limit the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A real-time perception and response method for power demand driven by the Internet of Things, characterized in that: include: Deploy power sensors of the Internet of Things on the user side to collect power consumption data, which includes power consumption and power consumption time, and pre-process the collected data; Based on the preprocessed electricity consumption data, an electricity consumption power curve is constructed with electricity consumption time as an independent variable and electricity consumption power as a dependent variable, and based on the constructed electricity consumption power curve, electricity consumption features in the electricity consumption power curve are extracted; The K-means clustering analysis algorithm is used to cluster the electricity consumption behaviors of different users and divide them into k electricity consumption categories. Based on the constructed power consumption curve, the long short-term memory network LSTM model is trained, and the power demand forecasting model is built based on the long short-term memory network LSTM model to predict the trend of the power consumption curve; Construct a power dispatch response mechanism. Based on the power consumption data collected by power sensors, the power demand forecasting model is used to predict future power demand. Based on the clustering results of power consumption behavior and the power dispatch response cycle, different frequencies of dispatch response are performed on power consumption behavior in future time periods by charging and discharging power storage devices. According to the power consumption curve data, a long short-term memory network LSTM model is constructed to predict the trend of the power consumption curve; Assume that the time series length of the power consumption curve is , the time length is The power consumption curve is divided into The input sequence of time length and The forecast sequence of time length, ; that is, through Power value of time length predicts the future Power value of time length; The input and output sequences are generated by sliding windows. The input sequence is: ; The output sequence is: ;in is the current time point, and the input and output sequences are generated repeatedly through the sliding window until the time series length is All data in the power consumption curve are generated as input-output sequences; Define the structure of the LSTM model and set the input layer to receive The input sequence is: a multi-layer LSTM layer is used, each layer has h hidden units; the output of the LSTM layer is mapped to the prediction sequence using a fully connected layer, and the output result is: ;The input sequence enters the LSTM layer through the input layer. The LSTM layer processes the input sequence in chronological order, updates the hidden state and memory state, and the output of the last time point of the LSTM layer passes through the output layer to generate a prediction sequence; Define mean square error MSE as the loss function, and stop training when the loss function converges.
2. The method for real-time perception and response of power demand based on the Internet of Things according to claim 1 is characterized in that: Deploy IoT power sensors on the user side to collect power consumption data, including power consumption and electricity usage time , integrating electricity consumption data into time series data , For electricity usage time The number of times the electricity consumption data is collected, z is the user number, ranging from 1 to n; It represents the power consumption of user numbered z when collecting power consumption data for the uth time. Indicates the time when the electricity consumption data is collected for the uth time; The collected electricity consumption data is preprocessed, and the preprocessing includes data cleaning and processing of missing values.
3. The method for real-time perception and response of power demand based on Internet of Things drive according to claim 2 is characterized in that: Using the preprocessed power consumption data, the discrete power consumption data points are connected into a continuous power curve using the linear interpolation method, and a power consumption curve with power consumption time as the independent variable and power consumption as the dependent variable is constructed. ; The linear interpolation formula is: ; in, is the power consumption value corresponding to time t, and are adjacent known power values, and the corresponding times are and .
4. The method for real-time perception and response of power demand based on the Internet of Things according to claim 3 is characterized in that: Extracting electricity consumption characteristics from the electricity consumption power curve, wherein the electricity consumption characteristics include electricity consumption time The total power consumption, average power, power standard deviation, peak-to-valley difference and load factor within the area; The total electricity consumption The average power is ; The power standard deviation is ; The peak-to-valley difference is , the peak-to-valley difference represents the power consumption time The difference between the maximum power value and the minimum power value in the internal power consumption curve, is the maximum power value, is the minimum power value; the load rate is The load rate represents the ratio of the average power load level of the user to the maximum power load, ranging from 1 to .
5. The method for real-time perception and response of power demand based on the Internet of Things according to claim 4 is characterized in that: Set the number of electricity users to , each user has The electricity consumption characteristics are: , average power , power standard deviation , Peak-to-Valley Difference and load factor ; Set the target number of clusters , ; K-means clustering algorithm is used to cluster the electricity consumption behaviors of different users according to their electricity consumption characteristics. The specific steps are as follows: Step a: The electricity consumption characteristic data of each user is organized as The matrix , where the matrix Row indicates the The feature vector of a user ; Step b: Initialize the cluster center from Randomly select k users as the initial cluster centers , each cluster center is also an m-dimensional feature vector; Step c: For each user, calculate the Euclidean distance between it and each cluster center: ; , As parameters, , The clustering parameters in correspond to the eigenvectors ;Will The corresponding user is assigned to the nearest cluster center Category ; Step d: For each cluster , recalculate the cluster centers , take the average value of each feature of all users in the cluster as the new cluster center: ; in, is the number of users in the jth cluster, is the new cluster center; Repeat step c and step d, and stop when the algorithm termination condition is met; the algorithm termination condition includes that the position change distance of the cluster center is less than a threshold value and a preset maximum number of iterations is reached; Through the K-means clustering algorithm, n users are clustered into Electricity usage category.
6. The method for real-time perception and response of power demand based on Internet of Things drive according to claim 5 is characterized in that: Use the trained LSTM model to predict the power consumption curve trend in the future time period, and use the power data sequence collected by the power sensor as input data Input the trained LSTM model to get the predicted sequence , the predicted sequence Construct a predicted power consumption curve , is the predicted power consumption, For future time points, based on the constructed electricity demand prediction model, advance electricity scheduling response is made to the user's future electricity demand.
7. The method for real-time perception and response of power demand based on the Internet of Things according to claim 6 is characterized in that: Build a power dispatch response mechanism to collect users' power consumption data in real time through power sensors, including power consumption and power consumption time; Input the collected electricity consumption data into the trained LSTM electricity demand forecasting model to predict the trend of electricity power curve in the future; According to the power consumption behavior clustering results obtained by the K-means clustering algorithm, the power consumption category to which the user belongs is determined; According to different electricity consumption categories, the corresponding electricity dispatch response cycle and frequency are set. By charging and discharging the power storage equipment, the power dispatch response is realized to ensure stable electricity consumption for users.
8. A real-time sensing and response system for power demand driven by the Internet of Things, which is used to implement the real-time sensing and response method for power demand driven by the Internet of Things according to any one of claims 1 to 7, characterized in that: include: Data collection and preprocessing module, power consumption curve module, feature extraction module, clustering module, power demand forecasting module and power consumption dispatch response module; The data collection and preprocessing module deploys power sensors of the Internet of Things on the user side to collect power consumption data, the power consumption data including power consumption power and power consumption time, and preprocesses the collected data; The power consumption curve module constructs a power consumption curve with power consumption time as an independent variable and power consumption as a dependent variable based on the preprocessed power consumption data; The feature extraction module extracts the power consumption features in the power consumption curve based on the constructed power consumption curve; The clustering module uses a K-means clustering analysis algorithm to cluster the electricity consumption behaviors of different users and divide them into k electricity consumption categories; The power demand prediction module trains a long short-term memory network (LSTM) model based on the constructed power consumption curve to predict the trend of the power consumption curve; The electricity dispatch response module constructs an electricity dispatch response mechanism, predicts future electricity demand through an electricity demand prediction model based on electricity consumption data collected by power sensors, and performs dispatch responses of different frequencies to electricity consumption behaviors in future time periods based on the clustering results of electricity consumption behaviors and the electricity dispatch response cycle.
9. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores a computer program that can be called by the processor; The processor executes the real-time perception and response method for electricity demand driven by the Internet of Things as described in any one of claims 1 to 7 by calling the computer program stored in the memory.
10. A computer-readable storage medium, characterized in that: Instructions are stored, and when the instructions are executed on a computer, the computer executes the real-time perception and response method for power demand driven by the Internet of Things as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Power grid frequency modulation capability evaluation method and device, electronic equipment and storage medium
CN116073368A
Load control method, system and equipment for multi-class power equipment and storage medium
CN118411003A