An electric energy metering box electric load prediction method based on big data analysis

CN122716865APending Publication Date: 2026-09-08ZHONGDIAN HUAPIN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610862921.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-15
Publication Date
2026-09-08

AI Technical Summary

Technical Problem

一方面,历史负荷数据中相邻时刻、同一日内相同时段以及跨日相同时段对当前预测结果的影响不相同,传统模型往往将滞后数据统一输入,未能区分不同滞后片段的贡献差异

Benefits of technology

1、本发明将历史负荷数据划分为相邻滞后片段、日内滞后片段与跨日滞后片段,能够区分不同时间位置负荷数据对当前预测结果的影响,避免滞后数据统一输入造成的特征混杂。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122716865A_ABST
    Figure CN122716865A_ABST
Patent Text Reader

Abstract

The application discloses a kind of electric energy metering box electric load prediction method based on big data analysis, specifically includes: collection history load, environmental and electric behavior data form original data set;Form input sequence by alignment, cleaning, completion and unification;Extract historical load, external influence and feedback prediction features;Adjacent, intra-day, cross-day lag segment is divided, and gate weighted, and form gate lag input;Input NARX generates initial prediction;According to error contribution, update parameter group;Output target time load prediction value.The application improves the stability of prediction accuracy by lag segment gate and error grouping update.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power load forecasting, and in particular to a method for forecasting the power load of an electricity metering box based on big data analysis. Background Technology

[0002] Electricity metering boxes are crucial devices for collecting and managing electricity consumption data at the end of power distribution lines. Their load changes reflect user electricity consumption habits, environmental disturbances, and the operational status of distribution branches. As the number of electrical devices increases, the data collected by electricity metering boxes exhibits characteristics such as long time spans, numerous influencing factors, and complex fluctuation relationships. Relying solely on fixed-period statistics or single historical load curves makes it difficult to accurately depict the patterns of electricity consumption changes at different times.

[0003] Existing electricity load forecasting methods typically employ time series models, neural network models, or regression models. While these methods can generate load trend results using historical data, they still have shortcomings in practical applications. Firstly, the impact of adjacent times, the same time period within the same day, and the same time period across days on current forecast results varies in historical load data. Traditional models often input lagged data uniformly, failing to distinguish the differences in contribution from different lagged segments. Secondly, there is a coupling relationship between environmental data, user behavior data, and model feedback data. Without dynamic utilization of feedback forecasting characteristics, forecasting errors can easily accumulate during continuous forecasting.

[0004] Furthermore, existing neural network models mostly employ a synchronous update method for overall parameters during training and updates, making it difficult to determine whether the prediction error primarily originates from input weights, feedback weights, or the lag gating component. This leads to repeated adjustments of some irrelevant parameters, affecting model convergence efficiency and prediction stability. Therefore, there is an urgent need for a power load prediction method for electricity metering boxes that can uniformly process multi-source electricity consumption data, perform gating modulation on different lag segments, and selectively update parameters according to error contribution. Summary of the Invention

[0005] One objective of this invention is to propose a method for predicting the electricity load of electricity metering boxes based on big data analysis. This invention introduces a lag segment partitioning layer and an error contribution grouping update mechanism, performs gating modulation and feedback prediction calculations on historical load data, environmental data and user electricity consumption behavior data of electricity metering boxes, and constructs a continuously optimized electricity load prediction process, which has the advantages of high prediction accuracy, low error accumulation and strong model update targeting.

[0006] According to an embodiment of the present invention, a method for predicting the electricity load of an electricity metering box based on big data analysis includes the following steps: Historical load data, environmental data, and user electricity consumption behavior data from electricity metering boxes are collected to form a raw electricity consumption dataset. Time and location alignment, outlier removal, missing value imputation, and dimension unification are performed on the raw electricity consumption dataset to form a load forecast input sequence. Historical load sequences, external influence feature sequences, and feedback forecast feature sequences are extracted from the load forecast input sequence. A lag segment partitioning layer is established at the input of the NARX neural network to divide the historical load sequence into adjacent lag segments, intra-day lag segments, and cross-day lag segments. Gating coefficients are configured at corresponding positions of the three lag segments, lag segment weights are calculated, and the historical load sequence is modulated using these lag segment weights to form a gated lag input sequence. The gated lag input sequence, external influence feature sequence, and feedback forecast feature sequence are written into the NARX neural network, and nonlinear mapping calculations are performed to generate an initial load forecast sequence. The parameters of the NARX neural network are divided into input weight parameter group, feedback weight parameter group, and hysteresis gating parameter group. The prediction error value between the initial load prediction sequence and the actual load sequence is calculated. The prediction error value is allocated to the three parameter groups to generate error contribution values. The parameter groups that reach the preset contribution threshold are updated to form the updated NARX neural network. The target time location data is written into the updated NARX neural network, and gated hysteresis mapping, feedback mapping and linear output calculation are performed to obtain the predicted value of the electricity load of the electricity metering box.

