Console light switching control method based on artificial intelligence
Through the intelligent desk lighting switching control method based on artificial intelligence, low-power sensors and multi-modal data fusion, combined with reinforcement learning and abnormal detection, the flexibility and stability problems of the existing technology middle desk lighting switching control are solved, and intelligent and personalized lighting management and efficient resource utilization are realized.
Patent Information
- Application Number
- CN202510645776.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2045-05-20
AI Technical Summary
The existing smart desk lighting switching control methods lack flexibility and cannot adapt to complex environment changes, resulting in false triggering, delayed response or unreasonable adjustment, unreasonable allocation of computing resources leads to decreased response speed during peak periods and waste of resources during low loads, and the lack of anomaly detection mechanism leads to system instability, affecting user experience and equipment life.
The control light switching control method based on artificial intelligence is adopted to monitor ambient light and user activities through low-power sensors, combine multimodal data fusion and Bayesian update methods to perform environmental state estimation, use reinforcement learning to optimize light control strategies, dynamically manage computing resources, and establish anomaly detection mechanism and modular design architecture.
It realizes intelligent control of lighting switching, automatically optimizes brightness and color temperature according to the environmental status, reduces calculation delay, improves response speed, ensures system stability and equipment life, and provides personalized control and efficient resource management.
Smart Images

