Medium and long term transaction deviation control method and device for electricity selling company

By acquiring medium- and long-term transaction contracts and real-time electricity consumption data from users, and combining this with electricity market data to dynamically calculate and adjust deviations, the problem of untimely or excessive deviation control in existing technologies has been solved. This has enabled more accurate deviation adjustments, reduced risks and losses, and improved the economic efficiency and stability of transactions.

CN120823040AInactive Publication Date: 2025-10-21SHENZHEN YIXUAN IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510972731.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-15
Publication Date
2025-10-21
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing methods for controlling long-term trading deviations in electricity sales companies rely on historical data to set fixed thresholds. These methods cannot respond in real time to changes in electricity market supply and demand and dynamic adjustments to user electricity consumption behavior, resulting in untimely or excessive deviation adjustments, causing economic losses and system instability.

Method used

By acquiring medium- and long-term transaction contract data and real-time electricity consumption data from users, the system dynamically calculates real-time deviations and adjusts these deviations in conjunction with electricity market data. It then uses a dynamic difference value and deviation cost impact coefficient model to accurately determine the adjustment direction and electricity volume, thereby achieving real-time response to market fluctuations.

Benefits of technology

It improves the accuracy of deviation adjustment, avoids under- or over-adjustment, effectively controls risks and losses, and enhances the economy and stability of transactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120823040A_ABST
    Figure CN120823040A_ABST
Patent Text Reader

Abstract

The invention provides a medium-and-long-term transaction deviation control method and device for an electricity selling company. The method comprises the following steps: acquiring medium-and-long-term transaction contract data of the electricity selling company and real-time electricity consumption data of a user side; the medium and long term transaction contract data comprises total contract electric quantity and a contract period; the real-time power consumption data comprises real-time active power and real-time power consumption duration of each user; determining the real-time electricity consumption of each user based on the real-time active power and the real-time electricity consumption duration of each user, and determining the total accumulated electricity consumption of the current time period in the contract period based on the real-time electricity consumption of each user; determining contract decomposition electric quantity of the current time period in the contract period based on the contract total electric quantity and the contract period, and determining a real-time deviation value of the current time period based on the contract decomposition electric quantity and the accumulated total electric quantity; and performing deviation adjustment based on the power market data and the real-time deviation value of the current time period. According to the invention, the accuracy of deviation adjustment is improved, and risks and loss caused by deviation are effectively controlled.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for controlling medium- and long-term transaction deviations of a power sales company. Background Art

[0002] In the electricity market, power retailers, as key participants in electricity trading, need to lock in a significant portion of their electricity through medium- and long-term transactions to mitigate the risks of spot market price fluctuations. However, there often is a discrepancy between actual user electricity consumption and the contracted electricity volume in medium- and long-term transactions. If this discrepancy is not effectively controlled, the company may face significant financial losses when settling the discrepancy in the spot market, potentially impacting the stable operation of the power system. An existing method for controlling discrepancies in medium- and long-term transactions for power retailers primarily uses historical electricity data to determine a fixed deviation adjustment threshold. When the deviation between actual consumption and the contracted electricity volume reaches the threshold, a preset adjustment strategy, such as purchasing or selling a certain amount of electricity, is triggered. However, relying solely on historical data to set static thresholds fails to respond to real-time factors such as changes in power market supply and demand and dynamic adjustments in user electricity consumption behavior. For example, when sudden extreme weather events cause significant fluctuations in user electricity demand over a short period of time, or when spot prices in the electricity market fluctuate dramatically, fixed deviation adjustment thresholds struggle to adapt quickly to real-time conditions. This can lead to untimely or excessive deviation adjustments, failing to effectively control the risks and losses associated with deviations. Summary of the Invention

[0003] The present invention provides a method and device for controlling deviations in medium- and long-term transactions of a power sales company, which are used to improve the accuracy of deviation adjustment and effectively control the risks and losses caused by deviations.

[0004] In a first aspect, the present invention provides a method for controlling medium- and long-term transaction deviations of a power sales company, comprising:

[0005] Obtaining the medium- and long-term transaction contract data of the power sales company and the real-time electricity consumption data of the user side; the medium- and long-term transaction contract data includes the total contract electricity volume and the contract period; the real-time electricity consumption data includes the real-time active power and real-time electricity consumption duration of each user;

[0006] Determine the real-time power consumption of each user based on the real-time active power and real-time power consumption duration of each user, and determine the cumulative total power consumption of the current period within the contract period based on the real-time power consumption of each user;

[0007] Determine the contract decomposed electricity for the current period within the contract period based on the total contract electricity and the contract period, and determine the real-time deviation amount for the current period based on the contract decomposed electricity and the accumulated total electricity consumption;

[0008] Deviation adjustment is performed based on the electricity market data of the current period and the real-time deviation amount.

[0009] In a second aspect, the present invention further provides a medium- and long-term transaction deviation control device for a power sales company, which is applied to the medium- and long-term transaction deviation control method for a power sales company as described in the first aspect; the medium- and long-term transaction deviation control device for a power sales company comprises:

[0010] The data acquisition module is used to obtain the medium- and long-term transaction contract data of the power sales company and the real-time power consumption data of the user side; the medium- and long-term transaction contract data includes the total contract power and contract period; the real-time power consumption data includes the real-time active power and real-time power consumption duration of each user;

[0011] The power consumption calculation module is used to determine the real-time power consumption of each user based on the real-time active power and real-time power consumption duration of each user, and to determine the cumulative total power consumption of the current period within the contract period based on the real-time power consumption of each user;

[0012] a deviation calculation module, configured to determine the contract decomposed electricity for the current period within the contract period based on the total contract electricity and the contract period, and to determine the real-time deviation for the current period based on the contract decomposed electricity and the accumulated total electricity consumption;

[0013] The deviation adjustment module is used to perform deviation adjustment based on the power market data of the current period and the real-time deviation amount.

[0014] In a third aspect, the present invention further provides an electronic device comprising: a memory for storing a computer software program; and a processor for reading and executing the computer software program, thereby implementing the above-mentioned method for controlling medium- and long-term transaction deviations of a power sales company.

[0015] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium, wherein the storage medium stores a computer software program, and when the computer software program is executed by a processor, the method for controlling medium- and long-term transaction deviations of a power sales company as described above is implemented.

[0016] In a fifth aspect, the present invention further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the above-mentioned method for controlling medium- and long-term transaction deviations of a power sales company.

[0017] The method for controlling the deviation of medium- and long-term transactions of power sales companies provided in the embodiment of the present invention performs deviation adjustment based on real-time electricity market data combined with a real-time deviation amount, rather than a fixed threshold. It can dynamically determine whether adjustment is needed based on real-time market conditions, so that the deviation control can respond to real-time fluctuations in market supply and demand and prices. When extreme changes occur in the market, the adjustment mechanism can be triggered in time to perform real-time deviation adjustment to ensure that the adjustment amount matches the actual deviation, avoiding insufficient or excessive adjustment that may be caused by static adjustment, improving the accuracy of deviation adjustment, and achieving effective control of risks and losses caused by deviations. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 This is a flow chart of a method for controlling medium- and long-term transaction deviations of a power sales company provided by an embodiment of the present invention;

[0019] Figure 2 This is a structural diagram of a medium- and long-term transaction deviation control device for a power sales company provided by an embodiment of the present invention;

[0020] Figure 3 An embodiment diagram of an electronic device provided by an embodiment of the present invention;

[0021] Figure 4 An embodiment diagram of a computer-readable storage medium provided for an embodiment of the present invention. DETAILED DESCRIPTION

[0022] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present invention.

[0023] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature specified as "first" or "second" may explicitly or implicitly include one or more of the specified features. In the description of the present invention, "plurality" means two or more, unless otherwise specifically defined.

[0024] In the description of the present invention, the term "for example" is used to mean "used as an example, illustration or illustration". Any embodiment of the present invention described as "for example" is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is given to enable any person skilled in the art to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes are not elaborated in detail to avoid obscuring the description of the present invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed herein.

[0025] See Figure 1 , Figure 1This is a flow chart of a method for controlling medium- and long-term transaction deviations of a power sales company provided by the present invention. In the embodiment of the present invention, the execution subject of the method for controlling medium- and long-term transaction deviations of a power sales company is a power sales transaction device. Therefore, the method for controlling medium- and long-term transaction deviations of a power sales company includes:

[0026] Step 10: Obtain the medium- and long-term transaction contract data from the power sales company and the real-time power consumption data from the user side. The medium- and long-term transaction contract data includes the total contract power and the contract period. The real-time power consumption data includes the real-time active power and real-time power consumption duration of each user.

[0027] Optionally, the electricity trading device needs to obtain data from two core channels. First, it connects with the electricity sales company's internal contract management system to extract data on medium- and long-term trading contracts. The total contracted electricity volume is the total amount of electricity the electricity sales company can supply to users during the contract period, and the contract period is the timeframe (e.g., annual, quarterly, monthly, etc.) during which the contract takes effect. Second, it uses smart meters, power monitoring terminals, and other devices installed on the user side to collect real-time electricity usage data for each user, including real-time active power (usually in kilowatts, kW) and real-time electricity usage duration (usually in hours, h). The data collection frequency can be set according to actual needs (e.g., every 15 minutes, every 30 minutes).

[0028] In one example, a power sales company signed a medium- to long-term contract with an industrial park for a total electricity consumption of 1.2 million kilowatt-hours (kWh) with a contract period of July 2025 (a total of 31 days). The industrial park also has three corporate users. The power sales transaction device collected real-time data from 10:00 AM to 10:30 AM on July 1st via a smart terminal: User A's real-time active power was 200 kW, with a real-time electricity usage duration of 0.5 hours. User B's real-time active power was 300 kW, with a real-time electricity usage duration of 0.5 hours. User C's real-time active power was 500 kW, with a real-time electricity usage duration of 0.5 hours.

[0029] Step 20: Determine the real-time power consumption of each user based on the real-time active power and real-time power consumption duration of each user, and determine the cumulative total power consumption of the current period within the contract period based on the real-time power consumption of each user.