[0007] Optionally, the historical load data, environmental data, and user electricity consumption behavior data of the electricity metering box specifically include: Read the active power, reactive power, current and voltage values ​​corresponding to the continuous time index position of the power meter box, perform sequence rearrangement calculation at a uniform time interval, and form a historical load data sequence. Read the temperature, humidity, precipitation, wind speed and light intensity values ​​corresponding to the time index position, perform time alignment calculation and dimension unification calculation on each environmental value to form an environmental data sequence; Read the switch operation identifier, electrical equipment start / stop identifier, electricity consumption period identifier and electricity consumption duration value corresponding to the user at the time index position, perform position matching calculation and encoding mapping calculation on each behavioral data to form a user electricity consumption behavior data sequence; Historical load data sequences, environmental data sequences, and user electricity consumption behavior data sequences are aligned and combined according to the same time index position to generate the original electricity consumption dataset.

[0008] Optionally, the extraction of historical load sequence, external influence feature sequence, and feedback prediction feature sequence from the load forecast input sequence includes the following steps: Read the active power, reactive power, current and voltage values ​​corresponding to each time index position in the load forecast input sequence, arrange them in time index order to form a historical load sequence; Read the temperature, humidity, precipitation, wind speed, light intensity, electricity consumption period, switch operation, and equipment start / stop indicators corresponding to each time index position in the load forecast input sequence, arrange them in time index order, and form an external influence feature sequence. Read the output value of the previous prediction position, the value of the previous prediction error, and the value of the previous feedback correction corresponding to each time index position in the load prediction input sequence, arrange them in time index order, and form a feedback prediction feature sequence.

[0009] Optionally, establishing a lag segmentation layer at the input of the NARX neural network specifically includes: A lag segmentation layer is set at the input of the NARX neural network to read the active power, reactive power, current and voltage values ​​corresponding to each time index position in the historical load sequence. Based on the current forecast time index position, the load values ​​corresponding to several consecutive sampling positions before the current forecast time index position are assigned to the adjacent lag segment, and the load values ​​corresponding to the same running segment within the same day within the current forecast time index position are assigned to the intra-day lag segment. Create segment numbers, start time indices, end time indices, and segment length values ​​for adjacent lagged segments, intraday lagged segments, and cross-day lagged segments respectively, forming a lagged segment index table; The lag segment index table is written into the input of the NARX neural network, and the historical load sequence enters the corresponding input channel according to the segment number.

[0010] Optionally, the calculation of the lag segment weights and the modulation of the historical load sequence using the lag segment weights to form the gated lag input sequence includes the following steps: Read the lag segment index table, extract the load value sequences corresponding to adjacent lag segments, intra-day lag segments, and cross-day lag segments respectively, and perform mean calculation, difference calculation, and change amplitude calculation on the active power value, reactive power value, current value, and voltage value in each lag segment to generate adjacent segment characteristic values, intra-day segment characteristic values, and cross-day segment characteristic values. Read the gating coefficients configured at the corresponding positions of the three lag segments, and multiply the feature values ​​of adjacent segments, intraday segments, and cross-day segments by the corresponding gating coefficients to generate adjacent gating scores, intraday gating scores, and cross-day gating scores. Exponential normalization is performed on the adjacent gating scores, intraday gating scores, and cross-day gating scores. The three gating scores are converted into adjacent lag segment weights, intraday lag segment weights, and cross-day lag segment weights. The sum of the three lag segment weights is one. According to the segment number recorded in the lagged segment index table, the weight of the adjacent lagged segment is written into the load value position of each adjacent lagged segment, the weight of the intraday lagged segment is written into the load value position of each intraday lagged segment, and the weight of the cross-day lagged segment is written into the load value position of each cross-day lagged segment. Perform product calculations on each load value and the corresponding lag segment weight to generate adjacent weighted load sequences, intraday weighted load sequences, and cross-day weighted load sequences; The adjacent weighted load sequences, intraday weighted load sequences, and cross-day weighted load sequences are sequentially concatenated according to the current forecast time index position to form a gated lag input sequence.

[0011] Optionally, generating the initial load prediction sequence specifically includes: The gated lag input sequence, external influence feature sequence, and feedback prediction feature sequence are aligned at the same time index position to form the NARX input vector sequence. Write the NARX input vector sequence into the input layer of the NARX neural network, perform weight mapping calculation on the input vector corresponding to each time index position, and generate an input mapping vector sequence; Write the output value of the previous prediction position, the value of the previous prediction error, and the value of the previous feedback correction in the feedback prediction feature sequence into the feedback connection layer, perform feedback weight mapping calculation, and generate a feedback mapping vector sequence. The input mapping vector sequence and the feedback mapping vector sequence are added position by position, and then written into the nonlinear activation layer to generate the hidden state vector sequence. The hidden state vector sequence is written into the output layer, and a linear mapping calculation is performed to generate the initial load prediction values ​​corresponding to each time index position. These values ​​are then arranged in time index order to form the initial load prediction sequence.

