Electricity user classification method, device, electronic device and storage medium
The power user category is determined by matching the pre-trained user pairing model and the historical power consumption curve, which solves the inefficiency and accuracy problems caused by manual reliance on power user classification in the existing technology, and realizes automated and accurate power user classification. .
Patent Information
- Application Number
- CN202410565163.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-09
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-05-09
AI Technical Summary
In the existing technology, the classification of power users relies on manual operations, which consumes a lot of manpower and time, and the accuracy relies on manual experience, so the classification is not accurate enough.
Using a pre-trained user pairing model, by obtaining the historical power consumption curve of electric power users, the user category is determined when the matching degree is greater than the threshold, and the classification is stopped or the model is retrained when the conditions are met to improve classification accuracy.
Classification of power users can be achieved without manual registration, saving labor costs and time, improving classification accuracy, and further improving accuracy through model retraining.
Smart Images

Figure CN118154362B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electric power technology, and in particular to a method, device, electronic equipment and storage medium for classifying electric power users. Background Art
[0002] In the field of power distribution technology, in order to provide personalized power services to different types of power users, it is necessary to classify power users.
[0003] In the prior art, the electricity users are mainly manually registered in a spreadsheet, including their electricity usage addresses, types of electricity usage, or electricity usage, and then the screening function of the spreadsheet is used to roughly classify the electricity users into commercial electricity users, residential electricity users, high-power users, medium-power users, low-power users, peak-period electricity users, valley-period electricity users, etc. When the number of electricity users is large, a large amount of manpower and time are required to classify the electricity users or to update the spreadsheet and then classify them, and the accuracy of the electricity user classification depends on manual experience. Summary of the invention
[0004] The present invention provides a method, device, electronic device and storage medium for classifying power users, so as to solve the problem that manual classification of power users requires a lot of manpower and time, and the accuracy depends on manual experience, resulting in inaccurate classification.
[0005] In a first aspect, the present invention provides a method for classifying power users, comprising:
[0006] Acquire a set of classified power users and a set of power users to be classified, wherein the set of classified power users includes a first power user ID that has been classified, and the set of power users to be classified includes a second power user ID that is to be classified;
[0007] Extracting a second power user ID from the set of power users to be classified, and obtaining a historical power consumption curve of the extracted second power user ID;
[0008] Inputting the historical power consumption curve into a pre-trained user pairing model to obtain a user pair and a matching degree, wherein the user pair includes a first power user ID and an extracted second power user ID;
[0009] When the matching degree is greater than a threshold, determining the user category of the first power user ID in the user pair as the user category of the extracted second power user ID;
[0010] removing the extracted second power user ID from the set of power users to be classified and adding it to the set of classified power users;
[0011] Determine whether the preset stop classification condition is met;
[0012] If so, stop classifying electricity users;
[0013] If not, extract power user IDs from the classified power user set and the to-be-classified power user set to construct training samples, use the training samples to retrain the user pairing model, and return to the step of extracting a second power user ID from the to-be-classified power user set and obtaining a historical power consumption curve of the extracted second power user ID.
[0014] In a second aspect, the present invention provides a device for classifying power users, comprising:
[0015] A user set acquisition module, used to acquire a classified power user set and a to-be-classified power user set, wherein the classified power user set includes a classified first power user ID, and the to-be-classified power user set includes a to-be-classified second power user ID;
[0016] An electricity consumption curve acquisition module is used to extract a second electricity user ID from the set of electricity users to be classified, and acquire a historical electricity consumption curve of the extracted second electricity user ID;
[0017] A user pairing module, configured to input the historical power consumption curve into a pre-trained user pairing model to obtain a user pair and a matching degree, wherein the user pair includes a first power user ID and an extracted second power user ID;
[0018] A user category determination module, configured to determine the user category of the first power user ID in the user pair as the user category of the extracted second power user ID when the matching degree is greater than a threshold;
[0019] A user set updating module, configured to remove the extracted second power user ID from the to-be-classified power user set and add it to the classified power user set;
[0020] The stop classification condition judgment module is used to judge whether the preset stop classification condition is met; if so, the stop classification module is executed, if not, the retraining module is executed;
[0021] A stop classification module is used to stop the classification of power users;
[0022] The retraining module is used to extract power user IDs from the classified power user set and the to-be-classified power user set to construct training samples, and use the training samples to retrain the user pairing model, and return the power consumption curve acquisition module.
[0023] In a third aspect, the present invention provides an electronic device, the electronic device comprising:
[0024] at least one processor; and
[0025] a memory communicatively connected to the at least one processor; wherein,
[0026] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the power user classification method described in the first aspect of the present invention.
[0027] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a processor to implement the method for classifying electricity users described in the first aspect of the present invention when executed.
[0028] After obtaining the historical electricity consumption curve of the second power user ID in the set of power users to be classified, the present invention inputs it into the user pairing model to obtain a user pair and a matching degree, the user pair includes the second power user ID and the first power user ID in the classified power user set, when the matching degree is greater than a threshold, the user category of the first power user ID is determined as the user category of the second power user ID, and the classified second power user ID is removed from the set of power users to be classified and added to the classified power user set, and the classification is stopped when the power user classification condition is met, otherwise the power users are continued to be classified after the training sample retraining model is constructed, and the user pair and the matching degree are generated through the user pair matching model, and when the matching degree is greater than the threshold, the user category of the classified first power user ID in the user pair is determined as the user category of the second power user ID to be classified, and there is no need to manually classify the power users after registering them in an electronic form, which saves the labor cost and time of power user classification, does not rely on manual experience, improves the accuracy of power user classification, and can construct a sample retraining user pairing model, which can further improve the accuracy of power user classification.
[0029] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0031] Figure 1is a flow chart of a method for classifying power users provided in Embodiment 1 of the present invention;
[0032] Figure 2 is a flow chart of a method for classifying power users provided in Embodiment 2 of the present invention;
[0033] Figure 3 is a structural schematic diagram of a power user classification device provided in Embodiment 3 of the present invention;
[0034] Figure 4 It is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0035] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0036] Embodiment 1
[0037] Figure 1 This is a flow chart of a method for classifying power users provided in the first embodiment of the present invention. This embodiment can be applied to classifying power users to obtain user categories of power users. The method can be performed by a power user classification device. The power user classification device can be implemented in the form of hardware and / or software and configured in an electronic device, such as Figure 1 As shown, the power user classification method includes:
[0038] S101 . Acquire a set of classified power users and a set of power users to be classified, wherein the set of classified power users includes a first power user ID that has been classified, and the set of power users to be classified includes a second power user ID that is to be classified.
[0039] In this embodiment, the power user ID may be the account number of the power user, the classified power user set may be a set of power user IDs of power users whose user categories have been determined, and the to-be-classified power user set may be a set of power user IDs of power users whose user categories have not been determined. In one embodiment, when classifying a large number of power users, a small number of power users of various user categories may be manually selected first. For example, there are 10,000 power users that need to be classified, and the user categories include 5 categories. 20-100 power users may be selected from the 10,000 power users for each user category, and after adding category labels to the power user IDs of the selected power users, the power user IDs after the category labels are added are used as the first power user ID and added to the classified power user set, and the power user IDs of the unselected power users are used as the second power user ID and added to the to-be-classified power user set.
[0040] Of course, the classified power user set may also be a set classified by the power user classification method according to the embodiment of the present invention, or may be an existing classified power user set.
[0041] In one scenario, power user classification can be triggered in response to manual instructions to obtain a set of classified power users and a set of power users to be classified. In another scenario, a target time for power user classification can be set, and power user classification is triggered when the system time reaches the target time. The embodiment of the present invention does not limit the method of triggering power user classification.
[0042] S102: extracting a second power user ID from the set of power users to be classified, and obtaining a historical power consumption curve of the extracted second power user ID.
[0043] The historical electricity consumption curve can be a curve with time as the horizontal axis and electricity consumption as the vertical axis. The electricity sampling time unit of the historical electricity consumption curve can be daily, hourly, etc. In an example, when electricity users are reclassified by year, the historical electricity consumption curve can be a curve fitted by the electricity consumption of electricity users every day in a year, or a curve fitted by the electricity consumption every hour in a year. When electricity users are reclassified by month, the historical electricity consumption curve can be a curve fitted by the electricity consumption of electricity users every day in a month, or a curve fitted by the electricity consumption every hour in a month. When electricity users are reclassified by day, the historical electricity consumption curve can be a curve fitted by the electricity consumption of electricity users every hour in a day.
[0044] The historical electricity consumption curve of the power user may be associated with the power user ID and stored in the database, and the historical electricity consumption curve may be read from the database through the second power user ID.
[0045] S103: Inputting the historical electricity consumption curve into a pre-trained user pairing model to obtain a user pair and a matching degree, wherein the user pair includes the first power user ID and the extracted second power user ID.
[0046] The user pairing model of this embodiment can be used to output user pairs with the same or similar user categories, as well as the matching degree of user categories of two power user IDs in the user pair. The greater the matching degree, the higher the possibility that the user categories of the two power user IDs in the user pair are the same.
[0047] The historical power consumption curve of the second power user ID may be input into the user pairing model to obtain a user pair including the second power user ID and a classified first power user ID, and the matching degree of the user pair.
[0048] S104: When the matching degree is greater than a threshold, determining the user category of the first power user ID in the user pair as the user category of the extracted second power user ID.
[0049] If the matching degree of the user pair is greater than a threshold, such as greater than 0.9, then it is determined that the probability that the user category of the second power user ID in the user pair is the same as that of the first power user ID is high, and the user category of the first power user ID in the user pair can be determined as the user category of the second power user ID.
[0050] S105: remove the extracted second power user ID from the set of power users to be classified and add it to the set of classified power users.
[0051] After determining the user category of the second power user ID extracted from the power user set to be classified, the extracted second power user ID can be removed from the power user set to be classified and added to the classified power user set after adding a category label as a classified first power user ID.
[0052] If the matching degree of the user pair is less than or equal to the threshold, the extracted second power user ID is not classified, and the second power user ID is still in the set of power users to be classified.
[0053] S106: Determine whether a preset stop classification condition is met.
[0054] In one embodiment, the stopping classification condition may be that the number of second power user IDs in the set of power users to be classified is 0, that is, all the power user IDs to be classified have been classified. The stopping classification condition may also be that after a preset time or after extracting a preset number of second power user IDs, the number of second power user IDs in the set of power users to be classified is less than a preset number, such as less than 100, indicating that the remaining second power user IDs may be power users that are difficult to classify, and the remaining unclassified small number of power user IDs can be manually classified. If the stopping classification condition is met, S107 can be executed, and if the stopping classification condition is not met, S108 can be executed.
[0055] S107. Stop classifying electricity users.
[0056] When the stopping classification condition is met, the classification of power users is stopped, and the first power user ID in the classified power user set is the power user ID with the category label added.
[0057] S108, extracting power user IDs from the classified power user set and the to-be-classified power user set to construct training samples, and using the training samples to retrain the user pairing model.
[0058] In one embodiment, power user IDs can be selected from the classified power user set and the to-be-classified power user set to construct negative user pairs and positive user pairs, wherein the negative user pair can be two power user IDs with different user categories, or two power user IDs that are still in the to-be-classified power user set after the matching degree is less than a threshold after multiple classifications, and the positive user pair can be two power user IDs with the same user category in the classified power user set. After constructing the negative user pair and the positive user pair, the negative user pair and the positive user pair can be used as training samples to retrain the user pairing model, wherein the training method can refer to the supervised training method in the prior art, which will not be described in detail here.
[0059] After obtaining the historical electricity consumption curve of the second power user ID in the set of power users to be classified, the present invention inputs the historical electricity consumption curve into the user pairing model to obtain a user pair and a matching degree, wherein the user pair includes the second power user ID and the first power user ID in the classified power user set, and when the matching degree is greater than a threshold value, the user category of the first power user ID is determined as the user category of the second power user ID, and the classified second power user ID is removed from the set of power users to be classified and added to the set of classified power users, and the classification is stopped when the power user classification condition is met, otherwise the power users are continued to be classified after the training sample retraining model is constructed, and the user pair and the matching degree are generated through the user pair matching model, and when the matching degree is greater than the threshold value, the user category of the classified first power user ID in the user pair is determined as the user category of the second power user ID to be classified, and there is no need to manually classify the power users after registering through an electronic form, which saves the labor cost and time of power user classification, does not rely on manual experience, improves the accuracy of power user classification, and can construct a sample retraining user pairing model, which can further improve the accuracy of power user classification.
[0060] Embodiment 2
[0061] Figure 2 This is a flow chart of a method for classifying power users provided in the second embodiment of the present invention. The embodiment of the present invention is optimized based on the above-mentioned first embodiment. Figure 2 As shown, the power user classification method includes:
[0062] S201 . Acquire a set of classified power users and a set of power users to be classified, wherein the set of classified power users includes a first power user ID that has been classified, and the set of power users to be classified includes a second power user ID that is to be classified.
[0063] S202: extracting a second power user ID from the set of power users to be classified, and obtaining a historical power consumption curve of the extracted second power user ID.
[0064] S201-S202 of this embodiment are basically the same as S101-S102 of the first embodiment, and specific details may be referred to S101-S102 of the first embodiment, which will not be described in detail here.
[0065] S203, inputting the historical electricity consumption curve into a pre-trained user pairing model, and extracting the maximum electricity consumption, average electricity consumption, peak electricity consumption time period, valley electricity consumption time period, and electricity consumption time period of each electricity consumption interval of the historical electricity consumption curve in the feature extraction subnetwork as the second electricity consumption feature.
[0066] In one embodiment, the historical electricity consumption curve may be a curve of changes in electricity consumption of an electricity user within a period, for example, it may be a curve of electricity consumption for each hour in a day, and the user pairing model may include a feature extraction subnetwork and a feature matching subnetwork connected in sequence, wherein the feature extraction subnetwork may be a neural network that extracts electricity consumption features of the electricity user from the historical electricity consumption curve, and the feature matching subnetwork may be a neural network that matches the extracted electricity consumption features with the electricity consumption features in the feature library.
[0067] After extracting the second power user ID from the set of power users to be classified and reading the historical power consumption curve of the second power user ID from the database, the historical power consumption curve can be input into the feature extraction subnetwork to extract the maximum power consumption, average power consumption, peak power consumption time period, valley power consumption time period, and power consumption time periods in each power consumption interval of the second power user ID as the second power consumption feature.
[0068] Among them, the maximum power consumption may be the power consumption corresponding to the highest peak in the historical power consumption curve, the average power consumption may be the average value of the power at multiple power sampling time points in the historical power consumption curve, the peak power consumption time period may be the time period in the historical power consumption curve when the power consumption is continuously greater than the first power threshold. For example, if the power consumption of a user from 18:00 to 20:00 in a day is greater than the first power threshold, then the peak power consumption time period is 18:00-20:00, the valley power consumption time period may be the time period in the historical power consumption curve when the power consumption is continuously less than the second power threshold. For example, if the power consumption of a user from 00:00 to 07:00 in a day is less than the second power threshold, then the valley power consumption time period is 00:00-07:00, and the power consumption time periods of each power consumption interval may be the time periods of each power consumption interval determined by pre-dividing the power consumption interval and then determining it from the historical power consumption curve.
[0069] Of course, the power consumption feature may also be power consumption fluctuation rate, minimum power consumption, etc. The embodiment of the present invention does not limit the power consumption feature.
[0070] In another embodiment, the historical power consumption curve may also be an image, and image features may be extracted from the image of the historical power consumption curve to serve as the power consumption features.
[0071] S204: Input the second power usage feature into the feature matching subnetwork, and determine in the feature matching subnetwork a candidate first power usage feature whose average power usage in the feature library and the average power usage in the second power usage feature are within a preset difference range.
[0072] After training, the user pairing model of this embodiment can input the historical electricity consumption curve of the first power user ID in the classified power user set into the pre-trained user pairing model to extract the first electricity consumption feature of the first power user ID in the feature extraction subnetwork, and associate the first power user ID and the first electricity consumption feature and store them in the feature library of the user pairing model, that is, the feature library includes multiple first electricity consumption features of the classified first power user IDs, such as the maximum electricity consumption, average electricity consumption, peak electricity consumption time period, valley electricity consumption time period, and electricity consumption time periods of each electricity consumption interval of the first power user ID.
[0073] In an optional embodiment, after the feature extraction subnetwork inputs the second power usage feature of the second power user ID into the feature matching subnetwork, the feature matching subnetwork calculates the difference between the second power usage feature and the average power usage of each first power usage feature in the feature library to determine the first power usage feature whose difference value is within a preset difference range as a candidate first power usage feature.
[0074] In another embodiment, the difference between the second power usage feature and the maximum power usage in each first power usage feature in the feature library can be further calculated, and the first power usage feature whose average power usage difference and maximum power usage difference are both within the preset difference range can be used as a candidate first power usage feature.
[0075] After calculating the difference through the average power consumption in the power consumption characteristics, the first power consumption characteristic whose difference is within the preset difference range is taken as the candidate first power consumption characteristic. This can screen out power users with similar average power consumption. For example, residential power consumption is usually smaller than commercial and industrial power consumption. This avoids matching civil power users with commercial and industrial users, reduces the number of subsequent feature matching, and improves the efficiency of generating user pairs.
[0076] S205. Calculate the matching degree between the candidate first power usage feature and the second power usage feature through the maximum power usage, the average power usage, the power peak period, the power valley period, and the power usage time periods of each power interval.
[0077] The matching degree between the first power usage feature and the second power usage feature may be the similarity between the first power usage feature and the second power usage feature, and the similarity may be calculated by the difference between each feature quantity in the first power usage feature and the second power usage feature.
[0078] In one embodiment, the matching degree sim between the first power usage feature and the second power usage feature may be calculated by the following formula:
[0079]
[0080] Among them, T H1 , T H2are the peak power consumption time periods in the first power consumption feature and the second power consumption feature, respectively, |T H1 -T H2 | indicates T H1 With T H2 The length of the overlapping time period, max(T H1 ,T H2 ) means taking T H1 and T H2 The maximum duration in, T L1 , T L2 are the valley periods in the first and second power consumption characteristics, respectively, L1 -T L2 | indicates T L1 With T L2 The length of the overlapping time period, max(T L1 ,T L2 ) means taking T L1 and T L2 The maximum duration in Q max1 , Q max2 are the maximum power consumption in the first power consumption feature and the second power consumption feature, respectively, Q ave1 , Q ave2 They are the average power consumption in the first power consumption characteristic and the second power consumption characteristic respectively, i is the number of power consumption intervals whose overlap rate of power consumption time periods is greater than the threshold, N is the total number of power consumption intervals, and the overlap rate of power consumption time periods can be the ratio of the length of the overlapping part of two power consumption time periods to the length of the maximum power consumption time period.
[0081] According to the calculation formula of the above matching degree sim, the first power consumption feature and the second power consumption feature |T H1 -T H2 | and |T L1 -T L2 | is larger, indicating that the overlap of the peak power consumption time period of the first power user and the second power user is larger, and the overlap of the valley power consumption time period is also larger. The maximum power consumption Q of the first power user and the second power user is max1 , Q max2 The closer it is, the average power consumption Q ave1 , Q ave2 The closer they are, the greater the number i of electricity consumption intervals whose overlap rate of electricity consumption time periods is greater than the threshold, the greater the matching degree sim, the higher the possibility that the first electricity user and the second electricity user have the same electricity consumption habits, and the more likely they are to be electricity users of the same category.
[0082] In another embodiment, the first absolute value of the difference between the maximum power consumption in the first power consumption feature and the second power consumption feature and the second absolute value of the difference in average power consumption can be calculated first, the overlap rate of the peak power consumption time period in the first power consumption feature and the second power consumption feature can be calculated to obtain the peak time overlap rate, the overlap rate of the valley power consumption time period can be calculated to obtain the valley time overlap rate, the overlap rate of the power consumption time period in the same power consumption interval in the first power consumption feature and the second power consumption feature can be calculated, and finally, the weighted sum of the inverse of the first absolute value, the inverse of the second absolute value, the peak time overlap rate, the valley time overlap rate, and the overlap rate of the power consumption time periods in each power consumption interval can be calculated as the matching degree.
[0083] This embodiment matches the candidate first electricity usage feature with the second electricity usage feature based on electricity usage characteristics in multiple dimensions, including maximum electricity consumption, average electricity consumption, peak electricity consumption time period, valley electricity consumption time period, and electricity consumption time periods in various electricity consumption intervals, to improve the accuracy of determining electricity users of the same category.
[0084] S206: Determine the candidate first power usage feature with the greatest matching degree as the first power usage feature that matches the second power usage feature.
[0085] After calculating the matching degrees between the multiple candidate first power usage features and the second power usage features, the multiple candidate first power usage features can be sorted from large to small according to the matching degrees, and the first candidate first power usage feature can be determined as the first power usage feature matching the second power usage feature.
[0086] S207: Generate a user pair using the extracted second power user ID and the first power user ID associated with the first power usage feature that matches the second power usage feature, and output the user pair and the matching degree.
[0087] After determining the candidate first power usage feature with the greatest matching degree as the first power usage feature that matches the second power usage feature, the first power user ID associated with the first power usage feature can be determined, and a user pair can be generated using the first power user ID and the second power user ID, and the matching degree is output, which is the matching degree between the first power usage feature of the first power user ID and the second power usage feature of the second power user ID in the user pair.
[0088] S208: When the matching degree is greater than a threshold, determining the user category of the first power user ID in the user pair as the user category of the extracted second power user ID.
[0089] If the matching degree of the user pair is greater than a threshold, such as greater than 0.9, then it is determined that the probability that the user category of the second power user ID in the user pair is the same as that of the first power user ID is high, and the user category of the first power user ID in the user pair can be determined as the user category of the second power user ID.
[0090] S209: remove the extracted second power user ID from the set of power users to be classified and add it to the set of classified power users.
[0091] After determining the user category of the second power user ID extracted from the power user set to be classified, the extracted second power user ID can be removed from the power user set to be classified and added to the classified power user set after adding a category label as a classified first power user ID.
[0092] If the matching degree of the user pair is less than or equal to the threshold, the extracted second power user ID is not classified, and the second power user ID is still in the set of power users to be classified.
[0093] S210: Determine whether a preset stop classification condition is met.
[0094] In one embodiment, if the matching degree is less than the threshold, the second power user ID is still in the set of power users to be classified, that is, the number of extractions of the second power user ID is accumulated by 1, indicating that the number of classifications of the second power user ID is accumulated by 1, and the number of IDs of the second power user IDs in the set of power users to be classified and the number of extractions of the extracted second power user IDs can be counted, and the average number of extractions of the extracted second power user IDs in the set of power users to be classified can be calculated using the number of extractions to determine whether the number of IDs is less than the number threshold. When the number of IDs is less than the number threshold, it means that the number of second power user IDs in the set of power users to be classified is small, and it can be confirmed by manual annotation. If the condition for stopping classification is met, S212 can be executed to stop classifying the second power user ID in the set of power users to be classified. If the number of IDs is greater than the number threshold, it means that the number of second power user IDs in the set of power users to be classified is still relatively large, and manual classification requires a lot of manpower. It is determined that the condition for stopping classification is not met and classification needs to be continued. It can be judged whether the average number of extraction times is less than the number threshold. If so, it is determined that the classification accuracy of the user pairing model is high, and it can be returned to S202 to continue to classify the second power user ID in the set of power users to be classified. If the average number of extraction times is greater than the number threshold, it is determined that the classification accuracy of the user pairing model is reduced, and S211 can be executed.
[0095] S211, extracting power user IDs from the classified power user set and the to-be-classified power user set to construct training samples, and using the training samples to retrain the user pairing model.
[0096] In one embodiment, two power user IDs with different user categories can be selected from the classified power user set to construct a first-level negative user pair, one power user ID can be selected from the classified power user set and an extracted power user ID can be selected from the user set to be classified to construct a second-level negative user pair, and two power user IDs with the same user category can be selected from the classified power user set to construct a positive user pair.
[0097] Exemplarily, a power user ID of user category 1 and a power user ID of user category 2 can be selected from the classified power user set to construct a first-level negative user pair, and the probability that the first-level negative user pair belongs to the same user category can be marked (the probability can be expressed by the matching degree of the power consumption characteristics of the two power user IDs), a power user ID is randomly selected from the classified power user set and a power user ID that has been extracted twice from the user set to be classified to construct a second-level negative user pair, and then two power user IDs with the same user category are randomly selected from the classified power user set to construct a positive user pair. It can be seen that, with the capabilities of the current user pairing model, in terms of the difficulty of judging whether the two power user IDs in a user pair belong to the same user category, the positive user pair is the easiest, the second-level negative sample pair is the most difficult, and the first-level negative sample pair is the second most difficult.
[0098] When retraining the user pairing model, a batch of user pairs can be extracted, and a batch of user pairs includes an equal number of first-level negative user pairs, second-level negative user pairs and positive user pairs. The historical electricity consumption curve associated with the two power user IDs in the extracted user pairs is input into the user pairing model to obtain the probability that the user categories of the two power user IDs in the extracted user pairs belong to the same category, and the loss rate is calculated according to the probability and the type of user pairs. The type of user pairs includes the level of user pairs (such as positive samples or negative samples, and the level of negative samples). It is judged whether the loss rate is less than a preset loss rate threshold. If so, it is determined that the user pairing model has completed retraining; the historical electricity consumption curve associated with the classified power user ID in the extracted user pairs is input into the user pairing model to obtain the electricity consumption characteristics associated with the classified power user ID, and the electricity consumption characteristics are stored in the feature library; if not, the model parameters of the user pairing model are adjusted according to the loss rate, and the step of randomly extracting user pairs from negative user pairs and positive user pairs is returned.
[0099] In one embodiment, when calculating the loss rate, the probability of the same user category and the marked probability of the two power user IDs in each user pair can be input into a preset loss function to obtain the loss rate of each user pair, and the weight of the user pair is determined according to the type of the user pair, wherein the weight of the positive user pair is the smallest, the weight of the second-level negative user pair is the largest, and the weight of the first-level negative user pair is between the weights of the positive user pair and the second-level negative user pair. The weighted average is calculated by the loss rate, weight and number of user pairs extracted in a batch of each user pair to obtain the total loss rate. Among them, the loss function can be a binary cross entropy loss function, a mean square error loss function, etc., and this embodiment does not limit the loss function.
[0100] This embodiment constructs first-level negative user pairs, second-level negative user pairs and positive user pairs through the power user IDs in the classified power user set and the power user set to be classified, and sets the weight of the second-level negative user pairs to be the largest, the weight of the first-level negative user pairs to be the second, and the weight of the positive user pairs to be the smallest when calculating the loss rate, so that the retrained user pairing model focuses on learning the ability to distinguish user categories of the second power user IDs that have been extracted from the user set to be classified, so that the extracted second power user IDs in the power user set to be classified are classified by the retrained user pairing model, avoiding an increase in the proportion of the second power user IDs extracted from the power user set to be classified after a preset period of time or after extracting multiple batches of second power user IDs and inputting them into the user pairing model, thereby improving the efficiency and accuracy of power user classification.
[0101] After retraining the user pairing model, the process may return to S202 to continue extracting a second power user ID from the set of power users to be classified and input it into the retrained user pairing model to continue classifying power users.
[0102] S212. Stop classifying electricity users.
[0103] When the conditions for stopping classification are met, stop extracting the second power user ID from the set of power users to be classified. The power user ID in the classified power user set is the classified power user ID. The classified power user ID includes at least one category label. For example, a power user ID may include label 1 (residential users), label 2 (medium-power users), label 3 (peak-period users), and so on.
[0104] After completing the classification of electricity users, an electricity user screening request sent by the user client is received, the electricity user screening request includes at least one target user category label and label operation rule, and a target electricity user ID is determined from the classified electricity user set according to the at least one target user category label and label operation rule, and the target electricity user ID is sent to the user client.
[0105] When distribution network marketers need to filter power users to push service messages, they can input power user filtering conditions on the client to generate a power user filtering request and send it to the server. The power user filtering request includes at least one target user category tag and a tag operation rule, wherein the tag operation rule can be an "AND" or "OR" logical operation between multiple target user category tags.
[0106] Exemplarily, the target user category label and label calculation rules input by the user are as follows:
[0107] "Residential or industrial" and "high power users" and "peak users";
[0108] That is, if it is desired to screen out high-power users during peak electricity consumption among residential and industrial users, then the industrial users or residential users who consume high power during peak electricity consumption can be screened out based on the category labels of the power user IDs in the classified power user set. After determining the target power user ID, the target power user ID can be sent to the user client so that the marketing personnel can push marketing messages to the target power user ID on the user client. For example, the target power user ID is the ID of an industrial user or residential user who consumes high power during peak electricity consumption. The electricity price during the off-peak period can be pushed to encourage the user to use electricity during the off-peak period. By setting category labels for the classified power user IDs, the required target power users can be easily screened out.
[0109] In this embodiment, the historical electricity consumption curve of the second power user ID in the set of power users to be classified is input into the user pairing model to obtain a user pair and a matching degree. The user pair includes the second power user ID and the first power user ID in the set of classified power users. When the matching degree is greater than a threshold, the user category of the first power user ID is determined as the user category of the second power user ID. There is no need to manually classify power users, which saves the labor cost and time of power user classification and does not rely on manual experience, thereby improving the accuracy of power user classification. Power user IDs are extracted from the classified power user set and the set of power users to be classified to construct training samples, and the user pairing model is retrained using the training samples, which can further improve the accuracy of power user classification.
[0110] Embodiment 3
[0111] Figure 3 This is a schematic diagram of the structure of a power user classification device provided in Embodiment 3 of the present invention. Figure 3 As shown, the power user classification device includes:
[0112] A user set acquisition module 301 is used to acquire a classified power user set and a to-be-classified power user set, wherein the classified power user set includes a classified first power user ID, and the to-be-classified power user set includes a to-be-classified second power user ID;
[0113] The power consumption curve acquisition module 302 is used to extract a second power user ID from the set of power users to be classified, and acquire a historical power consumption curve of the extracted second power user ID;
[0114] A user pairing module 303, configured to input the historical power consumption curve into a pre-trained user pairing model to obtain a user pair and a matching degree, wherein the user pair includes a first power user ID and an extracted second power user ID;
[0115] A user category determination module 304, configured to determine the user category of the first power user ID in the user pair as the user category of the extracted second power user ID when the matching degree is greater than a threshold;
[0116] A user set updating module 305, configured to remove the extracted second power user ID from the to-be-classified power user set and add it to the classified power user set;
[0117] The stop classification condition judgment module 306 is used to judge whether the preset stop classification condition is met; if so, the stop classification module 307 is executed, if not, the retraining module 308 is executed;
[0118] A stop classification module 307 is used to stop the classification of power users;
[0119] The retraining module 308 is used to extract power user IDs from the classified power user set and the to-be-classified power user set to construct training samples, and use the training samples to retrain the user pairing model, and return the power consumption curve acquisition module 302 .
[0120] Optionally, also include:
[0121] A curve acquisition module, used to acquire a historical power consumption curve of the first power user ID in the classified power user set;
[0122] An electricity usage feature extraction module, configured to input a historical electricity usage curve of the first electricity user ID into a pre-trained user pairing model to obtain a first electricity usage feature of the first electricity user ID;
[0123] The power usage feature storage module is used to associate the first power user ID with the first power usage feature and store it in a feature library of the user pairing model.
[0124] Optionally, the user pairing model is provided with a feature library, the feature library stores a first power usage feature associated with a first power user ID, and the user pairing model includes a feature extraction subnetwork and a feature matching subnetwork connected in sequence;
[0125] The user pairing module 303 includes:
[0126] A power consumption feature extraction unit is used to input the historical power consumption curve into a pre-trained user pairing model, and extract the maximum power consumption, average power consumption, peak power consumption time period, valley power consumption time period, and power consumption time period of each power interval of the historical power consumption curve in the feature extraction subnetwork as a second power consumption feature;
[0127] a first power usage feature screening unit, configured to input the second power usage feature into the feature matching subnetwork, and determine in the feature matching subnetwork a candidate first power usage feature whose average power usage in the feature library and the average power usage in the second power usage feature are within a preset difference range;
[0128] a matching degree calculation unit, configured to calculate the matching degree between the candidate first power usage feature and the second power usage feature through the maximum power consumption, the average power consumption, the peak power consumption time period, the valley power consumption time period, and the power consumption time periods of each power interval;
[0129] a first power usage feature determining unit, configured to determine the candidate first power usage feature with the greatest matching degree as the first power usage feature matching the second power usage feature;
[0130] The user pair and matching degree output unit is used to generate a user pair by using the extracted second power user ID and the first power user ID associated with the first power usage feature matching the second power usage feature, and output the user pair and the matching degree.
[0131] Optionally, the stop classification condition determination module 306 includes:
[0132] a statistical unit, configured to count the number of second power user IDs in the set of power users to be classified and the number of extractions of the extracted second power user IDs, and to calculate the average number of extractions of the extracted second power user IDs in the set of power users to be classified using the number of extractions;
[0133] An ID quantity determination unit, configured to determine whether the ID quantity is less than a quantity threshold, and if so, execute the first determination unit, and if not, execute the second determination unit;
[0134] A first determining unit, configured to determine that a stop classification condition is satisfied when the number of IDs is less than the number threshold;
[0135] A second determining unit, configured to determine that a stop classification condition is not met when the number of IDs is greater than the number threshold;
[0136] A times determination unit, used to determine whether the average extraction times is less than a times threshold, if so, execute the power consumption curve acquisition module 302, if not, execute the retraining module 308;
[0137] Optionally, the retraining module 308 includes:
[0138] A first-level negative user pair construction unit, configured to select two power user IDs with different user categories from the classified power user set to construct a first-level negative user pair;
[0139] A second-level negative user pair construction unit, configured to select an electric power user ID from the classified electric power user set and an extracted electric power user ID from the to-be-classified user set to construct a second-level negative user pair;
[0140] The positive user pair construction unit is used to select two power user IDs with the same user category from the classified power user set to construct a positive user pair.
[0141] Optionally, the retraining module 308 includes:
[0142] A sample extraction unit, configured to extract a batch of user pairs, wherein the batch of user pairs includes an equal number of first-level negative user pairs, second-level negative user pairs, and positive user pairs;
[0143] A probability output unit, used to input the historical power consumption curve associated with the two power user IDs in the extracted user pair into the user pairing model to obtain the probability that the user categories of the two power user IDs in the extracted user pair belong to the same category;
[0144] a loss rate calculation unit, configured to calculate the loss rate according to the probability and the type of the user pair, wherein the type of the user pair includes the level of the user pair;
[0145] A judging unit, used to judge whether the loss rate is less than a preset loss rate threshold, and if so, execute the retraining completion determination unit, and if not, execute the parameter adjustment unit;
[0146] A retraining completion determination unit, used to determine that the user pairing model has completed retraining;
[0147] A feature library updating unit, used for inputting the historical power consumption curve associated with the classified power user ID in the extracted user pair into the user pairing model, obtaining the power consumption characteristics associated with the classified power user ID, and storing the power consumption characteristics in the feature library;
[0148] The parameter adjustment unit adjusts the model parameters of the user pairing model according to the loss rate and returns the parameters to the sample extraction unit.
[0149] Optionally, each power user ID in the classified power user set is associated with at least one user category tag, further comprising:
[0150] A screening request receiving module, used to receive a power user screening request sent by a user client, wherein the power user screening request includes at least one target user category label and a label operation rule;
[0151] a target power user ID determination module, configured to determine a target power user ID from the classified power user set according to at least one target user category label and a label operation rule;
[0152] The target power user ID sending module is used to send the target power user ID to the user client.
[0153] The power user classification device provided in the embodiment of the present invention can execute the power user classification method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0154] Embodiment 4
[0155] Figure 4 A schematic diagram of an electronic device 40 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0156] like Figure 4As shown, the electronic device 40 includes at least one processor 41, and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 to the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0157] A number of components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0158] The processor 41 may be a variety of general and / or dedicated processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 41 executes the various methods and processes described above, such as the power user classification method.
[0159] In some embodiments, the power user classification method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the power user classification method described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to perform the power user classification method in any other appropriate manner (e.g., by means of firmware).
[0160] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0161] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0162] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0163] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0164] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0165] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0166] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0167] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for classifying power users, characterized in that: include: Acquire a set of classified power users and a set of power users to be classified, wherein the set of classified power users includes a first power user ID that has been classified, and the set of power users to be classified includes a second power user ID that is to be classified; Extracting a second power user ID from the set of power users to be classified, and obtaining a historical power consumption curve of the extracted second power user ID; Inputting the historical power consumption curve into a pre-trained user pairing model to obtain a user pair and a matching degree, wherein the user pair includes a first power user ID and an extracted second power user ID; When the matching degree is greater than a threshold, determining the user category of the first power user ID in the user pair as the user category of the extracted second power user ID; removing the extracted second power user ID from the set of power users to be classified and adding it to the set of classified power users; Determine whether the preset stop classification condition is met; If so, stop classifying electricity users; If not, extract power user IDs from the classified power user set and the to-be-classified power user set to construct training samples, use the training samples to retrain the user pairing model, and return to the step of extracting a second power user ID from the to-be-classified power user set and obtaining a historical power consumption curve of the extracted second power user ID; The user pairing model is provided with a feature library, the feature library stores a first power usage feature associated with a first power user ID, and the user pairing model includes a feature extraction subnetwork and a feature matching subnetwork connected in sequence; Inputting the historical power consumption curve into a pre-trained user pairing model to obtain a user pair includes: The historical power consumption curve is input into a pre-trained user pairing model, and the maximum power consumption, average power consumption, peak power consumption time period, valley power consumption time period, and power consumption time periods of each power consumption interval of the historical power consumption curve are extracted in the feature extraction subnetwork as the second power consumption feature; Inputting the second power usage feature into the feature matching subnetwork, and determining in the feature matching subnetwork a candidate first power usage feature whose average power usage in the feature library and the average power usage in the second power usage feature are within a preset difference range; Calculate the matching degree between the candidate first power usage feature and the second power usage feature through the maximum power consumption, the average power consumption, the power peak period, the power valley period, and the power consumption time periods of each power interval; Determine the candidate first power usage feature with the greatest matching degree as the first power usage feature matching the second power usage feature; Generate a user pair using the extracted second power user ID and a first power user ID associated with the first power usage feature matching the second power usage feature, and output the user pair and the matching degree; The matching degree sim between the candidate first power usage feature and the second power usage feature is calculated by the following formula: ; Among them, T H1 、T H2 are the peak power consumption time periods in the candidate first power consumption feature and the second power consumption feature, respectively, H1 -T H2 | indicates T H1 With T H2 The length of the overlapping time period, max(T H1 ,T H2 ) means taking T H1 and T H2 The maximum duration in, T L1 、T L2 are the valley time periods in the candidate first and second electricity usage features, respectively, L1 -T L2 | indicates T L1 With T L2 The length of the overlapping time period, max(T L1 ,T L2 ) means taking T L1 and T L2 The maximum duration in Q max1 , Q max2 are the maximum power consumption in the candidate first power consumption feature and the second power consumption feature, respectively, Q ave1 , Q ave2 are the average power consumption in the candidate first power consumption feature and the candidate second power consumption feature, respectively; i is the number of power consumption intervals whose overlap rate of power consumption time periods is greater than the threshold; N is the total number of power consumption intervals; the overlap rate of power consumption time periods is the ratio of the duration of the overlapped part of two power consumption time periods to the duration of the maximum power consumption time period; Extracting power user IDs from the classified power user set and the to-be-classified power user set to construct training samples includes: Selecting two power user IDs with different user categories from the classified power user set to construct a first-level negative user pair; Selecting an electric power user ID from the classified electric power user set and selecting an extracted electric power user ID from the to-be-classified electric power user set to construct a second-level negative user pair; Selecting two power user IDs with the same user category from the classified power user set to construct a positive user pair; Retraining the user pairing model using the training sample includes: Extracting a batch of user pairs, the batch of user pairs comprising an equal number of first-level negative user pairs, second-level negative user pairs, and positive user pairs; Inputting the historical power consumption curve associated with the two power user IDs in the extracted user pair into the user pairing model, and obtaining the probability that the user categories of the two power user IDs in the extracted user pair belong to the same category; Calculating a loss rate according to the probability and a type of the user pair, the type of the user pair including a level of the user pair; Determining whether the loss rate is less than a preset loss rate threshold; If so, determining that the user pairing model has completed retraining; Inputting the historical power consumption curve associated with the classified power user ID in the extracted user pair into the user pairing model, obtaining the power consumption features associated with the classified power user ID, and storing the power consumption features in the feature library; If not, adjust the model parameters of the user pairing model according to the loss rate, and return to the step of extracting a batch of user pairs.
2. The method for classifying power users according to claim 1, characterized in that: Before extracting the second power user ID from the set of power users to be classified, the method further includes: Obtaining a historical electricity consumption curve of the first power user ID in the classified power user set; Inputting the historical power consumption curve of the first power user ID into a pre-trained user pairing model to obtain a first power consumption feature of the first power user ID; The first power user ID and the first power usage feature are associated and stored in a feature library of the user pairing model.
3. The method for classifying power users according to claim 1, characterized in that: Determine whether the preset stop classification conditions are met, including: Counting the number of second power user IDs in the set of power users to be classified and the number of extractions of the extracted second power user IDs, and using the number of extractions to calculate the average number of extractions of the extracted second power user IDs in the set of power users to be classified; Determine whether the number of IDs is less than a quantity threshold; When the number of IDs is less than the number threshold, determining that a stop classification condition is met; When the number of IDs is greater than the number threshold, determining that the classification stop condition is not met; Determine whether the average number of extractions is less than a number threshold; If yes, return to the step of extracting a second power user ID from the set of power users to be classified, and obtaining a historical power consumption curve of the extracted second power user ID; If not, execute the step of constructing training samples.
4. The method for classifying power users according to any one of claims 1 to 3, characterized in that: Each power user ID in the classified power user set is associated with at least one user category tag, and after stopping the power user classification, it also includes: Receiving a power user screening request sent by a user client, wherein the power user screening request includes at least one target user category label and a label operation rule; Determining a target power user ID from the classified power user set according to at least one target user category label and a label operation rule; The target power user ID is sent to the user client.
5. A device for classifying power users, characterized in that: include: A user set acquisition module, used to acquire a classified power user set and a to-be-classified power user set, wherein the classified power user set includes a classified first power user ID, and the to-be-classified power user set includes a to-be-classified second power user ID; An electricity consumption curve acquisition module is used to extract a second electricity user ID from the set of electricity users to be classified, and acquire a historical electricity consumption curve of the extracted second electricity user ID; A user pairing module, configured to input the historical power consumption curve into a pre-trained user pairing model to obtain a user pair and a matching degree, wherein the user pair includes a first power user ID and an extracted second power user ID; A user category determination module, configured to determine the user category of the first power user ID in the user pair as the user category of the extracted second power user ID when the matching degree is greater than a threshold; A user set updating module, configured to remove the extracted second power user ID from the to-be-classified power user set and add it to the classified power user set; A stop classification condition judgment module is used to judge whether a preset stop classification condition is met; If yes, execute the stop classification module, if no, execute the retraining module; A stop classification module is used to stop the classification of power users; A retraining module, used for extracting power user IDs from the classified power user set and the to-be-classified power user set to construct training samples, and retraining the user pairing model using the training samples, and returning the power consumption curve acquisition module; The user pairing model is provided with a feature library, the feature library stores a first power usage feature associated with a first power user ID, and the user pairing model includes a feature extraction subnetwork and a feature matching subnetwork connected in sequence; The user pairing module includes: A power consumption feature extraction unit is used to input the historical power consumption curve into a pre-trained user pairing model, and extract the maximum power consumption, average power consumption, peak power consumption time period, valley power consumption time period, and power consumption time period of each power interval of the historical power consumption curve in the feature extraction subnetwork as a second power consumption feature; a first power usage feature screening unit, configured to input the second power usage feature into the feature matching subnetwork, and determine in the feature matching subnetwork a candidate first power usage feature whose average power usage in the feature library and the average power usage in the second power usage feature are within a preset difference range; a matching degree calculation unit, configured to calculate the matching degree between the candidate first power usage feature and the second power usage feature through the maximum power consumption, the average power consumption, the peak power consumption time period, the valley power consumption time period, and the power consumption time periods of each power interval; a first power usage feature determining unit, configured to determine the candidate first power usage feature with the greatest matching degree as the first power usage feature matching the second power usage feature; A user pair and matching degree output unit, configured to generate a user pair using the extracted second power user ID and a first power user ID associated with a first power usage feature matching the second power usage feature, and output the user pair and the matching degree; The matching degree sim between the candidate first power usage feature and the second power usage feature is calculated by the following formula: ; Among them, T H1 、T H2 are the peak power consumption time periods in the candidate first power consumption feature and the second power consumption feature, respectively, H1 -T H2 | indicates T H1 With T H2 The length of the overlapping time period, max(T H1 ,T H2 ) means taking T H1 and T H2 The maximum duration in, T L1 、T L2 are the valley time periods in the candidate first and second electricity usage features, respectively, L1 -T L2 | indicates T L1 With T L2 The length of the overlapping time period, max(T L1 ,T L2 ) means taking T L1 and T L2 The maximum duration in Q max1 , Q max2 are the maximum power consumption in the candidate first power consumption feature and the second power consumption feature, respectively, Q ave1 , Q ave2 are the average power consumption in the candidate first power consumption feature and the candidate second power consumption feature, respectively; i is the number of power consumption intervals whose overlap rate of power consumption time periods is greater than the threshold; N is the total number of power consumption intervals; the overlap rate of power consumption time periods is the ratio of the duration of the overlapped part of two power consumption time periods to the duration of the maximum power consumption time period; The retraining module includes: A first-level negative user pair construction unit, configured to select two power user IDs with different user categories from the classified power user set to construct a first-level negative user pair; A second-level negative user pair construction unit, configured to select an electric power user ID from the classified electric power user set and an extracted electric power user ID from the to-be-classified electric power user set to construct a second-level negative user pair; A positive user pair building unit, configured to select two power user IDs with the same user category from the classified power user set to build a positive user pair; A sample extraction unit, configured to extract a batch of user pairs, wherein the batch of user pairs includes an equal number of first-level negative user pairs, second-level negative user pairs, and positive user pairs; A probability output unit, used to input the historical power consumption curve associated with the two power user IDs in the extracted user pair into the user pairing model to obtain the probability that the user categories of the two power user IDs in the extracted user pair belong to the same category; a loss rate calculation unit, configured to calculate the loss rate according to the probability and the type of the user pair, wherein the type of the user pair includes the level of the user pair; A judging unit, used to judge whether the loss rate is less than a preset loss rate threshold, and if so, execute the retraining completion determination unit, and if not, execute the parameter adjustment unit; A retraining completion determination unit, used to determine that the user pairing model has completed retraining; A feature library updating unit, used for inputting the historical power consumption curve associated with the classified power user ID in the extracted user pair into the user pairing model, obtaining the power consumption characteristics associated with the classified power user ID, and storing the power consumption characteristics in the feature library; The parameter adjustment unit adjusts the model parameters of the user pairing model according to the loss rate and returns the parameters to the sample extraction unit.
6. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the power user classification method according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method for classifying power users according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Washing machine user grouping method, device and equipment and medium
CN117078283A
Power consumer side load classification method and system based on deep learning
CN117113159A