[0030] Furthermore, the electricity sales transaction device calculates the real-time electricity consumption of a single user (the product of active power and electricity consumption duration, in kWh) based on the real-time active power and real-time electricity consumption duration of each user, and then adds up the real-time electricity consumption of all users in the same period to obtain the real-time total electricity consumption of the current period.

[0031] Furthermore, the electricity sales transaction device accumulates the real-time total electricity consumption of the period and all previous periods, which is the accumulated total electricity consumption of the current period within the contract period.

[0032] Continuing with the above example, User A's real-time power usage = real-time active power × real-time power usage duration = 200kW × 0.5h = 100kWh. User B's real-time power usage = 300kW × 0.5h = 150kWh. User C's real-time power usage = 500kW × 0.5h = 250kWh. Assuming the current time period is 10:00-10:30 on July 1st, which is the first collection period of the day, the total accumulated power usage = 100 + 150 + 250 = 500kWh.

[0033] Step 30: determine the contract decomposed electricity for the current period within the contract period based on the total contract electricity and the contract period, and determine the real-time deviation for the current period based on the contract decomposed electricity and the accumulated total electricity consumption.

[0034] Furthermore, the electricity sales trading device breaks down the total contracted electricity consumption into each time period according to the contract period, obtaining the contracted electricity consumption (usually evenly distributed according to the time proportion). The accumulated total electricity consumption is then subtracted from the contracted electricity consumption to obtain the real-time deviation (a positive result indicates insufficient electricity consumption, while a negative result indicates excess electricity consumption).

[0035] Continuing with the above example, the total contracted electricity is 1.2 million kWh (1,200,000 kWh), and the contract period is 7 months (31 days). Assuming each day is divided into 24-hour periods, with each 0.5-hour period as a time period, the total number of time periods = 31 days × 24 hours / day ÷ 0.5 hours / period = 31 × 48 = 1,488 time periods. Contracted electricity consumption = total contracted electricity consumption ÷ total number of time periods = 1,200,000 kWh ÷ 1,488 ≈ 806.45 kWh / period (round to two decimal places). The cumulative total electricity consumption for the current period (July 1, 10:00 AM - 10:30 AM) is 500 kWh. The real-time deviation = contracted electricity consumption - cumulative total electricity consumption = 806.45 kWh - 500 kWh = 306.45 kWh. This means that the user's electricity consumption during the current period is 306.45 kWh less than the contracted electricity consumption.

[0036] Step 40: Perform deviation adjustment based on the electricity market data of the current period and the real-time deviation amount.

[0037] Furthermore, the electricity sales transaction device obtains electricity market data for the current period, wherein the electricity market data includes real-time market electricity prices, real-time grid load rates, and real-time transmission channel congestion conditions, and performs deviation adjustment based on the electricity market data for the current period and the real-time deviation amount, as specifically described in steps 401 to 404.

[0038] The embodiment of the present invention performs deviation adjustment based on real-time electricity market data combined with real-time deviation amount, rather than a fixed threshold. It can dynamically determine whether adjustment is needed based on real-time market conditions, so that deviation control can respond to real-time fluctuations in market supply and demand and prices. When extreme changes occur in the market, the adjustment mechanism can be triggered in time to perform real-time deviation adjustment to ensure that the adjustment amount matches the actual deviation, avoiding insufficient or excessive adjustment that may be caused by static adjustment, improving the accuracy of deviation adjustment, and effectively controlling the risks and losses caused by deviation.

[0039] In one embodiment, the process from step 401 to step 404 includes:

[0040] Step 401 : determining a benchmark deviation cost corresponding to the real-time grid load rate of the current period based on a cost deviation mapping table and the real-time grid load rate of the current period.

[0041] Optionally, the electricity sales transaction device must pre-establish a cost deviation mapping table. This table, indexed by the real-time grid load rate, stores the baseline deviation costs corresponding to different load rates. The real-time grid load rate is the ratio of the actual grid load to the maximum load during the current period (usually expressed as a percentage). The electricity sales transaction device first collects the real-time grid load data for the current period, calculates the real-time grid load rate, and then matches the corresponding baseline deviation cost from the cost deviation mapping table.

[0042] In one embodiment, the cost deviation mapping table shows that when the real-time grid load factor is 60%, the baseline deviation cost is 0.3 yuan / kWh. When the load factor is 80%, the baseline deviation cost is 0.5 yuan / kWh. The actual grid load for the current period is 480MW, and the maximum load is 600MW. The real-time grid load factor = 480MW ÷ 600MW × 100% = 80%. The resulting baseline deviation cost for the current period is 0.5 yuan / kWh.

[0043] Step 402 : performing a product calculation based on the absolute value of the real-time deviation amount in the current period and the real-time market electricity price in the current period to determine the expected deviation cost in the current period.

