A method, device, electronic device and medium for constructing a power separation model
By building a global and terminal power separation model, using the power consumption data of typical users and target users for fine-tuning, the problems of low power separation accuracy and privacy security in cross-user scenarios are solved, and high-precision electrical power consumption prediction and privacy protection are achieved.
Patent Information
- Application Number
- CN202410494295.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-23
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2044-04-23
AI Technical Summary
The existing power separation model has low accuracy in cross-user scenarios and cannot guarantee user privacy and security, and cannot effectively integrate the power consumption of each target user into the training process.
Build a global power separation model and a terminal power separation model, build a global model using the power consumption of typical users, and fine-tune the global model through the target user's historical total power consumption sequence and electrical appliance power consumption sequence to generate a terminal power separation model corresponding to the target user, and realize power separation.
The accuracy of the power separation process is improved and the privacy and security of users is ensured. Each user does not need to upload his own power consumption to the global model. The terminal power separation model is close to the user's power consumption rules, improving the accuracy of electrical power consumption prediction.
Smart Images

Figure CN118428829B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power systems, and in particular to a method, device, electronic equipment and medium for constructing an electric quantity separation model. Background Art
[0002] Currently, when monitoring user power loads, a power separation model is constructed to separate the detailed power consumption data of each appliance from the user's total power consumption data in order to analyze the user's power consumption details in detail. However, most existing power separation models directly use the total power consumption data and appliance power consumption data of typical users for training, and then directly apply the power separation model trained based on typical users to all target users. However, the power separation model trained in this way can only infer the power consumption of other target users based on the power consumption of typical users, and cannot directly incorporate the power consumption of all target users into the model training process. In actual applications, the power consumption of each target user is not completely consistent. There may be distribution differences between the total power consumption data input when using the model for inference and the total power consumption data input when the model is trained, resulting in low power separation accuracy in cross-user scenarios. In addition, existing power separation models usually adopt centralized model training. The centralized training of the model requires users to share data, and the privacy and security of users cannot be guaranteed. Summary of the Invention
[0003] In view of this, the purpose of the present invention is to provide a method, device, electronic device, and medium for constructing a power separation model. This method accurately separates the power consumption of target users through a terminal power separation sub-model, improving the accuracy of the power separation process. Furthermore, the terminal power separation sub-model and the global power separation sub-model are independent of each other, eliminating the need for individual users to upload their power usage information to the global power separation sub-model, thus ensuring user privacy and security. The specific solution is as follows:
[0004] In a first aspect, the present application discloses a method for constructing a power separation model, wherein the power separation model includes a global power separation sub-model and a terminal power separation sub-model; wherein the method includes:
[0005] A global electricity separation sub-model is constructed based on the total electricity consumption series of typical users and the electricity consumption series of electrical appliances;
[0006] When the target user has a historical total power consumption sequence, the global power separation sub-model is fine-tuned based on the typical user's appliance power consumption sequence and the target user's historical total power consumption sequence to obtain a terminal power separation sub-model corresponding to the target user;
[0007] The total power consumption of the corresponding target user is separated based on the terminal power separation sub-model to obtain the target electrical appliance power consumption of the target user.
[0008] Optionally, it also includes:
[0009] Determine the independent power consumption sequence of the target appliance under different working conditions;
[0010] The fine-tuning of the global power separation sub-model based on the electrical power consumption sequence of the typical user and the historical total power consumption sequence of the target user to obtain a terminal power separation sub-model corresponding to the target user includes:
[0011] The global power separation submodel is fine-tuned based on the electrical power consumption sequence of the typical user, the historical total power consumption sequence of the target user and the independent power consumption sequence of the target appliance to obtain a terminal power separation submodel corresponding to the target user.
[0012] Optionally, the fine-tuning of the global power separation sub-model based on the power consumption sequence of the typical user's appliances, the historical total power consumption sequence of the target user, and the independent power consumption sequence of the target appliance to obtain a terminal power separation sub-model corresponding to the target user includes:
[0013] Extracting the power consumption sequence of the target electrical appliance in a working state from the power consumption sequence of the electrical appliances of the typical user;
[0014] Merging the power consumption sequence of the target electrical appliance in the working state and the independent power consumption sequence of the target electrical appliance into an electrical appliance power consumption database;
[0015] Acquire a target appliance power consumption prediction sequence corresponding to the target user's historical total power consumption sequence based on the target user's historical total power consumption sequence and the global power separation sub-model;
[0016] The global power separation sub-model is fine-tuned based on the electrical appliance power consumption database and the target electrical appliance power consumption prediction sequence to obtain a terminal power separation sub-model corresponding to the target user.
[0017] Optionally, fine-tuning the global power separation sub-model based on the electrical appliance power consumption database and the target electrical appliance power consumption prediction sequence to obtain a terminal power separation sub-model corresponding to the target user includes:
[0018] Based on the target user's target electrical appliance power consumption prediction sequence, remove the first element in the target user's historical total power consumption sequence to obtain a total power consumption subsequence, where the first element is the element in the target user's historical total power consumption sequence corresponding to the target electrical appliance being in the working state;
[0019] Constructing an all-zero sequence of the same length as the total power consumption subsequence, and dividing the all-zero sequence into a plurality of all-zero subsequences based on a preset period;
[0020] For any all-zero subsequence, randomly sample a sampling sequence from the appliance power consumption database, and add the sampling sequence and the all-zero subsequence bit by bit starting from any element to obtain an appliance power consumption fine-tuning sequence of equal length to the total power consumption subsequence;
[0021] Adding the total power consumption subsequence and the appliance power consumption fine-tuning sequence bit by bit to obtain a total power consumption fine-tuning sequence;
[0022] The global power separation sub-model is fine-tuned based on the appliance power consumption fine-tuning sequence and the total power consumption fine-tuning sequence to obtain a terminal power separation sub-model corresponding to the target user.
[0023] Optionally, the step of removing the first element from the target user's historical total power consumption sequence based on the target appliance power consumption prediction sequence to obtain a total power consumption subsequence includes:
[0024] Binarizing the target electrical appliance power consumption prediction sequence based on the target electrical appliance's on / off threshold value to obtain an electrical appliance on / off sequence;
[0025] Based on the appliance switching sequence, the first element in the historical total power consumption sequence of the target user is determined and removed to obtain a total power consumption subsequence.
[0026] Optionally, it also includes:
[0027] The global power separation sub-model is fine-tuned based on the total power consumption sequence of a typical user, the power consumption sequence of an electrical appliance, and the independent power consumption sequence of the target electrical appliance.
[0028] Optionally, after separating the total power consumption of the corresponding target user based on the terminal power separation sub-model, the method further includes:
[0029] Performing similarity judgment on the total power consumption sequence of the target user;
[0030] If the similarity between the current total power consumption sequence and the historical total power consumption sequence is less than a preset threshold, the current total power consumption sequence is used as the historical total power consumption sequence, and the process jumps to the step of fine-tuning the global power separation sub-model based on the appliance power consumption sequence of the typical user and the historical total power consumption sequence of the target user to obtain the terminal power separation sub-model corresponding to the target user.
[0031] In a second aspect, the present application discloses a device for constructing a power separation model, wherein the power separation model includes a global power separation sub-model and a terminal power separation sub-model; wherein the device includes:
[0032] A global model building unit, used to build a global power separation sub-model based on the total power consumption sequence of typical users and the power consumption sequence of electrical appliances;
[0033] a terminal model construction unit, configured to, when a target user has a historical total power consumption sequence, fine-tune the global power separation sub-model based on the appliance power consumption sequence of the typical user and the historical total power consumption sequence of the target user to obtain a terminal power separation sub-model corresponding to the target user;
[0034] The power separation unit is used to separate the total power consumption of the corresponding target user based on the terminal power separation sub-model to obtain the target electrical appliance power consumption of the target user.
[0035] In a third aspect, the present application discloses an electronic device comprising a processor and a memory; wherein the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the method for constructing a power separation model as described above.
[0036] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the method for constructing a power separation model as described above.
[0037] The present invention discloses a method, device, electronic device and medium for constructing an electricity separation model. First, a global electricity separation sub-model at the global level is constructed using the electricity consumption of a typical user. After the target user has a historical total electricity consumption sequence, a terminal electricity separation sub-model corresponding to the target user is generated based on the target user's own historical total electricity consumption sequence, the typical user's electrical appliance electricity consumption sequence and the independently collected electrical appliance electricity consumption sequence. After that, each target user can perform electricity separation based on the corresponding terminal electricity separation sub-model; the terminal electricity separation sub-model is obtained by fine-tuning each target user based on its own historical total electricity consumption sequence, so the electricity separation of the corresponding target user can be accurately achieved, thereby improving the accuracy of the electricity separation process; at the same time, the terminal electricity separation sub-model and the global electricity separation sub-model are independent of each other, and each user does not need to upload his or her own electricity consumption to the global electricity separation sub-model, thereby ensuring user privacy and security. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0039] Figure 1 A schematic flow chart of a method for constructing a charge separation model provided by the present invention;
[0040] Figure 2 A schematic flow chart of another method for constructing a charge separation model provided by the present invention;
[0041] Figure 3 A schematic structural diagram of a device for constructing a charge separation model provided by the present invention;
[0042] Figure 4 This is a structural diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0043] The core of the present invention is to provide a method, device, electronic device and medium for constructing a power separation model, which accurately realizes the power separation of the corresponding target users through the terminal power separation sub-model, thereby improving the accuracy of the power separation process; at the same time, the terminal power separation sub-model and the global power separation sub-model are independent of each other, and each user does not need to upload his or her own power usage to the global power separation sub-model, thereby ensuring user privacy and security.
[0044] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying 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 making creative efforts shall fall within the scope of protection of the present invention.
[0045] Please refer to Figure 1 , Figure 1 A schematic diagram of a method for constructing a charge separation model provided by the present invention; please refer to Figure 2 , Figure 2 A flow chart of another method for constructing a power separation model provided by the present invention; in a first aspect, the present application discloses a method for constructing a power separation model, the power separation model including a global power separation sub-model and a terminal power separation sub-model; wherein the method includes:
[0046] S11: Construct a global electricity separation sub-model based on the total electricity consumption series of typical users and the electricity consumption series of electrical appliances;
[0047] It is not difficult to understand that when building an electricity separation model, electricity usage data of typical users will be collected at home in advance as training set data for building the electricity separation model. Electricity separation, also known as non-invasive power load monitoring, is the process of analyzing the total electricity meter data at home to obtain detailed information on the electricity usage of each electrical device in the household, that is, electrical appliances. The detailed information on the electricity usage of electrical equipment includes operating time, status, energy consumption, etc. The final constructed electricity separation model needs to analyze and process the total load meter data to be able to identify each electrical device and its working status. Therefore, in the process of home collection, it is necessary to obtain the total electricity consumption sequence of typical users and the electrical appliance electricity consumption sequence of typical users at the same time as the training set for constructing the electricity separation model; among them, the total electricity consumption sequence refers to the set composed of the total electricity consumption data of the user at different times, and the electrical appliance electricity consumption sequence refers to the set composed of the electricity consumption data of a certain electrical appliance of the user at different times. For a typical user, there are usually multiple electrical appliances that can be used, so the electricity consumption data of a typical user generally includes a total electricity consumption sequence and several electrical appliance electricity consumption sequences; usually, in the process of home collection of training sets, electricity consumption data of multiple typical users will be collected to improve the accuracy of the final constructed global electricity separation sub-model.
[0048] It should be noted that this application does not make any special restrictions on the number and selection principles of typical users, which can be determined according to actual application conditions; there are also many options for the specific number and implementation methods of the total electricity consumption series and electrical appliance electricity consumption series of typical users, and this application does not make any special restrictions on them; based on the total electricity consumption series and electrical appliance electricity consumption series of typical users collected at home, a global electricity separation sub-model will be preliminarily constructed to facilitate a preliminary electricity separation and prediction process for the target users; the process of household collection can be achieved by setting electricity collection sensors that correspond one-to-one to electrical appliances, and this application does not make any special restrictions on the method of obtaining the total electricity consumption series and electrical appliance electricity consumption series of typical users.
[0049] S12: When the target user has a historical total electricity consumption sequence, fine-tune the global electricity separation sub-model based on the typical user's appliance electricity consumption sequence and the target user's historical total electricity consumption sequence to obtain a terminal electricity separation sub-model corresponding to the target user;
[0050] It is understandable that in the initial electricity consumption stage of the target user, the target user has no historical electricity consumption record, so it is difficult to determine the specific electricity consumption pattern of the target user. At this stage, the electricity separation and electricity consumption prediction process for the target user needs to be implemented with the help of the global electricity separation sub-model. Therefore, it is necessary to preliminarily construct a global electricity separation sub-model based on the electricity consumption data of typical users in advance to establish a foundation and reference for the electricity separation process of the target user; and the global electricity separation sub-model is constructed based on the electricity consumption data of typical users, so it may not be close to the electricity consumption pattern of the target user. Therefore, with the subsequent electricity consumption process of the target user, after the target user generates its own corresponding historical total electricity consumption sequence, it is necessary to fine-tune the global electricity separation sub-model according to the target user's historical total electricity consumption sequence to obtain a terminal electricity separation sub-model that is closer to its own electricity consumption pattern. At the same time, since the electricity separation model can only obtain the target user's total electricity consumption sequence through the total electricity meter, the fine-tuning process of the terminal electricity separation sub-model also needs to be implemented based on the typical user's appliance electricity consumption sequence.
[0051] It is not difficult to understand that the power separation model needs to further consider privacy protection during user use. Privacy protection refers to the use of various technologies and strategies to ensure that when using individual user power consumption data for model training or prediction, the user's individual related data is not leaked. These data may contain sensitive personal information. In order to further improve the privacy security of each target user's power consumption data, a terminal device located locally in the target user can be set. The terminal device corresponds to the target user one-to-one and is set locally in the corresponding target user. In the process of fine-tuning based on the global power separation sub-model, each target user can download the initial global power separation sub-model to its own local corresponding terminal device, perform the fine-tuning process in the local terminal device, and the terminal power separation sub-model finally constructed is also directly set in the terminal device. In this way, the target user's historical total power consumption sequence, the target user's total power consumption sequence required by the subsequent terminal power separation sub-model, the terminal power separation sub-model's power separation results for the target user, and other target user power consumption data and data synthesis and other data operations will be completed directly in the local terminal device and will not be leaked; this application does not make any special restrictions on the setting method of the terminal device.
[0052] It is not difficult to understand that the terminal power separation sub-model corresponds one-to-one to the target user and is obtained by fine-tuning the historical total power consumption sequence of the corresponding target user. Therefore, the terminal power separation sub-model can be close to the power consumption pattern of the corresponding target user, and the accuracy of power separation is higher; at the same time, the terminal power separation sub-model of each target user exists independently, and operations such as obtaining user data and data synthesis are completed within the terminal device, which will not cause user data leakage; this application does not make any special restrictions on the specific fine-tuning process of the global power separation sub-model. Model fine-tuning can use a specific terminal user's power consumption data set or an expanded target appliance power consumption data set to adjust the model of an already trained power separation model, so that it can better model the terminal user's power consumption characteristics or better identify target appliances of different models and working modes; the terminal power separation sub-model obtained after fine-tuning can effectively improve the accuracy of the power separation process for the target user.
[0053] S13: Separating the total power consumption of the corresponding target user based on the terminal power separation sub-model to obtain the target electrical appliance power consumption of the target user.
[0054] It should be noted that after obtaining the terminal power separation sub-model corresponding to the target user, the power separation for each target user can be carried out in the corresponding terminal power separation sub-model. The terminal power separation sub-model obtains the current total power consumption sequence of the target user, inputs it into the terminal power separation sub-model, obtains the detailed power consumption information of each appliance, and realizes the prediction of the power consumption of each appliance in the target user; the total power consumption of the target user can be collected in real time by the terminal power monitoring equipment, and the total power consumption sequence within the preset period is formed and input into the terminal power separation sub-model, or the real-time collected total power consumption can be directly input into the terminal power separation sub-model to obtain the real-time power consumption information of the target appliance. This application does not make any special restrictions on the method of obtaining the total power consumption of the target user and the specific process of power separation, and can be set according to user needs in actual applications.
[0055] Specifically, a deep learning model can be used to construct a global power separation sub-model and a terminal power separation sub-model.
[0056] On the one hand, the global electricity separation sub-model is mainly trained by the global training set D, which includes the total electricity consumption series of typical users and the electricity consumption series of appliances. The global electricity separation sub-model can be fine-tuned by the synthesized global fine-tuning data D′. First, the global electricity separation sub-model needs to be preliminarily trained based on the global training set collected at home: Given the global training set D = {(x i ,y i )}, where x i is the total electricity consumption sequence of a typical user, y iThe power consumption sequence of a certain type of electrical appliance of a typical user can be used to train a global power separation sub-model f using D, whose input is x i , the reference target output is y i , optimize the following objective function based on the global training set D:
[0057]
[0058] Where θ is the parameter of f, which is a general term for the parameters of deep learning models. f can be implemented based on different network architectures, such as recurrent neural networks, convolutional neural networks, and Transformers. is the loss function, which can be implemented in the form of mean square error. After the global power separation sub-model is trained, given a user's total power sequence x, f will output the predicted appliance power consumption sequence
[0059] After the global electricity separation sub-model is constructed, it can also be fine-tuned based on the total electricity consumption sequence of typical users, the electricity consumption sequence of electrical appliances, and the independent electricity consumption sequence of target appliances. A preset period can be set to periodically fine-tune the global electricity separation sub-model; the electricity consumption sequence of the target appliance in the electrical appliance electricity consumption database is regularly judged for similarity. If the similarity between the data in the newly collected electrical appliance electricity consumption sequence and the historical electricity consumption data of the same appliance is less than the set threshold, or the newly collected electrical appliance electricity consumption sequence is from a new type of appliance, then new global fine-tuning data D′ is synthesized based on the total electricity consumption sequence of typical users, the electrical appliance electricity consumption sequence, and the independent electricity consumption sequence of the target appliance, and the global fine-tuning data is used to fine-tune the global electricity separation sub-model f to obtain the fine-tuned global electricity separation sub-model f′. The objective function of the fine-tuning process is as follows:
[0060]
[0061] Where θ′ is the parameter of model f′, which is a general term for the parameters of deep learning models; is the loss function, is the total power consumption fine-tuning sequence in the global fine-tuning data, Fine-tune the sequence of appliance power consumption in the global fine-tuning data. Periodic global model fine-tuning can ensure that the types of appliances and operating modes covered by the global power separation sub-model are expanded, thus achieving data enhancement for the global power separation sub-model.
[0062] On the other hand, the terminal charge separation sub-model is mainly composed of the synthesized terminal fine-tuning data D u The global charge separation sub-model is fine-tuned, and the terminal can be fine-tuned by the data D uPeriodic updates are performed to update the terminal power separation sub-model. First, after the target user has used electricity for a period of time, the terminal fine-tuning data D can be synthesized based on the typical user's electrical power consumption sequence and the target user's historical total power consumption sequence. u , and then fine-tune the data D based on the synthesized terminal u Fine-tune the global power separation sub-model locally on the terminal, and synthesize the terminal fine-tuning data D based on the target user u corresponding to the terminal u , perform lightweight user-side fine-tuning on the global power separation sub-model f to obtain the terminal power separation sub-model f corresponding to the target user u , the objective function in the fine-tuning process is as follows:
[0063]
[0064] where θ u is the model f u The parameters are the general term for the parameters of the deep learning model; is the loss function, x u The total power consumption sequence of the target user input to the terminal power separation sub-model, y u is the target electrical appliance power consumption sequence of the target user. After the model fine-tuning is completed, the localized terminal power separation sub-model f of user u can be obtained. u After fine-tuning the terminal power separation sub-model, input the target user's total power sequence x collected by the terminal power monitoring device u , f u The target user's electrical power consumption sequence can be output
[0065] After the terminal electricity consumption separation sub-model is built, a preset period can be set locally on the target user to periodically fine-tune the terminal electricity consumption separation sub-model; the total electricity consumption sequence of the terminal user is regularly judged for similarity; if the similarity between the newly collected total electricity consumption sequence (such as the total electricity consumption sequence of a week) and the data of the historical total electricity consumption sequence is less than the set threshold, the current total electricity consumption sequence is re-collected to synthesize a new training set D u , and re-follow the above steps to separate the terminal power sub-model f u Fine-tune and update its parameters θ u , thereby ensuring that the terminal power separation sub-model can continuously optimize itself using the latest user data, always fit the power consumption characteristics of the target users, and achieve accurate power separation and prediction process.
[0066] It is not difficult to understand that this application designs a new method for constructing a power separation model that couples privacy protection and data enhancement, introduces a model fine-tuning process, and ensures that the overall method has the advantages of data-driven, high cross-user separation accuracy, and privacy security. In the process of constructing and fine-tuning the power separation model, a data enhancement strategy is used, focusing on the target user's power consumption characteristics, fully capturing the correlation between the target user's total power consumption and the electrical appliance's power consumption, so that the fine-tuning of the model parameters can more comprehensively integrate the target user's electrical appliance power consumption characteristics; the target user's total power consumption data and the power consumption data of different electrical appliances in the training set are combined to provide the separation model with training data that is more in line with the actual application scenario, improving the cross-user separation accuracy while protecting user privacy. The constructed terminal power separation sub-model is suitable for the user terminal environment and can make full use of the power consumption data collected by the user terminal. It has the advantages of lightweight and privacy security. The detailed power consumption information of each electrical appliance obtained by power separation can provide important support for applications such as smart cities and smart homes. Therefore, the process of improving the security and accuracy of the power separation model in this application can be applied to a variety of application environments and has strong feasibility.
[0067] The present invention discloses a method, device, electronic device and medium for constructing an electricity separation model. First, a global electricity separation sub-model at the global level is constructed using the electricity consumption of a typical user. After the target user has a historical total electricity consumption sequence, a terminal electricity separation sub-model corresponding to the target user is generated based on the target user's own historical total electricity consumption sequence, the typical user's electrical appliance electricity consumption sequence and the independently collected electrical appliance electricity consumption sequence. After that, each target user can perform electricity separation based on the corresponding terminal electricity separation sub-model; the terminal electricity separation sub-model is obtained by fine-tuning each target user based on its own historical total electricity consumption sequence, so the electricity separation of the corresponding target user can be accurately achieved, thereby improving the accuracy of the electricity separation process; at the same time, the terminal electricity separation sub-model and the global electricity separation sub-model are independent of each other, and each user does not need to upload his or her own electricity consumption to the global electricity separation sub-model, thereby ensuring user privacy and security.
[0068] Based on the above embodiment:
[0069] As an optional embodiment, the method further includes:
[0070] Determine the independent power consumption sequence of the target appliance under different working conditions;
[0071] Based on the typical user's appliance power consumption series and the target user's historical total power consumption series, the global power separation sub-model is fine-tuned to obtain the terminal power separation sub-model corresponding to the target user, including:
[0072] Based on the electricity consumption sequence of typical users' appliances, the historical total electricity consumption sequence of target users and the independent electricity consumption sequence of target appliances, the global electricity separation sub-model is fine-tuned to obtain the terminal electricity separation sub-model corresponding to the target users.
[0073] It is not difficult to understand that the present application further introduces a data enhancement process. Data enhancement refers to a method of performing a series of transformations or expansions on the original power consumption data set to increase the data size and diversity. Its purpose is to improve the generalization ability of the power separation model and enhance the adaptability of the power separation model to changes in different end users and target appliances. For the power separation model, its power separation process is not only affected by the user's total power consumption data, but also by the power consumption pattern of the appliance itself. Therefore, in order to improve the accuracy of the power separation model, it is necessary to further consider the relevant data of the power consumption pattern of the expansion appliance itself. Therefore, this embodiment further clarifies the process of determining the independent power consumption sequence of the target appliance under different working states. In the subsequent fine-tuning of the global power separation sub-model and the terminal power separation sub-model, this independent power consumption sequence can be used to improve the adaptability of the power separation model to changes in power consumption patterns. There are many options for determining the data in the independent power consumption sequence of the target appliance, and this application does not make any special restrictions here. The required data can be collected by detection equipment under different working states of the target appliance, or the independent power consumption sequence of the target appliance can be directly generated based on manufacturer data and directly entered into the power separation model.
[0074] It should be noted that the independent power consumption sequence of the target appliance in different working states refers to the power consumption sequence composed of the power consumption data when the target appliance is used independently. Independent use means that the target appliance works independently outside the user's environment. Therefore, the independent power consumption sequence only considers the power consumption of the target appliance during its working process; different working states refer to different working modes or different working times of the target appliance, which will cause different working processes that change power consumption. This application does not make any special restrictions on the specific types and quantities of target appliances. Generally, all appliances that all users in the application scenario will use are required to be treated as target appliances to obtain their independent power consumption sequences respectively. This application does not make any special restrictions on the method of obtaining their independent power consumption sequences and the specific implementation. When there is a new working mode and / or a new type of appliance in the application scenario, the independent power consumption sequence of the new working mode of the appliance and / or the independent power consumption sequence of the new appliance in different working states can be independently collected, and the collected data can be supplemented and added to the independent power consumption sequence; real-time update is made to ensure that the independent power consumption sequences of all target appliances can be timely adapted to the possible power consumption conditions in the actual power consumption process.
[0075] After determining the independent power consumption sequence of the target appliance, a process of time-series synchronization data synthesis can be performed based on the appliance power consumption sequence of a typical user, the historical total power consumption sequence of the target user, and the independent power consumption sequence of the target appliance to generate terminal fine-tuning data. The terminal fine-tuning data is used in the process of fine-tuning the global power separation sub-model to obtain the terminal power separation sub-model corresponding to the target user. It is not difficult to understand that the same target user may have multiple appliances in use. Therefore, each appliance needs to be used as a target appliance. The global power separation sub-model is fine-tuned based on the appliance power consumption sequence of a typical user, the historical total power consumption sequence of the target user, and the independent power consumption sequence of the target appliance. Only then can the terminal power separation sub-model obtained accurately predict the power consumption of the corresponding target appliance.
[0076] Specifically, in the process of fine-tuning the global power separation sub-model to obtain the terminal power separation sub-model corresponding to the target user, an independent power consumption sequence of the target electrical appliance is further set as a supplement to the electrical appliance power consumption data of a typical user, and the influence of the power consumption pattern of the electrical appliance itself on the power separation process is further considered to improve the accuracy and reliability of the power separation model finally obtained by fine-tuning.
[0077] As an optional embodiment, the global power separation sub-model is fine-tuned based on the power consumption sequence of the typical user's appliances, the historical total power consumption sequence of the target user, and the independent power consumption sequence of the target appliance to obtain a terminal power separation sub-model corresponding to the target user, including:
[0078] Extract the power consumption sequence of the target appliance in the working state from the power consumption sequence of the typical user's appliance;
[0079] Merging the power consumption sequence of the target electrical appliance in the working state and the independent power consumption sequence of the target electrical appliance into an electrical appliance power consumption database;
[0080] Based on the historical total electricity consumption sequence of the target user and the global electricity separation sub-model, a target appliance electricity consumption prediction sequence corresponding to the historical total electricity consumption sequence of the target user is obtained;
[0081] Based on the electrical appliance power consumption database and the target electrical appliance power consumption prediction sequence, the global power separation sub-model is fine-tuned to obtain the terminal power separation sub-model corresponding to the target user.
[0082] It is not difficult to understand that in the process of fine-tuning the terminal power separation sub-model based on the global power separation sub-model, it is first necessary to extract the power consumption sequence of the target appliance in the working state from the typical user's appliance power consumption sequence. The working state refers to the power consumption state of the target appliance. The target appliance will only have power consumption in the working state. The basic power consumption of a target appliance is preliminarily determined based on the typical user's appliance power consumption sequence. After that, the independent power consumption sequence of the target appliance and the power consumption sequence of the target appliance in the working state can be further synthesized to obtain a richer and more comprehensive appliance power consumption database of the target appliance; at the same time, the historical total power consumption sequence of the target user needs to be input into the global power separation sub-model first, and the global power separation sub-model is used to obtain the predicted result of the separated target appliance power consumption corresponding to the target user's historical total power consumption sequence, that is, the target appliance power consumption prediction sequence; finally, the terminal fine-tuning data is generated based on the target appliance power consumption database and the target appliance power consumption prediction sequence.
[0083] Specifically, it is necessary to first make a preliminary prediction of the target user's electrical appliance power consumption based on the global power separation sub-model. Then, based on this prediction result, the time-synchronized total power consumption of the target user and the electrical appliance power consumption data can be further synthesized to obtain terminal fine-tuning data that is closer to the target user's power consumption pattern to fine-tune the global power separation sub-model, thereby obtaining a terminal power separation sub-model corresponding to the target user.
[0084] As an optional embodiment, fine-tuning the global power separation sub-model based on the appliance power consumption database and the target appliance power consumption prediction sequence to obtain a terminal power separation sub-model corresponding to the target user includes:
[0085] Based on the target user's target appliance power consumption prediction sequence, remove the first element in the target user's historical total power consumption sequence to obtain a total power consumption subsequence, where the first element is the element in the target user's historical total power consumption sequence corresponding to the target appliance being in the working state;
[0086] Constructing an all-zero sequence of the same length as the total power consumption subsequence, and dividing the all-zero sequence into a plurality of all-zero subsequences based on a preset period;
[0087] For any all-zero subsequence, a sampling sequence is randomly sampled from the appliance power consumption database, and the sampling sequence and the all-zero subsequence are added bit by bit starting from any element to obtain an appliance power consumption fine-tuning sequence of the same length as the total power consumption subsequence;
[0088] Add the total power consumption subsequence and the appliance power consumption fine-tuning sequence bit by bit to obtain the total power consumption fine-tuning sequence;
[0089] Based on the appliance power consumption fine-tuning sequence and the total power consumption fine-tuning sequence, the global power separation sub-model is fine-tuned to obtain the terminal power separation sub-model corresponding to the target user.
[0090] It can be understood that the process of fine-tuning based on the target appliance power consumption prediction sequence is mainly a process of improving the accuracy of the terminal power separation sub-model in separating the target appliance power consumption sequence based on the total power consumption sequence. Therefore, the process of generating terminal fine-tuning data corresponding to the target appliance, that is, the process of updating the separation relationship between the total power consumption and the target appliance power consumption in the power separation model, mainly considers improving the diversity of the power consumption of the target appliance; at the same time, since the target user's total power consumption sequence includes not only the power consumption data of the target appliance, but also the power consumption data of other electrical equipment, it is necessary to first remove the power consumption data related to the target appliance in the target user's historical total power consumption sequence to obtain a The power consumption sequence when the target appliance is in working state is not included, that is, the total power consumption subsequence; then, an appliance power consumption fine-tuning sequence that is more suitable for the target user is obtained by constructing an all-zero subsequence, random sampling and bit-by-bit addition; this appliance power consumption fine-tuning sequence represents the power consumption of the target user when using the target appliance, and then it is added bit by bit to the total power consumption subsequence to obtain a total power consumption fine-tuning sequence representing the total power consumption of the target user. The appliance power consumption fine-tuning sequence and the total power consumption fine-tuning sequence together constitute the fine-tuning data, and the global power separation sub-model can be fine-tuned based on this fine-tuning data to obtain a terminal power separation sub-model corresponding to the target user.
[0091] Furthermore, after the all-zero sequence is divided, multiple all-zero subsequences will be obtained. In order to further improve the diversity of the target users' electrical appliance power consumption, the process of adding the all-zero subsequences bit by bit to obtain the electrical appliance power consumption fine-tuning sequence can be applied to all all-zero subsequences, that is, for each all-zero subsequence, a sampling sequence is randomly sampled and added bit by bit to obtain the electrical appliance power consumption fine-tuning sequence corresponding to each all-zero subsequence; the process of adding the all-zero subsequences bit by bit to obtain the electrical appliance power consumption fine-tuning sequence can be applied to any selected part of the all-zero subsequences, that is, any part of the all-zero subsequences is selected from all the all-zero subsequences, and the selected all-zero subsequences are subjected to the bit-by-bit addition process to obtain the electrical appliance power consumption fine-tuning sequence corresponding to the selected all-zero subsequence, while the remaining all-zero subsequences that are not selected do not need to perform this process and are directly used as output to generate the corresponding electrical appliance power consumption fine-tuning sequence.
[0092] It should be noted that the appliance power consumption fine-tuning sequence is a randomly constructed power consumption sequence, which simulates data diversity through random sampling, thereby improving the accuracy and reliability of the terminal power separation sub-model in separating the appliance power consumption sequence of the target appliance; the specific method of random sampling, etc. is not particularly limited in this application; at the same time, in the process of adding the sampling sequence and the all-zero subsequence bit by bit starting from any element, although the starting point of the addition follows the random principle when selecting and selects any element, the selection of any element needs to ensure that the sampling sequence can be completely added to the all-zero subsequence.
[0093] Specifically, a random sampling and bit-by-bit addition process is used to simulate a fine-tuning sequence of electrical appliance power consumption that is closer to the target user's historical usage, and the sequence is added to the previously determined total power consumption subsequence that does not include the target appliance in a working state to obtain a total power consumption fine-tuning sequence, thereby determining the fine-tuning data and further improving the process of how to determine the fine-tuning data in the fine-tuning process.
[0094] As an optional embodiment, based on the target user's target appliance power consumption prediction sequence, removing the first element in the target user's historical total power consumption sequence to obtain a total power consumption subsequence includes:
[0095] Binarize the target electrical appliance power consumption prediction sequence based on the target electrical appliance's on / off threshold to obtain the electrical appliance on / off sequence;
[0096] Based on the appliance switching sequence, the first element in the target user's historical total power consumption sequence is determined and removed to obtain a total power consumption subsequence.
[0097] It is not difficult to understand that the first element in the historical total power consumption sequence of the target user can be confirmed based on the switching threshold of the target appliance. After binarization, in the appliance switching sequence, 1 and 0 can be directly used to represent whether the target appliance is working at each moment. When the target appliance is in the on state, the corresponding element in the appliance switching sequence is set to 1, and when the target appliance is in the off state, the corresponding element in the appliance switching sequence is set to 0. After that, the element in the historical total power consumption sequence of the target user at the time point corresponding to element 1 in the appliance switching sequence can be directly determined as the first element and removed.
[0098] Specifically, the appliance switch sequence is generated by binarization, and the switch status of the target appliance is intuitively and effectively represented through the value of the element of the appliance switch sequence. Therefore, the first element can be accurately determined by directly corresponding the appliance switch sequence to the elements in the historical total power consumption sequence of the target user one by one, so as to obtain the total power consumption subsequence.
[0099] As an optional embodiment, the method further includes:
[0100] The global electricity separation sub-model is fine-tuned based on the total electricity consumption sequence of typical users, the electricity consumption sequence of electrical appliances and the independent electricity consumption sequence of target appliances.
[0101] It is not difficult to understand that in addition to fine-tuning the global power separation sub-model to obtain the local terminal power separation sub-model of each target user, the global power separation sub-model itself can also be fine-tuned. The process of fine-tuning the global power separation sub-model itself is similar to the process of fine-tuning the global power separation sub-model to obtain the terminal power separation sub-model corresponding to the target user. The power consumption data of the target user corresponding to the terminal can be replaced with the power consumption data of the typical user corresponding to the global. The present invention will not be repeated here.
[0102] Specifically, the global power separation sub-model itself can also be fine-tuned based on the power consumption data of typical users and independently collected appliance power consumption data, thereby improving the accuracy and reliability of the global power separation sub-model. If new target users join in the future, the corresponding terminal power separation sub-model can also be obtained based on the more accurate global power separation sub-model to improve work efficiency.
[0103] As an optional embodiment, after separating the total power consumption of the corresponding target user based on the terminal power separation sub-model, the method further includes:
[0104] Perform similarity judgment on the total electricity consumption sequence of the target user;
[0105] If the similarity between the current total electricity consumption sequence and the historical total electricity consumption sequence is less than a preset threshold, the current total electricity consumption sequence is used as the historical total electricity consumption sequence, and the process jumps to the step of fine-tuning the global electricity separation sub-model based on the typical user's appliance electricity consumption sequence and the target user's historical total electricity consumption sequence to obtain the terminal electricity separation sub-model corresponding to the target user.
[0106] It is not difficult to understand that after the terminal power separation sub-model is constructed, the target user's continuous power consumption will also generate a new historical total power consumption sequence. At this time, the terminal power separation sub-model of the target user can also be fine-tuned according to the target user's continuously updated historical total power consumption sequence; and considering that the target user may change the actual user, the total power consumption sequence of the target user can also be judged in real time for similarity. If the similarity is too low, it is determined that the current actual user of the target user may be replaced. At this time, it is possible to jump back to the step of fine-tuning the global power separation sub-model based on the typical user's electrical power consumption sequence and the target user's historical total power consumption sequence to obtain the terminal power separation sub-model corresponding to the target user, and re-fine-tune based on the global power separation sub-model to determine a new terminal power separation sub-model suitable for the current actual user. This application does not make any special restrictions on the specific implementation method of the preset threshold.
[0107] Specifically, the process of data similarity judgment is further increased, the situation of user replacement in actual application is considered, and the terminal power separation sub-model corresponding to the target user is further determined to be able to effectively fit the current user's usage habits and power usage patterns, etc., thereby improving the accuracy and reliability of the terminal power separation sub-model.
[0108] As a specific embodiment, the process of time-series synchronous data synthesis mainly uses the electricity consumption data of appliances collected synchronously at home and the electricity consumption data of appliances collected independently to build an appliance electricity consumption database, and combines the total electricity consumption data collected synchronously at home and the total electricity consumption data collected in real time by end users to synthesize corresponding fine-tuning data for the global electricity separation sub-model and the terminal electricity separation sub-model. The specific process of time-series synchronous data synthesis includes the following steps:
[0109] First, we need to build a database of electrical appliance electricity consumption Building a database of electrical appliance electricity consumption There are two data sources. The first data source is the electrical power consumption data collected synchronously at home, that is, the electrical power consumption sequence of a typical user. Given a set of total power consumption sequences x collected synchronously at home, i and electrical appliance power consumption series y i , these two power consumption sequences are used as the global training set D of the global power separation sub-model, The total electricity consumption sequence of a typical user is x i The total power consumption sequence of the user collected by the same user in the same time period, the power consumption sequence of the typical user's electrical appliances y i The power consumption sequence of a certain appliance (such as a washing machine) collected by the same user in the same time period. i} extract the electrical appliance power consumption characteristic data, that is, the power consumption sequence Y′ of the target appliance in the working state i Given an electrical appliance power consumption sequence y i , define a function g i From y i Extract a set of target electrical appliances' power consumption sequences in working state from the sequence:
[0110] Y′ i =g i (y i );
[0111] It is not difficult to understand that the same user will use the target appliance multiple times in one collection cycle, so Y′ i It contains several power consumption sequences (one sequence is counted when the appliance is switched on and off). y′ j Y′ i A certain power consumption sequence in i The power consumption sequences in can have different lengths, corresponding to different operating times. i}, apply the corresponding g i A set of target electrical appliances in working state will be obtained: power consumption sequence Y′=∪Y′ i , that is, for each Y′ i After the union, a set of power consumption sequences Y′ is obtained.
[0112] The second data source for constructing the appliance power consumption database is independently collected appliance power consumption data, that is, the independent power consumption sequence Y″ of the target appliance under different working conditions when each appliance is used as a target appliance; for the target appliance, an independently collected power consumption sequence set Y″ under working conditions is constructed, and the appliance power consumption data can be directly measured and collected by using monitoring equipment such as power meters. For each appliance, the power consumption data of different appliance entities under different working modes will be repeatedly intercepted. In addition, the appliance power consumption characteristic data in the independently collected appliance power consumption sequence set Y″ can be expanded and updated according to the changes in the types and models of appliances during actual application.
[0113] Combine Y′ and Y″ to obtain the electrical appliance power consumption database
[0114] Then, the global fine-tuning data of the global power separation sub-model can be synthesized based on the electrical appliance power consumption database. i ,y i ), the total power consumption sequence x i and the target electrical appliance power consumption sequence y iSubtract to get the total power consumption sequence excluding the target appliance in working state That is, the total power consumption subsequence of the global power separation submodel. For each x′ i Construct an all-zero sequence of the same length With τ as the period, z i The division is performed to obtain several all-zero subsequences, for example, τ can be set to one day. For each period, there is an all-zero subsequence z i (mτ,(m+1)τ),m={1,2,…,T i / τ}, a collection of target electrical appliance power consumption database Randomly sample a sampling sequence The sampling sequence and the corresponding all-zero subsequence are added bit by bit starting from a random time point (any element) in the period, thereby obtaining the appliance power consumption fine-tuning sequence of the global power separation sub-model. x′ i and Add bit by bit to get the total power consumption fine-tuning sequence of the global power separation sub-model Thus, a set of global fine-tuning data of the global charge separation sub-model is obtained.
[0115] The terminal fine-tuning data of the terminal power separation sub-model can also be synthesized based on the electrical appliance power consumption database. Given a terminal user u, the total power consumption data of a period of time is obtained through the terminal power monitoring device, that is, the historical total power consumption sequence of this terminal user x u As the input of the global power separation sub-model f, the preliminary target electrical appliance power consumption prediction sequence can be obtained. Then the switching threshold ε of the target appliance can be used to Binarization is performed, that is The elements greater than ε are set to 1 (the target appliance is in the on state), and the elements less than ε are set to 0 (the target appliance is in the off state), thereby obtaining the appliance switch sequence correspond x at the time point where is 1 u The element in is the first element, and x u Corresponding The data points at the time point where the value is 1 are removed to obtain the total power consumption subsequence The purpose of this operation is to make the user's total power consumption subsequence x' u Try not to include the data of the target appliance in working state, all historically collected {x′ u} constitutes the total power consumption subsequence of the terminal at each moment. u Construct an all-zero sequence of equal length With τ as the period, z u For example, τ can be set to one day. For each period, there is an all-zero subsequence z u (mτ,(m+1)τ),m={1,2,…,T′ u / τ}, a collection of target electrical appliance power consumption database Randomly sample a sampling sequence Add the two bit by bit starting from a random time point (any element) in the period to obtain the fine-tuning sequence of electrical power consumption x′ u and Add bit by bit to get the total power consumption fine-tuning sequence Thus, we obtain the terminal fine-tuning data of a set of terminal power separation sub-models for the terminal user u and the target appliance.
[0116] It should be noted that the process of fine-tuning the global power separation sub-model to obtain the terminal power separation sub-model corresponding to the target user is essentially the process of fine-tuning the global power separation sub-model using the terminal fine-tuning data. This application designs an algorithm for constructing and fine-tuning a power separation model that couples privacy protection and data enhancement, and innovatively proposes a data enhancement and model fine-tuning strategy for protecting user data privacy, which is suitable for power separation scenarios with high requirements for cross-user separation accuracy and user privacy protection. The total power data of the target user and the power consumption data of the electrical appliances in the training set are used for data synthesis to provide the separation model with training data that is more in line with the power consumption pattern of the target user; based on the training data synthesized from the total power data of the target user, the user-side model fine-tuning mode is adopted to achieve data privacy protection while improving the separation accuracy; based on the independently collected electrical appliance power consumption data and the total power consumption data collected in real time from the user side, new model fine-tuning data is regularly synthesized, and the separation model is updated online to ensure the long-term effectiveness of the global and terminal separation models.
[0117] Please refer to Figure 3 , Figure 3 A schematic structural diagram of a device for constructing a power separation model provided by the present invention; in a second aspect, the present application discloses a device for constructing a power separation model, wherein the power separation model includes a global power separation sub-model and a terminal power separation sub-model; wherein the device includes:
[0118] A global model building unit 11 is used to build a global power separation sub-model based on the total power consumption sequence of typical users and the power consumption sequence of electrical appliances;
[0119] The terminal model construction unit 12 is configured to, when a target user has a historical total power consumption sequence, fine-tune the global power separation sub-model based on the appliance power consumption sequence of the typical user and the historical total power consumption sequence of the target user to obtain a terminal power separation sub-model corresponding to the target user;
[0120] The power separation unit 13 is configured to separate the total power consumption of the corresponding target user based on the terminal power separation sub-model to obtain the target electrical appliance power consumption of the target user.
[0121] As an optional embodiment, the device further includes:
[0122] An independent power consumption determination unit, used to determine the independent power consumption sequence of the target electrical appliance under different working states;
[0123] The terminal model building unit 12 includes:
[0124] The terminal model construction subunit is used to fine-tune the global power separation submodel based on the electrical power consumption sequence of the typical user, the historical total power consumption sequence of the target user and the independent power consumption sequence of the target appliance to obtain a terminal power separation submodel corresponding to the target user.
[0125] As an optional embodiment, the terminal model construction subunit includes:
[0126] an electrical appliance power consumption extraction unit, configured to extract a power consumption sequence of a target electrical appliance in a working state from the electrical appliance power consumption sequence of the typical user;
[0127] an electrical appliance power consumption database construction unit, configured to combine the power consumption sequence of the target electrical appliance in a working state and the independent power consumption sequence of the target electrical appliance into an electrical appliance power consumption database;
[0128] a preliminary prediction unit, configured to obtain a target electrical appliance power consumption prediction sequence corresponding to the target user's historical total power consumption sequence based on the target user's historical total power consumption sequence and the global power separation sub-model;
[0129] A fine-tuning unit is used to fine-tune the global power separation sub-model based on the electrical appliance power consumption database and the target electrical appliance power consumption prediction sequence to obtain a terminal power separation sub-model corresponding to the target user.
[0130] As an optional embodiment, the fine-tuning unit includes:
[0131] an original data removal unit, configured to remove a first element in a historical total power consumption sequence of the target user based on a target electrical appliance power consumption prediction sequence of the target user to obtain a total power consumption subsequence, wherein the first element is an element in the historical total power consumption sequence of the target user corresponding to the target electrical appliance being in an operating state;
[0132] an all-zero sequence construction unit, configured to construct an all-zero sequence of equal length to the total power consumption subsequence, and divide the all-zero sequence into a plurality of all-zero subsequences based on a preset period;
[0133] an appliance fine-tuning data determining unit, configured to randomly sample a sampling sequence from the appliance power consumption database for any all-zero subsequence, and add the sampling sequence and the all-zero subsequence bit by bit starting from any element to obtain an appliance power consumption fine-tuning sequence having the same length as the total power consumption subsequence;
[0134] a total power fine-tuning data determining unit, configured to add the total power consumption subsequence and the appliance power consumption fine-tuning sequence bit by bit to obtain a total power consumption fine-tuning sequence;
[0135] The fine-tuning subunit is configured to fine-tune the global power separation submodel based on the appliance power consumption fine-tuning sequence and the total power consumption fine-tuning sequence to obtain a terminal power separation submodel corresponding to the target user.
[0136] As an optional embodiment, the original data removal unit includes:
[0137] a switching condition determination unit, configured to binarize the target electrical appliance power consumption prediction sequence based on the switching threshold of the target electrical appliance to obtain an electrical appliance switching sequence;
[0138] The original data removal subunit is used to determine and remove the first element in the target electrical appliance power consumption prediction sequence of the target user based on the electrical appliance switching sequence to obtain a total power consumption subsequence.
[0139] As an optional embodiment, the device further includes:
[0140] The global model updating unit is used to fine-tune the global power separation sub-model based on the total power consumption sequence of a typical user, the power consumption sequence of an electrical appliance, and the independent power consumption sequence of the target electrical appliance.
[0141] As an optional embodiment, the device further includes:
[0142] A similarity judgment unit, configured to perform similarity judgment on the total power consumption sequence of the target user;
[0143] A repeated fine-tuning unit is used to, if the similarity between the current total power consumption sequence and the historical total power consumption sequence is less than a preset threshold, use the current total power consumption sequence as the historical total power consumption sequence, and jump to the step of fine-tuning the global power separation sub-model based on the electrical power consumption sequence of the typical user and the historical total power consumption sequence of the target user to obtain a terminal power separation sub-model corresponding to the target user.
[0144] For an introduction to a device for constructing a charge separation model provided by the present invention, please refer to the embodiment of the method for constructing a charge separation model, which will not be described in detail herein.
[0145] Please refer to Figure 4 , Figure 4 A schematic diagram of the structure of an electronic device provided by the present invention. In a third aspect, the present application discloses an electronic device, comprising a memory 21 and a processor 22; wherein the memory 21 is used to store a computer program, which is loaded and executed by the processor 22 to implement the aforementioned method for constructing a power separation model.
[0146] Among them, the processor 22 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 22 can be implemented in at least one hardware form of DSP (Digital Signal Processor), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 22 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit; the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 22 may integrate a GPU (graphics processing unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 22 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0147] The memory 21 may include one or more computer-readable storage media, which may be non-transitory. The memory 21 may also include high-speed random access memory, and non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 21 is at least used to store a computer program, wherein, after the computer program is loaded and executed by the processor 22, it can implement the relevant steps of the method for constructing the power separation model disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 21 may also include an operating system and data, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system may include Windows, Unix, Linux, etc. The data may include but is not limited to data on the method for constructing the power separation model, etc.
[0148] In some embodiments, the electronic device may further include a display screen, an input / output interface, a communication interface, a power supply, and a communication bus.
[0149] It will be understood by those skilled in the art that Figure 4 The structure shown in the figure does not constitute a limitation of the electronic device, and may include more or fewer components than shown in the figure.
[0150] For an introduction to an electronic device provided by the present invention, please refer to the embodiment of the method for constructing the above-mentioned charge separation model, and the present invention will not be described in detail here.
[0151] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the method for constructing a power separation model as described above.
[0152] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium and executes all or part of the steps of the method described in each embodiment of the present application. Specifically, the computer-readable storage medium may include but is not limited to any type of disk, including a floppy disk, an optical disk, a mobile hard disk, etc., or any type of medium or device suitable for storing instructions, data, etc., and the present application does not make any special restrictions here.
[0153] For an introduction to a computer-readable storage medium provided by the present invention, please refer to the embodiment of the method for constructing the above-mentioned charge separation model, and the present invention will not be repeated here.
[0154] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions of the methods.
[0155] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0156] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0157] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0158] The above is a detailed introduction to the technical solution provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the ideas of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for constructing a charge separation model, characterized in that: The power separation model includes a global power separation sub-model and a terminal power separation sub-model; wherein the method includes: Determine the independent power consumption sequence of the target appliance under different working conditions; A global electricity separation sub-model is constructed based on the total electricity consumption series of typical users and the electricity consumption series of electrical appliances; When the target user has a historical total electricity consumption sequence, the electricity consumption sequence of the target appliance in the working state is extracted from the electrical appliance electricity consumption sequence of the typical user; the electricity consumption sequence of the target appliance in the working state and the independent electricity consumption sequence of the target appliance are merged into an electrical appliance electricity consumption database; based on the historical total electricity consumption sequence of the target user and the global electricity separation sub-model, a target electrical appliance electricity consumption prediction sequence corresponding to the historical total electricity consumption sequence of the target user is obtained; based on the target electrical appliance electricity consumption prediction sequence of the target user, the first element in the historical total electricity consumption sequence of the target user is removed to obtain a total electricity consumption sub-sequence, where the first element is the historical total electricity consumption sequence of the target user corresponding to the target appliance in the working state. elements in the total power consumption sequence; constructing an all-zero sequence of equal length to the total power consumption subsequence, and dividing the all-zero sequence into a plurality of all-zero subsequences based on a preset period; for any all-zero subsequence, randomly sampling a sampling sequence from the appliance power consumption database, and adding the sampling sequence and the all-zero subsequence bit by bit starting from any element to obtain an appliance power consumption fine-tuning sequence of equal length to the total power consumption subsequence; adding the total power consumption subsequence and the appliance power consumption fine-tuning sequence bit by bit to obtain a total power consumption fine-tuning sequence; fine-tuning the global power separation submodel based on the appliance power consumption fine-tuning sequence and the total power consumption fine-tuning sequence to obtain a terminal power separation submodel corresponding to the target user; The total power consumption of the corresponding target user is separated based on the terminal power separation sub-model to obtain the target electrical appliance power consumption of the target user.
2. The method for constructing a charge separation model according to claim 1, wherein: The step of removing the first element from the target user's historical total power consumption sequence based on the target appliance power consumption prediction sequence to obtain a total power consumption subsequence includes: Binarizing the target electrical appliance power consumption prediction sequence based on the target electrical appliance's on / off threshold value to obtain an electrical appliance on / off sequence; Based on the appliance switching sequence, the first element in the historical total power consumption sequence of the target user is determined and removed to obtain a total power consumption subsequence.
3. The method for constructing a charge separation model according to claim 1, wherein: Also includes: The global power separation sub-model is fine-tuned based on the total power consumption sequence of a typical user, the power consumption sequence of an electrical appliance, and the independent power consumption sequence of the target electrical appliance.
4. The method for constructing a charge separation model according to any one of claims 1 to 3, characterized in that: After separating the total power consumption of the corresponding target user based on the terminal power separation sub-model, the method further includes: Performing similarity judgment on the total power consumption sequence of the target user; If the similarity between the current total power consumption sequence and the historical total power consumption sequence is less than a preset threshold, the current total power consumption sequence is used as the historical total power consumption sequence, and the process jumps to the step of extracting the power consumption sequence of the target appliance in the working state from the power consumption sequence of the typical user's appliance.
5. A device for constructing a charge separation model, characterized in that: The power separation model includes a global power separation sub-model and a terminal power separation sub-model; wherein the device includes: An independent power consumption determination unit, used to determine the independent power consumption sequence of the target electrical appliance under different working states; A global model building unit, used to build a global power separation sub-model based on the total power consumption sequence of typical users and the power consumption sequence of electrical appliances; a terminal model construction unit, configured to, when a target user has a historical total power consumption sequence, fine-tune the global power separation sub-model based on the appliance power consumption sequence of the typical user and the historical total power consumption sequence of the target user to obtain a terminal power separation sub-model corresponding to the target user; an electricity separation unit, configured to separate the total electricity consumption of the corresponding target user based on the terminal electricity separation sub-model to obtain the target electrical appliance electricity consumption of the target user; The terminal model building unit includes: a terminal model construction subunit, configured to fine-tune the global power separation submodel based on the typical user's electrical appliance power consumption sequence, the target user's historical total power consumption sequence, and the target appliance's independent power consumption sequence to obtain a terminal power separation submodel corresponding to the target user; The terminal model construction subunit includes: an electrical appliance power consumption extraction unit, configured to extract a power consumption sequence of a target electrical appliance in a working state from the electrical appliance power consumption sequence of the typical user; an electrical appliance power consumption database construction unit, configured to combine the power consumption sequence of the target electrical appliance in a working state and the independent power consumption sequence of the target electrical appliance into an electrical appliance power consumption database; a preliminary prediction unit, configured to obtain a target electrical appliance power consumption prediction sequence corresponding to the target user's historical total power consumption sequence based on the target user's historical total power consumption sequence and the global power separation sub-model; a fine-tuning unit, configured to fine-tune the global power separation sub-model based on the electrical appliance power consumption database and the target electrical appliance power consumption prediction sequence to obtain a terminal power separation sub-model corresponding to the target user; The fine-tuning unit includes: an original data removal unit, configured to remove a first element in a historical total power consumption sequence of the target user based on a target electrical appliance power consumption prediction sequence of the target user to obtain a total power consumption subsequence, wherein the first element is an element in the historical total power consumption sequence of the target user corresponding to the target electrical appliance being in an operating state; an all-zero sequence construction unit, configured to construct an all-zero sequence of equal length to the total power consumption subsequence, and divide the all-zero sequence into a plurality of all-zero subsequences based on a preset period; an appliance fine-tuning data determining unit, configured to randomly sample a sampling sequence from the appliance power consumption database for any all-zero subsequence, and add the sampling sequence and the all-zero subsequence bit by bit starting from any element to obtain an appliance power consumption fine-tuning sequence having the same length as the total power consumption subsequence; a total power fine-tuning data determining unit, configured to add the total power consumption subsequence and the appliance power consumption fine-tuning sequence bit by bit to obtain a total power consumption fine-tuning sequence; The fine-tuning subunit is configured to fine-tune the global power separation submodel based on the appliance power consumption fine-tuning sequence and the total power consumption fine-tuning sequence to obtain a terminal power separation submodel corresponding to the target user.
6. An electronic device, characterized in that: The electronic device includes a processor and a memory; wherein the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the method for constructing a charge separation model according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that Used to store a computer program, which, when executed by a processor, implements the method for constructing a power separation model as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Non-intrusive load decomposition method based on unsupervised pre-training neural network
CN114037178A