Museum storehouse electric power system adjusting method based on sparrow algorithm

Optimizing the power adjustment model through the sparrow search algorithm, the efficiency and accuracy of the power system regulation in the museum warehouse are solved, and stable control of multivariable and strongly coupled systems is achieved.

CN120545972AInactive Publication Date: 2025-08-26JIANGSU SCI DREAM EXHIBITION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510622996.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-15
Publication Date
2025-08-26
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing museum warehouse power system regulation method is difficult to achieve efficient and accurate power regulation, especially when facing multivariable and strongly coupled systems, traditional PID control and model prediction control are insufficient.

Method used

The sparrow search algorithm is used to optimize the hyperparameters of the deep learning system, establish a power adjustment model, output the optimal network parameters through data preprocessing and fitness value updates, and perform power system adjustment.

Benefits of technology

It improves the efficiency and accuracy of power regulation, can quickly respond to environmental changes and equipment failures, and ensures the stability of the storage environment of the collection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120545972A_ABST
    Figure CN120545972A_ABST
Patent Text Reader

Abstract

The invention discloses a method for adjusting a museum storehouse electric power system based on a sparrow algorithm, and relates to the technical field of electric power regulation and control. The method comprises the following steps: collecting data generated in a working process of a museum storehouse electric power system; after data features are extracted, the data features are divided into a training set and a test set; optimizing the sparrow algorithm, calculating a fitness value to update a global optimal solution, and outputting an optimal network hyper-parameter; obtaining a sparrow position parameter corresponding to the optimal fitness value, establishing a power regulation model, and training the power regulation model; and the power regulation model outputs a power system regulation result. According to the method, the optimal hyper-parameter required by the deep learning system is given through the sparrow search algorithm, the power regulation model is finally obtained, the regulation result is output by using the power regulation model, and the efficiency and accuracy of power regulation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of power regulation, and in particular relates to a museum storehouse power system regulation method based on a sparrow algorithm. Background Art

[0002] Stable operation is crucial. Warehouse electricity not only ensures lighting needs but, more importantly, maintains the proper functioning of various environmental control devices, such as temperature and humidity regulators and air purification systems. These devices play a crucial role in creating and maintaining a microenvironment suitable for the preservation of collections. Appropriate temperature and humidity conditions can effectively slow the aging and corrosion of collections, while stable air quality prevents the erosion of collections by harmful gases and particulate matter.

[0003] Currently, the main methods for regulating museum warehouse power systems include traditional PID control and model-predictive control (MPC). However, traditional PID control relies on precise system model parameters. Complex warehouse power systems are subject to numerous uncertainties, such as equipment aging and environmental changes. This makes PID control difficult to adapt to these dynamic changes, resulting in poor regulation. While model-predictive control can predict future states and optimize control, the model establishment process is complex, computationally intensive, and requires extremely high prediction accuracy. Any prediction deviations can significantly reduce control effectiveness.

[0004] Furthermore, as museums expand and their collections grow, the size and complexity of their power systems continue to increase. Traditional regulation methods struggle to achieve efficient and precise regulation in multivariable, tightly coupled systems. Therefore, developing a more intelligent, adaptive, and efficient regulation method for museum power systems is imperative. This is precisely the context in which the museum power system regulation method based on the Sparrow Algorithm has emerged. Summary of the Invention

[0005] The purpose of the present invention is to provide a museum warehouse power system regulation method based on the sparrow search algorithm. The optimal hyperparameters required by the deep learning system are given through the sparrow search algorithm, and finally a power regulation model is obtained. The power regulation model is used to output the regulation results, which solves the problem that the existing power regulation methods are difficult to achieve efficient and accurate power regulation.

[0006] To solve the above technical problems, the present invention is achieved through the following technical solutions: The present invention is a museum storehouse power system regulation method based on the sparrow algorithm, comprising the following steps: Step S1: collecting data generated by the museum storeroom power system during operation; Step S2: pre-process the collected data, extract data features and divide the data features into training set and test set; Step S3: Optimize the sparrow algorithm, calculate the fitness value to update the global optimal solution, and output the optimal network hyperparameters; Step S4: Obtain the sparrow position parameters corresponding to the optimal fitness value; Step S5: Obtain the corresponding number of iterations, learning rate, and number of hidden layer nodes from the sparrow position parameters to establish a power regulation model; Step S6: training the power regulation model using the training set and test set obtained in step S2; Step S7: The power regulation model outputs the power system regulation result.

