Electricity selling scheme generation method and system based on electricity consumption behavior clustering of power consumers

By collecting historical electricity consumption data from power users and optimizing electricity sales plans using LSTM networks and gradient boosting tree models, the problem of balancing power grid and user needs in existing technologies has been solved. This has enabled precise matching of differentiated electricity sales plans, improving power grid efficiency and user experience.

CN121329495AActive Publication Date: 2026-01-13BEIJING LUOHE TECH CO LTD

Patent Information

Application Number
CN202511569731.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-30
Publication Date
2026-01-13
Estimated Expiration
2045-10-30

AI Technical Summary

Technical Problem

Existing technologies cannot accurately match the needs of users with different electricity consumption habits, making it difficult to balance the cost of peak and off-peak load differentiation with user satisfaction. Existing electricity sales solutions lack refined design and cannot balance grid efficiency and user experience.

Method used

By collecting historical electricity load data, responsiveness data after electricity price adjustments, and preference data for daily peak and off-peak electricity consumption, time series analysis is performed using an LSTM network to generate user electricity consumption feature vectors. These vectors are then grouped using a clustering algorithm. Combining the peak and off-peak power supply costs of the power grid with user satisfaction requirements, a gradient boosting tree model is used to optimize the electricity sales plan.

Benefits of technology

It achieves synergistic optimization of power grid operation efficiency and user experience, generates differentiated electricity sales plans adapted to various electricity user groups, accurately matches user needs, avoids bias in analysis results caused by missing data, and improves the relevance and rationality of the plan.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121329495A_ABST
    Figure CN121329495A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of generation of power consumer electricity selling schemes, provides an electricity consumer electricity consumption behavior clustering-based electricity selling scheme generation method and system, and solves the problem that it is difficult to accurately match user demands with different electricity consumption habits. Historical electrical load data, responsivity data after electricity price adjustment and preference data during daily electricity consumption peak and valley are collected, time sequence analysis is performed on the historical electrical load data to obtain future electricity consumption behavior trend characteristics of each user, vector coding is performed on the trend characteristics, the responsivity data and the preference data, and the power consumption behavior trend characteristics of each user are obtained. The method comprises the steps of obtaining user electricity consumption feature vectors, grouping the user electricity consumption feature vectors to obtain a user clustering result, and finally optimizing electricity selling scheme parameters in combination with power grid peak and valley power supply cost and user electricity consumption satisfaction to generate differentiated electricity selling schemes adaptive to all groups, and through data collection, LSTM analysis, vector coding, clustering grouping, and combination of cost and user satisfaction, the electricity selling schemes can be obtained. And optimizing the parameters by using a gradient boosting tree, and generating a differentiated electricity selling scheme.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of generating a power user electricity sales scheme, and in particular to a method and system for generating an electricity sales scheme based on power user electricity consumption behavior clustering. BACKGROUND

[0002] With the advancement of the electricity retail market, user electricity consumption habits differ significantly, with some mainly using electricity during peak periods and others mainly using electricity during off-peak periods. The power grid needs to optimize load reduction costs, and users urgently need personalized electricity sales schemes. A scheme generation method based on electricity consumption behavior clustering is needed to achieve both power grid efficiency and user experience.

[0003] Currently, existing technologies use user basic electricity consumption data, such as monthly total electricity consumption and daily average electricity consumption time, as the basis for simple statistics, such as calculating monthly electricity consumption average, dividing into high, medium, and low electricity consumption groups according to peak time proportion, and then combining the average cost of the power grid with the benchmark electricity price to develop fixed rate packages, such as high electricity consumption packages with fixed discounts for corresponding groups.

[0004] However, the existing technology has drawbacks: relying on historical data to divide groups cannot capture future electricity consumption trends, leading to a disconnect between the results and reality; the scheme relies on average costs and fixed discounts, without considering differentiated costs and user satisfaction, lacks fine optimization, and is difficult to match user core needs, making it difficult to balance power grid peak and valley loads and user individual needs. SUMMARY

[0005] The present application aims to provide a method and system for generating an electricity sales scheme based on power user electricity consumption behavior clustering to solve the problem of difficulty in accurately matching the needs of users with different electricity consumption habits in existing technologies.

[0006] To solve the above technical problems, in a first aspect, the present application provides a method for generating an electricity sales scheme based on power user electricity consumption behavior clustering, comprising:

[0007] Collecting historical electricity load data, response data after electricity price adjustment, and preference data for daily electricity peak and off-peak periods for each power user;

[0008] Using an LSTM network to perform time series analysis and processing on the historical electricity load data to obtain electricity consumption behavior trend characteristics of each power user in future time periods;

[0009] Vector encoding processing the electricity consumption behavior trend characteristics, the response data, and the preference data to obtain a user electricity consumption feature vector;

[0010] The clustering algorithm is used for grouping processing of the user power consumption feature vector, to obtain a user clustering result, the user clustering result including a peak power consumption dominant user group, a valley power consumption dominant user group and a flat section power consumption dominant user group;

[0011] Based on the user clustering result, combined with the power grid peak-valley power supply cost and the user power consumption satisfaction requirement, a gradient boosting tree model is used for parameter optimization processing of the power selling scheme, to generate a differentiated power selling scheme adapted to each power user group.

[0012] Optionally, based on the user clustering result, combined with the power grid peak-valley power supply cost and the user power consumption satisfaction requirement, a gradient boosting tree model is used for parameter optimization processing of the power selling scheme, to generate a differentiated power selling scheme adapted to each power user group, including:

[0013] Based on the user clustering result, a power price parameter optimization target setting processing is performed to obtain an optimization target combination corresponding to the peak power consumption dominant user group, the valley power consumption dominant user group and the flat section power consumption dominant user group respectively;

[0014] Combined with the power grid peak-valley power supply cost, a power supply cost constraint condition construction processing is performed to obtain a cost constraint condition of each period;

[0015] Combined with the user power consumption satisfaction requirement, a user satisfaction constraint condition construction processing is performed to obtain a satisfaction constraint condition of each user group;

[0016] A gradient boosting tree model is used for optimization processing of the optimization target combination, the cost constraint condition and the satisfaction constraint condition, to obtain a final power price parameter combination, based on which a differentiated power selling scheme generation processing is performed to form a differentiated power selling scheme adapted to each power user group.

[0017] Optionally, the gradient boosting tree model is used for optimization processing of the optimization target combination, the cost constraint condition and the satisfaction constraint condition, to obtain a final power price parameter combination, including:

[0018] Based on the optimization target combination, the gradient boosting tree model is used for evaluation processing of the current power price parameter combination, to obtain a comprehensive evaluation result including a power supply cost evaluation value and a user satisfaction evaluation value;

[0019] Based on the comprehensive evaluation result, a parameter conflict item in the current power price parameter combination that does not satisfy the cost constraint condition and the satisfaction constraint condition is identified, to obtain a to-be-optimized parameter item;

[0020] Adjust the to-be-optimized parameter item in the current electricity price parameter combination to generate a final electricity price parameter combination, wherein the final electricity price parameter combination satisfies the cost constraint condition and the satisfaction constraint condition.

[0021] Optionally, the LSTM network is adopted to perform time series analysis processing on the historical electricity load data to obtain electricity consumption behavior trend characteristics of each power user in a future time period, including:

[0022] The historical electricity load data is arranged in time sequence into an equal-interval load time sequence;

[0023] The memory unit of the LSTM network is adopted to perform time feature extraction on the load time sequence to obtain time dimension features, and multi-scale feature extraction is performed on the time dimension features to obtain multi-scale time series features;

[0024] Based on the multi-scale time series features, sequence conversion processing is performed to obtain serialized trend features, and feature aggregation processing is performed on the serialized trend features to form the electricity consumption behavior trend characteristics of each power user in the future time period.

[0025] Optionally, the electricity consumption behavior trend characteristics, the responsiveness data and the preference data are subjected to vector encoding processing to obtain a user electricity consumption feature vector, including:

[0026] Based on the electricity consumption behavior trend characteristics, a load fluctuation range and a change rate in a future time period are calculated to obtain trend quantization indexes;

[0027] Based on the responsiveness data, a sensitivity coefficient of a user to peak-valley electricity price changes is determined to obtain responsiveness quantization indexes;

[0028] Based on the preference data, a proportion of electricity consumption of a user in a peak period and a valley period is counted to obtain preference quantization indexes;

[0029] The trend quantization indexes, the responsiveness quantization indexes and the preference quantization indexes are subjected to feature splicing to form a standardized feature combination, and the standardized feature combination is subjected to dimension standardization processing to obtain the user electricity consumption feature vector.

[0030] Optionally, the trend quantization indexes, the responsiveness quantization indexes and the preference quantization indexes are subjected to feature splicing to form a standardized feature combination, and the standardized feature combination is subjected to dimension standardization processing to obtain the user electricity consumption feature vector, including:

[0031] According to a preset feature arrangement order, the trend quantization indexes, the responsiveness quantization indexes and the preference quantization indexes are connected to form an initial feature combination;

[0032] obtaining a numerical adjustment parameter corresponding to each index based on a numerical distribution characteristic of each index in the initial feature combination, wherein the numerical adjustment parameter comprises a reference value and an adjustment coefficient of each index;

[0033] adjusting the initial feature combination based on the numerical adjustment parameter to obtain a standardized feature combination;

[0034] performing standardization processing on the standardized feature combination based on a feature expression form of a preset dimension to form a user electricity consumption feature vector.

[0035] Optionally, the user electricity consumption feature vector is grouped by using a clustering algorithm to obtain a user clustering result, and the user clustering result comprises a peak electricity consumption dominant user group, a valley electricity consumption dominant user group and a flat section electricity consumption dominant user group, and includes:

[0036] obtaining a plurality of initial clustering centers by using a clustering algorithm based on the user electricity consumption feature vector;

[0037] calculating a difference degree between each user electricity consumption feature vector and each initial clustering center, and distributing each user to a corresponding user group based on the difference degree to form a user grouping result;

[0038] obtaining a final clustering center by calculating an average value of all user electricity consumption feature vectors in each user group based on the user grouping result;

[0039] performing user group classification processing based on the final clustering center to generate a user clustering result comprising a peak electricity consumption dominant user group, a valley electricity consumption dominant user group and a flat section electricity consumption dominant user group.

[0040] In a second aspect, the present application provides a power sales scheme generation system based on power user electricity consumption behavior clustering, comprising:

[0041] a collection module configured to collect historical electricity consumption load data, response degree data after electricity price adjustment, and preference data of daily electricity consumption peak period and valley period of each power user;

[0042] an analysis module configured to perform time series analysis processing on the historical electricity consumption load data by using an LSTM network to obtain electricity consumption behavior trend characteristics of each power user in a future time period;

[0043] a processing module configured to perform vector encoding processing on the electricity consumption behavior trend characteristics, the response degree data and the preference data to obtain a user electricity consumption feature vector;

[0044] grouping module, configured to group the user electricity consumption feature vectors by using a clustering algorithm to obtain a user clustering result, the user clustering result including a peak electricity consumption dominant user group, a valley electricity consumption dominant user group, and a flat section electricity consumption dominant user group;

[0045] The optimization module is configured to perform parameter optimization processing on the electricity sales scheme by using a gradient boosting tree model based on the user clustering result, in combination with power grid peak-valley power supply cost and user electricity consumption satisfaction requirements, to generate a differentiated electricity sales scheme adapted to each power user group.

[0046] In a third aspect, the present application provides an electronic device, comprising:

[0047] a memory configured to store a computer program;

[0048] a processor configured to implement the steps of the electricity sales scheme generation method based on power user electricity consumption behavior clustering according to the first aspect when executing the computer program.

[0049] In a fourth aspect, the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executable by a processor to implement the steps of the electricity sales scheme generation method based on power user electricity consumption behavior clustering according to the first aspect.