[0012] Optionally, dividing the NARX neural network parameters into input weight parameter groups, feedback weight parameter groups, and hysteresis gating parameter groups includes the following steps: Read the parameter identifiers of the input layer, feedback connection layer, lag segmentation layer, hidden layer and output layer of the NARX neural network, and establish a parameter identifier table. The parameter identifier table records the layer level of the parameter, the parameter connection object, the row and column position of the parameter matrix and the parameter value. Write the input layer connection parameters corresponding to the gated lag input sequence and the external influence feature sequence into the input weight parameter group. The input weight parameter group includes the connection weights corresponding to the gated lag input channel, the connection weights corresponding to the external influence feature channel, and the input layer bias parameters. Write the feedback connection parameters corresponding to the feedback prediction feature sequence into the feedback weight parameter group. The feedback weight parameter group includes the feedback weight corresponding to the output value of the previous prediction position, the feedback weight corresponding to the previous prediction error value, the feedback weight corresponding to the previous feedback correction value, and the feedback connection layer bias parameter. Write the gating coefficients corresponding to adjacent lag segments, intraday lag segments, and cross-day lag segments into the lag gating parameter group. The lag gating parameter group includes the gating coefficients of the three lag segments, the gating score normalization parameter, and the segment weight writing position parameter. The nonlinear mapping parameters connected to the input mapping vector sequence are assigned to the input weight parameter group, the nonlinear mapping parameters connected to the feedback mapping vector sequence are assigned to the feedback weight parameter group, and the parameters used in the linear mapping calculation process corresponding to the output layer are recorded according to the execution position of the parameter identifier table to form the output parameter set. According to the parameter identification table, the parameter numbers in the three parameter groups are checked. The same parameter number enters only one parameter group, forming the input weight parameter group, the feedback weight parameter group, and the hysteresis gating parameter group.

[0013] Optionally, the step of generating error contribution values ​​and updating parameters for parameter groups that reach a preset contribution threshold to form an updated NARX neural network specifically includes: Read the initial load forecast sequence and the actual load sequence, perform difference calculation at the same time index position, and generate a forecast error sequence; The parameter update channels corresponding to the input weight parameter group, the feedback weight parameter group, and the lag gating parameter group are respectively blocked, while the remaining parameter groups are allowed to participate in the calculation, thus obtaining the masked prediction error sequence corresponding to the three parameter groups. Perform difference calculation between each masking prediction error sequence and the prediction error sequence to obtain the error change value of the input weight parameter group, the error change value of the feedback weight parameter group, and the error change value of the hysteresis gating parameter group. Normalization calculations are performed on the three error change values ​​to generate the input weight error contribution value, the feedback weight error contribution value, and the hysteresis gating error contribution value. The three error contribution values ​​are compared with the preset contribution thresholds respectively. For the parameter group that reaches the preset contribution threshold, the corresponding gradient value and update step size value are read, and the parameter value is updated. For parameter sets that have not reached the preset contribution threshold, keep the original parameter values ​​unchanged, and write the updated parameter sets and the unupdated parameter sets back into the NARX neural network to form the updated NARX neural network.

[0014] The beneficial effects of this invention are: 1. This invention divides historical load data into adjacent lag segments, intraday lag segments, and cross-day lag segments, which can distinguish the impact of load data at different time locations on the current prediction results and avoid feature mixing caused by uniform input of lag data.

[0015] 2. This invention calculates the weight of the lag segment by gating coefficient and modulates the historical load sequence with the weight, so that the NARX neural network can give priority to load information that is more closely related to the target time position, thereby improving the accuracy of power load prediction.

[0016] 3. This invention simultaneously incorporates environmental data, user electricity consumption behavior data, and feedback prediction features, enabling the prediction process to comprehensively reflect meteorological changes, user operating habits, and historical prediction errors, thereby reducing the accumulation of errors in continuous prediction.

[0017] 4. This invention divides the NARX neural network parameters into input weight parameter group, feedback weight parameter group and lag gating parameter group, and selectively updates the parameters according to the error contribution value, reducing the adjustment of irrelevant parameters and improving the model update efficiency and prediction stability. Attached Figure Description

[0018] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Fig. 1 This is a flowchart of a method for predicting the electricity load of an electricity metering box based on big data analysis, as proposed in this invention. Fig. 2 This is a schematic diagram of the lag segment gating modulation process of the power load prediction method for power metering boxes based on big data analysis proposed in this invention. Fig. 3 This is a schematic diagram of the error contribution grouping and updating process of the power load prediction method for power metering boxes based on big data analysis proposed in this invention. Detailed Implementation

[0019] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0020] refer to Figs. 1-3 A method for predicting electricity load using an electricity metering box based on big data analysis includes the following steps: Historical load data, environmental data, and user electricity consumption behavior data from electricity metering boxes are collected to form a raw electricity consumption dataset. Time and location alignment, outlier removal, missing value imputation, and dimension unification are performed on the raw electricity consumption dataset to form a load forecast input sequence. Historical load sequences, external influence feature sequences, and feedback forecast feature sequences are extracted from the load forecast input sequence. A lag segment partitioning layer is established at the input of the NARX neural network to divide the historical load sequence into adjacent lag segments, intra-day lag segments, and cross-day lag segments. Gating coefficients are configured at corresponding positions of the three lag segments, lag segment weights are calculated, and the historical load sequence is modulated using these lag segment weights to form a gated lag input sequence. The gated lag input sequence, external influence feature sequence, and feedback forecast feature sequence are written into the NARX neural network, and nonlinear mapping calculations are performed to generate an initial load forecast sequence. The parameters of the NARX neural network are divided into input weight parameter group, feedback weight parameter group, and hysteresis gating parameter group. The prediction error value between the initial load prediction sequence and the actual load sequence is calculated. The prediction error value is allocated to the three parameter groups to generate error contribution values. The parameter groups that reach the preset contribution threshold are updated to form the updated NARX neural network. The target time location data is written into the updated NARX neural network, and gated hysteresis mapping, feedback mapping and linear output calculation are performed to obtain the predicted value of the electricity load of the electricity metering box.