[0007] As a preferred technical solution, in step S1, the data generated by the museum warehouse power system during operation includes power system basic data, real-time operation data, environmental and external factor data, and market and economic data; the power system basic data includes topology data and static parameter data; the real-time operation data includes power generation data, transmission and distribution network data, load data, protection and fault data; and the environmental and external factor data includes environmental data and date and time data.

[0008] As a preferred technical solution, in step S2, an interpolation method is used to eliminate abnormal data in the collected data and fill in the missing data; a Pearson correlation coefficient method is used to screen out factors with a high correlation with power system regulation as data input features. The specific Pearson correlation coefficient calculation formula is: ; Where, It represents the similarity value between two variables X and Y, n is the total number of data, and i represents the sample number; Substitute the filled data and the data related to the power system regulation into the variables X and Y in the above formula to obtain The value of The size of the judgment data is related to the power system regulation; Normalize the data input features. The normalization formula is: ; Where, is the original sample data, Represent the maximum, minimum and average values ​​of the sample data respectively. Represents the data after normalization; and select the first 80% of the data features as the training set, and select the last 20% of the data features as the test set.

[0009] As a preferred technical solution, in step S3, the sparrow algorithm optimization process is as follows: Step S31: Design the population coding of the museum storeroom power system, map the sparrow position vectors into the power regulation model hyperparameters, and generate the initial population based on the Logistic chaos map; Step S32: Plan the discoverers and joiners of the sparrow population, sort them according to their fitness values, and select the top 30% of individuals as discoverers and the rest as joiners; Step S33: If the environmental parameters exceed the threshold and trigger the warning mechanism, the current population location is determined to be unsafe and the discoverer location is updated; Step S34: Generate a new solution using the reverse learning strategy and optimize the device parameters. If the fitness of the joiner does not improve for three consecutive generations, reset its position to the neighborhood of the current optimal solution and update the joiner's position. Step S35: determining whether the location of the individual sparrow is safe, and further updating the location of the individual sparrow; Step S36: Calculate the fitness value to update the global optimal solution, retain the Pareto frontier solution set in each generation, and start a local refined search if the distance between the current optimal solution and the historical optimal solution is less than a threshold; Step S37: Output the optimal network hyperparameters, linearly map the continuous parameters to the actual range, and verify the model performance after rounding the discrete parameters.

[0010] As a preferred technical solution, in step S31, the population coding design of the museum storehouse power system includes the number of sparrow populations, the proportion of discoverers, the location of individual sparrows, and the required number of iterations. The specific formula is as follows: ; Where, The range is , represents the individual sparrow after mapping, They correspond to the lower and upper bounds of the solution space respectively; When mapping the sparrow position vector to the hyperparameter of the power regulation model, the continuous parameters are mapped to the floating-point values ​​of the sparrow position vector, and the correspondence between the parameter space and the algorithm solution space is achieved through linear scaling; the discrete parameters are rounded or categorized; and the constraints are set at the same time: If the hourly rate of change of the restricted equipment power is ≤15%, perform boundary correction. The specific formula is as follows: ; Differentiated constraints are set for cultural relics (e.g., temperature of 20±1°C and humidity of 45%±3%) for bronze artifacts), and a penalty term is introduced into the fitness function. The specific formula is as follows: ; Where, is the current parameter, To allow deviation.

[0011] As a preferred technical solution, in step S33, the specific formula for determining whether the current population location is safe and updating the discoverer location is as follows: ; Where, Indicates the current iteration number, Indicates the A sparrow in the The first iteration The value of the dimension, Indicates the warning value, represents the safety threshold, Represents individual sparrows, is a random number, represents the constant with the most iterations, represents a random number that satisfies the normal distribution, express matrix, Indicates the dimension of the variable to be optimized; As a preferred technical solution, the warning value Less than the safety threshold When the warning value is Greater than the safety threshold When , it means that the current location is dangerous and the discoverer needs to guide the sparrow to find a new place to search for food.