[0050] The electricity sales scheme generation method based on power user electricity consumption behavior clustering provided by the present application collects historical electricity consumption load data, response data after electricity price adjustment, and preference data of daily electricity consumption peak period and valley period of each power user; performs time series analysis processing on the historical electricity consumption load data by using an LSTM network to obtain electricity consumption behavior trend characteristics of each power user in a future time period; performs vector encoding processing on the electricity consumption behavior trend characteristics, the response data, and the preference data to obtain user electricity consumption feature vectors; performs grouping processing on the user electricity consumption feature vectors by using a clustering algorithm to obtain a user clustering result, the user clustering result including a peak electricity consumption dominant user group, a valley electricity consumption dominant user group, and a flat section electricity consumption dominant user group; performs parameter optimization processing on the electricity sales scheme by using a gradient boosting tree model based on the user clustering result, in combination with power grid peak-valley power supply cost and user electricity consumption satisfaction requirements, to generate a differentiated electricity sales scheme adapted to each power user group.

[0051] The technical scheme of the present application has the following beneficial effects:

[0052] The application firstly collects historical power consumption load data, price response data and peak-valley period preference data of each power user, comprehensively covers user power consumption history characteristics, price sensitivity characteristics and period selection habits, provides complete multi-dimensional basis support for subsequent analysis, and effectively avoids analysis result deviation caused by data loss; then the LSTM network is used to analyze the time series of the historical power consumption load data, relying on the long-term dependence capturing ability of the LSTM network for time series data, breaking through the limitation of traditional statistical history data, deeply mining the time evolution law of user power consumption load, accurately obtaining the future power consumption behavior trend characteristics of each user, providing key forward-looking basis for subsequent clustering grouping and scheme formulation; then the power consumption behavior trend characteristics, response data and preference data are vector encoded, and the multi-dimensional and heterogeneous power consumption related data are converted into user power consumption feature vectors in a unified format, which not only eliminates the interference of data format difference on clustering analysis, but also realizes multi-feature fusion integration, ensuring that the clustering algorithm can accurately group users based on complete feature dimensions; then the clustering algorithm is used to group the feature vectors, and the clustering results of peak, valley and flat section power consumption dominant groups are obtained, the users are classified and dispersed according to the core characteristics of user power consumption, and the power consumption differences of different groups are clarified, providing clear group division basis for differentiated scheme formulation; finally, combining the peak-valley power supply cost of the power grid and the user satisfaction requirement, the gradient boosting tree model is used to optimize the power selling scheme parameters, considering the power grid operation cost and user demand, and generating differentiated schemes suitable for each group, realizing the collaborative optimization of power grid operation efficiency and user experience.

[0053] Further, the application firstly sets the optimization target of the price parameter, obtains the optimization target combination corresponding to the peak power consumption dominant type, the valley power consumption dominant type and the flat section power consumption dominant type user groups respectively; then constructs the cost constraint condition of each period combined with the peak-valley power supply cost of the power grid, and constructs the satisfaction constraint condition of each user group combined with the user power consumption satisfaction requirement; finally, the gradient boosting tree model is used to optimize the above optimization target combination, cost constraint condition and satisfaction constraint condition, and the final price parameter combination is obtained, and the generation process of the differentiated power selling scheme is carried out based on the final price parameter combination, and the differentiated power selling scheme suitable for each power user group is formed.

[0054] The application sets exclusive optimization target combinations for different power consumption dominant groups, avoids the lack of scheme adaptability caused by "one-size-fits-all" target setting; at the same time, the power grid peak-valley period cost constraint and the satisfaction constraint of each group are constructed, so that the parameter optimization process considers the power grid operation cost control and user demand satisfaction; then the gradient boosting tree model is used to accurately optimize the multi-target and multi-constraint, and the final price parameter combination more suitable for the characteristics of each group and the actual situation of the power grid is obtained, and the differentiated power selling scheme finally generated is further improved in pertinence, rationality and accuracy, effectively solving the problem of macroscopic parameter optimization process and unrefined constraint conditions in the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0056] Figure 1 A flowchart of a power user electricity consumption behavior clustering-based electricity sales scheme generation method provided by an embodiment of the present application;

[0057] Figure 2 A specific implementation diagram of a power user electricity consumption behavior clustering-based electricity sales scheme generation method provided by an embodiment of the present application;

[0058] Figure 3 A structural diagram of a power user electricity consumption behavior clustering-based electricity sales scheme generation system provided by an embodiment of the present application;

[0059] Figure 4 A structural diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0060] The current electricity retail market electricity sales scheme depends on simple statistics of user historical electricity consumption data, cannot predict future electricity consumption changes of users, is also difficult to take into account user satisfaction, only formulates fixed packages according to power grid power supply cost, and lacks fine design. This leads to disconnection between the scheme and user electricity consumption characteristics, is not conducive to optimizing peak-valley load of the power grid, cannot meet individualized needs of users, and is difficult to balance power grid efficiency and user experience.

[0061] To solve the above problems, the present application provides a power user electricity consumption behavior clustering-based electricity sales scheme generation method. First, user historical electricity consumption load, price responsiveness and peak-valley preference data are collected, and future electricity consumption trend is analyzed by using time series technology; then multi-dimensional data is integrated to encode electricity consumption characteristics, and users are divided into three types of electricity consumption dominant groups through clustering; finally, the power grid peak-valley power supply cost and user satisfaction are combined, and a multi-factor optimization technology is used to generate differentiated schemes. This method makes up for the short board of future prediction, accurately groups and optimizes, makes the scheme fit the needs of the power grid and users, and solves the problems of adaptability and compatibility of existing schemes.

[0062] For those skilled in the art to better understand the present application, the present application will be further described in detail below in combination with the drawings and specific embodiments. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0063] The core of the present application is to provide a power user electricity behavior clustering-based electricity sales scheme generation method, and a specific embodiment thereof is shown in the flowchart Figure 1 The method comprises:

[0064] S101, collecting historical electricity load data, electricity price adjusted response data, and daily electricity peak period and valley period preference data of each power user.

[0065] In the above scheme, the historical electricity load data refers to the actual electricity power or electricity quantity data of the power user in the past period, such as the past 3 months, the past half year, every time unit, such as every 15 minutes, every 1 hour, which can reflect the user's past electricity intensity and time distribution rule; the electricity price adjusted response data refers to the related data of the user's electricity quantity changing when the electricity price is adjusted, which is used to reflect the user's sensitivity to the electricity price change; the preference data refers to the proportion data of the user's electricity quantity in the peak period and the valley period to the total electricity quantity in a day based on the grid specified peak period and valley period, which can reflect the user's preference for concentrated electricity use in which period.

[0066] In the present application example, first, the historical electricity load data collection is carried out: the intelligent meter cluster is used as the data collection equipment, an independent intelligent meter is configured for each power user, the intelligent meter collects the actual electricity quantity data of the user in real time at a frequency of every 15 minutes, at the same time, the collected electricity quantity data is associated with the corresponding user ID, and is transmitted to the back-end data storage system through the power communication network for structured storage, forming a historical electricity load data table containing "user ID-collection time-electricity quantity", which provides basic electricity data support for the collection of the following two types of data.

[0067] Secondly, the electricity price adjusted response data collection is carried out: the time node and adjustment amplitude of each electricity price adjustment are recorded by the electricity sales management system, based on the time node, the electricity quantity data of the corresponding user in the past 30 days before and after the adjustment is called from the formed historical electricity load data table, the daily average electricity quantity change of each user before and after the electricity price adjustment is calculated, and the associated data of "user ID-electricity price adjustment amplitude-daily average electricity quantity before adjustment-daily average electricity quantity after adjustment" is integrated as the electricity price adjusted response data, the generation of the data directly depends on the collected historical electricity load data.

[0068] Finally, the preference data of daily peak and valley periods is collected: first, the peak and valley periods of each day are determined based on the grid operation standard, then the total electricity consumption of each user in the peak period and the total electricity consumption in the valley period within 30 consecutive days are extracted from the formed historical electricity load data table, the proportion of peak period electricity consumption to total daily electricity consumption and the proportion of valley period electricity consumption to total daily electricity consumption are calculated, and the average of the two types of proportions within 30 days is taken as the peak and valley period preference data of the user, forming a preference data table containing "user ID-peak period electricity consumption proportion average-valley period electricity consumption proportion average"; the historical electricity load data table, response data, and preference data table are summarized to the same data management module to provide complete basic data for subsequent LSTM time series analysis of S102, vector encoding processing of S103, and clustering grouping of S104.

[0069] In practical application, a certain area covers 100 residential users (numbered A001 to A100) and 50 small and micro enterprise users (numbered B001 to B050), and S101 data collection work is carried out for the users in this area.

[0070] First, compatible smart meters are configured for all users, and the smart meters collect the actual electricity consumption of the users at a frequency of every 15 minutes. The collected data is transmitted to the regional power data storage system through the regional power communication network and stored in a structured format of "user ID-collection time-electricity consumption (unit: kWh)", forming a historical electricity load data table. For example, the electricity consumption of residential user A001 from 8:00 to 8:15 on February 1 of a certain year is 1.2 kWh, from 8:15 to 8:30 is 1.1 kWh, and from 8:30 to 8:45 is 1.0 kWh. The electricity consumption of small and micro enterprise B001 during the same period is 5.3 kWh, 5.5 kWh, and 5.4 kWh, respectively. Such data is recorded continuously for 3 months in chronological order, and will be directly used as the core input for time series analysis of the LSTM network in S102 to mine the future electricity consumption behavior trend characteristics of users A001, B001, etc.

[0071] Next, on March 1 of a certain year, the region implements electricity price adjustment, with peak segment electricity price up by 0.08 yuan / kWh and valley segment electricity price down by 0.05 yuan / kWh. The time node of this adjustment is recorded through the electricity sales management system, i.e. T0=March 1 of a certain year, and the adjustment amplitude is =0.08 yuan / kWh, =-0.05 yuan / kWh; then the total electricity consumption of all users in the 30 days before T0 is 450 kWh, and the total electricity consumption of B001 during the same period is 6000 kWh, and the daily average electricity consumption of the user is calculated according to the following formula: , where E is the daily average electricity consumption (unit: kWh / day), is the sum of total daily electricity consumption of the user in the statistical period (unit: kWh), n is the number of days in the statistical period, here n = 30 days, and the daily average electricity consumption of A001 before adjustment is obtained = 450 kWh ÷ 30 = 15 kWh / day, and the daily average electricity consumption of B001 before adjustment is obtained = 6000 kWh ÷ 30 = 200 kWh / day, the total electricity consumption of A001 in the 30 days after T0 is 390 kWh, and the total electricity consumption of B001 in the same period is 5400 kWh; Similarly, the daily average electricity consumption of A001 after adjustment is obtained = 390 kWh ÷ 30 = 13 kWh / day, and the daily average electricity consumption of B001 after adjustment is obtained = 5400 kWh ÷ 30 = 180 kWh / day, and the daily average electricity consumption change is calculated by the formula , where is the daily average electricity consumption change, unit: kWh / day, and the daily average electricity consumption change of A001 is obtained = 13 kWh / day - 15 kWh / day = -2 kWh / day, and the daily average electricity consumption change of B001 is obtained = 180 kWh / day - 200 kWh / day = -20 kWh / day, and a response dataset containing "user ID- ID- - - - - " is formed. This dataset will be used for vector encoding processing in S103 as an important part of the user electricity consumption feature vector.

