A Real-time Monitoring Method for Energy Consumption Data in a Smart Park
By introducing mutation point detection and dynamic parameter adjustment mechanisms into the ARIMA model, the response lag problem of ARIMA model in power consumption monitoring in smart parks is solved, and accurate prediction and abnormal monitoring of power consumption data are achieved.
Patent Information
- Application Number
- CN202510703743.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-05-29
AI Technical Summary
The ARIMA prediction model responds to the power consumption monitoring of smart parks with lagging response, making it difficult to accurately capture the drastic changes in power consumption caused by emergencies, affecting the accuracy of the prediction results.
By collecting power consumption data in real time, performing preliminary predictions based on the ARIMA model, introducing a mutation point detection mechanism to segment the data, calculating the cumulative change rate and variation coefficient to determine the trend type, dynamically adjusting the autoregressive coefficient and moving average coefficient, and combining residuals for error monitoring.
It improves the adaptability and prediction accuracy for sudden and non-stationary power consumption data, and enhances the accuracy and reliability of power consumption data monitoring.
Smart Images

Figure CN120234777B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and more particularly to a method for real-time monitoring of energy consumption data in a smart park. Background Art
[0002] In the overall operation system of a smart park, power consumption monitoring plays a key role. Real-time monitoring and accurate prediction of power consumption data are core elements for optimizing energy allocation, reducing operating costs, and improving the overall operational efficiency of the park. It not only helps to rationally plan energy supply and avoid energy waste, but also can detect potential energy-related problems in advance and ensure the stable operation of the park.
[0003] Time series prediction algorithms are often used to monitor data anomalies. The ARIMA (Autoregressive Integrated Moving Average) prediction model is a typical example of a time series prediction method. Its core idea is to predict future data based on historical data. The difference between the predicted value and the actual value is used to determine whether the data is abnormal, thereby enabling data anomaly monitoring.
[0004] However, scenarios in smart parks are extremely complex and fraught with uncertainty. For example, sudden equipment failures can cause dramatic fluctuations in power consumption. Hosting large-scale events can significantly increase power demand and consumption within a park. Interruptions and restorations in energy supply can also lead to unusual fluctuations in power consumption. These sudden events can cause sudden changes in power consumption, severely disrupting data stability. ARIMA models, which rely heavily on data stability and regular periodicity, have a lag effect on the impact of these sudden events, making it difficult to accurately capture actual data trends. This can lead to significant deviations between forecasts and actual power consumption data, impacting the accuracy of power consumption data monitoring. Summary of the Invention
[0005] To address the problem in the prior art that the ARIMA forecasting model responds lag when processing sudden changes in power consumption data, resulting in large deviations in the forecast results and an inability to accurately monitor power consumption, the present invention proposes a real-time monitoring method for energy consumption data in a smart park. The method includes:
[0006] Collect the power consumption data of the smart park in real time, and use the ARIMA forecasting model to obtain the predicted value of each power consumption data based on the historical power consumption data of each power consumption data;
[0007] Taking the power consumption data at any moment as the current power consumption data, perform mutation point detection on the historical power consumption data of the current power consumption data, and divide the historical power consumption data into multiple segments according to the location of the mutation points;
[0008] Calculate the cumulative change rate and coefficient of variation of the power consumption data for each segment respectively, determine the change trend index for each segment based on the cumulative change rate and coefficient of variation, and determine the change trend type for each segment according to the change trend index;
[0009] Based on the similarity between the current power consumption data and each segment, determine the change trend type of the current power consumption data; according to the change trend type of the current power consumption data, the residual, and the residual of the historical power consumption data, dynamically adjust the autoregressive coefficient and moving average coefficient of the ARIMA prediction model; where the residual is the difference between the actual value and the predicted value;
[0010] Based on the adjusted ARIMA model, predict the predicted value of the next power consumption data of the current power consumption data, and perform energy consumption anomaly monitoring according to the difference between the predicted value and the actual value.
[0011] This technical solution first constructs an ARIMA model based on historical power consumption data to achieve preliminary prediction, providing a basis for subsequent error feedback; secondly, introduces a mutation point detection mechanism to divide non-stationary data into multiple segments with stable structures, improving the ability to identify internal change patterns of the data; furthermore, constructs a change trend index by combining the cumulative change rate and coefficient of variation of the segments, and divides them into different trend types, providing a standard for similarity matching of the current data trend; subsequently, determines the change trend type of the current power consumption data based on similarity, and dynamically adjusts the autoregressive coefficient and moving average coefficient of the ARIMA model in combination with the residual of the current power consumption data and the residual of the historical power consumption data, realizing trend perception and error-driven optimization of the prediction model parameters; finally, based on the adjusted model, makes a more accurate prediction of future energy consumption data, and completes real-time monitoring of energy consumption anomalies through the comparison between the predicted value and the actual value, improving the adaptability and prediction accuracy of the traditional prediction model for sudden and non-stationary power consumption data, and improving the accuracy of power consumption data monitoring.
[0012] Furthermore, the process of dynamically adjusting the autoregressive coefficient and moving average coefficient of the ARIMA prediction model is as follows: judge whether the prediction error of the current power consumption data is 0. If it is 0, retain the initial autoregressive coefficient and initial moving average coefficient of the ARIMA prediction model; if it is not 0, further judge the change trend type of the current power consumption data. If the change trend type is a sharp rise type or a sharp drop type, adjust the initial autoregressive coefficient. If the change trend type is a fluctuating type, adjust the initial moving average coefficient.
[0013] This technical solution provides a set of dynamic adjustment processes. By introducing a prediction error judgment mechanism and a trend type recognition mechanism, it realizes the differential adjustment of ARIMA model parameters. This differential adjustment mechanism ensures that the prediction model can adaptively adjust the parameters of the prediction model when facing power consumption data with different change trends, thereby improving the accuracy of the prediction results.
[0014] Furthermore, the similarity between the current power consumption data and each segment is determined based on the following method: Let the lengths of each segment of the current power consumption data be , until , where is the total number of segments; starting from the current power consumption data, in the reverse order, divide forward by the lengths of , until to obtain matched segments to be matched, and all segments and segments to be matched are corresponding based on length; calculate the DTW distance between each segment to be matched and its corresponding segment, and use the reciprocal of the DTW distance as the similarity between each segment to be matched and its corresponding segment.
[0015] This technical solution realizes trend matching at different time scales on the basis of time series alignment by constructing segments to be matched with the same length as the segment length and using the dynamic time warping algorithm to measure the similarity index with historical segments. It not only fully retains the structural characteristics of the segment, avoids comparison deviation caused by inconsistent lengths, but also improves the accuracy of identifying the change trend of the current power consumption data.
[0016] Furthermore, the change trend type of each segment is determined by the quartile method based on the change trend indicators of all segments, including: when the change trend indicator of a certain segment is less than the first quartile of the change trend indicators of all segments, this segment is determined to be a sharp decline type; when the change trend indicator of a certain segment is greater than the third quartile of the change trend indicators of all segments, this segment is determined to be a sharp rise type; when the change trend indicator of a certain segment is greater than or equal to the first quartile and less than or equal to the third quartile, this segment is determined to be a fluctuating type.
[0017] Furthermore, the method for detecting mutation points in the historical power consumption data of the current power consumption data is: calculate the absolute value of the first-order difference value between every two adjacent power consumption data in the historical power consumption data to construct a first-order difference sequence; set the dynamic threshold range as the mean of the first-order difference sequence Detect extreme points for the first-order difference sequence with 1.5 times the standard deviation, identify the extreme points outside the dynamic threshold range as mutation points, and identify the extreme points within the dynamic threshold range as non-mutation points and eliminate them.
[0018] Further, the method for monitoring energy consumption anomalies based on the difference between the predicted value and the actual value is as follows:
[0019] Calculate the relative error between the predicted value and the actual value of the next power consumption data of the current power consumption data; if the relative error exceeds the preset relative error range, it is determined that the next power consumption data is abnormal; if the relative error does not exceed the preset relative error range, it is determined that the next power consumption data is not abnormal.
[0020] Further, the change trend index of each segment is determined by the ratio of the cumulative change rate of the power consumption data of the segment to the coefficient of variation, where the coefficient of variation is the ratio of the standard deviation to the mean of the power consumption data of the segment.
[0021] Further, the adjustment of the initial autoregressive coefficient is based on the following formula:
[0022] ;
[0023] In the formula, is the autoregressive coefficient adjusted at time of the prediction model, is the initial autoregressive coefficient at time of the prediction model, is the change trend type of the power consumption data at time , is the residual of the power consumption data at time , <= is the sign function, is the normalization function, is the mean value of the absolute values of the residuals of all historical power consumption data at time is the standard deviation of the absolute values of the residuals of all historical power consumption data at time is a parameter to prevent the denominator from being zero, is the absolute value symbol.
[0024] This technical solution realizes the dynamic optimization of the autoregressive term of the prediction model by integrating the directionality of the current residual, the degree of amplitude deviation, and the trend type factor, enabling the prediction model to adaptively amplify or reduce the autoregressive coefficient, thereby enhancing the response ability to the trend changes of power consumption data, and improving the accuracy and robustness of the prediction by introducing the dual regulation of trend-driven and error-driven.
[0025] Furthermore, the adjustment of the initial moving average coefficient is carried out based on the following formula:
[0026] ;
[0027] In the formula, is the adjusted initial moving average coefficient of the prediction model at time, is the initial moving average coefficient of the prediction model at time, is the standard deviation of the absolute value of the residual of the power consumption data of the first segment before the power consumption data at time, is the standard deviation of the absolute value of the residual of the power consumption data of the second segment before the power consumption data at time.
[0028] Based on the change of the residual fluctuation level of two adjacent historical segments, this technical solution realizes the dynamic correction of the moving average term by introducing the ratio of the square difference of the standard deviation to the square of the standard deviation of the previous segment. The correction strategy combines the change of the historical residual of the power consumption data, endows the model with the adaptive ability to the local fluctuation intensity, and improves the prediction stability and abnormal recognition accuracy of the prediction model under the condition of power consumption data fluctuation.
[0029] Furthermore, the method for determining the change trend type of the current power consumption data is as follows: if the similarity between a certain segment to be matched and its corresponding segment is the largest, the change trend type of the corresponding segment is used as the change trend type of the current power consumption data.
[0030] The present invention has the following effects:
[0031] By introducing a trend recognition mechanism based on segmentation at mutation points and a dynamic parameter adjustment method driven by residuals, the present invention realizes the rapid response and adaptive correction of the ARIMA prediction model to mutation data in the complex energy consumption scenario of a smart park, improves the processing ability of the prediction model for non-stationary data, and by dynamically adjusting the model parameters, improves the accuracy of the prediction results and enhances the accuracy and reliability of power consumption anomaly monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 is a schematic flowchart of the method of the present invention;
[0033] Figure 2 is a schematic flowchart of the method for dynamically adjusting parameters in step S5 of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0034] 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.
[0035] A real-time monitoring method for energy consumption data of a smart park provided by the present invention, as Figure 1 shown in, includes:
[0036] S1: Real-time collect the power energy consumption data of the smart park, and use the prediction model to obtain the predicted value of each power energy consumption data based on the initial parameters.
[0037] The power energy consumption data of the smart park is usually affected by various factors such as weather, holidays, and peak periods of equipment use, so it may show obvious sudden increases, sudden decreases, or fluctuating trends. Especially when the equipment load suddenly increases or the weather changes cause a sudden increase in air conditioning or heating load, the power energy consumption data will fluctuate violently.
[0038] In order to accurately monitor the power energy consumption data, it is set to collect the power energy consumption data once a minute to improve the real-time perception ability of the energy consumption fluctuations in the park. Then, taking any moment as the current moment, the power energy consumption data at the current moment is used as the current power energy consumption data, and all the power energy consumption data collected within one day before the current moment is used as all the historical power energy consumption data of the current power energy consumption data, that is, 1440 historical power energy consumption data before each current power energy consumption data.
[0039] Next, these 1440 data points are divided into multiple subsequences in chronological order, with 50 data in each group, and a total of 28 historical samples are obtained for the training of the prediction model.
[0040] The core idea of the prediction model is to obtain the predicted value of each power energy consumption data based on all the historical power energy consumption data of each power energy consumption data. This prediction model consists of an autoregressive part and a moving average part.
[0041] The core of the autoregressive part is the autoregressive coefficient , which is used to measure the linear correlation degree between current data and historical data. In the energy consumption scenario of smart campuses, the change of power consumption data is complex and affected by various factors. The autoregressive coefficient determines the strength of the linear relationship between the current observation value and past observation values. The larger the coefficient, the greater the influence of the current value by the past values, and the higher the dependence degree of the model on historical data; on the contrary, the smaller the coefficient, the smaller the influence of historical data on the current value. An appropriate autoregressive coefficient can make the prediction result of the model stable and converge to the true value. For example, in the prediction of power consumption data, if the autoregressive coefficient is too large, the predicted value may overly rely on historical rising data, resulting in a continuously high prediction of future energy consumption; if the coefficient is too small, the model will underutilize historical data, and the prediction result may be too smooth to capture the change of energy consumption in time.
[0042] The core of the moving average part is the moving average coefficient , which is mainly used to process the random fluctuation part in power consumption data. A larger moving average coefficient means that the model will pay more attention to recent residuals, be more sensitive to changes in new data, and be able to adjust the prediction result faster to adapt to new information. On the contrary, a smaller moving average coefficient will make the model respond more slowly to new information, and the prediction result is relatively more stable. Therefore, when the energy supply in the campus is unstable or the operating state of equipment changes frequently, resulting in fluctuations in power consumption data, the moving average coefficient can enable the model to adjust the prediction according to the degree of fluctuation, making the prediction result more in line with the actual energy consumption change, improving the accuracy and stability of the prediction, and thus effectively coping with the uncertainty of power consumption data.
[0043] The specific formula is:
[0044]
[0045] In this formula, is the predicted value at time The autoregressive part captures the long-term trend and autocorrelation in the time series by multiplying the observation values at the past time points by the corresponding autoregressive coefficients and summing them up. is the moving average part, which is used to correct the predicted value and mainly used to eliminate short-term fluctuations and random noise in the time series. Among them, is the number of autoregressive terms, which is equal to the number of historical data selected when predicting data is the actual value of the th data before data , is the autoregressive coefficient of , which is equivalent to a weight. The larger the autoregressive coefficient, the greater the influence of the prediction result on The stronger the dependence, the greater the benefit. is the number of moving average items, which is equal to the number of moving average items in the data. When making predictions, the selected The number of residuals of historical data is set in this setting (Empirical value) to fully capture the long-term trends and short-term disturbances in the data. It's data The previous The residual of each data point (actual value minus predicted value), For The moving average coefficient of It's data The random error term.
[0046] Specifically, based on 28 sets of historical samples, the autoregressive coefficient and moving average coefficient are estimated by the maximum likelihood estimation method to obtain the initial parameters of the ARIMA model. and , a total of and .
[0047] Finally, the 50 historical power consumption data before each current power consumption data are selected as input, and the predicted value is calculated using the initialized ARIMA model. When predicting the next power consumption data of each current power consumption data, the 50 historical power consumption data of the next power consumption data are still used, and the autoregressive coefficient and moving average coefficient are assigned in turn as and , and then calculate its predicted value. In the prediction process, the autoregressive coefficient of the current power consumption data is , the moving average coefficient is .
[0048] Taking into account that this prediction method has a lag effect on emergencies, which can easily lead to inaccurate prediction results, when predicting the next power energy consumption data, the present invention will analyze the changing trend of the current power energy consumption data, and then dynamically adjust its autoregressive coefficient and moving average coefficient to obtain a more accurate prediction value.
[0049] S2: Perform mutation point detection and segmentation on the historical power consumption data of the current power consumption data.
[0050] To improve the accuracy and robustness of power consumption data prediction, relying solely on overall historical data (historical power consumption data within a day) for modeling often makes it difficult to cope with drastic fluctuations or structural changes. In practical applications, power loads often mutate due to sudden events such as equipment start / stop, abrupt weather changes, and changes in holiday electricity consumption habits. These mutations often break the original trends and periodicities, causing the prediction models trained based on global data to fail. Therefore, it is necessary to identify the mutation points in the power consumption data before modeling and segment the historical data accordingly, so as to achieve more targeted model parameter adjustment and trend analysis.
[0051] In one embodiment, the mutation point detection and segmentation are performed according to the following method:
[0052] Obtain all the historical power consumption data of the current power consumption data and sort them in chronological order. Among all the historical power consumption data, calculate the first-order difference values of every two adjacent historical power consumption data to obtain a first-order difference sequence composed of the first-order difference values. By calculating the first-order difference values, the instantaneous changes in the power load can be revealed.
[0053] Next, perform extreme point detection on the first-order difference sequence. Considering the situation where normal small fluctuations in the data form "false extremes", set the dynamic threshold range to be 1.5 times the standard deviation of the first-order difference sequence of the mean of the first-order difference sequence. Filter out non-significant mutation points according to the dynamic threshold range, that is, eliminate the extreme points located within the dynamic threshold range because the mutation characteristics of these data are not significant. At the same time, regard the extreme points outside the dynamic threshold range as mutation points because these data have significant mutation characteristics. 1.5 times the standard deviation of the first-order difference sequence of the mean of the first-order difference sequence. Filter out non-significant mutation points according to the dynamic threshold range, that is, eliminate the extreme points located within the dynamic threshold range because the mutation characteristics of these data are not significant. At the same time, regard the extreme points outside the dynamic threshold range as mutation points because these data have significant mutation characteristics.
[0054] Finally, divide all the historical power consumption data into multiple segments according to the positions of the mutation points in all the historical power consumption data of the current power consumption. Specifically, each segment is between every two adjacent mutation points.
[0055] In short, through mutation point detection and segmentation, the structural change regions in the data can be effectively extracted, making the subsequent trend recognition, parameter dynamic adjustment, and abnormal response mechanism more targeted and sensitive, and improving the adaptability of the overall prediction system to complex environmental changes.
[0056] S3: Calculate the change trend index based on the cumulative change rate and coefficient of variation of the power consumption data of each segment, and determine the change trend type of this segment.
[0057] In the energy consumption management scenario of a smart park, the power consumption data will be affected by various factors and show different types of change trends, but mainly can be divided into three types: sharp rise type, sharp drop type, and fluctuation type.
[0058] For example, when holding a large-scale conference or event in the park, the electricity load may rise rapidly within a short period, showing a sudden increase trend; while when some electrical equipment suddenly shuts down or malfunctions, the power consumption data will drop rapidly, showing a sudden decrease trend; in addition, when the energy supply is unstable or the operating state of the equipment fluctuates frequently, although the power consumption data does not increase or decrease significantly, it will fluctuate frequently within a certain range, and at this time it is classified as a fluctuating type.
[0059] In order to conduct a refined analysis of the change trend of the historical power consumption data of the current power consumption data, in this step, first calculate the change trend index of each segment of the historical power consumption data according to the cumulative change rate and coefficient of variation of the power consumption data included in each segment, and then determine the change trend type of this segment according to the change trend index, whether it belongs to the sudden increase type, sudden decrease type or fluctuating type.
[0060] In one embodiment, for any segment of the historical power consumption data, the change trend index of this segment is quantified by the ratio of the cumulative change rate of the power consumption data of this segment to the coefficient of variation, and is expressed by the formula:
[0061]
[0062] In the formula, is the change trend index of the power consumption data of this segment, is the th power consumption data of this segment, is the serial number of the power consumption data of this segment, is the total number of the power consumption data of this segment, is the coefficient of variation of the power consumption data of this segment, which is equal to the ratio of the standard deviation and the mean of the power consumption data of this segment, is a constant to prevent the denominator from being 0, and the value is .
[0063] The numerator part of this formula is the cumulative change rate of all the power consumption data of this segment, which can more finely reflect the change trend of the power consumption data within the entire segment. If the cumulative change rate is positive and large, it means that the power consumption data as a whole shows an upward trend within this segment, and the upward amplitude is large; if the cumulative change rate is negative and the absolute value is large (the smaller the negative number), it means that the power consumption data as a whole shows a downward trend, and the downward amplitude is large; if the cumulative change rate is close to 0, it means that the overall change trend of the power consumption data within this segment is not obvious. The denominator part of this formula reflects the fluctuation degree of the power consumption data within this segment through the coefficient of variation. The larger the coefficient of variation, the greater the fluctuation degree of the power consumption data of this segment, and the lower the credibility of the change trend, and vice versa.
[0064] The change trend index of each segment is used to measure the strength of the change trend of the power consumption data of that segment. Specifically: if the cumulative change rate of the power consumption data of a segment is large, it indicates that there is an obvious upward trend in the power consumption data within that segment. If at the same time the degree of fluctuation is smaller, it indicates that the credibility of the upward trend is higher, and the change trend type of that segment is more likely to be a sharp increase type, and the change trend index is larger. If the cumulative change rate of the power consumption data of a segment is small, it indicates that there is an obvious downward trend in the power consumption data within that segment. If at the same time the degree of fluctuation is smaller, it indicates that the credibility of the downward trend is higher, and the change trend type of that segment is more likely to be a sharp decrease type, and the change trend index is smaller.
[0065] In one embodiment, the determination method of the change trend type of each segment is as follows:
[0066] Obtain the change trend indexes of all segments, and divide them by the quartile method; when the change trend index of a certain segment is less than the first quartile of the change trend indexes of all segments, that segment is determined to be of the sharp decrease type; when the change trend index of a certain segment is greater than the third quartile of the change trend indexes of all segments, that segment is determined to be of the sharp increase type; the remaining segments are determined to be of the fluctuation type.
[0067] S4: Determine the change trend type of the current power consumption data by analyzing the similarity between the current power consumption data and each segment.
[0068] In order to achieve a rapid judgment and dynamic response to the change trend of the current power consumption data, and improve the accuracy and real-time performance of trend recognition, this step determines the change trend type to which the current power consumption data belongs based on the similarity matching mechanism between the historical segment data and the current data. Compared with the method directly based on model prediction, by matching known trend samples, the misjudgment rate can be effectively reduced, the recognition ability of the system for sudden trend changes and the adaptability of the prediction model can be improved, and the response ability of the intelligent park energy consumption management system to the dynamic environment can be enhanced.
[0069] Let the lengths of each segment of the current power consumption data be 、 until where is the total number of segments; starting from the current power consumption data, divide forward in the reverse order according to the lengths of 、 until to obtain segments to be matched, and all segments and segments to be matched are corresponding based on the length, that is, the first segment to be matched corresponds to the first segment, the th segment to be matched corresponds to the corresponds to each segment.
[0070] Calculate the DTW (Dynamic Time Warping) distance between each segment to be matched and its corresponding segment, and take the reciprocal of the DTW distance as the similarity between each segment to be matched and its corresponding segment.
[0071] Then, based on the principle of maximum matching similarity, determine the change trend type of the current power consumption data:
[0072] If the similarity between a segment to be matched and its corresponding segment is the largest, take the change trend type of the corresponding segment as the change trend type of the current power consumption data.
[0073] S5: Dynamically adjust the parameters of the prediction model according to the change trend type of the current power consumption data and the prediction error of the prediction model.
[0074] In order to improve the response ability and residual correction ability of the prediction model to different types of trend changes, this step dynamically adjusts the autoregressive coefficient and moving average coefficient of the model by jointly considering the change trend type of the current power consumption data and the prediction residual information, so as to enhance the adaptability and robustness of the model to trend errors. Compared with the traditional static model parameter setting, this method can significantly reduce the prediction lag and overshoot phenomena, and improve the accuracy and stability of energy consumption prediction.
[0075] The residual reflects the size of the prediction error of the prediction model and is a key indicator to measure the prediction accuracy of the model. Specifically, it is equal to the actual value minus the predicted value. First, obtain the residual of the current power consumption data and the residuals corresponding to all historical power consumption data of the current power consumption data. Combining the change trend type and residual of the current power consumption data and the residuals of historical power consumption data for dynamic parameter adjustment can enable the model to more accurately capture the trend changes of the data.
[0076] When the residual of the current power consumption data is 0, it means that the prediction result of the prediction model is accurate. Whether the change trend of the current power consumption data is a sharp drop trend or a fluctuation, there is no need to adjust the autoregressive coefficient and the moving average coefficient, and the existing prediction mode of the prediction model is maintained.
[0077] When the residual of the current power consumption data is not 0, it means that the prediction result of the prediction model is not accurate enough. Then, it is necessary to discuss in different cases and set different adjustment strategies, which are specifically as follows:
[0078] If the change trend type of the current power consumption data is a sharp increase type, and the residual of the current power consumption data is positive, it indicates that the upward trend of the predicted value of the power consumption data lags behind the upward trend of the actual value, there is a lag effect, and it is necessary to increase the autoregressive coefficient and strengthen the dependence on the current power consumption data (dependence on the sharp increase trend) to more accurately capture the actual trend of the data and reduce the problem of the predicted result being too small.
[0079] If the change trend of the current power consumption data is a sharp increase type, and the residual of the current power consumption data is negative, it indicates that the upward trend of the predicted value of the power consumption data is ahead of the upward trend of the actual value. It is necessary to reduce the autoregressive coefficient and reduce the excessive dependence on the current power consumption data (reduce the excessive dependence on the sharp increase trend) to better conform to the actual upward trend of the power consumption data and reduce the problem of the predicted result being too large.
[0080] If the change trend of the current power consumption data is a sharp decrease type, and the residual of the current power consumption data is positive. For example, the actual value is 10 and the predicted value is 6, it indicates that the downward trend of the predicted value of the power consumption data is faster than the actual downward trend. It is necessary to reduce the autoregressive coefficient and reduce the excessive dependence on the current power consumption data (reduce the dependence on the sharp decrease trend), slow down the downward trend of the predicted value, make it more conform to the actual downward trend of the power consumption data, and reduce the problem of the predicted result being too small.
[0081] If the change trend of the current power consumption data is a sharp decrease type, and the residual of the current power consumption data is negative. For example, the actual value is 6 and the predicted value is 10, it indicates that the downward trend of the predicted value of the power consumption data is slower than the actual value, and there is a lag effect in the downward trend of the prediction model. It is necessary to increase the autoregressive coefficient and strengthen the dependence on the current power consumption data (strengthen the dependence on the sharp decrease trend) to better conform to the actual downward trend of the power consumption data and reduce the problem of the predicted result being too large.
[0082] If the change trend of the current power consumption data is a fluctuating type, it indicates that the upward or downward trend of the power consumption data is not significant enough. At this time, regardless of whether the residual of the current power consumption data is positive or negative, due to the data fluctuation, corresponding trend adjustment cannot be accurately performed, so the initial autoregressive coefficient of the prediction model is retained for prediction. However, since the moving average coefficient of the prediction model is suitable for analyzing fluctuating data, at this time, the moving average coefficient is dynamically adjusted through the fluctuation characteristics of the data to reduce the error fluctuation and smooth the prediction result.
[0083] Therefore, based on the above adjustment strategy, the adjustment process is set as Figure 2 shown below:
[0084] First, determine whether the residual of the current power consumption data is 0. If it is 0, retain the initial autoregressive coefficient and the initial moving average coefficient of the ARIMA prediction model; if it is not 0, further determine the type of change trend of the current power consumption data. If the change trend type is a sharp increase or a sharp decrease, execute step S51 to adjust the initial autoregressive coefficient. If the change trend type is a fluctuating type, execute step S52 to adjust the initial moving average coefficient.
[0085] By this method of dynamically adjusting the parameters of the prediction model, it is possible to adjust the autoregressive coefficient or the moving average coefficient targeted according to the prediction error and the type of change trend of the current power consumption data, thereby enhancing the adaptability of the model to different change patterns such as sharp increases, sharp decreases, and fluctuations.
[0086] S51: Adjust the initial autoregressive coefficient.
[0087] Set the current moment as moment, and dynamically adjust the initial autoregressive coefficient of the prediction model based on the following formula:
[0088]
[0089] In the formula, is the autoregressive coefficient after adjustment of the prediction model at moment, is the initial autoregressive coefficient of the prediction model at moment, is the type of change trend of the power consumption data at , sharp increase type; , sharp decrease type; , fluctuating type; is the residual of the power consumption data at is the sign function. If , , if , , if , . is the normalization function, is the mean value of the absolute values of the residuals of all historical power consumption data at is the standard deviation of the absolute values of the residuals of all historical power consumption data at is a parameter to prevent the denominator from being 0, and the value is , is the absolute value symbol. Among them, the magnitude of the absolute value of the residual is used to reflect the magnitude of the prediction error.
[0090] In this formula, is the trend influence factor at time represented by which reflects the relative magnitudes of the prediction error of the current power consumption data and the prediction error (absolute value of the residual) of the historical power consumption data.
[0091] The specific adjustment logic of this formula is as follows:
[0092] When , the current power consumption data shows a sharp upward trend and the predicted value is lower than the actual value, indicating that the prediction model lags. If is larger, it means that the prediction error of the current power consumption data is larger relative to the prediction error of its historical power consumption data. Then is closer to 1, and is closer to 1. At this time, the increase amplitude of the autoregressive coefficient is larger. If is smaller, is closer to 0, and is closer to 0. At this time, the increase amplitude of the regression coefficient is smaller. Through this adjustment, the autoregressive coefficient is increased, making the prediction model respond faster, catch up with the upward trend faster, and reduce the lag error.
[0093] When , the current power consumption data shows a sharp upward trend and the predicted value is greater than the actual value, indicating that the prediction model is ahead. At this time , it has a reducing effect on the autoregressive coefficient , and the greater the prediction error of the current power consumption data, the greater the reduction amplitude. Through this adjustment, the autoregressive coefficient is decreased to avoid the prediction result being overly ahead and improve the tracking stability of the prediction model for the actual trend.
[0094] When , the current power consumption data shows a sharp downward trend and the predicted value is lower than the actual value, and the downward trend of the prediction model is too fast. At this time, , it has a reducing effect on the autoregressive coefficient , and the greater the prediction error of the current power consumption data, the greater the reduction amplitude. Through this adjustment, the autoregressive coefficient is decreased to slow down the response speed of the model to the downward trend, prevent the predicted value from being much lower than the actual value, and improve the prediction accuracy.
[0095] When , When the current power consumption data shows a sharp downward trend, and the predicted value is higher than the actual value, the downward trend of the prediction model is too slow and the response is lagged. At this time, it plays a role in increasing the autoregressive coefficient, and the greater the prediction error of the current power consumption data, the greater the increase amplitude. Through this adjustment, the autoregressive coefficient is increased to make the prediction model catch up with the actual downward trend faster.
[0096] By combining the change trend type of the power consumption data with the magnitude and direction of the prediction error, the autoregressive coefficient is dynamically adjusted to achieve intelligent control of the model response speed. When the prediction is lagged or advanced, the model can increase or decrease the autoregressive coefficient in a timely manner according to the actual trend, strengthen or weaken the dependence on the current data, so as to more accurately capture the sudden increase or decrease of energy consumption, improve the sensitivity and accuracy of the prediction, and enhance the adaptability of the model to energy consumption changes.
[0097] S52: Adjust the initial moving average coefficient.
[0098] Set the current time as time, and dynamically adjust the initial moving average coefficient of the prediction model based on the following formula:
[0099]
[0100] In the formula, is the adjusted initial moving average coefficient of the prediction model at time, is the initial moving average coefficient of the prediction model at time, is the standard deviation of the absolute value of the residual of the power consumption data of the first segment before the power consumption data at time, is the standard deviation of the absolute value of the residual of the power consumption data of the second segment before the power consumption data at
[0101] time. Similarly, the magnitude of the absolute value of the residual is used to reflect the magnitude of the prediction error. In this formula, is the variance of the prediction error of the power consumption data of the first segment before the power consumption data at time, is the variance of the prediction error of the power consumption data of the second segment before the power consumption data at is weakened, reducing the sensitivity of the prediction model to recent prediction errors, preventing the prediction model from overfitting recent error data, and enhancing stability. If indicates that the recent prediction error fluctuation of the current power consumption data tends to be stable, and the model stability increases. At this time , by increasing the moving average coefficient, enhancing the dependence on recent prediction errors, and improving the fitting ability of the prediction model to stable data.
[0102] By comparing the variance changes of recent and historical prediction error fluctuations, dynamically adjust the moving average coefficient to achieve adaptive adjustment of the model's sensitivity to error fluctuations. When the prediction error fluctuation increases, appropriately reduce the moving average coefficient to reduce the dependence on recent abnormal errors, prevent the model from overfitting noise, and enhance the stability of the prediction; while when the error fluctuation tends to be stable, increase the moving average coefficient to strengthen the response to stable errors, thereby achieving intelligent adaptation to the volatility of energy consumption data.
[0103] In summary, by combining the change trend type of the current power consumption data with the residual information, dynamically adjust the autoregressive coefficient and the moving average coefficient to achieve adaptive modeling for different data characteristics: when the residual is 0, keep the initial parameters of the model regardless of the change trend type; when the change trend type is a sharp rise / drop, use the residual direction and amplitude to adjust the autoregressive coefficient to strengthen the model's response ability to trend changes and reduce prediction lag or lead errors; when the trend is fluctuating, by analyzing the change of the residual standard deviation, dynamically adjust the moving average coefficient, thereby smoothing short-term error fluctuations and improving the stability and fitting ability of the model in a non-trend environment.
[0104] S6: Use the adjusted prediction model to accurately predict future power consumption data, and perform energy consumption anomaly monitoring based on the difference between the predicted value and the actual value.
[0105] In one embodiment, the energy consumption anomaly monitoring method is:
[0106] Use the prediction model with adjusted parameters to obtain the predicted value of the next power consumption data (the power consumption data at the next moment) of the current power consumption data , and at the same time obtain the actual value of the next power consumption data as ;
[0107] Calculate the relative error between the predicted value and the actual value of the next power consumption data:
[0108]
[0109] In the formula, is the relative error between the predicted value and the actual value of the power consumption data at time is the absolute value symbol.
[0110] Generally speaking, a relative error exceeding 10% - 15% can be regarded as abnormal. In the present invention, the relative error threshold is set at 10%. If the relative error between the predicted value and the actual value exceeds 10%, it is determined that the power consumption data is abnormal. If the relative error between the predicted value and the actual value does not exceed 10%, it is determined that the power consumption data is normal.
Claims
1. A real-time monitoring method for energy consumption data in an intelligent park, characterized in that Including: Collecting in real time the power consumption data of the smart park, and based on the historical power consumption data of each power consumption data, obtaining the predicted value of each power consumption data by using the ARIMA prediction model; Taking the power consumption data at any moment as the current power consumption data, detecting the mutation points of the historical power consumption data of the current power consumption data, and dividing the historical power consumption data into multiple segments according to the positions of the mutation points; Calculating respectively the cumulative change rate and the coefficient of variation of the power consumption data for each segment, determining the change trend index of each segment based on the cumulative change rate and the coefficient of variation, and determining the change trend type of each segment according to the change trend index; The coefficient of variation is the ratio of the standard deviation to the mean of the power consumption data of this segment; Based on the similarity between the current power consumption data and each segment, determining the change trend type of the current power consumption data; Dynamically adjusting the autoregressive coefficient and the moving average coefficient of the ARIMA prediction model according to the change trend type and the residual of the current power consumption data and the residual of the historical power consumption data; where the residual is the difference between the actual value and the predicted value; Based on the adjusted ARIMA model, predicting the predicted value of the next power consumption data of the current power consumption data, and performing energy consumption anomaly monitoring according to the difference between the predicted value and the actual value.
2. The real-time monitoring method for energy consumption data of an intelligent park according to claim 1, wherein, The process of dynamically adjusting the autoregressive coefficient and the moving average coefficient of the ARIMA prediction model is: Judging whether the prediction error of the current power consumption data is 0. If it is 0, retaining the initial autoregressive coefficient and the initial moving average coefficient of the ARIMA prediction model; if not, further judging the change trend type of the current power consumption data. If the change trend type is a sharp rise type or a sharp drop type, adjusting the initial autoregressive coefficient. If the change trend type is a fluctuating type, adjusting the initial moving average coefficient.
3. The real-time monitoring method for energy consumption data of an intelligent park according to claim 1, characterized in that, The similarity between the current power consumption data and each segment is determined based on the following method: Let the lengths of the segments of the current power consumption data be successively , until , where is the total number of segments; Starting from the current power consumption data, divide it forward in sequence from the back to the front according to the lengths of , until to obtain segments to be matched, and all segments and segments to be matched correspond based on length; Calculating the DTW distance between each segment to be matched and its corresponding segment, and taking the reciprocal of the DTW distance as the similarity between each segment to be matched and its corresponding segment.
4. The real-time monitoring method for energy consumption data of an intelligent park according to claim 1, characterized in that, The change trend type of each segment is determined by the quartile method based on the change trend indexes of all segments, including: When the change trend index of a certain segment is less than the first quartile of the change trend indexes of all segments, this segment is determined to be a sharp drop type; When the change trend index of a certain segment is greater than the third quartile of the change trend indexes of all segments, this segment is determined to be a sharp rise type; When the change trend index of a certain segment is greater than or equal to the first quartile and less than or equal to the third quartile, this segment is determined to be a fluctuating type.
5. The real-time monitoring method for energy consumption data of an intelligent park according to claim 1, characterized in that The method for detecting mutation points of the historical power consumption data of the current power consumption data is: Calculating the absolute value of the first-order difference value of every two adjacent power consumption data in the historical power consumption data to construct a first-order difference sequence; Set the dynamic threshold range as the mean of the first-order difference sequence 1.5 times the standard deviation, perform extreme point detection on the first-order difference sequence, identify the extreme points outside the dynamic threshold range as mutation points, and identify the extreme points within the dynamic threshold range as non-mutation points and eliminate them.
6. The real-time monitoring method for energy consumption data of an intelligent park according to claim 1, characterized in that The method for performing energy consumption anomaly monitoring according to the difference between the predicted value and the actual value is: Calculate the relative error between the predicted value and the actual value of the next power consumption data of the current power consumption data; if the relative error exceeds the preset relative error range, it is determined that the next power consumption data is abnormal; If the relative error does not exceed the preset relative error range, it is determined that the next power consumption data is not abnormal.
7. The real-time monitoring method for energy consumption data of an intelligent park according to claim 1, characterized in that, The change trend index of each segment is determined by the ratio of the cumulative change rate to the coefficient of variation of the power consumption data of that segment.
8. The real-time monitoring method for energy consumption data of an intelligent park according to claim 2, characterized in that, The adjustment of the initial autoregressive coefficient is based on the following formula: ; In the formula, For the prediction model The time-adjusted autoregressive coefficient, For the prediction model The initial autoregressive coefficient at time , for The changing trend type of power consumption data at each moment, for The residual of the power consumption data at the time, is a symbolic function, is the normalization function, for The mean of the absolute values of the residuals of all historical power consumption data at time , for The standard deviation of the absolute value of the residuals of all historical power consumption data at the time, To prevent the denominator from being 0, is the absolute value symbol.
9. The real-time monitoring method for energy consumption data of an intelligent park according to claim 2, characterized in that The adjustment of the initial moving average coefficient is based on the following formula: ; In the formula, is the initial moving average coefficient adjusted by the prediction model at time, is the initial moving average coefficient of the prediction model at time, is the standard deviation of the absolute value of the residual of the power consumption data of the first segment before the power consumption data at is the standard deviation of the absolute value of the residual of the power consumption data of the second segment before the power consumption data at 10. The real-time monitoring method for energy consumption data of an intelligent park according to claim 3, characterized in that The method for determining the change trend type of the current power consumption data is as follows: if the similarity between a segment to be matched and its corresponding segment is the largest, the change trend type of the corresponding segment is used as the change trend type of the current power consumption data.
Citation Information
Patent Citations
Industrial and commercial park electrical load power prediction method
CN119419797A
Energy demand forecasting system and energy demand forecasting method
JP2016220515A
Cited By
Park global energy consumption dynamic monitoring method and system
CN122219333A