[0012] As a preferred technical solution, in step S34, the joiner determination formula is as follows: ; Where, Indicates the position of the sparrow in the worst state, Indicates the best position for sparrows, express matrix, Represents the dimension of the variable to be optimized, where each element is randomly assigned a value of 1 or -1. Represents the total number of sparrow populations, when , it means that the participant has not received food and is in poor condition, so he needs to go somewhere else to get food; otherwise, he will continue to look for food near the discoverer.

[0013] As a preferred technical solution, in step S36, the update formula of the global optimal solution is as follows: ; Where, is the current global optimal position, is the step size control parameter, specifically a normal distribution of random numbers with a mean of 0 and a variance of 1; is a random number used to indicate the direction of movement of the sparrow. represents the global best and worst fitness values, is the minimum constant, It means the sparrow is at the edge of the group. It means that the sparrow in the middle of the group is aware of the danger and moves closer to other sparrows.

[0014] As a preferred technical solution, in step S5, when obtaining the number of iterations, learning rate, number of nodes in the first hidden layer, and number of nodes in the second hidden layer from the sparrow position parameters, adaptive iterative optimization is performed, and the hyperparameters corresponding to the optimal fitness value are assigned to the network. The mean square error is selected as the fitness function. The specific formula is as follows: ; Where N is the number of samples, For the moment The actual power output value of time The predicted value of electric power output.

[0015] As a preferred technical solution, in step S6, the power regulation model after training needs to be evaluated for performance. Specifically, the mean absolute error, root mean square error, and coefficient of determination are used to evaluate the experimental results. The specific formula is as follows: ; In the formula, N represents the number of samples, For the moment The actual power output value of time The predicted value of electric power output.

[0016] In step S7, the power regulation model outputs the power system regulation results and combines VR / AR technology to mark the facilities in the museum warehouse on the three-dimensional model, and displays the power regulation-related data of each warehouse through color and icon size for visual display.

[0017] The present invention has the following beneficial effects: (1) The present invention uses the sparrow search algorithm to give the optimal hyperparameters required by the deep learning system, and finally obtains the power regulation model. The power regulation model is used to output the regulation results, thereby improving the efficiency and accuracy of power regulation.

[0018] (2) The present invention sorts the population by fitness value, updates the position of producers, followers, and sparrows in danger, performs individual optimal updates, and then performs group optimal updates to optimize their weights and thresholds, thereby improving prediction accuracy.

[0019] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1 This is a flow chart of a museum storehouse power system regulation method based on the sparrow algorithm of the present invention. DETAILED DESCRIPTION

[0022] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.

[0023] In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0024] To make the purpose, technical solutions and advantages of this application clearer, Figure 1 The implementation methods of this application are described in further detail.

[0025] Before introducing the embodiments of the present application, the sparrow algorithm is first described.

[0026] The sparrow search algorithm is a swarm intelligence optimization algorithm, which is mainly inspired by the foraging and anti-predation behaviors of sparrows. Its bionic principles are as follows: Sparrows forage for food in a population, divided into two types: finders and joiners. Finders are responsible for finding food within the population and providing foraging areas and directions for the entire sparrow population, while joiners utilize finders to obtain food. To obtain food, sparrows typically adopt two behavioral strategies: finder and joiner. Individuals in a population monitor the behavior of others, and aggressors within the population compete for food resources with their high-consumption peers to increase their predation rate. Furthermore, when attacked by a predator, sparrows will engage in anti-predation behavior. Modeled on these sparrow behaviors, we designed an algorithm for function optimization. The specific solution is as follows: (1) In the sparrow foraging algorithm, the finder with a better fitness value will be given priority in obtaining food during the search process. In addition, because the finder is responsible for finding food for the entire sparrow population and providing foraging directions for all joiners, the finder can obtain a larger foraging search range than the joiner.

[0027] (2) As described above, during the foraging process, some joiners will always monitor the discoverer, compete with the discoverer for food, or forage around the discoverer.

[0028] (3) When the entire sparrow population is threatened by predators, they will engage in anti-predation behavior: sparrows at the periphery of the population are extremely vulnerable to predators and need to constantly adjust their positions to gain a better position. At the same time, sparrows at the center of the population will approach their neighboring companions to minimize their danger zone.

