Solar storage cabinet energy supply early warning method and system based on itransform model, terminal and storage medium
Through the early warning method of solar storage cabinet energy supply based on the powerformer model, the problem of unstable power supply in industrial applications of intelligent storage tool cabinets is solved, accurate prediction of solar power generation and adjustment of power supply schemes is achieved, and the stability and production efficiency of the system are improved.
Patent Information
- Application Number
- CN202510183551.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-19
- Publication Date
- 2025-06-27
AI Technical Summary
Smart storage tool cabinets are difficult to obtain stable power supply in industrial applications, which affects production process and economic losses, especially when solar power supply is unstable.
The solar storage cabinet energy supply early warning method is adopted based on the powerformer model. By obtaining a multi-dimensional time series data set, including irradiance and environmental characteristic data, data preprocessing and feature extraction are carried out to predict future solar power generation, and to judge whether the energy needs are met based on the prediction results, and early warning information is sent.
It improves the stability of solar storage cabinet operation, ensuring that in the event of unstable power supply, the power supply plan can be timely warned and adjusted, and avoids production interruptions and economic losses.
Smart Images

Figure CN120220356A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical fields of machine learning and solar power supply, and particularly relates to a solar storage cabinet energy supply warning method, system, terminal, and storage medium based on the itransformer model. Background Art
[0002] Storage tool cabinets are very important components in industrial production. They can help classify and store tools, parts, materials, etc. according to type, specification, and usage frequency, facilitating quick retrieval and access. At the same time, through the storage cabinet system, the inventory level can be monitored more effectively to avoid overstocking or shortages. Therefore, the storage cabinet is not only a simple container for storing items at the industrial site, but also an important tool for improving work efficiency, ensuring production safety, and optimizing material management. With the development of technology, the application of intelligent storage cabinets will further enhance these advantages. Intelligent tool storage cabinets are an innovative warehousing management system integrating Internet of Things, big data, cloud computing, artificial intelligence, automation, and energy conservation and environmental protection technologies. These technical features make them have important application values in multiple industries. However, the function realization of intelligent storage cabinets depends on a stable power energy supply. In actual industrial application scenarios, it is often difficult to provide a stable power energy supply, which greatly reduces the application scenarios of intelligent tool storage cabinets. Therefore, the energy supply system of intelligent storage tool cabinets is further optimized, and solar energy with extremely low acquisition cost and extremely wide distribution is introduced to supply power to the storage tool cabinets, that is, solar storage cabinets, which greatly increases the application scenarios of the tool cabinets.
[0003] Although solar power generation technology solves the power supply problem of intelligent storage tool cabinets in the absence of a stable external power supply. However, since solar energy is an unstable energy source, it is severely affected by factors such as weather, season, and time, and in some cases, it cannot provide any power supply at all. And the operation of intelligent storage tool cabinets requires a stable voltage environment. In the industrial field, the power failure of the tool cabinet may seriously affect the production process, thus causing economic losses. Therefore, evaluating the energy supply capacity of the solar power generation system in advance and thus adjusting the power energy supply plan of the tool cabinet can effectively ensure the stable operation of the tool cabinet in actual applications. Summary of the Invention
[0004] In view of the above technical problems, this application provides a solar storage cabinet energy supply warning method, system, terminal, and storage medium based on the itransformer model, which improves the stability of the operation of solar storage cabinets by predicting the future solar power generation of solar storage cabinets.
[0005] In a first aspect, an embodiment of this application provides a solar storage cabinet energy supply warning method based on the itransformer model, including:
[0006] Obtain a multi-dimensional time series data set within a first time period, where the multi-dimensional time series data set includes an irradiance data set and an environmental feature data set within the first time period;
[0007] Input the multi-dimensional time series data set into a preset solar power generation prediction model, so that after the solar power generation prediction model performs dimension conversion, feature extraction, and data normalization on the multi-dimensional time series data set, irradiance sequence data within a second time period is generated, and then the solar power generation of the solar storage cabinet within the second time period is determined according to the irradiance sequence data;
[0008] Determine whether the solar power generation meets the energy demand of the solar storage cabinet within the second time period. If not, send a warning message to a preset device;
[0009] Among them, the solar power generation prediction model is obtained by training an initial solar power generation prediction model based on a historical multi-dimensional time series data set, and the initial solar power generation prediction model is constructed by an initial itransformer model and a hyperparameter optimization model.
[0010] The embodiment of the present application provides a solar storage cabinet energy supply warning method based on the itransformer model. The preset solar power generation prediction model is used to predict the future solar power generation of the solar storage cabinet in combination with the time series data set of multiple dimensions, and then the solar storage cabinet is supplied with energy according to the predicted power generation, improving the operation stability of the solar storage cabinet. In the embodiment of the present application, considering that the solar power generation sequence prediction task is essentially a more complex time series prediction, the multi-dimensional time series data set within the first time period is obtained during the prediction process for subsequent prediction, which can effectively improve the accuracy of model prediction. In addition, the most important part of the energy supply system is to predict the energy supply capacity of the solar power supply system. Considering that the energy supply capacity of the solar energy supply system is greatly affected by the external conditions of the tool cabinet deployment location, a long-time series prediction method with strong feature extraction ability is required to complete the prediction of solar power supply data. The prediction performance of the itransformer model in the field of time series prediction is significantly better than other prediction models. Therefore, the embodiment of the present application selects the itransformer model to construct the initial solar power generation prediction model to improve the accuracy of model prediction. Further, the embodiment of the present application also combines a hyperparameter optimization model to construct the initial solar power generation prediction model, so that during the training process, the hyperparameters of the itransformer model can be autonomously optimized, improving the efficiency of model training.
[0011] In a possible implementation manner, training the initial solar power generation prediction model based on the historical multi-dimensional time series data set to obtain the solar power generation prediction model includes:
[0012] Obtain the historical multi-dimensional time series data set;
[0013] Input the historical multi-dimensional time series data set into the initial solar power generation prediction model, so that the initial solar power generation prediction model iteratively generates the optimal hyperparameter vector of the initial itransformer model through the hyperparameter optimization model, and then updates the initial itransformer model according to the optimal hyperparameter vector to obtain the first itransformer model;
[0014] Input the historical multi-dimensional time series data set into the first itransformer model, so that the first itransformer model generates the internal parameters of the model according to the historical multi-dimensional time series data set, and then updates the first itransformer model according to the internal parameters of the model to obtain the second itransformer model;
[0015] Use the second itransformer model as the solar power generation prediction model.
[0016] The embodiment of the present application provides a training method for a solar power generation prediction model. Considering that in actual industrial production, the tool cabinet, as an infrastructure, should be easy to maintain and manage, and its operation should not have too high requirements for technical knowledge and capabilities. Therefore, the embodiment of the present application combines the hyperparameter optimization model and the historical multi-dimensional time series data set to realize the automatic tuning of the hyperparameters of the itransformer model. After determining the optimal hyperparameter vector, input the historical multi-dimensional time series data set into the itransformer model again to further train and obtain the internal parameters of the itransformer model, and complete the training of the solar power generation prediction model. By adopting a two-stage and automated model training method, the embodiment of the present application not only improves the efficiency of model training but also improves the prediction accuracy of the model.
[0017] Further, the hyperparameter optimization model is a Dingo optimization algorithm model.
[0018] In the embodiments of the present application, the hyperparameter optimization model is further defined as the Dingo optimization algorithm model. The Dingo algorithm is an optimization algorithm. Its framework is similar to that of the Grey Wolf algorithm, and their position update methods and optimal solution search methods are basically the same. However, the Grey Wolf algorithm does not have a greedy mechanism, so its convergence speed is relatively slow. The Dingo algorithm combines the Grey Wolf algorithm with the genetic algorithm, adds an optimization mechanism to improve the convergence speed of the algorithm, and at the same time, in order to maintain the search ability of the original algorithm, avoid falling into the local optimal solution, and ensure the hyperparameter optimization effect of the model.
[0019] In a possible implementation manner, the solar power generation prediction model includes an embedding layer, a feature extraction layer, a normalization layer, and a linear neural network; after performing dimension conversion, feature extraction, and data normalization on the multi-dimensional time series data set, the solar power generation prediction model generates irradiance sequence data within a second time period, including:
[0020] Input the multi-dimensional time series data set into the embedding layer, so that the embedding layer maps the time series data of each dimension in the multi-dimensional time series data set to different feature channels respectively, and obtains feature vectors of several different feature channels;
[0021] Input each of the feature vectors into the feature extraction layer, so that the feature extraction layer fuses each feature vector into a mixed channel based on the multi-head self-attention mechanism, and obtains a feature fusion vector;
[0022] Input the fused feature vector into the normalization layer, so that the normalization layer performs normalization processing on each data in the feature fusion vector to generate single-dimensional time series data;
[0023] Input the single-dimensional time series data into the linear neural network, so that the linear neural network generates corresponding irradiance sequence data.
[0024] In the embodiment of the present application, the solar power generation prediction model generates the irradiance sequence data within the second time period after performing dimensionality conversion, feature extraction, and data normalization on the input data. Specifically, since the input data is a mixed data of multiple dimensions, it is first necessary to perform data mapping on it to map the data of different dimensions to different feature channels, which can ensure the independence of each feature channel during model input and avoid interference between different features. After passing through the embedding layer, the channels of each feature vector are still independent. And the subsequent linear network has a much better prediction effect on the single-dimensional sequence than the multi-dimensional sequence. Therefore, it is necessary to fuse each independent channel into a mixed channel through the multi-head self-attention mechanism to achieve feature extraction and fusion of each feature vector and obtain the fused feature vector. Finally, the data is normalized to eliminate the possible magnitude differences during the calculation process, and the normalized data is input into the linear neural network to generate the final irradiance sequence data, realizing the future irradiance prediction based on the multi-dimensional time series dataset, and providing a judgment basis for the subsequent energy supply warning of the solar storage cabinet.
[0025] Further, the linear neural network is an LSTM network, including an RNN network, a forgetting gate, and an output gate.
[0026] In the embodiment of the present application, the LSTM network is used as the linear neural network, while the prior art usually uses a recurrent neural network to implement this step. The recurrent neural network transmits feature information between different time steps through the links between hidden layers, so as to realize the memory of features between different time steps. However, transmitting information between time steps without selection is likely to cause the accumulation of irrelevant information, thereby increasing the proportion of noise in the feature information and causing the gradient explosion or gradient disappearance phenomenon of the model, seriously affecting the stability and prediction accuracy of the model. The LSTM network adds a forgetting gate, an update gate, and an output gate on the basis of the RNN network to make a certain selection of the information transmission between hidden layers, thereby reducing the possibility of the accumulation of irrelevant feature information, alleviating the problems of unstable prediction and low accuracy of the RNN network to a certain extent, and can better complete the prediction tasks related to time series. Therefore, the embodiment of the present application selects the LSTM network as the linear prediction model.
[0027] In a possible implementation manner, the irradiance dataset includes the solar altitude angle, the global horizontal irradiance, and the diffuse irradiance, and the environmental feature dataset includes the dry bulb temperature, the humidity, and the zenith luminance.
[0028] Further, the irradiance sequence data within the second time period is the global horizontal irradiance sequence data within the second time period.
[0029] Second aspect, correspondingly, an energy supply warning system for a solar storage cabinet based on the itransformer model provided by an embodiment of the present application includes an acquisition module, a prediction module, and a judgment module;
[0030] The acquisition module is configured to acquire a multi-dimensional time series data set within a first time period, and the multi-dimensional time series data set includes an irradiance data set and an environmental feature data set within the first time period;
[0031] The prediction module is configured to input the multi-dimensional time series data set into a preset solar power generation prediction model, so that after the solar power generation prediction model performs dimension conversion, feature extraction, and data normalization on the multi-dimensional time series data set, irradiance sequence data within a second time period is generated, and then the solar power generation of the solar storage cabinet within the second time period is determined according to the irradiance sequence data;
[0032] The judgment module is configured to judge whether the solar power generation meets the energy requirement of the solar storage cabinet within the second time period. If not, a warning message is sent to a preset device;
[0033] The solar power generation prediction model is obtained by training an initial solar power generation prediction model based on a historical multi-dimensional time series data set, and the initial solar power generation prediction model is constructed by an initial itransformer model and a hyperparameter optimization model.
[0034] Third aspect, an embodiment of the present application provides a terminal, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, any one of the energy supply warning methods for a solar storage cabinet based on the itransformer model described in the embodiments of the present application is implemented.
[0035] Fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which includes a stored computer program. When the computer program runs, the device where the computer-readable storage medium is located is controlled to execute any one of the energy supply warning methods for a solar storage cabinet based on the itransformer model described in the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a schematic flowchart of an energy supply warning method for a solar storage cabinet based on the itransformer model provided by an embodiment of the present application.
[0037] Figure 2Schematic diagram of the structure of the initial solar power generation prediction model in a solar energy storage cabinet energy supply warning method based on the itransformer model provided by an embodiment of the present application.
[0038] Figure 3 Schematic diagram of the process of the Dingo algorithm in a solar energy storage cabinet energy supply warning method based on the itransformer model provided by an embodiment of the present application.
[0039] Figure 4 Schematic diagram of the pseudocode of the Dingo algorithm in a solar energy storage cabinet energy supply warning method based on the itransformer model provided by an embodiment of the present application.
[0040] Figure 5 Schematic diagram of the structure of a solar energy storage cabinet energy supply warning system based on the itransformer model provided by an embodiment of the present application. Detailed implementation manners
[0041] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts belong to the scope of protection of the present application.
[0042] It should be noted that the step numbers in the text are only for the convenience of explaining specific embodiments and do not serve as a limitation on the execution order of the steps. In the description of the present application, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features.
[0043] Throughout the specification, the itransformer model described in this specification is a time series prediction network proposed by researchers such as Yong Liu in 2024. Currently, in the field of time series prediction, the prediction performance of this model is significantly better than other prediction models. The itransformer model is obtained by improving on the basis of the transformer network. The transformer network is more inclined to handle natural language problems in its design. The role of its embedding layer is to map words in natural language to a high-dimensional word vector according to the word meaning. The word vector contains the semantic features and position features of the words in the original sentence. However, in the irradiance sequence, the change characteristics of irradiance are mainly determined by environmental factors, and the influence of environmental factors has a high degree of uncertainty. It is difficult to find sequence segments with independent features like the "words" in natural language in the irradiance sequence. Therefore, the transformer network may have problems with poor feature extraction ability when processing time series data, affecting the final prediction accuracy. Therefore, the itransformer model inverses the structure of the transformer network, uses a linear network to predict time series, and uses the Attention mechanism to extract features from multi-dimensional inputs and perform channel fusion.
[0044] Embodiment 1:
[0045] As Figure 1 shown, Embodiment 1 provides a solar storage cabinet energy supply warning method based on the itransformer model, including steps S1 - S3:
[0046] Step S1, obtain a multi-dimensional time series data set within a first time period, where the multi-dimensional time series data set includes an irradiance data set and an environmental feature data set within the first time period;
[0047] Step S2, input the multi-dimensional time series data set into a preset solar power generation prediction model, so that after the solar power generation prediction model performs dimension conversion, feature extraction, and data normalization on the multi-dimensional time series data set, generate irradiance sequence data within a second time period, and then determine the solar power generation of the solar storage cabinet within the second time period according to the irradiance sequence data;
[0048] Step S3, judge whether the solar power generation meets the energy demand of the solar storage cabinet within the second time period. If not, send a warning message to a preset device;
[0049] Among them, the solar power generation prediction model is obtained by training an initial solar power generation prediction model based on a historical multi-dimensional time series data set, and the initial solar power generation prediction model is constructed by an initial itransformer model and a hyperparameter optimization model.
[0050] The embodiment of the present application provides a solar energy storage cabinet energy supply warning method based on an itransformer model. The preset solar power generation prediction model is used to combine time series data sets in multiple dimensions to predict the future solar power generation of the solar energy storage cabinet, and then the solar energy storage cabinet is supplied with energy according to the predicted power generation, improving the operation stability of the solar energy storage cabinet. In the embodiment of the present application, considering that the solar power generation sequence prediction task is essentially a more complex time series prediction, a multi-dimensional time series data set within a first time period is obtained during the prediction process for subsequent prediction, which can effectively improve the accuracy of model prediction. In addition, the most important part of the energy supply system is to predict the energy supply capacity of the solar power supply system. Considering that the energy supply capacity of the solar energy supply system is greatly affected by the external conditions of the tool cabinet deployment location, a long-time series prediction method with strong feature extraction ability is required to complete the prediction of solar power supply data. The prediction performance of the itransformer model in the time series prediction field is significantly better than that of other prediction models. Therefore, the embodiment of the present application selects the itransformer model to construct the initial solar power generation prediction model to improve the accuracy of model prediction. Further, the embodiment of the present application also combines a hyperparameter optimization model to construct the initial solar power generation prediction model, enabling the hyperparameters of the itransformer model to be autonomously optimized during the training process, improving the efficiency of model training.
[0051] Before the itransformer model runs, the hyperparameters of the model need to be selected. Generally speaking, the selection of hyperparameters requires the model deployer to have certain research experience and exhaustively search for possible optimal hyperparameters based on past situations. However, in the embodiment of the present application, the application of the tool cabinet should be conducive to maintenance and management. Therefore, the embodiment of the present application sets up a hyperparameter optimization model to autonomously optimize the hyperparameters of the itransformer model, enabling the full-autonomous operation of model training.
[0052] In a possible implementation manner, training the initial solar power generation prediction model based on the historical multi-dimensional time series data set to obtain the solar power generation prediction model includes:
[0053] Obtain a historical multi-dimensional time series data set;
[0054] Input the historical multi-dimensional time series dataset into the initial solar power generation prediction model, so that the initial solar power generation prediction model iteratively generates the optimal hyperparameter vector of the initial iTransformer model through the hyperparameter optimization model, and then updates the initial iTransformer model according to the optimal hyperparameter vector to obtain the first iTransformer model;
[0055] Input the historical multi-dimensional time series dataset into the first iTransformer model, so that the first iTransformer model generates internal model parameters according to the historical multi-dimensional time series dataset, and then updates the first iTransformer model according to the internal model parameters to obtain the second iTransformer model;
[0056] Use the second iTransformer model as the solar power generation prediction model.
[0057] The embodiment of the present application provides a training method for a solar power generation prediction model. Considering that in industrial production practice, tool cabinets, as infrastructure, should be easy to maintain and manage, and their operations should not have overly high requirements for technical knowledge and capabilities. Therefore, the embodiment of the present application combines a hyperparameter optimization model and a historical multi-dimensional time series dataset to achieve automatic tuning of the hyperparameters of the iTransformer model. After determining the optimal hyperparameter vector, the historical multi-dimensional time series dataset is input into the iTransformer model again to further train and obtain the internal model parameters of the iTransformer model, completing the training of the solar power generation prediction model. The embodiment of the present application adopts a two-stage and automated model training method, which not only improves the efficiency of model training but also improves the prediction accuracy of the model.
[0058] Further, the hyperparameter optimization model is a Dingo optimization algorithm model.
[0059] In the embodiment of the present application, it is further defined that the hyperparameter optimization model is a Dingo optimization algorithm model. The Dingo algorithm is an optimization algorithm. Its framework is similar to that of the Grey Wolf algorithm, and their position update methods and optimal solution search methods are basically the same. However, the Grey Wolf algorithm does not have a greedy mechanism, so its convergence speed is slow. The Dingo algorithm combines the Grey Wolf algorithm with the Genetic algorithm, adds a selection mechanism to improve the convergence speed of the algorithm, and at the same time, in order to maintain the search ability of the original algorithm and avoid falling into local optimal solutions, it ensures the hyperparameter optimization effect of the model.
[0060] In a preferred embodiment, the initial solar power generation prediction model constructed by the initial itransformer model and the Dingo optimization algorithm model is as Figure 2 shown. Figure 2 The left structure is the basic structure of the itransformer model. Embedding is the embedding layer of the model, and its function is to convert the input time series into vectors that can be processed by the subsequent model. This model can be divided into three parts: the embedding layer, the feature extraction layer, and the regression layer. Among them, the feature extraction layer is the core part for realizing irradiance prediction, and it can be further divided into feature extraction between multi-dimensional sequences and prediction of single-dimensional irradiance sequences. After the input data is imported into the model, first, the embedding layer needs to convert the original data sequence into a high-dimensional vector group that can be processed by the model. The embedding layer of the itransformer model takes a complete feature sequence as the mapped vector, which can ensure the channel independence of each feature when the model is input and avoid interference between different features. Its mathematical expression can be represented by Equation 1 and Equation 2
[0061] X(n,:)=Transpose(X(:,n)) (1)
[0062] G P =Embedding(X(n,∶)) (2)
[0063] Where X is the n-dimensional input sequence, and G P is the high-dimensional vector after embedding.
[0064] Multi-head Self-attention is the multi-head self-attention mechanism layer, which is responsible for extracting the correlation associations between different features and fusing the environmental feature vectors and the target feature vectors according to the correlation. Its principle can be represented by Equation 3. After passing through the embedding layer, the channels of each feature vector are still independent, and the subsequent linear network has a much better prediction effect on single-dimensional sequences than on multi-dimensional sequences. Therefore, it is necessary to fuse the independent channels into a mixed channel through the multi-head attention layer. This part of the process can be completed by the mathematical expression 3. The Add&Norm layer is the normalization layer, and together with the FeedForward layer, they complete the channel fusion task between vectors and normalize the data at the same time to eliminate the magnitude differences that may occur during the calculation process. Its principle can be represented by Equation 4.
[0065]
[0066] X=X norm ×δ+μ (4)
[0067] Where X normrepresents the normalized value, δ represents the standard deviation of the original data, μ represents the mean of the original data, Attention represents the calculation formula of the attention value, Q, K, V respectively represent the matrices decomposed from the three input data sets of Q, K, V, and d k is an empirical value that roughly normalizes the variance of the dot product result to 1, enabling the softmax function to remain sensitive.
[0068] After completing the feature channel fusion, the input vector is transformed into a one-dimensional time series, which is input into the LSTM network. The LSTM network is a classic linear neural network model improved based on the RNN network. Finally, the one-dimensional prediction data of the target sequence is obtained through the linear network, and this part of the data can be directly applied to the power planning and allocation of the tool cabinet.
[0069] Figure 2 The right structure is the basic structure of the Dingo optimization algorithm model. The structure block diagram of the Dingo optimization algorithm model is as Figure 3 shown, and its running pseudo-code is as Figure 4 shown. Specifically, the Dingo algorithm first randomly divides the initial population into three groups through two random values rand1 and rand2, and the three groups perform three different position update behaviors, including the siege behavior, the pursuit behavior, and the scavenging behavior. Among them, the siege behavior searches near the current global optimal position, and the position update formula for this part has a high similarity with the gray wolf algorithm. It can be expressed by Equation 5. The pursuit behavior also searches near the optimal solution, but the difference between it and the siege behavior is that the position update of the siege behavior is related to all the population individuals participating in this behavior. Therefore, the position changes of all the population points participating in this behavior have similar rules. However, the position change of the points participating in the pursuit behavior is only related to the optimal solution of the previous iteration and the position of a random individual in the entire population, which provides a certain degree of randomness for the position update, thereby reducing the probability of falling into the local optimal solution. Its position update can be expressed by Equation 6. The position update of the scavenging behavior has nothing to do with the optimal solution. It searches between the original position and any random position, which can further improve the randomness of the position update, enhance the search ability of the model, and reduce the probability of falling into the local optimal solution. Mathematically, it can be expressed by Equation 7, and the specific formula is as follows:
[0070]
[0071] Among them, represents the position of the search point at time t + 1, na is the number of search points performing the siege behavior, β i , β1, are random integers in [2, N / 2], x r1Let \(x_i\) be a random individual in the search point population, and \(\beta_2\) be a random number between \([-1, 1]\).
[0072] After the position update, through fitness screening, the positions of points below the specified fitness will be updated. Through such a greedy mechanism, the convergence speed of the model can be improved. The main operation process of the Dingo model can be described as follows: when the model runs, first, an appropriate number of initial populations will be randomly selected, and this number is generally 50. Then, through two random numbers, the population is divided into three parts, and these three parts respectively perform the above three behaviors, which can ensure that the search points will not fall into local optimal solutions. After completing one position update iteration, the search points approaching convergence are screened through the fitness mechanism, and the search points approaching divergence are eliminated, so that the entire model tends to converge. Repeating the search process can complete the search for the optimal value.
[0073] When optimizing the hyperparameters of the model, the complexity of the model should be considered. The iTransformer model used in the embodiments of this application is more complex than the traditional linear neural network, and the model operation efficiency itself is relatively low. Therefore, it is more suitable for the Dingo optimization algorithm with a fast convergence speed. The work completed by the Dingo optimization algorithm can be expressed by Equations 8 to 11.
[0074] \(n_{heads0}=a, d_{model0}=b, batch\_size0=c\) (8)
[0075] \(X0=(a, b, c)\) (9)
[0076] \(X1 = DOX(X0)\) (10)
[0077] X i \(= DOX(X\) i-1 ) (11)
[0078] Among them, \(n_{heads0}\), \(d_{model0}\), and \(batch\_size0\) are the three initial hyperparameter values in the itransformer model, \(DOX\) is the overall Dingo algorithm model, and \(X\) is the input hyperparameter vector.
[0079] In a possible implementation manner, in step S2, the solar power generation prediction model includes an embedding layer, a feature extraction layer, a normalization layer, and a linear neural network; after the solar power generation prediction model performs dimension conversion, feature extraction, and data normalization on the multi-dimensional time series data set, it generates irradiance sequence data within the second time period, including:
[0080] Input the multi-dimensional time series dataset into the embedding layer, so that the embedding layer maps the time series data of each dimension in the multi-dimensional time series dataset to different feature channels respectively, and obtains feature vectors of several different feature channels;
[0081] Input each of the feature vectors into the feature extraction layer, so that the feature extraction layer fuses each feature vector into a mixed channel based on the multi-head self-attention mechanism, and obtains a feature fusion vector;
[0082] Input the fusion feature vector into the normalization layer, so that the normalization layer normalizes each data in the feature fusion vector to generate one-dimensional time series data;
[0083] Input the one-dimensional time series data into the linear neural network, so that the linear neural network generates corresponding irradiance sequence data.
[0084] In the embodiment of the present application, the solar power generation prediction model generates irradiance sequence data within a second time period by performing dimension conversion, feature extraction, and data normalization on the input data. Specifically, since the input data is mixed data of multiple dimensions, it is first necessary to perform data mapping on it, mapping data of different dimensions to different feature channels, which can ensure the independence of each feature channel when the model is input and avoid interference between different features. After passing through the embedding layer, the channels of each feature vector are still independent, and the subsequent linear network has a much better prediction effect on one-dimensional sequences than on multi-dimensional sequences. Therefore, it is necessary to fuse each independent channel into a mixed channel through the multi-head self-attention mechanism to achieve feature extraction and fusion of each feature vector and obtain a fusion feature vector. Finally, the data is normalized to eliminate the possible magnitude differences in the calculation process, and the normalized data is input into the linear neural network to generate the final irradiance sequence data, realizing the prediction of future irradiance based on the multi-dimensional time series dataset, and providing a judgment basis for the subsequent energy supply warning of the solar storage cabinet.
[0085] Further, the linear neural network is an LSTM network, including an RNN network, a forgetting gate, and an output gate.
[0086] In the embodiments of the present application, an LSTM network is used as the linear neural network, while the prior art usually uses a recurrent neural network to implement this step. The recurrent neural network transfers feature information between different time steps through the links between hidden layers, so as to realize the memory of features between different time steps. However, transmitting information between time steps without selection easily causes the accumulation of irrelevant information, thereby increasing the proportion of noise in the feature information and causing the phenomena of gradient explosion or gradient disappearance in the model, seriously affecting the stability and prediction accuracy of the model. The LSTM network adds a forget gate, an update gate, and an output gate on the basis of the RNN network, making certain selections for the information transmission between hidden layers, thereby reducing the possibility of the accumulation of irrelevant feature information, alleviating the problems of unstable prediction and low accuracy of the RNN network to a certain extent, and being able to better complete prediction tasks related to time series. Therefore, the embodiments of the present application select the LSTM network as the linear prediction model.
[0087] In a possible implementation manner, the irradiance data set includes the solar altitude angle, the global horizontal irradiance, and the diffuse irradiance, and the environmental feature data set includes the dry bulb temperature, the humidity, and the zenith brightness.
[0088] Further, the irradiance sequence data in the second time period is the global horizontal irradiance sequence data in the second time period.
[0089] In a preferred embodiment, the specific implementation process of the solar energy storage cabinet energy supply warning method based on the itransformer model may include the following steps:
[0090] (1) Place the solar energy storage cabinet at the pre-deployment location and run it for 24 hours, measure and record the irradiance data and environmental data during the process according to time, and construct a historical multi-dimensional time series data set. Among them, the data that needs to be obtained includes the solar altitude angle, the global horizontal irradiance, the diffuse irradiance, the dry bulb temperature, the humidity, and the zenith brightness;
[0091] (2) Write the hyperparameter optimization algorithm based on the Dingo algorithm into the itransformer model, import the historical multi-dimensional time series data set for training. Among them, in the historical multi-dimensional time series data set, the global horizontal irradiance is used as the prediction target sequence, and the remaining solar altitude angle, diffuse irradiance, dry bulb temperature, humidity, and zenith brightness are used as the environmental feature sequences. The optimal hyperparameter vector is obtained through model iteration, and the hyperparameters are written into the itransformer model. The itransformer model with updated hyperparameters is used to train the historical multi-dimensional time series data set to further obtain the internal parameters of the itransformer model, and the solar power generation prediction model is obtained.
[0092] (3) Deploy the solar power generation prediction model to the solar storage cabinet, and predict the power generation for the next 8 hours based on the multi-dimensional time series data set of the current time period. Determine whether the solar storage cabinet can operate stably in the current environment based on the prediction results. If it can operate stably, maintain the original energy supply mode. If the power generation is insufficient to maintain stable operation, send a warning to the administrator through the networking system in the solar storage cabinet. Request to change the current operation mode or supplement external power supply.
[0093] In addition, the solar power generation prediction model adopted is multi-step prediction, and the prediction step length, that is, the prediction interval, is a hyperparameter that can be set. The shorter the step length, the greater the computational amount and the more accurate the result. In the embodiment of the present application, it is set to 1 minute according to experience, which is a relatively reasonable step length in general irradiance prediction. Regarding the historical multi-dimensional time series data set, the embodiment of the present application has collected 24-hour historical data to ensure that the model can extract the most basic irradiance change rules. If the model needs to always maintain accurate prediction, a data volume of at least 6 months to 1 year may be required.
[0094] Embodiment 2:
[0095] As Figure 5 shown, Embodiment 2 provides a solar storage cabinet energy supply warning system based on the itransformer model, including an acquisition module 10, a prediction module 20, and a judgment module 30;
[0096] Among them, the acquisition module 10 is used to acquire a multi-dimensional time series data set within a first time period, and the multi-dimensional time series data set includes an irradiance data set and an environmental feature data set within the first time period;
[0097] The prediction module 20 is used to input the multi-dimensional time series data set into a preset solar power generation prediction model, so that after the solar power generation prediction model performs dimension conversion, feature extraction, and data normalization on the multi-dimensional time series data set, it generates irradiance sequence data within a second time period, and then determines the solar power generation of the solar storage cabinet within the second time period according to the irradiance sequence data;
[0098] The judgment module 30 is used to judge whether the solar power generation meets the energy demand of the solar storage cabinet within the second time period. If not, it sends a warning message to a preset device;
[0099] Among them, the solar power generation prediction model is obtained by training an initial solar power generation prediction model based on a historical multi-dimensional time series data set, and the initial solar power generation prediction model is constructed by an initial itransformer model and a hyperparameter optimization model.
[0100] In a possible implementation manner, training the initial solar power generation prediction model based on the historical multi-dimensional time series data set to obtain the solar power generation prediction model includes:
[0101] Obtain a historical multi-dimensional time series data set;
[0102] Input the historical multi-dimensional time series data set into the initial solar power generation prediction model, so that the initial solar power generation prediction model iteratively generates the optimal hyperparameter vector of the initial itransformer model through the hyperparameter optimization model, and then updates the initial itransformer model according to the optimal hyperparameter vector to obtain the first itransformer model;
[0103] Input the historical multi-dimensional time series data set into the first itransformer model, so that the first itransformer model generates internal model parameters according to the historical multi-dimensional time series data set, and then updates the first itransformer model according to the internal model parameters to obtain the second itransformer model;
[0104] Use the second itransformer model as the solar power generation prediction model.
[0105] Furthermore, the hyperparameter optimization model is a Dingo optimization algorithm model.
[0106] In a possible implementation manner, the solar power generation prediction model includes an embedding layer, a feature extraction layer, a normalization layer, and a linear neural network; after the solar power generation prediction model performs dimension conversion, feature extraction, and data normalization on the multi-dimensional time series data set, it generates irradiance sequence data within a second time period, including:
[0107] Input the multi-dimensional time series data set into the embedding layer, so that the embedding layer maps the time series data of each dimension in the multi-dimensional time series data set to different feature channels respectively to obtain feature vectors of several different feature channels;
[0108] Input each of the feature vectors into the feature extraction layer, so that the feature extraction layer fuses each feature vector into a mixed channel based on the multi-head self-attention mechanism to obtain a feature fusion vector;
[0109] Input the fused feature vector into the normalization layer, so that the normalization layer performs normalization processing on each data in the feature fusion vector to generate single-dimensional time series data;
[0110] Input the one-dimensional time series data into the linear neural network so that the linear neural network generates corresponding irradiance sequence data.
[0111] Further, the linear neural network is an LSTM network, including an RNN network, a forgetting gate, and an output gate.
[0112] In a possible implementation manner, the irradiance data set includes the solar altitude angle, the global horizontal irradiance, and the diffuse irradiance, and the environmental feature data set includes the dry bulb temperature, the humidity, and the zenith brightness.
[0113] Further, the irradiance sequence data in the second time period is the global horizontal irradiance sequence data in the second time period.
[0114] The embodiment of the present application provides a solar energy storage cabinet energy supply warning system based on the itransformer model, which uses a preset solar power generation prediction model to combine time series data sets in multiple dimensions to predict the future solar power generation of the solar energy storage cabinet, and then supplies energy to the solar energy storage cabinet according to the predicted power generation, improving the operation stability of the solar energy storage cabinet. In the embodiment of the present application, considering that the solar power generation sequence prediction task is essentially a more complex time series prediction, therefore, in the prediction process, the embodiment of the present application obtains a multi-dimensional time series data set in the first time period for subsequent prediction, which can effectively improve the accuracy of model prediction. In addition, the most important part of the energy supply system is to predict the energy supply capacity of the solar power supply system. Considering that the energy supply capacity of the solar energy supply system is greatly affected by the external conditions of the tool cabinet deployment location, a long-time series prediction method with strong feature extraction ability is required to complete the prediction of solar power supply data. And the prediction performance of the itransformer model in the field of time series prediction is significantly better than other prediction models. Therefore, the embodiment of the present application selects the itransformer model to construct the initial solar power generation prediction model to improve the accuracy of model prediction. Further, the embodiment of the present application also combines a hyperparameter optimization model to construct the initial solar power generation prediction model, so that during the training process, the hyperparameters of the itransformer model can be autonomously optimized, improving the efficiency of model training.
[0115] The more detailed working principle and step flow of this embodiment can but are not limited to refer to the relevant records of Embodiment 1.
[0116] Embodiment 3:
[0117] Embodiment 3 provides a terminal, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements any one of the solar energy storage cabinet power supply warning methods based on the itransformer model as described in the embodiments of the present application.
[0118] The so-called processor may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The processor is the control center of the terminal, connecting various parts of the entire terminal through various interfaces and lines.
[0119] The memory can be used to store the computer program. The processor realizes various functions of the terminal by running or executing the computer program stored in the memory and calling the data stored in the memory. The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, phone book, etc.), etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, SmartMedia Card (SMC), Secure Digital (SD) card, Flash Card, at least one magnetic disk storage device, flash device, or other volatile solid-state storage devices.
[0120] Embodiment 4:
[0121] Embodiment 4 provides a computer-readable storage medium, which includes a stored computer program. When the computer program runs, it controls the device where the computer-readable storage medium is located to execute any one of the solar energy storage cabinet power supply warning methods based on the itransformer model as described in the embodiments of the present application.
[0122] Among them, if the modules integrated in the solar storage cabinet energy supply warning method based on the itransformer model are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-mentioned embodiment methods of the present invention, it can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0123] The specific embodiments described above further elaborate on the purpose, technical solutions, and beneficial effects of this application. It should be understood that the above description is only for the specific embodiments of this application and is not used to limit the protection scope of this application. In particular, it is pointed out that for those skilled in the art, any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of this application should be included in the protection scope of this application.
Claims
1. A solar storage cabinet energy supply early warning method based on the itransformer model, characterized in that: include: Acquire a multidimensional time series data set within a first time period, wherein the multidimensional time series data set includes an irradiance data set and an environmental characteristic data set within the first time period; Inputting the multidimensional time series data set into a preset solar power generation prediction model, so that the solar power generation prediction model generates irradiance sequence data in a second time period after performing dimension conversion, feature extraction and data normalization on the multidimensional time series data set, and then determining the solar power generation of the solar storage cabinet in the second time period according to the irradiance sequence data; Determine whether the solar power generation meets the energy demand of the solar storage cabinet in the second time period, and if not, send a warning message to a preset device; The solar power generation prediction model is obtained by training the initial solar power generation prediction model based on the historical multidimensional time series data set, and the initial solar power generation prediction model is constructed by the initial itransformer model and the hyperparameter optimization model.
2. A solar storage cabinet energy supply early warning method based on the itransformer model as claimed in claim 1, characterized in that: The step of training the initial solar power generation prediction model based on the historical multi-dimensional time series data set to obtain the solar power generation prediction model includes: Get historical multidimensional time series datasets; Inputting the historical multidimensional time series data set into the initial solar power generation prediction model, so that the initial solar power generation prediction model generates an optimal hyperparameter vector of the initial itransformer model through a hyperparameter optimization model iteration, and then updating the initial itransformer model according to the optimal hyperparameter vector to obtain a first itransformer model; Inputting the historical multidimensional time series data set into the first itransformer model, so that the first itransformer model generates model internal parameters according to the historical multidimensional time series data set, and then updating the first itransformer model according to the model internal parameters to obtain a second itransformer model; The second itransformer model is used as the solar power generation prediction model.
3. A solar storage cabinet energy supply early warning method based on the itransformer model as claimed in claim 2, characterized in that: The hyperparameter optimization model is a Dingo optimization algorithm model.
4. The solar storage cabinet energy supply early warning method based on the itransformer model as claimed in claim 1, characterized in that: The solar power generation prediction model includes an embedding layer, a feature extraction layer, a normalization layer and a linear neural network; the solar power generation prediction model performs dimension conversion, feature extraction and data normalization on the multidimensional time series data set to generate irradiance sequence data in the second time period, including: Inputting the multidimensional time series data set into the embedding layer, so that the embedding layer maps the time series data of each dimension in the multidimensional time series data set to different feature channels respectively, and obtains feature vectors of several different feature channels; Inputting each of the feature vectors into the feature extraction layer, so that the feature extraction layer fuses each of the feature vectors into a mixed channel based on a multi-head self-attention mechanism to obtain a feature fusion vector; Inputting the fused feature vector to the normalization layer, so that the normalization layer performs normalization processing on each data in the feature fusion vector to generate single-dimensional time series data; The one-dimensional time series data is input into the linear neural network so that the linear neural network generates corresponding irradiance series data.
5. A solar storage cabinet energy supply early warning method based on the itransformer model as claimed in claim 4, characterized in that: The linear neural network is an LSTM network, including an RNN network, a forget gate and an output gate.
6. A solar storage cabinet energy supply early warning method based on the itransformer model as described in any one of claims 1 to 5, characterized in that: The irradiance data set includes solar altitude angle, global horizontal irradiance and diffuse irradiance, and the environmental characteristic data set includes dry-bulb temperature, humidity and zenith brightness.
7. A solar storage cabinet energy supply early warning method based on the itransformer model as claimed in claim 6, characterized in that: The irradiance sequence data in the second time period is the global horizontal irradiance sequence data in the second time period.
8. A solar storage cabinet energy supply warning system based on the itransformer model, characterized in that: It includes an acquisition module, a prediction module and a judgment module; The acquisition module is used to acquire a multidimensional time series data set within a first time period, and the multidimensional time series data set includes an irradiance data set and an environmental characteristic data set within the first time period; The prediction module is used to input the multidimensional time series data set into a preset solar power generation prediction model, so that the solar power generation prediction model performs dimension conversion, feature extraction and data normalization on the multidimensional time series data set, and then generates irradiance sequence data in a second time period, and then determines the solar power generation of the solar storage cabinet in the second time period according to the irradiance sequence data; The judgment module is used to judge whether the solar power generation meets the energy demand of the solar storage cabinet in the second time period, and if not, send a warning message to a preset device; The solar power generation prediction model is obtained by training the initial solar power generation prediction model based on the historical multidimensional time series data set, and the initial solar power generation prediction model is constructed by the initial itransformer model and the hyperparameter optimization model.
9. A terminal, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a solar storage cabinet energy supply warning method based on the itransformer model as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute a solar storage cabinet energy supply warning method based on an itransformer model as described in any one of claims 1 to 7.