[0044] Furthermore, the electricity sales transaction device obtains the absolute value of the real-time deviation amount for the current period, then collects the real-time market electricity price for the current period, and multiplies the two to obtain the expected deviation cost for the current period. The unit of the real-time deviation amount is kWh, the unit of the real-time market electricity price is yuan / kWh, and the unit of the expected deviation cost is yuan. Continuing with the above embodiment, the real-time deviation amount for the current period is 306.45kWh (a positive value, indicating insufficient electricity consumption by the user), and its absolute value is 306.45kWh. The real-time market electricity price for the current period is 0.6 yuan / kWh. Expected deviation cost = absolute value of the real-time deviation amount × real-time market electricity price = 306.45kWh × 0.6 yuan / kWh ≈ 183.87 yuan.

[0045] Step 403: If the expected deviation cost is greater than or equal to the benchmark deviation cost, and the real-time transmission channel congestion in the current period is unblocked, the deviation power adjustment direction and deviation power adjustment amount are determined based on the benchmark deviation cost, expected deviation cost and real-time deviation amount in the current period.

[0046] Furthermore, the electricity sales transaction device first determines whether the expected deviation cost is greater than or equal to the baseline deviation cost and whether the real-time transmission channel is unobstructed. If these conditions are met, the adjustment direction and amount are determined by combining the baseline deviation cost, the expected deviation cost, and the real-time deviation. For example, if the real-time deviation is positive (underutilization), the adjustment direction is to sell electricity. If it is negative (overutilization), the adjustment direction is to buy electricity, as detailed in steps 4031 to 4034.

[0047] Step 404 : performing transaction deviation adjustment based on the deviation power adjustment direction and deviation power adjustment amount of the current period.

[0048] Furthermore, the electricity sales and trading device executes corresponding trading operations in the electricity market based on the direction and amount of the deviation electricity adjustment. If the adjustment direction is to sell, the corresponding amount of electricity is sold to the market. If the adjustment direction is to buy, the corresponding amount of electricity is purchased from the market to complete the deviation adjustment.

[0049] Embodiments of the present invention.

[0050] In one embodiment, the process from step 4031 to step 4034 includes:

[0051] Step 4031: Determine a dynamic difference value based on the baseline deviation cost and the expected deviation cost. The dynamic difference value represents the degree of deviation between the baseline deviation cost and the expected deviation cost.

[0052] Optionally, the electricity sales transaction device calculates the specific numerical relationship between the baseline deviation cost and the expected deviation cost to obtain a dynamic difference value, which is used to quantify the degree of deviation between the two. The larger the dynamic difference value, the more obvious the gap between the expected deviation cost and the baseline deviation cost. The specific formula is:

[0053] .

[0054] in, Indicates the dynamic difference value, represents the expected deviation cost, represents the benchmark deviation cost, Represents the natural logarithm function.

[0055] Step 4032: Determine the deviation cost impact coefficient based on the sum of the baseline deviation cost and the expected deviation cost combined with the dynamic difference value.

[0056] Furthermore, the electricity sales transaction device calculates the sum of the benchmark deviation cost and the expected deviation cost, and then combines the dynamic difference value to calculate the deviation cost impact coefficient through the formula. This coefficient reflects the comprehensive impact of the cost difference on the deviation adjustment amount. The value range is usually between 0 and 1. The larger the coefficient, the more significant the impact of the cost factor on the adjustment amount. The specific formula is:

[0057] .in, Represents the deviation cost impact coefficient.

[0058] Step 4033: If the real-time deviation is a positive value, the deviation power adjustment direction is determined to be selling deviation power, and the selling type power adjustment amount is determined based on the deviation cost impact coefficient.