[0021] In this embodiment, the historical load data, environmental data, and user electricity consumption behavior data of the electricity metering box specifically include: Read the active power, reactive power, current and voltage values ​​corresponding to the continuous time index position of the power meter box, perform sequence rearrangement calculation at a uniform time interval, and form a historical load data sequence. Read the temperature, humidity, precipitation, wind speed and light intensity values ​​corresponding to the time index position, perform time alignment calculation and dimension unification calculation on each environmental value to form an environmental data sequence; Read the switch operation identifier, electrical equipment start / stop identifier, electricity consumption period identifier and electricity consumption duration value corresponding to the user at the time index position, perform position matching calculation and encoding mapping calculation on each behavioral data to form a user electricity consumption behavior data sequence; Historical load data sequences, environmental data sequences, and user electricity consumption behavior data sequences are aligned and combined according to the same time index position to generate the original electricity consumption dataset.

[0022] Specifically, performing location matching and encoding mapping calculations on each behavioral data point to form a user electricity consumption behavior data sequence includes: Data related to electricity consumption behavior is collected from various user terminal devices. This behavioral data includes regional electricity activity, terminal device operation frequency, and load response records. Each type of data has a corresponding timestamp, forming a multi-dimensional time series together with other electricity data (such as active power and reactive power). Because the behavioral data comes from diverse sources, the collected timestamps may differ from other electricity data. Therefore, location matching calculations are needed to ensure that the behavioral data at each time point is aligned with the corresponding other electricity data. A unified time index is used to eliminate errors that may arise from different sampling times.

[0023] Each type of behavioral data is converted into a specific encoding format. For example, the activity level of a user's electricity consumption can be represented by numerical codes to indicate different levels of electricity intensity, while the frequency of terminal operations can be quantified by the number of occurrences. This encoded data helps the model understand and uncover the patterns in user behavior, forming a sequence containing all user behavior data.

[0024] In this embodiment, extracting historical load sequences, external influence feature sequences, and feedback prediction feature sequences from load forecasting input sequences includes the following steps: Read the active power, reactive power, current and voltage values ​​corresponding to each time index position in the load forecast input sequence, arrange them in time index order to form a historical load sequence; Read the temperature, humidity, precipitation, wind speed, light intensity, electricity consumption period, switch operation, and equipment start / stop indicators corresponding to each time index position in the load forecast input sequence, arrange them in time index order, and form an external influence feature sequence. Read the output value of the previous prediction position, the value of the previous prediction error, and the value of the previous feedback correction corresponding to each time index position in the load prediction input sequence, arrange them in time index order, and form a feedback prediction feature sequence.

[0025] In this embodiment, establishing a hysteresis segmentation layer at the input of the NARX neural network specifically includes: A lag segmentation layer is set at the input of the NARX neural network to read the active power, reactive power, current and voltage values ​​corresponding to each time index position in the historical load sequence. Based on the current forecast time index position, the load values ​​corresponding to several consecutive sampling positions before the current forecast time index position are assigned to the adjacent lag segment, and the load values ​​corresponding to the same running segment within the same day within the current forecast time index position are assigned to the intra-day lag segment. Create segment numbers, start time indices, end time indices, and segment length values ​​for adjacent lagged segments, intraday lagged segments, and cross-day lagged segments respectively, forming a lagged segment index table; The lag segment index table is written into the input of the NARX neural network, and the historical load sequence enters the corresponding input channel according to the segment number.

[0026] In this embodiment, calculating the lag segment weights and using the lag segment weights to modulate the historical load sequence to form a gated lag input sequence includes the following steps: Read the lag segment index table, extract the load value sequences corresponding to adjacent lag segments, intra-day lag segments, and cross-day lag segments respectively, and perform mean calculation, difference calculation, and change amplitude calculation on the active power value, reactive power value, current value, and voltage value in each lag segment to generate adjacent segment characteristic values, intra-day segment characteristic values, and cross-day segment characteristic values. Read the gating coefficients configured at the corresponding positions of the three lag segments, and multiply the feature values ​​of adjacent segments, intraday segments, and cross-day segments by the corresponding gating coefficients to generate adjacent gating scores, intraday gating scores, and cross-day gating scores. Exponential normalization is performed on the adjacent gating scores, intraday gating scores, and cross-day gating scores. The three gating scores are converted into adjacent lag segment weights, intraday lag segment weights, and cross-day lag segment weights. The sum of the three lag segment weights is one. According to the segment number recorded in the lagged segment index table, the weight of the adjacent lagged segment is written into the load value position of each adjacent lagged segment, the weight of the intraday lagged segment is written into the load value position of each intraday lagged segment, and the weight of the cross-day lagged segment is written into the load value position of each cross-day lagged segment. Perform product calculations on each load value and the corresponding lag segment weight to generate adjacent weighted load sequences, intraday weighted load sequences, and cross-day weighted load sequences; The adjacent weighted load sequences, intraday weighted load sequences, and cross-day weighted load sequences are sequentially concatenated according to the current forecast time index position to form a gated lag input sequence.