[0072] Then, according to the regional power grid operation standard, the daily peak period is determined to be 8:00-22:00, with a duration of 14 hours, and the valley period is determined to be 22:00-8:00 the next day, with a duration of 10 hours. From the historical electricity load data table, the electricity consumption data of A001 on February 1 is extracted: the total electricity consumption of 56 times of collection in the peak segment is 11.2 kWh, the total electricity consumption of 40 times of collection in the valley segment is 3.8 kWh, and the total electricity consumption of 96 times of collection in the whole day is 15 kWh. Then, according to the formula , where is the single-day peak segment electricity consumption ratio, is the single-day peak segment total electricity consumption, is the single-day total electricity consumption, m = 56, p = 96, and the data is substituted to obtain the single-day peak segment electricity consumption ratio of A001 on February 1 = 11.2 kWh ÷ 15 kWh ≈ 0.747, and then according to the formula , where is the single-day valley segment electricity consumption ratio, The total power consumption of a single day valley section is calculated, q=40, and the data is substituted to obtain the daily peak valley power consumption data of A001 on February 1 =3.8kWh÷15kWh≈0.253. Similarly, the daily peak valley power consumption data of A001 from January 30 to February 28 is extracted, and the daily is calculated. , The 30-day average of A001 is calculated: =(0.747+0.752+…+0.751)÷30≈0.75, =(0.253+0.248+…+0.249)÷30≈0.25; the 30-day average of B001 is ≈0.6, ≈0.4. Finally, a preference data set containing "user ID- - " is formed, in which the 、 of A001 and the 、 of B001 are

[0073] The above-mentioned S101 overall scheme covers the historical rules of user power consumption, price sensitivity characteristics and time period selection habits of three core dimensions by comprehensively collecting historical power consumption load data, response data after price adjustment and peak valley period preference data of power users, avoiding the problem of incomplete information caused by collecting only single power consumption data in the prior art. In the collection process, the three types of data are associated and integrated through the user ID, ensuring that the subsequent steps can analyze the multi-dimensional characteristics of the same user.

[0074] S102, using LSTM network, time series analysis and processing of the historical power consumption load data, obtaining the power consumption behavior trend characteristics of each power user in the future time period.

[0075] Optionally, in step S102, the historical power consumption load data is analyzed and processed by using the LSTM network to obtain the power consumption behavior trend characteristics of each power user in the future time period, including:

[0076] Step 1021, arranging the historical power consumption load data in time sequence into an equal-interval load time series.

[0077] ​In step 1022, a memory unit of an LSTM network is used to perform time feature extraction on the load time sequence to obtain time dimension features, and multi-scale feature extraction is performed on the time dimension features to obtain multi-scale time sequence features.

[0078] The time dimension features are time variation rules of electricity load extracted from the load time sequence by the LSTM network, including load rise and fall rates in different time periods, daily load peak and valley occurrence time intervals, and correlation of adjacent 15-minute load changes, such as whether the load continues or turns after an increase in the previous 15 minutes, which corresponds to the actual electricity consumption habits of the user, such as concentrated electricity consumption in a specific period, stable or sudden load change, and provides basic time correlation information for subsequent multi-scale time sequence feature extraction. The multi-scale time sequence features are subdivided electricity consumption rules mined according to the hour level and day level based on the time dimension features, covering short-time fluctuations and long-time habit stability, and avoiding missing of single-span analysis. The hour level uses 4 15-minute load data as a window to reflect the average trend of the load within 1 hour, such as rise and fall or stability. The day level uses 96 15-minute load data as a window to reflect the load distribution within 24 hours, such as peak and valley periods and peak-valley differences, and comprehensively depicts the time attributes of electricity consumption behavior to provide multi-dimensional support for converting future electricity consumption trend features.

[0079] In step 1023, sequence conversion processing is performed based on the multi-scale time sequence features to obtain sequence trend features, and feature aggregation processing is performed on the sequence trend features to form electricity consumption behavior trend features of each power user in a future time period.

[0080] The sequence trend features refer to electricity load data sequences corresponding to a future time period formed by sequence conversion processing based on multi-scale time sequence features. The physical meaning is that the hour-level load change trend and day-level peak-valley period distribution rule extracted in the multi-scale time sequence features are converted into the specific state of the user's predicted electricity load in each 15-minute interval in the future, which can intuitively reflect the electricity load size in each short time interval, the load change direction of adjacent intervals, and the continuity rule of the load change in the peak and valley periods of each day in the future time period of the user, providing a fine-grained and continuous future electricity consumption behavior data basis for subsequent feature aggregation, and ensuring that the trend features after aggregation can accurately correspond to the user's future actual electricity consumption scenario.

[0081] In the above scheme, the equally spaced load time series refers to arranging the historical electricity load data according to the collection time sequence to form a continuous data sequence with fixed time intervals, which is used to adapt to the input requirements of the LSTM network for time series data; the LSTM network memory unit refers to the core component of the long short-term memory network, which has the ability to selectively store and forget key information in time series data, can capture long-term time dependence of data, and is used to extract time correlation features of electricity load data; the time dimension feature refers to the basic feature extracted from the load time series by the LSTM memory unit, reflecting the change of electricity load with time; the multi-scale time series feature refers to the feature further extracted from the time dimension feature according to different time scales, which can cover short-term and long-term electricity rules; the serialized trend feature refers to the serialized data converted from the multi-scale time series feature in a format conforming to the future time period data, which embodies the electricity change trend; the future electricity behavior trend feature refers to the feature set formed after aggregating the serialized trend feature, which can comprehensively reflect the electricity load size and time period distribution rule of the user in the future period.

[0082] In the examples of the present application, first, an equally spaced load time series is constructed by step 1021: all electricity consumption data of a single power user is extracted from the historical electricity load data table formed in step S101, and is sorted according to the collection time sequence. Since the collection interval of the smart meter in step S101 has been fixed to 15 minutes, the sorted data naturally forms a load time series with a uniform time interval of 15 minutes, ensuring that the time difference between adjacent data points in the sequence is consistent and there is no data missing.

[0083] Secondly, the time dimension feature and the multi-scale time series feature are extracted by step 1022: the obtained equally spaced load time series is input into the LSTM network, and the memory unit of the LSTM network is used to process the sequence data point by point. The memory unit retains the key time correlation information in the sequence by the forget gate, updates the current data point feature by the input gate, and integrates the time dimension feature reflecting the change rule of electricity load with time by the output gate. The obtained time dimension feature will be further used for the extraction of the multi-scale time series feature, and a multi-scale sliding window technology is used to set two window scales of hour level and day level. The hour level window is used to extract the average change trend of the load within each hour, and the day level window is used to extract the peak value occurrence period rule of the load each day, and finally the multi-scale time series feature covering short-term and long-term electricity rules is formed.

[0084] Finally, the serialized trend feature is converted and aggregated by step 1023: based on the obtained multi-scale time series features, a time series prediction mapping method is used to convert it into a serialized trend feature corresponding to the future time period, and the 15-minute time interval consistent with the historical data is maintained during the conversion process to ensure that the format of the serialized trend feature matches the subsequent analysis requirements. Subsequently, a feature aggregation algorithm is used to aggregate the serialized trend feature according to three dimensions: future daily peak segment average load, future daily valley segment average load, and load peak fluctuation range in the future time period, forming a future electricity consumption behavior trend feature that can comprehensively reflect the user's future electricity consumption pattern. The future electricity consumption behavior trend feature formed will be transmitted to the data processing module to provide forward-looking data support for the subsequent vector encoding processing of step S103, while ensuring that the responsiveness data and preference data of step S101 form a multi-dimensional feature complement.

[0085] In actual application, for a certain area of residential users A001 and small and micro enterprise users B001, S102 step processing is carried out based on the historical electricity consumption load data collected in S101 step.

[0086] Firstly, the electricity consumption data of A001 from January 30th to February 28th is extracted from the historical electricity consumption load data table of S101 step, and is sorted according to the collection time. This time period is 30 days, and 15-minute electricity consumption is collected every 15 minutes for 24 hours every day, so there are 24x4=96 times of collection every day, and the total number of collection times for 30 days is 30x96=2880 times. Therefore, the equal-interval load time series of A001 contains 2880 data points, each data point corresponding to 15 minutes of electricity consumption. Similarly, the same period data of B001 is extracted to construct an equal-interval load time series containing 2880 data points. These two sequences will be used as input data for subsequent LSTM network analysis of A001 and B001.

[0087] Next, the equal-interval load time series of A001 is input into the pre-trained LSTM network, which contains 3 layers of hidden layers, each layer with 64 memory cells. After processing by the LSTM memory cells, the time dimension feature of A001 is obtained, and then a multi-scale sliding window technique is used to extract multi-scale time series features: the hour-level window size is set to 4, the load change rate of adjacent data points in the window is calculated and the average value is taken, and the load change rate is calculated according to the formula , where r is the load change rate, is the electricity consumption of the i+1th data point in the window, is the electricity consumption of the ith data point in the window, The interval time of data points is 15 minutes. For example, taking the four data points of A001 in an hour, the power consumptions are 1.1 kWh, 1.2 kWh, 1.3 kWh and 1.4 kWh, respectively, the adjacent change rates are (1.2-1.1) / 15=0.0067 kWh / minute, (1.3-1.2) / 15=0.0067 kWh / minute, (1.4-1.3) / 15=0.0067 kWh / minute, respectively, and the average is 0.0067 kWh / minute, which is the hourly feature of the hour. The daily window size is set to 96, the maximum power consumption in 96 data points per day and the occurrence time are calculated, and the average occurrence time of the maximum power consumption in 30 days is taken as the daily feature. For example, the average occurrence time of the peak load of A001 in 30 days is 8 hours and 45 minutes, which is the daily feature. B001 is processed by the same method to obtain the hourly and daily features.

[0088] Then, the multi-scale time sequence features of A001 are converted into the sequenced trend features of the future 7 days by using the time sequence prediction mapping method. There are 7*96=672 data points in the future 7 days, and each data point corresponds to the predicted power consumption of 15 minutes in the future. Then, the aggregated features are calculated according to the following formula: wherein, is the peak segment average load in the future 7 days, is the total power consumption of all data points in the peak segment in the future 7 days, is the total number of data points in the peak segment in the future 7 days. The peak segment is from 8:00 to 22:00 every day, and the number of peak segment collection times per day is 14*4=56 times. In the future 7 days, =7*56=392 times. Assuming that the total power consumption of the peak segment of A001 in the future 7 days is 470.4 kWh, then =470.4 kWh / 392=1.2 kWh / 15 minutes. The formula for calculating the average load of the valley segment in each day in the future is wherein, is the valley segment average load in the future 7 days, is the total power consumption of all data points in the valley segment in the future 7 days, is the total number of data points in the valley segment in the future 7 days. The valley segment is from 22:00 to 8:00 the next day every day, and the number of valley segment collection times per day is 10*4=40 times. In the future 7 days, =7*40=280 times. Assuming that the total power consumption of the valley segment of A001 in the future 7 days is 224 kWh, then =224 kWh / 280=0.8 kWh / 15 minutes. The formula for calculating the fluctuation range of the peak load in the future is wherein, is the fluctuation range of the peak load in the future 7 days, is the maximum power consumption in all data points in the peak segment in the future 7 days, The minimum power consumption in all data points of the peak segment for the next 7 days. Assuming that the maximum power consumption of A001 in the peak segment for the next 7 days is 1.8 kWh, and the minimum power consumption is 1.5 kWh, then = 1.8 kWh - 1.5 kWh = 0.3 kWh. Through the above calculation, the future power consumption behavior trend characteristics of A001 are obtained as follows: the average load in the peak segment for the next 7 days is 1.2 kWh / 15 minutes, the average load in the valley segment is 0.8 kWh / 15 minutes, and the load peak fluctuation range is 0.3 kWh. B001 is calculated by the same method, and the average load in the peak segment for the next 7 days is 5.8 kWh / 15 minutes, the average load in the valley segment is 4.2 kWh / 15 minutes, and the load peak fluctuation range is 0.3 kWh.

[0089] Finally, the future power consumption behavior trend characteristics of A001 and B001 are transmitted to the data processing module. In the subsequent S103 step, the daily average power consumption change in the response data of A001 obtained in the S101 step, the average peak segment power consumption ratio in the preference data, and the corresponding response data and preference data of B001 are jointly processed by vector encoding to form a user power consumption feature vector containing historical, future, price sensitivity, and time period preference multidimensional features, providing complete feature support for user clustering grouping in the S104 step.

