Mathematical model-based electric charge prediction, correction and automatic clearing method and system
An automatic settlement method using a mathematical model addresses errors in manual electricity fee settlement by collecting and cleaning data, predicting, and optimizing models to enhance accuracy and adaptability, improving operational efficiency and power system management.
Patent Information
- Application Number
- CN202411041854.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2025-01-03
AI Technical Summary
Manual electricity fee settlement processes are prone to errors due to data collection inefficiencies, manual data entry mistakes, and lack of data analysis, leading to inaccurate billing and complex error management, which affects the accuracy and real-time nature of electricity bill management.
An automatic settlement method using a mathematical model that collects and cleans electricity-related data, constructs a prediction model, compares predicted values with actual values for anomaly detection, and optimizes the model to correct errors, incorporating factors like time variation, weather, and user type to enhance accuracy.
The method improves prediction accuracy by continuously optimizing model parameters, adaptively handling anomalies, and providing timely, accurate electricity bill information, enhancing operational efficiency and sustainable power system management.
Smart Images

Figure CN119250250A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of digital forecasting and settlement, and in particular to an automatic settlement method and system for electricity fee forecasting and correction based on a mathematical model. Background Art
[0002] Electricity fee management is the core business of power companies, including the quantity, price, and fees of power users and power generation companies. Conducting electricity fee accounting and review is the key to ensuring the accuracy of electricity fee calculations for power users, and accurately calculating and quickly recovering electricity fees. Inspections, audits, policy refunds, electricity inspections, inspections, and after the issuance of electricity fees, it is discovered that the electricity fee and electricity quantity are incorrect due to system or human reasons (metering failures, file errors, operating mode adjustments, business process errors, high-energy consumption refunds, collection, and electricity price execution). It is necessary to initiate an error refund application, settle the correct electricity fee and electricity quantity, and complete the refund of electricity fee and electricity quantity. Currently, manual settlement is used, and the following problems exist in the settlement process:
[0003] Data collection time and labor consumption: Manual settlement requires searching for various electricity prices and policy documents. The monthly proxy purchase price for industrial, commercial and other electricity users is different. The calculation is based on the market attribute classification of the user, electricity category, basic electricity fee calculation method, power factor assessment method, time-of-use billing mark, and preferential policies. Each type of electricity consumption is composed of different electricity prices, some of which are single-part systems, some are two-part systems, and are priced separately according to different voltage levels. The verification of quantity, price and fee is large and prone to errors and omissions.
[0004] Manual data entry is prone to errors: data entry errors, calculation formula errors, etc. These errors may lead to inaccurate user's entire electricity bill, increasing the complexity and risk of error management.
[0005] Lack of data analysis and reporting functions: It is difficult to conduct accurate data analysis and produce detailed reports, and it is impossible to understand the stock status trend of electricity bill errors, which affects the accuracy and real-time nature of electricity bill error statistics. It limits the comprehensive understanding of errors and decision support. Lack of integration and inability to integrate systems increase the complexity of work and the possibility of errors. Summary of the invention
[0006] In view of the problems existing in the existing automatic settlement method for electricity fee forecast correction based on mathematical models, the present invention is proposed.
[0007] Therefore, the problem to be solved by the present invention is.
[0008] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0009] In the first aspect, an embodiment of the present invention provides an automatic settlement method for electricity charge forecast correction based on a mathematical model, which includes collecting electricity charge related data, constructing a data set, and performing data cleaning on the data set to ensure data integrity; constructing a prediction model based on the data set after data cleaning, and predicting and calculating electricity charges through the prediction model; comparing the output prediction value with the actual value, performing anomaly detection and processing on the prediction model, optimizing the prediction model, obtaining the cause of the error, filling the error value, and settling the relevant electricity charges.
[0010] As a preferred solution of the automatic settlement method for electricity fee forecast correction based on mathematical model described in the present invention, the collected electricity fee related data includes electricity consumption data, electricity fee pricing data, meteorological data, social data and holiday information data.
[0011] As a preferred solution of the automatic liquidation method for electricity fee forecast correction based on mathematical model described in the present invention, wherein: the data cleaning is processed by identifying missing value patterns, and the identified missing value patterns include setting primary missing, secondary missing and tertiary missing; if it is primary missing, it is filled with mean, median or mode; if it is secondary missing, it is supplemented by advanced interpolation method; if it is tertiary missing, it is filled with prediction model based on machine learning; the data cleaning is also processed by deleting records containing missing values; further identifying and deleting completely duplicate records, and cleaning user information text data; using cross-validation to evaluate the effect of data cleaning to ensure that the preprocessed data still maintains the original statistical characteristics; recording all data cleaning steps to ensure repeatability, and using version control system to manage different versions of data sets.
[0012] As a preferred solution of the automatic settlement method for electricity fee prediction and correction based on mathematical model described in the present invention, the prediction model combines the time variation factor and the nonlinear influence of different weather on electricity fee, which is expressed as:
[0013]
[0014] Among them, E is the predicted electricity fee amount, T is the total duration of the calculation cycle, n is the number of user types, C i (t) is the electricity consumption function of the i-th user at time t, P i (t) is the electricity price function of the i-th user at time t, α(t) is the adjustment coefficient function, β is the sensitivity parameter, m is the number of weather factors, W j is the weight of the jth weather factor, H j is the actual value of the jth weather factor, γ is the normalized parameter of weather impact, λ is the historical error impact coefficient, l is the number of error types, and D k is the weight of the kth error type, F kis the frequency of the kth error type, and δ is the error impact normalization parameter.
[0015] As a preferred solution of the automatic settlement method for electricity fee forecasting and correction based on mathematical model described in the present invention, the electricity consumption function C i (t) Combined with the daily power consumption fluctuation and the impact of temperature on power consumption, an exponential function is used to simulate the temperature effect, which is expressed as:
[0016]
[0017] Among them, B i is the basic electricity consumption of the i-th category user, A i is the daily cycle fluctuation range, Q i is the temperature sensitivity coefficient of electricity consumption of the i-th type of user, T(t) is the ambient temperature at time t, T0 is the reference temperature, and R is the gas constant; the electricity price function P i (t) Combining load pricing and peak-valley pricing, the hyperbolic tangent function and inverse tangent function are used to simulate nonlinear price changes, which can be expressed as:
[0018]
[0019] Among them, P base,i is the basic electricity price for the i-th category user, ε i is the load sensitivity coefficient, L(t) is the grid load at time t, L avg , L max and L min are the average, maximum and minimum grid loads, respectively, and η i is the peak-to-valley price difference coefficient, ω is the peak-to-valley price change rate, t peak is the peak electricity price time; the adjustment coefficient function α(t) combines the annual periodic changes and the impact of sudden policies, and uses the sine function and the Sigmoid function for simulation, which is expressed as:
[0020]
[0021] Among them, κ is the annual price fluctuation range, φ is the annual price fluctuation phase, σ is the policy impact rate, t policy The policy takes effect time.
[0022] As a preferred solution of the automatic settlement method for electricity fee forecast correction based on mathematical model described in the present invention, a finer-grained time feature is introduced based on the adjustment coefficient function to create a periodic feature, which is expressed as:
[0023]
[0024] Among them, TF is the time characteristic index, i represents the week number, which is an integer from 1 to 7; δi Indicator function indicating whether the i-th day is a working day, M j is the monthly factor for the jth month, S j is the seasonal index for the jth month; annual periodic changes are adjusted to weekly periodic changes using sin and cos functions to capture periodic patterns and using δ i The function distinguishes different electricity consumption patterns on weekdays and weekends; at the same time, combined with seasonal changes, S j Capture seasonal electricity usage patterns such as heating in winter and cooling in summer.
[0025] As a preferred solution of the automatic settlement method for electricity fee forecast correction based on mathematical model described in the present invention, the optimization of the forecast model includes obtaining the error value by comparing the obtained forecast value with the historical actual value, analyzing the cause of the error, and if the error value increases in a specific season, establishing a separate sub-model for different seasons or enhancing the weight of seasonal characteristics, and adjusting the seasonal index in the time feature formula (TF); if high temperature weather occurs simultaneously, constructing multi-dimensional threshold monitoring, including: if it is high temperature weather in summer, it is marked as a special high-load day, establishing a special sub-model, and giving a higher weight in the forecast; if the seasonal impact is greater than the trend impact and the residual is greater than twice the historical residual, the seasonal model is re-evaluated and a new seasonal pattern is introduced; if the interaction term of temperature and humidity is greater than the m% quantile of the historical data and the working day sign is 1, that is, it is represented as a working day, then the triple interaction term of temperature-humidity-working day is introduced into the model, and the decision tree model is used to automatically capture the feature interaction.
[0026] In the second aspect, an embodiment of the present invention provides an automatic settlement system for electricity bill prediction and correction based on a mathematical model, which includes: a collection module, used to collect electricity bill related data, construct a data set, and clean the data set to ensure data integrity; a calculation module, used to construct a prediction model based on the acquired data set, predict and calculate electricity bills, and perform anomaly detection and processing on the model according to the difference between actual values and predicted values; an optimization module, used to compare the output predicted value with the actual value, optimize the prediction model, obtain the cause of the error, make up the error value, and settle the relevant electricity bills.
[0027] In a third aspect, an embodiment of the present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the processor executes the computer program, it implements any step of the above-mentioned automatic settlement method for electricity fee forecast correction based on mathematical model.
[0028] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, any step of the above-mentioned automatic settlement method for electricity fee forecast correction based on a mathematical model is implemented.
[0029] The beneficial effect of the present invention is that the present invention adopts a comprehensive and sophisticated data processing strategy, collects and integrates multi-dimensional data such as electricity consumption, electricity pricing, meteorology, society and holidays, and conducts in-depth data cleaning, which lays a solid data foundation for subsequent model construction and prediction. Combining multiple factors such as time changes and weather influences, the accuracy of the prediction is significantly improved. By continuously comparing the predicted values and actual values, the model parameters are continuously optimized, various abnormal situations are adaptively handled, and changes in the external environment are quickly responded to. It can not only help power companies better manage electricity bills and improve operational efficiency, but also provide users with more accurate and timely electricity bill information, and ultimately promote the optimized operation and sustainable development of the entire power system. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0031] Figure 1 The present invention is a flow chart of an automatic settlement method for electricity fee forecast correction based on a mathematical model. DETAILED DESCRIPTION
[0032] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0033] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0034] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0035] Example 1
[0036] Reference Figure 1 , which is the first embodiment of the present invention, and provides an automatic settlement method for electricity fee forecast correction based on a mathematical model, comprising:
[0037] S1: Collect electricity bill related data, construct a data set, and perform data cleaning on the data set to ensure data integrity.
[0038] Multiple data sources collect relevant data, including:
[0039] Electricity consumption data, including: collecting real-time electricity consumption data, electricity consumption data at different time periods, and daily / hourly electricity consumption of each household.
[0040] Electricity billing data, including: user historical electricity consumption data, power supply network topology data, planned and unplanned power outage record data.
[0041] External data sources, including:
[0042] Meteorological data: temperature, humidity, wind speed, sunshine hours;
[0043] Social data: population density, urbanization rate;
[0044] Holiday information: statutory holidays, local special holidays;
[0045] Smart home and IoT device data, including: smart home appliance power consumption data, electric vehicle charging data.
[0046] Furthermore, the collected data is cleaned, including:
[0047] First, the missing value patterns were identified, including missing completely at random, missing at random, and missing not at random;
[0048] If the proportion of missing values is less than or equal to 5%, it is considered as first-level missing and filled with mean, median or mode;
[0049] If the proportion of missing values is greater than 5% and less than or equal to 20%, it is considered as secondary missingness and advanced imputation methods are used, including multiple imputation or k-nearest neighbor (k-NN) imputation;
[0050] If the missing value ratio is greater than 20%, it is considered as level 3 missing, and the records containing missing values are deleted or filled using a machine learning-based prediction model;
[0051] Detect and process the outliers. Use statistical methods or visualization techniques to detect outliers and verify whether they are real data or erroneous data. If they are erroneous data, delete them or replace them with reasonable values. If they are real outliers, retain them or process them using methods that are insensitive to outliers.
[0052] Standardize or normalize numerical features to ensure that features of different dimensions can be compared on the same scale, encode categorical variables, and use target encoding or feature hashing for high-cardinality categorical variables.
[0053] Convert timestamps into meaningful features and handle seasonality and trends in time series.
[0054] Identify and delete completely duplicate records, and clean text data such as user information; ensure that the data type of each feature is correct.
[0055] If the sample size of some categories in the data set is significantly smaller than that of other categories, resample using oversampling, undersampling, or SMOTE techniques.
[0056] Use cross-validation to evaluate the effectiveness of data cleaning and ensure that the preprocessed data still maintains its original statistical characteristics; record all data cleaning steps to ensure reproducibility, and use a version control system to manage different versions of the data set.
[0057] S2: Construct a prediction model based on the data set after data cleaning, and predict and calculate the electricity cost through the prediction model.
[0058] Combining the collected data sets, incorporating time-varying factors and the nonlinear impact of different weather conditions on electricity prices, a prediction model is constructed, expressed as:
[0059]
[0060] Among them, E is the predicted electricity fee amount, T is the total duration of the calculation cycle, n is the number of user types, C i (t) is the electricity consumption function of the i-th user at time t, P i (t) is the electricity price function of the i-th user at time t, α(t) is the adjustment coefficient function, β is the sensitivity parameter, m is the number of weather factors, W j is the weight of the jth weather factor, H j is the actual value of the jth weather factor, γ is the normalized parameter of weather impact, λ is the historical error impact coefficient, l is the number of error types, and D k is the weight of the kth error type, Fk is the frequency of the kth error type, and δ is the error impact normalization parameter.
[0061] Integral functions are used to calculate electricity consumption and electricity costs over the entire period, incorporating time-varying factors; and complex exponential and inverse tangent functions are used to simulate the nonlinear effects of weather and historical errors on electricity costs.
[0062] The comparability of different factors is ensured through normalization processing. This prediction model combines a variety of user types, weather factors and error types, has strong adaptability, and introduces time-related adjustment coefficients, which can flexibly respond to changes in electricity price policies.
[0063] Furthermore, C i (t) is the electricity consumption function of the i-th type of user at time t. Combining the daily electricity consumption fluctuation and the impact of temperature on electricity consumption, an exponential function is used to simulate the temperature effect, which is expressed as:
[0064]
[0065] Among them, B i is the basic electricity consumption of the i-th category user, A i is the daily cycle fluctuation range, Q i is the temperature sensitivity coefficient of electricity consumption of the i-th user, T(t) is the ambient temperature at time t, T0 is the reference temperature, and R is the gas constant.
[0066] P i (t) is the electricity price function of the i-th user at time t. Combining load pricing and peak-valley pricing, the hyperbolic tangent function and inverse tangent function are used to simulate nonlinear price changes, which can be expressed as:
[0067]
[0068] Among them, P base,i is the basic electricity price for the i-th category user, ε i is the load sensitivity coefficient, L(t) is the grid load at time t, L avg , L max and L min are the average, maximum and minimum grid loads, respectively, and η i is the peak-to-valley price difference coefficient, ω is the peak-to-valley price change rate, t peak Peak electricity price time.
[0069] α(t) is a time-dependent adjustment coefficient function. Combining annual cyclical changes and sudden policy impacts, the sine function and the sigmoid function are used for simulation, which can be expressed as:
[0070]
[0071] Among them, κ is the annual price fluctuation range, φ is the annual price fluctuation phase, σ is the policy impact rate, t policy The policy takes effect time.
[0072] Furthermore, σ (policy impact rate) reflects the speed at which the policy affects electricity prices and electricity consumption behavior. A larger σ value indicates that the policy has a rapid impact, while a smaller σ value indicates that the policy has a slow impact.
[0073] Policies include but are not limited to: electricity price adjustment policy, energy structure adjustment policy, electricity market reform policy, smart grid development policy, demand-side management policy and emergency electricity policy under extreme weather conditions, etc.; comprehensive consideration of various types of policies, not limited to the impact of a single policy, and flexible modeling of different policy impact characteristics through adjustable parameters, thereby improving the accuracy and adaptability of the prediction.
[0074] C i (t) and P i (t) are all functions of the i-th user, and the user classification is set as: residential users (i=1), commercial users (i=2), industrial users (i=3), agricultural users (i=4), public utility users (i=5), large enterprise users (i=6), and new energy users (i=7).
[0075] Residential users are those who use electricity for personal or family residences; commercial users are shops, office buildings, restaurants and other commercial places; industrial users are factories, manufacturing facilities, etc.; agricultural users are farms, irrigation systems; public utility users are schools, hospitals, government agencies, etc.; large enterprise users are large data centers, large commercial complexes, etc.; new energy users are users who own distributed power generation facilities.
[0076] This classification combines electricity consumption characteristics, economic attributes and energy policies, introduces new energy user categories, adapts to the changes in modern energy structure, and designs specific C i (t) and P i (t) function can more accurately simulate the electricity consumption behavior and pricing strategies of different types of users, and provide a basis for differentiated electricity management and pricing strategies through refined classification.
[0077] Furthermore, if temperature and humidity are combined synchronously to construct a composite feature, it is represented by the thermal index, which is expressed as:
[0078] HI=c1+c2T+c3RH+c4T·RH+c5T 2 +c6RH 2 +c7T 2 ·RH+c8T·RH 2 +c9T 2 RH2
[0079] Where T is temperature, RH is relative humidity, and c1 to c9 are constant coefficients;
[0080] The values of the constant coefficients are: c1 = -42.379, c2 = 2.04901523, c3 = 10.14333127, c4 = -0.22475541, c5 = -6.83783×10 -3 , c6=-5.481717×10 -2 , c7=1.22874×10 -3 , c8=8.5282×10 -4 , c9=-1.99×10 -6 .
[0081] Furthermore, we introduce finer-grained time features to create periodic features, which can be expressed as:
[0082]
[0083] Among them, TF is the time characteristic index, i represents the week number, which is an integer from 1 to 7; δ i Indicator function indicating whether the i-th day is a working day, M j is the monthly factor for the jth month, S j is the seasonal index for the jth month.
[0084] Adjust the annual periodicity to weekly periodicity, using sin and cos functions to capture the periodic pattern, and using δ i The function distinguishes different electricity consumption patterns on weekdays and weekends; at the same time, combined with seasonal changes, S j Capturing seasonal electricity consumption patterns such as heating in winter and cooling in summer enables the model to more accurately capture and predict electricity consumption patterns in different time periods, thereby improving the accuracy of electricity bill forecasts.
[0085] Furthermore, the original temperature and humidity features are replaced by composite features, and finer-grained time features are introduced to optimize the original prediction model.
[0086] S3: Based on the comparison between the output predicted value and the actual value, the prediction model is detected and processed for anomalies, the prediction model is optimized, the cause of the error is obtained, the error value is supplemented, and the relevant electricity charges are settled.
[0087] Compare the predicted value with the historical actual value, obtain the error value, and analyze the cause of the error, including:
[0088] If the prediction error increases significantly in a specific season, separate sub-models are established for different seasons or the weight of seasonal characteristics is enhanced, and the seasonal index in the time feature formula (TF) is adjusted;
[0089] If high temperature weather occurs simultaneously, multi-dimensional threshold monitoring will be established, including:
[0090] Define the temperature threshold. If the maximum daily temperature exceeds 35℃ for 3 consecutive days, it is defined as high temperature weather. If the average daily temperature is below -5℃ for 3 consecutive days, the period is marked as low temperature weather.
[0091] If it is high temperature weather in summer, it will be marked as a special high temperature and high load day, and a special high temperature and high load sub-model will be established, and a higher weight will be given in the forecast;
[0092] If it is winter low temperature weather, it will be marked as a special low temperature and high load day, and a special low temperature and high load sub-model will be established, and a higher weight will be given in the forecast;
[0093] If the seasonal effect is significantly greater than the trend effect and the residual is greater than twice the historical residual, the seasonal model is re-evaluated and a more complex seasonal pattern is introduced;
[0094] If the interaction term between temperature and humidity is greater than the 95% quantile of the historical data and the weekday flag is 1, which means it is a weekday, then the triple interaction term of temperature-humidity-weekday is introduced into the model, and the decision tree model is used to automatically capture the complex feature interactions;
[0095] If the above conditions are met for three consecutive days, a lag term is introduced into the model, combining the cumulative effects of the previous days, and using the LSTM deep learning model to capture long-term dependencies.
[0096] Among them, the time series data is decomposed into three parts: the trend component includes the long-term growth or decline trend; the seasonal component includes the periodic change pattern, such as the increase in electricity consumption every summer; the residual component is the part left after removing the trend and seasonality.
[0097] The residual reflects the changes that the model fails to capture. Large residuals may mean that an abnormal situation has occurred or that the model has missed some important factors. If the current residual exceeds twice the historical average, it may mean that there is an abnormal power consumption situation that the model cannot explain, or there may be new influencing factors that are not taken into account by the model, or the model may need to be updated or retrained.
[0098] Furthermore, the interaction term between temperature and humidity refers to the effect of temperature and humidity acting together. It not only combines the individual effects of temperature and humidity, but also considers the additional effects that may occur when they are combined. For example, when the temperature is high but the humidity is low, it feels good; but when the temperature is high and the humidity is high, it feels bad, which leads to turning on the air conditioner, which in turn leads to a significant increase in electricity consumption.
[0099] Continuously optimize the model to output the best prediction value, and implement online learning algorithms to allow the model to be continuously updated based on new feedback data, retrain the model regularly, incorporate accumulated feedback data, and use reinforcement learning techniques to optimize the prediction strategy based on feedback.
[0100] In summary, the present invention adopts a comprehensive and sophisticated data processing strategy, which lays a solid data foundation for subsequent model construction and prediction by collecting and integrating multi-dimensional data such as electricity consumption, electricity pricing, meteorology, society and holidays, and conducting in-depth data cleaning. It combines multiple factors such as time changes and weather influences to significantly improve the accuracy of predictions. By continuously comparing predicted values with actual values, the model parameters are continuously optimized, various abnormal situations are adaptively handled, and changes in the external environment are quickly responded to. It can not only help power companies better manage electricity bills and improve operational efficiency, but also provide users with more accurate and timely electricity bill information, ultimately promoting the optimized operation and sustainable development of the entire power system.
[0101] Example 2
[0102] Reference Figure 1 Based on the first embodiment, this embodiment further provides an automatic settlement system for electricity fee forecast correction based on a mathematical model, including:
[0103] The collection module is used to collect electricity fee-related data, build a data set, and clean the data set to ensure data integrity;
[0104] The calculation module is used to build a prediction model based on the acquired data set, predict and calculate the electricity cost, and perform anomaly detection and processing on the model according to the difference between the actual value and the predicted value;
[0105] The optimization module is used to compare the predicted value based on the output with the actual value, optimize the prediction model, obtain the cause of the error, make up the error value, and settle the relevant electricity charges.
[0106] This embodiment also provides a computer device, which is suitable for the automatic settlement method of electricity fee forecast correction based on a mathematical model, including a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the automatic settlement method of electricity fee forecast correction based on a mathematical model as proposed in the above embodiment.
[0107] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0108] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the method for automatically clearing electricity fee forecast correction based on a mathematical model as proposed in the above embodiment is implemented.
[0109] The storage medium proposed in this embodiment and the data storage method proposed in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be found in the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0110] Example 3
[0111] On the basis of the previous two embodiments, this embodiment provides an automatic settlement method for electricity fee forecast correction based on a mathematical model. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through simulation experiments.
[0112] A power company in a medium-sized city was selected as the research object, and relevant data for the whole year of 2023 were collected. We compared the method of the present invention with the traditional linear regression method and a simple machine learning method (random forest).
[0113] Experimental setup:
[0114] Dataset: including electricity consumption data, electricity billing data, meteorological data, social data and holiday information data.
[0115] Training set: data from January to October 2023;
[0116] Test set: data from November to December 2023;
[0117] The comparison results are shown in Table 1:
[0118] Table 1 Comparative experimental results
[0119]
[0120] Through this comprehensive comparative analysis, we can see that the proposed method performs well in multiple key indicators. It not only has the highest prediction accuracy and anomaly detection capabilities, but also has excellent performance in adaptability and system response. Although it consumes slightly more computing resources than the simple method, considering the performance improvement it brings, this trade-off is worth it and is very important for practical applications and decision support.
[0121] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for automatic settlement of electricity fee forecast correction based on a mathematical model, characterized in that: include, Collect electricity fee-related data, construct a data set, and perform data cleaning on the data set to ensure data integrity; Building a prediction model based on the cleaned data set, and predicting and calculating the electricity cost through the prediction model; Based on the comparison between the output predicted value and the actual value, the prediction model is detected and processed for anomalies, the prediction model is optimized, the cause of the error is obtained, the error value is supplemented, and the relevant electricity charges are settled.
2. The automatic settlement method for electricity fee forecast correction based on mathematical model according to claim 1, characterized in that: The collected electricity fee-related data includes electricity consumption data, electricity fee pricing data, meteorological data, social data and holiday information data.
3. The automatic settlement method for electricity fee forecast correction based on mathematical model according to claim 2, characterized in that: The data cleaning is processed by identifying missing value patterns, and the missing value patterns include setting primary missing, secondary missing and tertiary missing; If the first level is missing, the mean, median or mode is used to fill it; If the data are second-level missing, they will be filled using advanced interpolation methods; if the data are third-level missing, they will be filled using a prediction model based on machine learning; The data cleaning is also processed by deleting records containing missing values; Further identify and delete completely duplicate records and clean the user information text data; Use cross-validation to evaluate the effectiveness of data cleaning to ensure that the preprocessed data still maintains its original statistical characteristics; record all data cleaning steps to ensure repeatability, and use a version control system to manage different versions of the data set.
4. The automatic settlement method for electricity fee forecast correction based on mathematical model as claimed in claim 3, characterized in that: The prediction model combines the time-varying factors and the nonlinear impact of different weather conditions on electricity prices, and is expressed as: Among them, E is the predicted electricity fee amount, T is the total duration of the calculation cycle, n is the number of user types, C i (t) is the electricity consumption function of the i-th user at time t, P i (t) is the electricity price function of the i-th user at time t, α(t) is the adjustment coefficient function, β is the sensitivity parameter, m is the number of weather factors, W j is the weight of the jth weather factor, H j is the actual value of the jth weather factor, γ is the normalized parameter of weather impact, λ is the historical error impact coefficient, l is the number of error types, and D k is the weight of the kth error type, F k is the frequency of the kth error type, and δ is the error impact normalization parameter.
5. The automatic settlement method for electricity fee forecast correction based on mathematical model according to claim 4, characterized in that: The power consumption function C i (t) Combined with the daily power consumption fluctuation and the impact of temperature on power consumption, an exponential function is used to simulate the temperature effect, which is expressed as: Among them, B i is the basic electricity consumption of the i-th category user, A i is the daily cycle fluctuation range, Q i is the temperature sensitivity coefficient of electricity consumption of the i-th type of user, T(t) is the ambient temperature at time t, T0 is the reference temperature, and R is the gas constant; The electricity price function P i (t) Combining load pricing and peak-valley pricing, the hyperbolic tangent function and inverse tangent function are used to simulate nonlinear price changes, which can be expressed as: Among them, P base,i is the basic electricity price for the i-th category user, ε i is the load sensitivity coefficient, L(t) is the grid load at time t, L avg , L max and L min are the average, maximum and minimum grid loads, respectively, and η i is the peak-valley price difference coefficient, ω is the peak-valley price change rate, t peak It is the peak electricity price time; The adjustment coefficient function α(t) combines the annual periodic changes and the impact of sudden policies, and uses the sine function and the sigmoid function for simulation, which is expressed as: Among them, κ is the annual price fluctuation range, φ is the annual price fluctuation phase, σ is the policy impact rate, t policy The policy takes effect time.
6. The automatic settlement method for electricity fee forecast correction based on mathematical model according to claim 5, characterized in that: Based on the adjustment coefficient function, a time feature with a smaller granularity is introduced to create a periodic feature, which is expressed as: Among them, TF is the time characteristic index, i represents the week number, which is an integer from 1 to 7; δ i Indicator function indicating whether the i-th day is a working day, M j is the monthly factor for the jth month, S j is the seasonal index of the jth month; Adjust the annual periodicity to weekly periodicity, using sin and cos functions to capture the periodic pattern, and using δ i The function distinguishes different electricity consumption patterns on weekdays and weekends; at the same time, combined with seasonal changes, S j Capture seasonal electricity usage patterns.
7. The automatic settlement method for electricity fee forecast correction based on mathematical model according to claim 6, characterized in that: The optimization of the prediction model includes: By comparing the predicted value with the historical actual value, the error value is obtained and the cause of the error is analyzed. If the error value increases in a specific season, separate sub-models are established for different seasons or the weight of seasonal characteristics is enhanced, and the seasonal index in the time characteristic formula (TF) is adjusted; If high temperature weather occurs simultaneously, multi-dimensional threshold monitoring will be established, including: If it is high temperature weather in summer, it will be marked as a special high-load day, a special sub-model will be established, and a higher weight will be given in the forecast; If the seasonal effect is greater than the trend effect and the residual is greater than twice the historical residual, the seasonal model is re-estimated and a new seasonal pattern is introduced; If the interaction term between temperature and humidity is greater than the m% quantile of the historical data and the weekday flag is 1, indicating a weekday, the triple interaction term of temperature-humidity-weekday is introduced into the model, and the decision tree model is used to automatically capture the feature interaction.
8. An automatic settlement system for electricity fee forecast correction based on a mathematical model, based on the automatic settlement method for electricity fee forecast correction based on a mathematical model according to any one of claims 1 to 7, characterized in that: include, The collection module is used to collect electricity bill related data, build a data set, and clean the data set to ensure data integrity; The calculation module is used to build a prediction model based on the acquired data set, predict and calculate the electricity cost, and perform anomaly detection and processing on the model according to the difference between the actual value and the predicted value; The optimization module is used to compare the predicted value based on the output with the actual value, optimize the prediction model, obtain the cause of the error, make up the error value, and settle the relevant electricity charges.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the automatic settlement method for electricity fee prediction correction based on a mathematical model according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the automatic settlement method for electricity fee prediction correction based on a mathematical model according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Fault detection method and system of air conditioner, electronic equipment and storage medium
CN119573192A
Intelligent settlement data analysis method and system based on market evaluation
CN119963237A