[0027] In this embodiment, generating the initial load prediction sequence specifically includes: The gated lag input sequence, external influence feature sequence, and feedback prediction feature sequence are aligned at the same time index position to form the NARX input vector sequence. Write the NARX input vector sequence into the input layer of the NARX neural network, perform weight mapping calculation on the input vector corresponding to each time index position, and generate an input mapping vector sequence; Write the output value of the previous prediction position, the value of the previous prediction error, and the value of the previous feedback correction in the feedback prediction feature sequence into the feedback connection layer, perform feedback weight mapping calculation, and generate a feedback mapping vector sequence. The input mapping vector sequence and the feedback mapping vector sequence are added position by position, and then written into the nonlinear activation layer to generate the hidden state vector sequence. The hidden state vector sequence is written into the output layer, and a linear mapping calculation is performed to generate the initial load prediction values ​​corresponding to each time index position. These values ​​are then arranged in time index order to form the initial load prediction sequence.

[0028] Specifically, the input vectors corresponding to each time index position undergo weight mapping calculation to generate an input mapping vector sequence, including: Read the input vector at each time point. This vector contains multiple features, such as active power, reactive power, current, voltage, meteorological data, and behavioral data. Each feature value, together with other features, forms a complete description of that time point. For each feature, it is adjusted according to the pre-learned weight value. The weight of each feature reflects the importance of the feature in power load forecasting. The weight value is determined during the training process and is used to adjust the influence of each feature in the input vector. Each feature value is multiplied by its corresponding weight value to obtain a weighted value. All weighted feature values ​​are summed together to generate a new value, which is the mapped result. This processed input vector better meets the needs of the prediction task, thus making subsequent predictions more accurate. Finally, these mapped input vectors are arranged in chronological order to form an input-mapped vector sequence.

[0029] Specifically, the process of performing feedback weight mapping calculation and generating a feedback mapping vector sequence includes: Read the feedback data at each time point. This feedback data typically includes system response information, such as forecast error, load adjustment feedback, and demand response. This feedback data provides feedback information about the system's operating status at each time point. Each feedback data point is processed according to a pre-determined feedback weight. The feedback weights are obtained through training and reflect the degree of influence of different feedback data on system performance. For each time point of the feedback data, it is multiplied by the corresponding feedback weight to obtain the weighted feedback data value. All weighted feedback data values ​​are merged to generate feedback mapping vectors. These merged data reflect the system's feedback information at each time point. Through weight mapping calculation, the appropriate influence of each feedback information in subsequent calculations is ensured. Finally, all generated feedback mapping vectors are arranged in chronological order to form a feedback mapping vector sequence for further model calculations and predictions.

[0030] In this embodiment, dividing the NARX neural network parameters into an input weight parameter group, a feedback weight parameter group, and a hysteresis gating parameter group includes the following steps: Read the parameter identifiers of the input layer, feedback connection layer, lag segmentation layer, hidden layer and output layer of the NARX neural network, and establish a parameter identifier table. The parameter identifier table records the layer level of the parameter, the parameter connection object, the row and column position of the parameter matrix and the parameter value. Write the input layer connection parameters corresponding to the gated lag input sequence and the external influence feature sequence into the input weight parameter group. The input weight parameter group includes the connection weights corresponding to the gated lag input channel, the connection weights corresponding to the external influence feature channel, and the input layer bias parameters. Write the feedback connection parameters corresponding to the feedback prediction feature sequence into the feedback weight parameter group. The feedback weight parameter group includes the feedback weight corresponding to the output value of the previous prediction position, the feedback weight corresponding to the previous prediction error value, the feedback weight corresponding to the previous feedback correction value, and the feedback connection layer bias parameter. Write the gating coefficients corresponding to adjacent lag segments, intraday lag segments, and cross-day lag segments into the lag gating parameter group. The lag gating parameter group includes the gating coefficients of the three lag segments, the gating score normalization parameter, and the segment weight writing position parameter. The nonlinear mapping parameters connected to the input mapping vector sequence are assigned to the input weight parameter group, the nonlinear mapping parameters connected to the feedback mapping vector sequence are assigned to the feedback weight parameter group, and the parameters used in the linear mapping calculation process corresponding to the output layer are recorded according to the execution position of the parameter identifier table to form the output parameter set. According to the parameter identification table, the parameter numbers in the three parameter groups are checked. The same parameter number enters only one parameter group, forming the input weight parameter group, the feedback weight parameter group, and the hysteresis gating parameter group.