[0029] In order to make the purpose, technical solutions and advantages of this application more clear, the following Figure 1 It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application.

[0030] See also Figure 1 As shown, the present invention is a museum storehouse power system regulation method based on the sparrow algorithm, comprising the following steps: Step S1: collecting data generated by the museum storeroom power system during operation; Step S2: pre-process the collected data, extract data features and divide the data features into training set and test set; Step S3: Optimize the sparrow algorithm, calculate the fitness value to update the global optimal solution, and output the optimal network hyperparameters; Step S4: Obtain the sparrow position parameters corresponding to the optimal fitness value; Step S5: Obtain the corresponding number of iterations, learning rate, and number of hidden layer nodes from the sparrow position parameters to establish a power regulation model; Step S6: training the power regulation model using the training set and test set obtained in step S2; Step S7: The power regulation model outputs the power system regulation result.

[0031] In step S1, the data generated by the museum storehouse power system during operation includes power system basic data, real-time operation data, environmental and external factor data, and market and economic data; The basic data of the power system include topological structure data and static parameter data; topological structure data include: grid node connection relationship (busbar, line, transformer, circuit breaker, etc.), equipment parameters (line impedance, transformer ratio, generator capacity, etc.), network partition information (regional power grid, microgrid, etc.); static parameter data include: (1) Line parameters: including line resistance, reactance, susceptance and other parameters. These data determine the loss and power distribution of power during transmission and are crucial for analyzing the power flow distribution and stability of the power system. (2) Transformer parameters: such as transformer ratio, short-circuit impedance, excitation reactance, etc., are used to describe the voltage conversion and power transmission characteristics of the transformer in the power system. (3) Busbar parameters: busbar rated voltage, short-circuit capacity and other parameters are important basis for power system operation and control, affecting the voltage level and stability of the power system.

[0032] Real-time operating data includes power generation data, transmission and distribution network data, load data, protection and fault data; power generation data includes generator output (active / reactive power, ramp rate), renewable energy forecast and measured data (wind power, photovoltaic power fluctuations), unit operating status (start / stop status, fault alarms); transmission and distribution network data includes node voltage, phase angle, frequency, line flow (active / reactive power, current), transformer load factor, temperature, circuit breaker / switch status (disconnection event records); load data includes real-time load power (by region and type) and demand response information (adjustable loads, museum warehouse power equipment); protection and fault data includes: relay protection action records (fault type, location, and clearing time), fault recording data (short-circuit current, voltage sag waveform), and historical fault statistics (frequency, impact range). Environmental and external factor data include temperature, humidity, wind speed, and light intensity; date and time data include seasons, holidays, weekdays / weekends (affecting load patterns), and electricity price periods (peak, valley, and flat electricity prices affect scheduling strategies).

[0033] In step S2, the interpolation method is used to remove abnormal data from the collected data and fill in the missing data; the Pearson correlation coefficient method is used to screen out factors with high correlation with power system regulation as data input features. The specific Pearson correlation coefficient calculation formula is: ; Where, It represents the similarity value between two variables X and Y, n is the total number of data, and i represents the sample number; Substitute the filled data and the data related to the power system regulation into the variables X and Y in the above formula to obtain The value of The size of the data is used to determine the relevance of the data to the power system regulation; specifically: like , it means that the data is highly correlated with power system regulation; like , it means that the data is closely related to the power system regulation; like , it means that the data are moderately related to power system regulation; like , it means that the data is correlated with the power system regulation or has no significant linear relationship; To facilitate the training of the model network, this embodiment performs interpretation and enhancement on the data (lagged processing of time series features and one-hot encoding of categorical variables), and uses the min-max normalization method to normalize the data input features. The normalization formula is: ; Where, is the original sample data, Represent the maximum, minimum and average values ​​of the sample data respectively. Represents the data after normalization; and select the first 80% of the data features as the training set, and select the last 20% of the data features as the test set.

[0034] When sparrows forage, nearby joiners may compete for food. This is a behavior of joiners to increase their predation rate. Therefore, the identities of the finder and joiner may change at any time, but the proportion of the two in the population remains constant. To obtain more energy and find better finders, some hungry joiners will move to other areas to forage. When the warning value exceeds a preset upper limit, indicating that the sparrow population is aware of the danger, sparrows in the center of the population will randomly move to approach their neighbors, while sparrows at the edge will quickly move to a safer position. This process is the anti-predation behavior of the sparrow population.

