A power supply device and method for a smart home device power supply
By performing deep separable downsampling and sparse attention extraction on historical load data of smart home devices, combined with gating feature fusion and autoregressive decoding, an updated power supply strategy is generated, which solves the problem of low power supply efficiency in existing technologies and achieves precise power supply optimization and cost reduction.
Patent Information
- Application Number
- CN202510331690.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2045-03-20
AI Technical Summary
Existing power supply control methods for smart home devices struggle to achieve precise power optimization and cannot adapt to dynamic electricity price changes and load demands, resulting in low power supply efficiency.
The system employs long-term and short-term feature extraction modules to perform deep separable downsampling and sparse attention extraction on historical load data. Combined with the load analysis module, it performs gated feature fusion and autoregressive decoding. The reward calculation module calculates the electricity incentive loss based on the tiered electricity price table. The power supply control module performs differential error training and global iterative optimization to generate an updated power supply strategy.
It improves the efficiency and comfort of power supply, reduces energy and electricity consumption, and enhances the accuracy of power supply and the precision of battery pack monitoring.
Smart Images

Figure CN119966012B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power supply control technology, and in particular to a power supply device and method for smart home devices. Background Technology
[0002] Smart home devices refer to home appliances or electronic devices with functions such as networking, automatic control, and remote management. They typically rely on the Internet of Things and artificial intelligence for operation and optimization. The power supply of smart home devices refers to the energy system that supplies power to smart home devices. In order to improve user comfort and optimize electricity costs, it is necessary to control the power supply of smart home devices.
[0003] Existing power supply control methods are mostly user-configured, meaning that users control the power output through manual control, timed control, or remote control. However, in practical applications, user-configured power supply control methods rely heavily on user operation, making it difficult to achieve precise power optimization and adapt to dynamic changes in electricity prices and load demands, which may result in low efficiency when supplying power. Summary of the Invention
[0004] This invention provides a power supply device and method for smart home devices, the main purpose of which is to solve the problem of low efficiency when supplying power.
[0005] To achieve the above objectives, the present invention provides a power supply device for smart home devices, the device comprising a long-term feature extraction module, a short-term feature extraction module, a load analysis module, a reward calculation module, and a power supply control module, wherein:
[0006] The long-term feature extraction module is used to acquire the historical load data sequence of smart home devices, and to perform deep separable downsampling and sparse attention extraction on the historical load data sequence to obtain long-term load time-series features.
[0007] The short-term feature extraction module is used to perform window attention extraction and multi-level window downsampling on the historical load data sequence to obtain short-term load time-series features.
[0008] The load analysis module is used to perform gated feature fusion and autoregressive decoding on the long-term load time-series features and the short-term load time-series features to obtain an analyzed load data sequence. Specifically, when performing gated feature fusion and autoregressive decoding on the long-term load time-series features and the short-term load time-series features to obtain the analyzed load data sequence, the load analysis module includes: performing key vector mapping on the long-term load time-series features to obtain long-term key features; performing query vector mapping on the short-term load time-series features to obtain short-term query features; and using the following gated fusion algorithm to perform gated feature fusion on the long-term load time-series features and the short-term query features to obtain long- and short-term load time-series features: in, This refers to the aforementioned long and short load time sequence characteristics. It is the symbol for the normalization function. This refers to the short-term query feature. This refers to the aforementioned short-term load timing characteristics. This refers to the long-term bond feature. This refers to the aforementioned long-term load time-series characteristics. This refers to the feature dimension of the long-term load time-series characteristics. It is an element-wise multiplication symbol; autoregressive decoding is performed on the long and short load time series characteristics to obtain the analyzed load data sequence;
[0009] The reward calculation module is used to obtain the initial power supply strategy and calculate the power consumption incentive loss corresponding to the initial power supply strategy based on the pre-obtained tiered electricity price table and the analyzed load data sequence.
[0010] The power supply control module is used to perform differential error training and global iterative optimization on the initial power supply strategy based on the power consumption excitation loss to obtain an updated power supply strategy, and to supply power to the smart home device according to the updated power supply strategy.
[0011] Optionally, when the long-term feature extraction module performs depthwise separable downsampling and sparse attention extraction on the historical load data sequence to obtain long-term load time-series features, it includes:
[0012] The historical load data sequence is projected into a high-dimensional space to obtain a historical load feature sequence;
[0013] The historical load feature sequence is positionally encoded to obtain the encoded load feature sequence;
[0014] Perform a depthwise convolution on the encoded payload feature sequence to obtain a deep payload feature sequence group;
[0015] Perform pointwise convolution on the deep load feature sequence group to obtain the convolutional load feature sequence;
[0016] Sparse attention extraction is performed on the convolutional load feature sequence to obtain long-term load temporal features.
[0017] Optionally, when the long-term feature extraction module performs sparse attention extraction on the convolutional load feature sequence to obtain long-term load temporal features, it includes:
[0018] The convolutional load feature sequence is subjected to attention feature projection to obtain the convolutional query feature matrix, the convolutional key feature matrix, and the convolutional value feature matrix.
[0019] The following divergence information increment algorithm is used to calculate the divergence information increment set corresponding to the convolution query feature matrix based on the convolution key feature matrix: in, It refers to the first element in the convolutional query feature matrix. The row feature vector and the first row in the convolution key feature matrix Attention score of row feature vectors , It is a feature index. It is the symbol for an exponential function. Refers to the convolution query feature matrix The first in row feature vector, It refers to the convolutional key feature matrix The first in row feature vector, It is the transpose symbol. This refers to the convolutional query feature matrix. This refers to the convolutional key feature matrix. It refers to the convolutional key feature matrix Feature dimensions, This refers to the convolution query feature matrix relating to the first element in the convolution key feature matrix. The global average attention score of the row feature vectors. This refers to the convolutional query feature matrix. the number of rows, It refers to the convolutional key feature matrix the number of rows, It is the symbol for a logarithmic function. It is the first in the set of divergence information increments Incremental information of each divergence;
[0020] The sparse information increment set is obtained by threshold filtering of the divergence information increment set;
[0021] The sparse query feature matrix is selected from the convolutional query feature matrix based on the sparse information increment set;
[0022] The long-term load time-series features of the convolutional load feature sequence are calculated based on the sparse query feature matrix, the convolution key feature matrix, and the convolutional value feature matrix.
[0023] Optionally, when the short-term feature extraction module performs window attention extraction and multi-level window downsampling on the historical load data sequence to obtain short-term load time-series features, it includes:
[0024] The historical load data sequence is projected into a high-dimensional space to obtain a historical load feature sequence;
[0025] The historical load feature sequence is positionally encoded to obtain the encoded load feature sequence;
[0026] A fixed-size temporal window is initialized, and the encoded payload feature sequence is sliced using the temporal window to obtain a windowed payload feature sequence.
[0027] Window attention extraction is performed on the window load feature sequence to obtain the window attention feature sequence;
[0028] The window attention feature sequence is downsampled temporally to obtain the downsampled window feature sequence;
[0029] The historical load feature sequence is iteratively updated using the downsampled window feature sequence, and the step of slicing the encoded load feature sequence using the temporal window to obtain the window load feature sequence is returned until the number of iterations is equal to a preset iteration threshold. Then, the downsampled window feature sequence is used as the standard window feature sequence.
[0030] The standard window feature sequence is dimensionally aligned and time-aligned to obtain short-term load time-series features.
[0031] Optionally, when the short-term feature extraction module performs window attention extraction on the window load feature sequence to obtain the window attention feature sequence, it includes:
[0032] Window attention weights are calculated for each window load feature in the window load feature sequence to obtain a window attention weight sequence;
[0033] The window attention weight sequence is subjected to attention pooling to obtain a pooled attention weight sequence;
[0034] The window load feature sequence is weighted using the pooled attention weight sequence to obtain a weighted attention feature sequence.
[0035] The weighted attention features are used to perform residual concatenation on the window load feature sequence to obtain a residual attention feature sequence;
[0036] The residual attention feature sequence is normalized and fed forward to obtain the window attention feature sequence.
[0037] Optionally, when the load analysis module performs autoregressive decoding on the long and short load time-series characteristics to obtain the analysis load data sequence, it includes:
[0038] Linear dimensionality reduction is performed on the aforementioned long and short load time series characteristics to obtain dimensionality-reduced load time series characteristics;
[0039] Feedforward the reduced-dimensional load time-series features to obtain the hidden states of the time-series features;
[0040] The historical load data located at the end of the historical load data sequence is used as the initial load data. The time-series feature hidden state is decoded using the initial load data to obtain the analysis load data.
[0041] The time-series feature hidden state is updated based on the analyzed load data to obtain the updated feature hidden state.
[0042] The process involves recursively updating the time-series feature hidden state using the updated feature hidden state, recursively updating the initial load data using the analyzed load data, and then returning to the step of decoding the time-series feature hidden state using the initial load data to obtain the analyzed load data.
[0043] When the number of recursive updates equals the preset recursion threshold, all analytical load data are aggregated into an analytical load data sequence.
[0044] Optionally, when the reward calculation module calculates the electricity consumption incentive loss corresponding to the initial power supply strategy based on the pre-acquired tiered electricity price table and the analyzed load data sequence, it includes:
[0045] Obtain the power load rating table of the smart home devices;
[0046] The power supply status is mapped to the analyzed load data sequence using the power load level table to obtain the analyzed power supply status sequence.
[0047] The power load level table is used to map the power supply status sequence to the power supply load to obtain the status load data sequence.
[0048] The initial power supply strategy is subjected to load extraction to obtain an initial load data sequence;
[0049] The comfort loss value corresponding to the initial load data sequence is calculated based on the state load data sequence.
[0050] The initial load data sequence is mapped to electricity price loss using a pre-acquired tiered electricity price table to obtain the electricity price loss value;
[0051] The electricity consumption incentive loss is calculated based on the comfort loss value and the electricity price loss value.
[0052] Optionally, when the reward calculation module calculates the comfort loss value corresponding to the initial load data sequence based on the state load data sequence, it includes:
[0053] The comfort loss value is calculated using the following comfort loss function: in, This is the value of comfort loss. , It is an index symbol. It is the sequence length of the state load data sequence. This refers to the total number of devices in the smart home ecosystem. This refers to the first [number]th [item] in the state load data sequence. The first state load data Load data for each device It is the first in the initial load data sequence The first initial load data Load data corresponding to each device It refers to the first of the smart home devices. The preset comfort weights for each device It is the absolute value symbol.
[0054] Optionally, when the power supply control module performs differential error training and global iterative optimization on the initial power supply strategy based on the power consumption excitation loss to obtain an updated power supply strategy, it includes:
[0055] Obtain the state load interval sequence corresponding to the analyzed load data sequence;
[0056] Initialize the power supply control action sequence, and update the power supply control action sequence according to the power consumption excitation loss and the state load interval sequence to obtain the updated control action sequence;
[0057] The initial load data sequence of the initial power supply strategy is subjected to load control using the updated control action sequence to obtain the control load data sequence;
[0058] The initial load data sequence is globally iteratively updated using the control load data sequence, and the step of calculating the comfort loss value corresponding to the initial load data sequence based on the state load data sequence using the comfort loss function is returned.
[0059] When the number of global iterations equals a preset global iteration threshold, the control load data sequence is used as the updated load data sequence, and an updated power supply strategy is generated based on the updated load data sequence.
[0060] To address the above problems, the present invention also provides a power supply method for a smart home device, the method comprising:
[0061] The historical load data sequence of smart home devices is obtained, and the historical load data sequence is subjected to deep separable downsampling and sparse attention extraction to obtain long-term load time-series features.
[0062] Window attention extraction and multi-level window downsampling are performed on the historical load data sequence to obtain short-term load time-series features;
[0063] The long-term load time-series features and the short-term load time-series features are subjected to gated feature fusion and autoregressive decoding to obtain an analytical load data sequence. The process of performing gated feature fusion and autoregressive decoding on the long-term and short-term load time-series features to obtain the analytical load data sequence includes: mapping the long-term load time-series features to a key vector to obtain long-term key features; mapping the short-term load time-series features to a query vector to obtain short-term query features; and using the following gated fusion algorithm, based on the long-term key features and the short-term query features, to perform gated feature fusion on the long-term and short-term load time-series features to obtain long- and short-term load time-series features: in, This refers to the aforementioned long and short load time sequence characteristics. It is the symbol for the normalization function. This refers to the short-term query feature. This refers to the aforementioned short-term load timing characteristics. This refers to the long-term bond feature. This refers to the aforementioned long-term load time-series characteristics. This refers to the feature dimension of the long-term load time-series characteristics. It is an element-wise multiplication symbol; autoregressive decoding is performed on the long and short load time series characteristics to obtain the analyzed load data sequence;
[0064] The initial power supply strategy is obtained, and the power consumption incentive loss corresponding to the initial power supply strategy is calculated based on the pre-acquired tiered electricity price table and the analyzed load data sequence.
[0065] Based on the power consumption excitation loss, the initial power supply strategy is trained using differential error and optimized globally to obtain an updated power supply strategy, and the smart home device is powered according to the updated power supply strategy.
[0066] This invention provides embodiments of the long-term load time-series features by performing deep separable downsampling and sparse attention extraction on the historical load data sequence. This reduces the processing complexity of the historical load data sequence while preserving local feature details, thereby improving the feature comprehensiveness of the long-term load time-series features. By performing window attention extraction and multi-level window downsampling on the historical load data sequence, short-term load time-series features are obtained. This reduces sampling redundancy of short-term features, improves feature extraction efficiency, and adaptively learns short-term features at different time granularities, increasing the information content of short-term load time-series features. By performing gated feature fusion and autoregressive decoding on the long-term and short-term load time-series features, an analytical load data sequence is obtained. This allows for adaptive selection of the corresponding feature contribution based on the attention mechanism, while reducing feature conflicts between long-term and short-term features, thus improving the accuracy of load data analysis.
[0067] By calculating the power consumption incentive loss corresponding to the initial power supply strategy based on the pre-acquired tiered electricity price table and the analyzed load data sequence, the power consumption incentive loss of the initial power supply strategy can be calculated by combining the comfort of user behavior habits and electricity costs, thereby facilitating subsequent optimization of the power supply strategy. By performing differential error training and global iterative optimization on the initial power supply strategy based on the power consumption incentive loss, an updated power supply strategy is obtained, and power is supplied to the smart home devices according to the updated power supply strategy. The global power supply strategy can be updated based on the timing error of the power consumption incentive loss, thereby improving the comfort of power supply, reducing power consumption and electricity costs, improving power supply efficiency, and thus improving the accuracy of battery pack monitoring. Attached Figure Description
[0068] Figure 1 This is a functional block diagram of a power supply device for a smart home device provided in an embodiment of the present invention;
[0069] Figure 2 This is a flowchart of generating an electrical dataset sequence group according to an embodiment of the present invention;
[0070] Figure 3 This is a flowchart for extracting graph event feature sequences according to an embodiment of the present invention;
[0071] Figure 4 This is a schematic flowchart of a power supply method for a smart home device according to an embodiment of the present invention.
[0072] The objectives, features, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0073] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0074] This application provides a power supply device for a smart home device. The power supply device for the smart home device can be executed by at least one of the following electronic devices: a server, a terminal, or other electronic devices configured to execute the device provided in this application. In other words, the power supply device for the smart home device can be executed by software or hardware installed on a terminal device or a server device. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0075] like Figure 1 The diagram shown is a functional block diagram of a power supply device for a smart home device provided in an embodiment of the present invention.
[0076] The power supply device 100 for smart home devices described in this invention can be installed in electronic devices. Depending on the functions implemented, the power supply device 100 may include a long-term feature extraction module 101, a short-term feature extraction module 102, a load analysis module 103, a reward calculation module 104, and a power supply control module 105. The module described in this invention can also be called a unit, referring to a series of computer program segments that can be executed by the processor of an electronic device and perform a fixed function, stored in the memory of the electronic device.
[0077] In this embodiment, the functions of each module / unit are as follows:
[0078] The long-term feature extraction module 101 is used to acquire the historical load data sequence of smart home devices, and to perform deep separable downsampling and sparse attention extraction on the historical load data sequence to obtain long-term load time-series features.
[0079] In detail, the smart home devices refer to home appliances or electronic devices with functions such as networking, automatic control, and remote management. The smart home devices include devices such as smart air conditioners, smart sockets, and smart light bulbs. The historical load data sequence refers to the changes in the power load data of each device in the smart home devices within a past time period. Each historical load data in the historical load data sequence corresponds to the power load data of the smart home devices in a fixed time period within the past time period.
[0080] Specifically, the historical load data sequence of the smart home device can be obtained through the load monitoring device corresponding to the smart home device. The load monitoring device can be a smart meter or smart socket, etc., used to monitor the power load of the device. The long-term load time series characteristics refer to the time series characteristics of the historical load data sequence over a long period of time. The long-term load time series characteristics can help analyze the global trend and periodic pattern of the power load, thereby optimizing the power supply control strategy.
[0081] In this embodiment of the invention, the long-term feature extraction module 101, when performing deep separable downsampling and sparse attention extraction on the historical load data sequence to obtain long-term load time-series features, includes:
[0082] The historical load data sequence is projected into a high-dimensional space to obtain a historical load feature sequence;
[0083] The historical load feature sequence is positionally encoded to obtain the encoded load feature sequence;
[0084] Perform a depthwise convolution on the encoded payload feature sequence to obtain a deep payload feature sequence group;
[0085] Perform pointwise convolution on the deep load feature sequence group to obtain the convolutional load feature sequence;
[0086] Sparse attention extraction is performed on the convolutional load feature sequence to obtain long-term load temporal features.
[0087] Specifically, the high-dimensional spatial projection refers to projecting each load data in the historical load data sequence onto a high-dimensional feature space, thereby enhancing the representation capability of load features and improving the feature details of load data. Load features of different dimensions in the historical load data sequence can be extracted by calculating load change rate, load frequency domain features, etc., and then merged into historical load features to achieve high-dimensional spatial projection. The position encoding refers to mapping the load feature of each position in the historical load feature sequence to the corresponding position index vector.
[0088] In detail, the depthwise convolution refers to convolving each channel of the input using a single-channel convolution kernel, that is, convolving the historical load feature sequence in multiple single channels. The pointwise convolution refers to using a smaller convolution kernel to achieve information fusion across multiple channels, that is, by using different small-sized convolutions and weighted summation of the features of each channel, the depthwise load feature sequences of each channel are merged into a single-channel convolutional load feature sequence.
[0089] Specifically, the depthwise separable downsampling can achieve efficient downsampling of the encoded load feature sequence through depthwise convolution and pointwise convolution, significantly reducing the amount of computation, while enhancing the extraction capability of local temporal features and improving the accuracy of temporal features.
[0090] Specifically, when the long-term feature extraction module 101 performs sparse attention extraction on the convolutional load feature sequence to obtain long-term load temporal features, it includes:
[0091] The convolutional load feature sequence is subjected to attention feature projection to obtain the convolutional query feature matrix, the convolutional key feature matrix, and the convolutional value feature matrix.
[0092] The divergence information increment set corresponding to the convolution query feature matrix is calculated based on the convolution key feature matrix.
[0093] The sparse information increment set is obtained by threshold filtering of the divergence information increment set;
[0094] The sparse query feature matrix is selected from the convolutional query feature matrix based on the sparse information increment set;
[0095] The long-term load time-series features of the convolutional load feature sequence are calculated based on the sparse query feature matrix, the convolution key feature matrix, and the convolutional value feature matrix.
[0096] In detail, the attention feature projection refers to using the transformation matrix of the attention mechanism to project the convolutional load feature sequence onto the new query space, key space, and value space respectively, thereby obtaining the convolutional query feature matrix, the convolutional key feature matrix, and the convolutional value feature matrix.
[0097] Specifically, the divergence information increment set is calculated using the following divergence information increment algorithm: in, It refers to the first element in the convolutional query feature matrix. The row feature vector and the first row in the convolution key feature matrix Attention score of row feature vectors , It is a feature index. It is the symbol for an exponential function. Refers to the convolution query feature matrix The first in row eigenvectors It is the dot product symbol. It refers to the convolutional key feature matrix The first in row feature vector, It is the transpose symbol. This refers to the convolutional query feature matrix. This refers to the convolutional key feature matrix. It refers to the convolutional key feature matrix Feature dimensions, This refers to the convolution query feature matrix relating to the first element in the convolution key feature matrix. The global average attention score of the row feature vectors. This refers to the convolutional query feature matrix. the number of rows, It refers to the convolutional key feature matrix the number of rows, It is the symbol for a logarithmic function. It is the first in the set of divergence information increments Incremental information of divergence.
[0098] Specifically, the divergence information increment algorithm can be used to measure the distribution difference between each convolutional query feature in the convolutional query feature matrix and the global average attention distribution, thereby enabling the filtering of convolutional query features, reducing the processing time of long sequence features, and improving feature extraction efficiency.
[0099] In detail, the threshold filtering refers to selecting several divergence information increments that are greater than a preset value or have a higher numerical ranking as sparse information increments and collecting them into a sparse information increment set.
[0100] Specifically, the sparse query feature matrix refers to the feature matrix in the convolution query feature matrix composed of the convolution query feature vectors corresponding to each sparse information increment in the sparse information increment set. The long-term load time-series features can be calculated using the attention mechanism based on the sparse query feature matrix, the convolution key feature matrix, and the convolution value feature matrix.
[0101] In this embodiment of the invention, long-term load time-series features are obtained by performing deep separable downsampling and sparse attention extraction on the historical load data sequence. This can reduce the processing complexity of the historical load data sequence while preserving local feature details, thereby improving the feature comprehensiveness of the long-term load time-series features.
[0102] The short-term feature extraction module 102 is used to perform window attention extraction and multi-level window downsampling on the historical load data sequence to obtain short-term load time-series features.
[0103] In detail, the short-term load time-series characteristics refer to the time-series characteristics exhibited by the historical load data sequence over a relatively short time span. The end-period load time-series characteristics can help analyze local trends and load mutations in power load, thereby optimizing the power supply control strategy.
[0104] In this embodiment of the invention, the short-term feature extraction module 102, when performing window attention extraction and multi-level window downsampling on the historical load data sequence to obtain short-term load time-series features, includes:
[0105] The historical load data sequence is projected into a high-dimensional space to obtain a historical load feature sequence;
[0106] The historical load feature sequence is positionally encoded to obtain the encoded load feature sequence;
[0107] A fixed-size temporal window is initialized, and the encoded payload feature sequence is sliced using the temporal window to obtain a windowed payload feature sequence.
[0108] Window attention extraction is performed on the window load feature sequence to obtain the window attention feature sequence;
[0109] The window attention feature sequence is downsampled temporally to obtain the downsampled window feature sequence;
[0110] The historical load feature sequence is iteratively updated using the downsampled window feature sequence, and the step of slicing the encoded load feature sequence using the temporal window to obtain the window load feature sequence is returned until the number of iterations is equal to a preset iteration threshold. Then, the downsampled window feature sequence is used as the standard window feature sequence.
[0111] The standard window feature sequence is dimensionally aligned and time-aligned to obtain short-term load time-series features.
[0112] In detail, the methods of high-dimensional spatial projection and position encoding are consistent with the methods of high-dimensional spatial projection and position encoding in the long-term feature extraction module 101 described above, and will not be repeated here. The iteration threshold can be 5.
[0113] Specifically, the fixed-size time-domain window refers to a time-domain window with a preset fixed duration period size, such as fifteen minutes as the time-domain window. The sliding window slicing refers to moving the time-domain window according to a preset fixed step size, and taking the coding load features in the coding load feature sequence corresponding to each step of the time-domain window as window load features, thereby forming a window load feature sequence. The step size can be ten minutes.
[0114] For details, refer to Figure 2 As shown, when the short-term feature extraction module 102 performs window attention extraction on the window load feature sequence to obtain the window attention feature sequence, it includes:
[0115] S21. Calculate the window attention weight for each window load feature in the window load feature sequence to obtain the window attention weight sequence;
[0116] S22. Perform attention pooling operation on the window attention weight sequence to obtain a pooled attention weight sequence;
[0117] S23. Use the pooled attention weight sequence to perform feature weighting on the window load feature sequence to obtain a weighted attention feature sequence;
[0118] S24. The window load feature sequence is subjected to residual connection using the weighted attention features to obtain the residual attention feature sequence;
[0119] S25. Perform feature normalization and feedforward output on the residual attention feature sequence to obtain the window attention feature sequence.
[0120] In detail, the window attention weight calculation refers to calculating the attention weight corresponding to each window load feature using an attention mechanism. Attention pooling is a convergence method based on an attention mechanism. When processing sequence data, it can extract key information and perform effective summarization. Attention pooling determines its contribution to the summary result by calculating the weight of each element in the sequence.
[0121] Specifically, feature normalization can be performed using layer normalization, and feedforward output can be performed using a multilayer perceptron network. The temporal downsampling refers to using a patch merging network to sequentially perform window merging, linear dimensionality reduction, and layer normalization operations on the window attention feature sequence, thereby achieving feature downsampling.
[0122] In detail, the dimension alignment refers to aligning the feature dimensions of the standard window feature sequence with the feature dimensions of the long-term load time series feature, and the time alignment refers to aligning the time length of the standard window feature sequence with the time length of the long-term load time series feature. Dimension alignment can be performed using convolutional layers or feedforward neural networks, and time alignment can be performed using methods such as feature interpolation or deconvolution. By performing dimension alignment and time alignment, it is convenient to subsequently fuse the features of the long-term load time series feature and the short-term load time series feature.
[0123] In this embodiment of the invention, by performing window attention extraction and multi-level window downsampling on the historical load data sequence, short-term load time-series features are obtained. This reduces the sampling redundancy of short-term features, improves feature extraction efficiency, and adaptively learns short-term features at different time granularities, thereby increasing the information content of short-term load time-series features.
[0124] The load analysis module 103 is used to perform gated feature fusion and autoregressive decoding on the long-term load time-series characteristics and the short-term load time-series characteristics to obtain the analyzed load data sequence.
[0125] In detail, the analyzed load data sequence refers to the power load data of each device of the smart home device in the future period obtained by analyzing the long-term and short-term time-series characteristics of the historical load data sequence.
[0126] In this embodiment of the invention, reference is made to Figure 3 As shown, when the load analysis module 103 performs gated feature fusion and autoregressive decoding on the long-term load time-series characteristics and the short-term load time-series characteristics to obtain the analysis load data sequence, it includes:
[0127] S31. Perform key vector mapping on the long-term load time-series features to obtain long-term key features;
[0128] S32. Perform query vector mapping on the short-term load time-series characteristics to obtain short-term query characteristics;
[0129] S33. Based on the long-term key feature and the short-term query feature, perform gated feature fusion on the long-term load time-series feature and the short-term load time-series feature to obtain long-short load time-series features;
[0130] S34. Perform autoregressive decoding on the long and short load time series characteristics to obtain the analysis load data sequence.
[0131] In detail, the key vector mapping refers to projecting the long-term load time-series features using a pre-trained key vector projection matrix, and using the result as the long-term key features. The query vector mapping refers to projecting the short-term load time-series features using a pre-trained query vector projection matrix, and using the result as the short-term query features. The key vector projection matrix and the query vector projection matrix are learned by an attention mechanism.
[0132] Specifically, the long and short load time-series characteristics are calculated using the following gated fusion algorithm: in, This refers to the aforementioned long and short load time sequence characteristics. It is the symbol for the normalization function. This refers to the short-term query feature. This refers to the aforementioned short-term load timing characteristics. This refers to the long-term bond feature. This refers to the aforementioned long-term load time-series characteristics. This refers to the feature dimension of the long-term load time-series characteristics. It is the symbol for element-wise multiplication.
[0133] In detail, by using the gating fusion algorithm to fuse the long-term load time-series features and the short-term load time-series features, the corresponding feature contribution can be adaptively selected according to the attention mechanism, thereby improving the accuracy of analysis and reducing feature conflicts between long-term and short-term features, thus improving generalization ability.
[0134] Specifically, when the load analysis module 103 performs autoregressive decoding on the long and short load time-series characteristics to obtain the analyzed load data sequence, it includes:
[0135] Linear dimensionality reduction is performed on the aforementioned long and short load time series characteristics to obtain dimensionality-reduced load time series characteristics;
[0136] Feedforward the reduced-dimensional load time-series features to obtain the hidden states of the time-series features;
[0137] The historical load data located at the end of the historical load data sequence is used as the initial load data. The time-series feature hidden state is decoded using the initial load data to obtain the analysis load data.
[0138] The time-series feature hidden state is updated based on the analyzed load data to obtain the updated feature hidden state.
[0139] The process involves recursively updating the time-series feature hidden state using the updated feature hidden state, recursively updating the initial load data using the analyzed load data, and then returning to the step of decoding the time-series feature hidden state using the initial load data to obtain the analyzed load data.
[0140] When the number of recursive updates equals the preset recursion threshold, all analytical load data are aggregated into an analytical load data sequence.
[0141] In detail, the linear dimensionality reduction refers to using a projection matrix to reduce the dimensionality of the long and short load time series features to the same data dimension as the historical load data sequence, and a multilayer perceptron network can be used for feedforward output.
[0142] Specifically, decoding can be performed using a Transformer decoder trained with pre-labeled historical load data of the analysis load data, and state updates can be performed using self-attention or cross-attention.
[0143] Specifically, the recursion threshold is equal to the sequence length of the analysis load data sequence, and each analysis load data in the analysis load data sequence is sorted from front to back according to the decoded timestamp.
[0144] In this embodiment of the invention, by performing gated feature fusion and autoregressive decoding on the long-term load time-series features and the short-term load time-series features, an analytical load data sequence is obtained. This allows for adaptive selection of the corresponding feature contribution based on an attention mechanism, while reducing feature conflicts between long-term and short-term features and improving the accuracy of load data analysis.
[0145] The reward calculation module 104 is used to obtain the initial power supply strategy and calculate the power consumption incentive loss corresponding to the initial power supply strategy based on the pre-acquired tiered electricity price table and the analyzed load data sequence.
[0146] In detail, the initial power supply strategy is the initial default power supply strategy of the smart home device, such as turning on a fixed number of smart home devices within a preset time period and configuring the corresponding device power supply load.
[0147] Specifically, the tiered electricity price table refers to a data table that divides electricity fees into different tiers based on the user's electricity consumption. The tiered electricity price table is used to describe the correspondence between electricity price and electricity fee, and the electricity fee will increase step by step as the electricity consumption increases.
[0148] In detail, the power consumption incentive loss is a loss value used to guide the initial power supply strategy towards optimizing for reduced electricity costs and improved user comfort.
[0149] In this embodiment of the invention, when the reward calculation module 104 calculates the electricity consumption incentive loss corresponding to the initial power supply strategy based on the pre-acquired tiered electricity price table and the analyzed load data sequence, it includes:
[0150] Obtain the power load rating table of the smart home devices;
[0151] The power supply status is mapped to the analyzed load data sequence using the power load level table to obtain the analyzed power supply status sequence.
[0152] The power load level table is used to map the power supply status sequence to the power supply load to obtain the status load data sequence.
[0153] The initial power supply strategy is subjected to load extraction to obtain an initial load data sequence;
[0154] The comfort loss value corresponding to the initial load data sequence is calculated based on the state load data sequence.
[0155] The initial load data sequence is mapped to electricity price loss using a pre-acquired tiered electricity price table to obtain the electricity price loss value;
[0156] The electricity consumption incentive loss is calculated based on the comfort loss value and the electricity price loss value.
[0157] In detail, the power load level table is a mapping table used to record the power status level of each device in the smart home device and the corresponding power consumption in watts. For example, when the analyzed load data of a smart fan is 20W to 40W, excluding 40W, the corresponding analyzed power supply status is low; when the analyzed load data is 40W to 70W, excluding 70W, the corresponding analyzed power supply status is medium. The power supply status mapping refers to analyzing the energy consumption level of the smart home device corresponding to each analyzed load data in the analyzed load data sequence. The power supply load mapping refers to analyzing the minimum load data corresponding to each energy consumption level of the smart home device. For example, when the analyzed load data of a smart fan is 30W, the corresponding state load data is 20W.
[0158] Specifically, the comfort loss value is calculated using the following comfort loss function: in, This is the value of comfort loss. , It is an index symbol. It is the sequence length of the state load data sequence. This refers to the total number of devices in the smart home ecosystem. This refers to the first [number]th [item] in the state load data sequence. The first state load data Load data for each device It is the first in the initial load data sequence The first initial load data Load data corresponding to each device It refers to the first of the smart home devices. The preset comfort weights for each device It is the absolute value symbol.
[0159] In detail, the comfort loss function can determine the comfort level of the initial power supply strategy by combining factors such as user load expectation and equipment load change rate, thereby facilitating the optimization of the power supply strategy towards reducing electricity costs and improving user comfort. The step of mapping the initial load data sequence to electricity price loss using a pre-acquired tiered electricity price table to obtain the electricity price loss value refers to calculating the total electricity price loss corresponding to the initial load data sequence in the tiered electricity price table. The electricity price loss value can be obtained by calculating the sum of the products of the total load and the corresponding electricity price in each tiered time period of the initial load data sequence.
[0160] Specifically, calculating the electricity consumption incentive loss based on the comfort loss value and the electricity price loss value means using the weighted sum of the comfort loss value and the electricity price loss value as the electricity consumption incentive loss.
[0161] In this embodiment of the invention, by calculating the electricity incentive loss corresponding to the initial power supply strategy based on the pre-acquired tiered electricity price table and the analyzed load data sequence, the electricity incentive loss of the initial power supply strategy can be calculated by combining the comfort level of user behavior habits and electricity price, thereby facilitating subsequent optimization of the power supply strategy.
[0162] The power supply control module 105 is used to perform differential error training and global iterative optimization on the initial power supply strategy based on the power consumption excitation loss to obtain an updated power supply strategy, and to supply power to the smart home device according to the updated power supply strategy.
[0163] In detail, the updated power supply strategy refers to a power load control sequence that has advantages in terms of user comfort and electricity price, obtained through iterative optimization. For example, power allocation is performed on each device of the smart home device power supply within a fixed time period.
[0164] In this embodiment of the invention, when the power supply control module 105 performs differential error training and global iterative optimization on the initial power supply strategy based on the power consumption excitation loss to obtain an updated power supply strategy, it includes:
[0165] Obtain the state load interval sequence corresponding to the analyzed load data sequence;
[0166] Initialize the power supply control action sequence, and update the power supply control action sequence according to the power consumption excitation loss and the state load interval sequence to obtain the updated control action sequence;
[0167] The initial load data sequence of the initial power supply strategy is subjected to load control using the updated control action sequence to obtain the control load data sequence;
[0168] The initial load data sequence is globally iteratively updated using the control load data sequence, and the step of calculating the comfort loss value corresponding to the initial load data sequence based on the state load data sequence using the comfort loss function is returned.
[0169] When the number of global iterations equals a preset global iteration threshold, the control load data sequence is used as the updated load data sequence, and an updated power supply strategy is generated based on the updated load data sequence.
[0170] In detail, each power supply control action in the power supply control action sequence is an action used to control the power changes of each initial load data in the initial load data sequence, such as maintaining the load constant, increasing the load, and decreasing the load. When the power supply control action sequence is just initialized, the corresponding power supply control action is to maintain the load constant.
[0171] Specifically, the action update refers to updating the power supply control action sequence in the direction of reducing the power consumption excitation loss, and it must satisfy the updated initial load data sequence, that is, the control load data sequence satisfies the requirements of the state load interval sequence. The action update can be performed using gradient descent method and mathematical expectation method.
[0172] In detail, the load control refers to updating the corresponding initial load data in the initial load data sequence according to each update control action in the update control action sequence, such as maintaining the load unchanged, increasing the load, or decreasing the load. The global iteration threshold can be 100.
[0173] Specifically, when the power supply control module 105 performs the power supply to the smart home devices according to the updated power supply strategy, it extracts the start and stop timestamps of each device and the power values allocated to each start and stop timestamp from the updated power supply strategy, and allocates the corresponding power supply voltage and power supply current to each device at the corresponding time according to the correspondence between the start and stop timestamps and the power values.
[0174] In this embodiment of the invention, by performing differential error training and global iterative optimization on the initial power supply strategy based on the power consumption excitation loss, an updated power supply strategy is obtained, and the smart home device is powered according to the updated power supply strategy. This enables global power supply strategy updates based on the timing error of the power consumption excitation loss, thereby improving the comfort of power supply, reducing power consumption and electricity costs, and improving power supply efficiency.
[0175] Reference Figure 4 The diagram shown is a schematic flowchart of a power supply method for a smart home device according to an embodiment of the present invention. In this embodiment, the power supply method for the smart home device includes:
[0176] S1. Obtain the historical load data sequence of smart home devices, and perform deep separable downsampling and sparse attention extraction on the historical load data sequence to obtain long-term load time-series features;
[0177] S2. Perform window attention extraction and multi-level window downsampling on the historical load data sequence to obtain short-term load time-series characteristics;
[0178] S3. Perform gated feature fusion and autoregressive decoding on the long-term load time-series features and the short-term load time-series features to obtain the analyzed load data sequence. The process of performing gated feature fusion and autoregressive decoding on the long-term load time-series features and the short-term load time-series features to obtain the analyzed load data sequence includes: performing key vector mapping on the long-term load time-series features to obtain long-term key features; performing query vector mapping on the short-term load time-series features to obtain short-term query features; and using the following gated fusion algorithm to perform gated feature fusion on the long-term load time-series features and the short-term query features to obtain long- and short-term load time-series features: in, This refers to the aforementioned long and short load time sequence characteristics. It is the symbol for the normalization function. This refers to the short-term query feature. This refers to the aforementioned short-term load timing characteristics. This refers to the long-term bond feature. This refers to the aforementioned long-term load time-series characteristics. This refers to the feature dimension of the long-term load time-series characteristics. It is an element-wise multiplication symbol; autoregressive decoding is performed on the long and short load time series characteristics to obtain the analyzed load data sequence;
[0179] S4. Obtain the initial power supply strategy, and calculate the power consumption incentive loss corresponding to the initial power supply strategy based on the pre-obtained tiered electricity price table and the analyzed load data sequence.
[0180] S5. Based on the power consumption excitation loss, perform differential error training and global iterative optimization on the initial power supply strategy to obtain an updated power supply strategy, and supply power to the smart home device according to the updated power supply strategy.
[0181] This invention provides embodiments of the long-term load time-series features by performing deep separable downsampling and sparse attention extraction on the historical load data sequence. This reduces the processing complexity of the historical load data sequence while preserving local feature details, thereby improving the feature comprehensiveness of the long-term load time-series features. By performing window attention extraction and multi-level window downsampling on the historical load data sequence, short-term load time-series features are obtained. This reduces sampling redundancy of short-term features, improves feature extraction efficiency, and adaptively learns short-term features at different time granularities, increasing the information content of short-term load time-series features. By performing gated feature fusion and autoregressive decoding on the long-term and short-term load time-series features, an analytical load data sequence is obtained. This allows for adaptive selection of the corresponding feature contribution based on the attention mechanism, while reducing feature conflicts between long-term and short-term features, thus improving the accuracy of load data analysis.
[0182] By calculating the power consumption incentive loss corresponding to the initial power supply strategy based on the pre-acquired tiered electricity price table and the analyzed load data sequence, the power consumption incentive loss of the initial power supply strategy can be calculated by combining the comfort of user behavior habits and electricity costs, thereby facilitating subsequent optimization of the power supply strategy. By performing differential error training and global iterative optimization on the initial power supply strategy based on the power consumption incentive loss, an updated power supply strategy is obtained, and power is supplied to the smart home devices according to the updated power supply strategy. The global power supply strategy can be updated based on the timing error of the power consumption incentive loss, thereby improving the comfort of power supply, reducing power consumption and electricity costs, improving power supply efficiency, and thus improving the accuracy of battery pack monitoring.
[0183] In detail, the power supply method for the smart home device power supply described in this embodiment of the invention adopts the same method as described above. Figure 1 The power supply device used in this paper employs the same technical means as the power supply device for smart home devices and can produce the same technical effect, so it will not be described in detail here.
[0184] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor of an electronic device, can perform the following:
[0185] The historical load data sequence of smart home devices is obtained, and the historical load data sequence is subjected to deep separable downsampling and sparse attention extraction to obtain long-term load time-series features.
[0186] Window attention extraction and multi-level window downsampling are performed on the historical load data sequence to obtain short-term load time-series features;
[0187] The long-term load time-series features and the short-term load time-series features are subjected to gated feature fusion and autoregressive decoding to obtain an analytical load data sequence. The process of performing gated feature fusion and autoregressive decoding on the long-term and short-term load time-series features to obtain the analytical load data sequence includes: mapping the long-term load time-series features to a key vector to obtain long-term key features; mapping the short-term load time-series features to a query vector to obtain short-term query features; and using the following gated fusion algorithm, based on the long-term key features and the short-term query features, to perform gated feature fusion on the long-term and short-term load time-series features to obtain long- and short-term load time-series features: in, This refers to the aforementioned long and short load time sequence characteristics. It is the symbol for the normalization function. This refers to the short-term query feature. This refers to the aforementioned short-term load timing characteristics. This refers to the long-term bond feature. This refers to the aforementioned long-term load time-series characteristics. This refers to the feature dimension of the long-term load time-series characteristics. It is an element-wise multiplication symbol; autoregressive decoding is performed on the long and short load time series characteristics to obtain the analyzed load data sequence;
[0188] The initial power supply strategy is obtained, and the power consumption incentive loss corresponding to the initial power supply strategy is calculated based on the pre-acquired tiered electricity price table and the analyzed load data sequence.
[0189] Based on the power consumption excitation loss, the initial power supply strategy is trained using differential error and optimized globally to obtain an updated power supply strategy, and the smart home device is powered according to the updated power supply strategy.
[0190] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and devices can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for example, the division of modules is merely a logical functional division, and other division methods may be used in actual implementation.
[0191] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0192] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.
[0193] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0194] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the invention. No appended diagram markings in the claims should be construed as limiting the scope of the claims.
[0195] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theory, apparatus, technology, and application devices that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0196] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices described in the apparatus embodiments may also be implemented by a single unit or device through software or hardware. Terms such as "first," "second," etc., are used to indicate names and do not indicate any specific order.
[0197] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A power supply device of a power supply of a smart home device, characterized by, The device comprises a long-term feature extraction module, a short-term feature extraction module, a load analysis module, a reward calculation module and a power supply control module, wherein: The long-term feature extraction module is configured to obtain a historical load data sequence of the smart home device, and perform deep divisible down-sampling and sparse attention extraction on the historical load data sequence to obtain long-term load time sequence features. The short-term feature extraction module is configured to perform window attention extraction and multi-level window down-sampling on the historical load data sequence to obtain short-term load time sequence features. The load analysis module is configured to perform gated feature fusion and self-recurrent decoding on the long-term load time sequence features and the short-term load time sequence features to obtain an analysis load data sequence. wherein F refers to the long-short load time series feature, softmax() is a normalization function symbol, Q s is the short-term query feature, s refers to the short-term load time series feature, K l refers to the long-term key feature, l refers to the long-term load time series feature, d l refers to the feature dimension of the long-term load time series feature, and refers to the long-term load time series feature; and performing autoregressive decoding on the long-short load time series feature to obtain an analysis load data sequence. The reward calculation module is configured to obtain an initial power supply strategy, and calculate an electricity incentive loss corresponding to the initial power supply strategy according to a pre-obtained step-by-step electricity price table and the analysis load data sequence. The power supply control module is configured to perform differential error training and global iterative optimization on the initial power supply strategy according to the electricity incentive loss to obtain an updated power supply strategy, and supply power to the smart home device according to the updated power supply strategy.
2. The power supply device of the smart home device power supply of claim 1, wherein, The long-term feature extraction module comprises the following steps when performing deep divisible down-sampling and sparse attention extraction on the historical load data sequence to obtain long-term load time sequence features: Perform high-dimensional space projection on the historical load data sequence to obtain a historical load feature sequence; Perform position encoding on the historical load feature sequence to obtain an encoded load feature sequence; Perform deep convolution on the encoded load feature sequence to obtain a deep load feature sequence group; Perform point-by-point convolution on the deep load feature sequence group to obtain a convolution load feature sequence; Perform sparse attention extraction on the convolution load feature sequence to obtain long-term load time sequence features.
3. The power supply device of the smart home device power supply of claim 2, wherein, The long-term feature extraction module comprises the following steps when performing sparse attention extraction on the convolution load feature sequence to obtain long-term load time sequence features: Perform attention feature projection on the convolution load feature sequence to obtain a convolution query feature matrix, a convolution key feature matrix and a convolution value feature matrix; Calculate a divergence information increment set corresponding to the convolution query feature matrix according to the convolution key feature matrix by using a divergence information increment algorithm; wherein, A i,j denotes the attention score of the i-th row feature vector in the convolution query feature matrix and the j-th row feature vector in the convolution key feature matrix, i, j are feature indexes, exp is an exponential function symbol, q i denotes the i-th row feature vector in the convolution query feature matrix q, k j denotes the j-th row feature vector in the convolution key feature matrix k, T is a transpose symbol, q denotes the convolution query feature matrix, k denotes the convolution key feature matrix, d k denotes the feature dimension of the convolution key feature matrix k, denotes the global average attention score of the convolution query feature matrix to the j-th row feature vector in the convolution key feature matrix, L q denotes the number of rows of the convolution query feature matrix q, L k denotes the number of rows of the convolution key feature matrix k, log is a logarithmic function symbol, D i is the i-th divergence information increment in the divergence information increment set; Perform threshold screening on the divergence information increment set to obtain a sparse information increment set; Screen a sparse query feature matrix from the convolution query feature matrix according to the sparse information increment set; and Perform sparse attention extraction on the convolution load feature sequence to obtain long-term load time sequence features. Calculate long-term load time sequence features of the convolution load feature sequence according to the sparse query feature matrix, the convolution key feature matrix, and the convolution value feature matrix.
4. The power supply device of the smart home device power supply of claim 1, wherein, When performing window attention extraction on the historical load data sequence and multi-level window down-sampling to obtain short-term load time sequence features, the short-term feature extraction module comprises the following steps: Project the historical load data sequence in a high-dimensional space to obtain a historical load feature sequence; Perform position encoding on the historical load feature sequence to obtain an encoded load feature sequence; Initialize a fixed-size time domain window, and use the time domain window to slice the encoded load feature sequence in a sliding window to obtain a window load feature sequence; Perform window attention extraction on the window load feature sequence to obtain a window attention feature sequence; Perform time sequence down-sampling on the window attention feature sequence to obtain a down-sampled window feature sequence; Iteratively update the historical load feature sequence using the down-sampled window feature sequence, and return to the step of slicing the encoded load feature sequence in a window using the time domain window to obtain a window load feature sequence until the number of iterative updates is equal to a preset iteration threshold, and the down-sampled window feature sequence is taken as a standard window feature sequence; Align the dimensions and time of the standard window feature sequence to obtain short-term load time sequence features.
5. The power supply device of the smart home device power supply of claim 4, wherein, When performing window attention extraction on the window load feature sequence to obtain a window attention feature sequence, the short-term feature extraction module comprises the following steps: Calculate window attention weights for each window load feature in the window load feature sequence to obtain a window attention weight sequence; Perform attention pooling on the window attention weight sequence to obtain a pooled attention weight sequence; Use the pooled attention weight sequence to weight the window load feature sequence to obtain a weighted attention feature sequence; Use the weighted attention feature to connect the window load feature sequence in a residual manner to obtain a residual attention feature sequence; Perform feature normalization and feedforward output on the residual attention feature sequence to obtain a window attention feature sequence.
6. The power supply device of the smart home device power supply of claim 1, wherein, When performing autoregressive decoding on the long-short load time sequence features to obtain an analysis load data sequence, the load analysis module comprises the following steps: Perform linear dimension reduction on the long-short load time sequence features to obtain a reduced load time sequence feature; Perform feedforward output on the reduced load time sequence feature to obtain a time sequence feature hidden state; Use historical load data at the end of the sequence in the historical load data sequence as initial load data, and use the initial load data to decode the time sequence feature hidden state to obtain an analysis load data; Update the time sequence feature hidden state according to the analysis load data to obtain an updated feature hidden state; Recursively update the time sequence feature hidden state using the updated feature hidden state, and recursively update the initial load data using the analysis load data, and return to the step of decoding the time sequence feature hidden state using the initial load data to obtain an analysis load data. Until the number of times of the recursive update is equal to a preset recursive threshold, all the analysis load data are collected into an analysis load data sequence.
7. The power supply device of the smart home device power supply of claim 1, wherein, The reward calculation module, when performing calculation of the power consumption incentive loss corresponding to the initial power supply strategy according to the pre-acquired step-by-step electricity price table and the analysis load data sequence, comprises: acquiring a power consumption load level table of the smart home device; performing power supply state mapping on the analysis load data sequence by using the power consumption load level table to obtain an analysis power supply state sequence; performing power supply load mapping on the analysis power supply state sequence by using the power consumption load level table to obtain a state load data sequence; extracting a load from the initial power supply strategy to obtain an initial load data sequence; calculating a comfort loss value corresponding to the initial load data sequence according to the state load data sequence; performing price loss mapping on the initial load data sequence by using the pre-acquired step-by-step electricity price table to obtain a price loss value; calculating a power consumption incentive loss according to the comfort loss value and the price loss value.
8. The power supply device of the smart home device power supply of claim 7, wherein, The reward calculation module, when performing calculation of the comfort loss value corresponding to the initial load data sequence according to the state load data sequence, comprises: calculating a comfort loss value by using a comfort loss function as follows: wherein C is a comfort loss value, t, r are index symbols, T is a sequence length of the state load data sequence, R is a total number of devices in the smart home device, M r,t denotes load data of the rth device in the tth state load data in the state load data sequence, is load data corresponding to the rth device in the tth initial load data in the initial load data sequence, μ r denotes a preset comfort weight of the rth device in the smart home device, | | is an absolute value symbol.
9. The power supply device of the smart home device power supply of claim 7, wherein, The power supply control module, when performing differential error training and global iterative optimization on the initial power supply strategy according to the power consumption incentive loss to obtain an updated power supply strategy, comprises: acquiring a state load interval sequence corresponding to the analysis load data sequence; initializing a power supply control action sequence, and updating the power supply control action sequence according to the power consumption incentive loss and the state load interval sequence to obtain an updated control action sequence; performing load control on the initial load data sequence of the initial power supply strategy by using the updated control action sequence to obtain a control load data sequence; performing global iterative update on the initial load data sequence by using the control load data sequence, and returning to the step of calculating the comfort loss value corresponding to the initial load data sequence according to the state load data sequence by using the comfort loss function; until the number of times of the global iterative update is equal to a preset global iterative threshold, taking the control load data sequence as an updated load data sequence, and generating an updated power supply strategy according to the updated load data sequence.
10. A power supply method of a power supply of a smart home device, characterized by, The method comprises: acquiring a historical load data sequence of a smart home device, and performing deep separable down-sampling and sparse attention extraction on the historical load data sequence to obtain long-term load time sequence features; performing window attention extraction and multi-level window down-sampling on the historical load data sequence to obtain short-term load time sequence features; The long-term load time sequence feature and the short-term load time sequence feature are subjected to gated feature fusion and autoregressive decoding to obtain an analysis load data sequence, wherein the long-term load time sequence feature is subjected to key vector mapping to obtain a long-term key feature, the short-term load time sequence feature is subjected to query vector mapping to obtain a short-term query feature, and the long-term load time sequence feature and the short-term load time sequence feature are subjected to gated feature fusion according to the long-term key feature and the short-term query feature by using a gated fusion algorithm to obtain a long-short load time sequence feature: wherein F refers to the long-short load time series feature, softmax() is a normalization function symbol, Q s is the short-term query feature, s refers to the short-term load time series feature, K l refers to the long-term key feature, l refers to the long-term load time series feature, d l refers to the feature dimension of the long-term load time series feature, and refers to the long-term load time series feature; and performing autoregressive decoding on the long-short load time series feature to obtain an analysis load data sequence. An initial power supply strategy is acquired, and a power consumption incentive loss corresponding to the initial power supply strategy is calculated according to a pre-acquired step-by-step electricity price table and the analysis load data sequence; The initial power supply strategy is subjected to differential error training and global iterative optimization according to the power consumption incentive loss to obtain an updated power supply strategy, and the smart home device is powered according to the updated power supply strategy.
Citation Information
Patent Citations
K-means based multi-branch AGCNN short-term power load prediction method
CN114091776A
Power load prediction method and system based on multi-modal and multi-scale feature fusion
CN119154260A