[0059] Furthermore, when the electricity sales transaction device detects that the real-time deviation is a positive value (ie, the user's actual electricity consumption is lower than the contract breakdown electricity), the adjustment direction is determined to sell the deviation electricity.

[0060] Furthermore, the electricity sales transaction device determines the adjustment amount of the sell-off type electricity according to the deviation cost impact coefficient, as shown in the process from step 40331 to step 40337.

[0061] Step 4034: If the real-time deviation is a negative value, the deviation power adjustment direction is determined to be to purchase additional deviation power, and the additional purchase power adjustment amount is determined based on the deviation cost impact coefficient.

[0062] Furthermore, when the electricity sales transaction device detects that the real-time deviation is a negative value (ie, the user's actual electricity consumption is higher than the contracted electricity consumption), the adjustment direction is determined to be to purchase additional deviation electricity.

[0063] Furthermore, the electricity trading device determines the adjustment amount of the additional electricity purchase according to the deviation cost impact coefficient, as shown in the process from step 40341 ​​to step 40346.

[0064] The embodiment of the present invention constructs a quantitative model of dynamic difference value and deviation cost impact coefficient, combines the positive and negative attributes of real-time deviation amount, accurately determines the direction of deviation adjustment and specific power, and realizes the refinement and intelligence of deviation adjustment. Therefore, it can dynamically optimize the adjustment amount according to the degree of cost difference, balance cost and risk in selling or purchasing operations, avoid the expansion of deviation due to insufficient adjustment, and prevent the additional cost caused by excessive adjustment, thereby improving the economy and stability of electricity sales transactions.

[0065] In one embodiment, the process from step 40331 to step 40337 includes:

[0066] Step 40331: If the deviation cost impact coefficient is greater than the preset impact coefficient threshold, a cost difference is calculated based on the baseline deviation cost and the expected deviation cost to obtain a cost difference.

[0067] Optionally, the electricity sales transaction device compares the deviation cost impact coefficient with a preset impact coefficient threshold, and if it is greater than the preset impact coefficient threshold, calculates the cost difference between the baseline deviation cost and the expected deviation cost. In one embodiment, the deviation cost impact coefficient is known. =0.173, preset threshold =0.15. > , calculate the cost difference =183.87-153.23=30.64 yuan.

[0068] Step 40332: Determine a cost sensitivity index based on the cost difference, the real-time deviation, and the deviation cost impact coefficient. The cost sensitivity index represents the sensitivity of excess electricity to cost.

[0069] Furthermore, the electricity sales transaction device calculates the cost sensitivity index through the cost difference, real-time deviation and deviation cost impact coefficient. This index reflects the sensitivity of excess electricity to cost changes. The specific calculation formula is: ,in, Represents the cost sensitivity index, with the unit being RMB / kWh². Indicates the real-time deviation. Continuing with the above embodiment, =30.64 yuan, =0.173, =306.45kWh, therefore, the cost sensitivity index 0.0173 yuan / kWh².

[0070] Step 40333: Determine the sell-off electricity adjustment amount based on the dynamic difference value, the benchmark deviation cost, and the cost sensitivity index.

[0071] Furthermore, the electricity sales transaction device calculates the sell-off electricity adjustment amount by combining the dynamic difference value, the benchmark deviation cost and the cost sensitivity index. The specific calculation formula is: ,in, Indicates the amount of electricity adjustment for selling. represents the adjustment coefficient (taken as 0.9). Continuing with the above example, =0.1823, =153.23 yuan, =0.0173 yuan / kWh², =0.9, then 1292kWh.

[0072] Step 40334: If the deviation cost impact coefficient is less than or equal to the preset impact coefficient threshold, a sum calculation is performed based on the expected deviation cost and the baseline deviation cost to obtain a cost sum value.

[0073] Furthermore, if the deviation cost impact coefficient is less than or equal to the preset impact coefficient threshold, the sum of the expected deviation cost and the benchmark deviation cost is calculated. Continuing with the above embodiment, =0.12 = 0.15, calculate cost and value ==183.87+153.23=337.1 yuan.

[0074] Step 40335, determine the expected cost deviation rate based on the real-time deviation amount and the cost sum value, and determine the first type of sell-off adjustment amount based on the expected cost deviation rate and the contract decomposed electricity.

[0075] Furthermore, the electricity sales transaction device determines the expected cost deviation rate based on the real-time deviation amount and the cost sum value. The specific formula is: Furthermore, the electricity sales transaction device determines the first type of sell-off adjustment amount based on the expected cost deviation rate and the contract decomposition of electricity. The specific formula is the first type of sell-off adjustment amount ,in, Indicates the contract decomposition of electricity. Continuing with the above example, =30.64 yuan, =337.1 yuan, =806.45kWh, therefore, the expected cost deviation rate 0.0909, the first type of selling adjustment =806.45*0.0909 73.3kWh.

[0076] Step 40336: Determine the difference volatility index based on the real-time deviation and the dynamic difference, and determine the second type of selling adjustment amount based on the difference volatility index and the contract decomposition electricity.

[0077] Furthermore, the electricity sales trading device calculates the second type of sell-off adjustment amount by using the differential volatility index and the contract decomposition power. The specific calculation formula is: ,in, Represents the difference volatility index. Furthermore, the electricity sales transaction device determines the second type of sell-off adjustment amount based on the difference volatility index and the contract decomposition of electricity. The specific formula is: ,in, Represents the second type of sell-off adjustment. Continuing with the above example, =0.1823, =306.45kWh, =806.45kWh, therefore, the difference fluctuation index , the second type of selling adjustment 47.98kWh.

[0078] Step 40337: Determine the sum of the first-category sell-off adjustment amount and the second-category sell-off adjustment amount as the sell-off electricity adjustment amount.

[0079] Furthermore, the electricity sales transaction device adds the first and second types of sell-off adjustments to obtain a final adjustment. = + =73.3+55.6=128.9kWh.

[0080] This embodiment of the present invention distinguishes between high and low thresholds for the deviation cost impact coefficient and determines the adjustment amount for sell-off electricity through different methods. When the threshold is high, fine-tuning is performed using the cost sensitivity index; when the threshold is low, a comprehensive calculation combining the expected cost deviation rate and the differential volatility index is used. This enables precise adjustment in different cost-sensitive scenarios, avoiding both the subsequent power supply risks caused by excessive sell-offs and the cost waste caused by insufficient adjustments, thereby improving the economic efficiency and stability of electricity sales transactions.

[0081] In one embodiment, the process from step 40341 ​​to step 40346 includes:

[0082] Step 40341: If the deviation cost impact coefficient is greater than the preset impact coefficient threshold, a quotient is calculated based on the dynamic difference value and the benchmark deviation cost to obtain a corresponding first quotient.

[0083] Optionally, when the deviation cost impact coefficient is greater than a preset impact coefficient threshold, the electricity sales transaction device calculates the quotient of the dynamic difference value and the benchmark deviation cost. =0.173, preset threshold =0.15, dynamic difference value =0.1823, benchmark deviation cost =153.23 yuan, so the first quotient is = 0.00119 yuan-1.

[0084] Step 40342: Determine the additional purchase demand intensity index based on the first quotient value combined with the expected deviation cost and the real-time deviation amount.

[0085] Furthermore, the electricity sales transaction device calculates the additional purchase demand intensity index based on the first quotient, the expected deviation cost and the real-time deviation. The index reflects the urgency of the additional purchase demand caused by excessive electricity consumption. The specific calculation formula is: ,in, represents the purchase demand intensity index, Continuing the above example for the real-time deviation (negative value), =0.00119 yuan-1, =183.87 yuan, real-time deviation =-200kWh (overuse 200kWh), so the additional purchase demand intensity index 43.95.

[0086] Step 40343: Determine the additional purchase electricity adjustment amount based on the additional purchase demand intensity index, the deviation cost impact coefficient, and the expected deviation cost.

[0087] Furthermore, the electricity sales transaction device calculates the additional purchase electricity adjustment amount based on the additional purchase demand intensity index, the deviation cost impact coefficient and the expected deviation cost. The specific formula is: ,in, Indicates the adjustment amount of additional purchase electricity. Decompose the electricity consumption for the contract.

[0088] Continuing with the above example, =43.95, =0.173, =183.87 yuan, =806.45kWh, therefore, the additional purchase electricity adjustment amount 33.3kWh.

[0089] Step 40344: If the deviation cost impact coefficient is less than or equal to the preset impact coefficient threshold, a quotient is calculated based on the baseline deviation cost and the dynamic difference value to obtain a corresponding second quotient.

[0090] Furthermore, when the deviation cost impact coefficient is less than or equal to the preset impact coefficient threshold, the quotient of the baseline deviation cost and the dynamic difference value is calculated. =0.12 =0.15, so the second quotient is 840.5 yuan.

[0091] Step 40345: Determine the cost compensation coefficient based on the second quotient and the real-time deviation.

[0092] Furthermore, the electricity sales transaction device calculates the cost compensation coefficient based on the second quotient and the real-time deviation. The coefficient is used to measure the cost ratio of additional compensation due to excess electricity consumption. The specific calculation formula is: ,in, Represents the cost compensation coefficient. Continuing with the above example, =840.5 yuan| |=200kWh, calculated 0.238.

[0093] Step 40346: Determine the adjustment amount of additional electricity purchase based on the cost compensation coefficient and the contract decomposition electricity.

[0094] Furthermore, the electricity sales transaction device calculates the additional purchase electricity adjustment amount based on the cost compensation coefficient and the contract decomposition electricity. The specific calculation formula is: Continuing with the above example, =0.238, =806.45kWh, so the additional electricity purchase adjustment amount 192kWh.

[0095] This embodiment of the present invention uses different methods to determine the adjustment amount for additional electricity purchases by distinguishing between high and low thresholds for the deviation cost impact coefficient. When the threshold is high, the additional purchase demand intensity index is used to accurately assess additional purchase demand. When the threshold is low, the cost compensation coefficient is used to balance the cost pressure caused by excess electricity consumption. This implements differentiated adjustment strategies for different cost-sensitive scenarios, avoiding both the cost waste caused by excessive additional purchases and the impact of insufficient additional purchases on user electricity consumption, thereby improving the economic efficiency and reliability of electricity sales transactions.

[0096] Furthermore, the medium- and long-term transaction deviation control device for a power sales company provided by the present invention is described below. The medium- and long-term transaction deviation control device for a power sales company described below and the medium- and long-term transaction deviation control method for a power sales company described above can be referenced to each other.

[0097] Optional, see Figure 2 , Figure 2 It is a structural diagram of the medium- and long-term transaction deviation control device of the power sales company provided by the present invention, and the medium- and long-term transaction deviation control device of the power sales company includes.

[0098] Data collection module 210 is used to obtain medium- and long-term transaction contract data of power sales companies and real-time power consumption data on the user side; medium- and long-term transaction contract data includes the total contract power and contract period; real-time power consumption data includes the real-time active power and real-time power consumption duration of each user;

[0099] The power consumption calculation module 220 is used to determine the real-time power consumption of each user based on the real-time active power and real-time power consumption duration of each user, and to determine the cumulative total power consumption of the current period within the contract period based on the real-time power consumption of each user;

[0100] Deviation calculation module 230, for determining the contract decomposition power of the current period within the contract period based on the total contract power and the contract period, and determining the real-time deviation of the current period based on the contract decomposition power and the accumulated total power consumption;

[0101] The deviation adjustment module 240 is used to perform deviation adjustment based on the power market data of the current period and the real-time deviation amount.

[0102] The embodiment of the present invention performs deviation adjustment based on real-time electricity market data combined with real-time deviation amount, rather than a fixed threshold. It can dynamically determine whether adjustment is needed based on real-time market conditions, so that deviation control can respond to real-time fluctuations in market supply and demand and prices. When extreme changes occur in the market, the adjustment mechanism can be triggered in time to perform real-time deviation adjustment to ensure that the adjustment amount matches the actual deviation, avoiding insufficient or excessive adjustment that may be caused by static adjustment, improving the accuracy of deviation adjustment, and effectively controlling the risks and losses caused by deviation.

[0103] See also Figure 3 , Figure 3 This is a diagram of an embodiment of an electronic device provided by an embodiment of the present invention. Figure 3 As shown, an embodiment of the present invention provides an electronic device 300, including a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor 320. When the processor 320 executes the computer program 311, the following steps are implemented:

[0104] Obtain medium- and long-term transaction contract data from power sales companies and real-time electricity consumption data from users; medium- and long-term transaction contract data includes the total contracted electricity volume and contract period; real-time electricity consumption data includes each user's real-time active power and real-time electricity consumption duration;

[0105] Determine the real-time power consumption of each user based on the real-time active power and real-time power consumption duration of each user, and determine the cumulative total power consumption of the current period within the contract period based on the real-time power consumption of each user;

[0106] Determine the contract decomposition power for the current period within the contract period based on the total contract power and the contract period, and determine the real-time deviation for the current period based on the contract decomposition power and the accumulated total power consumption;

[0107] Deviation adjustment is performed based on the electricity market data of the current period and the real-time deviation amount.

[0108] See also Figure 4 , Figure 4 Detailed description of an embodiment of a computer-readable storage medium provided by an embodiment of the present invention. Figure 4 As shown, this embodiment provides a computer-readable storage medium 400 on which a computer program 311 is stored. When the computer program 311 is executed by a processor, the following steps are implemented:

[0109] Obtain medium- and long-term transaction contract data from power sales companies and real-time electricity consumption data from users; medium- and long-term transaction contract data includes the total contracted electricity volume and contract period; real-time electricity consumption data includes each user's real-time active power and real-time electricity consumption duration;

[0110] Determine the real-time power consumption of each user based on the real-time active power and real-time power consumption duration of each user, and determine the cumulative total power consumption of the current period within the contract period based on the real-time power consumption of each user;

[0111] Determine the contract decomposition power for the current period within the contract period based on the total contract power and the contract period, and determine the real-time deviation for the current period based on the contract decomposition power and the accumulated total power consumption;

[0112] Deviation adjustment is performed based on the electricity market data of the current period and the real-time deviation amount.

[0113] On the other hand, the present invention further provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the method for controlling medium- and long-term transaction deviations of a power sales company provided by the above methods. The method includes:

[0114] Obtain medium- and long-term transaction contract data from power sales companies and real-time electricity consumption data from users; medium- and long-term transaction contract data includes the total contracted electricity volume and contract period; real-time electricity consumption data includes each user's real-time active power and real-time electricity consumption duration;

[0115] Determine the real-time power consumption of each user based on the real-time active power and real-time power consumption duration of each user, and determine the cumulative total power consumption of the current period within the contract period based on the real-time power consumption of each user;

[0116] Determine the contract decomposition power for the current period within the contract period based on the total contract power and the contract period, and determine the real-time deviation for the current period based on the contract decomposition power and the accumulated total power consumption;

[0117] Deviation adjustment is performed based on the electricity market data of the current period and the real-time deviation amount.

[0118] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units. That is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0119] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods of each embodiment or certain portions of the embodiments.

[0120] Finally, 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 aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for controlling medium- and long-term transaction deviations of a power sales company, characterized in that: include: Obtaining the medium- and long-term transaction contract data of the power sales company and the real-time electricity consumption data of the user side; the medium- and long-term transaction contract data includes the total contract electricity volume and the contract period; the real-time electricity consumption data includes the real-time active power and real-time electricity consumption duration of each user; Determine the real-time power consumption of each user based on the real-time active power and real-time power consumption duration of each user, and determine the cumulative total power consumption of the current period within the contract period based on the real-time power consumption of each user; Determine the contract decomposed electricity for the current period within the contract period based on the total contract electricity and the contract period, and determine the real-time deviation amount for the current period based on the contract decomposed electricity and the accumulated total electricity consumption; Deviation adjustment is performed based on the electricity market data of the current period and the real-time deviation amount.

2. The method for controlling medium- and long-term transaction deviations of a power sales company according to claim 1, characterized in that: The power market data includes real-time market electricity prices, real-time grid load rates, and real-time transmission channel congestion conditions; the deviation adjustment based on the power market data of the current period and the real-time deviation amount includes: Determine the benchmark deviation cost corresponding to the real-time grid load rate of the current period based on the cost deviation mapping table and the real-time grid load rate of the current period; Determine the expected deviation cost for the current period by multiplying the absolute value of the real-time deviation amount for the current period by the real-time market electricity price for the current period; If the expected deviation cost is greater than or equal to the benchmark deviation cost, and the real-time transmission channel congestion status in the current period is unblocked, then based on the benchmark deviation cost, the expected deviation cost, and the real-time deviation amount in the current period, determine the deviation power adjustment direction and deviation power adjustment amount; The transaction deviation is adjusted based on the deviation power adjustment direction and deviation power adjustment amount of the current period.

3. The method for controlling medium- and long-term transaction deviations of a power sales company according to claim 2, characterized in that: The step of determining the deviation power adjustment direction and the deviation power adjustment amount based on the benchmark deviation cost, the expected deviation cost, and the real-time deviation amount during the current period includes: Determining a dynamic difference value based on the baseline deviation cost and the expected deviation cost; the dynamic difference value represents the degree of deviation between the baseline deviation cost and the expected deviation cost; Determining a deviation cost impact coefficient based on a sum of the baseline deviation cost and the expected deviation cost combined with the dynamic difference value; If the real-time deviation is a positive value, determining the deviation power adjustment direction as selling deviation power, and determining the selling type power adjustment amount based on the deviation cost impact coefficient; If the real-time deviation is a negative value, the deviation power adjustment direction is determined to be to purchase additional deviation power, and the additional purchase power adjustment amount is determined based on the deviation cost impact coefficient.

4. The method for controlling medium- and long-term transaction deviations of a power sales company according to claim 3, characterized in that: The determining of the sell-off electricity adjustment amount based on the deviation cost impact coefficient includes: If the deviation cost impact coefficient is greater than a preset impact coefficient threshold, a cost difference is calculated based on the baseline deviation cost and the expected deviation cost to obtain the cost difference; Determining a cost sensitivity index based on the cost difference, the real-time deviation, and the deviation cost impact coefficient; the cost sensitivity index represents the sensitivity of excess electricity to cost; The sell-off electricity quantity adjustment amount is determined based on the dynamic difference value, the benchmark deviation cost, and the cost sensitivity index.

5. The method for controlling medium- and long-term transaction deviations of a power sales company according to claim 3, characterized in that: The determining of the sell-off electricity adjustment amount based on the deviation cost impact coefficient includes: If the deviation cost impact coefficient is less than or equal to a preset impact coefficient threshold, a sum calculation is performed based on the expected deviation cost and the benchmark deviation cost to obtain a cost sum value; determining an expected cost deviation rate based on the real-time deviation amount and the cost sum value, and determining a first type of sell-off adjustment amount based on the expected cost deviation rate and the contract decomposed electricity; determining a difference volatility index based on the real-time deviation and the dynamic difference, and determining a second type of sell-off adjustment amount based on the difference volatility index and the contract decomposed electricity quantity; The sum of the first-category sell-off adjustment amount and the second-category sell-off adjustment amount is determined as the sell-off electricity quantity adjustment amount.

6. The method for controlling medium- and long-term transaction deviations of a power sales company according to claim 3, characterized in that: The determining of the additional purchase electricity adjustment amount based on the deviation cost impact coefficient includes: If the deviation cost impact coefficient is greater than a preset impact coefficient threshold, a quotient calculation is performed based on the dynamic difference value and the benchmark deviation cost to obtain a corresponding first quotient value; Determining an additional purchase demand intensity index based on the first quotient combined with the expected deviation cost and the real-time deviation amount; The additional purchase electricity quantity adjustment amount is determined based on the additional purchase demand intensity index, the deviation cost impact coefficient and the expected deviation cost.

7. The method for controlling medium- and long-term transaction deviations of a power sales company according to claim 3, characterized in that: The determining of the additional purchase electricity adjustment amount based on the deviation cost impact coefficient includes: If the deviation cost impact coefficient is less than or equal to a preset impact coefficient threshold, a quotient is calculated based on the baseline deviation cost and the dynamic difference value to obtain a corresponding second quotient; determining a cost compensation coefficient based on the second quotient and the real-time deviation; The adjustment amount of the additional electricity purchase is determined based on the cost compensation coefficient and the contract decomposed electricity.

8. A mid- to long-term transaction deviation control device for a power sales company, characterized in that: The method for controlling medium- and long-term transaction deviations of a power sales company according to any one of claims 1 to 7 is applied; the medium- and long-term transaction deviation control device of a power sales company comprises: The data acquisition module is used to obtain the medium- and long-term transaction contract data of the power sales company and the real-time power consumption data of the user side; the medium- and long-term transaction contract data includes the total contract power and contract period; the real-time power consumption data includes the real-time active power and real-time power consumption duration of each user; The power consumption calculation module is used to determine the real-time power consumption of each user based on the real-time active power and real-time power consumption duration of each user, and to determine the cumulative total power consumption of the current period within the contract period based on the real-time power consumption of each user; a deviation calculation module, configured to determine the contract decomposed electricity for the current period within the contract period based on the total contract electricity and the contract period, and to determine the real-time deviation for the current period based on the contract decomposed electricity and the accumulated total electricity consumption; The deviation adjustment module is used to perform deviation adjustment based on the power market data of the current period and the real-time deviation amount.

9. An electronic device comprising: Memory for storing computer software programs; A processor, configured to read and execute the computer software program, wherein when the processor executes the computer software program, the method for controlling medium- and long-term transaction deviations of a power sales company as described in any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium storing a computer software program, wherein: When the computer software program is executed by the processor, the method for controlling medium- and long-term transaction deviations of a power sales company as claimed in any one of claims 1 to 7 is implemented.