[0090] The above S102 overall scheme performs time series analysis on the collected historical power consumption load data through the LSTM network, breaking through the limitation of the prior art that only relies on historical data statistics and cannot predict future power consumption trends. The construction of equidistant load time series ensures the standardization of data input, providing a high-quality analysis basis for the LSTM network. The LSTM memory unit can accurately capture the long-term time dependence of power consumption load and avoid interference from irregular fluctuations in feature extraction. The extraction of multi-scale time series features covers short-term and long-term power consumption rules, making the features more comprehensive. The conversion and aggregation of serialized trend features convert the multi-scale features into trend features that can directly reflect future power consumption rules.

[0091] S103, vector encoding processing is performed on the power consumption behavior trend characteristics, the response data and the preference data to obtain a user power consumption feature vector.

[0092] Optionally, in step S103, the power consumption behavior trend characteristics, the response data and the preference data are vector encoded to obtain a user power consumption feature vector, comprising:

[0093] Step 1031, based on the power consumption behavior trend characteristics, calculating the load fluctuation range and the change rate in the future time period to obtain a trend quantization index.

[0094] Step 1032, based on the response data, determine the sensitivity coefficient of the user to the peak-valley electricity price change, and obtain a response quantification index.

[0095] Step 1033, based on the preference data, count the electricity consumption proportion of the user in the peak period and the valley period, and obtain a preference quantification index.

[0096] Step 1034, splice the trend quantification index, the response quantification index and the preference quantification index to form a standardized feature combination, and perform dimension standardization processing on the standardized feature combination to obtain a user electricity consumption feature vector.

[0097] The step 1034 can specifically include the following steps: according to a preset feature arrangement order, connect the trend quantification index, the response quantification index and the preference quantification index to form an initial feature combination; based on the numerical distribution characteristics of each index in the initial feature combination, obtain a numerical adjustment parameter corresponding to each index, wherein the numerical adjustment parameter includes a reference value and an adjustment coefficient of each index; based on the numerical adjustment parameter, adjust the initial feature combination to obtain a standardized feature combination; based on a feature expression form of a preset dimension, standardize the standardized feature combination to form a user electricity consumption feature vector.

[0098] The implementation process of the standardized feature combination is: first, determine the reference value and the adjustment coefficient of each index in the initial feature combination; then perform a "subtract reference value" operation on each index value to eliminate the influence of absolute numerical difference; then multiply the result by the adjustment coefficient to unify the numerical fluctuation range and avoid the interference of the order of magnitude caused by different dimensions; finally, obtain standardized data in a similar interval and capable of horizontal comparison to constitute the standardized feature combination; the "feature expression form of a preset dimension" needs to be fixed in combination with the number and attributes of the quantification index in the step S103 and the vector dimension and meaning. In this scheme, the trend quantification index contains two indexes, the response quantification index contains one index, and the preference quantification index contains two indexes, so a 5-dimensional fixed structure vector is preset. The definitions of each dimension are as follows: the first dimension corresponds to "future load fluctuation range", which is a floating point number with a value of [-2, 2], reflecting the stability of future electricity load; the second dimension corresponds to "future load change rate", which is a floating point number with a value of [-2, 2], reflecting the speed of load period change; the third dimension corresponds to "electricity price sensitivity coefficient", which is a floating point number with a value of [-5, 5], reflecting the reaction degree to electricity price adjustment; the fourth dimension corresponds to "peak segment electricity consumption proportion", which is a floating point number with a value of [-3, 3], reflecting the preference for peak electricity consumption; and the fifth dimension corresponds to "valley segment electricity consumption proportion", which is a floating point number with a value of [-3, 3], reflecting the preference for valley electricity consumption.

[0099] In the above scheme, the trend quantization indicator refers to the future load fluctuation range and change rate calculated based on the trend characteristics of electricity consumption behavior, which is used to quantify the stability and change speed of future electricity consumption of the user; the response quantization indicator refers to the sensitivity coefficient of the user to the peak-valley electricity price change determined based on the response degree data, which is used to quantify the reaction degree of the user to the electricity price change; the preference quantization indicator refers to the proportion of the electricity consumption in the peak segment and the valley segment of the user calculated based on the preference data, which is used to quantify the time period electricity consumption tendency of the user; the initial feature combination refers to the original feature set formed by splicing the three types of quantization indicators in a predetermined order; the numerical adjustment parameter refers to the reference value and adjustment coefficient determined based on the numerical distribution of the initial feature combination, which is used to eliminate the dimensional difference of different indicators; the standardized feature combination refers to the feature set processed by the numerical adjustment parameter, which has a unified numerical range; and the user electricity consumption feature vector refers to the vector form converted from the standardized feature combination, which is used for subsequent clustering analysis in S104 and provides structured feature input for accurate grouping.

[0100] In the examples of the present application, first, the trend quantization indicator is calculated by step 1031: taking the electricity consumption behavior trend characteristics output by S102 as input, the load peak fluctuation range is extracted as the first trend quantization indicator; and the difference between the future peak segment average load and the valley segment average load is calculated, and then divided by the difference between the peak segment duration and the valley segment duration, to obtain the load change rate in the future time period as the second trend quantization indicator. The trend quantization indicator will be one of the basic data for subsequent feature splicing, providing quantization information of the future electricity consumption stability and change speed of the user for vector encoding.

[0101] Secondly, the response quantization indicator is determined by step 1032: taking the response degree data collected in S101 as input, the daily electricity consumption change amount, the peak segment electricity price adjustment amplitude, and the valley segment electricity price adjustment amplitude are extracted; the product of the peak segment electricity price adjustment amplitude and the peak segment duration is calculated, and then the product of the valley segment electricity price adjustment amplitude and the valley segment duration is added, to obtain the total electricity price adjustment impact value; and then the daily electricity consumption change amount is divided by the total electricity price adjustment impact value, to obtain the sensitivity coefficient of the user to the peak-valley electricity price change, i.e. the response quantization indicator. The response quantization indicator will participate in the subsequent feature splicing together with the trend quantization indicator, providing quantization information of the electricity price sensitivity of the user.

[0102] Then, the preference quantization indicator is calculated by step 1033: taking the preference data collected in S101 as input, the peak segment electricity consumption proportion mean value and the valley segment electricity consumption proportion mean value are directly extracted as the preference quantization indicator. The preference quantization indicator will be summarized with the previous two types of indicators, providing quantization information of the time period electricity consumption tendency of the user for feature splicing.

[0103] Finally, the user electricity consumption feature vector is generated by step 1034: first, connect the three types of indexes obtained in steps 1031, 1032 and 1033 in the order of the preset “trend quantification index, response quantification index, preference quantification index” to form an initial feature combination; second, analyze the numerical distribution of each index in the initial feature combination, calculate the mean value of each index as a reference value, calculate the standard deviation of each index and take the reciprocal as an adjustment coefficient, and the reference value and the adjustment coefficient together constitute the numerical adjustment parameter; third, subtract the corresponding reference value from the numerical value of each index in the initial feature combination, and multiply it by the corresponding adjustment coefficient to obtain a standardized feature combination; fourth, convert the standardized feature combination into a vector format based on the preset fixed dimension feature expression form to form the user electricity consumption feature vector. The vector will be transmitted to step S104 as input data of the clustering algorithm to support accurate grouping of user electricity consumption behaviors.

[0104] In actual application, for the residential user A001 and the small and micro enterprise user B001 in a certain area, the S103 step processing is carried out based on the responsiveness data and preference data of S101 step and the electricity consumption behavior trend feature of S102 step.

[0105] Firstly, the electricity consumption behavior trend feature of A001 is the future 7-day peak segment average load 1.2 kWh / 15 minutes, the valley segment average load 0.8 kWh / 15 minutes, and the load peak fluctuation range 0.3 kWh, and the regional power grid stipulates the peak segment duration 14 hours and the valley segment duration 10 hours. According to the formula the load change rate V is calculated, wherein V is the load change rate, the unit is kWh / 15 minutes / hour, the future peak segment average load is the future valley segment average load is the peak segment duration is the valley segment duration is. By substituting the data, A001's V=(1.2-0.8) / (14-10)=0.1 kWh / 15 minutes / hour, so the trend quantification index of A001 is 0.3 kWh, 0.1 kWh / 15 minutes / hour. The electricity consumption behavior trend feature of B001 is the future 7-day peak segment average load 5.8 kWh / 15 minutes, the valley segment average load 4.2 kWh / 15 minutes, and the load peak fluctuation range 0.3 kWh, and the trend quantification index is calculated as 0.3 kWh, 0.4 kWh / 15 minutes / hour.

[0106] Then, since the responsiveness data of A001 is the daily electricity consumption change amount -2 kWh / day, the peak segment electricity price adjustment amplitude 0.08 yuan / kWh, and the valley segment electricity price adjustment amplitude = -0.05 yuan / kWh. According to the formula the sensitivity coefficient is calculated, wherein S is the sensitivity coefficient, is the daily change in electricity consumption, is the peak segment electricity price adjustment range, is the valley segment electricity price adjustment range, is the peak segment duration, is the valley segment duration. Substituting the data gives the denominator = 0.08 * 14 + (-0.05) * 10 = 1.12 - 0.5 = 0.62, S = -2 / 0.62 ≈ -3.23, so the response quantification index of A001 is -3.23. The response data of B001 is = -20 kWh / day, and the denominator is calculated in the same way = 0.62, S = -20 / 0.62 ≈ -32.26, and the response quantification index is -32.26.

[0107] Then, the preference quantification index is calculated. Since the preference data of A001 is that the average peak segment electricity consumption is 0.75 and the average valley segment electricity consumption is 0.25, these two data are directly extracted as the preference quantification index, i.e., 0.75 and 0.25. The preference data of B001 is Rpeak = 0.6 and Rvalley = 0.4, and the preference quantification index is 0.6 and 0.4.

[0108] Then, according to the preset order "trend quantification index, response quantification index, preference quantification index", the initial feature combination of A001 is 0.3, 0.1, -3.23, 0.75, 0.25, and the initial feature combination of B001 is 0.3, 0.4, -32.26, 0.6, 0.4. Subsequently, the numerical distribution of the initial feature combination is analyzed to determine the mean μ, standard deviation σ and adjustment coefficient k of each index, wherein the adjustment coefficient k is the reciprocal of the standard deviation σ. Since the trend fluctuation ranges of the two users are the same, the mean μ1 of the trend fluctuation range is 0.3, the standard deviation σ1 is 0, and the adjustment coefficient k1 is 0. The mean μ2 of the trend change rate is 0.25, the standard deviation σ2 is 0.212, and the adjustment coefficient k2 is approximately 4.72. The mean μ3 of the response sensitivity coefficient is -17.745, the standard deviation σ3 is 20.58, and the adjustment coefficient k3 is approximately 0.0486. The mean μ4 of the preference peak proportion is 0.675, the standard deviation σ4 is 0.106, and the adjustment coefficient k4 is approximately 9.43. The mean μ5 of the preference valley proportion is 0.325, the standard deviation σ5 is 0.106, and the adjustment coefficient k5 is approximately 9.43. The standardized values are calculated according to the formula , wherein represents the standardized feature value, Representing the initial characteristic value, μ represents the index mean, k represents the adjustment coefficient, A001 is standardized to get 0, (0.1-0.25)×4.72≈-0.71, (-3.23+17.745)×0.0486≈0.71, (0.75-0.675)×9.43≈0.71, (0.25-0.325)×9.43≈-0.71, converted to 5-dimensional user electricity feature vector 0, -0.71, 0.71, 0.71, -0.71. B001 is standardized to get 0, (0.4-0.25)×4.72≈0.71, (-32.26+17.745)×0.0486≈-0.71, (0.6-0.675)×9.43≈-0.71, (0.4-0.325)×9.43≈0.71, converted to vector 0, 0.71, -0.71, -0.71, 0.71.

