A multi-scene lighting energy-saving model training method and system based on federated learning
Patent Information
- Application Number
- CN202611153282.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-10-20
AI Technical Summary
[0008]针对现有技术的不足,本发明提供了一种基于联邦学习的多场景照明节能模型训练方法及系统,解决了现有多场景照明节能模型训练中补光计划与灯组实际执行状态不一致,导致本地训练样本失真、联邦模型更新偏差及照明能耗和补光效果预测可靠性降低的问题
[0022](1)本发明,通过补光计划、实际有功功率、驱动器状态、通信状态及人工控制状态的关联校验,剔除通信中断、人工干预和无效采样窗口,避免将未实际执行的补光计划直接作为训练依据,提高实际耗电量和冠层累计光子量标签与灯组真实运行过程的一致性。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the field of model training technology, specifically to a method and system for training multi-scenario lighting energy-saving models based on federated learning. Background Technology
[0002] With the development of intelligent facility agriculture and plant lighting, adjustable spectrum supplemental lighting, lighting management platforms, intelligent drivers, and environmental sensors are widely deployed in greenhouses, seedling sheds, and plant factories to adjust supplemental lighting according to crop growth stages, natural light conditions, and equipment operating status. Data such as supplemental lighting plans, lamp operation status, power consumption, canopy PPFD, and outdoor PPFD can be continuously recorded, providing a data foundation for conducting multi-scenario lighting energy consumption analysis, supplemental lighting effect evaluation, and lighting control model training.
[0003] For example, Chinese patent CN115719092B discloses a model training method and a federated learning system based on federated learning. This method is applied to a federated learning system including a server and multiple nodes and includes: in t operations of model training, the server distributes a set of model parameters to n nodes; each of the n nodes performs gradient calculation using local training samples to obtain the original gradient, performs joint optimization using a utility metric and a privacy metric to obtain transformed samples, and generates uploaded data based on the transformed samples; and the server obtains the uploaded data and updates the set of model parameters. Thus, the transformed samples are implicitly used to generate perturbation gradients, thereby injecting utility and privacy information into the perturbation gradients. A utility metric for calculating gradient distance is designed in a weighted manner, with the weights determined by element weights and layer weights of the parameters. Preferably, a trained evaluation network is used as a privacy metric, which learns how to evaluate differences in a way consistent with human cognition.
[0004] For example, Chinese patent CN117454972A discloses a method for generating training data and training a federated learning model, including: acquiring label data, feature data, and feature data weights; splitting the feature data to generate first feature data and second feature data, and splitting the feature data weights to generate first feature data weights and second feature data weights; processing the first feature data and first feature data weights to generate first encrypted feature data, and processing the second feature data and second feature data weights to generate second encrypted feature data; and using the first encrypted feature data and second encrypted feature data to generate target training data through a label model. This ensures the security of feature data during transmission, and compared to current methods that encrypt both feature data and label data simultaneously, it reduces the amount of encrypted data and improves computational speed and model training efficiency.
[0005] However, existing multi-scenario lighting energy-saving model training typically builds local training samples for each client based on supplemental lighting plans, set dimming ratios, and planned on-time durations. In actual operation in greenhouses, seedling sheds, and plant factories, the supplemental lighting process may not be fully executed as planned due to factors such as lamp overheating and power reduction, power supply voltage fluctuations, driver current limiting, circuit overload, communication interruptions, or temporary manual intervention. This results in inconsistencies between the channel ratios and durations recorded in the plan and the actual lamp power status, real-time power, and canopy illumination results. This execution bias causes the model to associate supplemental lighting strategies that did not actually occur with subsequent crop growth and energy consumption results, leading to systematic biases in model updates uploaded from different clients and reducing the reliability of the federated aggregation model's predictions of lighting energy consumption and supplemental lighting effects under actual equipment conditions.
[0006] Therefore, in order to address the above problems, there is an urgent need for a training method and system for multi-scenario lighting energy-saving models based on federated learning. Summary of the Invention
[0007] Technical problems to be solved
[0008] To address the shortcomings of existing technologies, this invention provides a training method and system for multi-scene lighting energy-saving models based on federated learning. This solves the problems in existing multi-scene lighting energy-saving model training where the supplementary lighting plan and the actual execution state of the lighting group are inconsistent, leading to distortion of local training samples, deviation in federated model updates, and reduced reliability of lighting energy consumption and supplementary lighting effect predictions.
[0009] Technical solution
[0010] To achieve the above objectives, the present invention provides the following technical solution: a multi-scene lighting energy-saving model training method based on federated learning, comprising the following steps: S1, collecting supplementary lighting plan data, actual execution data, and scene illumination data from each federated client, and performing data preprocessing; dividing supplementary lighting windows based on the preprocessed supplementary lighting plan data, actual execution data, and scene illumination data, and generating a lighting execution association dataset; S2, establishing a planned dimming reference benchmark based on the historical lighting execution association dataset, identifying the execution deviation of the supplementary lighting window based on the planned dimming reference benchmark, generating execution status labels for the supplementary lighting window based on the lighting execution association dataset and execution deviation, and constructing lighting execution training samples; S3, training a local perception lighting energy-saving model based on the local lighting execution training samples of each client, and calculating local training update data; S4, before the start of each federated training round, the federated server distributes global model parameters and receives local training update data, groups and weights the local training update data according to lighting scene type, updates and distributes global model parameters and model version, and performs iterative training of the multi-scene lighting energy-saving model.
[0011] Further, the specific process of collecting supplementary lighting plan data, actual execution data, and scene illumination data from each federal client, and performing data preprocessing, is as follows: The federal client number and lighting scene type are collected through the federal client configuration table of the lighting management platform. For the same lighting area number and the same light group number within each federal client, supplementary lighting plan data is collected based on the lighting management platform. This supplementary lighting plan data includes: lighting area number, light group number, spectral channel number, plan execution timestamp, and planned dimming ratio for each spectral channel. Communication polling records from smart meters, smart drivers, smart circuit breakers, and edge acquisition gateways on the independent power supply branches of each light group are read through a preset sampling period. The lighting management platform's manual control operation log collects actual execution data, including: sampling timestamps, actual switching status of light groups, actual active power of light groups, actual voltage of power supply circuits, driver temperature, over-temperature power reduction status, driver current limiting status, circuit overload status, communication connection status, and manual control status. Scene illumination data is collected via quantum sensors, including: sampling timestamps, canopy PPFD, and outdoor PPFD. Based on the same network time protocol (NTP) time server, clock synchronization is performed on each timestamp, and the supplementary lighting plan data, actual execution data, and scene illumination data are sorted in ascending order of timestamp. This is done for each lighting area. The system uses the lamp group number, each lamp group number, and each sampling timestamp to find the most recent supplementary lighting plan data with a planned execution timestamp no later than the corresponding sampling timestamp, according to the spectral channel number. It then associates the planned dimming ratio of each spectral channel with the corresponding sampling timestamp, forming a planned dimming ratio vector for each sampling timestamp in ascending order of spectral channel numbers. When the planned dimming ratio of each spectral channel, the actual active power of the lamp group, the actual voltage of the power supply circuit, the driver temperature, the canopy PPFD, and the outdoor PPFD are empty or exceed the equipment's measurement range, the sampling timestamp is marked as invalid. The system also marks the lamp group's actual switching status, over-temperature power reduction status, driver current limiting status, circuit overload status, and communication connection status as invalid. When the status and manual control status are empty or do not belong to the preset status set, the sampling timestamp is marked as an invalid sampling timestamp; the actual switching status of the lamp group, the over-temperature power reduction status, the driver current limiting status, the circuit overload status, the communication connection status, and the manual control status are converted into binary data, including: 1 when the actual switching status of the lamp group is on, and 0 when the actual switching status of the lamp group is off; 1 when the over-temperature power reduction status, the driver current limiting status, and the circuit overload status are yes, and 0 when the status is no; 1 when the communication connection status is normal, and 0 when the communication connection status is interrupted; 1 when the manual control status is manual, and 0 when the manual control status is automatic.
[0012] Furthermore, the specific process of dividing the supplementary lighting window based on the preprocessed supplementary lighting plan data, actual execution data, and scene illumination data to generate the lighting execution association dataset is as follows: For each lighting area number and each light group number, when the planned dimming ratio of at least one spectral channel under the sampling timestamp is greater than 0, the corresponding sampling timestamp is determined to be in the planned supplementary lighting state; the set of sampling timestamps where the difference between adjacent sampling timestamps is equal to the sampling period and the corresponding sampling timestamps are all in the planned supplementary lighting state is determined as a planned supplementary lighting window; for each planned supplementary lighting window, the actual execution data and scene illumination data of each sampling timestamp within the window are read, and if there are invalid sampling times... If the stamp, communication connection status is 0, or manual control status is 1, the planned supplementary lighting window is removed; otherwise, the planned supplementary lighting window is considered a valid planned supplementary lighting window. For each valid planned supplementary lighting window, the actual active power of the lamp group at each sampling timestamp within the window is multiplied by the sampling period and accumulated. The accumulated result is converted into kilowatt-hours to obtain the actual power consumption of the corresponding lamp group within the window. The canopy PPFD at each sampling timestamp within the window is multiplied by the sampling period and accumulated. The accumulated result is converted into moles per square meter to obtain the cumulative photon quantity of the canopy within the window. Based on the preprocessed supplementary lighting plan data, actual execution data, and scene illumination data, a lighting execution association dataset is generated.
[0013] Furthermore, based on the historical lighting execution association dataset, a planned dimming reference benchmark is established, and the specific process for identifying the execution deviation of the supplementary lighting window based on the planned dimming reference benchmark is as follows: The historical lighting execution association dataset is read, and for each lighting area number and each lamp group number, historical sampling timestamps with the same planned dimming ratio vector are grouped into the same planned dimming ratio group; within each planned dimming ratio group, sampling timestamps where the lamp group's actual switching state is 1, over-temperature power reduction state is 0, driver current limiting state is 0, circuit overload state is 0, communication connection state is 1, and manual control state is 0 are selected as parameters for the planned dimming ratio vector. The process involves: 1) Analyzing the sampling timestamps; 2) Calculating the median of the actual active power of the lamp group corresponding to each reference sampling timestamp to obtain the reference actual active power of the planned dimming ratio vector; 3) For each effective planned supplementary lighting window, reading the reference actual active power of the planned dimming ratio vector for each sampling timestamp within the window, multiplying each reference actual active power by the sampling period and accumulating them, then converting the accumulated result into kilowatt-hours to obtain the reference execution power consumption for the effective planned supplementary lighting window; 4) Subtracting the reference execution power consumption from the actual power consumption to obtain the execution power consumption difference; 5) Dividing the execution power consumption difference by the sum of the reference execution power consumption and a very small positive number to obtain the execution energy consumption deviation rate.
[0014] Furthermore, the specific process of generating execution status labels for supplementary lighting windows based on the lighting execution association dataset and execution deviation, and constructing lighting execution training samples, is as follows: For each valid planned supplementary lighting window, execution status labels are generated according to the priority order of execution interruption window, protection power limiting window, planned consistent execution window, and non-protection execution deviation window. This includes: when the actual switching state of the lamp group at least one sampling time stamp within the window is 0, the valid planned supplementary lighting window is marked as an execution interruption window; when the actual switching state of the lamp group at each sampling time stamp within the window is 1, and there is at least one sampling time stamp with an over-temperature power reduction state of 1, a driver current limiting state of 1, or a circuit overload state of 1, the valid planned supplementary lighting window is marked as a protection power limiting window; when the actual switching state of the lamp group at each sampling time stamp within the window is 1, and the over-temperature power reduction state, driver current limiting state, and circuit overload state are all 1, the valid planned supplementary lighting window is marked as a protection power limiting window; when the actual switching state of the lamp group at each sampling time stamp within the window is 1, and the over-temperature power reduction state, driver current limiting state, and circuit overload state are all 1, the valid planned supplementary lighting window is marked as a protection power limiting window. When the absolute value of the execution energy consumption deviation rate is less than or equal to the execution energy consumption deviation threshold, the effective planned supplementary lighting window is marked as a planned consistent execution window; when the actual switching state of the lamp group corresponding to each sampling timestamp in the window is 1, the over-temperature power reduction state, the driver current limiting state, and the circuit overload state are all 0, and the absolute value of the execution energy consumption deviation rate is greater than the execution energy consumption deviation threshold, the effective planned supplementary lighting window is marked as a non-protection execution deviation window; for the planned consistent execution window, the protection power limiting window, and the non-protection execution deviation window, the actual voltage sequence of the power supply circuit, the driver temperature sequence, and the outdoor PPFD sequence within the preset observation time before the window start timestamp are extracted, as well as the planned dimming ratio vector sequence, the reference actual active power sequence, the actual power consumption, and the cumulative photon quantity of the canopy in the window, to generate lighting execution training samples, and each lighting execution training sample is stored according to the lighting area number and the lamp group number.
[0015] Furthermore, based on the local lighting execution training samples of each client, the specific process of training the local perception lighting energy-saving model is as follows: For each federated client, read each lighting execution training sample stored locally, and concatenate the actual voltage sequence of the power supply circuit, the driver temperature sequence, and the outdoor PPFD sequence within the preset observation period before the window start timestamp, as well as the planned dimming ratio vector sequence and the reference actual active power sequence within the window, to obtain the lighting execution feature vector sequence; input the normalized lighting execution feature vector sequence into the dual GRU network, and use the actual power consumption and the cumulative photon quantity of the canopy as supervision labels to train the local perception lighting energy-saving model. The perception lighting energy-saving model includes: an actual power consumption prediction branch and a canopy cumulative photon quantity prediction branch; by inputting the current lighting execution feature vector sequence into the local perception lighting energy-saving model, the predicted actual power consumption and the predicted cumulative photon quantity of the canopy are obtained.
[0016] Further, the specific process for calculating the local training update data is as follows: Calculate the mean square error of the actual power consumption between the predicted actual power consumption and the actual power consumption; calculate the mean square error of the cumulative photon quantity of the canopy between the predicted cumulative photon quantity of the canopy and the cumulative photon quantity of the canopy; add the mean square error of the actual power consumption and the mean square error of the cumulative photon quantity of the canopy to obtain the local model training loss; based on the local model training loss, use the backpropagation algorithm to update the model parameters of the local sensing lighting energy-saving model, and stop updating the local model parameters when the number of training rounds reaches the training round threshold, thus obtaining the trained local sensing lighting energy-saving model; subtract the model parameters of the local sensing lighting energy-saving model before training from each parameter to obtain the update amount of each local model parameter, and count the number of lighting execution training samples participating in the local model training; output the local training update data and send it to the federated server. The local training update data includes: federated client number, lighting scene type, local model parameter update amount, and number of lighting execution training samples.
[0017] Furthermore, before each round of federated training begins, the specific process by which the federated server distributes global model parameters and receives local training update data is as follows: Before the first round of local sensing lighting energy-saving model training, the federated server constructs a sensing lighting energy-saving model with the same network structure as the local sensing lighting energy-saving model of each federated client, and initially assigns values to the model parameters in the sensing lighting energy-saving model to obtain global model parameters and generate a global model version number; before each round of local sensing lighting energy-saving model training begins, the federated server sends the current global model parameters and global model version number to each federated client. Each federated client uses the current global model parameters as the model parameters before the local sensing lighting energy-saving model training, completes the local model training, and calculates the local model parameter update amount; the federated server receives the local training update data sent by each federated client and designates the federated client that sent the local training update data as a participating aggregation client.
[0018] Furthermore, the specific process of iteratively training a multi-scene lighting energy-saving model involves grouping and weighting the locally trained update data according to lighting scene type, updating and distributing global model parameters and model versions, as follows: For each lighting scene type, participating clients belonging to the same lighting scene type are grouped into the same scene aggregation group; for each scene aggregation group, the sum of the number of lighting execution training samples of each participating client is calculated, and the number of lighting execution training samples of each participating client is divided by the sum of the number of lighting execution training samples in the corresponding scene aggregation group to obtain the scene aggregation weight; for each scene aggregation group, the local model parameter update amount of each participating client is multiplied by the corresponding scene aggregation weight, and the weighted results for the same model parameter positions are summed to obtain... The update amount of scene model parameters for the corresponding lighting scene type is calculated. For each model parameter position, the update amounts of scene model parameters for each lighting scene type are added together and divided by the number of lighting scene types participating in the aggregation in this round to obtain the global model parameter update amount. The global model parameter update amounts are added to the current global model parameters item by item based on the same model parameter position to obtain the updated global model parameters. The current global model version number is incremented by one to obtain the new global model version number. The updated global model parameters and the new global model version number are sent to each federated client. After receiving the updated global model parameters, each federated client uses the updated global model parameters to replace the model parameters of the local perception lighting energy-saving model, and trains based on the newly added lighting execution training samples in the next federated training round.
[0019] The second aspect of this invention provides a multi-scene lighting energy-saving model training system based on federated learning, comprising: a lighting execution data processing module, used to collect supplementary lighting plan data, actual execution data, and scene illumination data from each federated client, and perform data preprocessing; dividing supplementary lighting windows based on the preprocessed supplementary lighting plan data, actual execution data, and scene illumination data to generate a lighting execution association dataset; a plan execution deviation identification module, used to establish a planned dimming reference benchmark based on the historical lighting execution association dataset, and identify the execution deviation of the supplementary lighting window based on the planned dimming reference benchmark; generating execution status labels for the supplementary lighting window based on the lighting execution association dataset and the execution deviation, and constructing lighting execution training samples; a local energy-saving model training module, used to train a local perception lighting energy-saving model based on the local lighting execution training samples of each client, and calculate local training update data; and a multi-scene federated aggregation module, used to, before the start of each federated training round, have the federated server issue global model parameters and receive local training update data, group and weight aggregate the local training update data according to the lighting scene type, update and issue global model parameters and model version, and perform iterative training of the multi-scene lighting energy-saving model.
[0020] Beneficial effects
[0021] The present invention has the following beneficial effects:
[0022] (1) This invention eliminates communication interruptions, manual interventions and invalid sampling windows by correlating and verifying the supplementary lighting plan, actual active power, driver status, communication status and manual control status, thereby avoiding the direct use of supplementary lighting plans that have not been actually executed as training basis and improving the consistency between the actual power consumption and the cumulative photon quantity label of the canopy and the actual operation process of the lamp group.
[0023] (2) In this invention, a reference actual active power is constructed for the same planned dimming ratio, and combined with the execution energy consumption deviation rate, actual switching state, over-temperature power reduction state, current limiting state and circuit overload state, the supplementary light window is classified into planned consistent execution, protection power limitation, non-protection execution deviation and execution interruption, so that the model can distinguish between power limitation caused by equipment protection and other execution deviations.
[0024] (3) In this invention, the actual voltage of the power supply circuit in front of the window, the driver temperature and the outdoor PPFD sequence, as well as the planned dimming ratio vector sequence and the reference actual active power sequence in the window are jointly trained, so that the local model can combine the equipment operating status, natural light conditions and planned supplementary lighting strategy to predict the actual power consumption and the cumulative photon quantity of the canopy.
[0025] (4) In this invention, each federal client only uploads the local model parameter update amount and the number of lighting execution training samples, and does not upload the original supplementary lighting plan, equipment operation data and scene light data; and performs weighted aggregation within the scene and fusion between scenes according to the lighting scene type, which protects the data privacy of different greenhouses, seedling sheds and plant factories, and reduces the impact of differences in the number of samples and differences in scene scale on the global model update.
[0026] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description
[0027] Figure 1 A flowchart of a multi-scenario lighting energy-saving model training method based on federated learning;
[0028] Figure 2 This is a structural diagram of a multi-scenario lighting energy-saving model training system based on federated learning;
[0029] Figure 3 A schematic diagram showing the distribution of energy consumption deviation during the operation of the supplementary lighting window;
[0030] Figure 4 This diagram illustrates the loss variation for multi-scenario federated training validation. Detailed Implementation
[0031] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. As those skilled in the art will understand, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0032] Please see Figures 1-4 This invention provides a technical solution: a multi-scenario lighting energy-saving model training method based on federated learning, such as... Figure 1 As shown, the process includes the following steps: S1, collecting supplementary lighting plan data, actual execution data, and scene illumination data from each federated client, and performing data preprocessing. Based on the preprocessed supplementary lighting plan data, actual execution data, and scene illumination data, supplementary lighting windows are divided to generate a lighting execution association dataset; S2, based on the historical lighting execution association dataset, a planned dimming reference benchmark is established, and the execution deviation of the supplementary lighting window is identified based on the planned dimming reference benchmark. Based on the lighting execution association dataset and the execution deviation, execution status labels for the supplementary lighting windows are generated, and lighting execution training samples are constructed; S3, based on the local lighting execution training samples of each client, a local perception lighting energy-saving model is trained, and local training update data is calculated; S4, before the start of each federated training round, the federated server distributes global model parameters and receives local training update data. The local training update data is grouped, weighted, and aggregated according to the lighting scene type. The global model parameters and model version are updated and distributed, and iterative training of the multi-scene lighting energy-saving model is performed.
[0033] Specifically, the process of collecting supplementary lighting plan data, actual execution data, and scene illumination data from each federated client, and performing data preprocessing, is as follows: The federated client number and lighting scene type are collected through the federated client configuration table of the lighting management platform. This configuration table is pre-established and maintained by the lighting management platform. The federated client number identifies the greenhouse, seedling shed, or plant factory where the lighting management platform, edge acquisition gateway, and local model training environment are deployed. The lighting scene type is written by the lighting management platform according to the corresponding planting facility type, including greenhouse scenes, seedling shed scenes, and plant factory scenes. A one-to-one correspondence between lighting area numbers and lamp group numbers within each federated client is pre-established and stored. Each lamp group number corresponds to an independent power supply branch, an independently controllable intelligent driver, and a lighting area number. For the same lighting area number and the same lamp group number within each federated client, supplementary lighting plan data is collected based on the lighting management platform. This supplementary lighting plan data includes: lighting area number, lamp group number, spectral channel number, plan execution timestamp, and planned dimming ratio for each spectral channel. The lighting area number, lamp group number, and spectral channel number are read from the lamp group configuration record of the lighting management platform. The lighting management platform writes corresponding supplementary lighting plan data to the supplementary lighting plan task table when a supplementary lighting task is created, when the planned dimming ratio of each spectral channel changes, or when a supplementary lighting task ends. The plan execution timestamp is the time when the corresponding planned dimming ratio takes effect. The planned dimming ratio of each spectral channel is the target dimming ratio issued by the lighting management platform to the corresponding smart driver. Actual execution data is collected by reading the communication polling records of smart energy meters, smart drivers, smart circuit breakers, and edge acquisition gateways on the independent power supply branches of each lamp group, as well as the manual control operation logs of the lighting management platform, through a preset sampling period. The actual execution data includes: sampling timestamp, actual lamp group switching status, actual lamp group active power, actual power supply circuit voltage, driver temperature, over-temperature power reduction status, driver current limiting status, circuit overload status, communication connection status, and manual control status. The smart energy meter, smart driver, and smart circuit breaker are each installed on an independent power supply branch of the corresponding lamp group, and are preferably connected to the edge acquisition gateway via an RS485 bus. The edge acquisition gateway reads the corresponding device registers according to the Modbus RTU communication protocol and a preset sampling period. The actual active power of the lamp group and the actual voltage of the power supply circuit are read from the active power register and voltage register of the smart energy meter, respectively, in W and V. The actual switching status of the lamp group is read from the output enable status register of the smart driver. The driver temperature, over-temperature power reduction status, and driver current limiting status are read from the temperature register and fault status register of the smart driver, respectively, where the driver temperature is in °C. The circuit overload status is read from the overload protection status register of the smart circuit breaker.The edge acquisition gateway sends read commands to smart meters, smart drives, and smart circuit breakers in each sampling period. When all necessary devices return valid responses within the current sampling period, the communication connection status is recorded as normal; if any necessary device fails to return a valid response, the communication connection status is recorded as interrupted. Manual control status is read from the lighting management platform's manual control operation log. If the operation log contains records of manual on / off control or manual dimming control for the corresponding light group, the manual control status is recorded as manual; otherwise, it is recorded as automatic. The sampling timestamp is generated by the edge acquisition gateway when reading actual execution data according to a preset sampling period. This preset sampling period is uniformly configured by the lighting management platform before data acquisition begins and synchronously distributed to each federated client. Scene illumination data is collected via quantum sensors, including sampling timestamps, canopy PPFD, and outdoor PPFD. The canopy PPFD is collected by quantum sensors positioned at standard measurement locations of the crop canopy in the corresponding lighting area. These quantum sensors are mounted on adjustable-height brackets, and their detection positions adjust with the crop canopy height. Outdoor PPFD is collected by quantum sensors located in unobstructed locations outside greenhouses or seedling sheds. The quantum sensors are preferably connected to an edge acquisition gateway via an RS485 bus, and the edge acquisition gateway reads the quantum sensor values according to a preset sampling period. The units for both canopy PPFD and outdoor PPFD are μmol / (m²·s). When the lighting scene type is a plant factory scene, outdoor PPFD is recorded as zero. The sampling timestamp in the scene illumination data is generated by the edge acquisition gateway when reading the quantum sensor data. The preset sampling period is determined based on the minimum stable data reporting cycle of smart meters, smart drives, smart circuit breakers, and quantum sensors, as well as the minimum adjustment interval of the supplemental lighting plan's dimming ratio, and is preferably set to 1 to 5 minutes. Each federated client reads the actual execution data and scene illumination data according to the same preset sampling period. Based on the same Network Time Protocol (NTP) time server, clock synchronization is performed on each timestamp. For each lighting area number and each light group number, the supplementary lighting plan data, actual execution data, and scene illumination data are sorted in ascending order of timestamp. Each timestamp includes a planned execution timestamp and a sampling timestamp. Both the lighting management platform and the edge acquisition gateway are connected to the same NTP time server to ensure that the supplementary lighting plan data, actual execution data, and scene illumination data use the same time base. For each lighting area number, each light group number, and each sampling timestamp, the most recent supplementary lighting plan data with a planned execution timestamp no later than the corresponding sampling timestamp is found according to the spectral channel number. The planned dimming ratio of each spectral channel is associated with the corresponding sampling timestamp, forming a planned dimming ratio vector for the corresponding sampling timestamp in ascending order of spectral channel numbers.The spectral channel numbers and their order are pre-stored in the lamp configuration records of the lighting management platform. Each element in the planned dimming ratio vector corresponds one-to-one with its spectral channel number. For positions without a local spectral channel number, the corresponding planned dimming ratio is set to zero to ensure that each federated client generates a planned dimming ratio vector with consistent dimensions. When no supplementary lighting plan data exists before the corresponding sampling timestamp, the planned dimming ratio of each spectral channel under the corresponding sampling timestamp is set to 0. When multiple supplementary lighting plan data correspond to the same lighting area number, lamp group number, and planned execution timestamp, the supplementary lighting plan data with the latest writing time is retained. When the planned dimming ratio of each spectral channel, the actual active power of the lamp group, the actual voltage of the power supply circuit, the driver temperature, the canopy PPFD, and the outdoor PPFD are empty or exceed the equipment's measurement range, the sampling timestamp is marked as invalid. When the actual switching status of the lamp group, the over-temperature power reduction status, the driver current limiting status, the circuit overload status, the communication connection status, and the manual control status are empty or do not belong to the preset status set, the sampling timestamp is marked as invalid. The device measurement range includes the lower and upper limits of smart meters, smart drivers, smart circuit breakers, and quantum sensors, obtained by reading the corresponding device's factory calibration parameters. For example, the planned dimming ratio range for each spectral channel is 0% to 100%, the actual active power range of the lamp group is 0W to 10000W, the actual voltage range of the power supply circuit is 0V to 500V, the driver temperature range is -40℃ to 125℃, and the ranges for canopy PPFD and outdoor PPFD are both 0μmol / (m²·s) to 3000μmol / (m²·s). The preset state set includes: the on and off states corresponding to the actual switching state of the lamp group; the yes and no states corresponding to over-temperature power reduction, driver current limiting, and circuit overload; the normal and interrupted states corresponding to the communication connection state; and the manual and automatic states corresponding to the manual control state. The device measurement range and preset state set are pre-stored in the device configuration table of the edge acquisition gateway. If any data field under the same lighting area number, the same lamp group number, and the same sampling timestamp meets the invalid condition, the sampling timestamp is marked as invalid. The actual switching status of the lamp group, the over-temperature power reduction status, the driver current limiting status, the circuit overload status, the communication connection status, and the manual control status are converted into binary data, including: 1 for an actual switching status of the lamp group being on, and 0 for an actual switching status of the lamp group being off; 1 for over-temperature power reduction status, driver current limiting status, and circuit overload status being yes, and 0 for no status; 1 for a normal communication connection status, and 0 for an interrupted communication connection status; and 1 for a manual control status, and 0 for an automatic manual control status.The binary conversion is performed only on the corresponding state data that is not marked as invalid sampling timestamp, so that state data from different devices can participate in the subsequent supplementary lighting window division, execution deviation identification and training sample construction in a unified numerical form.
[0034] In this implementation plan, by uniformly collecting and associating supplementary lighting plans, actual execution status of lighting groups, and scene lighting data, abnormal, missing, and manually intervened data are filtered out. Furthermore, a lighting execution association dataset is constructed based on a unified clock, a unified sampling period, and a standardized planned dimming ratio vector. This improves the comparability of lighting data across federated clients and the reliability of training samples, providing a data foundation for accurately identifying deviations between plans and actual execution and for training multi-scenario lighting energy-saving models.
[0035] Specifically, the process of dividing the supplementary lighting window based on the preprocessed supplementary lighting plan data, actual execution data, and scene illumination data to generate the lighting execution association dataset is as follows: For each lighting area number and each light group number, the corresponding planned dimming ratio vector and actual execution data are read in ascending order of sampling timestamps; adjacent sampling timestamps refer to two sampling timestamps with adjacent time order under the same lighting area number and the same light group number. When the planned dimming ratio of at least one spectral channel under the sampling timestamp is greater than 0, the corresponding sampling timestamp is determined to be in the planned supplementary lighting state; the set of sampling timestamps where the difference between adjacent sampling timestamps is equal to the sampling period and the corresponding sampling timestamps are all in the planned supplementary lighting state is determined as a planned supplementary lighting window. The planned supplementary lighting window is the largest set of sampling timestamps that meets the above conditions; when the difference between the next sampling timestamp and the previous sampling timestamp is not equal to the sampling period, or when the next sampling timestamp is not in the planned supplementary lighting state, the current planned supplementary lighting window ends, and the planned supplementary lighting window is re-determined starting from the next sampling timestamp that meets the planned supplementary lighting state. The first sampling timestamp of the planned supplemental lighting window is determined as the window start timestamp, and the sum of the last sampling timestamp and the sampling period is determined as the window end timestamp. For each planned supplemental lighting window, the actual execution data and scene illumination data of each sampling timestamp within the window are read. If there is an invalid sampling timestamp, a communication connection status of 0, or a manual control status of 1, the planned supplemental lighting window is removed; otherwise, it is considered a valid planned supplemental lighting window. Invalid sampling timestamps are those with null values during preprocessing, exceeding the device's range, or whose status field does not belong to the preset status set. A communication connection status of 0 indicates that the edge acquisition gateway did not receive a valid response from the corresponding device within the corresponding sampling period. A manual control status of 1 indicates that the corresponding light group has a record of manual switching control or manual dimming control within the planned supplemental lighting window. Removal of a planned supplemental lighting window is a complete removal; that is, if any sampling timestamp within the window meets any of the above conditions, the actual power consumption and cumulative photon quantity of the canopy are not calculated for that planned supplemental lighting window. An effective planned supplemental lighting window refers to a window in which all sampling timestamps are not marked as invalid, the communication connection status is 1, and the manual control status is 0. For each effective planned supplemental lighting window, the actual active power of the lamp group at each sampling timestamp within the window is multiplied by the sampling period and accumulated. The accumulated result is converted into kilowatt-hours to obtain the actual power consumption of the corresponding lamp group within the window. Here, the unit of the actual active power of the lamp group is W, and the unit of the sampling period is s. The unit of the product of the actual active power of each lamp group and the sampling period is watt-second. The product of the actual active power of each lamp group and the sampling period is watt-second. The product of the product results is accumulated and divided by 3.6 million to convert watt-seconds to kilowatt-hours to obtain the actual power consumption.The canopy PPFD at each sampling timestamp within the window is multiplied by the sampling period and accumulated. The accumulated result is converted to moles per square meter to obtain the cumulative canopy photon quantity within the window. The unit of canopy PPFD is μmol / (m²·s), and the unit of sampling period is s. The unit of the product of each canopy PPFD and sampling period is μmol / m². The product of each product result is accumulated and multiplied by 10 to the power of negative 6 to convert from micromoles per square meter to moles per square meter to obtain the cumulative canopy photon quantity. Based on the preprocessed supplementary lighting plan data, actual execution data, and scene illumination data, a lighting execution association dataset is generated. The lighting execution association dataset is stored according to the planned supplementary lighting window and includes at least: federated client number, lighting scene type, lighting area number, lamp group number, window start timestamp, window end timestamp, planned dimming ratio vector sequence, actual switch status sequence of lamp group, actual active power sequence of lamp group, actual voltage sequence of power supply circuit, driver temperature sequence, over-temperature power reduction status sequence, driver current limiting status sequence, circuit overload status sequence, communication connection status sequence, manual control status sequence, canopy PPFD sequence, outdoor PPFD sequence, actual power consumption, and cumulative photon quantity of the canopy.
[0036] In this implementation plan, by dividing the supplementary lighting windows according to the planned supplementary lighting status and eliminating windows containing invalid data, communication interruptions, or manual intervention, the actual power consumption of the lamp group and the cumulative photon quantity of the canopy are correlated within the same automatic supplementary lighting cycle. This reduces the interference of abnormal execution factors on the training data, improves the integrity, temporal consistency, and comparability of the lighting execution data, and provides a reliable data foundation for accurately identifying planned execution deviations and training the lighting energy-saving model.
[0037] Specifically, the process of establishing a planned dimming reference benchmark based on the historical lighting execution association dataset and identifying the execution deviation of the supplementary lighting window based on the planned dimming reference benchmark is as follows: read the historical lighting execution association dataset, where the historical sampling timestamp in the historical lighting execution association dataset is the sampling timestamp of the corresponding valid planned supplementary lighting window ending earlier than the start timestamp of the current valid planned supplementary lighting window to be identified; for different federated clients, the historical lighting execution association data is first distinguished according to the federated client number to avoid mixing of data corresponding to the same lighting area number or lamp group number in different planting facilities. For each lighting zone number and each lamp group number, historical sampling timestamps with the same planned dimming ratio vector are grouped into the same planned dimming ratio group. Here, "same planned dimming ratio vector" means that after quantizing the planned dimming ratio of each spectral channel according to the dimming control precision preset by the lighting management platform, the quantized dimming ratios at the same position in both planned dimming ratio vectors are identical. The dimming control precision is read from the dimming parameter configuration table of the lighting management platform. Preferably, the dimming control precision is 1%, meaning that the planned dimming ratio of each spectral channel is quantized at 1% before being grouped into the planned dimming ratio group. For example, 48.1% and 48.4% can be grouped into the same dimming ratio level at 1% precision, avoiding overly fragmented grouping due to differences in decimal storage precision. Each planned dimming ratio group is associated with at least the corresponding federated client number, lighting zone number, lamp group number, planned dimming ratio vector, and historical sampling timestamp set. Within each planned dimming ratio group, sampling timestamps are selected where the actual on / off state of the lamp group is 1, the over-temperature power reduction state is 0, the driver current limiting state is 0, the circuit overload state is 0, the communication connection state is 1, and the manual control state is 0. These timestamps serve as reference execution sampling timestamps for the planned dimming ratio vector. The reference execution sampling timestamp represents the sampling timestamp when the corresponding lamp group is under automatic control, has normal communication, has not experienced over-temperature power reduction, has not experienced driver current limiting, has not experienced circuit overload, and is actually in the on state. It is used to characterize the normal actual execution power of the lamp group under the corresponding planned dimming ratio vector. The median of the actual active power of the lamp group corresponding to each reference execution sampling timestamp is calculated to obtain the reference actual active power of the planned dimming ratio vector. The reference actual active power is associated and stored with the corresponding federated client number, lighting area number, lamp group number, and planned dimming ratio vector to form the planned dimming reference baseline.When there is no reference execution sampling timestamp that meets the screening criteria in the corresponding planned dimming ratio group, no reference actual active power is generated for the planned dimming ratio vector. When there is no reference actual active power for the planned dimming ratio vector corresponding to any sampling timestamp in the effective planned lighting window, the effective planned lighting window is marked as a reference missing window. The reference execution power consumption, execution power consumption difference and execution energy consumption deviation rate of the corresponding effective planned lighting window are not calculated, and the effective planned lighting window is not used for subsequent execution deviation identification and lighting execution training sample construction. For each effective planned supplemental lighting window, the reference actual active power of the planned dimming ratio vector at each sampling timestamp within the window is read. Each reference actual active power is multiplied by the sampling period and accumulated. The accumulated result is then converted into kilowatt-hours to obtain the reference execution power consumption for the effective planned supplemental lighting window. Specifically, according to the planned dimming ratio vector at each sampling timestamp within the effective planned supplemental lighting window, the reference actual active power with the same federated client number, lighting area number, lamp group number, and planned dimming ratio vector is read from the planned dimming reference benchmark. The unit of the reference actual active power is W, and the unit of the sampling period is s. The product of each reference actual active power and the sampling period is accumulated and divided by 3.6 million to obtain the reference execution power consumption in kWh. The execution power consumption difference is obtained by subtracting the reference execution power consumption from the actual power consumption. The execution power consumption difference is then divided by the sum of the reference execution power consumption and a minimum positive number to obtain the execution power consumption deviation rate. The minimum positive number is a pre-set positive number, preferably 0.000001 kWh, to avoid instability caused by a zero denominator. When the execution power consumption deviation rate is greater than zero, it indicates that the actual power consumption of the corresponding effective planned supplementary lighting window is higher than the reference execution power consumption under normal execution conditions. When the execution power consumption deviation rate is less than zero, it indicates that the actual power consumption of the corresponding effective planned supplementary lighting window is lower than the reference execution power consumption under normal execution conditions. When the execution power consumption deviation rate is equal to or close to zero, it indicates that the actual power consumption of the corresponding effective planned supplementary lighting window is close to the reference execution power consumption.
[0038] In this implementation plan, a planned dimming reference benchmark is constructed based on historical normal execution data of the same federal client, lighting area, and lamp group, and matched with a quantized planned dimming ratio vector. This reduces the impact of decimal precision differences and abnormal operating conditions on the reference power. Furthermore, by comparing the actual power consumption with the reference execution power consumption, the deviation of execution energy consumption can be identified, which can accurately reflect the degree of deviation between the actual execution of the lamp group and the planned dimming, providing a reliable basis for subsequent determination of the execution status of the supplementary lighting window and training of the lighting energy-saving model.
[0039] Specifically, the process of generating execution status labels for supplementary lighting windows based on the lighting execution association dataset and execution deviation, and constructing lighting execution training samples, is as follows: For each effective planned supplementary lighting window, after the effective planned supplementary lighting window ends and the corresponding execution energy consumption deviation rate has been calculated, an execution status label for the corresponding supplementary lighting window is generated; the execution status label is used to record the actual execution status of the supplementary lighting window and is used for subsequent screening and tracing of lighting execution training samples. Execution status labels are generated according to the priority order of execution interruption windows, protection power limit windows, planned consistent execution windows, and non-protection execution deviation windows; when the same effective planned supplementary lighting window simultaneously meets the judgment conditions of multiple window categories, only the execution status label with the highest priority is retained, so that each effective planned supplementary lighting window corresponds to a unique execution status label; including: when there is at least one lamp group with an actual switching state of 0 within the window, the effective planned supplementary lighting window is marked as an execution interruption window; the execution interruption window represents the lamp group experiencing actual shutdown or power interruption during the planned supplementary lighting process; for the execution interruption window, only the corresponding execution status label and window association data are associated and stored, and no corresponding lighting execution training samples are constructed. When the actual switching state of the lamp group at each sampling timestamp within the window is 1, and at least one sampling timestamp has an over-temperature power reduction state of 1, a driver current limiting state of 1, or a circuit overload state of 1, the effective planned supplementary lighting window is marked as a protective power limiting window. The protective power limiting window represents the protective power limitation triggered by the lamp group due to driver over-temperature, driver current limiting, or power supply circuit overload while the lamp group is kept on. When the actual switching state of the lamp group at each sampling timestamp within the window is 1, the over-temperature power reduction state, driver current limiting state, and circuit overload state are all 0, and the absolute value of the execution energy consumption deviation rate is less than or equal to the execution energy consumption deviation threshold, the effective planned supplementary lighting window is marked as a planned consistent execution window. The execution energy consumption deviation threshold is pre-stored in the threshold parameter configuration table of the lighting management platform and is used to characterize the allowable energy consumption deviation range under normal execution conditions. Preferably, based on historical normal execution data composed of historical reference execution sampling timestamps, the absolute value of the execution energy consumption deviation rate corresponding to each historical normal execution supplementary lighting window is calculated, and its ninetieth percentile is determined as the execution energy consumption deviation threshold. When the actual switching status of the lamp group corresponding to each sampling timestamp in the window is 1, the over-temperature power reduction status, driver current limiting status and circuit overload status are all 0, and the absolute value of the execution energy consumption deviation rate is greater than the execution energy consumption deviation threshold, the effective planned supplementary lighting window is marked as a non-protection execution deviation window. The non-protection execution deviation window indicates that the lamp group has not experienced switching interruption and protection power limiting status, but the actual power consumption deviates from the corresponding planned dimming reference standard beyond the allowable range.For the planned consistent execution window, the protection power limiting window, and the non-protection execution deviation window, the actual voltage sequence of the power supply circuit, the driver temperature sequence, and the outdoor PPFD sequence within the preset observation period before the start timestamp of the window are extracted, along with the planned dimming ratio vector sequence, the reference actual active power sequence, the actual power consumption, and the cumulative photon quantity of the canopy within the window, to generate lighting execution training samples. The preset observation period is uniformly configured by the lighting management platform and determined according to the preset sampling period, with a preferred setting of fifteen minutes. The end time of the preset observation period is the adjacent sampling timestamp before the start timestamp of the window. The actual voltage sequence of the power supply circuit, the driver temperature sequence, and the outdoor PPFD sequence are all arranged in ascending order of the sampling timestamps. The planned dimming ratio vector sequence and the reference actual active power sequence are arranged in ascending order according to the sampling timestamps within the window. Each element in the reference actual active power sequence is the reference actual active power that matches the planned dimming ratio vector at the corresponding sampling timestamp. The actual voltage sequence of the power supply circuit, the driver temperature sequence, the outdoor PPFD sequence, the planned dimming ratio vector sequence, and the reference actual active power sequence serve as input data for the lighting execution training samples. The actual power consumption and the cumulative photon quantity of the canopy serve as the supervision results for the lighting execution training samples. If there is an invalid sampling timestamp, a missing sampling timestamp, or no corresponding reference actual active power at any sampling timestamp within the window within the preset observation time before the window start timestamp, no corresponding lighting execution training sample is generated. The execution interruption window is only used as an abnormal window record for when the supplementary lighting plan is not executed continuously, and the corresponding execution status label, window start timestamp, window end timestamp, and actual execution data are stored together. No corresponding lighting execution training sample is generated. The reason is that the actual activation process of the lights within the interruption window is discontinuous. The actual power consumption and the cumulative photon quantity of the canopy are affected by both the interruption time and the interruption duration, making it impossible to stably represent the continuous execution results of the corresponding supplementary lighting plan, equipment operating status, and scene lighting conditions. Excluding the execution interruption window from the lighting execution training samples can prevent the model from taking the discontinuous results caused by the supplementary lighting interruption as normal and learnable lighting execution results. Furthermore, each lighting execution training sample is stored according to the lighting area number and the light group number. Each lighting execution training sample is also associated with the federated client number, lighting scene type, window start timestamp, window end timestamp, and execution status label to support subsequent local model training according to the federated client and to trace training samples under different execution states.
[0040] like Figure 3The diagram shows the distribution of energy consumption deviations between the execution status of supplementary lighting windows and the actual energy consumption of each effective planned supplementary lighting window, calculated based on the planned dimming reference benchmark. The vertical axis represents the actual energy consumption accumulated by the corresponding window based on the actual active power of the lamp group. The dashed line "reference line y=x" indicates that the actual energy consumption is consistent with the reference execution energy consumption. The gray threshold band represents the planned consistent execution range where the absolute value of the execution energy consumption deviation rate does not exceed the execution energy consumption deviation threshold. Hollow circles represent planned consistent execution windows, most of which are located within the threshold band, indicating that the actual execution energy consumption of the lamp group is close to the normal reference execution energy consumption. Solid triangles represent protection power limiting windows, most of which are located below the reference line, indicating that although the lamp group is in the on state, the actual energy consumption is lower than the reference execution energy consumption due to protection states such as over-temperature power reduction, driver current limiting, or circuit overload. Cross-shaped points represent non-protected execution deviation windows, which are located outside the threshold band, indicating that the protection state has not been triggered, but the actual execution energy consumption still deviates significantly from the planned dimming reference benchmark. The figure only shows the planned consistent execution window, the protection power limit window, and the non-protection execution deviation window. The execution interruption window is only recorded as an anomaly and is not included in the construction of the lighting execution training sample.
[0041] In this implementation plan, by uniquely marking the execution status of the supplementary lighting window according to priority, non-continuous operation samples with execution interruptions are eliminated, and states such as protection power limit, planned consistent execution, and non-protection execution deviation are distinguished, which can reduce the interference of abnormal shutdowns and abnormal control on training results. Furthermore, by combining the equipment operation and environmental light sequence in front of the window, the supplementary lighting plan in the window, and reference power data to construct training samples, the model can learn the actual power consumption and the cumulative photon quantity of the canopy based on actual power supply, temperature, and natural light conditions, thereby improving the authenticity and predictive adaptability of the training data of the multi-scenario lighting energy-saving model.
[0042] Specifically, the process of training the local sensing lighting energy-saving model based on the local lighting execution training samples of each client is as follows: For each federated client, each lighting execution training sample stored locally is read; each federated client trains the local sensing lighting energy-saving model according to the unified model structure, preset standard spectral channel number set, and current global model parameters issued by the federated server, to ensure that the model input dimension, network parameter dimension, and prediction output dimension of each federated client are consistent; the lighting execution training samples are all training samples corresponding to the planned consistent execution window, the protection power limit window, or the non-protection execution deviation window, and the execution interruption window is only recorded as an abnormal window and does not participate in the training of the local sensing lighting energy-saving model. The actual voltage sequence of the power supply circuit, the driver temperature sequence, and the outdoor PPFD sequence within the preset observation period before the window start timestamp, as well as the planned dimming ratio vector sequence and the reference actual active power sequence within the window, are concatenated to obtain the lighting execution feature vector sequence. Among them, the concatenation includes the concatenation of feature dimensions under the same sampling timestamp, and the concatenation of feature dimensions corresponding to the feature extraction results of different feature sub-sequences. The observation data before the window start timestamp and the planned execution data within the window are not concatenated point by point according to the timestamp. For each sampling timestamp within a preset observation period prior to the start timestamp of the window, the actual voltage of the power supply circuit, the driver temperature, and the outdoor PPFD are concatenated along the feature dimension according to a unified preset field order to obtain the preceding operating state feature vector for the corresponding sampling timestamp. These are then arranged into a preceding operating state feature subsequence in ascending order of sampling timestamps. For each sampling timestamp within the window, the planned dimming ratio vector and the reference actual active power corresponding to the same sampling timestamp are concatenated along the feature dimension according to a unified preset field order to obtain the planned execution feature vector for the corresponding sampling timestamp. These are then arranged into a planned execution feature subsequence in ascending order of sampling timestamps. The lighting execution feature vector sequence includes the preceding operating state feature subsequence and the planned execution feature subsequence. The preceding operating state feature subsequence characterizes the power supply status, driver thermal status, and natural light status before the start of the planned supplementary lighting window. The planned execution feature subsequence characterizes the target dimming strategy and corresponding normal execution power benchmark for each time period within the current planned supplementary lighting window. The preceding operating state feature subsequence and the planned execution feature subsequence correspond to different time ranges and are allowed to have different sequence lengths. If there are missing or invalid sampling timestamps within the preset observation duration before the start timestamp of the window, or if the actual number of sampling timestamps is less than the number of samples corresponding to the preset observation duration, no corresponding lighting execution training sample will be generated. Similarly, if the planned dimming ratio vector or reference actual active power corresponding to any sampling timestamp within the window is missing, invalid, or cannot be correlated, no corresponding lighting execution training sample will be generated. Note that filling zeros for locally unconfigured standard spectral channels is considered channel missing padding, not data missing.The normalized lighting execution feature vector sequence is input into a dual GRU network, and the actual power consumption and canopy cumulative photon quantity are used as supervision labels to train a local sensing lighting energy-saving model. The sensing lighting energy-saving model includes an actual power consumption prediction branch and a canopy cumulative photon quantity prediction branch. Specifically, the actual voltage of the power supply circuit, driver temperature, outdoor PPFD, planned dimming ratio, and reference actual active power are subjected to min-max normalization processing according to the normalization lower limit and normalization upper limit pre-issued by the federated server, respectively, to obtain input features with values ranging from zero to one. The normalization lower limit and normalization upper limit are determined based on the range, dimming ratio range, and reference actual active power range in the equipment configuration table. The dual GRU network includes a first GRU network and a second GRU network. The pre-operational state feature subsequence is input into the first GRU network to obtain fixed-dimensional pre-operational state features; the planned execution feature subsequence is input into the second GRU network to obtain fixed-dimensional planned execution features; then, the pre-operational state features and planned execution features are concatenated along the feature dimension to obtain the comprehensive lighting execution features. The actual power consumption prediction branch predicts actual power consumption based on the comprehensive feature output of lighting execution, while the canopy cumulative photon quantity prediction branch predicts canopy cumulative photon quantity based on the comprehensive feature output of lighting execution. During batch training of multiple lighting execution training samples, the shorter feature subsequences are padded with zeros at the end according to the maximum length of the previous running state feature subsequence and the maximum length of the planned execution feature subsequence in the current batch, generating corresponding effective time step masks. The first and second GRU networks extract features only based on the feature data corresponding to the effective time steps to avoid the zero-padding data affecting the model training results. By inputting the current lighting execution feature vector sequence into the local sensing lighting energy-saving model, the predicted actual power consumption and predicted canopy cumulative photon quantity are obtained. The current lighting execution feature vector sequence refers to a lighting execution feature vector sequence generated for the currently scheduled supplemental lighting window, based on the actual voltage of the power supply circuit, driver temperature, and outdoor PPFD collected within a preset observation period before the window's start timestamp, as well as the planned dimming ratio vector corresponding to the current scheduled supplemental lighting window and the reference actual active power. During the prediction process, the actual power consumption and cumulative photon quantity of the canopy are not read for the current scheduled supplemental lighting window. The predicted actual power consumption and predicted cumulative photon quantity of the canopy are inversely normalized and output in kilowatt-hours and moles per square meter, respectively.
[0043] In this implementation scheme, by extracting time-series features of the equipment operation and natural light reception status in front of the window, the planned dimming strategy within the window, and the reference power benchmark, and by using a dual GRU network to fuse features from different time ranges, information distortion caused by direct alignment of sequences of different lengths can be avoided. At the same time, by using actual power consumption and cumulative photon quantity in the canopy as joint supervision results, the model can comprehensively learn the relationship between equipment operation status, supplementary lighting plan and actual supplementary lighting effect, thereby improving the accuracy and adaptability of multi-scenario lighting energy-saving prediction.
[0044] Specifically, the process of calculating the local training update data is as follows: Calculate the mean square error of the actual power consumption between the predicted and actual power consumption, and calculate the mean square error of the cumulative canopy photon quantity between the predicted and cumulative canopy photon quantity. Specifically, for each illumination sample in the current local training batch, calculate the squared difference between the predicted and actual power consumption, and average the squared differences to obtain the mean square error of the actual power consumption; calculate the squared difference between the predicted and cumulative canopy photon quantity, and average the squared differences to obtain the mean square error of the cumulative canopy photon quantity. To avoid the difference in magnitude between actual power consumption and cumulative canopy photon quantity affecting model training, the predicted actual power consumption, actual power consumption, predicted cumulative canopy photon quantity, and cumulative canopy photon quantity can be normalized according to the preset lower and upper normalization limits of the corresponding supervision results, and then the mean square error can be calculated. The normalization range of actual power consumption is from zero to the maximum power consumption obtained by multiplying the rated maximum active power of the lamp group by the preset maximum planned supplementary lighting duration. The normalization range of cumulative canopy photon quantity is from zero to the maximum cumulative photon quantity obtained by multiplying the upper limit of the quantum sensor PPFD range by the preset maximum planned supplementary lighting duration. The rated maximum active power, the upper limit of the PPFD range, and the preset maximum planned supplementary lighting duration are read from the equipment configuration parameters, factory calibration parameters, and supplementary lighting plan configuration table, respectively. The mean square error of actual power consumption and the mean square error of cumulative photon quantity in the canopy are added together to obtain the local model training loss. This local model training loss is used to simultaneously measure the prediction bias of the local sensing lighting energy-saving model regarding the actual power consumption of the window and the cumulative photon quantity in the canopy, ensuring that the model considers both the predicted lighting energy consumption and the predicted actual supplementary lighting effect during training. Based on the local model training loss, the backpropagation algorithm is used to update the model parameters of the local sensing lighting energy-saving model. When the number of training epochs reaches a threshold, updating the local model parameters stops, resulting in the completed local sensing lighting energy-saving model. At the start of each federated training round, the current global model parameters issued by the federated server are used as the model parameters of the local sensing lighting energy-saving model before training. The gradients corresponding to each model parameter are calculated based on the local model training loss, and the Adam optimization algorithm is used to iteratively update the model parameters according to the current gradients and the first and second moment estimates of the gradients. The initial learning rate, the first moment estimate decay coefficient, the second moment estimate decay coefficient, and the numerical stability term are pre-configured by the federated server and issued to each federated client. Preferably, the initial learning rate is 0.001, the first moment estimate decay coefficient is 0.9, the second moment estimate decay coefficient is 0.999, and the numerical stability term is 10 to the power of negative 8. The model parameters include at least the model parameters of the first GRU network, the model parameters of the second GRU network, the model parameters of the actual power consumption prediction branch, and the model parameters of the canopy cumulative photon quantity prediction branch.The training round threshold is a pre-configured positive integer on the federated server, determined based on the number of lighting execution training samples for each federated client, the time consumed in a single local training session, and the preset federated aggregation interval. This balances the convergence effect of the local model, the computational load on the client, and the degree of parameter offset across multiple clients. Preferably, the training round threshold is set to 1 to 10. One training round represents the process of completing one model prediction, local model training loss calculation, and model parameter update for all locally stored lighting execution training samples. When the number of repeated training sessions for all lighting execution training samples reaches the training round threshold, local model parameter updates are stopped, resulting in a trained local perception lighting energy-saving model. The model parameters of the local perception lighting energy-saving model after training are subtracted from those before training to obtain the update amount of each local model parameter. The number of lighting execution training samples participating in the local model training is also counted. The local training update data is output and sent to the federated server. The local training update data includes: federated client number, lighting scene type, local model parameter update amount, and number of lighting execution training samples. Specifically, for parameter elements with the same position and dimension in the model parameters, the local model parameter update amount is obtained by subtracting the parameter elements before training from the parameter elements after training. The local model parameter update amounts are then compiled into parameter update data according to the parameter hierarchy and parameter arrangement order of the local sensing lighting energy-saving model. The number of lighting execution training samples is the total number of lighting execution training samples actually participating in the local model training in this federated training round, excluding samples that did not participate in training due to missing observation data before the window, missing reference actual active power, or other invalid conditions. The federated client only sends the local model parameter update amount and the number of lighting execution training samples to the federated server, without sending locally stored supplementary lighting plan data, actual execution data, scene illumination data, and lighting execution training samples, to reduce the transmission of raw lighting operation data between federated clients. Optionally, each client divides locally retained verification samples from the local training samples, calculates the verification loss locally after receiving the updated global model, and only sends the verification loss value and the corresponding number of verification samples to the federated server; the server obtains the global verification loss by weighting the sample count.
[0045] In this implementation plan, by training a local model based on the bi-objective mean square error and updating the parameters according to a unified normalization range, Adam optimization parameters, and the number of local training rounds, each federated client can form a consistent local model update volume while taking into account both actual power consumption and lighting effect prediction. At the same time, only the parameter update volume and sample number are uploaded without uploading the original lighting data, which reduces the risk of original operation data transmission and provides a reliable basis for subsequent multi-scenario federated weighted aggregation.
[0046] Specifically, before the start of each federated training round, the federated server distributes global model parameters and receives local training update data as follows: Before the first round of local sensing lighting energy-saving model training, the federated server constructs a sensing lighting energy-saving model with the same network structure as the local sensing lighting energy-saving model of each federated client, initializes the model parameters in the sensing lighting energy-saving model, obtains global model parameters, and generates a global model version number. Before the first round of training of the local sensing lighting energy-saving model, the federated server calls the pre-deployed model building program to read the number of standard spectral channel numbers, the dimension of the first GRU network hidden layer, the dimension of the second GRU network hidden layer, and the number of prediction branch layers from the model structure configuration table. A first input layer with an input dimension of 3 is constructed according to the actual voltage of the power supply circuit, the driver temperature, and the outdoor PPFD. A first GRU network is then created sequentially after the first input layer to obtain the pre-operational state features. A second input layer with an input dimension of the number of standard spectral channel numbers plus 1 is constructed according to the number of standard spectral channel numbers and the reference actual active power. A second GRU network is then created sequentially after the second input layer to obtain the planned execution features. The pre-operational state features and the planned execution features are concatenated along the feature dimension to obtain the comprehensive lighting execution features. Based on the comprehensive lighting execution features, an actual power consumption prediction branch and a canopy cumulative photon quantity prediction branch are created respectively. The output layer of each prediction branch outputs a predicted value, thereby constructing the sensing lighting energy-saving model. The federated server generates corresponding weight parameters and bias parameters according to the hierarchical order of the first GRU network, the second GRU network, the actual power consumption prediction branch, and the canopy cumulative photon quantity prediction branch in the constructed network. It then uses a Xavier uniform distribution to initially assign values to the weight parameters and initializes the bias parameters to zero, obtaining the initial global model parameters. The global model version number is used to identify the federated training round corresponding to the current global model parameters. In this embodiment, the initial global model version number is set to V0. Before the start of training for each local sensing lighting energy-saving model, the federated server sends the current global model parameters and the global model version number to each federated client. Each federated client uses the current global model parameters as the model parameters before training its local sensing lighting energy-saving model, completes local model training, and calculates the local model parameter update amount. Specifically, the federated server sends the current global model parameters and the global model version number to each federated client before the start of each federated training round. The current global model parameters are encapsulated according to the preset model parameter hierarchy and parameter arrangement order, and are associated with the model structure identifier and the global model version number. After receiving the current global model parameters, the federated client verifies the model structure identifier, model parameter dimensions, and global model version number. When the verification passes, the current global model parameters are loaded into the local sensing lighting energy-saving model as the model parameters before the current round of local model training.After each federated client completes local model training, it calculates the local model parameter update based on the local model parameters after training and the model parameters before training. It then assembles the local training update data by including the federated client number, lighting scene type, local model parameter update amount, number of lighting training samples, and the corresponding global model version number. The federated server receives the local training update data from each federated client and designates the client that sent the data as a participating aggregation client. The federated server performs version consistency checks and parameter dimension checks on the received local training update data. If the global model version number in the local training update data matches the current global model version number, and the parameter hierarchy and parameter dimension of the local model parameter update amount match the current global model parameters, the corresponding federated client is determined to be a participating aggregation client. If the local training update data is not returned within the preset reception time, or fails the version consistency check or parameter dimension check, the corresponding federated client is not included in the participating aggregation clients for the current federated training round. When there are no participating aggregation clients in the current round, the global model parameter update amount is not calculated, the current global model parameters and global model version number remain unchanged, and the process proceeds to the next federated training round.
[0047] In this implementation plan, a global model with the same structure as the local model is uniformly constructed and initialized by a federated server, which can ensure that the input dimensions, network layers and parameter arrangement of each client are consistent. Furthermore, by using the model version number, model structure identifier and parameter dimension to verify and screen the clients participating in the aggregation, it is possible to avoid the mixing of update data from different training rounds or abnormal parameters into the aggregation process, thereby improving the availability of local training update data of multiple clients and the stability of subsequent global model iterations.
[0048] Specifically, the process of iteratively training a multi-scene lighting energy-saving model involves grouping and weighting the locally trained update data according to lighting scene type, updating and distributing global model parameters and model versions, as follows: For each lighting scene type, participating clients belonging to the same lighting scene type are grouped into the same scene aggregation group. These participating clients are federated clients that have passed global model version consistency checks and model parameter dimension checks. Lighting scene types include greenhouse scenes, seedling shed scenes, and plant factory scenes, and participating clients within the same scene aggregation group have the same lighting scene type. For each scene aggregation group, the sum of the number of lighting execution training samples for each participating client is calculated, and this number is divided by the sum of the number of lighting execution training samples within the corresponding scene aggregation group to obtain the scene-specific aggregation weight. The sum of the number of lighting execution training samples is the sum of the number of lighting execution training samples actually participated in by each participating client in the current federated training round. The sum of the scene-specific aggregation weights is 1. Since the participating clients have completed local model training, the number of lighting execution training samples is positive. For each scene aggregation group, the local model parameter update of each participating client is multiplied by the corresponding scene aggregation weight, and the weighted results for the same model parameter positions are summed to obtain the scene model parameter update of the corresponding lighting scene type. The local model parameter update, scene model parameter update, and global model parameter update correspond to the parameter hierarchy and parameter arrangement order of the first GRU network, the second GRU network, the actual power consumption prediction branch, and the canopy cumulative photon quantity prediction branch. For each identical parameter position in the weight matrix and bias vector, multiplication and summation are performed respectively. For each model parameter position, the scene model parameter update under each lighting scene type is added together and divided by the number of lighting scene types participating in the current aggregation round to obtain the global model parameter update. The number of lighting scene types participating in the current aggregation round is the number of scene aggregation groups that include at least one participating client in the current federated training round. When there is only one scene aggregation group in the current round, the scene model parameter update corresponding to that scene aggregation group is determined as the global model parameter update. By weighting the parameter update amounts of each scene aggregation group equally, the influence of lighting scene types with a large number of training samples on the parameter update results of other lighting scene types is avoided. The global model parameter update amounts are added to the current global model parameters item by item based on the same model parameter position to obtain the updated global model parameters; specifically, each parameter element in the current global model parameters is added to the corresponding position's global model parameter update amount to obtain the updated model parameter element at that position.Increment the current global model version number to obtain the new global model version number; for example, when the current global model version number is Vq, the new global model version number is determined to be V(q+1), where q is the current federated training round number. Send the updated global model parameters and the new global model version number to each federated client. The updated global model parameters are encapsulated according to the preset model parameter hierarchy and parameter arrangement order, and sent in association with the model structure identifier and the new global model version number. After receiving the updated global model parameters, each federated client replaces the model parameters of its local perceptual lighting energy-saving model with the updated global model parameters, and trains on the newly added lighting execution training samples in the next federated training round. The newly added lighting execution training samples are those newly generated after the end of the current federated training round and that meet the training sample construction conditions. The newly added lighting execution training samples are merged with the lighting execution training samples already stored locally by the federated client to form the local training sample set for the next federated training round. The process of repeatedly executing global model parameter distribution, local model training, local training update data upload, scene grouping and weighted aggregation, and global model parameter update is used to achieve iterative training of multi-scene lighting energy-saving models.
[0049] like Figure 4 The figure shows the variation of validation loss during multi-scenario federated training. The horizontal axis represents the number of federated training rounds, and the vertical axis represents the normalized validation loss. The curves for the greenhouse, seedling shed, and plant factory scenarios represent the joint loss of the updated global model on the locally retained validation samples in each scenario, specifically the prediction error of actual power consumption and the prediction error of cumulative photon quantity in the canopy, reflecting the model's adaptability under different lighting scenarios. The curves for each scenario generally decrease with increasing federated training rounds, indicating that the federated server, by weighting and aggregating training samples within the same scenario and merging model updates across scenarios, can gradually reduce the prediction bias in each scenario. The global model curve represents the validation loss of the federated server on a unified global validation sample set; its continuous decrease indicates that the overall predictive ability of the multi-scenario lighting energy-saving model gradually converges and tends to stabilize.
[0050] In this implementation plan, by weighting and aggregating the local model update volume according to the number of training samples within the same lighting scenario, and performing equal-weighted fusion between different lighting scenarios, the differences in data contribution within the same scenario and the training fairness between different scenarios can be taken into account, reducing the dominant influence of an excessively large sample size in a single scenario on the global model; at the same time, through model version iteration and continuous training with new samples, the global model can gradually adapt to the lighting operation characteristics of multiple scenarios such as greenhouses, seedling sheds and plant factories.
[0051] Reference Figure 2As shown, the second aspect of the present invention provides a training system for a multi-scene lighting energy-saving model based on federated learning, applied to the aforementioned training method for a multi-scene lighting energy-saving model based on federated learning. The system includes: a lighting execution data processing module, used to collect supplementary lighting plan data, actual execution data, and scene illumination data from each federated client, and to perform data preprocessing; based on the preprocessed supplementary lighting plan data, actual execution data, and scene illumination data, a supplementary lighting window is divided to generate a lighting execution association dataset; and a plan execution deviation identification module, used to establish a planned dimming reference benchmark based on the historical lighting execution association dataset, and to identify supplementary lighting deviations based on the planned dimming reference benchmark. The execution deviation of the light window is used to generate the execution status label of the supplementary light window based on the lighting execution association dataset and the execution deviation, and to construct lighting execution training samples. The local energy-saving model training module is used to train the local perception lighting energy-saving model based on the local lighting execution training samples of each client, and to calculate the local training update data. The multi-scene federated aggregation module is used to distribute global model parameters and receive local training update data before the start of each federated training round. It then groups and weights the local training update data according to the lighting scene type, updates and distributes the global model parameters and model version, and performs iterative training of the multi-scene lighting energy-saving model.
[0052] In this implementation plan, through collaborative settings such as lighting execution data processing, plan execution deviation identification, local energy-saving model training, and multi-scenario federated aggregation, reliable training samples can be constructed based on the actual supplemental lighting execution status and scene lighting results, reducing the impact of inconsistencies between planned and actual execution, equipment protection, and human intervention on model training. At the same time, without transmitting the original lighting operation data, the training results of different scenarios such as greenhouses, seedling sheds, and plant factories are integrated to improve the prediction accuracy, scene adaptability, and data security of the lighting energy-saving model.
[0053] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0054] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. As those skilled in the art will understand, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.
Claims
1. A training method for a multi-scenario lighting energy-saving model based on federated learning, characterized in that, Includes the following steps: S1 collects supplementary lighting plan data, actual execution data, and scene lighting data from each federated client, performs data preprocessing, divides supplementary lighting windows based on the preprocessed supplementary lighting plan data, actual execution data, and scene lighting data, and generates a lighting execution related dataset; S2, based on the historical lighting execution association dataset, establish a planned dimming reference benchmark, identify the execution deviation of the supplementary lighting window based on the planned dimming reference benchmark, generate the execution status label of the supplementary lighting window based on the lighting execution association dataset and the execution deviation, and construct lighting execution training samples; S3 trains a local sensing lighting energy-saving model based on the local lighting execution training samples of each client, and calculates local training update data; S4. Before each federated training round begins, the federated server distributes global model parameters and receives local training update data. It then groups and weights the local training update data according to the lighting scene type, updates and distributes global model parameters and model version, and performs iterative training of the multi-scene lighting energy-saving model.
2. The method for training a multi-scenario lighting energy-saving model based on federated learning according to claim 1, characterized in that, The specific process of collecting supplementary lighting plan data, actual execution data, and scene illumination data from each federal client, and performing data preprocessing, is as follows: The lighting management platform collects the federal client number and lighting scene type through the federal client configuration table. For the same lighting area number and the same lamp group number within each federal client, the lighting plan data is collected based on the lighting management platform. The lighting plan data includes: lighting area number, lamp group number, spectral channel number, plan execution timestamp, and planned dimming ratio of each spectral channel. By reading the communication polling records of smart energy meters, smart drivers, smart circuit breakers, edge acquisition gateways, and manual control operation logs of the lighting management platform on the independent power supply branches of each lamp group through a preset sampling period, the actual execution data is collected. The actual execution data includes: sampling timestamp, actual switching status of lamp group, actual active power of lamp group, actual voltage of power supply circuit, driver temperature, power reduction status due to over-temperature, current limiting status of driver, circuit overload status, communication connection status, and manual control status. Scene illumination data is collected using quantum sensors. The scene illumination data includes: sampling timestamp, canopy PPFD, and outdoor PPFD. Based on the same Network Time Protocol (NTP) time server, clock synchronization is performed on each timestamp, and the supplementary lighting plan data, actual execution data, and scene lighting data are sorted in ascending order of timestamp. For each lighting area number, each light group number, and each sampling timestamp, the most recent supplementary lighting plan data with a planned execution timestamp no later than the corresponding sampling timestamp is found according to the spectral channel number. The planned dimming ratio of each spectral channel is associated with the corresponding sampling timestamp, and the planned dimming ratio vector for the corresponding sampling timestamp is formed in ascending order of spectral channel number. When the planned dimming ratio of each spectral channel, the actual active power of the lamp group, the actual voltage of the power supply circuit, the driver temperature, the canopy PPFD and the outdoor PPFD are empty or exceed the range of the equipment, the sampling timestamp will be marked as an invalid sampling timestamp; when the actual switching status of the lamp group, the over-temperature power reduction status, the driver current limiting status, the circuit overload status, the communication connection status and the manual control status are empty or do not belong to the preset status set, the sampling timestamp will be marked as an invalid sampling timestamp. The actual switching status of the lamp group, the over-temperature power reduction status, the driver current limiting status, the circuit overload status, the communication connection status, and the manual control status are converted into binary data, including: 1 when the actual switching status of the lamp group is on, and 0 when the actual switching status of the lamp group is off; 1 when the over-temperature power reduction status, driver current limiting status, and circuit overload status are yes, and 0 when no; 1 when the communication connection status is normal, and 0 when the communication connection status is interrupted; 1 when the manual control status is manual, and 0 when the manual control status is automatic.
3. The method for training a multi-scenario lighting energy-saving model based on federated learning according to claim 1, characterized in that, The specific process of dividing the supplementary lighting window based on the preprocessed supplementary lighting plan data, actual execution data, and scene lighting data, and generating the lighting execution association dataset is as follows: For each lighting area number and each lamp group number, when the planned dimming ratio of at least one spectral channel under the sampling timestamp is greater than 0, it is determined that the corresponding sampling timestamp is in the planned supplementary lighting state; A set of sampling timestamps whose difference between adjacent sampling timestamps equals the sampling period and whose corresponding sampling timestamps are all in the planned supplementary lighting state is defined as a planned supplementary lighting window; For each planned supplementary lighting window, the actual execution data and scene illumination data of each sampling timestamp in the window are read. If there is an invalid sampling timestamp, the communication connection status is 0, or the manual control status is 1, the planned supplementary lighting window is removed; otherwise, the planned supplementary lighting window is regarded as a valid planned supplementary lighting window. For each effective planned supplemental lighting window, the actual active power of the lamp group at each sampling timestamp within the window is multiplied by the sampling period and accumulated. The accumulated result is converted into kilowatt-hours to obtain the actual power consumption of the corresponding lamp group within the window. The canopy PPFD at each sampling timestamp within the window is multiplied by the sampling period and accumulated. The accumulated result is converted into moles per square meter to obtain the cumulative photon quantity of the canopy within the window. Based on the preprocessed supplemental lighting plan data, actual execution data, and scene illumination data, a lighting execution association dataset is generated.
4. The method for training a multi-scenario lighting energy-saving model based on federated learning according to claim 1, characterized in that, The specific process of establishing a planned dimming reference baseline based on the historical lighting execution correlation dataset, and identifying the execution deviation of the supplementary lighting window based on the planned dimming reference baseline is as follows: Read the historical lighting execution association dataset, and for each lighting area number and each lamp group number, group the historical sampling timestamps with the same planned dimming ratio vector into the same planned dimming ratio group; In each planned dimming ratio group, the sampling timestamps of the lamp group with actual switching status of 1, over-temperature power reduction status of 0, driver current limiting status of 0, circuit overload status of 0, communication connection status of 1, and manual control status of 0 are selected as the reference execution sampling timestamps for the planned dimming ratio vector. Calculate the median of the actual active power of the lamp group corresponding to each reference execution sampling timestamp to obtain the reference actual active power of the planned dimming ratio vector; For each effective planned supplementary lighting window, the reference actual active power of the planned dimming ratio vector at each sampling timestamp within the window is read, each reference actual active power is multiplied by the sampling period and accumulated, and the accumulated result is converted into kilowatt-hours to obtain the reference execution power consumption of the effective planned supplementary lighting window. Subtract the reference execution power consumption from the actual power consumption to obtain the execution power consumption difference. Divide the execution power consumption difference by the sum of the reference execution power consumption and the smallest positive number to obtain the execution energy consumption deviation rate.
5. The method for training a multi-scenario lighting energy-saving model based on federated learning according to claim 1, characterized in that, The specific process of generating execution state labels for supplementary lighting windows based on the lighting execution association dataset and execution bias, and constructing lighting execution training samples is as follows: For each valid planned supplemental lighting window, the execution status is determined according to the priority order of execution interruption window, protection power limit window, planned consistency execution window, and non-protection execution deviation window, and an execution status label is generated. This includes: when at least one lamp group within the window has an actual switching state of 0 at each sampling timestamp, the valid planned supplemental lighting window is marked as an execution interruption window; when the actual switching state of all lamp groups within the window is 1, and at least one sampling timestamp has an over-temperature power reduction state of 1, a driver current limiting state of 1, or a circuit overload state of 1, the valid planned supplemental lighting window is marked as a protection power limit window. Power window; when the actual switching state of the lamp group at each sampling timestamp within the window is 1, the over-temperature power reduction state, the driver current limiting state, and the circuit overload state are all 0, and the absolute value of the execution energy consumption deviation rate is less than or equal to the execution energy consumption deviation threshold, the effective planned supplementary lighting window is marked as a planned consistent execution window; when the actual switching state of the lamp group corresponding to each sampling timestamp within the window is 1, the over-temperature power reduction state, the driver current limiting state, and the circuit overload state are all 0, and the absolute value of the execution energy consumption deviation rate is greater than the execution energy consumption deviation threshold, the effective planned supplementary lighting window is marked as a non-protection execution deviation window; For the planned consistent execution window, the protection power limit window, and the non-protection execution deviation window, the actual voltage sequence of the power supply circuit, the driver temperature sequence, and the outdoor PPFD sequence within the preset observation period before the start timestamp of the window are extracted, as well as the planned dimming ratio vector sequence, the reference actual active power sequence, the actual power consumption, and the cumulative photon quantity of the canopy within the window, to generate lighting execution training samples, and each lighting execution training sample is stored according to the lighting area number and the lamp group number.
6. The method for training a multi-scenario lighting energy-saving model based on federated learning according to claim 1, characterized in that, The specific process of training the local perception lighting energy-saving model based on the local lighting execution training samples of each client is as follows: For each federal client, read each lighting execution training sample stored locally, and concatenate the actual voltage sequence of the power supply circuit, the driver temperature sequence, and the outdoor PPFD sequence within the preset observation period before the window start timestamp, as well as the planned dimming ratio vector sequence and the reference actual active power sequence within the window, to obtain the lighting execution feature vector sequence. The normalized lighting execution feature vector sequence is input into a dual GRU network, and the actual power consumption and the cumulative photon quantity of the canopy are used as supervision labels to train a local sensing lighting energy-saving model. The sensing lighting energy-saving model includes: an actual power consumption prediction branch and a canopy cumulative photon quantity prediction branch. By inputting the current lighting performance feature vector sequence into the local sensing lighting energy-saving model, the predicted actual power consumption and the predicted cumulative photon quantity of the canopy are obtained.
7. The method for training a multi-scenario lighting energy-saving model based on federated learning according to claim 1, characterized in that, The specific process for calculating the local training update data is as follows: Calculate the mean square error of the actual power consumption between the predicted and actual power consumption, and calculate the mean square error of the cumulative canopy photon quantity between the predicted and cumulative canopy photon quantity; add the mean square error of the actual power consumption and the mean square error of the cumulative canopy photon quantity to obtain the local model training loss; Based on the local model training loss, the backpropagation algorithm is used to update the model parameters of the local sensing lighting energy-saving model. When the number of training rounds reaches the training round threshold, the local model parameters are stopped from being updated, and the trained local sensing lighting energy-saving model is obtained. The model parameters of the local perception lighting energy-saving model after training are subtracted one by one from those before training to obtain the update amount of each local model parameter. The number of lighting execution training samples participating in the local model training is also counted. The local training update data is output and sent to the federated server. The local training update data includes: federated client number, lighting scene type, local model parameter update amount, and number of lighting execution training samples.
8. The method for training a multi-scenario lighting energy-saving model based on federated learning according to claim 1, characterized in that, The specific process by which the federated server distributes global model parameters and receives local training update data before the start of each federated training round is as follows: Before the first round of training of the local sensing lighting energy-saving model, the federated server constructs a sensing lighting energy-saving model with the same network structure as the local sensing lighting energy-saving model of each federated client, and initializes the model parameters in the sensing lighting energy-saving model to obtain the global model parameters and generate the global model version number. Before the training of each local sensing lighting energy-saving model begins, the federated server sends the current global model parameters and global model version number to each federated client. Each federated client uses the current global model parameters as the model parameters before the training of the local sensing lighting energy-saving model, completes the local model training, and calculates the local model parameter update amount. The federated server receives local training update data sent by each federated client and designates the federated client that sent the local training update data as a participating aggregation client.
9. The method for training a multi-scenario lighting energy-saving model based on federated learning according to claim 1, characterized in that, The specific process of grouping and weighting the local training update data according to the lighting scene type, updating and distributing the global model parameters and model version, and iteratively training the multi-scene lighting energy-saving model is as follows: For each lighting scene type, participating clients belonging to the same lighting scene type are grouped into the same scene aggregation group; for each scene aggregation group, the sum of the number of lighting execution training samples of each participating client is calculated, and the number of lighting execution training samples of each participating client is divided by the sum of the number of lighting execution training samples in the corresponding scene aggregation group to obtain the scene aggregation weight; For each scene aggregation group, the local model parameter update amount of each participating client is multiplied by the corresponding scene aggregation weight, and the weighted results of the same model parameter positions are summed to obtain the scene model parameter update amount of the corresponding lighting scene type. For each model parameter location, the update amounts of scene model parameters under each lighting scene type are added together and divided by the number of lighting scene types participating in this round of aggregation to obtain the global model parameter update amount; Based on the same model parameter position, the global model parameter update amount is added to the current global model parameter item by item to obtain the updated global model parameter; the current global model version number is incremented by one to obtain the new global model version number; the updated global model parameter and the new global model version number are sent to each federated client; After receiving the updated global model parameters, each federated client replaces the model parameters of its local sensing lighting energy-saving model with the updated global model parameters, and trains the model based on the newly added lighting execution training samples in the next federated training round.
10. A multi-scenario lighting energy-saving model training system based on federated learning, characterized in that, include: The lighting execution data processing module is used to collect supplementary lighting plan data, actual execution data, and scene lighting data from each federated client, and to perform data preprocessing. Based on the preprocessed supplementary lighting plan data, actual execution data, and scene lighting data, supplementary lighting windows are divided to generate a lighting execution related dataset. The plan execution deviation identification module is used to establish a plan dimming reference benchmark based on the historical lighting execution association dataset, identify the execution deviation of the supplementary lighting window based on the plan dimming reference benchmark, generate the execution status label of the supplementary lighting window based on the lighting execution association dataset and the execution deviation, and construct lighting execution training samples; The local energy-saving model training module is used to train a local sensing lighting energy-saving model based on local lighting execution training samples on each client, and to calculate local training update data. The multi-scenario federated aggregation module is used to distribute global model parameters and receive local training update data before the start of each federated training round. It then groups and weights the local training update data according to the lighting scene type, updates and distributes global model parameters and model version, and performs iterative training of the multi-scenario lighting energy-saving model.
Citation Information
Patent Citations
Model training methods and federated learning systems based on federated learning
CN115719092B
Federal learning model training data generation method and federal learning model training method
CN117454972A