[0031] In this embodiment, generating error contribution values ​​and updating parameters for parameter groups that reach a preset contribution threshold to form the updated NARX neural network specifically includes: Read the initial load forecast sequence and the actual load sequence, perform difference calculation at the same time index position, and generate a forecast error sequence; The parameter update channels corresponding to the input weight parameter group, the feedback weight parameter group, and the lag gating parameter group are respectively blocked, while the remaining parameter groups are allowed to participate in the calculation, thus obtaining the masked prediction error sequence corresponding to the three parameter groups. Perform difference calculation between each masking prediction error sequence and the prediction error sequence to obtain the error change value of the input weight parameter group, the error change value of the feedback weight parameter group, and the error change value of the hysteresis gating parameter group. Normalization calculations are performed on the three error change values ​​to generate the input weight error contribution value, the feedback weight error contribution value, and the hysteresis gating error contribution value. The three error contribution values ​​are compared with the preset contribution thresholds respectively. For the parameter group that reaches the preset contribution threshold, the corresponding gradient value and update step size value are read, and the parameter value is updated. For parameter sets that have not reached the preset contribution threshold, keep the original parameter values ​​unchanged, and write the updated parameter sets and the unupdated parameter sets back into the NARX neural network to form the updated NARX neural network.

[0032] Specifically, for parameter groups that have reached a preset contribution threshold, the corresponding gradient values ​​and update step size values ​​are read, and parameter value updates are performed, including: Identify which parameter groups have reached a preset threshold in terms of contribution. Contribution is usually determined by calculating the error or deviation between the parameter and the target output; when the contribution of a parameter group exceeds the preset threshold, it indicates that the parameter has a significant impact on the model's prediction process and needs to be updated. Next, for these parameter sets that have reached the threshold, the corresponding gradient values ​​and update step sizes are read. The gradient values ​​are usually calculated using the backpropagation algorithm and represent the rate of change of the current parameter in the adjusted loss. The update step size represents the magnitude of each adjustment, which is usually dynamically calculated based on the learning rate or adaptive optimization strategy during training, with the aim of controlling the magnitude of each update. Then, based on the gradient value and the update step size, the parameter values ​​are updated. Specifically, the parameter updates are performed using the following formula: New parameter value = Current parameter value - (Gradient value * Update step size). In this way, the parameters are adjusted in the direction of reducing error with each update, thereby improving the model's predictive ability. The updated parameter values ​​will replace the original values ​​and continue to be used in subsequent calculations. Through multiple iterations, the model is gradually optimized to obtain more accurate prediction results.

[0033] Example 1: To verify the feasibility of this invention in practice, it was applied to a typical power distribution terminal's load prediction scenario for an energy metering box. This scenario presents challenges such as frequent load fluctuations, significant changes in electricity consumption behavior, and complex environmental factors. Traditional methods are prone to error accumulation during continuous prediction, leading to prediction results that deviate from actual electricity consumption and impacting scheduling and management effectiveness. In this scenario, historical load data from the energy metering box, environmental data, and user electricity consumption behavior data under a continuous time index are collected. The data undergoes time alignment, anomaly removal, missing data completion, and dimensional unification to form a stable input sequence. Based on this, the load data is divided into adjacent lag segments, intra-day lag segments, and cross-day lag segments. Different segments are weighted using a gating coefficient, giving higher weight to data more closely related to the current prediction time. Subsequently, the gated lag input sequence, along with environmental features and feedback prediction features, is input into a NARX neural network for mapping calculation to obtain the initial prediction result. Furthermore, during the model update process, the network parameters are divided into input weight parameter groups, feedback weight parameter groups, and lag gating parameter groups. Updates are performed in groups based on the contribution of the prediction error to each parameter group, prioritizing the adjustment of parameters that primarily affect the prediction error. This avoids interference from repeated updates of irrelevant parameters and improves model stability. To visually demonstrate the effectiveness of this invention, the prediction results of the traditional unified lag input method and the method of this invention are compared under the same data conditions, resulting in the following data table.

[0034] Table 1: Comparison of Load Forecasting Results

[0035] As shown in Table 1, under the same data scale and training conditions, the average absolute error of the traditional method is 5.62, while that of the method of this invention is reduced to 3.18, a decrease of 43.4%; the mean squared error is reduced from 42.15 to 18.72, a decrease of 55.6%, indicating a significant reduction in overall prediction bias. Regarding the maximum error, the traditional method reaches 12.84, while the method of this invention controls it within 7.46, reducing the peak error by 5.38, which has a significant advantage for predictions at moments of sudden load changes. In terms of model convergence speed, the traditional method requires approximately 120 iterations to stabilize, while the method of this invention, through a grouped parameter update mechanism, only requires 75 iterations to reach a stable state, improving training efficiency by approximately 37.5%. Regarding the stable error range, the traditional method fluctuates within ±6.5, while the method of this invention reduces this range to ±3.2, a reduction of over 50%, indicating more stable prediction results. Further analysis reveals that the lag segment gating mechanism allows for differentiated utilization of adjacent data, intraday pattern data, and cross-day pattern data. Specifically, adjacent segments contribute approximately 28% more to short-term changes, intraday segments contribute approximately 35% more to periodic features, and cross-day segments contribute approximately 22% more to trend stability. Simultaneously, the error contribution grouping update mechanism results in an update ratio of approximately 46% for the input weight parameter group, 31% for the feedback weight parameter group, and 23% for the lag-gated parameter group, avoiding the problem of indiscriminate parameter updates in traditional methods. In summary, this invention demonstrates significant advantages in prediction accuracy, stability, and training efficiency, effectively addressing the issues of error accumulation and low parameter update efficiency in existing methods.