[0109] Finally, the user electricity feature vectors of A001 and B001 are transmitted to S104 step as input data of clustering algorithm. Subsequently in S104 step, the clustering algorithm will group based on the numerical difference of these vectors, for example, the vector of A001 may be divided into high peak electricity dominant user group because the peak segment proportion related characteristic value is high; the vector of B001 may be divided into low valley electricity dominant user group because the valley segment proportion related characteristic value is high, which provides group division basis for S105 step to generate differentiated electricity sales scheme.

[0110] The above S103 overall scheme quantifies the three types of heterogeneous data of user future electricity trend, price sensitivity and time period preference into trend, response and preference quantitative indicators respectively, eliminating the format difference of different data types and laying a foundation for subsequent integrated analysis; the splicing of initial feature combination realizes the preliminary aggregation of multi-dimensional information, ensuring that the core electricity features of users are not missed; the determination of numerical adjustment parameter and the standardization process unify the dimensions of each indicator, avoiding the excessive emphasis of clustering algorithm on certain indicators due to the difference in value range; and the finally formed user electricity feature vector has the characteristics of structuring and standardization.

[0111] S104, using a clustering algorithm, grouping processing is performed on the user electricity feature vector to obtain a user clustering result, the user clustering result comprising a high peak electricity dominant user group, a low valley electricity dominant user group and a flat segment electricity dominant user group.

[0112] Optionally, in step S104, a clustering algorithm is used to group process the user electricity feature vector to obtain a user clustering result, the user clustering result comprising a high peak electricity dominant user group, a low valley electricity dominant user group and a flat segment electricity dominant user group, comprising:

[0113] Step 1041, based on the user power consumption feature vector, a clustering algorithm is used to perform clustering center positioning processing to obtain multiple initial clustering centers.

[0114] Step 1042, the difference degree between each user power consumption feature vector and each initial clustering center is calculated, and based on the difference degree, each user is assigned to a corresponding user group to form a user grouping result.

[0115] Step 1043, based on the user grouping result, the average value of all user power consumption feature vectors in each user group is calculated to obtain a final clustering center.

[0116] Step 1044, based on the final clustering center, user group classification processing is performed to generate a user clustering result including a peak power consumption dominant user group, a valley power consumption dominant user group, and a flat section power consumption dominant user group.

[0117] In the above scheme, the initial clustering center refers to an initial vector representing a potential user group selected from all user power consumption feature vectors at the beginning of clustering, providing a reference benchmark for subsequent grouping; the difference degree measured by the Euclidean distance is the numerical similarity between a single user power consumption feature vector and a clustering center, and the smaller the distance, the more similar the features; the user grouping result refers to a preliminary grouping set formed after all users are assigned to the group to which the corresponding initial clustering center belongs based on the difference degree; the final clustering center refers to a vector obtained by calculating the average value of each dimension of all feature vectors in each user group, which can more accurately represent the grouping characteristics than the initial clustering center; the user clustering result refers to three types of groups formed by classifying the time period preference characteristics based on the final clustering center, i.e., peak power consumption dominant, valley power consumption dominant, and flat section power consumption dominant user groups.

[0118] In the examples of the present application, first, the initial clustering centers are determined by step 1041: based on all user power consumption feature vectors obtained in step S103, a K-means clustering algorithm is used to perform processing, and since three types of power consumption dominant groups, i.e., peak, valley, and flat section, need to be divided, the number of clusters K is preset to 3. Three non-repeating vectors are randomly selected from all user power consumption feature vectors as initial clustering centers, which will serve as a reference benchmark for calculating the difference degree in step 1042 and provide an initial reference for subsequent user grouping.

[0119] Second, the user grouping result is formed by step 1042: for each user power consumption feature vector, the difference degree with the three initial clustering centers is calculated using the Euclidean distance formula, which is where d is the Euclidean distance, i.e., the difference degree, n is the vector dimension, and in the present scheme, n=5, is the i-th dimension value of the user power consumption feature vector. is the i-th dimension value of the initial clustering center, and each user's power consumption feature vector is assigned to the group to which the initial clustering center with the smallest distance belongs. After all vector assignments are completed, a user grouping result is formed, which will be used to calculate the final clustering center in step 1043.

[0120] Next, the final clustering center is calculated by step 1043: for each user grouping formed in step 1042, the dimension values of all user power consumption feature vectors in the group are extracted, and the average value of each dimension is calculated, such as the average value of the 4th dimension "peak segment power consumption proportion standardized value", the average value of the 5th dimension "valley segment power consumption proportion standardized value", and so on. These dimension average values are combined in the original vector dimension order to obtain the final clustering center of each grouping.

[0121] Finally, the user clustering result is generated by step 1044: the 4th and 5th dimensions of the three final clustering centers are analyzed. If the 4th dimension value of a final clustering center is significantly higher than the other two centers, and the 5th dimension value is significantly lower than the other two centers, then the group to which the center belongs is classified as a high peak power consumption dominant user group; if the 5th dimension value is significantly higher than the other two centers, and the 4th dimension value is significantly lower than the other two centers, then it is classified as a low valley power consumption dominant user group; if the 4th and 5th dimension values are at an intermediate level and meet the flat segment power consumption feature, then it is classified as a flat segment power consumption dominant user group. The formed user clustering result will be transmitted to step S105, providing a basis for group division for parameter optimization and generation of differentiated electricity sales schemes.

[0122] In practical applications, for 100 residential users (numbered A001 to A100) and 50 small and micro enterprise users (numbered B001 to B050) in a certain area, the S104 step processing is carried out based on the 150 user power consumption feature vectors obtained in step S103.

[0123] First, the number of clusters K is preset to 3, and 3 are randomly selected from the 150 user power consumption feature vectors as initial clustering centers, which are C1 (vector [0.1, -0.6, 0.8, 0.8, -0.7] of A002), C2 (vector [-0.1, 0.5, -0.6, -0.7, 0.6] of B002), and C3 (vector [0, 0.1, -0.1, 0.2, -0.2] of A003). These three initial clustering centers will be used for subsequent calculation of the difference between each user vector and the center.

[0124] Next, the Euclidean distance formula is used to calculate the difference between each user power consumption feature vector and the three initial clustering centers, where d is the Euclidean distance, i is the vector dimension (1 to 5), is the i-th dimension value of the user vector, is the i-th dimension value of the user vector, is the initial clustering center i-th dimension value. Taking the vector [0, -0.71, 0.71, 0.71, -0.71] of the resident user A001 as an example, the distance between A001 and C1 is calculated as follows: first, the square of the difference of each dimension is calculated: (0-0.1)²=0.01, (-0.71+0.6)²=0.0121, (0.71-0.8)²=0.0081, (0.71-0.8)²=0.0081, (-0.71+0.7)²=0.0001; second, the sum of squares is calculated: 0.01+0.0121+0.0081+0.0081+0.0001=0.0384; third, the square root is calculated: Similarly, the distance between the vector of A001 and C2 is about 2.1, and the distance between the vector of A001 and C3 is about 1.5. Since the distance between A001 and C1 is the smallest, A001 is assigned to the group to which C1 belongs. Taking the vector [0, 0.71, -0.71, -0.71, 0.71] of the small and micro enterprise user B001 as an example, the distance between B001 and C2 is calculated as follows: the square of the difference of each dimension: (0+0.1)²=0.01, (0.71-0.5)²=0.0441, (-0.71+0.6)²=0.0081, (-0.71+0.7)²=0.0001, (0.71-0.6)²=0.0121; the sum of squares: 0.01+0.0441+0.0081+0.0001+0.0121=0.0744; the square root: 6. The distance between the vector of B001 and C1 is about 2.3, and the distance between the vector of B001 and C3 is about 1.6. Since the distance between B001 and C2 is the smallest, B001 is assigned to the group to which C2 belongs. According to this logic, all 150 user vectors are processed, and finally three user groups are formed, the group to which C1 belongs contains 52 users, the group to which C2 belongs contains 48 users, and the group to which C3 belongs contains 50 users.

[0125] Then, for the 52 user vectors to which C1 belongs, the 5-dimensional values of each vector are extracted, and the average value of each dimension is calculated: the 1st dimension (future load fluctuation range standardized value): the total sum of the 1st dimension values of the 52 vectors is about 4.16, and the average value is 4.16 ÷ 52 = 0.08; the 2nd dimension (future load change rate standardized value): the total sum of the values is about -28.6, and the average value is -28.6 ÷ 52 ≈ -0.55; the 3rd dimension (price sensitivity coefficient standardized value): the total sum of the values is about 39, and the average value is 39 ÷ 52 ≈ 0.75; the 4th dimension (peak segment electricity consumption proportion standardized value): the total sum of the values is about 40.56, and the average value is 40.56 ÷ 52 ≈ 0.78; the 5th dimension (valley segment electricity consumption proportion standardized value): the total sum of the values is about -37.44, and the average value is -37.44 ÷ 52 ≈ -0.72; combining these average values, the final clustering center C1 of the group to which C1 belongs is obtained, that is, C1 final = [0.08, -0.55, 0.75, 0.78, -0.72]. Similarly, the final clustering center C2 of the group to which C2 belongs is calculated as C2 final = [-0.09, 0.52, -0.65, -0.68, 0.65], and the final clustering center C3 of the group to which C3 belongs is calculated as C3 final = [0.01, 0.08, -0.09, 0.22, -0.21].

[0126] Finally, the 4th and 5th dimension values of the three final clustering centers are analyzed: the 4th dimension value of C1 final is 0.78, which is the highest, and the 5th dimension value is -0.72, which is the lowest, so the 52 users belonging to A001 are classified as a high peak electricity consumption dominant user group; the 5th dimension value of C2 final is 0.65, which is the highest, and the 4th dimension value is -0.68, which is the lowest, so the 48 users belonging to B001 are classified as a low valley electricity consumption dominant user group; the 4th dimension value of C3 final is 0.22, and the 5th dimension value is -0.21, both of which are at an intermediate level, so the 50 users belonging to C3 are classified as a flat segment electricity consumption dominant user group. The user clustering result will be transmitted to the S105 step, in which the peak electricity consumption dominant group will be adapted to the peak segment electricity price discount sales scheme parameter optimization, the low valley electricity consumption dominant group will be adapted to the valley segment electricity price discount parameter optimization, and the flat segment electricity consumption dominant group will be adapted to the flat segment electricity price stable parameter optimization, providing a group basis for generating differentiated sales schemes.

[0127] The above S104 overall scheme groups user electricity consumption feature vectors through the K-means clustering algorithm, accurately classifies users with similar features; the selection of the initial clustering center provides a reasonable starting point for grouping, and the quantitative calculation of the difference degree ensures the objectivity of the grouping basis, avoiding classification bias caused by subjective judgment; the calculation of the final clustering center optimizes the group feature representation through the average of the vectors within the group, making the core features of each group clearer; the grouping based on the peak segment and valley segment proportion features clearly defines the division standards of the three types of high peak, low valley, and flat segment electricity consumption dominant groups, ensuring that the classification result is highly consistent with the subsequent sales scheme development requirements.

[0128] S105, based on the user clustering result, combining the power grid peak valley power supply cost and the user power consumption satisfaction requirement, using the gradient boosting tree model, performing parameter optimization processing of the power selling scheme, and generating a differentiated power selling scheme adapted to each power user group.

[0129] Optionally, step S105, based on the user clustering result, combining the power grid peak valley power supply cost and the user power consumption satisfaction requirement, using the gradient boosting tree model, performing parameter optimization processing of the power selling scheme, and generating a differentiated power selling scheme adapted to each power user group, comprising:

[0130] Step 1051, based on the user clustering result, performing power price parameter optimization target setting processing, and obtaining an optimization target combination corresponding to the peak power consumption dominant user group, the valley power consumption dominant user group and the flat section power consumption dominant user group, respectively.

[0131] Step 1052, combining the power grid peak valley power supply cost, constructing the power supply cost constraint condition, and obtaining the cost constraint condition of each period.

[0132] Step 1053, combining the user power consumption satisfaction requirement, constructing the user satisfaction constraint condition, and obtaining the satisfaction constraint condition of each user group.