Figure CN120358652A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent lighting control, and particularly to a control method for switching console lights based on artificial intelligence. Background Art
[0002] With the development of smart home technology, smart lighting control systems have gradually become popular. The existing methods for switching console lights mainly rely on preset schedules, simple sensor detection, or manual adjustment. However, traditional methods have limitations in practical applications and cannot meet users' demands for intelligent and personalized control.
[0003] Currently, most smart table lamps on the market use fixed schedules for switching control or simple trigger logics based on light sensors. This method can achieve a certain degree of automation, but it lacks flexibility and cannot adapt to complex environmental changes. For example, in the case of unstable natural light brightness or frequent changes in user demands, the lights may be mis-triggered, have response delays, or be adjusted unreasonably, resulting in a poor user experience.
[0004] Some smart table lamps support remote control and multiple lighting modes and require cloud or local computing resources for task processing. Traditional systems usually adopt fixed computing resource allocation schemes and cannot adjust according to the dynamic changes in task loads. During peak hours, the computing resources cannot meet the processing requirements of a large number of tasks, resulting in a decrease in response speed; while during low loads, a large amount of computing resources are idle, causing unnecessary energy waste and reducing the overall efficiency of the system.
[0005] During the long-term operation of smart lighting control systems, they will be affected by environmental interference, voltage fluctuations, or sensor failures, resulting in abnormal light adjustments. In the prior art, most products lack a perfect anomaly detection mechanism and simply rely on users to manually check or passively trigger alarms, thereby reducing the reliability of the system, causing the light control to fail, and affecting normal use. At the same time, the existing fault correction methods are mostly static strategies and cannot achieve real-time optimization and adjustment. The device may be in an unstable state for a long time when an anomaly occurs, affecting its service life.
[0006] Therefore, the present invention proposes a control method for switching console lights based on artificial intelligence to solve the above-mentioned problems. Summary of the Invention
[0007] Aiming at the deficiencies of the prior art, the present invention provides a control method for switching console lights based on artificial intelligence to solve the problems raised in the above background art.
[0008] To achieve the above objectives, the present invention is realized through the following technical solutions: A control method for switching console lights based on artificial intelligence, comprising:
[0009] Step 1, event-driven data acquisition: Use low-power sensors to monitor environmental light and user activity status, and trigger the sensing module through a set threshold and rate-of-change detection mechanism.
[0010] Step 2, multi-modal data fusion and environmental state estimation: Based on the data collected in Step 1, combine the light, temperature, and human activity information of multiple groups of sensors, and use the Bayesian update method for data fusion to dynamically calculate the optimal estimated value of the current environmental state.
[0011] Step 3, intelligent lighting control strategy generation: Based on the environmental state calculated in Step 2, establish a lighting control strategy using a hierarchical Markov decision process.
[0012] Step 4, reinforcement learning training to optimize the lighting control strategy: Based on the decision-making process constructed in Step 3, use the reinforcement learning method to train the control strategy, combining the user's operation feedback and environmental change data.
[0013] Step 5, computing resource management and task scheduling: According to the optimized lighting control strategy in Step 4, use the Pontryagin maximum principle to optimize the triggering timing of AI computing tasks.
[0014] Step 6, low-power hardware execution and lighting device control: Combine the optimized computing strategy in Step 5, and use a magnetic latching relay and a low-power microcontroller to control the lighting device.
[0015] Step 7, data security protection and system stability guarantee: Based on the hardware architecture in Step 6, use encryption algorithms to protect data transmission, and at the same time establish an anomaly detection mechanism.
[0016] Step 8, system maintainability improvement and remote management support: On the basis of the data security in Step 7, adopt a modular design architecture.
[0017] Step 9, human-computer interaction and intelligent control method: Based on the system scalability in Step 8, provide interaction methods, support visual terminals and quick keyboards, and at the same time combine the user identity recognition function.
[0018] Preferably, in Step 1, when the set environmental change conditions are met, use low-power sensors to monitor environmental light and user activity status, and activate data acquisition when there is a significant change in light and when a user is detected approaching. Further include:
[0019] Step 1.1, environmental state change monitoring and sensing trigger:
[0020] Based on the set light threshold and user activity detection mechanism, determine whether to trigger data acquisition. The sensing trigger conditions are as follows:
[0021]
[0022] Among them, T s is the environmental state change rate, L t and L t-1 are the light intensity values at the current moment and the previous moment, M t and M t-1 are the user movement detection values at the current moment and the previous moment, and Δt is the time interval for data acquisition;
[0023] If T s exceeds the set threshold T thres , trigger environmental data acquisition and execute step 1.2;
[0024] Step 1.2, multi-sensor data fusion and environmental state estimation:
[0025] Based on the environmental data acquisition triggered by step 1.1, use the Bayesian update method to perform fusion calculations on multi-sensor data to obtain the optimal estimated value of the current environmental state. The data fusion process is as follows:
[0026]
[0027] Among them, E t is the environmental state at the current moment, D t is the sensor data set at the current moment, P(E t ) is the prior probability of the environmental state, P(D t |E t ) is the conditional probability of the observed data, and P(D t ) is the normalized probability of the sensor data;
[0028] Based on this, calculate the optimal estimated value of the current environmental state and provide it to step 1.3;
[0029] Step 1.3, data acquisition optimization and calculation task triggering:
[0030] According to the environmental state estimated value calculated in step 1.2 judge whether to trigger the AI calculation task. The calculation task triggering conditions are as follows:
[0031]
[0032] Among them, C compute is the calculation task triggering threshold, α and β are weight parameters, E t-1 is the environmental state estimated value at the previous moment,
[0033] σ D is the uncertainty of the sensor data at the current moment. The calculation method is as follows:
[0034]
[0035] where w i is the weight of the i-th sensor, and D i,t is the current data value of the i-th sensor, is the weighted mean of all sensor data at the current moment.
[0036] If C compute exceeds the set threshold C thres , AI calculation is triggered and step 2 is entered to generate an intelligent lighting control strategy.
[0037] Preferably, in step 2, the environmental state estimation value calculated in step 1 is used as the input, and an intelligent lighting control strategy is established based on the Markov decision process. The lighting is adjusted according to the current environmental state and the user behavior pattern to improve the control accuracy and adaptability. It further includes:
[0038] Step 2.1, state space modeling and transition probability calculation:
[0039] Based on the environmental state estimation value calculated in step 1.2 and the user behavior data, a state space is constructed, and the state transition probability is calculated. The state transition model is defined as follows:
[0040] S t ={L t , M t , T t , A t},
[0041] where S t is the environmental state vector at the current moment t, L t is the light intensity, M t is the user movement state, T t is the environmental temperature, and A t is the brightness of the current lighting device;
[0042] The state transition probability is calculated by the following formula:
[0043] P(S t+1 |S t , a t ) = ∑ i P(S t+1 |S t , a t , O i )P(O i |S t ),
[0044] Among them, S t+1 is the state at the next moment, a t is the control action at the current moment, O i is the external interference factor affecting the environmental state;
[0045] If the state transition probability exceeds the set threshold P thres , enter step 2.2 for policy optimization calculation;
[0046] Step 2.2, Policy Optimization and Reward Function Construction:
[0047] Based on the state transition probability calculated in step 2.1, use the reinforcement learning method to optimize the lighting control policy, and define the reward function as follows:
[0048] R t = w1f c (A t ) + w2f u (U t ) - w3f e (E t ),
[0049] Among them, R t is the reward value at the current moment, w1, w2, and w3 are weight parameters, f c (A t ) is the lighting control comfort function, defined as:
[0050] f c (A t ) = -(A t - A opt ) 2 ,
[0051] Among them, A opt is the optimal lighting brightness expected by the user;
[0052] f u (U t ) is the user behavior preference function, defined as:
[0053]
[0054] Among them, U t is the current user's usage behavior, U hist is the historical user usage habit, U max is the maximum behavior deviation range;
[0055] f e (E t ) is the energy consumption loss function, defined as:
[0056]
[0057] Among them, P(A t ) is the current lighting power consumption, and P max is the maximum power consumption;
[0058] If the cumulative reward value G of the policy optimization is G = ∑ t γ t R t exceeds the threshold G thres , enter Step 2.3 to solve the optimal policy;
[0059] Step 2.3, Optimal Policy Solving and Decision Execution:
[0060] Based on the cumulative reward value calculated in Step 2.2, use the value iteration method to solve the optimal lighting control policy. The state value function is defined as follows:
[0061]
[0062] Among them, V(S t ) is the optimal value function of state S t , γ is the discount factor, P(S t+1 |S t ,a t ) is the state transition probability calculated in Step 2.1, R t is the reward function calculated in Step 2.2, S t+1 is the state at the next moment, a t is the control action at the current moment, S t is the state at the current moment, and V(S t+1 ) is the optimal value function of state S t+1 ;
[0063] If the optimal policy π * (S t ) is calculated, the system executes the optimal control action and adjusts the lighting state, and then enters Step 3 to train the reinforcement learning model.
[0064] Preferably, in Step 3, based on the optimal lighting control policy calculated in Step 2, use the reinforcement learning method to train the policy, and continuously optimize the control decision based on the environmental state feedback, so that the system can adapt to different scenarios and optimize the lighting adjustment rules, which further includes:
[0065] Step 3.1, Reinforcement Learning State Space Construction and Policy Initialization:
[0066] Based on the optimal control policy π * (S t ) calculated in Step 2.3 and the state space S t, construct the state set, action set, and reward function of reinforcement learning, and initialize the policy. Define the reinforcement learning task as follows:
[0067] M = (S, A, P, R, γ),
[0068] where M is the Markov decision process of reinforcement learning, S is the state space, A is the action space, P is the state transition probability, R is the reward function, and γ is the discount factor;
[0069] The reinforcement learning policy is initialized using any initialization method such that the initial control policy π(S t ) at each state S t obeys a uniform distribution:
[0070]
[0071] where |A| is the dimension of the action space. After the policy initialization is completed, proceed to step 3.2 for Q-value update and policy iteration;
[0072] Step 3.2, policy optimization based on Q-learning:
[0073] Based on the policy π0(S t ) initialized in step 3.1, use the Q-learning algorithm to optimize the lighting control policy. Define the Q-value update formula as follows:
[0074]
[0075] where Q(S t , a t ) is the Q-value of taking action a t at state S t , α is the learning rate, R t is the immediate reward value calculated in step 2.2, and γ is the discount factor set in step 3.1.
[0076] denotes the Q-value of the best action to be taken in the next state S t+1 ;
[0077] The Q-value update is performed iteratively. After each update, use the ∈-greedy policy to select the next action a t :
[0078]
[0079] where ∈ is the exploration probability;
[0080] If the change in the Q-value is less than the set threshold Q min , proceed to step 3.3 for policy convergence judgment and optimal policy selection;
[0081] Step 3.3, Policy Convergence Judgment and Optimal Policy Selection:
[0082] Based on the Q-value calculated in Step 3.2, determine whether the reinforcement learning policy converges. The policy convergence conditions are as follows:
[0083]
[0084] where Q (k) (S t , a t ) and Q (k-1) (S t , a t ) represent the Q-values of the k-th round and the (k - 1)-th round of iteration, ∈ Q is the convergence threshold, S and A are the state space and action space set in Step 3.1;
[0085] When the convergence condition is satisfied, the final lighting control policy is determined by the following formula:
[0086]
[0087] where π * (S t ) is the optimal lighting control policy for subsequent intelligent control decisions;
[0088] After the reinforcement learning policy converges, the system executes the optimal control action to adjust the lighting state and enter Step 4 for computing resource management and task scheduling optimization.
[0089] Preferably, in Step 4, based on the optimal lighting control policy π * (S t ) calculated in Step 3 and the convergence result of the reinforcement learning model, optimize the computing resource allocation and task scheduling for the intelligent lighting control system, which further includes:
[0090] Step 4.1, Computing Task Load Evaluation and Resource Demand Prediction:
[0091] Based on the optimal policy π * (S t ) calculated in Step 3.3 and the current task queue of the system, calculate the computing load of different tasks and predict the resource demand at future moments. The task load calculation is as follows:
[0092]
[0093] where L t is the computing load at the current moment t, N is the total number of tasks to be executed currently, w i is the priority weight of task i, Ci (T t ,S t ) is the computing demand of task i at the current temperature T t and the environmental state S t ;
[0094] The calculation load prediction is carried out by the exponentially weighted moving average method, and the load prediction value at the future time t + 1 is calculated as follows:
[0095]
[0096] where is the load prediction value at the next moment, and λ is the smoothing factor;
[0097] When the predicted load exceeds the set threshold L thres , step 4.2 is entered for task scheduling optimization;
[0098] Step 4.2, task scheduling optimization and computing resource allocation:
[0099] Based on the load prediction value calculated in step 4.1 , optimize the task scheduling strategy to efficiently allocate computing resources between edge devices and cloud servers. The task scheduling decision is as follows:
[0100]
[0101] where D t is the optimal task scheduling decision at the current moment, d is the task scheduling option, and α, β, γ are the scheduling optimization weights. T d is the execution time of the scheduling option d, P d is the energy consumption overhead of the scheduling option d, and R d is the resource occupancy rate of the scheduling option d;
[0102] where the task execution time is calculated as follows:
[0103] where C d is the computing demand of task d, and F d is the processing capacity of the computing resources;
[0104] After the task scheduling optimization is completed, step 4.3 is entered for system execution status monitoring and dynamic adjustment;
[0105] Step 4.3, system execution status monitoring and dynamic adjustment:
[0106] Based on the task scheduling decision D calculated in step 4.2 t , real-time monitor the execution status of computing resources and perform dynamic adjustment. The system status monitoring indicators are as follows:
[0107] S exec = {U t , D t , E t , T t},
[0108] Among them, S exec is the execution status of the current system;
[0109] U t is the utilization rate of computing resources, defined as:
[0110] Among them, C exec is the computing volume of the executed tasks, and C max is the maximum processing capacity of computing resources;
[0111] D t is the task scheduling decision, and E t is the energy consumption of task execution, calculated as follows:
[0112] E t = ∑ d P d T d ,
[0113] Among them, P d is the power consumption of scheduling option d, and T d is the task execution time.
[0114] T t is the time delay of task execution, calculated as follows: T t = max(T queue , T compute ), where T queue is the waiting time of the task in the queue, and T compute is the computing time of the task;
[0115] When the execution status exceeds the set threshold, the system adjusts the task scheduling strategy D t , and feeds it back to step 4.2 for re-optimization. Otherwise, the task execution is completed, and step 5 is entered for the safety management and stability optimization of the intelligent lighting system.
[0116] Preferably, in step 7, based on the system energy efficiency optimization plan calculated in step 6, the safety management and stability optimization of the intelligent lighting control system are designed to ensure the reliability and anti-interference ability of the system operation in a complex environment, and further include:
[0117] Step 7.1, system anomaly detection and fault warning:
[0118] Based on the optimal energy - efficiency scheduling scheme calculated in step 6, monitor the operating status of the system and detect and give early warnings for abnormal situations. The definition of the abnormal state of the system is as follows:
[0119] A t ={P t ,V t ,I t ,L t ,T t},
[0120] Among them, A t is the set of system states at the current moment t, P t is the current power consumption, V t is the power supply voltage, I t is the current, L t is the light intensity, T t is the ambient temperature;
[0121] The determination of the abnormal state adopts the chi - square test method. The definition of the abnormal detection statistic is as follows:
[0122]
[0123] Among them, χ 2 is the abnormal detection statistic, A i,t is the value of the i - th monitoring parameter at the current moment, μ i is the historical mean of this parameter, σ i is the standard deviation of this parameter;
[0124] If χ 2 exceeds the set threshold , trigger a fault warning and enter step 7.2 for abnormal correction and adaptive adjustment;
[0125] Step 7.2, Abnormal correction and system adaptive adjustment:
[0126] Based on the abnormal state detected in step 7.1, correct and adaptively adjust the system. The correction model uses the Kalman filter method for state estimation. The state update formula is as follows:
[0127]
[0128] Among them, is the optimal state estimate value at the current moment, is the predicted state at the previous moment, K t is the Kalman gain, and its calculation formula is as follows:
[0129]
[0130] Among them, P t|t-1is the covariance matrix of the predicted state, and H t is the observation matrix, and R t is the measurement noise covariance matrix;
[0131] If the state estimation error is less than the set threshold ∈ thres go to step 7.3 for system security assessment and stability optimization;
[0132] Step 7.3, System security assessment and stability optimization:
[0133] Based on the corrected state calculated in step 7.2, optimize the security and stability of the system. The security assessment uses the information entropy method to calculate the chaos degree of the system state. The information entropy is calculated as follows:
[0134]
[0135] where H(A t ) is the information entropy of the system state set A t , and P i is the probability of the state A i,t appearing;
[0136] If the information entropy H(A t ) exceeds the set threshold H thres , the system enters a high-risk state, and the control strategy is adjusted. The optimization method is as follows:
[0137]
[0138] where S opt is the optimized system operating state, w1, w2, and w3 are optimization weights, T s is the system response time, P s is the power consumption, and R s is the system resource occupancy rate;
[0139] After the system optimization is completed, the system resumes normal operation and enters step 8 for the scalability design and future optimization strategy planning of the intelligent lighting system.
[0140] Preferably, in step 8, based on the system security assessment result and stability optimization scheme calculated in step 7, further perform the scalability design of the intelligent lighting system to ensure the adaptability of the system in future scenarios, and formulate an optimization strategy to improve the overall performance, which further includes:
[0141] Step 8.1, System scalability assessment and architecture optimization:
[0142] Based on the optimized system state S calculated in step 7.3 opt, evaluate the scalability of the intelligent lighting system and optimize the system architecture. The scalability metrics are defined as follows:
[0143] E t = α·N t + β·C t + γ·R t ,
[0144] where E t is the system scalability metric at the current time t, N t is the number of currently connected devices, C t is the computing power, defined as:
[0145] where F t is the processing power of the current computing resources, D t is the computing demand for the current task scheduling, R t is the system resource utilization rate, and α, β, γ are scalability weights;
[0146] If the scalability metric E t is lower than the set threshold E thres , enter Step 8.2 to adjust the system optimization strategy;
[0147] Step 8.2, Optimization of intelligent control algorithms and update of adaptive strategies:
[0148] Based on the scalability metric calculated in Step 8.1, optimize the intelligent control algorithm and adaptively update the system strategy. The optimization method uses reinforcement learning for adaptive update, and the update formula is as follows:
[0149]
[0150] where π ′ (S t ) is the updated control strategy, π * (S t ) is the optimal strategy calculated in Step 3.3, is the strategy trained based on the latest data, and η is the update rate;
[0151] After the strategy is updated, enter Step 8.3 to plan future optimization strategies and design system sustainability;
[0152] Step 8.3, Planning of future optimization strategies and design of system sustainability:
[0153] Based on the optimized control strategy π ′ (S t ) calculated in Step 8.2, formulate a long-term optimization plan for the intelligent lighting system and conduct a sustainability design. The objective function is as follows:
[0154] O = min(w1·P t + w2·T t + w3·C t ),
[0155] where O is the long - term optimization target value of the system, P t is the power consumption, T t is the task execution time, C t is the computing resource occupancy, and w1, w2, w3 are optimization weights;
[0156] If the optimization target O is lower than the set threshold O thres , the system enters the long - term stable operation mode and feeds back to step 3.3 for periodic adjustment of the reinforcement learning strategy. Otherwise, adjust the optimization plan and recalculate step 8.1 for scalability optimization.
[0157] Preferably, in step 9, based on the long - term optimization result calculated in step 8 and the sustainable design solution, further implement the feedback mechanism and optimization strategy update of the intelligent lighting system to ensure that the system can adapt to environmental changes and continuously improve performance. It further includes:
[0158] Step 9.1, system feedback monitoring and performance evaluation:
[0159] Based on the long - term optimization target O calculated in step 8.3, conduct real - time feedback monitoring on the operation status of the intelligent lighting system and comprehensively evaluate the system performance. The performance evaluation indicators include the system response time T s , energy efficiency η s and system stability λ s , where:
[0160] T s = max(T Queue , T compute ),
[0161]
[0162] where, T s is the response time of the system, η s is the energy efficiency of the system, E useful is the effective energy consumption, E total is the total energy consumption, λ s is the system stability, σ stable is the total number of stable states of the system, σ total is the total number of states of the system;
[0163] If the performance evaluation result of the system does not meet the set requirements, enter step 9.2 for feedback adjustment and strategy update;
[0164] Step 9.2, Feedback Adjustment and Control Strategy Update:
[0165] Based on the evaluation results of Step 9.1, the control strategy is adaptively adjusted using reinforcement learning to further improve the system performance. The updated control strategy π″(S t ) is adjusted according to the following formula:
[0166]
[0167] where π″(S t ) is the adjusted control strategy, π ′ (S t ) is the optimized control strategy calculated in Step 8.2, is the latest strategy trained based on real-time feedback data, and ζ is the feedback adjustment rate;
[0168] After the strategy update, proceed to Step 9.3 for long-term operation and optimization path planning of the intelligent lighting system;
[0169] Step 9.3, Long-term Optimization Path Planning and System Continuous Optimization:
[0170] Based on the adjusted control strategy π″(S t ) calculated in Step 9.2, formulate the long-term optimization path and continuous optimization plan of the system. The objective function is as follows:
[0171] O long =min(w1·P long +w2·T long +w3·C long ),
[0172] where O long is the long-term optimization target value of the system;
[0173] P long is the power consumption of the system during long-term operation, T long is the long-term task execution time of the system, C long is the long-term computing resource occupancy of the system, and w1, w2, w3 are optimization weights;
[0174] If the long-term optimization target O long meets the set requirements, the system enters the long-term stable operation stage to complete the adaptive optimization of the intelligent lighting system. Otherwise, feedback to Step 8 for further optimization and strategy adjustment.
[0175] A terminal device includes a processor, a memory, a low-power microcontroller, a magnetic latching relay, and multiple groups of sensors. The processor is used to execute an artificial intelligence-based console light switching control method. The memory is used to store light control data and user behavior data. The low-power microcontroller is responsible for executing edge computing tasks. The magnetic latching relay is used to control the on / off state of the light. The multiple groups of sensors are used to collect environmental data.
[0176] A storage medium stores computer-readable instructions. When the instructions are executed by a processor, the terminal device is caused to execute an artificial intelligence-based console light switching control method.
[0177] The present invention provides an artificial intelligence-based console light switching control method, having the following beneficial effects:
[0178] 1. The present invention adopts an artificial intelligence-based reinforcement learning strategy adaptive adjustment technology to realize the intelligent control of console light switching, achieving the effect of automatically optimizing brightness and color temperature according to the environmental state and improving the user experience. Compared with the existing light switching schemes based on fixed schedules and simple sensor triggers, it solves the problem that the light adjustment lacks adaptability and cannot respond to environmental changes in real time.
[0179] 2. The present invention introduces a task load prediction and computing resource dynamic scheduling method to intelligently allocate the desk lamp control tasks, achieving the effect of reducing computing latency and improving the system response speed. Compared with the existing method of using fixed computing resource allocation, it solves the defects of tight computing resources during peak hours and resource waste during low load.
[0180] 3. The present invention combines system anomaly detection and adaptive optimization strategies to build an intelligent light safety management mechanism to ensure the stable operation of the system, achieving the effect of real-time monitoring of faults, dynamically adjusting control strategies, and extending the device life. Compared with the situation in the existing technology where there is a lack of intelligent monitoring and device faults cannot be detected in time, it solves the problem that abnormal states during device operation cannot be quickly identified and corrected. BRIEF DESCRIPTION OF THE DRAWINGS
[0181] Figure 1 is a flowchart of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0182] To enable those skilled in the art to understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments of the present invention, other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0183] The present invention will be described in detail below with reference to the accompanying drawings:
[0184] Embodiment:
[0185] Please refer to the attached Figure 1 , the embodiment of the present invention provides an artificial intelligence-based console lighting switching control method, including:
[0186] Step 1, event-driven data collection, using low-power sensors to monitor the ambient light and the user's activity status, and triggering the sensing module through a set threshold and change rate detection mechanism;
[0187] Step 1.1, monitoring and perception triggering of environmental state changes:
[0188] Based on the set light threshold and user activity detection mechanism, determine whether to trigger data collection, and the perception trigger conditions are as follows:
[0189]
[0190] Among them, T s is the environmental state change rate, L t and L t-1 are the light intensity values at the current moment and the previous moment, M t and M t-1 are the user movement detection values at the current moment and the previous moment, and Δt is the time interval for data collection;
[0191] If T s exceeds the set threshold T thres , trigger environmental data collection and execute step 1.2;
[0192] Step 1.2, multi-sensor data fusion and environmental state estimation:
[0193] Based on the environmental data collection triggered in step 1.1, use the Bayesian update method to perform fusion calculations on multi-sensor data to obtain the optimal estimated value of the current environmental state. The data fusion process is as follows:
[0194]
[0195] Among them, E t is the environmental state at the current moment, D t is the sensor data set at the current moment, P(E t ) is the prior probability of the environmental state, P(D t |E t ) is the conditional probability of the observed data, and P(D t ) is the normalized probability of the sensor data;
[0196] Based on this calculation, the optimal estimated value of the current environmental state is obtained. Provided to Step 1.3;
[0197] Step 1.3, Data Acquisition Optimization and Computation Task Triggering:
[0198] Based on the estimated value of the environmental state calculated in Step 1.2 Determine whether to trigger an AI computation task. The computation task triggering conditions are as follows:
[0199]
[0200] Among them, C compute is the computation task triggering threshold, α and β are weight parameters, and E t-1 is the estimated value of the environmental state at the previous moment.
[0201] σ D is the uncertainty of the sensor data at the current moment, and the calculation method is as follows:
[0202]
[0203] Among them, w i is the weight of the i-th sensor, D i,t is the current data value of the i-th sensor. is the weighted mean of all sensor data at the current moment.
[0204] If C compute exceeds the set threshold C thres trigger AI computation and enter Step 2 to generate an intelligent lighting control strategy;
[0205] Step 2, Multimodal Data Fusion and Environmental State Estimation. Based on the data collected in Step 1, combine the lighting, temperature, and human activity information of multiple groups of sensors, and use the Bayesian update method for data fusion to dynamically calculate the optimal estimated value of the current environmental state;
[0206] Step 2.1, State Space Modeling and Transition Probability Calculation:
[0207] Based on the estimated value of the environmental state calculated in Step 1.2 and user behavior data, construct a state space and calculate the state transition probability. The state transition model is defined as follows:
[0208] S t ={L t ,M t ,T t ,A t},
[0209] Among them, S tis the environmental state vector at the current moment t, L t is the light intensity, M t is the user's movement state, T t is the environmental temperature, A t is the brightness of the current lighting device;
[0210] The state transition probability is calculated by the following formula:
[0211] P(S t+1 |S t ,a t )=∑ i P(S t+1 |S t ,a t ,O i )P(O i |S t ),
[0212] where S t+1 is the state at the next moment, a t is the control action at the current moment, O i is the external disturbance factor affecting the environmental state;
[0213] If the state transition probability exceeds the set threshold P thres , go to step 2.2 for policy optimization calculation;
[0214] Step 2.2, Policy Optimization and Reward Function Construction:
[0215] Based on the state transition probability calculated in step 2.1, use the reinforcement learning method to optimize the lighting control policy, and define the reward function as follows:
[0216] R t =w1f c (A t )+w2f u (U t )-w3f e (E t ),
[0217] where R t is the reward value at the current moment, w1, w2, w3 are weight parameters, f c (A t ) is the lighting control comfort function, defined as:
[0218] f c (A t )=-(A t -A opt ) 2 ,
[0219] where Aopt is the optimal light brightness expected by the user;
[0220] f u (U t ) is the user behavior preference function, defined as:
[0221]
[0222] where U t is the usage behavior of the current user, U hist is the historical usage habit of the user, U max is the maximum behavior deviation range;
[0223] f e (E t ) is the energy consumption loss function, defined as:
[0224]
[0225] where P(A t ) is the current light power consumption, P max is the maximum power consumption;
[0226] If the cumulative reward value G of the policy optimization = ∑ t γ t R t exceeds the threshold G thres , enter step 2.3 to solve the optimal policy;
[0227] Step 2.3, Optimal Policy Solving and Decision Execution:
[0228] Based on the cumulative reward value calculated in step 2.2, use the value iteration method to solve the optimal light control policy. The state value function is defined as follows:
[0229]
[0230] where V(S t ) is the optimal value function of state S t , γ is the discount factor, P(S t+1 |S t ,a t ) is the state transition probability calculated in step 2.1, R t is the reward function calculated in step 2.2, S t+1 is the state at the next moment, a t is the control action at the current moment, S t is the state at the current moment, V(S t+1 ) is the optimal value function of state S t+1 ;
[0231] If the optimal policy π * (S t ) is calculated, the system executes the optimal control action and adjusts the lighting state, then enters Step 3 for training the reinforcement learning model;
[0232] Step 3, generating the intelligent lighting control policy. Based on the environmental state calculated in Step 2, a hierarchical Markov decision process is used to establish the lighting control policy;
[0233] Step 3.1, constructing the reinforcement learning state space and initializing the policy
[0234] Based on the optimal control policy π * (S t ) calculated in Step 2.3 and the state space S t , construct the state set, action set, and reward function of the reinforcement learning, and initialize the policy. Define the reinforcement learning task as follows:
[0235] M = (S, A, P, R, γ),
[0236] where M is the Markov decision process of the reinforcement learning, S is the state space, A is the action space, P is the state transition probability, R is the reward function, and γ is the discount factor;
[0237] The reinforcement learning policy is initialized using any initialization method such that the initial control policy π(S t ) under each state S t obeys the uniform distribution:
[0238]
[0239] where |A| is the dimension of the action space. After the policy initialization is completed, enter Step 3.2 for Q-value update and policy iteration;
[0240] Step 3.2, policy optimization based on Q-learning:
[0241] Based on the policy π0(S t ) initialized in Step 3.1, use the Q-learning algorithm to optimize the lighting control policy. Define the Q-value update formula as follows:
[0242]
[0243] where Q(S t , a t ) is the Q-value of executing action a t under state S t , α is the learning rate, R t is the immediate reward value calculated in Step 2.2, and γ is the discount factor set in Step 3.1,
[0244] Represents the next state S t+1 The Q-value of the best action taken;
[0245] The Q-value update is performed iteratively. After each update, the ∈-greedy policy is used to select the next action a t :
[0246]
[0247] where ∈ is the exploration probability;
[0248] If the change in the Q-value is less than the set threshold Q min then, go to Step 3.3 for policy convergence judgment and optimal policy selection;
[0249] Step 3.3, Policy Convergence Judgment and Optimal Policy Selection:
[0250] Based on the Q-values calculated in Step 3.2, determine whether the reinforcement learning policy converges. The policy convergence conditions are as follows:
[0251]
[0252] where Q (k) (S t , a t ) and Q (k-1) (S t , a t ) represent the Q-values of the k-th and (k - 1)-th iterations, ∈ Q is the convergence threshold, and S and A are the state space and action space set in Step 3.1;
[0253] When the convergence condition is satisfied, the final lighting control policy is determined by the following formula:
[0254]
[0255] where π * (S t ) is the optimal lighting control policy for subsequent intelligent control decisions;
[0256] After the reinforcement learning policy converges, the system executes the optimal control action to adjust the lighting state and enter Step 4 for computing resource management and task scheduling optimization;
[0257] Step 4, Optimize the lighting control policy through reinforcement learning training. Based on the decision-making process constructed in Step 3, use the reinforcement learning method to train the control policy, combining the user's operation feedback and environmental change data;
[0258] Step 4.1, Calculate Task Load Evaluation and Resource Requirement Prediction:
[0259] Based on the optimal policy π calculated in Step 3.3 * (S t ) and the current task queue of the system, calculate the computational loads of different tasks, and predict the resource requirements at future moments. The task load is calculated as follows:
[0260]
[0261] Among them, L t is the computational load at the current moment t, N is the total number of tasks to be executed currently, w i is the priority weight of task i, C i (T t ,S t ) is the computational requirement of task i at the current temperature T t and environmental state S t ;
[0262] The computational load prediction is carried out using the exponential weighted moving average method to calculate the load prediction value at the future moment t + 1:
[0263]
[0264] Among them, is the load prediction value at the next moment, and λ is the smoothing factor;
[0265] When the predicted load exceeds the set threshold L thres , enter Step 4.2 for task scheduling optimization;
[0266] Step 4.2, Task Scheduling Optimization and Computational Resource Allocation:
[0267] Based on the load prediction value calculated in Step 4.1 Optimize the task scheduling strategy to efficiently allocate computational resources between edge devices and cloud servers. The task scheduling decision is as follows:
[0268]
[0269] Among them, D t is the optimal task scheduling decision at the current moment, d is the task scheduling option, α, β, γ are the scheduling optimization weights, T d is the execution time of scheduling option d, P d is the energy consumption overhead of scheduling option d, and R d is the resource occupancy rate of scheduling option d;
[0270] Among them, the task execution time is calculated as follows:
[0271] Among them, C d is the computing requirement of task d, and F d is the processing capacity of computing resources;
[0272] After the task scheduling optimization is completed, go to step 4.3 for system execution status monitoring and dynamic adjustment;
[0273] Step 4.3, System Execution Status Monitoring and Dynamic Adjustment:
[0274] Based on the task scheduling decision D t calculated in step 4.2, monitor the execution status of computing resources in real time and perform dynamic adjustment. The system status monitoring indicators are as follows:
[0275] S exec ={U t , D t , E t , T t},
[0276] Among them, S exec is the current execution status of the system;
[0277] U t is the utilization rate of computing resources, defined as:
[0278] Among them, C exec is the amount of computation of the executed task, and C max is the maximum processing capacity of computing resources;
[0279] D t is the task scheduling decision, and E t is the energy consumption of task execution, calculated as follows:
[0280] E t =∑ d P d T d ,
[0281] Among them, P d is the power consumption of scheduling option d, and T d is the task execution time.
[0282] T t is the time delay of task execution, calculated as follows: T t =max(T queue , T compute ), where T queue is the waiting time of the task in the queue, and T compute is the computing time of the task;
[0283] The execution status exceeds the set threshold, and the system adjusts the task scheduling policy D t , and feedback it to step 4.2 for re-optimization. Otherwise, the task execution is completed, and step 5 is entered for the safety management and stability optimization of the intelligent lighting system;
[0284] Step 5, computing resource management and task scheduling. According to the optimized lighting control strategy in step 4, the Pontryagin maximum principle is used to optimize the triggering time of AI computing tasks;
[0285] Step 6, low-power hardware execution and lighting device control. Combining the optimized computing strategy in step 5, a magnetic latching relay and a low-power microcontroller are used to control the lighting devices;
[0286] Step 7, data security protection and system stability guarantee. Based on the hardware architecture in step 6, an encryption algorithm is used to protect data transmission, and an anomaly detection mechanism is established at the same time;
[0287] Step 7.1, system anomaly detection and fault warning:
[0288] Based on the optimal energy efficiency scheduling scheme calculated in step 6, monitor the operating status of the system, and detect and warn of abnormal situations. The system abnormal status is defined as follows:
[0289] A t ={P t ,V t ,I t ,L t ,T t},
[0290] where, A t is the system state set at the current time t, P t is the current power consumption, V t is the power supply voltage, I t is the current, L t is the light intensity, T t is the ambient temperature;
[0291] The chi-square test method is used for abnormal state determination. The anomaly detection statistic is defined as follows:
[0292]
[0293] where, χ 2 is the anomaly detection statistic, A i,t is the value of the i-th monitoring parameter at the current time, μ i is the historical mean of this parameter, and σ i is the standard deviation of this parameter;
[0294] If χ 2Exceed the set threshold When this occurs, a fault warning is triggered, and step 7.2 is entered for anomaly correction and adaptive adjustment;
[0295] Step 7.2, Anomaly correction and system adaptive adjustment:
[0296] Based on the abnormal state detected in step 7.1, the system is corrected and adaptively adjusted. The Kalman filter method is used for state estimation in the correction model, and the state update formula is as follows:
[0297]
[0298] Where, is the optimal state estimate value at the current moment, is the predicted state at the previous moment, and K t is the Kalman gain, and the calculation formula is as follows:
[0299]
[0300] Where, P t|t-1 is the covariance matrix of the predicted state, H t is the observation matrix, and R t is the measurement noise covariance matrix;
[0301] If the state estimation error is less than the set threshold ∈ thres When this occurs, step 7.3 is entered for system security assessment and stability optimization;
[0302] Step 7.3, System security assessment and stability optimization:
[0303] Based on the corrected state calculated in step 7.2, the security and stability of the system are optimized. The information entropy method is used for security assessment to calculate the chaos degree of the system state, and the information entropy calculation is as follows:
[0304]
[0305] Where, H(A t ) is the information entropy of the system state set A t , and P i is the probability of the state A i,t appearing;
[0306] If the information entropy H(A t ) exceeds the set threshold H thres When this occurs, the system enters a high-risk state, and the control strategy is adjusted. The optimization method is as follows:
[0307]
[0308] Where, S optFor the optimized system operating state, w1, w2, and w3 are optimization weights, T s is the system response time, P s is the power consumption, R s is the system resource occupancy rate;
[0309] After the system optimization is completed, the system resumes normal operation and enters step 8 for the scalability design and future optimization strategy planning of the intelligent lighting system;
[0310] Step 8, improvement of system maintainability and remote management support, based on the data security in step 7, adopt a modular design architecture;
[0311] Step 8.1, system scalability evaluation and architecture optimization:
[0312] Based on the optimized system state S opt calculated in step 7.3, evaluate the scalability of the intelligent lighting system and optimize the system architecture. The scalability indicators are defined as follows:
[0313] E t = α·N t + β·C t + γ·R t ,
[0314] where E t is the system scalability indicator at the current time t, N t is the number of currently connected devices, C t is the computing power, defined as:
[0315] where F t is the processing capacity of the current computing resources, D t is the computing demand for the current task scheduling, R t is the system resource utilization rate, and α, β, and γ are scalability weights;
[0316] If the scalability indicator E t is lower than the set threshold E thres , enter step 8.2 to adjust the system optimization strategy;
[0317] Step 8.2, intelligent control algorithm optimization and adaptive strategy update:
[0318] Based on the scalability indicator calculated in step 8.1, optimize the intelligent control algorithm and adaptively update the system strategy. The optimization method uses reinforcement learning for adaptive update, and the update formula is as follows:
[0319]
[0320] where π ′(S t ) is the updated control strategy, π * (S t ) is the optimal strategy calculated in Step 3.3, is the strategy trained based on the latest data, and η is the update rate;
[0321] After the strategy is updated, enter Step 8.3 to perform future optimization strategy planning and system sustainability design;
[0322] Step 8.3, Future optimization strategy planning and system sustainability design:
[0323] Based on the optimized control strategy π ′ (S t ) calculated in Step 8.2, formulate a long-term optimization plan for the intelligent lighting system and perform sustainability design. The objective function is as follows:
[0324] O = min(w1·P t + w2·T t + w3·C t ),
[0325] where O is the long-term optimization target value of the system, P t is the power consumption, T t is the task execution time, C t is the computing resource occupancy, and w1, w2, and w3 are optimization weights;
[0326] If the optimization target O is lower than the set threshold O thres , the system enters the long-term stable operation mode and feeds back to Step 3.3 for periodic adjustment of the reinforcement learning strategy. Otherwise, adjust the optimization plan and recalculate Step 8.1 for scalability optimization;
[0327] Step 9, Human-computer interaction and intelligent control method. Based on the system scalability in Step 8, provide interaction methods to support visual terminals and quick keyboards, and at the same time combine the user identity recognition function;
[0328] Step 9.1, System feedback monitoring and performance evaluation:
[0329] Based on the long-term optimization target O calculated in Step 8.3, perform real-time feedback monitoring on the operation status of the intelligent lighting system and comprehensively evaluate the system performance. The performance evaluation indicators include the system response time T s , energy efficiency η s and system stability λ s , where:
[0330] T s = max(T Queue , T compute ),
[0331]
[0332] Among them, T s is the response time of the system, η s is the energy efficiency of the system, E useful is the effective energy consumption, E total is the total energy consumption, λ s is the system stability, σ stable is the total number of stable states of the system, σ total is the total number of states of the system;
[0333] If the performance evaluation result of the system does not meet the set requirements, go to step 9.2 for feedback adjustment and policy update;
[0334] Step 9.2, Feedback adjustment and control policy update:
[0335] Based on the evaluation result of step 9.1, adopt reinforcement learning to adaptively adjust the control policy to further improve the system performance. The updated control policy π″(S t ) is adjusted according to the following formula:
[0336]
[0337] Among them, π″(S t ) is the adjusted control policy, π ′ (S t ) is the optimized control policy calculated in step 8.2, is the latest policy trained based on real-time feedback data, and ζ is the feedback adjustment rate;
[0338] After the policy is updated, go to step 9.3 for long-term operation and optimization path planning of the intelligent lighting system;
[0339] Step 9.3, Long-term optimization path planning and system continuous optimization:
[0340] Based on the adjusted control policy π″(S t ) calculated in step 9.2, formulate the long-term optimization path and continuous optimization plan of the system, and the objective function is as follows:
[0341] O long = min(w1·P long + w2·T long + w3·C long ),
[0342] Among them, O long is the long-term optimization target value of the system;
[0343] Plong is the power consumption of the system during long-term operation, T long is the long-term task execution time of the system, C long is the long-term computing resource occupancy of the system, and w1, w2, w3 are optimization weights;
[0344] If the long-term optimization goal O long meets the set requirements, the system enters the long-term stable operation stage to complete the adaptive optimization of the intelligent lighting system. Otherwise, it is fed back to step 8 for further optimization and strategy adjustment.
[0345] The advantages of step 1 are to adopt low-power sensors and an event-driven mechanism, effectively reducing the unnecessary data acquisition frequency and energy consumption. At the same time, based on the set threshold and change rate detection method, it can accurately capture the changes in environmental light and user activity status, ensuring the accuracy of light adjustment. It is more efficient than traditional periodic data acquisition, avoiding data redundancy and waste of computing resources, and improving the overall response ability of the system;
[0346] The advantages of step 2 are to fuse the data of multiple groups of sensors through the Bayesian update method, greatly improving the accuracy of environmental state estimation. Different from the detection method of a single sensor, the present invention can effectively reduce the influence brought by the single-point sensor error, making the lighting control system highly adaptable in complex environments. At the same time, it dynamically calculates the optimal estimated value of the current environmental state, providing data support for subsequent intelligent control, enabling the system to reasonably adjust the lighting mode;
[0347] The advantages of step 3 are to use the reinforcement learning method, enabling the system to continuously learn the user's habits and environmental change rules, and automatically optimizing the lighting control strategy. Compared with the traditional rule-based control method, the present invention has flexibility and self-adaptability, can dynamically adjust the lighting state according to different scenarios, and realizes personalized and intelligent lighting management. At the same time, the Q-learning algorithm is used to optimize the decision-making, making the lighting control strategy maintain stability and efficiency under various environmental factors;
[0348] The advantages of step 4 are to make the computing resource allocation efficient and reasonable through load assessment and resource prediction, avoiding the problems of computing resource tension and idleness. Different from the traditional fixed computing resource allocation method, the present invention can dynamically adjust the computing resources according to the current task queue and load changes of the system, ensuring the smooth operation of the system during peak periods and saving energy during low loads. In addition, the task scheduling optimization scheme reduces the task waiting time and improves the overall response speed of the system;
[0349] The benefits of Step 5 are to establish a complete system security monitoring and anomaly detection mechanism, which can detect equipment failures in real time and make adjustments to ensure the stable operation of the system. Compared with the existing technology that relies on manual inspections and passive alarms, the present invention can actively identify potential system anomalies and correct the lighting control scheme through an adaptive optimization strategy, greatly improving the reliability of the equipment. At the same time, the anomaly detection combined with the intelligent regulation mechanism enables the equipment to quickly adjust in case of emergencies, avoiding affecting normal use;
[0350] The benefits of Step 6 are to use a magnetic latching relay and a low-power microcontroller to achieve energy-saving operation of the lighting equipment. Compared with traditional relays, magnetic latching relays consume electrical energy when switching states and do not consume power in the static holding state, greatly reducing energy consumption. At the same time, the application of the low-power microcontroller enables the system to minimize power consumption while maintaining efficient control, improving the battery life of the equipment, which is especially suitable for the long-term operation requirements in the smart home scenario;
[0351] The benefits of Step 7 are to use an encryption algorithm during data transmission to ensure user privacy and system security. At the same time, combined with the anomaly detection mechanism, it can monitor the system status in real time to prevent system crashes caused by hardware failures or external attacks. Compared with the traditional unencrypted transmission method, the present invention can effectively prevent data leakage and improve the security level of the system. In addition, the intelligent anomaly detection combined with the Kalman filter optimization strategy enables the system to make timely adjustments before a failure occurs, ensuring the long-term stability of the equipment;
[0352] The benefits of Step 8 are to adopt a modular design, making the system have good scalability and maintainability. Different from the traditional closed architecture, the present invention makes it convenient to add new functions and upgrade the system, while improving compatibility. In addition, combined with the remote management function, users can monitor and control the status of the table lamp, greatly improving the convenience and experience of use;
[0353] The benefits of Step 9 are to provide a visual terminal, a quick keyboard operation, and user identity recognition, making the interaction methods rich and diverse. Compared with the traditional single APP control method, the present invention supports multiple input methods, allowing users to select the most suitable operation mode according to their personal preferences. At the same time, the personalized settings based on user identity recognition make the lighting control conform to personal habits, improving the practicality and user satisfaction of the intelligent lighting system.
[0354] A terminal device includes a processor, a memory, a low-power microcontroller, a magnetic latching relay, and multiple groups of sensors. The processor is used to execute the console lighting switching control method based on artificial intelligence. The memory is used to store lighting control data and user behavior data. The low-power microcontroller is responsible for performing edge computing tasks. The magnetic latching relay is used to control the lighting switch state. The multiple groups of sensors are used to collect environmental data.
[0355] A storage medium stores computer-readable instructions. When the instructions are executed by a processor, the terminal device is caused to execute an artificial intelligence-based console light switching control method.
[0356] Environmental monitoring, sedentary reminder, and fatigue monitoring rely on the event-driven data collection in Step 1 and the multimodal data fusion in Step 2. By combining illumination, human activity detection, and historical data, the user's state is calculated.
[0357] Intelligent lifting, sound and light linkage, intelligent temperature control, and intelligent power supply are realized by the intelligent light control strategy generation in Step 3 and the reinforcement learning training optimization in Step 4. The system dynamically adjusts the states of lights and environmental devices according to the user's behavior pattern.
[0358] Identity recognition and service login are provided by the data security protection in Step 7. An identity authentication mechanism is used to identify users and authorize operation permissions.
[0359] Language interaction, visual terminal, and quick keyboard are realized by the human-computer interaction and intelligent control method in Step 9, supporting multiple ways to adjust lights, and improving the usability and operation convenience of the system.
[0360] The vascular platform relies on the remote management support in Step 8 to realize the remote maintenance and data monitoring of the system, improving the management efficiency and maintainability of the device.
[0361] Although the embodiments of the present invention have been shown and described, for those of ordinary skill in the art, it can be understood that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. An artificial intelligence-based console light switching control method, characterized in that, Including: Step 1, event-driven data collection. Use low-power sensors to monitor ambient light and user activity status, and trigger the sensing module through a set threshold and rate-of-change detection mechanism. Step 2, multi-modal data fusion and environmental state estimation. Based on the data collected in Step 1, combine the light, temperature, and human activity information of multiple groups of sensors, and use the Bayesian update method for data fusion to dynamically calculate the optimal estimated value of the current environmental state. Step 3, intelligent lighting control strategy generation. Based on the environmental state calculated in Step 2, establish a lighting control strategy using a hierarchical Markov decision process. Step 4, reinforcement learning training to optimize the lighting control strategy. Based on the decision-making process constructed in Step 3, use the reinforcement learning method to train the control strategy, combining the user's operation feedback and environmental change data. Step 5, computing resource management and task scheduling. According to the optimized lighting control strategy in Step 4, use the Pontryagin maximum principle to optimize the triggering timing of AI computing tasks. Step 6, low-power hardware execution and lighting device control. Combine the optimized computing strategy in Step 5, and use magnetic latching relays and low-power microcontrollers to control lighting devices. Step 7, data security protection and system stability guarantee. Based on the hardware architecture in Step 6, use encryption algorithms to protect data transmission, and at the same time establish an anomaly detection mechanism. Step 8, system maintainability improvement and remote management support. On the basis of the data security in Step 7, adopt a modular design architecture. Step 9, human-computer interaction and intelligent control method. Based on the system scalability in Step 8, provide interaction methods, support visual terminals and quick keyboards, and at the same time combine the user identity recognition function.
2. The method for controlling the switching of console lights based on artificial intelligence according to claim 1, wherein In Step 1, when the set environmental change conditions are met, use low-power sensors to monitor ambient light and user activity status, and activate data collection when there is a significant change in light and the user is detected approaching. Further including: Step 1.1, environmental state change monitoring and perception triggering: Based on the set light threshold and user activity detection mechanism, judge whether to trigger data collection. The perception triggering conditions are as follows: Among them, T s is the environmental state change rate, L t and L t-1 are the light intensity values at the current moment and the previous moment, M t and M t-1 are the user movement detection values at the current moment and the previous moment, and Δt is the time interval for data collection; If T s exceeds the set threshold value T thres when, environmental data collection is triggered and step 1.2 is executed; Step 1.2, multi-sensor data fusion and environmental state estimation: Based on the environmental data collection triggered in Step 1.1, use the Bayesian update method to perform fusion calculations on multi-sensor data to obtain the optimal estimated value of the current environmental state. The data fusion process is as follows: Among them, E t is the environmental state at the current moment, D t is the sensor data set at the current moment, P(E t ) is the prior probability of the environmental state, P(D t |E t ) is the conditional probability of the observed data, P(D t ) is the normalized probability of the sensor data; Based on this calculation, the optimal estimated value of the current environmental state is obtained and provided to step 1.3; Step 1.3, data collection optimization and computing task triggering: Environmental state estimation value calculated according to Step 1.2 Determine whether to trigger an AI calculation task. The calculation task trigger conditions are as follows: Among them, C compute is the calculation task trigger threshold, α and β are weight parameters, and E t-1 is the environmental state estimation value at the previous moment. σ D is the uncertainty of the sensor data at the current moment, and is calculated as follows: where, w i is the weight of the i-th sensor, D i,t is the current data value of the i-th sensor, is the weighted mean of all sensor data at the current moment; If C compute exceeds the set threshold C thres when, trigger AI calculation and enter step 2 to generate an intelligent lighting control strategy.
3. The method for controlling the switching of console lights based on artificial intelligence according to claim 1, characterized in that, In the said step 2, using the environmental state estimation value calculated in step 1 as the input, an intelligent lighting control strategy is established based on the Markov decision process, and lighting adjustment is performed according to the current environmental state and user behavior pattern to improve the control accuracy and adaptability. It further includes: Step 2.1, state space modeling and transition probability calculation: The environmental state estimation value calculated based on Step 1.2 and user behavior data to construct a state space and calculate the state transition probability. The state transition model is defined as follows: S t = {L t , M t , T t , A t}, Among them, S t is the environmental state vector at the current moment t, L t is the light intensity, M t is the user's movement state, T t is the environmental temperature, A t is the brightness of the current lighting device; The state transition probability is calculated by the following formula: P(S t+1 |S t ,a t ) = ∑ i P(S t+1 |S t ,a t ,O i )P(O i |S t ), Among them, S t+1 is the state at the next moment, a t is the control action at the current moment, O i is the external interference factor affecting the environmental state; If the state transition probability exceeds the set threshold P thres then enter step 2.2 for policy optimization calculation; Step 2.2, policy optimization and reward function construction: Based on the state transition probability calculated in Step 2.1, use the reinforcement learning method to optimize the lighting control strategy, and define the reward function as follows: R t = w1f c (A t ) + w2f u (U t ) - w3f e (E t ), Among them, R t is the reward value at the current moment, w1, w2, w3 are weight parameters, and f c (A t ) is the lighting control comfort function, defined as: f c (A t ) = -(A t -A opt ) 2 , Among them, A opt is the optimal light brightness expected by the user; f u (U t ) is the user behavior preference function, defined as: Among them, U t is the usage behavior of the current user, U hist is the usage habit of historical users, U max is the maximum behavior deviation range; f e (E t ) is the energy consumption loss function, which is defined as: Among them, P(A t ) is the current lighting power consumption, and P max is the maximum power consumption; If the cumulative reward value G of policy optimization = ∑ t γ t R t exceeds the threshold G thres then enter step 2.3 to solve the optimal policy; Step 2.3, optimal policy solution and decision execution: Based on the cumulative reward value calculated in Step 2.2, use the value iteration method to solve the optimal lighting control strategy. The state value function is defined as follows: Among them, V(S t ) is the optimal value function of state S t , γ is the discount factor, P(S t+1 |S t , a t ) is the state transition probability calculated in Step 2.1, R t is the reward function calculated in Step 2.2, S t+1 is the state at the next moment, a t is the control action at the current moment, S t is the state at the current moment, V(S t+1 ) is the optimal value function of state S t+1 ; If the optimal policy π * (S t ) is calculated, the system executes the optimal control action and adjusts the lighting state, and then enters Step 3 for training the reinforcement learning model.
4. A method for controlling the switching of console lights based on artificial intelligence according to claim 1, characterized in that, In step 3, based on the optimal lighting control strategy calculated in step 2, the strategy is trained using reinforcement learning method, and the control decision is continuously optimized based on the environmental state feedback, enabling the system to adapt to different scenarios and optimize the lighting adjustment rules. It further includes: Step 3.1, Construction of reinforcement learning state space and policy initialization: The optimal control strategy π calculated based on Step 2.3 * (S t ) and the state space S t , construct the state set, action set, and reward function of reinforcement learning, and initialize the policy. Define the reinforcement learning task as follows: M=(S,A,P,R,γ), where M is the Markov decision process of reinforcement learning, S is the state space, A is the action space, P is the state transition probability, R is the reward function, and γ is the discount factor; The initialization of the reinforcement learning policy uses an arbitrary initialization method, so that the initial control policy π(S t ) under each state S t obeys a uniform distribution: where |A| is the dimension of the action space. After the policy initialization is completed, step 3.2 is entered for Q-value update and policy iteration; Step 3.2, Policy optimization based on Q learning: Based on the policy π0(S t ) initialized in step 3.1, the Q-learning algorithm is used to optimize the lighting control policy, and the Q-value update formula is defined as follows: Among them, Q(S t , a t ) is the Q-value of executing action a t in state S t , α is the learning rate, R t is the immediate reward value calculated in step 2.2, and γ is the discount factor set in step 3.1 Indicates the next state S t+1 The Q-value of the best action taken; The Q-value is updated iteratively. After each update, the ∈-greedy policy is used to select the next action a t : where ∈ is the exploration probability; If the change in the Q value is less than the set threshold Q min then, proceed to step 3.3 for policy convergence judgment and optimal policy selection; Step 3.3, Judgment of policy convergence and selection of optimal policy: Based on the Q value calculated in step 3.2, it is judged whether the reinforcement learning policy converges. The policy convergence conditions are as follows: Among them, Q (k) (S t , a t ) and Q (k-1) (S t , a t ) represent the Q-values of the k-th and (k - 1)-th iterations, ∈ Q is the convergence threshold, S and A are the state space and action space set in Step 3.1; When the convergence conditions are met, the final lighting control policy is determined by the following formula: Among them, π * (S t ) is the optimal lighting control strategy for subsequent intelligent control decisions; After the reinforcement learning policy converges, the system executes the optimal control action Adjust the lighting state and enter step 4 for computing resource management and task scheduling optimization.
5. A method for controlling the switching of console lights based on artificial intelligence according to claim 1, characterized in that, In step 4, based on the optimal lighting control strategy π * (S t ) calculated in step 3 and the convergence result of the reinforcement learning model, the computing resource allocation and task scheduling of the intelligent lighting control system are optimized, further including: Step 4.1, Calculation of task load assessment and prediction of resource requirements: The optimal policy π calculated based on Step 3.3 * (S t ) and the current task queue of the system, calculate the computing loads of different tasks, and predict the resource requirements at future moments. The task load is calculated as follows: Among them, L t is the computing load at the current moment t, N is the total number of tasks to be executed currently, w i is the priority weight of task i, C i (T t , S t ) is the computing demand of task i at the current temperature T t and the environmental state S t ; The calculation of load prediction adopts the exponentially weighted moving average method to calculate the load prediction value at the future time t+1: Among them, is the predicted value of the computing load at the next moment, and λ is the smoothing factor; The predicted load exceeds the set threshold L thres When this happens, proceed to step 4.2 for task scheduling optimization; Step 4.2, Optimization of task scheduling and allocation of computing resources: The load prediction value calculated based on Step 4.1 Optimize the task scheduling strategy to efficiently allocate computing resources between edge devices and cloud servers. The task scheduling decision is as follows: Among them, D t is the optimal task scheduling decision at the current moment, d is the task scheduling option, and α, β, and γ are the scheduling optimization weights. T d is the execution time of the scheduling option d, P d is the energy consumption overhead of the scheduling option d, and R d is the resource occupancy rate of the scheduling option d; Among them, the task execution time is calculated as follows: Among them, C d is the computing requirement of task d, and F d is the processing capacity of computing resources; After the optimization of task scheduling is completed, step 4.3 is entered for monitoring the system execution state and dynamic adjustment; Step 4.3, Monitoring of system execution state and dynamic adjustment: Task scheduling decision D calculated based on step 4.2 t , monitor the execution status of computing resources in real time and make dynamic adjustments. The system status monitoring indicators are as follows: S exec = {U t , D t , E t , T t}, Among them, S exec is the execution state of the current system; U t To calculate the utilization rate of computing resources, it is defined as: Among them, C exec is the amount of computation for the executed tasks, and C max is the maximum processing capacity of the computing resources; D t For task scheduling decision, E t is the energy consumption for task execution and is calculated as follows: E t = ∑ d P d T d , Among them, P d is the power consumption of scheduling option d, and T d is the task execution time; T t The time delay for task execution is calculated as follows: T t = max(T queue , T compute ), Among them, T queue is the waiting time of the task in the queue, and T compute is the computing time of the task; The execution status exceeds the set threshold, and the system adjusts the task scheduling policy D t , and feeds back to step 4.2 for re-optimization. Otherwise, the task execution is completed, and step 5 is entered for the safety management and stability optimization of the intelligent lighting system.
6. The method for controlling the switching of console lights based on artificial intelligence according to claim 1, characterized in that In step 7, based on the system energy efficiency optimization scheme calculated in step 6, the safety management and stability optimization of the intelligent lighting control system are designed to ensure the reliability and anti-interference ability of the system when operating in a complex environment. It further includes: Step 7.1, System anomaly detection and fault warning: Based on the optimal energy efficiency scheduling scheme calculated in step 6, the running state of the system is monitored, and anomalies are detected and warned. The definition of the abnormal state of the system is as follows: A t = {P t , V t , I t , L t , T t}, Among them, A t is the set of system states at the current moment t, P t is the current power consumption, V t is the power supply voltage, I t is the current, L t is the light intensity, T t is the ambient temperature; The determination of the abnormal state adopts the chi-square test method, and the abnormal detection statistic is defined as follows: Among them, χ 2 is the anomaly detection statistic, A i,t is the value of the i-th monitoring parameter at the current moment, μ i is the historical mean of this parameter, σ i is the standard deviation of this parameter; If χ 2 exceeds the set threshold a fault warning is triggered and step 7.2 is entered for anomaly correction and adaptive adjustment; Step 7.2, Abnormal correction and system adaptive adjustment: Based on the abnormal state monitored in step 7.1, the system is corrected and adaptively adjusted. The correction model adopts the Kalman filter method for state estimation, and the state update formula is as follows: Among them, is the optimal state estimate value at the current moment, is the predicted state at the previous moment, K t is the Kalman gain, and its calculation formula is as follows: where, P t|t-1 is the covariance matrix of the prediction state, H t is the observation matrix, R t is the measurement noise covariance matrix; If the state estimation error is less than the set threshold ∈ thres then proceed to step 7.3 for system security assessment and stability optimization; Step 7.3, System security assessment and stability optimization: Based on the corrected state calculated in step 7.2, the security and stability of the system are optimized. The security assessment adopts the information entropy method to calculate the chaos degree of the system state, and the information entropy calculation is as follows: Among them, H(A t ) is the information entropy of the system state set A t , and P i is the probability of the state A i,t occurring; If the information entropy H(A t ) exceeds the set threshold H thres , the system enters a high-risk state and adjusts the control strategy. The optimization method is as follows: Among them, S opt is the optimized system operating state, w1, w2, w3 are optimization weights, T s is the system response time, P s is the power consumption, R s is the system resource occupancy rate; After the system optimization is completed, the system resumes normal operation and enters step 8 for the extensibility design of the intelligent lighting system and the planning of future optimization strategies.
7. A method for controlling the switching of console lights based on artificial intelligence according to claim 1, characterized in that, In step 8, based on the system security assessment result and stability optimization scheme calculated in step 7, the extensibility design of the intelligent lighting system is further carried out to ensure the adaptability of the system in future scenarios, and optimization strategies are formulated to improve the overall performance. It further includes: Step 8.1, System extensibility assessment and architecture optimization: Optimized system state S calculated based on Step 7.3 opt , evaluate the scalability of the intelligent lighting system and optimize the system architecture. The scalability metrics are defined as follows: E t = α·N t + β·C t + γ·R t , Among them, E t is the system scalability index at the current time t, N t is the number of currently connected devices, C t is the computing power, defined as: Among them, F t is the processing capacity of the current computing resources, D t is the computing demand for the current task scheduling, R t is the system resource utilization rate, and α, β, and γ are scalability weights; If the scalability metric E t is lower than the set threshold E thres then proceed to step 8.2 to adjust the system optimization strategy; Step 8.2, Optimization of intelligent control algorithms and update of adaptive strategies: Based on the scalability index calculated in step 8.1, optimize the intelligent control algorithm and adaptively update the system strategy. The optimization method uses reinforcement learning for adaptive update, and the update formula is as follows: Among them, π ′ (S t ) is the updated control strategy, and π * (S t ) is the optimal strategy calculated in step 3.3, is the strategy trained based on the latest data, and η is the update rate; After the policy update, proceed to step 8.3 for future optimization strategy planning and system sustainability design; Step 8.3, Future optimization strategy planning and system sustainability design: The optimized control strategy π calculated based on Step 8.2 ′ (S t ), formulate a long-term optimization plan for the intelligent lighting system and conduct sustainable design. The objective function is as follows: O = min(w1·P t + w2·T t + w3·C t ) Among them, O is the long-term optimization target value of the system, P t is the power consumption, T t is the task execution time, C t is the computing resource occupancy, and w1, w2, and w3 are the optimization weights; If the optimization target O is lower than the set threshold O thres the system enters the long-term stable operation mode and feeds back to step 3.3 for periodic adjustment of the reinforcement learning strategy. Otherwise, the optimization plan is adjusted and step 8.1 is recalculated for extended optimization.
8. A method for controlling the switching of console lights based on artificial intelligence according to claim 1, characterized in that, In step 9, based on the long-term optimization results and sustainability design solutions obtained in step 8, further implement the feedback mechanism and optimization strategy update of the intelligent lighting system to ensure that the system can adapt to environmental changes and continuously improve performance. It further includes: Step 9.1, System feedback monitoring and performance evaluation: Based on the long-term optimization objective O calculated in step 8.3, the operating state of the intelligent lighting system is monitored with real-time feedback, and the system performance is comprehensively evaluated. The performance evaluation indicators include the system response time T s , energy efficiency η s and system stability λ s , where: T s = max(T Queue , T compute ), Among them, T s is the response time of the system, η s is the energy efficiency of the system, E useful is the effective energy consumption, E total is the total energy consumption, λ s is the system stability, σ stable is the total number of stable states of the system, σ total is the total number of states of the system; If the performance evaluation result of the system does not meet the set requirements, proceed to step 9.2 for feedback adjustment and strategy update; Step 9.2, Feedback adjustment and control strategy update: Based on the evaluation results of step 9.1, an adaptive control strategy is adjusted using reinforcement learning to further improve the system performance. The updated control strategy π″(S t ) is adjusted according to the following formula: Among them, π″(S t ) is the adjusted control strategy, and π ′ (S t ) is the optimized control strategy calculated in step 8.
2. is the latest strategy trained based on real-time feedback data, and ζ is the feedback adjustment rate; After the policy update, proceed to step 9.3 for long-term operation and optimization path planning of the intelligent lighting system; Step 9.3, Long-term optimization path planning and system continuous optimization: Based on the adjusted control strategy π″(S t ) calculated in step 9.2, formulate the long-term optimization path and continuous optimization plan of the system, and the objective function is as follows: O long = min(w1·P long + w2·T long + w3·C long ) Among them, O long is the long-term optimization target value of the system; P long is the power consumption of the system during long-term operation, T long is the long-term task execution time of the system, C long is the long-term computing resource occupancy of the system, and w1, w2, w3 are optimization weights; If the long-term optimization goal O long reaches the set requirements, the system enters the long-term stable operation stage and completes the adaptive optimization of the intelligent lighting system. Otherwise, it is fed back to step 8 for further optimization and strategy adjustment.
9. A terminal device, characterized in that, It includes a processor, a memory, a low-power microcontroller, a magnetic latching relay, and multiple groups of sensors. The processor is used to execute the console lighting switching control method based on artificial intelligence according to any one of claims 1 to 8. The memory is used to store lighting control data and user behavior data. The low-power microcontroller is responsible for performing edge computing tasks. The magnetic latching relay is used to control the lighting switch state. The multiple groups of sensors are used to collect environmental data.
10. A storage medium, characterized in that, Stored with computer-readable instructions, when the instructions are executed by the processor, the terminal device executes the console lighting switching control method based on artificial intelligence according to any one of claims 1 to 8.
Citation Information
Patent Citations
Intelligent interactive energy-saving lamp control platform
CN117156635A
LED light intelligent control method and system and computer equipment
CN117979487A
Water quality and water level monitoring method for hydraulic engineering
CN119249322A
Light emitting diode intelligent dimming system based on multispectral control
CN119697842A
Intelligent lighting control system based on Internet of Things
CN119997320A
Cited By
Smart home control method, device, equipment and medium
CN120802656A
Self-adaptive adjustment method and system for color temperature of LED lamp
CN121692482A