[0036] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for predicting electricity load in an electricity metering box based on big data analysis, characterized in that, Includes the following steps: Historical load data, environmental data, and user electricity consumption behavior data from electricity metering boxes are collected to form a raw electricity consumption dataset. Time and location alignment, outlier removal, missing value imputation, and dimension unification are performed on the raw electricity consumption dataset to form a load forecast input sequence. Historical load sequences, external influence feature sequences, and feedback forecast feature sequences are extracted from the load forecast input sequence. A lag segment partitioning layer is established at the input of the NARX neural network to divide the historical load sequence into adjacent lag segments, intra-day lag segments, and cross-day lag segments. Gating coefficients are configured at corresponding positions of the three lag segments, lag segment weights are calculated, and the historical load sequence is modulated using these lag segment weights to form a gated lag input sequence. The gated lag input sequence, external influence feature sequence, and feedback forecast feature sequence are written into the NARX neural network, and nonlinear mapping calculations are performed to generate an initial load forecast sequence. The parameters of the NARX neural network are divided into input weight parameter group, feedback weight parameter group, and hysteresis gating parameter group. The prediction error value between the initial load prediction sequence and the actual load sequence is calculated. The prediction error value is allocated to the three parameter groups to generate error contribution values. The parameter groups that reach the preset contribution threshold are updated to form the updated NARX neural network. The target time location data is written into the updated NARX neural network, and gated hysteresis mapping, feedback mapping and linear output calculation are performed to obtain the predicted value of the electricity load of the electricity metering box.

2. The method for predicting electricity load in an electricity metering box based on big data analysis according to claim 1, characterized in that, The historical load data, environmental data, and user electricity consumption behavior data of the electricity metering box specifically include: Read the active power, reactive power, current and voltage values ​​corresponding to the continuous time index position of the power meter box, perform sequence rearrangement calculation at a uniform time interval, and form a historical load data sequence. Read the temperature, humidity, precipitation, wind speed and light intensity values ​​corresponding to the time index position, perform time alignment calculation and dimension unification calculation on each environmental value to form an environmental data sequence; Read the switch operation identifier, electrical equipment start / stop identifier, electricity consumption period identifier and electricity consumption duration value corresponding to the user at the time index position, perform position matching calculation and encoding mapping calculation on each behavioral data to form a user electricity consumption behavior data sequence; Historical load data sequences, environmental data sequences, and user electricity consumption behavior data sequences are aligned and combined according to the same time index position to generate the original electricity consumption dataset.

3. The method for predicting electricity load in an electricity metering box based on big data analysis according to claim 2, characterized in that, The process of extracting historical load sequences, external influence feature sequences, and feedback prediction feature sequences from load forecast input sequences includes the following steps: Read the active power, reactive power, current and voltage values ​​corresponding to each time index position in the load forecast input sequence, arrange them in time index order to form a historical load sequence; Read the temperature, humidity, precipitation, wind speed, light intensity, electricity consumption period, switch operation, and equipment start / stop indicators corresponding to each time index position in the load forecast input sequence, arrange them in time index order, and form an external influence feature sequence. Read the output value of the previous prediction position, the value of the previous prediction error, and the value of the previous feedback correction corresponding to each time index position in the load prediction input sequence, arrange them in time index order, and form a feedback prediction feature sequence.

4. The method for predicting electricity load in an energy metering box based on big data analysis according to claim 3, characterized in that, The establishment of a hysteresis segmentation layer at the input of the NARX neural network specifically includes: A lag segmentation layer is set at the input of the NARX neural network to read the active power, reactive power, current and voltage values ​​corresponding to each time index position in the historical load sequence. Based on the current forecast time index position, the load values ​​corresponding to several consecutive sampling positions before the current forecast time index position are assigned to the adjacent lag segment, and the load values ​​corresponding to the same running segment within the same day within the current forecast time index position are assigned to the intra-day lag segment. Create segment numbers, start time indices, end time indices, and segment length values ​​for adjacent lagged segments, intraday lagged segments, and cross-day lagged segments respectively, forming a lagged segment index table; The lag segment index table is written into the input of the NARX neural network, and the historical load sequence enters the corresponding input channel according to the segment number.