[0133] Step 1054, using the gradient boosting tree model, optimizing the optimization target combination, the cost constraint condition and the satisfaction constraint condition, obtaining a final power price parameter combination, based on the final power price parameter combination, performing differentiated power selling scheme generation processing, and forming a differentiated power selling scheme adapted to each power user group.

[0134] Wherein step 1054 can specifically include the following steps: based on the optimization target combination, using the gradient boosting tree model, performing evaluation processing on the current power price parameter combination, obtaining a comprehensive evaluation result containing power supply cost evaluation value and user satisfaction evaluation value; based on the comprehensive evaluation result, identifying the parameter conflict item in the current power price parameter combination that does not satisfy the cost constraint condition and the satisfaction constraint condition, obtaining the to-be-optimized parameter item; adjusting the to-be-optimized parameter item in the current power price parameter combination to generate a final power price parameter combination, wherein the final power price parameter combination satisfies the cost constraint condition and the satisfaction constraint condition.

[0135] The parameter conflict item is all specific parameters in the current electricity price parameter combination that do not meet the cost constraint condition or the satisfaction constraint condition, for example, the peak segment electricity price of a group is lower than the cost lower limit, the valley segment electricity price adjustment range of a group exceeds the user acceptable range, etc., and the parameter to be optimized item is the key parameter identified from the parameter conflict item and capable of solving the conflict by adjustment, that is, the parameter conflict item is the source of the parameter to be optimized item, and the parameter to be optimized item is the specific object that needs to be adjusted to meet the constraint condition in the parameter conflict item, and the two are the association relationship of "the whole and the part to be adjusted", that is, by adjusting the parameter to be optimized item, the corresponding parameter conflict item can be eliminated, so that the electricity price parameter combination meets all constraint requirements.

[0136] In the above scheme, the power grid peak-valley power supply cost refers to the unit power supply cost data of the power grid in the peak segment, the valley segment and the flat segment, the peak segment has a higher cost due to high generation cost, the valley segment has a lower cost due to low demand, and is used to constrain the lower limit of electricity price; the user power consumption satisfaction requirement refers to the acceptance threshold of the user to the electricity price adjustment determined based on historical feedback, which avoids that the electricity price fluctuation is too large to affect the user experience, and is used to constrain the electricity price adjustment range; the gradient boosting tree model refers to an integrated learning algorithm, which can accurately evaluate the influence of the electricity price parameter on the cost and the satisfaction by iterative optimization of multiple decision trees, and is used for parameter optimization of the power selling scheme; the optimization target combination refers to the target set set for the three groups, for example, the high peak group focuses on reducing the peak segment load, the low valley group focuses on improving the valley segment power consumption, and the flat segment group focuses on stabilizing the power consumption; the cost constraint condition refers to the lower limit rule of the electricity price constructed based on the peak-valley power supply cost, which ensures that the electricity price is not lower than the cost of the corresponding period; the satisfaction constraint condition refers to the electricity price adjustment range limit constructed based on the user acceptance threshold, which ensures that the user satisfaction is not lower than the preset level; the final electricity price parameter combination refers to the peak segment, valley segment and flat segment electricity price parameters that meet all constraint conditions after model optimization; and the differentiated power selling scheme refers to the scheme adapted to the three groups generated based on the final electricity price parameter combination, which includes the electricity price of each period, the preferential rules and the like, and is used to guide the actual power selling business.

[0137] In the example of the present application, first, the optimization target combination is set through step 1051: based on the user clustering result of S104 step, the optimization direction is determined respectively according to the power consumption characteristics of the three groups. For the high peak power consumption dominant group, the optimization target focuses on reducing the peak segment power consumption load while controlling the power grid peak segment power supply cost; for the low valley power consumption dominant group, the optimization target focuses on improving the valley segment power consumption ratio while ensuring the user power consumption satisfaction; and for the flat segment power consumption dominant group, the optimization target focuses on stabilizing the flat segment power consumption load while balancing the power supply cost and the user acceptance.

[0138] Secondly, the cost constraint condition is constructed through step 1052: the unit power supply cost data of the power grid in the peak segment, the valley segment and the flat segment is collected, and the lower limit of the electricity price is set for the three segments respectively according to the principle that the electricity price should not be lower than the unit power supply cost in the corresponding period, thereby forming the cost constraint condition of each period.

[0139] Then, the satisfaction constraint condition is constructed through step 1053: based on the historical user feedback data, the maximum acceptable amplitude of the electricity price adjustment of each period for the three groups is determined. For example, the peak group has a high sensitivity to the peak segment electricity price adjustment, and the upper limit of the peak segment electricity price adjustment amplitude of the peak group needs to be set; the valley group has a high expectation for the valley segment electricity price discount, and the lower limit of the valley segment electricity price adjustment amplitude of the valley group needs to be set.

[0140] Finally, the differentiated electricity selling scheme is generated through step 1054: first, the initial electricity price parameter combination is input into the gradient boosting tree model based on the optimization target combination of step 1051, the model learns the correlation between the electricity price and the cost and the satisfaction in the historical data, and outputs the comprehensive evaluation result including the power supply cost evaluation value and the user satisfaction evaluation value; second, the comprehensive evaluation result is compared with the constraint conditions of steps 1052 and 1053 to identify the parameter conflict items that do not meet the constraints and determine the to-be-optimized parameter items; third, the to-be-optimized parameter items are adjusted, and the evaluation and adjustment process is repeated until the final electricity price parameter combination that meets all the constraint conditions is obtained; fourth, based on the final electricity price parameter combination, the differentiated electricity selling scheme including the electricity price and the preferential rules of each period is generated for the three groups. These schemes will be used for actual electricity selling business to realize the accurate adaptation of the power grid to the user demand.

[0141] In actual application, for the peak electricity dominant group A of 52 households, the valley electricity dominant group B of 48 households and the flat segment electricity dominant group C of 50 households obtained through step S104, combined with the peak-valley power supply cost of the power grid, i.e. 0.6 yuan / kWh in the peak segment, 0.3 yuan / kWh in the valley segment and 0.45 yuan / kWh in the flat segment, and the user electricity satisfaction requirement, i.e. the peak segment electricity price adjustment amplitude of the A group is not more than ±0.1 yuan / kWh, the valley segment electricity price adjustment amplitude of the B group is not less than -0.08 yuan / kWh, and the flat segment electricity price fluctuation of the C group is not more than ±0.05 yuan / kWh, the step S105 is processed.

[0142] Firstly, the optimization target combination is set, the optimization target of the A group is to reduce the peak segment load, the peak segment electricity price is not less than 0.6 yuan / kWh, and the user satisfaction is not less than 80 points; the optimization target of the B group is to improve the valley segment electricity consumption ratio, the valley segment electricity price is not less than 0.3 yuan / kWh, and the user satisfaction is not less than 85 points; the optimization target of the C group is to stabilize the flat segment load, the flat segment electricity price is not less than 0.45 yuan / kWh, and the user satisfaction is not less than 82 points.

[0143] Then, the cost constraint condition is constructed, and the cost constraint formula is , , ,in, Represents peak electricity prices, Represents the unit cost of electricity supply during peak hours. Represents off-peak electricity prices. Represents the unit cost of electricity supply during off-peak hours. Represents the flat electricity price. This represents the unit cost of electricity supply during the flat period. Substituting the unit cost of electricity supply during the peak period of 0.6 yuan / kWh into the equation... To obtain peak electricity prices Yuan / kWh; similarly, substituting the off-peak unit power supply cost of 0.3 yuan / kWh into the equation. Obtain off-peak electricity prices Yuan / kWh; Substituting the flat-section unit power supply cost of 0.45 yuan / kWh into the equation. Obtain the flat electricity price Yuan / kWh.

[0144] Then, satisfaction constraints are constructed. The original electricity price levels are first determined as 0.7 yuan / kWh for peak periods, 0.4 yuan / kWh for off-peak periods, and 0.5 yuan / kWh for flat periods. The peak-period electricity price adjustment for Group A shall not exceed ±0.1 yuan / kWh. The calculated lower limit for the peak-period electricity price is 0.7 yuan / kWh - 0.1 yuan / kWh = 0.6 yuan / kWh, and the upper limit is 0.7 yuan / kWh + 0.1 yuan / kWh = 0.8 yuan / kWh. The final peak-period electricity price range for Group A is... The price range is between 0.6 yuan / kWh and 0.8 yuan / kWh; the off-peak electricity price adjustment for Group B shall not be less than -0.08 yuan / kWh. Therefore, the calculated upper limit for the off-peak electricity price is 0.4 yuan / kWh - 0.08 yuan / kWh = 0.32 yuan / kWh. The final off-peak electricity price range for Group B is... The flat-rate electricity price for Group C is calculated to be no more than ±0.05 yuan / kWh. The lower limit is calculated to be 0.5 yuan / kWh - 0.05 yuan / kWh = 0.45 yuan / kWh, and the upper limit is 0.5 yuan / kWh + 0.05 yuan / kWh = 0.55 yuan / kWh. Therefore, the final flat-rate electricity price range for Group C is... The price ranges from 0.45 yuan / kWh to 0.55 yuan / kWh.

[0145] Next, differentiated electricity sales plans are generated, first determining the initial electricity price parameter combinations: Group A: peak electricity price 0.65 yuan / kWh, valley electricity price 0.35 yuan / kWh, and flat electricity price 0.48 yuan / kWh; Group B: peak electricity price 0.7 yuan / kWh, valley electricity price 0.31 yuan / kWh, and flat electricity price 0.48 yuan / kWh; Group C: peak electricity price 0.7 yuan / kWh, valley electricity price 0.35 yuan / kWh, and flat electricity price 0.48 yuan / kWh. The initial combination was then input into a gradient boosting tree model for evaluation. Group A's cost assessment value was 0.6 yuan / kWh, which met the peak cost constraint, and its user satisfaction assessment value was 75 points, which was lower than the target requirement of 80 points, thus failing to meet the satisfaction constraint. Group B's cost assessment value was 0.3 yuan / kWh, which met the valley cost constraint, and its user satisfaction assessment value was 86 points, which was higher than the target requirement of 85 points, thus meeting the constraint. Group C's cost assessment value was 0.45 yuan / kWh, which met the flat cost constraint, and its user satisfaction assessment value was 83 points, which was higher than the target requirement of 82 points, thus meeting the constraint. Subsequently, the peak electricity price for Group A was identified as a parameter to be optimized. Considering the adjustment range of its peak electricity price, the peak electricity price for Group A was reduced from 0.65 yuan / kWh to 0.62 yuan / kWh, a reduction of 0.03 yuan / kWh, which is within the allowable range of ±0.1 yuan / kWh. The data was then re-entered into the model for evaluation. The user satisfaction evaluation score for Group A increased to 82 points, meeting the target requirement of 80 points. The cost evaluation value remained at 0.6 yuan / kWh, which met the cost constraint. Thus, the final combination of electricity price parameters was obtained. Based on this combination, differentiated electricity sales plans are generated: Group A's plan is 0.62 yuan / kWh during peak hours, 0.35 yuan / kWh during off-peak hours, and 0.48 yuan / kWh during normal hours, with a discount of 5 yuan for every 100kWh of peak-hour electricity consumption; Group B's plan is 0.7 yuan / kWh during peak hours, 0.31 yuan / kWh during off-peak hours, and 0.48 yuan / kWh during normal hours, with a cashback of 0.02 yuan per kWh during off-peak hours; Group C's plan is 0.7 yuan / kWh during peak hours, 0.35 yuan / kWh during off-peak hours, and 0.48 yuan / kWh during normal hours, with a stable reward of 5 yuan for monthly fluctuations in normal-hour electricity consumption not exceeding 5kWh.

