Illumination control method and device, illumination equipment and storage medium
By using Generative Adversarial Networks (GANs) to process user behavior, preference, time and environment data, and generate personalized lighting effect prediction data, the problem that existing intelligent lighting systems are difficult to meet users' personalized needs is solved, and more efficient and energy-saving lighting control is achieved.
Patent Information
- Application Number
- CN202411925876.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-05-27
AI Technical Summary
Existing smart lighting systems are difficult to meet users' personalized lighting needs and usually rely on preset rules and simple sensor data.
By obtaining user behavior data, user preference data, current time data and environmental data, and using generators and discriminators of Generative Adversarial Networks (GANs) to generate lighting effect prediction data in line with user needs and preferences, thereby controlling the work of the lighting module.
It achieves more accurate generation of lighting effects that meet user needs, improves the comfort of users using lighting equipment, and reduces unnecessary energy consumption and achieves energy saving goals by optimizing lighting effects.
Smart Images

Figure CN120050820A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart home, and particularly to a lighting control method, device, lighting equipment and storage medium. Background Art
[0002] With the continuous development of smart home technology, users' personalized and intelligent demands for the home environment are increasing day by day. As an important part of smart home, the intelligent lighting system not only needs to provide basic lighting functions, but also needs to meet users' personalized demands.
[0003] However, the current intelligent lighting systems usually rely on preset rules and simple sensor data, and it is difficult to meet users' personalized lighting demands. Summary of the Invention
[0004] To solve the above technical problems or at least partially solve the above technical problems, this application provides a lighting control method, device, lighting equipment and storage medium.
[0005] In a first aspect, this application provides a lighting control method, including:
[0006] Obtain user behavior data, user preference data, current time data and environmental data of the environment where the user is currently located;
[0007] Based on the user behavior data, the user preference data, the current time data, the environmental data and the generator of the generative adversarial network, determine first lighting effect prediction data;
[0008] According to the first lighting effect prediction data and the discriminator of the generative adversarial network, determine first judgment data;
[0009] If the first judgment data meets a preset condition, control the lighting module to work according to the first lighting effect prediction data.
[0010] Optionally, based on the user behavior data, the user preference data, the current time data, the environmental data and the generator of the generative adversarial network, determining first lighting effect prediction data includes:
[0011] Input the user behavior data, the user preference data, the current time data and the environmental data into the generator;
[0012] The generator encodes the user behavior data, the user preference data, the current time data and the environmental data to obtain first encoded data;
[0013] Input the first encoded data into the neural network of the generator, and the generator outputs the first predicted lighting effect data.
[0014] Optionally, determining first judgment data according to the first predicted lighting effect data and the discriminator of the generative adversarial network includes:
[0015] Encode the first predicted lighting effect data to obtain second encoded data;
[0016] Input the second encoded data into the discriminator, and the discriminator outputs the first judgment data.
[0017] Optionally, the training method of the generative adversarial network includes:
[0018] Obtain a training data set and actual lighting effect data;
[0019] Determine second predicted lighting effect data according to the training data set and the generator;
[0020] Determine second judgment data from the second predicted lighting effect data, the actual lighting effect data, and the discriminator;
[0021] If the second judgment data does not meet the preset conditions, the generator updates the first model parameters according to the second judgment data, and the discriminator updates the second model parameters according to the second judgment data and the actual lighting data until the third judgment data output by the discriminator meets the preset conditions, obtaining a trained generator and discriminator.
[0022] Optionally, determining second predicted lighting effect data according to the training data set and the generator includes:
[0023] Input the behavior training data, preference training data, time training data, and environment training data in the training data set into the generator;
[0024] The generator encodes the behavior training data, the preference training data, the time training data, and the environment training data to obtain third encoded data;
[0025] Input the third encoded data into the neural network of the generator, and the generator outputs the second predicted lighting effect data.
[0026] Optionally, determining second judgment data from the second predicted lighting effect data, the actual lighting effect data, and the discriminator includes:
[0027] Encode the second predicted lighting effect data and the actual lighting effect data respectively to obtain fourth encoded data and fifth encoded data;
[0028] Input the fourth encoded data and the fifth encoded data into the discriminator, and the discriminator outputs second judgment data.
[0029] Optionally, the method further includes:
[0030] Obtain user feedback data;
[0031] If the user feedback data meets the model optimization conditions, obtain model optimization training data and lighting effect optimization data;
[0032] Use the model optimization training data and the lighting effect optimization data to continue optimizing and training the generator and the discriminator, and obtain the optimized generator and discriminator.
[0033] In a second aspect, the present application provides an illumination control device, including:
[0034] A first acquisition module, configured to acquire user behavior data, user preference data, current time data, and environmental data of the environment where the user is currently located;
[0035] A first determination module, configured to determine first illumination effect prediction data based on the user behavior data, the user preference data, the current time data, the environmental data, and a generator of a generative adversarial network;
[0036] A second determination module, configured to determine first judgment data according to the first illumination effect prediction data and a discriminator of the generative adversarial network;
[0037] A first control module, configured to, if the first judgment data meets a preset condition, control the lighting module to work according to the first illumination effect prediction data.
[0038] Optionally, the first determination module includes:
[0039] A first input unit, configured to input the user behavior data, the user preference data, the current time data, and the environmental data into the generator;
[0040] A first encoding unit, configured to encode the user behavior data, the user preference data, the current time data, and the environmental data by the generator to obtain first encoded data;
[0041] A second input unit, configured to input the first encoded data into a neural network of the generator, and the generator outputs the first illumination effect prediction data.
[0042] Optionally, the second determination module includes:
[0043] A second encoding unit, configured to encode the first lighting effect prediction data to obtain second encoded data;
[0044] A third input unit, configured to input the second encoded data into the discriminator, and the discriminator outputs first judgment data.
[0045] Optionally, the apparatus further includes:
[0046] A second acquisition module, configured to acquire a training data set and actual lighting effect data;
[0047] A third determination module, configured to determine second lighting effect prediction data according to the training data set and the generator;
[0048] A fourth determination module, configured to determine second judgment data based on the second lighting effect prediction data, the actual lighting effect data, and the discriminator;
[0049] A parameter update module, configured to, if the second judgment data does not meet a preset condition, the generator updates first model parameters according to the second judgment data, and the discriminator updates second model parameters according to the second judgment data and the actual lighting data, until third judgment data output by the discriminator meets the preset condition, so as to obtain a trained generator and discriminator.
[0050] Optionally, the third determination module includes:
[0051] A fourth input unit, configured to input behavior training data, preference training data, time training data, and environment training data in the training data set into the generator;
[0052] A third encoding unit, configured to encode the behavior training data, the preference training data, the time training data, and the environment training data by the generator to obtain third encoded data;
[0053] A fifth input unit, configured to input the third encoded data into a neural network of the generator, and the generator outputs the second lighting effect prediction data.
[0054] Optionally, the fourth determination module includes:
[0055] A fourth encoding unit, configured to respectively encode the second lighting effect prediction data and the actual lighting effect data to obtain fourth encoded data and fifth encoded data;
[0056] A sixth input unit, configured to input the fourth encoded data and the fifth encoded data into the discriminator, and the discriminator outputs second judgment data.
[0057] Optionally, the device further includes:
[0058] A third acquisition module, configured to acquire user feedback data;
[0059] A fourth acquisition module, configured to acquire model optimization training data and lighting effect optimization data if the user feedback data meets the model optimization conditions;
[0060] An optimization training module, configured to continue to optimize and train the generator and the discriminator by using the model optimization training data and the lighting effect optimization data, so as to obtain the optimized generator and discriminator.
[0061] In a third aspect, the present application provides a lighting device, including a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete mutual communication through the communication bus;
[0062] The memory is used to store a computer program;
[0063] The processor is configured to implement the lighting control method according to any one of the first aspects when executing the program stored on the memory.
[0064] In a fourth aspect, the present application provides a computer-readable storage medium, on which a program of a lighting control method is stored. When the program of the lighting control method is executed by a processor, the steps of the lighting control method according to any one of the first aspects are implemented.
[0065] The above technical solutions provided by the embodiments of the present application have the following advantages compared with the prior art:
[0066] In the embodiments of the present application, by inputting the user's activity pattern, environmental data, user preferences, and time data into the generator of the generative adversarial network (GANs), and then discriminating the first lighting effect prediction data by the discriminator of the generative adversarial network (GANs), the first lighting effect prediction data that meets the user's needs and preferences can be generated. Furthermore, the lighting module outputs a lighting effect that more meets the user's needs and preferences. By introducing the generative adversarial network (GANs) and more comprehensive multi-dimensional input information, the accuracy of the generated effect can be improved, the comfort of the user using the lighting device can be enhanced, and by optimizing the lighting effect, unnecessary energy consumption can be reduced to achieve the energy-saving goal. Description of the Drawings
[0067] The drawings here are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present invention, and are used together with the specification to explain the principles of the present invention.
[0068] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0069] Figure 1 It is a flowchart of a lighting control method provided by an embodiment of the present application;
[0070] Figure 2 It is a structural diagram of a lighting control device provided by an embodiment of the present application;
[0071] Figure 3 It is a structural diagram of a lighting device provided by an embodiment of the present application. Detailed implementation manners
[0072] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0073] Since current intelligent lighting systems usually rely on preset rules and simple sensor data, it is difficult to meet the personalized lighting needs of users. For this reason, the embodiments of the present application provide a lighting control method, device, lighting device, and storage medium.
[0074] The embodiments of the present application provide a lighting control method, which can be applied to lighting devices. The lighting devices can refer to intelligent bulbs, intelligent switches, etc. As Figure 1 shown, it can include the following steps:
[0075] Step S101, obtaining user behavior data, user preference data, current time data, and environmental data of the environment where the user is currently located;
[0076] In the embodiments of the present application, the user behavior data can be collected through devices such as smart watches and smart cameras. The user behavior data can include information such as the user's activity time and activity type. For example, the system records that the user usually watches TV in the living room at 9 pm and enters the bedroom to prepare to sleep after 10 pm.
[0077] Environmental data can be collected through devices such as light sensors, temperature sensors, and humidity sensors. Environmental data can include information such as indoor light intensity, temperature, and humidity. For example, the system records that the natural light intensity in the living room is high during the day and the artificial light intensity is low at night.
[0078] User preference data can be collected through user terminals (including smartphones, tablets, etc.). User preference data can include information such as the user's color temperature preference and brightness preference. For example, the user likes warm lights at night and bright lights in the morning.
[0079] Current time data can be obtained through the system clock. Current time data can include the current time and date. For example, the current time is 9:30 pm and the season is autumn.
[0080] Step S102: Based on the user behavior data, the user preference data, the current time data, the environmental data, and the generator of the generative adversarial network, determine the first lighting effect prediction data;
[0081] In this step, the user behavior data, the user preference data, the current time data, and the environmental data can be input into the generator of the generative adversarial network, and the generator outputs the first lighting effect prediction data.
[0082] In an implementation manner of the present application, step S102 determines the first lighting effect prediction data based on the user behavior data, the user preference data, the current time data, the environmental data, and the generator of the generative adversarial network, including: inputting the user behavior data, the user preference data, the current time data, and the environmental data into the generator, and the generator encodes the user behavior data, the user preference data, the current time data, and the environmental data to obtain first encoded data; inputting the first encoded data into the neural network of the generator, and the generator outputs the first lighting effect prediction data.
[0083] The user behavior data, the user preference data, the current time data, and the environmental data can be encoded in the form of vectors or matrices for input into the neural network structure of the generator. For example, the input data can be represented as:
[0084] {
[0085] "activity_time":{"9:00 - 10:00":"living_room"},
[0086] "activity_type":{"9:00 - 10:00":"watching_tv"},
[0087] "light_intensity": {"living_room": 100},
[0088] "temperature": {"living_room": 25},
[0089] "humidity": {"living_room": 50},
[0090] "color_temperature_preference": {"9:00 - 10:00": 3000},
[0091] "brightness_preference": {"9:00 - 10:00": 80},
[0092] "current_time": "2023-10-05 21:30:00",
[0093] "season": "fall"
[0094] }
[0095] In the embodiments of the present application, the generator adopts a deep neural network (DNN) structure, receives user behavior data, environmental data, user preference data, and time data, encodes these data into vector or matrix form for input into the neural network. The generator generates a recommended lighting effect, including color temperature and brightness. The output layer outputs the generated lighting effect, specifically including the color temperature value and the brightness value. For example, the generator can output the following lighting effect:
[0096] {
[0097] "color_temperature": 3000,
[0098] "rgb_value": [255, 204, 153],
[0099] "brightness_percentage": 80,
[0100] "brightness_value": 204
[0101] }
[0102] Step S103, determine the first judgment data according to the first lighting effect prediction data and the discriminator of the generative adversarial network;
[0103] In this step, the first lighting effect prediction data can be input into the discriminator of the generative adversarial network, and the discriminator outputs the first judgment data.
[0104] In an implementation manner of the present application, step S103 determines the first judgment data according to the first lighting effect prediction data and the discriminator of the generative adversarial network, including inputting the first lighting effect prediction data into the discriminator, and the discriminator encodes the first lighting effect prediction data to obtain second encoded data; inputting the second encoded data into the neural network of the discriminator, and the discriminator outputs the first judgment data.
[0105] In an embodiment of the present application, the discriminator also adopts a deep neural network (DNN) structure, which receives the generated lighting effect and the actual lighting effect, and encodes the generated lighting effect and the actual lighting effect into a vector or matrix form for input into the neural network. The discriminator outputs a probability value indicating whether the generated lighting effect is real or generated. The output layer outputs a probability value between 0 and 1, and the closer the probability value is to 1, the closer the generated lighting effect is to the real data.
[0106] Step S104, if the first judgment data meets the preset condition, control the lighting module to work according to the first lighting effect prediction data.
[0107] In an embodiment of the present application, the preset condition may refer to that the first judgment data is within a preset numerical range or is a specified value. Exemplarily, the preset numerical range may be 0.7 to 1.1, and the specified value may be 1, etc.
[0108] In this step, when the first judgment data is close to 1 or equal to 1, it indicates that the predicted first lighting effect prediction data is closer to the target parameter corresponding to the lighting effect currently required by the user. Therefore, the first lighting effect prediction data can be used as the control parameter of the lighting module, and the lighting module works based on the first lighting effect prediction data.
[0109] The lighting device can adjust the control parameters of the lighting module, such as lighting color and brightness, in real time according to the activity mode, environmental data, user preferences, and time data. For example, the system adjusts the lights to a color temperature of 3000K and a brightness of 80% according to the user's activity of watching TV in the living room.
[0110] In the embodiments of the present application, by inputting the user's activity pattern, environmental data, user preferences, and time data into the generator of a generative adversarial network (GANs), and then using the discriminator of the generative adversarial network (GANs) to discriminate the first lighting effect prediction data, the first lighting effect prediction data that meets the user's needs and preferences can be generated. Furthermore, the lighting module can output a lighting effect that better meets the user's needs and preferences. By introducing the generative adversarial network (GANs) and more comprehensive multi-dimensional input information, the present application can improve the accuracy of the generated effect, enhance the comfort of the user when using lighting equipment, and achieve the energy-saving goal by optimizing the lighting effect and reducing unnecessary energy consumption.
[0111] For ease of understanding, the present application also provides an embodiment in actual application as follows:
[0112] Suppose the current time is 9:30 pm and user Xiaoming is watching TV in the living room. The working process of the generator is as follows:
[0113] Input data:
[0114] {
[0115] "activity_time":{"9:00-10:00":"living_room"},
[0116] "activity_type":{"9:00-10:00":"watching_tv"},
[0117] "light_intensity":{"living_room":100},
[0118] "temperature":{"living_room":25},
[0119] "humidity":{"living_room":50},
[0120] "color_temperature_preference":{"9:00-10:00":3000},
[0121] "brightness_preference":{"9:00-10:00":80},
[0122] "current_time":"2023-10-05 21:30:00",
[0123] "season":"fall"
[0124] }
[0125] The generator processes the input data through a multi - layer neural network to extract high - level features. The generator generates a recommended lighting effect based on the user's activity patterns, environmental conditions, and preferences:
[0126] {
[0127] "color_temperature": 3000,
[0128] "rgb_value": [255, 204, 153],
[0129] "brightness_percentage": 80,
[0130] "brightness_value": 204
[0131] }
[0132] The discriminator evaluates whether the generated lighting effect meets the user's actual needs and preferences. Assume that the discriminator confirms that the generated lighting effect meets the user's needs and preferences.
[0133] The system automatically adjusts the lights in the living room to a color temperature of 3000K and a brightness of 80% according to the generated lighting effect. The user confirms that the lighting effect is satisfactory through the smart home application, and the system records this feedback to further optimize the generation model.
[0134] In another embodiment of the present application, the training method of the generative adversarial network includes:
[0135] Step S201, obtaining a training data set and actual lighting effect data;
[0136] In the embodiment of the present application, the training data set includes: behavior training data, preference training data, time training data, and environmental training data. The actual lighting effect data may refer to the control parameters of the lighting equipment actually used by the user in a scenario where the user behavior data is behavior training data, the user preference data is preference training data, the time data is time training data, and the environmental data is environmental training data.
[0137] Step S202, determining second lighting effect prediction data according to the training data set and the generator;
[0138] In this step, the training data set can be input into the generator, and the generator outputs the second lighting effect prediction data.
[0139] In an implementation manner of the present application, step S202 determining the second lighting effect prediction data according to the training data set and the generator includes:
[0140] Input the behavior training data, preference training data, time training data, and environment training data in the training data set into the generator. The generator encodes the behavior training data, the preference training data, the time training data, and the environment training data to obtain third encoded data; input the third encoded data into the neural network of the generator, and the generator outputs the second lighting effect prediction data.
[0141] Step S203: Determine the second judgment data based on the second lighting effect prediction data, the actual lighting effect data, and the discriminator.
[0142] In this step, the second lighting effect prediction data and the actual lighting effect data can be input into the discriminator, and the discriminator outputs the second judgment data.
[0143] In an implementation manner of the present application, determining the second judgment data based on the second lighting effect prediction data, the actual lighting effect data, and the discriminator includes:
[0144] Input the second lighting effect prediction data and the actual lighting effect data into the discriminator. The discriminator encodes the second lighting effect prediction data and the actual lighting effect data respectively to obtain fourth encoded data and fifth encoded data; input the fourth encoded data and the fifth encoded data into the neural network of the discriminator, and the discriminator outputs the second judgment data.
[0145] Step S204: If the second judgment data does not meet the preset conditions, the generator updates the first model parameters according to the second judgment data, and the discriminator updates the second model parameters according to the second judgment data and the actual lighting data until the third judgment data output by the discriminator meets the preset conditions, and the trained generator and discriminator are obtained.
[0146] Based on the above, in practical applications, the training process of the generator usually cooperates with the discriminator to form an adversarial training process. The specific steps are as follows:
[0147] 1. The generator generates samples: The generator generates the second lighting effect prediction data according to the input training data set (including behavior training data, preference training data, time training data, and environment training data). For example, the color temperature generated by the generator is 3000K, and the brightness is 80%.
[0148] 2. The discriminator evaluates the samples: The discriminator evaluates whether the generated second lighting effect prediction data meets the actual needs and preferences of the user. The discriminator outputs a probability value indicating whether the generated lighting effect is real or generated.
[0149] 3. Loss calculation: Calculate the loss of the generator, usually using the output of the discriminator as feedback. The goal of the generator is to generate lighting effects that are as close as possible to the real data, so that the discriminator cannot accurately distinguish between the generated lighting effects and the actual lighting effects.
[0150] Suppose the lighting effect generated by the generator is a color temperature of 3000K and a brightness of 80%, and the actual lighting effect is also a color temperature of 3000K and a brightness of 80%. If the discriminator cannot distinguish between the generated lighting effect and the actual lighting effect, the discriminator may output a probability value close to 0.5, indicating that it cannot determine whether this lighting effect is generated or actual. In this case, the goal of the generator is achieved because the lighting effect it generates is very realistic.
[0151] In this way, the generator and the discriminator are continuously optimized during the adversarial training process. The generator gradually generates more realistic lighting effects, while the discriminator continuously improves its discrimination ability. Eventually, the generator can generate high-quality lighting effects that meet the user's needs, providing a more comfortable and energy-efficient lighting experience.
[0152] 4. Backpropagation: Update the parameters of the generator through the backpropagation algorithm to minimize the loss function. The parameter update formula for the generator is:
[0153]
[0154] where θ gen are the parameters of the generator, η is the learning rate, and L gen is the loss function of the generator.
[0155] 5. Iterative training: The generator and the discriminator are alternately trained until the generator can generate high-quality lighting effects and the discriminator has difficulty distinguishing between the generated lighting effects and the real data.
[0156] In another embodiment of the present application, the method further includes:
[0157] Step S301, obtaining user feedback data;
[0158] In the embodiments of the present application, the user feedback data may refer to user satisfaction, dissatisfaction, or suggestions feedback by the user through the user terminal.
[0159] Step S302, if the user feedback data meets the model optimization condition, obtaining model optimization training data and lighting effect optimization data;
[0160] The model optimization condition may refer to that the user feedback data is user satisfaction, or the satisfaction degree is greater than a preset satisfaction degree threshold, etc.
[0161] Step S303: Using the model to optimize the training data and the lighting effect optimization data to continue optimizing and training the generator and the discriminator, and obtaining the optimized generator and discriminator.
[0162] Step S304: The system can adjust the lighting effect in real time and optimize it according to the user's feedback, improving the user experience.
[0163] In the embodiment of the present application, the user can provide feedback through the smart home application, and the system further optimizes the generated lighting effect according to the feedback. For example, if the user confirms that the current lighting effect is satisfactory, the system records this feedback and further optimizes the generation model.
[0164] For example: Suppose the current generator of the system has been trained for a period of time and can generate lighting effects according to the user's activity pattern, environmental data, user preferences, and time data. The lighting effect generated by the current generator is as follows:
[0165] Color temperature: 3000K
[0166] Brightness: 80%
[0167] The lighting effect (color temperature 3000K, brightness 80%) generated by the generator has received satisfactory feedback from the user.
[0168] The generator considers the current generation effect to be successful, so it will continue to optimize the parameters of the generator to generate a similar lighting effect in a similar situation.
[0169] The generator will adjust its internal parameters according to the user's feedback to generate a similar lighting effect (color temperature 3000K, brightness 80%) in a similar situation (watching TV in the living room at 9:30 pm, with similar environmental data and user preferences).
[0170] The generator will increase the weight of generating this lighting effect to make the probability of generating a similar lighting effect higher in the future.
[0171] In another embodiment of the present application, there is also provided a lighting control device, as Figure 2 shown, including:
[0172] A first acquisition module 11, configured to acquire user behavior data, user preference data, current time data, and environmental data of the environment where the user is currently located;
[0173] A first determination module 12, configured to determine first lighting effect prediction data based on the user behavior data, the user preference data, the current time data, the environmental data, and the generator of the generative adversarial network;
[0174] The second determination module 13 is configured to determine first judgment data according to the first lighting effect prediction data and the discriminator of the generative adversarial network;
[0175] The first control module 14 is configured to, if the first judgment data meets a preset condition, control the lighting module to work according to the first lighting effect prediction data.
[0176] Optionally, the first determination module includes:
[0177] The first input unit is configured to input the user behavior data, the user preference data, the current time data, and the environmental data into the generator;
[0178] The first encoding unit is configured to encode the user behavior data, the user preference data, the current time data, and the environmental data by the generator to obtain first encoded data;
[0179] The second input unit is configured to input the first encoded data into the neural network of the generator, and the generator outputs the first lighting effect prediction data.
[0180] Optionally, the second determination module includes:
[0181] The second encoding unit is configured to encode the first lighting effect prediction data to obtain second encoded data;
[0182] The third input unit is configured to input the second encoded data into the discriminator, and the discriminator outputs first judgment data.
[0183] Optionally, the device further includes:
[0184] The second acquisition module is configured to acquire a training data set and actual lighting effect data;
[0185] The third determination module is configured to determine second lighting effect prediction data according to the training data set and the generator;
[0186] The fourth determination module is configured to determine second judgment data from the second lighting effect prediction data, the actual lighting effect data, and the discriminator;
[0187] The parameter update module is configured to, if the second judgment data does not meet a preset condition, update first model parameters of the generator according to the second judgment data, and update second model parameters of the discriminator according to the second judgment data and the actual lighting data, until the third judgment data output by the discriminator meets the preset condition, to obtain a trained generator and discriminator.
[0188] Optionally, the third determination module includes:
[0189] A fourth input unit, configured to input the behavior training data, preference training data, time training data, and environment training data in the training data set into the generator;
[0190] A third encoding unit, configured to encode the behavior training data, the preference training data, the time training data, and the environment training data by the generator to obtain third encoded data;
[0191] A fifth input unit, configured to input the third encoded data into a neural network of the generator, and the generator outputs the second lighting effect prediction data.
[0192] Optionally, the fourth determination module includes:
[0193] A fourth encoding unit, configured to encode the second lighting effect prediction data and the actual lighting effect data respectively to obtain fourth encoded data and fifth encoded data;
[0194] A sixth input unit, configured to input the fourth encoded data and the fifth encoded data into the discriminator, and the discriminator outputs second determination data.
[0195] Optionally, the apparatus further includes:
[0196] A third acquisition module, configured to acquire user feedback data;
[0197] A fourth acquisition module, configured to acquire model optimization training data and lighting effect optimization data if the user feedback data meets a model optimization condition;
[0198] An optimization training module, configured to continue to optimize and train the generator and the discriminator by using the model optimization training data and the lighting effect optimization data to obtain the optimized generator and discriminator.
[0199] In another embodiment of the present application, there is also provided a lighting device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus;
[0200] The memory is configured to store a computer program;
[0201] The processor is configured to implement the lighting control method described in any one of the foregoing method embodiments when executing the program stored in the memory.
[0202] The lighting device provided by the embodiment of the present invention enables the processor to input the user's activity pattern, environmental data, user preferences, and time data into the generator of the generative adversarial network (GANs) by executing the program stored on the memory. Then, the discriminator of the generative adversarial network (GANs) discriminates the first lighting effect prediction data, and the first lighting effect prediction data that meets the user's needs and preferences can be generated. Furthermore, the lighting module outputs a lighting effect that better meets the user's needs and preferences. By introducing the generative adversarial network (GANs) and more comprehensive multi-dimensional input information, the present application can improve the accuracy of the generated effect, enhance the comfort of the user using the lighting device, and achieve the energy-saving goal by optimizing the lighting effect and reducing unnecessary energy consumption.
[0203] The communication bus 1140 mentioned in the above lighting device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus 1140 can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity of representation, Figure 3 only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.
[0204] The communication interface 1120 is used for communication between the above lighting device and other devices.
[0205] The memory 1130 may include a Random Access Memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor.
[0206] The above-mentioned processor 1110 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0207] In yet another embodiment of the present application, a computer-readable storage medium is further provided. A program of the lighting control method is stored on the computer-readable storage medium. When the lighting control method program is executed by a processor, the steps of the lighting control method described in any of the foregoing method embodiments are implemented.
[0208] It should be noted that in this document, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0209] The above are only specific embodiments of the present invention, enabling those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather to the broadest scope consistent with the principles and novel features claimed herein.
Claims
1. A lighting control method, characterized in that: include: Obtain user behavior data, user preference data, current time data, and environmental data of the user's current environment; Determine first lighting effect prediction data based on the user behavior data, the user preference data, the current time data, the environment data, and a generator of a generative adversarial network; Determining first decision data according to the first lighting effect prediction data and the discriminator of the generative adversarial network; If the first judgment data meets a preset condition, the lighting module is controlled to operate according to the first lighting effect prediction data.
2. The lighting control method according to claim 1, characterized in that: Determining first lighting effect prediction data based on the user behavior data, the user preference data, the current time data, the environment data, and a generator of a generative adversarial network includes: Inputting the user behavior data, the user preference data, the current time data, and the environment data into the generator; The generator encodes the user behavior data, the user preference data, the current time data, and the environment data to obtain first encoded data; The first encoded data is input into the neural network of the generator, and the generator outputs the first lighting effect prediction data.
3. The lighting control method according to claim 1, characterized in that: Determining first decision data according to the first lighting effect prediction data and the discriminator of the generative adversarial network includes: encoding the first lighting effect prediction data to obtain second encoded data; The second coded data is input to the discriminator, and the discriminator outputs first decision data.
4. The lighting control method according to claim 1, characterized in that: The training method of the generative adversarial network includes: Obtain training data sets and actual lighting effect data; Determine second lighting effect prediction data according to the training data set and the generator; Determine second decision data by using the second lighting effect prediction data, the actual lighting effect data and the discriminator; If the second judgment data does not meet the preset conditions, the generator updates the first model parameters according to the second judgment data, and the discriminator updates the second model parameters according to the second judgment data and the actual lighting data, until the third judgment data output by the discriminator meets the preset conditions, thereby obtaining a trained generator and discriminator.
5. The lighting control method according to claim 4, characterized in that: Determining second lighting effect prediction data according to the training data set and the generator includes: Inputting the behavior training data, preference training data, time training data and environment training data in the training data set into the generator; The generator encodes the behavior training data, the preference training data, the time training data and the environment training data to obtain third encoded data; The third encoded data is input into the neural network of the generator, and the generator outputs the second lighting effect prediction data.
6. The lighting control method according to claim 4, characterized in that: The second lighting effect prediction data, the actual lighting effect data and the discriminator are used to determine second decision data, including: Encoding the second lighting effect prediction data and the actual lighting effect data respectively to obtain fourth encoded data and fifth encoded data; The fourth coded data and the fifth coded data are input to the discriminator, and the discriminator outputs second decision data.
7. The lighting control method according to claim 1, characterized in that: The method further comprises: Obtain user feedback data; If the user feedback data meets the model optimization conditions, obtain model optimization training data and lighting effect optimization data; The generator and the discriminator are further optimized and trained using the model optimization training data and the lighting effect optimization data to obtain the optimized generator and the discriminator.
8. A lighting control device, characterized in that: include: The first acquisition module is used to acquire user behavior data, user preference data, current time data and environmental data of the user's current environment; A first determination module, configured to determine first lighting effect prediction data based on the user behavior data, the user preference data, the current time data, the environment data, and a generator of a generative adversarial network; A second determination module, configured to determine first decision data according to the first lighting effect prediction data and a discriminator of the generative adversarial network; The first control module is used to control the operation of the lighting module according to the first lighting effect prediction data if the first judgment data meets a preset condition.
9. A lighting device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; The processor is used to implement the lighting control method described in any one of claims 1 to 7 when executing the program stored in the memory.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program of the lighting control method, and when the lighting control method program is executed by a processor, the steps of the lighting control method according to any one of claims 1 to 7 are implemented.