5. The method for predicting electricity load in an electricity metering box based on big data analysis according to claim 4, characterized in that, The calculation of lag segment weights and the modulation of historical load sequences using these lag segment weights to form gated lag input sequences include the following steps: Read the lag segment index table, extract the load value sequences corresponding to adjacent lag segments, intra-day lag segments, and cross-day lag segments respectively, and perform mean calculation, difference calculation, and change amplitude calculation on the active power value, reactive power value, current value, and voltage value in each lag segment to generate adjacent segment characteristic values, intra-day segment characteristic values, and cross-day segment characteristic values. Read the gating coefficients configured at the corresponding positions of the three lag segments, and multiply the feature values ​​of adjacent segments, intraday segments, and cross-day segments by the corresponding gating coefficients to generate adjacent gating scores, intraday gating scores, and cross-day gating scores. Exponential normalization is performed on the adjacent gating scores, intraday gating scores, and cross-day gating scores. The three gating scores are converted into adjacent lag segment weights, intraday lag segment weights, and cross-day lag segment weights. The sum of the three lag segment weights is one. According to the segment number recorded in the lagged segment index table, the weight of the adjacent lagged segment is written into the load value position of each adjacent lagged segment, the weight of the intraday lagged segment is written into the load value position of each intraday lagged segment, and the weight of the cross-day lagged segment is written into the load value position of each cross-day lagged segment. Perform product calculations on each load value and the corresponding lag segment weight to generate adjacent weighted load sequences, intraday weighted load sequences, and cross-day weighted load sequences; The adjacent weighted load sequences, intraday weighted load sequences, and cross-day weighted load sequences are sequentially concatenated according to the current forecast time index position to form a gated lag input sequence.

6. The method for predicting electricity load in an electricity metering box based on big data analysis according to claim 5, characterized in that, The generation of the initial load prediction sequence specifically includes: The gated lag input sequence, external influence feature sequence, and feedback prediction feature sequence are aligned at the same time index position to form the NARX input vector sequence. Write the NARX input vector sequence into the input layer of the NARX neural network, perform weight mapping calculation on the input vector corresponding to each time index position, and generate an input mapping vector sequence; Write the output value of the previous prediction position, the value of the previous prediction error, and the value of the previous feedback correction in the feedback prediction feature sequence into the feedback connection layer, perform feedback weight mapping calculation, and generate a feedback mapping vector sequence. The input mapping vector sequence and the feedback mapping vector sequence are added position by position, and then written into the nonlinear activation layer to generate the hidden state vector sequence. The hidden state vector sequence is written into the output layer, and a linear mapping calculation is performed to generate the initial load prediction values ​​corresponding to each time index position. These values ​​are then arranged in time index order to form the initial load prediction sequence.

7. The method for predicting electricity load in an electricity metering box based on big data analysis according to claim 6, characterized in that, The step of dividing the NARX neural network parameters into input weight parameter group, feedback weight parameter group, and hysteresis gating parameter group includes the following steps: Read the parameter identifiers of the input layer, feedback connection layer, lag segmentation layer, hidden layer and output layer of the NARX neural network, and establish a parameter identifier table. The parameter identifier table records the layer level of the parameter, the parameter connection object, the row and column position of the parameter matrix and the parameter value. Write the input layer connection parameters corresponding to the gated lag input sequence and the external influence feature sequence into the input weight parameter group. The input weight parameter group includes the connection weights corresponding to the gated lag input channel, the connection weights corresponding to the external influence feature channel, and the input layer bias parameters. Write the feedback connection parameters corresponding to the feedback prediction feature sequence into the feedback weight parameter group. The feedback weight parameter group includes the feedback weight corresponding to the output value of the previous prediction position, the feedback weight corresponding to the previous prediction error value, the feedback weight corresponding to the previous feedback correction value, and the feedback connection layer bias parameter. Write the gating coefficients corresponding to adjacent lag segments, intraday lag segments, and cross-day lag segments into the lag gating parameter group. The lag gating parameter group includes the gating coefficients of the three lag segments, the gating score normalization parameter, and the segment weight writing position parameter. The nonlinear mapping parameters connected to the input mapping vector sequence are assigned to the input weight parameter group, the nonlinear mapping parameters connected to the feedback mapping vector sequence are assigned to the feedback weight parameter group, and the parameters used in the linear mapping calculation process corresponding to the output layer are recorded according to the execution position of the parameter identifier table to form the output parameter set. According to the parameter identification table, check the parameter numbers in the three parameter groups. The same parameter number enters only one parameter group, forming the input weight parameter group, the feedback weight parameter group, and the hysteresis gating parameter group.

8. The method for predicting electricity load in an electricity metering box based on big data analysis according to claim 7, characterized in that, The process of generating error contribution values ​​and updating parameters for parameter groups that reach a preset contribution threshold to form the updated NARX neural network specifically includes: Read the initial load forecast sequence and the actual load sequence, perform difference calculation at the same time index position, and generate a forecast error sequence; The parameter update channels corresponding to the input weight parameter group, the feedback weight parameter group, and the lag gating parameter group are respectively blocked, while the remaining parameter groups are allowed to participate in the calculation, thus obtaining the masked prediction error sequence corresponding to the three parameter groups. Perform difference calculation between each masking prediction error sequence and the prediction error sequence to obtain the error change value of the input weight parameter group, the error change value of the feedback weight parameter group, and the error change value of the hysteresis gating parameter group. Normalization calculations are performed on the three error change values ​​to generate the input weight error contribution value, the feedback weight error contribution value, and the hysteresis gating error contribution value. The three error contribution values ​​are compared with the preset contribution thresholds respectively. For the parameter group that reaches the preset contribution threshold, the corresponding gradient value and update step size value are read, and the parameter value is updated. For parameter sets that have not reached the preset contribution threshold, keep the original parameter values ​​unchanged, and write the updated parameter sets and the unupdated parameter sets back into the NARX neural network to form the updated NARX neural network.