[0146] Finally, these differentiated electricity sales plans will be directly applied to the actual electricity sales operations of Group A, Group B, and Group C. The plan for Group A can guide them to reduce peak-hour electricity consumption, the plan for Group B can encourage them to increase off-peak-hour electricity consumption, and the plan for Group C can maintain stable off-peak-hour electricity consumption. Going forward, we will continue to collect actual electricity consumption data and user feedback scores from the three groups. Based on this data, we will readjust the evaluation parameters of the gradient boosting tree model, further optimize the electricity sales plan parameters for each group, and form a dynamic optimization mechanism to continuously improve the grid's peak-valley load regulation efficiency and user satisfaction.

[0147] The aforementioned S105 overall solution, by setting targeted optimization objectives, ensures that the solution matches the electricity consumption characteristics of various groups; the construction of cost constraints avoids grid operation losses caused by pricing below the cost of electricity supply, ensuring the economic feasibility of the grid; the introduction of satisfaction constraints prevents electricity price adjustments from exceeding the user's acceptable range, maintaining user experience; the application of the gradient boosting tree model, through precise evaluation and iterative optimization, efficiently balances the relationship between cost and satisfaction, enabling the final differentiated electricity sales solution to adapt to the electricity consumption habits of peak, off-peak, and flat-peak groups, while also helping the grid optimize peak-valley load distribution. The overall process realizes the transformation from group characteristics to personalized solutions, providing a collaborative solution for efficient grid operation and meeting user needs, and promoting the development of electricity sales services towards precision and differentiation.

[0148] The following is a complete example for steps S101 to S105, such as Figure 2 As shown, the specific implementation process of this electricity sales scheme generation method for a certain area of ​​electricity users is as follows: First, data collection is carried out to collect three types of core data from each electricity user. The historical electricity load data for residential user A001 consists of load records at 15-minute intervals daily for the past 30 days. The regional power grid defines peak hours as 8:00-22:00 (14 hours) and valley hours as 22:00-8:00 the next day (10 hours). A001's average peak load is 1.5 kWh / 15 minutes, and its average valley load is 0.6 kWh / 15 minutes. This data will be used for time series analysis via LSTM networks. A001's responsiveness data shows that a 0.08 yuan / kWh increase in peak electricity price resulted in a 2 kWh decrease in average daily electricity consumption, while a 0.05 yuan / kWh decrease in valley electricity price resulted in a 1 kWh increase in average daily electricity consumption. This data will be used to calculate quantifiable response indicators. A001's preference data shows that peak electricity consumption accounts for 75% of total daily electricity consumption, and valley electricity consumption accounts for 25%. This data will be used to extract quantifiable preference indicators. Historical electricity load data for micro and small enterprise user B001 shows an average peak load of 6.0 kWh / 15 minutes and an average off-peak load of 4.0 kWh / 15 minutes over the past 30 days, which will be used for LSTM analysis. Response data shows that after a peak electricity price increase of 0.08 yuan / kWh, the average daily electricity consumption decreased by 20 kWh, and after an off-peak electricity price decrease of 0.05 yuan / kWh, the average daily electricity consumption increased by 15 kWh, which will be used for calculating response quantification indicators. Preference data shows that peak electricity consumption accounts for 60% and off-peak electricity consumption accounts for 40%, which will be used for extracting preference quantification indicators.

[0149] Next, an LSTM network is used to process historical electricity load data. The 15-minute interval load data of A001 over the past 30 days is input into the LSTM network in chronological order. The memory units in the network capture the load variation patterns over time, including the peak load rise rate and the valley load stability characteristics, and output the electricity consumption trend characteristics of A001 for the next 7 days: average peak load 1.2 kWh / 15 minutes, average valley load 0.8 kWh / 15 minutes, and peak load fluctuation range 0.3 kWh. Similarly, the historical load data of B001 is input into the LSTM network to obtain its electricity consumption trend characteristics for the next 7 days: average peak load 5.8 kWh / 15 minutes, average valley load 4.2 kWh / 15 minutes, and peak load fluctuation range 0.3 kWh. This characteristic is also used for subsequent trend quantification index calculations.

[0150] Then, vector encoding processing is performed. The first step is to calculate the trend quantification index using the formula. Calculate the load change rate using the formula, where V is the load change rate in kWh / 15 minutes / hour. This represents the average load during future peak periods. The average load during the future valley period is given by T_peak, which represents the peak period duration (14 hours) and T_valley, which represents the valley period duration (10 hours). For A001, substituting the data yields V = (1.2 - 0.8) / (14 - 10) = 0.1 kWh / 15 minutes / hour. Combined with its peak load fluctuation range of 0.3 kWh, the trend quantification indicators for A001 are: 0.3 kWh, 0.1 kWh / 15 minutes / hour. For B001, substituting the data yields V = (5.8 - 4.2) / (14 - 10) = 0.4 kWh / 15 minutes / hour. Combined with the peak load fluctuation range of 0.3 kWh, the trend quantification indicators for B001 are: 0.3 kWh, 0.4 kWh / 15 minutes / hour. The second step is to calculate the response quantification indicators using the formula... Calculate the electricity price sensitivity coefficient, where S is the sensitivity coefficient. The daily average change in electricity consumption, when electricity consumption decreases Take the negative value. This refers to the adjustment range for peak electricity prices. The adjustment range for off-peak electricity prices. The peak duration is 14 hours. The duration of the valley period is 10 hours. For A001, =-2kWh, =0.08 yuan / kWh, = -0.05 yuan / kWh, calculated as S = -2 / 0.62 ≈ -3.23, that is, the response quantification index of A001 is -3.23; for B001, =-20kWh, similarly calculate the denominator=0.62, so S=-20 / 0.62≈-32.26, that is, the response quantification index of B001 is -32.26. The third step is to extract the preference quantification index, directly using the collected preference data. The preference quantification index of A001 is 75% and 25%, and the preference quantification index of B001 is 60% and 40%. The fourth step is to form the initial feature combination, which is concatenated in the order of "trend quantification index, response quantification index, preference quantification index". The initial feature combination of A001 is 0.3, 0.1, -3.23, 75%, 25%, and the initial feature combination of B001 is 0.3, 0.4, -32.26, 60%, 40%. The fifth step is standardization, which calculates the mean and standard deviation of each indicator in the initial feature combinations for all users: The trend fluctuation range has a mean of 0.3 and a standard deviation of 0; since the fluctuation range for all users is 0.3, the adjustment coefficient is set to 0. The trend change rate has a mean of 0.25 and a standard deviation of 0.212; the adjustment coefficient = 1 / standard deviation ≈ 4.72. The response sensitivity coefficient has a mean of -17.745 and a standard deviation of 20.58; the adjustment coefficient = 1 / standard deviation ≈ 0.0486. The preference peak percentage has a mean of 67.5% and a standard deviation of 10.6%; the adjustment coefficient = 1 / standard deviation ≈ 9.43. The preference trough percentage has a mean of 32.5% and a standard deviation of 10.6%; the adjustment coefficient = 1 / standard deviation ≈ 9.43. Then, the formula is applied... Standardization, in the formula, These are the standardized eigenvalues. Let μ be the initial characteristic value, k be the index mean, and k be the adjustment coefficient. The calculation process after standardization of A001 is as follows: Trend fluctuation range = (0.3-0.3)×0 = 0, Trend change rate = (0.1-0.25)×4.72≈-0.71, Response sensitivity coefficient = (-3.23+17.745)×0.0486≈0.71, Preference peak percentage = (75%-67.5%)×9.43≈0.71, Preference trough percentage = (25%-32.5%)×9.43≈-0.71, forming the user electricity consumption characteristic vector of A001: 0, -0.71, 0.71, 0.71, -0.71; B001 standardization The subsequent calculation process is as follows: Trend fluctuation range = (0.3-0.3)×0 = 0, Trend change rate = (0.4-0.25)×4.72≈0.71, Response sensitivity coefficient = (-32.26+17.745)×0.0486≈-0.71, Preference peak proportion = (60%-67.5%)×9.43≈-0.71, Preference valley proportion = (40%-32.5%)×9.43≈0.71, forming the user electricity consumption feature vector of B001: 0, 0.71, -0.71, -0.71, 0.71. These vectors are subsequently used for clustering processing.

[0151] Next, a clustering algorithm was used to group the data. K-means clustering was chosen, with the number of clusters set to K=3, corresponding to the three user groups. The first step was to select initial cluster centers by randomly selecting three vectors from all user electricity consumption feature vectors: vector [0.1, -0.6, 0.8, 0.8, -0.7] for A002, vector [-0.1, 0.5, -0.6, -0.7, 0.6] for B002, and vector [0, 0.1, -0.1, 0.2, -0.2] for A003. The second step was to calculate the degree of difference using the Euclidean distance formula. In the formula, d represents the Euclidean distance, i.e., the degree of difference, and i represents the vector dimension, with a value ranging from 1 to 5. Let be the value of the i-th dimension of the user vector. Let be the value of the i-th dimension of the cluster center. Calculate the distance between vector A001 and center A002: First, calculate the squares of the differences in each dimension: (0-0.1)²=0.01, (-0.71+0.6)²=0.0121, (0.71-0.8)²=0.0081, (0.71-0.8)²=0.0081, (-0.71+0.7)²=0.0001; then calculate the sum of squares: 0.01+0.0121+0.0081+0.0081+0.0001=0.0384; finally, take the square root to get d≈0.2. The distance between A001 and center B002 is approximately 2.1, and the distance between A001 and center A003 is approximately 1.5. Since the distance between A001 and center A002 is the smallest, A001 is assigned to the group to which center A002 belongs. Similarly, calculate the distance between the centers B001 and B002: First, calculate the squares of the differences in each dimension: (0+0.1)²=0.01, (0.71-0.5)²=0.0441, (-0.71+0.6)²=0.0081, (-0.71+0.7)²=0.0001, (0.71-0.6)²=0.0121; then calculate the sum of squares: 0.01+0.0441+0.0081+0.0001+0.0121=0.0744; finally, take the square root to get d≈0.26. Since B001 is farther from other centers, assign B001 to the group to which center B002 belongs. The third step is to determine the user clustering results. After allocating all users, three groups are formed: peak-hour electricity consumption-dominant group, off-peak electricity consumption-dominant group, and flat-hour electricity consumption-dominant group. These results will be used to generate differentiated electricity sales plans.

[0152] Finally, differentiated electricity sales plans are generated. The first step is to determine the basic parameters: the peak-valley power supply cost is 0.6 yuan / kWh for peak hours, 0.3 yuan / kWh for valley hours, and 0.45 yuan / kWh for flat hours, which is used to establish cost constraints; the user satisfaction requirements are: the peak electricity price adjustment range for the peak group should not exceed ±0.1 yuan / kWh, the original peak price is 0.7 yuan / kWh, so the peak electricity price range for the peak group is 0.6 yuan / kWh to 0.8 yuan / kWh; the valley electricity price reduction range for the off-peak group should not be less than 0.08 yuan / kWh, the original valley price is 0.4 yuan / kWh, so the upper limit of the valley electricity price for the off-peak group is 0.32 yuan / kWh. These requirements are used to establish satisfaction constraints. The second step is to set the initial electricity price parameter combination: Peak group: 0.65 yuan / kWh for peak hours, 0.35 yuan / kWh for valley hours, and 0.48 yuan / kWh for average hours; Off-peak group: 0.7 yuan / kWh for peak hours, 0.31 yuan / kWh for valley hours, and 0.48 yuan / kWh for average hours; Average group: 0.7 yuan / kWh for peak hours, 0.35 yuan / kWh for valley hours, and 0.48 yuan / kWh for average hours. The third step is model evaluation. The initial parameters are input into the gradient boosting tree model. Based on the correlation between electricity price, cost, and satisfaction in historical data, the model outputs a comprehensive evaluation result: Peak group cost assessment value: 0.6 yuan / kWh, meeting cost constraints; Satisfaction assessment value: 75 points, below the target of 80 points, not meeting constraints; Off-peak group cost assessment value: 0.3 yuan / kWh, meeting constraints; Satisfaction assessment value: 86 points, meeting the target of 85 points; Average group cost assessment value: 0.45 yuan / kWh, meeting constraints; Satisfaction assessment value: 83 points, meeting the target of 82 points. The fourth step is to optimize the parameters. The peak electricity price for the peak group is identified as a parameter to be optimized. Based on its price adjustment range, the peak electricity price is reduced from 0.65 yuan / kWh to 0.62 yuan / kWh, a reduction of 0.03 yuan / kWh, which is within the range of ±0.1 yuan / kWh. The reassessment yields a peak group satisfaction score of 82 points, which meets the target. The cost remains at 0.6 yuan / kWh, which complies with the constraints. The final combination of electricity price parameters is then determined. The fifth step generates the pricing schemes: For the peak-hour group, the price is 0.62 yuan / kWh during peak hours, with a 5 yuan discount for every 100kWh of peak-hour electricity consumption; 0.35 yuan / kWh during off-peak hours; and 0.48 yuan / kWh during normal hours. For the off-peak group, the price is 0.7 yuan / kWh during peak hours, 0.31 yuan / kWh during off-peak hours, with a 0.02 yuan cashback per kWh during off-peak hours; and 0.48 yuan / kWh during normal hours. For the normal-hour group, the price is 0.7 yuan / kWh during peak hours, 0.35 yuan / kWh during off-peak hours, and 0.48 yuan / kWh during normal hours. A 5 yuan stability bonus is given if the monthly fluctuation in normal-hour electricity consumption does not exceed 5kWh. Subsequently, based on the actual electricity consumption data of the three groups, including changes in peak-hour electricity consumption for the peak-hour group, changes in the proportion of off-peak electricity consumption for the off-peak group, and satisfaction feedback, the gradient boosting tree model will be re-entered to optimize the electricity price parameters, enabling dynamic adjustments to the schemes.