[0035] In step S3, the sparrow algorithm optimization process is as follows: Step S31: Design the population coding of the museum storeroom power system, map the sparrow position vectors into the power regulation model hyperparameters, and generate the initial population based on the Logistic chaos map; Step S32: Plan the discoverers and joiners of the sparrow population, sort them according to their fitness values, and select the top 30% of individuals as discoverers and the rest as joiners; Step S33: If the environmental parameters exceed the threshold and trigger the warning mechanism, the current population location is determined to be unsafe and the discoverer location is updated; Step S34: Generate a new solution using the reverse learning strategy and optimize the device parameters. If the fitness of the joiner does not improve for three consecutive generations, reset its position to the neighborhood of the current optimal solution and update the joiner's position. Step S35: determining whether the location of the individual sparrow is safe, and further updating the location of the individual sparrow; Step S36: Calculate the fitness value to update the global optimal solution, retain the Pareto frontier solution set in each generation, and start a local refined search if the distance between the current optimal solution and the historical optimal solution is less than a threshold; Step S37: Output the optimal network hyperparameters, linearly map the continuous parameters to the actual range, and verify the model performance after rounding the discrete parameters.

[0036] In step S31, the population coding design of the museum storehouse power system includes the number of sparrows, the proportion of discoverers, the location of individual sparrows, and the required number of iterations. The specific formula is as follows: ; Where, The range is , represents the individual sparrow after mapping, They correspond to the lower and upper bounds of the solution space respectively; When mapping the sparrow position vector to the hyperparameter of the power regulation model, the continuous parameters are mapped to the floating-point values ​​of the sparrow position vector, and the correspondence between the parameter space and the algorithm solution space is achieved through linear scaling; the discrete parameters are rounded or categorized; and the constraints are set at the same time: If the hourly rate of change of the restricted equipment power is ≤15%, perform boundary correction. The specific formula is as follows: ; Differentiated constraints are set for cultural relics (e.g., temperature of 20±1°C and humidity of 45%±3%) for bronze artifacts), and a penalty term is introduced into the fitness function. The specific formula is as follows: ; Where, is the current parameter, To allow deviation; The initial fitness can be pre-calculated, a fast evaluation model can be set up, and a lightweight GRU network can be used to pre-evaluate the initial population fitness, screening out the top 20% of high-quality individuals as the elite population for subsequent iterations; such as input features: core parameters such as temperature and humidity, equipment power, and energy storage SOC; output indicators: preliminary fitness value (energy consumption + environmental deviation).

[0037] In step S33, it is determined whether the current population location is safe and the specific formula for updating the discoverer location is as follows: ; Where, Indicates the current iteration number, Indicates the A sparrow in the The first iteration The value of the dimension, Indicates the warning value, represents the safety threshold, Represents individual sparrows, is a random number, represents the constant with the most iterations, represents a random number that satisfies the normal distribution, express matrix, Indicates the dimension of the variable to be optimized; When the warning value Less than the safety threshold When the warning value is Greater than the safety threshold When it is on, it means that the current location is dangerous and the discoverer needs to guide the sparrow to find a new place to search for food; By judging whether the population is safe, we can avoid the local optimal trap: When a population's location (i.e., parameter combination) falls into a local optimum, fitness values ​​(such as energy consumption) may stagnate. To determine the safety of a location, a warning mechanism (such as environmental parameter exceeding the standard) is used to force the discoverer to leave the current area, triggering a global search. For example, if the air conditioning power parameter combination causes humidity to continuously exceed the standard, it is considered an "unsafe location" and needs to be explored again. At the same time, museum warehouses must meet differentiated temperature and humidity thresholds for cultural relics (e.g., 20±1°C for bronze artifacts), while parameters such as grid electricity prices and equipment power fluctuate in real time. Through safety assessments, candidate solutions that violate these constraints (e.g., power fluctuations >15% / hour) can be filtered out to ensure compliance with the regulation strategy.

