Electric equipment power determination method and device, computer equipment, readable storage medium and program product
By extracting and decoding the total power consumption information, the problem of inaccurate power determination of power consumption equipment in the prior art is solved, and higher accuracy and efficiency are achieved.
Patent Information
- Application Number
- CN202411400360.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-02-18
AI Technical Summary
When the prior art processes complex and variable total power consumption information, it is difficult to accurately determine the power of the power consumption equipment, and the misjudgment rate is high.
By obtaining the total power sequence, intercepting according to the intercepting method of the target power consumption device, after extracting the feature sequence, the encoder and decoder in the trained power decomposition model are used to decode the active power consumption device in combination with the attention network, and the active power consumption device of the target power consumption device is obtained by decoding. power.
It improves the accuracy of power determination of electrical equipment, reduces the rate of misjudgment, and ensures the accuracy and effectiveness of decoding.
Smart Images

Figure CN119477598A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart grid technology, and in particular to a method and apparatus for determining the power of an electrical device, a computer device, a computer-readable storage medium, and a computer program product. Background Art
[0002] With the development of smart grid technology, the intelligence level of the power grid has been greatly improved, and it has also provided strong technical support for the reliable, economical, efficient, safe and environmentally friendly operation of the power grid. Among them, load monitoring is one of the key links of the smart grid. This load monitoring technology provides important data support for the operation and management of the power grid by real-time monitoring and analysis of the load data of various electrical equipment in the power system.
[0003] In related technologies, non-intrusive load detection (also known as non-intrusive load decomposition) is usually used, that is, smart meters are installed at the electricity entrance to obtain total electricity consumption information, and the power of each appliance is calculated using traditional big data analysis technologies, such as decision trees and random forests. However, when faced with processing complex and changeable total electricity consumption information, it is difficult to accurately determine the power of the appliance, and the misjudgment rate is high. Summary of the invention
[0004] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product for determining the power of an electrical device, which can improve the accuracy of determining the power of the electrical device, in order to address the above technical problems.
[0005] In a first aspect, the present application provides a method for determining power of an electric device, comprising:
[0006] Acquire a total power sequence obtained through collection, wherein the total power sequence includes multiple total powers, each of which is the sum of powers consumed by multiple electrical devices at the same time;
[0007] According to the interception mode corresponding to the target electrical equipment, the total power sequence is intercepted to obtain a target sequence, wherein the target sequence includes the total power corresponding to each moment;
[0008] Extracting features of the total power corresponding to each moment in the target sequence to obtain a feature sequence, wherein the feature sequence includes feature representations corresponding to each moment;
[0009] Obtain a trained power decomposition model, and encode the feature representation corresponding to each moment in the feature sequence through an encoder in the power decomposition model to obtain the encoded hidden state corresponding to each moment;
[0010] Determine the weights corresponding to the respective encoding hidden states through the attention network of the decoder in the power decomposition model, and determine the vector to be decoded based on the respective encoding hidden states and the respective corresponding weights;
[0011] The vector to be decoded is decoded through a decoding network of the decoder to obtain the active power of the target electrical equipment at each moment.
[0012] In a second aspect, the present application further provides a device for determining power of an electric device, comprising:
[0013] An acquisition module, used to acquire a total power sequence obtained through collection, wherein the total power sequence includes multiple total powers, each of which is the sum of powers consumed by multiple electrical devices at the same time;
[0014] An interception module, used to intercept the total power sequence according to the interception mode corresponding to the target power-consuming device to obtain a target sequence, wherein the target sequence includes the total power corresponding to each moment;
[0015] An extraction module, used for extracting features of the total power corresponding to each moment in the target sequence to obtain a feature sequence, wherein the feature sequence includes feature representations corresponding to each moment;
[0016] An encoding module is used to obtain a trained power decomposition model, and encode the feature representation corresponding to each moment in the feature sequence through an encoder in the power decomposition model to obtain a coded hidden state corresponding to each moment;
[0017] A determination module, used to determine the weights corresponding to each encoding hidden state through the attention network of the decoder in the power decomposition model, and determine the vector to be decoded based on each encoding hidden state and the corresponding weight;
[0018] The decoding module is used to decode the vector to be decoded through the decoding network of the decoder to obtain the active power of the target electrical equipment at each moment.
[0019] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned method for determining the power of an electrical device when executing the computer program.
[0020] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the above-mentioned method for determining the power of an electrical device are implemented.
[0021] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned method for determining the power of an electrical device when executed by a processor.
[0022] The above-mentioned power determination method, device, computer device, computer-readable storage medium and computer program product can obtain the total power consumed by multiple power devices at each moment by obtaining the total power sequence obtained through collection. Through the interception method corresponding to the target power device, a target sequence for determining the power of a single target power device is obtained from the total power sequence. The encoder of the power decomposition model extracts the feature representation corresponding to each total power in the target sequence and encodes it to obtain the corresponding coded hidden state at each moment, so as to extract the key information in the target sequence, provide context for the subsequent decoding process, and ensure the accuracy and effectiveness of the decoding. Through the attention network of the decoder, the weight matching the coded hidden state is determined, that is, for the complex and changeable total power information, the attention of the hidden state can be adaptively adjusted to ensure the accuracy of the decoding. Therefore, based on each coded hidden state and the corresponding weight, a more effective vector to be decoded that better matches the target sequence is determined. In this way, the decoding vector to be decoded is effectively and accurately decoded through the decoding network of the decoder to obtain the active power of the target electrical equipment at each moment, that is, the power of the target electrical equipment is accurately decomposed from the total power at the same moment, thereby improving the accuracy of determining the power of the electrical equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0024] FIG1 is a diagram showing an application environment of a method for determining power of an electric device in one embodiment;
[0025] Figure 2 A schematic diagram of a flow chart of a method for determining power of an electric device in one embodiment;
[0026] Figure 3 A schematic diagram of a process for determining power of an electric device in one embodiment;
[0027] Figure 4 is a schematic diagram of an encoding and decoding process in an embodiment;
[0028] Figure 5 is a structural block diagram of a device for determining power of an electric device in one embodiment;
[0029] FIG. 6 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0031] The method for determining the power of an electric device provided in an embodiment of the present application can be applied in an application environment as shown in FIG1 . In which, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on a cloud or other network server.
[0032] In some embodiments, the terminal 102 and the server 104 cooperate to execute the method for determining the power of the electric device. For example, the terminal 102 sends the collected total power sequence to the server 104, wherein the total power sequence includes multiple total powers, each total power being the sum of the powers consumed by multiple electric devices at the same time. The server 104 intercepts the total power sequence according to the interception method corresponding to the target electric device to obtain a target sequence, and the target sequence includes the total power corresponding to each moment; extracts features of the total power corresponding to each moment in the target sequence to obtain a feature sequence, and the feature sequence includes feature representations corresponding to each moment; obtains a trained power decomposition model, and encodes the feature representations corresponding to each moment in the feature sequence through the encoder in the power decomposition model to obtain the coded hidden states corresponding to each moment; determines the weights corresponding to each coded hidden state through the attention network of the decoder in the power decomposition model, and determines the vector to be decoded based on each coded hidden state and the corresponding weights; decodes the vector to be decoded through the decoding network of the decoder to obtain the active power of the target electric device at each moment.
[0033] The terminal 102 may be a smart meter configured at the electricity entrance, and the smart meter sends the acquired total power sequence to the server 104 for processing. Alternatively, the terminal 102 is connected to the smart meter, and the terminal 102 acquires the total power sequence collected by the smart meter, and performs data processing on the total power sequence, for example, data cleaning (removing invalid data, etc.), and sends the processed total power sequence to the server 104, and the server 104 executes the power determination method of the electric device.
[0034] In other embodiments, the terminal 102 may independently execute the method for determining the power of the electric device. For example, after the terminal 102 acquires the total power sequence collected by the smart meter, it executes the method for determining the power of the electric device.
[0035] In the case where the terminal 102 is not a smart meter, the terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, etc. The server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0036] In an exemplary embodiment, Figure 2 As shown, a method for determining the power of an electric device is provided, and the method is applied to a computer device (which may be the terminal 102 of FIG. 1 or the server 104) as an example for description, including the following steps S202 to S212. Among them:
[0037] Step S202: acquiring a total power sequence obtained through collection, where the total power sequence includes a plurality of total powers, each of which is the sum of powers consumed by a plurality of electrical devices at the same time.
[0038] The total power refers to the power of the power consumption area at the same time, wherein the power consumption area includes multiple power consumption devices, that is, the total power is the sum of the active power consumed by multiple power consumption devices at the same time. For example, the power consumption area can be the area where each household is located, the area where a building is located, the area where a community is located, and so on.
[0039] Optionally, the computer device obtains the total power sequence sent by the smart meter. The smart meter continuously collects the power of the power consumption area within a preset period of time to obtain multiple total powers. Exemplarily, the smart meter is installed around the power consumption area, for example, at the power consumption entrance of the power consumption area.
[0040] Exemplarily, the total power sequence corresponding to the power consumption area includes P1, ..., P100. There are power consumption devices M1, ..., M20 in the power consumption area. Among them, P1 refers to the total power consumed by 20 power consumption devices in the first collection. P100 refers to the total power consumed by 20 power consumption devices in the 100th collection.
[0041] It should be noted that the total power is the total load of all electrical equipment in the power consumption area, and the load of each electrical equipment cannot be directly obtained. Therefore, it is necessary to use the method for determining the power of electrical equipment involved in this application to determine the load of each electrical equipment.
[0042] Step S204, intercepting the total power sequence according to the interception mode corresponding to the target electrical equipment to obtain a target sequence, wherein the target sequence includes the total power corresponding to each moment.
[0043] Among them, the interception method refers to the method of intercepting the total power sequence. Exemplarily, the interception method corresponding to each power-consuming device can be determined based on the historical power consumption data of the power-consuming device and the device attribute information of the power-consuming device. Each power-consuming device has a corresponding interception method, and each interception method reflects the power consumption characteristics of the power-consuming device. For example, the more frequent the power consumption of the power-consuming device, the more total power in the target sequence.
[0044] Exemplarily, the interception method refers to a method of obtaining total power from the total power sequence at a preset frequency. For example, the power-consuming device M1 obtains total power from the total power sequence at a first preset frequency (eg, obtaining a total power every 2) to obtain a corresponding target sequence.
[0045] Exemplarily, the interception method may be a method of intercepting the total power sequence according to a preset interception length. For example, the interception method of the power consumption device M1 is to intercept the total power sequence according to a first preset interception length, such as the first preset interception length is 20. The interception method of the power consumption device M2 is to intercept the total power sequence according to a second preset interception length, such as the second preset interception length is 40.
[0046] The target electric device is one of the multiple electric devices.
[0047] Optionally, the computer device obtains an interception method corresponding to the target power-consuming device from multiple interception methods, and intercepts the total power sequence in order according to the interception method corresponding to the target power-consuming device to obtain multiple interception sequences. For each interception sequence, the computer device arbitrarily selects at least one total power from multiple total powers of the interception sequence, arranges the corresponding selected total powers in the order of each interception sequence, or in the order of the collection time points of each selected total power, to obtain a target sequence.
[0048] For example, the total power sequence is: P1, ..., P100, where each total power corresponds to a collection time point. The target power-consuming device is M1, and 5 sequences are intercepted, among which, intercepted sequence 1: P1, ..., P20; intercepted sequence 2: P21, ..., P40; intercepted sequence 3: P41, ..., P60; intercepted sequence 4: P61, ..., P80; intercepted sequence 5: P81, ..., P100.
[0049] For interception sequence 1: randomly select Pa from P1, ..., P20 (Pa belongs to any of P1 to P20). The acquisition time of Pa is t1; similarly, randomly select Pb based on interception sequence 2 (acquisition time is t2); randomly select Pc based on interception sequence 3 (acquisition time is t3); randomly select Pd based on interception sequence 4 (acquisition time is t4); randomly select Pe based on interception sequence 5 (acquisition time is t5);
[0050] The target sequence is arranged in sequence according to the acquisition time: Pa, Pb, Pc, Pd, Pe.
[0051] In other embodiments, the computer device takes the average of multiple total powers in the intercepted sequence to obtain a power average, takes the average of the acquisition time points of each total power in the intercepted sequence as the acquisition time point of the power average, arranges the corresponding power averages in the order of each intercepted sequence, and obtains a target sequence.
[0052] Step S206, extracting features of the total power corresponding to each moment in the target sequence to obtain a feature sequence, wherein the feature sequence includes feature representations corresponding to each moment.
[0053] The feature representation is to extract information or attributes useful for the learning task (determine the power of the target electrical device) from the original data (total power). In this embodiment, the feature representation is a high-dimensional vector.
[0054] The time in this application is the collection time point mentioned above.
[0055] Optionally, the computer device obtains a word representation matrix, and inputs the target sequence into the word representation matrix to obtain feature representations corresponding to each moment, that is, to obtain feature representations corresponding to each total power in the target sequence.
[0056] The word representation matrix, also known as the vocabulary embedding matrix or word vector matrix, is a two-dimensional array (matrix) for feature extraction to map the total power into a high-dimensional vector.
[0057] Optionally, the computer device performs integer processing on the target sequence to obtain a processed sequence, and inputs the processed sequence into a word representation matrix to obtain feature representations corresponding to each total power in the target sequence.
[0058] For example, the target sequence: , the sequence obtained after integer processing is , and then extract the features of the word representation matrix to obtain the feature sequence ,in, The corresponding feature is expressed as , The corresponding feature is expressed as .
[0059] Step S208, obtaining a trained power decomposition model, encoding the feature representation corresponding to each moment in the feature sequence through an encoder in the power decomposition model, and obtaining the coded hidden state corresponding to each moment.
[0060] The trained power decomposition model is used to decompose the power belonging to the target electrical equipment from the total power. The power decomposition model is a model based on a neural network. For example, the power decomposition model is a seq2seq (sequence to sequence) model.
[0061] The encoded hidden state refers to the hidden state obtained by encoding. The hidden state is another feature representation generated inside the encoding network when the encoder's encoding network processes the input feature representation. The encoded hidden state captures the key information in the feature representation and represents it in a more abstract and advanced form.
[0062] Optionally, the computer device calls a trained power decomposition model and inputs feature training into the encoding network of the encoder of the power decomposition model, and encodes each feature representation in the feature sequence through the encoding network to obtain the corresponding encoding hidden state of each feature representation.
[0063] In some embodiments, the feature representation corresponding to each moment in the feature sequence is encoded through an encoder in a power decomposition model to obtain a coded hidden state corresponding to each moment, including: for the first moment, based on the feature representation corresponding to the first moment, the encoder in the power decomposition model is used to determine the coded hidden state corresponding to the first moment; starting from the second moment, based on the coded hidden state corresponding to the previous moment and the feature representation corresponding to the current moment, the encoder is used to determine the coded hidden state corresponding to the current moment.
[0064] Exemplarily, the computer device obtains the feature representation corresponding to the first moment from the feature sequence. For the first moment, the computer device encodes the feature representation corresponding to the first moment through the encoding network of the encoder of the power decomposition model to obtain the encoded hidden state corresponding to the first moment.
[0065] Starting from the second moment in the feature sequence, obtain the feature representation of the current moment (not the first moment in the feature sequence) and the feature representation of the previous moment, and obtain the encoding hidden state corresponding to the current moment through the encoding network until the encoding hidden state of the last moment in the feature sequence is obtained.
[0066] For example: For the first moment, the encoding network can directly obtain the corresponding encoding hidden state based on the feature representation of the first moment, or obtain the preset first reference hidden state , the encoding network is based on the first reference hidden state The feature representation corresponding to the first moment determines the encoded hidden state of the first moment.
[0067] Among them, the first reference hidden state It can be determined based on experience or manually.
[0068] For example, the following formula (1) is used to determine the coded hidden state at time t (which can also be understood as the coding time t): :
[0069] (1)
[0070] Among them, f(.) is the encoding network, and the value range of t is from the starting time to the end time involved in the target sequence, that is, from arrive Among them, the first reference hidden state .
[0071] In this embodiment, the feature representations of the feature sequence are respectively encoded by the encoder, that is, more effective feature representations are further extracted, so as to obtain a more effective coded hidden state of information, thereby ensuring the accuracy of subsequent decoding.
[0072] Step S210, determining the weights corresponding to each encoding hidden state through the attention network of the decoder in the power decomposition model, and determining the vector to be decoded based on each encoding hidden state and the corresponding weights.
[0073] The attention network is used to determine the weight of the encoded hidden state, and the vector to be decoded is the vector used for decoding by the decoding network. The decoder includes the attention network and the decoding network.
[0074] Optionally, the computer device determines the attention of each coding hidden state through the attention network based on each coding hidden state, and determines the corresponding weight based on the attention. The more attention, the more effective details of the coding hidden state, and the higher the corresponding weight.
[0075] The computer device determines the vector to be decoded according to each encoding hidden state and the weight of each encoding hidden state.
[0076] In some embodiments, the decoding network includes a first decoding network, which determines the weights corresponding to each encoded hidden state through the attention network of the decoder in the power decomposition model, including: based on the encoded hidden state corresponding to the last moment, determining the first decoded hidden state corresponding to each moment through the first decoding network; for the second-to-last moment before the last moment, determining the weights corresponding to each encoded hidden state through the attention network according to the first decoded hidden state corresponding to the second-to-last moment and the encoded hidden state corresponding to each moment.
[0077] The first decoding network is used to determine the first decoding hidden state based on the encoding hidden state, so as to determine the weight of determining the encoding hidden state during the decoding process. The first decoding hidden state represents another feature representation generated inside the first decoding network during the decoding process. The end moment can be understood as the second to last moment.
[0078] Exemplarily, the computer device obtains the coded hidden state corresponding to the last moment, and inputs the coded hidden state into the first decoding network to obtain the first decoded hidden state corresponding to each moment.
[0079] For example, for the first moment, the computer device obtains the first decoding hidden state corresponding to the first moment through the first decoding network according to the encoding hidden state corresponding to the last moment.
[0080] Starting from the second moment, the computer device determines the first decoding hidden state corresponding to the current moment through the first decoding network according to the encoding hidden state corresponding to the last moment and the first decoding hidden state corresponding to the previous moment.
[0081] Exemplarily, after the computer device obtains the first decoding hidden state corresponding to each moment, for the last moment, the computer device determines the correlation coefficient between the first decoding hidden state at the last moment and the first encoding hidden state at each moment through the attention network based on the first decoding hidden state corresponding to the second-to-last moment and the encoding hidden state corresponding to each moment.
[0082] For example, the correlation coefficient determination step refers to the following formula (2):
[0083] (2)
[0084] Among them, i refers to the time i, which belongs to the target sequence time arrive at some point. The i-1th first decoding hidden state (the first decoding hidden state corresponding to time i-1). hour, is the second reference hidden state , when i takes arrive At a certain moment, is the first decoding hidden state corresponding to the previous moment.
[0085] refers to the jth encoded hidden state (the first decoded hidden state corresponding to time j), which belongs to the target sequence moment arrive At a certain moment, i and j can be the same or different.
[0086] X, Y, and Z are the parameters of the trained power decomposition model. tanh(.) is the hyperbolic tangent function. represents the correlation (correlation coefficient) between the i-th first decoded hidden state and the j-th encoded hidden state.
[0087] The computer device normalizes each correlation coefficient separately, referring to the following formula (3):
[0088] (3)
[0089] After the normalization result is obtained by using formula (3), the normalization results of the first decoding hidden state corresponding to the end time and each encoding hidden state are used as the weights corresponding to each encoding hidden state; that is, ,……, As the weights of the encoded hidden state corresponding to time t1, ..., time The corresponding weight of the encoded hidden state.
[0090] In this embodiment, based on the coded hidden state corresponding to the last moment, the first decoding network determines the first decoding hidden state corresponding to each moment; for the second last moment before the last moment, the weights corresponding to each coded hidden state are determined according to the first decoding hidden state corresponding to the second last moment and the coded hidden state corresponding to each moment. In this way, for complex and changeable total power information, based on the attention network, dynamic adjustment of the attention to each coded hidden state is achieved during decoding, avoiding subsequent decoding directly based on a fixed vector (the coded hidden state at the last moment), avoiding the information compression problem caused by fixed lines, and ensuring the accuracy of decoding.
[0091] In some embodiments, determining the vector to be decoded based on each encoding hidden state and its corresponding weight includes: performing weighted processing on each encoding hidden state according to its weight to obtain the vector to be decoded.
[0092] For example, after obtaining each weight, such as ,……, Then, the vector F to be decoded is determined based on the following formula (4):
[0093] (4)
[0094] In this embodiment, a more effective vector to be decoded that is more matched with the target sequence is determined through various coded hidden states and their corresponding weights, thereby ensuring the effectiveness and accuracy of determining the power of the electrical device.
[0095] Step S212: decoding the vector to be decoded through the decoding network of the decoder to obtain the active power of the target electrical equipment at each moment.
[0096] Optionally, the computer device obtains a second decoding network of the decoder, and inputs the vector to be decoded into the second decoding network to obtain the active power of the target electrical device at each moment.
[0097] The second decoding network is a network used to decode the vector to be decoded, and the second decoding network is a different network from the first decoding network.
[0098] In some embodiments, the decoding network also includes a second decoding network, and the decoding network of the decoder is used to decode the vector to be decoded to obtain the active power of the target electrical device at each moment, including: decoding the vector to be decoded through the second decoding network to determine the second decoding hidden state corresponding to each moment; for each moment, based on the second decoding hidden state corresponding to the moment, determining the active power of the target electrical device at the moment.
[0099] The second decoding hidden state refers to another feature representation generated inside the second decoding network.
[0100] Exemplarily, for the first moment, the computer device determines, through the second decoding network, a second decoding hidden state corresponding to the first moment according to the vector to be decoded and the third reference hidden state.
[0101] For a non-first moment, the computer device determines the second decoding hidden state corresponding to the current moment through the second decoding network based on the second decoding hidden state at the previous moment and the vector to be decoded.
[0102] In some embodiments, based on the second decoded hidden state corresponding to the moment, the active power of the target electrical equipment at the moment is determined, including: obtaining a mapping relationship between the decoded hidden state and the power probability distribution sequence; based on the mapping relationship, querying the power probability distribution sequence corresponding to the second decoded hidden state at the moment, the power probability distribution sequence including the active power corresponding to each probability; selecting the active power corresponding to the maximum probability from the power probability distribution sequence as the active power of the target electrical equipment at the moment.
[0103] The mapping relationship is pre-set. For example, the mapping relationship may be determined based on historical data of historical non-intrusive load detection. For example, the mapping relationship may be determined by professionals, and there is no specific limitation.
[0104] The power probability distribution sequence includes the useful power corresponding to each probability. Based on the mapping relationship, the power probability distribution sequence corresponding to each second decoding hidden state can be queried in sequence. Since each second decoding hidden state corresponds to a moment of the target sequence, it can be understood that the probability distribution sequence corresponds to a moment of the target sequence.
[0105] For each power probability distribution sequence, the active power corresponding to the maximum probability is determined as the active power at the moment corresponding to the power probability distribution sequence.
[0106] In this way, by decoding the mapping relationship between the hidden state and the power probability distribution sequence, the corresponding power probability distribution sequence can be efficiently and accurately queried, thereby accurately determining the active power of the target electrical equipment at each moment, thereby improving the accuracy of the power determination of the electrical equipment.
[0107] In this embodiment, the decoding vector to be decoded is effectively and accurately decoded through the decoding network of the decoder to obtain the active power of the target electrical equipment at each moment, that is, the power of the target electrical equipment is accurately decomposed from the total power at the same moment, thereby improving the accuracy of determining the power of the electrical equipment.
[0108] In some embodiments, the power decomposition model training step includes: obtaining training samples and labels about sample electrical equipment, where the training samples are sample target sequences obtained by intercepting the sample total power sequence according to the interception method corresponding to the sample electrical equipment. The label includes the real active power of the sample electrical equipment at each sample moment. Feature extraction is performed on the sample total power corresponding to each sample moment in the sample target sequence to obtain a sample feature sequence, and the sample feature sequence includes the sample feature representation corresponding to each sample moment. The power decomposition model to be trained is obtained, and the sample feature representation corresponding to each sample moment in the sample feature sequence is encoded by the encoder in the power decomposition model to be trained to obtain the sample encoding hidden state corresponding to each sample moment. The weights corresponding to each sample encoding hidden state are determined by the attention network of the decoder in the power decomposition model to be trained, and the sample vector to be decoded is determined based on each sample encoding hidden state and the corresponding weights. The sample vector to be decoded is decoded by the decoding network of the decoder to obtain the probability of each sample active power of the sample electrical equipment at each sample moment. Based on the sample active power and the real active power at each moment, a loss function is constructed, and the model is trained with the minimization of the loss function as the training goal to obtain a trained power decomposition model.
[0109] The loss function may be an average cross entropy loss function, as shown in the following formula (5):
[0110] (5)
[0111] in, The sample time The probability that the real active power is m is generally 1. The sample time The probability that the sample active power is m.
[0112] The above-mentioned power determination method of the electric device can obtain the total power consumed by multiple electric devices at each moment by obtaining the total power sequence obtained through collection. Through the interception method corresponding to the target electric device, the target sequence for determining the power of a single target electric device is obtained from the total power sequence. The encoder of the power decomposition model extracts the feature representation corresponding to each total power in the target sequence and encodes it to obtain the corresponding coded hidden state at each moment, so as to extract the key information in the target sequence, provide context for the subsequent decoding process, and ensure the accuracy and effectiveness of the decoding. Through the attention network of the decoder, the weight matching the coded hidden state is determined, that is, for the complex and changeable total power information, the attention of the hidden state can be adaptively adjusted to ensure the accuracy of the decoding. Therefore, based on each coded hidden state and the corresponding weight, a more effective vector to be decoded that is more matched with the target sequence is determined. In this way, through the decoding network of the decoder, the vector to be decoded is effectively and accurately decoded to obtain the active power of the target electric device at each moment, that is, the power of the target electric device is accurately decomposed from the total power at the same moment, which improves the accuracy of the power determination of the electric device.
[0113] In a specific embodiment, Figure 3 FIG. 1 is a schematic diagram of a process for determining the power of an electrical device in an embodiment.
[0114] Step 1: The computer device obtains the total power sequence obtained through collection, and the total power sequence includes multiple total powers, and each total power is the sum of the powers consumed by multiple electrical devices at the same time.
[0115] Step 2: The computer device performs sequence interception on the total power sequence to obtain a target sequence.
[0116] Specifically, the total power sequence is intercepted according to the interception method corresponding to the target electrical equipment to obtain a target sequence, which includes the total power corresponding to each moment.
[0117] Step 3: The computer device extracts features from the target sequence to obtain a feature sequence.
[0118] Specifically, feature extraction is performed on the total power corresponding to each moment in the target sequence to obtain a feature sequence, where the feature sequence includes feature representations corresponding to each moment.
[0119] Step 4: The computer device uses the trained power decomposition model to encode the feature sequence and decode it using the self-attention mechanism to obtain the active power of the target electrical equipment.
[0120] Specifically, for the first moment, based on the feature representation corresponding to the first moment, the encoder in the power decomposition model is used to determine the coded hidden state corresponding to the first moment; starting from the second moment, based on the coded hidden state corresponding to the previous moment and the feature representation corresponding to the current moment, the encoder is used to determine the coded hidden state corresponding to the current moment.
[0121] Based on the coded hidden state corresponding to the last moment, the first decoding hidden state corresponding to each moment is determined through the first decoding network of the decoder of the trained power decomposition model; for the second last moment before the last moment, according to the first decoding hidden state corresponding to the second last moment and the coded hidden state corresponding to each moment, the weights corresponding to each coded hidden state are determined through the attention network. According to the weights of each coded hidden state, each coded hidden state is weighted to obtain a vector to be decoded.
[0122] The decoder's second decoding network is used to decode the decoding vector to determine the second decoding hidden state corresponding to each moment. For each moment, the mapping relationship between the decoding hidden state and the power probability distribution sequence is obtained. Based on the mapping relationship, the power probability distribution sequence corresponding to the second decoding hidden state at the query moment is queried, and the power probability distribution sequence includes the active power corresponding to each probability. The active power corresponding to the maximum probability is selected from the power probability distribution sequence as the active power of the target electrical equipment at the moment.
[0123] The following example illustrates the encoding and decoding process. Figure 4 FIG. 1 is a schematic diagram of the encoding and decoding process in an embodiment.
[0124] In the encoder, referring to the above formula 1, the corresponding coded hidden state at each moment can be obtained. Then, in the decoder, based on the self-attention network and the first encoding network, the vector to be decoded is determined. In the second encoding network, based on the vector to be decoded, the vectors to be decoded are determined respectively. The second decoding hidden state corresponding to the time, ..., The second decoding hidden state corresponding to the time instant, thereby determining the target electrical device at The active power corresponding to the moment, ..., The active power corresponding to the moment. See the previous text for details.
[0125] In this embodiment, by acquiring the total power sequence obtained through collection, the total power consumed by multiple electrical devices as a whole at each moment can be obtained. Through the interception method corresponding to the target electrical device, the target sequence for determining the power of a single target electrical device can be obtained from the total power sequence. The encoder of the power decomposition model extracts the feature representation corresponding to each total power in the target sequence and encodes it to obtain the corresponding coded hidden state at each moment to extract the key information in the target sequence, provide context for the subsequent decoding process, and ensure the accuracy and effectiveness of the decoding. Through the attention network of the decoder, the weight matching the coded hidden state is determined, that is, for the complex and changeable total power information, the attention of the hidden state can be adaptively adjusted to ensure the accuracy of the decoding. Thus, based on each coded hidden state and the corresponding weight, a more effective vector to be decoded that is more matched with the target sequence is determined. In this way, through the decoding network of the decoder, the vector to be decoded is effectively and accurately decoded to obtain the active power of the target electrical device at each moment, that is, the power of the target electrical device is accurately decomposed from the total power at the same moment, which improves the accuracy of the power determination of the electrical device.
[0126] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0127] Based on the same inventive concept, the embodiment of the present application also provides a device for determining the power of an electric device for implementing the method for determining the power of an electric device involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the method above, so the specific limitations in one or more embodiments of the device for determining the power of an electric device provided below can refer to the limitations of the method for determining the power of an electric device above, and will not be repeated here.
[0128] In an exemplary embodiment, Figure 5 As shown, a device 500 for determining power of an electric device is provided, comprising: an acquisition module 502, an interception module 504, an extraction module 506, an encoding module 508, a determination module 510 and a decoding module 512, wherein:
[0129] An acquisition module 502 is used to acquire a total power sequence obtained through collection, where the total power sequence includes multiple total powers, each of which is the sum of powers consumed by multiple electrical devices at the same time;
[0130] The interception module 504 is used to intercept the total power sequence according to the interception mode corresponding to the target power-consuming device to obtain a target sequence, where the target sequence includes the total power corresponding to each moment;
[0131] An extraction module 506 is used to extract features of the total power corresponding to each moment in the target sequence to obtain a feature sequence, where the feature sequence includes feature representations corresponding to each moment;
[0132] The encoding module 508 is used to obtain the trained power decomposition model, and encode the feature representation corresponding to each moment in the feature sequence through the encoder in the power decomposition model to obtain the encoded hidden state corresponding to each moment;
[0133] A determination module 510 is used to determine the weights corresponding to each encoding hidden state through the attention network of the decoder in the power decomposition model, and determine the vector to be decoded based on each encoding hidden state and the corresponding weight;
[0134] The decoding module 512 is used to decode the vector to be decoded through a decoding network of a decoder to obtain the active power of the target electrical device at each moment.
[0135] In some embodiments, the encoding module 508 is used to determine, for the first moment, based on the feature representation corresponding to the first moment, through an encoder in the power decomposition model, the encoding hidden state corresponding to the first moment; starting from the second moment, based on the encoding hidden state corresponding to the previous moment and the feature representation corresponding to the current moment, through the encoder, determine the encoding hidden state corresponding to the current moment.
[0136] In some embodiments, the decoding network includes a first decoding network, and a determination module 510 is used to determine, through the first decoding network, first decoding hidden states corresponding to each time respectively based on the encoding hidden state corresponding to the end time;
[0137] For the second-last moment before the last moment, according to the first decoding hidden state corresponding to the second-last moment and the encoding hidden state corresponding to each moment, the weights corresponding to each encoding hidden state are determined through the attention network.
[0138] In some embodiments, the determination module 510 is used to perform weighted processing on each encoding hidden state according to the weight of each encoding hidden state to obtain a vector to be decoded.
[0139] In some embodiments, the decoding network also includes a second decoding network, a decoding module 512, which is used to decode the decoding vector through the second decoding network to determine the second decoding hidden state corresponding to each moment; for each moment, based on the second decoding hidden state corresponding to the moment, determine the active power of the target electrical equipment at the moment.
[0140] In some embodiments, the decoding module 512 is used to obtain a mapping relationship between a decoded hidden state and a power probability distribution sequence; based on the mapping relationship, a power probability distribution sequence corresponding to the second decoded hidden state at a query time is obtained, and the power probability distribution sequence includes active powers corresponding to respective probabilities; and the active power corresponding to the maximum probability is selected from the power probability distribution sequence as the active power of the target electrical equipment at the time.
[0141] Each module in the above-mentioned power determination device for electric equipment can be implemented in whole or in part by software, hardware and a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0142] In an exemplary embodiment, a computer device is provided, which can be a server or a terminal, and its internal structure diagram can be shown in Figure 6. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for determining the power of an electric device is implemented.
[0143] Those skilled in the art will understand that the structure shown in FIG. 6 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0144] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: obtaining a total power sequence obtained through collection, the total power sequence including multiple total powers, each total power being the sum of powers consumed by multiple electrical devices at the same time; intercepting the total power sequence according to the interception method corresponding to the target electrical device to obtain a target sequence, the target sequence including the total power corresponding to each moment; extracting features of the total power corresponding to each moment in the target sequence to obtain a feature sequence, the feature sequence including the feature representation corresponding to each moment; obtaining a trained power decomposition model, encoding the feature representation corresponding to each moment in the feature sequence through an encoder in the power decomposition model, and obtaining the coded hidden state corresponding to each moment; determining the weights corresponding to each coded hidden state through the attention network of the decoder in the power decomposition model, and determining the vector to be decoded based on each coded hidden state and the corresponding weight; decoding the vector to be decoded through the decoding network of the decoder to obtain the active power of the target electrical device at each moment.
[0145] In one embodiment, when the processor executes the computer program, the following steps are also implemented: for the first moment, based on the feature representation corresponding to the first moment, the encoding hidden state corresponding to the first moment is determined through the encoder in the power decomposition model; starting from the second moment, based on the encoding hidden state corresponding to the previous moment and the feature representation corresponding to the current moment, the encoding hidden state corresponding to the current moment is determined through the encoder.
[0146] In one embodiment, the decoding network includes a first decoding network, and the processor further implements the following steps when executing the computer program: based on the coded hidden state corresponding to the last moment, determining the first decoding hidden state corresponding to each moment through the first decoding network; for the second-last moment before the last moment, determining the weights corresponding to each coded hidden state through the attention network according to the first decoding hidden state corresponding to the second-last moment and the coded hidden state corresponding to each moment.
[0147] In one embodiment, when the processor executes the computer program, the following steps are further implemented: weighted processing is performed on each coded hidden state according to the respective weights of each coded hidden state to obtain a vector to be decoded.
[0148] In one embodiment, the decoding network also includes a second decoding network, and the processor further implements the following steps when executing the computer program: decoding the decoding vector through the second decoding network to determine the second decoding hidden state corresponding to each moment; for each moment, determining the active power of the target electrical equipment at the moment based on the second decoding hidden state corresponding to the moment.
[0149] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining a mapping relationship between a decoded hidden state and a power probability distribution sequence; based on the mapping relationship, querying a power probability distribution sequence corresponding to a second decoded hidden state at a time, the power probability distribution sequence including active powers corresponding to respective probabilities; selecting the active power corresponding to the maximum probability from the power probability distribution sequence as the active power of the target electrical equipment at the time.
[0150] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: obtaining a total power sequence obtained through collection, the total power sequence includes multiple total powers, each total power is the sum of the powers consumed by multiple electrical devices at the same time; intercepting the total power sequence according to the interception method corresponding to the target electrical device to obtain a target sequence, the target sequence includes the total power corresponding to each moment; extracting features of the total power corresponding to each moment in the target sequence to obtain a feature sequence, the feature sequence includes the feature representation corresponding to each moment; obtaining a trained power decomposition model, encoding the feature representation corresponding to each moment in the feature sequence through an encoder in the power decomposition model, and obtaining the coded hidden state corresponding to each moment; determining the weights corresponding to each coded hidden state through the attention network of the decoder in the power decomposition model, and determining the vector to be decoded based on each coded hidden state and the corresponding weight; decoding the vector to be decoded through the decoding network of the decoder to obtain the active power of the target electrical device at each moment.
[0151] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: for the first moment, based on the feature representation corresponding to the first moment, the encoding hidden state corresponding to the first moment is determined through the encoder in the power decomposition model; starting from the second moment, based on the encoding hidden state corresponding to the previous moment and the feature representation corresponding to the current moment, the encoding hidden state corresponding to the current moment is determined through the encoder.
[0152] In one embodiment, the decoding network includes a first decoding network, and the computer program, when executed by the processor, further implements the following steps: based on the coded hidden state corresponding to the last moment, determining the first decoding hidden state corresponding to each moment through the first decoding network; for the second-last moment before the last moment, determining the weights corresponding to each coded hidden state through the attention network according to the first decoding hidden state corresponding to the second-last moment and the coded hidden state corresponding to each moment.
[0153] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: weighted processing is performed on each coded hidden state according to the weight of each coded hidden state to obtain a vector to be decoded.
[0154] In one embodiment, the decoding network also includes a second decoding network, and when the computer program is executed by the processor, the following steps are also implemented: decoding the decoding vector through the second decoding network to determine the second decoding hidden state corresponding to each moment; for each moment, based on the second decoding hidden state corresponding to the moment, determining the active power of the target electrical equipment at the moment.
[0155] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining a mapping relationship between a decoded hidden state and a power probability distribution sequence; based on the mapping relationship, querying a power probability distribution sequence corresponding to a second decoded hidden state at a time, the power probability distribution sequence including active powers corresponding to respective probabilities; selecting the active power corresponding to the maximum probability from the power probability distribution sequence as the active power of the target electrical equipment at the time.
[0156] In one embodiment, a computer program product is provided, including a computer program, which implements the following steps when executed by a processor: obtaining a total power sequence obtained through collection, the total power sequence including multiple total powers, each total power being the sum of powers consumed by multiple electrical devices at the same time; intercepting the total power sequence according to the interception method corresponding to the target electrical device to obtain a target sequence, the target sequence including the total power corresponding to each moment; extracting features of the total power corresponding to each moment in the target sequence to obtain a feature sequence, the feature sequence including feature representations corresponding to each moment; obtaining a trained power decomposition model, encoding the feature representations corresponding to each moment in the feature sequence through an encoder in the power decomposition model, and obtaining the coded hidden states corresponding to each moment; determining the weights corresponding to each coded hidden state through the attention network of the decoder in the power decomposition model, and determining the vector to be decoded based on each coded hidden state and the corresponding weight; decoding the vector to be decoded through the decoding network of the decoder to obtain the active power of the target electrical device at each moment.
[0157] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: for the first moment, based on the feature representation corresponding to the first moment, the encoding hidden state corresponding to the first moment is determined through the encoder in the power decomposition model; starting from the second moment, based on the encoding hidden state corresponding to the previous moment and the feature representation corresponding to the current moment, the encoding hidden state corresponding to the current moment is determined through the encoder.
[0158] In one embodiment, the decoding network includes a first decoding network, and the computer program, when executed by the processor, further implements the following steps: based on the coded hidden state corresponding to the last moment, determining the first decoding hidden state corresponding to each moment through the first decoding network; for the second-last moment before the last moment, determining the weights corresponding to each coded hidden state through the attention network according to the first decoding hidden state corresponding to the second-last moment and the coded hidden state corresponding to each moment.
[0159] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: weighted processing is performed on each coded hidden state according to the weight of each coded hidden state to obtain a vector to be decoded.
[0160] In one embodiment, the decoding network also includes a second decoding network, and when the computer program is executed by the processor, the following steps are also implemented: decoding the decoding vector through the second decoding network to determine the second decoding hidden state corresponding to each moment; for each moment, based on the second decoding hidden state corresponding to the moment, determining the active power of the target electrical equipment at the moment.
[0161] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining a mapping relationship between a decoded hidden state and a power probability distribution sequence; based on the mapping relationship, querying a power probability distribution sequence corresponding to a second decoded hidden state at a time, the power probability distribution sequence including active powers corresponding to respective probabilities; selecting the active power corresponding to the maximum probability from the power probability distribution sequence as the active power of the target electrical equipment at the time.
[0162] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0163] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0164] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0165] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for determining the power of an electrical device, characterized in that: The method comprises: Acquire a total power sequence obtained through collection, wherein the total power sequence includes multiple total powers, each of which is the sum of powers consumed by multiple electrical devices at the same time; According to the interception mode corresponding to the target electrical equipment, the total power sequence is intercepted to obtain a target sequence, wherein the target sequence includes the total power corresponding to each moment; Extracting features of the total power corresponding to each moment in the target sequence to obtain a feature sequence, wherein the feature sequence includes feature representations corresponding to each moment; Obtain a trained power decomposition model, and encode the feature representation corresponding to each moment in the feature sequence through an encoder in the power decomposition model to obtain the encoded hidden state corresponding to each moment; Determine the weights corresponding to the respective encoding hidden states through the attention network of the decoder in the power decomposition model, and determine the vector to be decoded based on the respective encoding hidden states and the respective corresponding weights; The vector to be decoded is decoded through a decoding network of the decoder to obtain the active power of the target electrical equipment at each moment.
2. The method according to claim 1, characterized in that: The encoder in the power decomposition model is used to encode the feature representation corresponding to each moment in the feature sequence to obtain the coded hidden state corresponding to each moment, including: For a first moment, based on the feature representation corresponding to the first moment, determining, by an encoder in the power decomposition model, a coded hidden state corresponding to the first moment; Starting from the second moment, based on the coded hidden state corresponding to the previous moment and the feature representation corresponding to the current moment, the coded hidden state corresponding to the current moment is determined through the encoder.
3. The method according to claim 1, characterized in that The decoding network includes a first decoding network, and the weights corresponding to each encoded hidden state are determined by the attention network of the decoder in the power decomposition model, including: Based on the coded hidden state corresponding to the last moment, determining the first decoded hidden state corresponding to each moment through the first decoding network; For the second-last moment before the last moment, according to the first decoding hidden state corresponding to the second-last moment and the encoding hidden state corresponding to each moment, the weights corresponding to each encoding hidden state are determined through the attention network.
4. The method according to claim 1, characterized in that: The step of determining the vector to be decoded based on each encoded hidden state and the corresponding weights includes: According to the weights of the respective coded hidden states, weighted processing is performed on the coded hidden states to obtain a vector to be decoded.
5. The method according to claim 1, characterized in that The decoding network further includes a second decoding network, and the decoding network of the decoder decodes the vector to be decoded to obtain the active power of the target electrical equipment at each moment, including: Decoding the vector to be decoded by the second decoding network to determine the second decoding hidden state corresponding to each moment; For each moment, the active power of the target electrical device at the moment is determined based on the second decoding hidden state corresponding to the moment.
6. The method according to claim 5, characterized in that The determining the active power of the target electrical device at the moment based on the second decoding hidden state corresponding to the moment includes: Obtaining a mapping relationship between a decoded hidden state and a power probability distribution sequence; Based on the mapping relationship, query the power probability distribution sequence corresponding to the second decoding hidden state at the moment, the power probability distribution sequence including the active power corresponding to each probability; The active power corresponding to the maximum probability is selected from the power probability distribution sequence as the active power of the target electrical equipment at the moment.
7. A device for determining power of an electric device, characterized in that: The device comprises: An acquisition module, used to acquire a total power sequence obtained through collection, wherein the total power sequence includes multiple total powers, each of which is the sum of powers consumed by multiple electrical devices at the same time; An interception module, used to intercept the total power sequence according to the interception mode corresponding to the target power-consuming device to obtain a target sequence, wherein the target sequence includes the total power corresponding to each moment; An extraction module, used for extracting features of the total power corresponding to each moment in the target sequence to obtain a feature sequence, wherein the feature sequence includes feature representations corresponding to each moment; An encoding module is used to obtain a trained power decomposition model, and encode the feature representation corresponding to each moment in the feature sequence through an encoder in the power decomposition model to obtain a coded hidden state corresponding to each moment; A determination module, used to determine the weights corresponding to each encoding hidden state through the attention network of the decoder in the power decomposition model, and determine the vector to be decoded based on each encoding hidden state and the corresponding weight; The decoding module is used to decode the vector to be decoded through the decoding network of the decoder to obtain the active power of the target electrical equipment at each moment.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.