[0153] Figure 3 This application provides a schematic diagram of a specific implementation of a power sales scheme generation system based on electricity user behavior clustering, as illustrated in the embodiments of this application. Figure 3 The system may include:

[0154] The data acquisition module 31 is used to collect historical electricity load data, response data after electricity price adjustment, and preference data for daily peak and off-peak electricity consumption periods for each electricity user.

[0155] Analysis module 32 is used to perform time series analysis on the historical electricity load data using an LSTM network to obtain the electricity consumption behavior trend characteristics of each electricity user in the future time period.

[0156] The processing module 33 is used to perform vector encoding processing on the electricity consumption behavior trend features, the responsiveness data and the preference data to obtain the user electricity consumption feature vector.

[0157] Grouping module 34 is used to group the user electricity consumption feature vectors using a clustering algorithm to obtain user clustering results. The user clustering results include peak electricity consumption-dominant user groups, off-peak electricity consumption-dominant user groups, and neutral electricity consumption-dominant user groups.

[0158] The optimization module 35 is used to optimize the parameters of the electricity sales plan based on the user clustering results, combined with the peak and valley power supply cost of the power grid and the user's electricity satisfaction requirements, using a gradient boosting tree model, and generating a differentiated electricity sales plan that is suitable for each electricity user group.

[0159] The electricity sales plan generation system based on electricity user behavior clustering in this application embodiment is used to implement the aforementioned electricity sales plan generation method based on electricity user behavior clustering. Therefore, the specific implementation of the electricity sales plan generation system based on electricity user behavior clustering can be found in the embodiment section of the electricity sales plan generation method based on electricity user behavior clustering above. The specific implementation can be referred to the description of the corresponding embodiments, which will not be repeated here.

[0160] like Figure 4 As shown, this application also provides an electronic device, including: a memory 41 for storing a computer program; and a processor 42 for executing the computer program to implement the steps of the above-described method for generating electricity sales schemes based on clustering of electricity user behavior.

[0161] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the above-described methods for generating electricity sales schemes based on clustering of electricity user behavior.

[0162] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory, random access memory, portable hard drives, magnetic disks, or optical disks.

[0163] Embodiments of the present invention also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the embodiments of the electricity sales scheme generation method based on electricity user behavior clustering.

[0164] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0165] The foregoing has provided a detailed description of the electricity sales scheme generation method and system based on electricity user behavior clustering provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of this application.

Claims

1. A method for generating electricity sales plans based on clustering of electricity user behavior, characterized in that, include: Collect historical electricity load data, responsiveness data after electricity price adjustments, and daily peak and off-peak electricity consumption preference data for each electricity user; The historical electricity load data is analyzed using an LSTM network to obtain the electricity consumption behavior trend characteristics of each electricity user in the future time period. The electricity consumption behavior trend characteristics, the responsiveness data, and the preference data are vector-encoded to obtain the user electricity consumption feature vector. A clustering algorithm is used to group the user electricity consumption feature vectors to obtain user clustering results. The user clustering results include peak electricity consumption-dominant user groups, off-peak electricity consumption-dominant user groups, and neutral electricity consumption-dominant user groups. Based on the user clustering results, and combined with the peak and valley power supply costs of the power grid and the user's electricity satisfaction requirements, a gradient boosting tree model is used to optimize the parameters of the electricity sales plan and generate differentiated electricity sales plans that are suitable for each electricity user group.

2. The method for generating electricity sales plans based on clustering of electricity user behavior according to claim 1, characterized in that, Based on the user clustering results, and combined with the peak-valley power supply cost of the power grid and user electricity satisfaction requirements, a gradient boosting tree model is used to optimize the parameters of the electricity sales plan, generating differentiated electricity sales plans suitable for various electricity user groups, including: Based on the user clustering results, the optimization objectives for electricity price parameters are set to obtain the optimization objective combinations corresponding to peak-consumption-dominant user groups, off-peak-consumption-dominant user groups, and flat-peak-consumption-dominant user groups, respectively. Based on the peak and valley power supply costs of the power grid, power supply cost constraints are constructed to obtain cost constraints for each time period. Based on the user electricity satisfaction requirements, user satisfaction constraints are constructed to obtain satisfaction constraints for each user group. A gradient boosting tree model is used to optimize the combination of optimization objectives, the cost constraints, and the satisfaction constraints to obtain the final combination of electricity price parameters. Based on the final combination of electricity price parameters, a differentiated electricity sales plan is generated to form a differentiated electricity sales plan that is suitable for each electricity user group.

3. The method for generating electricity sales plans based on clustering of electricity user behavior according to claim 2, characterized in that, The gradient boosting tree model is used to optimize the combination of optimization objectives, the cost constraints, and the satisfaction constraints to obtain the final combination of electricity price parameters, including: Based on the optimized objective combination, the gradient boosting tree model is used to evaluate the current electricity price parameter combination, and a comprehensive evaluation result including the power supply cost evaluation value and the user satisfaction evaluation value is obtained. Based on the comprehensive evaluation results, identify the parameter conflict items in the current electricity price parameter combination that do not meet the cost constraint and the satisfaction constraint, and obtain the parameter items to be optimized; The parameters to be optimized in the current electricity price parameter combination are adjusted to generate the final electricity price parameter combination, wherein the final electricity price parameter combination satisfies the cost constraint and the satisfaction constraint.

4. The method for generating electricity sales plans based on clustering of electricity user behavior according to claim 1, characterized in that, The LSTM network is used to perform time series analysis on the historical electricity load data to obtain the electricity consumption behavior trend characteristics of each electricity user in the future time period, including: The historical electricity load data is arranged in chronological order as a load time series with equal intervals. The memory unit of the LSTM network is used to extract time features from the load time series to obtain time dimension features. Then, multi-scale feature extraction is performed on the time dimension features to obtain multi-scale time series features. Based on the multi-scale time series features, sequence transformation processing is performed to obtain serialized trend features. The serialized trend features are then subjected to feature aggregation processing to form the electricity consumption behavior trend features of each electricity user in the future time period.

5. The method for generating electricity sales schemes based on clustering of electricity user behavior according to claim 1, characterized in that, The step of performing vector encoding processing on the electricity consumption behavior trend characteristics, the responsiveness data, and the preference data to obtain the user electricity consumption feature vector includes: Based on the aforementioned electricity consumption behavior trend characteristics, the load fluctuation range and rate of change in the future time period are calculated to obtain trend quantification indicators; Based on the responsiveness data, the sensitivity coefficient of users to changes in peak and off-peak electricity prices is determined, and a quantitative response index is obtained. Based on the aforementioned preference data, the proportion of electricity consumption by users during peak and off-peak hours is statistically analyzed to obtain a quantitative indicator of preference. The trend quantification index, the response quantification index, and the preference quantification index are concatenated to form a standardized feature combination. The standardized feature combination is then subjected to dimensional standardization to obtain the user's electricity consumption feature vector.

6. The method for generating electricity sales schemes based on clustering of electricity user behavior according to claim 5, characterized in that, The process of concatenating the trend quantification index, the response quantification index, and the preference quantification index to form a standardized feature combination, and then performing dimensional standardization on the standardized feature combination to obtain the user's electricity consumption feature vector, includes: According to the preset feature arrangement order, the trend quantification index, the response quantification index, and the preference quantification index are connected to form an initial feature combination; Based on the numerical distribution characteristics of each indicator in the initial feature combination, the numerical adjustment parameters corresponding to each indicator are obtained, wherein the numerical adjustment parameters include the baseline value and adjustment coefficient of each indicator. Based on the numerical adjustment parameters, the initial feature combination is adjusted to obtain a standardized feature combination; Based on the feature expression form of the preset dimension, the standardized feature combination is standardized to form the user electricity consumption feature vector.

7. The method for generating electricity sales plans based on clustering of electricity user behavior according to claim 1, characterized in that, The method employs a clustering algorithm to group the user electricity consumption feature vectors, obtaining user clustering results. These results include peak-consumption-dominant user groups, off-peak-consumption-dominant user groups, and neutral-consumption-dominant user groups, including: Based on the user electricity consumption feature vector, a clustering algorithm is used to perform cluster center localization processing to obtain multiple initial cluster centers; Calculate the degree of difference between each user's electricity consumption feature vector and each of the initial cluster centers, and based on the degree of difference, assign each user to the corresponding user group to form the user grouping result; Based on the user grouping results, the average value of the electricity consumption feature vectors of all users in each user group is calculated to obtain the final cluster center; Based on the final cluster centers, user groups are classified to generate user clustering results that include peak-consumption dominant user groups, off-peak-consumption dominant user groups, and flat-consumption dominant user groups.

8. A power sales scheme generation system based on electricity user behavior clustering, characterized in that, include: The data acquisition module is used to collect historical electricity load data, response data after electricity price adjustments, and preference data for daily peak and off-peak electricity consumption periods for each electricity user. The analysis module is used to perform time series analysis on the historical electricity load data using an LSTM network to obtain the electricity consumption behavior trend characteristics of each electricity user in the future time period. The processing module is used to perform vector encoding processing on the electricity consumption behavior trend characteristics, the responsiveness data, and the preference data to obtain the user electricity consumption feature vector; The grouping module is used to process the user electricity consumption feature vectors into groups using a clustering algorithm to obtain user clustering results. The user clustering results include peak electricity consumption-dominant user groups, off-peak electricity consumption-dominant user groups, and neutral electricity consumption-dominant user groups. The optimization module is used to optimize the parameters of the electricity sales plan based on the user clustering results, combined with the peak and valley power supply cost of the power grid and the user's electricity satisfaction requirements, using a gradient boosting tree model to generate differentiated electricity sales plans that are suitable for each electricity user group.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the electricity sales scheme generation method based on electricity user behavior clustering as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, enables the generation method for electricity sales schemes based on electricity user behavior clustering as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Residential user electricity consumption optimization strategy considering differentiated demand response schemes

    CN115018198A

  • User behavior data mining and prediction analysis system in intelligent power grid environment

    CN119599175A

  • Carbon neutralization-oriented peak-valley electricity price dynamic excitation mechanism design and user response prediction system

    CN120655455A

Cited By

  • User portrait-based personalized recommendation method and system for electricity selling package

    CN121329559A

  • A Personalized Electricity Package Recommendation Method and System Based on User Profiles

    CN121329559B