[0038] After the safety threshold is triggered, marginal individuals (such as the last 10% of fitness) are mutated through Gaussian perturbations to increase population diversity and prevent premature convergence. For example, if the energy storage charging and discharging strategy is concentrated in a certain interval, mutation can introduce a new charging and discharging curve; By updating the location of the detector, a quick response can be made to environmental threshold violations. For example, when the temperature and humidity sensors detect an anomaly (such as a sudden increase in humidity), the detector updates its location based on the safe direction vector and generates an emergency strategy: increasing the dehumidifier power to the upper limit and turning off non-core loads (such as display cabinet decorative lights); dynamically adjusting the air conditioner set temperature to balance the cooling rate and energy consumption.

[0039] In step S34, the joiner determination formula is as follows: ; Where, Indicates the position of the sparrow in the worst state, Indicates the best position for sparrows, express matrix, Represents the dimension of the variable to be optimized, where each element is randomly assigned a value of 1 or -1. Represents the total number of sparrow populations, when , it means that the participant has not received food and is in poor condition, so he needs to go somewhere else to get food; otherwise, he will continue to look for food near the discoverer.

[0040] After the introduction of the joiner, it follows the discoverer to obtain information about high-quality solutions (such as low-energy parameter combinations) and simultaneously generates new solutions through a reverse learning strategy, thereby breaking through the local optimal zone that the discoverer may be trapped in. For example, when the discoverer discovers an air conditioner power setting of 800W, the joiner may try neighboring solutions of 780W or 820W, expanding the search range. The discoverer focuses on global search (such as energy storage charging and discharging strategies under fluctuating electricity prices), while the joiner is responsible for local optimization (such as fine-tuning the air conditioner start and stop frequency), forming a collaborative "exploration-exploitation" mechanism. This division of labor enables the algorithm to balance efficiency and accuracy in complex power regulation problems.

[0041] When the museum warehouse faces sudden changes in temperature and humidity, equipment failure, and other emergencies, participants can quickly adjust their own strategies and respond in seconds by real-time monitoring of the discoverer's location (such as the current optimal temperature control parameters).

[0042] In step S36, the update formula of the global optimal solution is as follows: ; Where, is the current global optimal position, is the step size control parameter, specifically a normal distribution of random numbers with a mean of 0 and a variance of 1; is a random number used to indicate the direction of movement of the sparrow. represents the global best and worst fitness values, is the minimum constant, It means the sparrow is at the edge of the group. It means that the sparrow in the middle of the group is aware of the danger and moves closer to the other sparrows; By retaining the Pareto frontier solution set in each generation, trade-offs are established between multiple objectives, such as energy consumption, equipment lifespan, and environmental stability. For example, one solution might increase energy consumption by 5% in exchange for a 20% increase in air conditioning equipment lifespan, while another might improve energy efficiency at the expense of a 3% reduction in humidity fluctuations. Dynamic maintenance of the Pareto solution set avoids bias caused by single-objective optimization. For example: Multi-objective coordinated control of temperature and humidity, Pareto solution set retention, differentiated strategy library: Bronze display cabinet: temperature 20±0.5℃ is preferred, humidity 45%±2% is second; Calligraphy and painting warehouse: humidity 50% ± 1% is preferred, temperature 18℃ ± 1℃ is second; According to real-time sensor data, the optimal strategy is matched from the solution set, with a response time of less than 3 seconds.

[0043] When the distance between the current optimal solution and the historical optimal solution (such as the Euclidean distance) is less than a threshold (such as 0.05), the algorithm is judged to have entered the convergence stage and a local refined search is initiated. For example, the air conditioner power adjustment step size is reduced from ±50W to ±10W; the dehumidifier operation cycle is adjusted from minutes to seconds. Experiments have shown that this strategy increases the convergence speed by 25%.

[0044] By comparing the distance between the current solution and the historical optimal solution, two modes are triggered: Distance > Threshold: The discoverer performs a global search using a Logistic Chaos Map (e.g., testing a new charging and discharging strategy for an energy storage system). Distance ≤ Threshold: The participant performs neighborhood development based on Gaussian perturbation (such as optimizing the start and stop time of the fresh air system).

[0045] In step S5, when the number of iterations, learning rate, number of nodes in the first hidden layer, and number of nodes in the second hidden layer are obtained from the sparrow position parameters, adaptive iterative optimization is performed, and the hyperparameters corresponding to the optimal fitness value are assigned to the network. The mean square error is selected as the fitness function. The specific formula is as follows: ; Where N is the number of samples, For the moment The actual power output value of time The predicted value of electric power output.

[0046] In step S6, the power regulation model after training needs to be evaluated for performance. Specifically, the mean absolute error, root mean square error, and coefficient of determination are used to evaluate the experimental results. The specific formula is as follows: ; In the formula, N represents the number of samples, For the moment The actual power output value of time The predicted value of electric power output.

[0047] In step S7, the power regulation model outputs the power system regulation results and combines VR / AR technology to mark the facilities in the museum warehouse on the three-dimensional model, and displays the power regulation-related data of each warehouse through color and icon size for visual display.

[0048] It is worth noting that in the above system embodiment, the various units included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0049] In addition, those skilled in the art will appreciate that all or part of the steps in the above-mentioned embodiments can be accomplished by instructing related hardware through a program, and the corresponding program can be stored in a computer-readable storage medium.

[0050] The preferred embodiments of the present invention disclosed above are intended only to help illustrate the present invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the present invention to the specific embodiments described. Obviously, many modifications and variations are possible based on the content of this specification. These embodiments are selected and described in detail in this specification to better explain the principles and practical applications of the present invention, thereby enabling those skilled in the art to better understand and utilize the present invention. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. A museum storehouse power system regulation method based on the sparrow algorithm, characterized in that: The steps include: Step S1: collecting data generated by the museum storeroom power system during operation; Step S2: pre-process the collected data, extract data features and divide the data features into training set and test set; Step S3: Optimize the sparrow algorithm, calculate the fitness value to update the global optimal solution, and output the optimal network hyperparameters; Step S4: Obtain the sparrow position parameters corresponding to the optimal fitness value; Step S5: Obtain the corresponding number of iterations, learning rate, and number of hidden layer nodes from the sparrow position parameters to establish a power regulation model; Step S6: training the power regulation model using the training set and test set obtained in step S2; Step S7: The power regulation model outputs the power system regulation result.

2. The museum storehouse power system adjustment method based on the sparrow algorithm according to claim 1 is characterized in that: In step S1, the data generated by the museum warehouse power system during operation includes power system basic data, real-time operation data, environmental and external factor data, and market and economic data; the power system basic data includes topology data and static parameter data; the real-time operation data includes power generation data, transmission and distribution network data, load data, protection and fault data; the environmental and external factor data includes environmental data and date and time data.

3. The museum storehouse power system adjustment method based on the sparrow algorithm according to claim 1 is characterized in that: In step S2, the interpolation method is used to eliminate abnormal data in the collected data and fill in the missing data; the Pearson correlation coefficient method is used to screen out factors with high correlation with power system regulation as data input features. The specific Pearson correlation coefficient calculation formula is: ; Where, It represents the similarity value between two variables X and Y, n is the total number of data, and i represents the sample number; Substitute the filled data and the data related to the power system regulation into the variables X and Y in the above formula to obtain The value of The size of the judgment data is related to the power system regulation; The data input features are normalized, and the first 80% of the data features are selected as the training set, and the last 20% of the data features are selected as the test set.

4. The museum storehouse power system adjustment method based on the sparrow algorithm according to claim 1 is characterized in that: In step S3, the sparrow algorithm optimization process is as follows: Step S31: Design the population coding of the museum storeroom power system, map the sparrow position vectors into the power regulation model hyperparameters, and generate the initial population based on the Logistic chaos map; Step S32: Plan the discoverers and joiners of the sparrow population, sort them according to their fitness values, and select the top 30% of individuals as discoverers and the rest as joiners; Step S33: If the environmental parameters exceed the threshold and trigger the warning mechanism, the current population location is determined to be unsafe and the discoverer location is updated; Step S34: Generate a new solution using the reverse learning strategy and optimize the device parameters. If the fitness of the joiner does not improve for three consecutive generations, reset its position to the neighborhood of the current optimal solution and update the joiner's position. Step S35: determining whether the location of the individual sparrow is safe, and further updating the location of the individual sparrow; Step S36: Calculate the fitness value to update the global optimal solution, retain the Pareto frontier solution set in each generation, and start a local refined search if the distance between the current optimal solution and the historical optimal solution is less than a threshold; Step S37: Output the optimal network hyperparameters, linearly map the continuous parameters to the actual range, and verify the model performance after rounding the discrete parameters.

5. The museum storehouse power system regulation method based on the sparrow algorithm according to claim 4 is characterized in that: In step S31, the population coding design of the museum storehouse power system includes the number of sparrows, the proportion of discoverers, the location of individual sparrows and the required number of iterations. The specific formula is as follows: ; Where, The range is , represents the individual sparrow after mapping, They correspond to the lower and upper bounds of the solution space respectively; When mapping the sparrow position vector to the hyperparameter of the power regulation model, the continuous parameters are mapped to the floating-point values ​​of the sparrow position vector, and the correspondence between the parameter space and the algorithm solution space is achieved through linear scaling; the discrete parameters are rounded or categorized; and the constraints are set at the same time: If the hourly change rate of the equipment power is limited to ≤15%, boundary correction is performed; differentiated constraints are set for the cultural relics categories, and a penalty term is introduced in the fitness function.

6. The museum storeroom power system regulation method based on the sparrow algorithm according to claim 4 is characterized in that: In step S33, the specific formula for determining whether the current population location is safe and updating the discoverer location is as follows: ; Where, Indicates the current iteration number, Indicates the A sparrow in the The first iteration The value of the dimension, Indicates the warning value, represents the safety threshold, Represents individual sparrows, is a random number, represents the constant with the most iterations, represents a random number that satisfies the normal distribution, express matrix, Indicates the dimension of the variable to be optimized.

7. The museum storeroom power system regulation method based on the sparrow algorithm according to claim 6 is characterized in that: The warning value Less than the safety threshold When the warning value is Greater than the safety threshold When , it means that the current location is dangerous and the discoverer needs to guide the sparrow to find a new place to search for food.

8. The museum storehouse power system regulation method based on the sparrow algorithm according to claim 4 is characterized in that: In step S34, the joiner determination formula is as follows: ; Where, Indicates the position of the sparrow in the worst condition, Indicates the best position for sparrows, express matrix, Represents the dimension of the variable to be optimized, where each element is randomly assigned a value of 1 or -1. Represents the total number of sparrow populations, when , it means that the participant has not received food and is in poor condition, so he needs to go somewhere else to get food; otherwise, he will continue to look for food near the discoverer.

9. The museum storeroom power system regulation method based on the sparrow algorithm according to claim 4 is characterized in that: In step S36, the update formula of the global optimal solution is as follows: ; Where, is the current global optimal position, is the step size control parameter, specifically a normal distribution of random numbers with a mean of 0 and a variance of 1; is a random number used to indicate the direction of movement of the sparrow. represents the global best and worst fitness values, is the minimum constant, It means the sparrow is at the edge of the group. It means that the sparrow in the middle of the group is aware of the danger and moves closer to other sparrows.

10. The museum storehouse power system regulation method based on the sparrow algorithm according to claim 1 is characterized in that: In step S5, when the number of iterations, learning rate, number of nodes in the first hidden layer, and number of nodes in the second hidden layer are obtained from the sparrow position parameters, adaptive iterative optimization is performed, and the hyperparameters corresponding to the optimal fitness value are assigned to the network. The mean square error is selected as the fitness function. The specific formula is as follows: ; Where N is the number of samples, For the moment The actual power output value of time The predicted value of electric power output.

11. The museum storehouse power system regulation method based on the sparrow algorithm according to claim 1, characterized in that: In step S6, the power regulation model after training needs to be evaluated for performance. Specifically, the mean absolute error, root mean square error, and coefficient of determination are used to evaluate the experimental results. The specific formula is as follows: ; In the formula, N represents the number of samples, For the moment The actual power output value of time The predicted value of electric power output.

12. The museum storeroom power system regulation method based on the sparrow algorithm according to claim 1, characterized in that: In step S7, the power regulation model outputs the power system regulation results and combines VR / AR technology to mark the facilities in the museum warehouse on the three-dimensional model, and displays the power regulation related data of each warehouse through color and icon size for visual display.