A console light switching control method based on artificial intelligence

By using an AI-based console lighting control method, and leveraging low-power sensors and reinforcement learning to optimize lighting control strategies, this approach solves the problems of existing smart desk lamps being unable to adapt to complex environmental changes and having inflexible resource allocation. It achieves intelligent and personalized lighting adjustment and system stability, thereby improving user experience and device lifespan.

CN120358652BActive Publication Date: 2025-11-04MT TITLIS BEIJING CONTROL TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510645776.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-20
Publication Date
2025-11-04
Estimated Expiration
2045-05-20

AI Technical Summary

Technical Problem

Existing intelligent lighting switching control methods cannot meet users' needs for intelligent and personalized control, cannot adapt to complex environmental changes, have inflexible allocation of computing resources, resulting in decreased response speed or waste of resources, and lack a sound anomaly detection mechanism, affecting system reliability and service life.

Method used

An AI-based console lighting switching control method is adopted. It monitors ambient light and user activity through low-power sensors, combines Bayesian updates and multimodal data fusion, uses reinforcement learning to optimize the lighting control strategy, dynamically calculates the environmental state, realizes intelligent lighting adjustment, and ensures system stability and efficient resource allocation through anomaly detection and adaptive optimization strategies.

Benefits of technology

It achieves adaptive control of the smart station's lighting switching, improves user experience, reduces computing latency, ensures stable system operation, extends equipment life, and enhances system response speed and resource utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120358652B_ABST
    Figure CN120358652B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of intelligent lighting control and discloses a console lamp light switching control method based on artificial intelligence, which comprises the following steps: step 1, event-driven data acquisition, environment illumination and user activity state are monitored by using a low-power sensor, and a perception module is triggered through a set threshold and a change rate detection mechanism; step 2, multi-modal data fusion and environment state estimation, on the basis of the data collected in step 1, illumination, temperature and human activity information of multiple groups of sensors are combined. The application adopts an artificial intelligence-based reinforcement learning strategy adaptive adjustment technology, realizes intelligent control of console lamp light switching, automatically optimizes brightness and color temperature according to environment states, improves the user experience effect, and solves the problems that light adjustment lacks adaptability and cannot respond to environment changes in real time compared with the light switching scheme based on a fixed time table and simple sensor triggering in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent lighting control, in particular to a console light switching control method based on artificial intelligence. BACKGROUND

[0002] With the development of smart home technology, intelligent lighting control systems have gradually become popular. Existing console light switching control methods 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 on-off control or simple trigger logic based on light sensors. This method can achieve a certain degree of automation, but lacks flexibility and cannot adapt to complex environmental changes. For example, in cases where natural light brightness is unstable or user needs change frequently, the light may be mis-triggered, delayed in response, or adjusted unreasonably, resulting in poor user experience.

[0004] Some smart table lamps support remote control and multiple lighting modes, requiring cloud or local computing resources for task processing. Traditional systems usually use fixed computing resource allocation schemes and cannot adjust according to the dynamic changes in task load. During peak periods, computing resources cannot meet the processing needs of a large number of tasks, resulting in decreased response speed. During low load periods, a large number of computing resources are idle, causing unnecessary energy waste and reducing overall system efficiency.

[0005] During long-term operation, intelligent lighting control systems may be affected by environmental interference, voltage fluctuations, or sensor failures, leading to abnormal light adjustment. Most existing products lack a comprehensive abnormality detection mechanism and simply rely on user manual inspection or passive alarm triggering, which reduces system reliability and leads to lighting control failure, affecting normal use. Meanwhile, existing fault correction methods are mostly static strategies that cannot achieve real-time optimization and adjustment. When an abnormality occurs, the device may remain in an unstable state for a long time, affecting its service life.

[0006] To address the above problems, the present application proposes a console light switching control method based on artificial intelligence. SUMMARY

[0007] To address the deficiencies of existing technologies, the present application provides a console light switching control method based on artificial intelligence to solve the problems raised in the background.

[0008] To achieve the above objectives, the present application uses the following technical solution: a console light switching control method based on artificial intelligence, comprising:

[0009] Step 1, event-driven data collection, using low-power sensors to monitor ambient light and user activity status, triggering the perception module through the set threshold and change rate detection mechanism;

[0010] Based on the environmental data collection of step 1, the Bayesian update method is used to fuse the multi-sensor data and obtain the optimal estimate value of the current environment state, and the data fusion process is as follows:

[0011]

[0012] Among them, E t is the current environment state, D t is the current sensor data set, P(E t ) is the prior probability of the environment state, P(D t |E t ) is the conditional probability of the observation data, and P(D t ) is the normalized probability of the sensor data;

[0013] Based on this calculation, the optimal estimate value of the current environment state is obtained

[0014] Step 2, multi-modal data fusion and environment state estimation, based on the data collected in step 1, combining the light, temperature and human activity information of multiple sensors, using the Bayesian update method for data fusion, dynamically calculating the optimal estimate value of the current environment state;

[0015] In step 2, the environment state estimate value calculated in step 1 is input, based on Markov decision process to establish intelligent lighting control strategy, according to the current environment state and user behavior mode to adjust the light, improve the control precision and adaptability, further including:

[0016] Step 2.1, state space modeling and transition probability calculation:

[0017] Based on the environment state estimate value calculated in step 1 and user behavior data, the state space is constructed, and the state transition probability is calculated, and the state transition model is defined as follows:

[0018] S t ={L t ,M t ,T t ,A t},

[0019] Among them, S t is the environment state vector at the current time t, L t is the light intensity, M tT is the user movement state t A is the ambient temperature t is the brightness of the current lighting device

[0020] The state transition probability is calculated by the following formula:

[0021] P(S t+1 |S t ,a t )=∑ i P(S t+1 |S t ,a t ,O i )P(O i |S t ),

[0022] where S t+1 is the next state, a t is the current control action, and O i is the external disturbance factor affecting the environment state

[0023] If the state transition probability exceeds the set threshold P thres , proceed to step 2.2 for policy optimization calculation

[0024] Step 2.2, policy optimization and reward function construction:

[0025] Based on the state transition probability calculated in step 2.1, the lighting control policy is optimized using reinforcement learning method, and the reward function is defined as follows:

[0026] R t =w1f c (A t )+w2f u (U t )-w3f e (E t ),

[0027] where R t is the reward value at the current time, w1, w2, w3 are weight parameters, f c (A t ) is the lighting control comfort function, defined as:

[0028] f c (A t )=-(A t -A opt ) 2 ,

[0029] where A opt is the user's desired optimal lighting brightness

[0030] f u (U t ) is the user behavior preference function, defined as:

[0031]

[0032] where U t is the current user's usage behavior, U hist is the historical user usage habit, and U max is the maximum behavior deviation range;

[0033] f e (E t ) is the energy consumption loss function, defined as:

[0034]

[0035] where P(A t ) is the current light power consumption, and P max is the maximum power consumption;

[0036] If the cumulative reward value G = ∑ t γ t R t of the strategy optimization exceeds the threshold G thres , proceed to step 2.3 to solve the optimal strategy;

[0037] Step 2.3, optimal strategy solving and decision execution:

[0038] Based on the cumulative reward value calculated in step 2.2, the value iteration method is used to solve the optimal light control strategy, and the state value function is defined as follows:

[0039]

[0040] 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 value at the current time, S t+1 is the state at the next time, a t is the control action at the current time, S t is the state at the current time, and V(S t+1 ) is the optimal value function of state S t+1 ;

[0041] If the optimal strategy π * (S t ) is calculated, the system executes the optimal control action and adjust the light state, then go to step 3 for reinforcement learning model training;

[0042] Step 3, intelligent light control strategy generation, based on the environment state calculated in step 2, a hierarchical Markov decision process is used to establish a light control strategy;

[0043] Step 4, reinforcement learning training optimizes light control strategy, based on the decision process constructed in step 3, reinforcement learning method is used to train the control strategy, combined with user's operation feedback and environmental change data;

[0044] Step 5, computing resource management and task scheduling, according to the optimized light control strategy in step 4, Pontryagin's maximum principle is used to optimize the trigger time of AI computing task;

[0045] Step 6, low-power hardware execution and light device control, combined with the optimized computing strategy in step 5, magnetic latching relay and low-power microcontroller are used to control the light device;

[0046] Step 7, data security protection and system stability guarantee, based on the hardware architecture in step 6, encryption algorithm is used to protect data transmission, and an abnormal detection mechanism is established;

[0047] Step 8, system maintainability improvement and remote management support, based on the data security in step 7, modular design architecture is used;

[0048] Step 9, human-computer interaction and intelligent control method, based on the system expandability in step 8, interactive mode is provided, supporting visual terminal and shortcut keyboard, combined with user identity recognition function.

[0049] Preferably, in step 1, when the set environmental change condition is met, low-power sensors are used to monitor the environmental light and user activity state, and data collection is activated when the light changes significantly and the user is detected to be close, further including:

[0050] Environmental state change monitoring and perception trigger:

[0051] Based on the set light threshold and user activity detection mechanism, it is judged whether to trigger data collection, and the perception trigger condition is as follows:

[0052]

[0053] Where, T s is the environmental state change rate, L t and L t-1 are the light intensity values at the current time and the last time, M t and M t-1is the user movement detection value at the current time and the previous time, and Δt is the time interval of data collection;

[0054] If T s exceeds the set threshold T thres , the environmental data collection is triggered;

[0055] According to the environmental state estimation value calculated in step 1 Determine whether to trigger the AI computing task, and the computing task triggering condition is as follows:

[0056]

[0057] where C compute is the computing task triggering threshold, and α and β are weight parameters, E t-1 is the environmental state estimation value at the previous time,

[0058] σ D is the uncertainty of the sensor data at the current time, and the calculation method is as follows:

[0059]

[0060] 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 time.

[0061] If C compute exceeds the set threshold C thres , the AI computing is triggered, and step 2 is entered to generate the intelligent lighting control strategy.

[0062] Preferably, 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 environmental state feedback, so that the system can adapt to different scenes and optimize the lighting adjustment rules, further comprising:

[0063] Step 3.1, reinforcement learning state space construction and strategy initialization

[0064] Based on the optimal control strategy π * (S t ) calculated in step 2.3 and the state space S t , the state set, action set and reward function of reinforcement learning are constructed, and the strategy is initialized, and the reinforcement learning task is defined as follows:

[0065] M=(S,A,P,R,γ),

[0066] Wherein, 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;

[0067] The reinforcement learning strategy initialization adopts an arbitrary initialization method, so that the initial control strategy π(S t ) under each state S t obeys a uniform distribution:

[0068]

[0069] Wherein, |A| is the dimension of the action space, and after the strategy initialization is completed, step 3.2 is entered to update the Q value and iterate the strategy;

[0070] Step 3.2, strategy optimization based on Q learning:

[0071] Based on the strategy π0(S t ) initialized in step 3.1, the Q learning algorithm is used to optimize the light control strategy, and the Q value update formula is defined as follows:

[0072]

[0073] Wherein, Q(S t ,a t ) is the Q value of performing action a t under state S t , α is the learning rate, R t is the reward value at the current time, and γ is the discount factor,

[0074] Indicates the Q value of the best action taken in the next state S t+1 ;

[0075] The Q value update is performed in an iterative manner, and after each update, the next action a t is selected using the ε-greedy strategy:

[0076]

[0077] Wherein, ∈ is the exploration probability;

[0078] If the change in the Q value is less than the set threshold Q min , step 3.3 is entered to judge the strategy convergence and select the optimal strategy;

[0079] Step 3.3, strategy convergence judgment and optimal strategy selection:

[0080] Based on the Q value calculated in step 3.2, it is judged whether the reinforcement learning strategy converges or not, and the strategy convergence condition is as follows:

[0081]

[0082] wherein Q (k) (S t ,a t ) and Q (k-1) (S t ,a t ) represent the Q value of the kth and k-1th iteration, ∈ Q is the convergence threshold, S and A are the set state space and action space;

[0083] When the convergence condition is met, the final light control strategy is determined by the following formula:

[0084]

[0085] wherein π * (S t ) is the optimal light control strategy, which is used for subsequent intelligent control decision;

[0086] After the reinforcement learning strategy converges, the system executes the optimal control action adjusts the light state, and enters step 4 to perform the calculation resource management and task scheduling optimization.

[0087] Preferably, in step 4, based on the optimal light control strategy π * (S t ) calculated in step 3 and the convergence result of the reinforcement learning model, the calculation resource allocation and task scheduling of the intelligent light control system are optimized, further comprising:

[0088] Step 4.1, calculation of task load evaluation and resource demand prediction:

[0089] Based on the optimal strategy π * (S t ) calculated in step 3.3 and the current task queue of the system, the calculation load of different tasks is calculated, and the resource demand at future time is predicted, and the task load calculation is as follows:

[0090]

[0091] wherein L t is the calculation load at the current time t, N is the total number of tasks to be executed, w i is the priority weight of task i, C i (T t ,S t ) is the calculation demand of task i at the current temperature T t and the environment state S t ;

[0092] The computing load prediction is performed using an exponential weighted moving average method to calculate the load prediction value at a future time t+1:

[0093]

[0094] wherein, is the computing load prediction value at the next time, and λ is a smoothing factor;

[0095] When the predicted load exceeds a set threshold L thres , proceed to step 4.2 for task scheduling optimization;

[0096] Step 4.2, task scheduling optimization and computing resource allocation:

[0097] 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, and the task scheduling decision is as follows:

[0098]

[0099] wherein, D t is the optimal task scheduling decision at the current time, d is the task scheduling option, is the scheduling optimization weight, T d is the execution time of the scheduling option d, P d is the energy consumption overhead of the scheduling option d, R d is the resource occupancy rate of the scheduling option d;

[0100] wherein, the task execution time is calculated as follows:

[0101] wherein, C d is the computing demand of task d, and F d is the processing capacity of the computing resource;

[0102] After task scheduling optimization, proceed to step 4.3 for system execution state monitoring and dynamic adjustment;

[0103] Step 4.3, system execution state monitoring and dynamic adjustment:

[0104] Based on the task scheduling decision D t calculated in step 4.2, real-time monitoring of the execution state of the computing resource is performed for dynamic adjustment, and the system state monitoring indicators are as follows:

[0105] S exec ={U t ,D t ,E t ,T time},

[0106] where S exec is the execution status of the current system;

[0107] U t is the utilization of the computing resource, defined as:

[0108] where C exec is the computing amount of the executed task, C max is the maximum processing capacity of the computing resource;

[0109] D t is the task scheduling decision, E t is the energy consumption of the task execution, calculated as follows:

[0110] E t =∑ d P d T d ,

[0111] where P d is the power consumption of the scheduling option d, T d is the task execution time.

[0112] T time is the task execution time, calculated as follows: T time = max(T queue ,T compute ),

[0113] where T queue is the waiting time of the task in the queue, T compute is the computing time of the task;

[0114] If the execution status exceeds a set threshold, the system adjusts the task scheduling strategy D t and feeds back to step 4.2 for re-optimization, otherwise, the task execution is completed, and the system enters step 5 for safety management and stability optimization of the intelligent lighting system.

[0115] Preferably, 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 running in complex environments, further comprising:

[0116] Step 7.1, system anomaly detection and fault warning:

[0117] Based on the optimal energy efficiency scheduling scheme calculated in step 6, the running state of the system is monitored, and the abnormal situation is detected and warned, and the system abnormal state is defined as follows:

[0118] A t ={Pt ,V t ,I t ,L t ,T t},

[0119] wherein, 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;

[0120] The abnormal state determination adopts the chi-square test method, and the abnormal detection statistic is defined as follows:

[0121]

[0122] wherein, χ 2 is the abnormal detection statistic, A i,t is the i-th monitoring parameter value at the current time, μ i is the historical mean of the parameter, and σ i is the standard deviation of the parameter;

[0123] If χ 2 exceeds the set threshold value , the fault warning is triggered, and step 7.2 is entered to correct the abnormality and adaptively adjust;

[0124] Step 7.2, abnormality correction and system adaptive adjustment:

[0125] 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:

[0126]

[0127] wherein, is the optimal state estimation value at the current time, is the predicted state at the last time, K t is the Kalman gain, and Z t is the measurement value at the current time t, and the calculation formula is as follows:

[0128]

[0129] wherein, 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;

[0130] If the state estimation error is less than the set threshold thres , go to step 7.3 for system security evaluation and stability optimization;

[0131] Step 7.3, system security evaluation and stability optimization:

[0132] Based on the corrected state calculated in step 7.2, the safety and stability of the system are optimized, and the safety evaluation uses the information entropy method to calculate the chaos degree of the system state, and the information entropy is calculated as follows:

[0133]

[0134] Where H(A t ) is the information entropy of the system state set A t , P i is the probability of state A i,t occurrence, and A i,t is the i-th specific state at time t.

[0135] 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, and the optimization method is as follows:

[0136]

[0137] Where S opt is the optimized system running state, is the optimization weight, T s is the system response time, P s is the power consumption, and R s is the system resource occupancy rate.

[0138] After the system optimization is completed, the system returns to normal operation, and step 8 is entered for the expandability design and future optimization strategy planning of the intelligent lighting system.

[0139] Preferably, in step 8, based on the system security evaluation results and stability optimization scheme calculated in step 7, the expandability design of the intelligent lighting system is further carried out to ensure the adaptability of the system in future scenarios, and optimization strategies are developed to improve the overall performance, further including:

[0140] Step 8.1, system expandability evaluation and architecture optimization:

[0141] Based on the optimized system state S opt calculated in step 7.3, the expandability of the intelligent lighting system is evaluated, and the system architecture is optimized, and the expandability index is defined as follows:

[0142]

[0143] Among them, E t Let N be the system scalability index at time t. t C represents the number of currently connected devices. t Computational capability is defined as:

[0144] Among them, F t Given the current processing power of computing resources, D t This represents the computational requirements of the current task scheduling. To improve system resource utilization, For extended weights;

[0145] If the expansion index E t Below the set threshold E thres If this happens, proceed to step 8.2 to adjust the system optimization strategy;

[0146] Step 8.2, Intelligent control algorithm optimization and adaptive strategy update:

[0147] Based on the scalability index calculated in step 8.1, the intelligent control algorithm is optimized, and the system strategy is updated adaptively. The optimization method adopts reinforcement learning adaptive update, and the update formula is as follows:

[0148]

[0149] Wherein, π′(S t ) represents the updated control strategy, π * (S t The optimal strategy calculated in step 3.3 is as follows: Let η be the update rate, where η is the strategy trained based on the latest data.

[0150] After the strategy is updated, proceed to step 8.3 to plan future optimization strategies and design system sustainability.

[0151] Step 8.3, Future Optimization Strategy Planning and System Sustainability Design:

[0152] Based on the optimized control strategy π′(S) calculated in step 8.2 t Develop a long-term optimization plan for the intelligent lighting system and conduct sustainable design. The objective function is as follows:

[0153] O=min(w1·P t +w2·T time +w3·C t ),

[0154] Where O is the long-term optimization target value of the system, and P tFor power consumption, T time For task execution time, C t For computing resource occupation, w1, w2, w3 are optimization weights;

[0155] If the optimization target O is lower than the set threshold O thres , the system enters a long-term stable operation mode, and feedback to step 3.3 for periodic adjustment of reinforcement learning strategy, otherwise, adjust the optimization scheme, recalculate step 8.1 for scalability optimization.

[0156] Preferably, in step 9, based on the long-term optimization result calculated in step 8 and the sustainable design scheme, the feedback mechanism and optimization strategy update of the intelligent lighting system are further implemented to ensure that the system can adapt to environmental changes and continuously improve performance, further comprising:

[0157] Step 9.1, system feedback monitoring and performance evaluation:

[0158] Based on the long-term optimization target O calculated in step 8.3, real-time feedback monitoring of the running state of the intelligent lighting system is performed, and the system performance is comprehensively evaluated. The performance evaluation indicators include system response time T s , energy efficiency η s and system stability λ s , wherein:

[0159] T s = max(T Queue , T compute ),

[0160]

[0161] Wherein, T s is the response time of the system, η s is the system energy efficiency, 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.

[0162] If the performance evaluation result of the system does not meet the set requirements, enter step 9.2 for feedback adjustment and strategy update;

[0163] Step 9.2, feedback adjustment and control strategy update:

[0164] Based on the evaluation result of step 9.1, the control strategy is adjusted adaptively using reinforcement learning to further improve the system performance. The updated control strategy π″(S t ) is adjusted according to the following formula:

[0165]

[0166] wherein π''(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;

[0167] After the strategy is updated, step 9.3 is entered to perform long-term operation and optimization path planning of the intelligent lighting system;

[0168] Step 9.3, long-term optimization path planning and system continuous optimization:

[0169] Based on the adjusted control strategy π''(S t ) calculated in step 9.2, the long-term optimization path and continuous optimization planning of the system are formulated, and the objective function is as follows:

[0170]

[0171] wherein O long is the long-term optimization target value of the system;

[0172] P long is the power consumption of the system in long-term operation, T long is the long-term task execution time of the system, C long is the long-term computing resource occupation of the system, is the optimization weight;

[0173] If the long-term optimization target O long meets the set requirement, the system enters the long-term stable operation stage, and the adaptive optimization of the intelligent lighting system is completed, otherwise, feedback is given to step 8 for further optimization and strategy adjustment.

[0174] A terminal device includes a processor, a memory, a low-power microcontroller, a magnetic latching relay, and multiple groups of sensors. The processor is configured to execute the AI-based console light switching control method. The memory is configured to store light control data and user behavior data. The low-power microcontroller is configured to perform edge computing tasks. The magnetic latching relay is configured to control the light switch state. The multiple groups of sensors are configured to collect environmental data.

[0175] A storage medium stores computer-readable instructions. When the instructions are executed by a processor, the terminal device executes the AI-based console light switching control method.

[0176] The application provides a console light switching control method based on artificial intelligence. The following advantages are provided:

[0177] 1. The application uses a reinforcement learning strategy based on artificial intelligence to adaptively adjust the brightness and color temperature of the console light, thereby improving the user experience and solving the problem of lack of adaptability in light adjustment and inability to respond to environmental changes in real time.

[0178] 2. The application introduces a task load prediction and computing resource dynamic scheduling method to intelligently allocate console light control tasks, thereby reducing computing delay and improving system response speed.

[0179] 3. The application combines system anomaly detection and adaptive optimization strategy to build an intelligent light safety management mechanism to ensure stable system operation, real-time fault monitoring, dynamic adjustment of control strategy, and prolonging equipment life. BRIEF DESCRIPTION OF DRAWINGS

[0180] Figure 1 The flowchart of the application. DETAILED DESCRIPTION

[0181] To enable those skilled in the art to understand the application, the following will describe the technical solutions in the embodiments of the application with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the application, not all. Based on the embodiments in the application, other embodiments obtained by those skilled in the art without creative labor should be within the scope of the application.

[0182] The application will be described in detail below with reference to the accompanying drawings:

[0183] Embodiment:

[0184] Please refer to the accompanying drawings Figure 1 The application provides a console light switching control method based on artificial intelligence, which includes:

[0185] Step 1, event-driven data acquisition, using low-power sensors to monitor environmental light and user activity status, triggering the perception module through the set threshold and change rate detection mechanism;

[0186] Based on the environmental data collection of step 1, the multi-sensor data is fused and calculated by using the Bayesian updating method to obtain the optimal estimation value of the current environment state, and the data fusion process is as follows:

[0187]

[0188] Wherein, E t is the current environment state, D t is the current sensor data set, P(E t ) is the prior probability of the environment state, P(D t |E t ) is the conditional probability of the observation data, and P(D t ) is the normalized probability of the sensor data.

[0189] Based on this calculation, the optimal estimation value of the current environment state is obtained

[0190] Step 2, multi-modal data fusion and environment state estimation, based on the data collected in step 1, combined with the light, temperature and human activity information of multiple sensors, the data is fused by using the Bayesian updating method, and the optimal estimation value of the current environment state is dynamically calculated.

[0191] In step 2, the environment state estimation value calculated in step 1 is input, based on Markov decision process to establish intelligent light control strategy, according to the current environment state and user behavior mode to adjust the light, improve the control precision and adaptability, further including:

[0192] Step 2.1, state space modeling and transition probability calculation:

[0193] Based on the environment state estimation value calculated in step 1 and user behavior data, the state space is constructed, and the state transition probability is calculated, and the state transition model is defined as follows:

[0194] S t ={L t ,M t ,T t ,A t},

[0195] Wherein, S t is the environment state vector at current time t, L t is the light intensity, M t is the user movement state, T t is the environment temperature, and A t is the brightness of the current light device.

[0196] The state transition probability is calculated by the following formula:

[0197] P(S t+1 |S t ,a t )=∑ i P(S t+1 |S t ,a t ,O i )P(O i |S t ),

[0198] where S t+1 is the state at next time, a t is the control action at current time, O i is the external disturbance factor affecting the environment state;

[0199] If the state transition probability exceeds the set threshold P thres , go to step 2.2 to perform policy optimization calculation;

[0200] Step 2.2, policy optimization and reward function construction:

[0201] Based on the state transition probability calculated in step 2.1, the light control policy is optimized using reinforcement learning method, and the reward function is defined as follows:

[0202] R t =w1f c (A t )+w2f u (U t )-w3f e (E t ),

[0203] where R t is the reward value at current time, w1, w2, w3 are weight parameters, f c (A t ) is the light control comfort function, defined as:

[0204] f c (A t )=-(A t -A opt ) 2 ,

[0205] where A opt is the user's desired optimal light brightness;

[0206] f u (U t ) is the user behavior preference function, defined as:

[0207]

[0208] wherein, 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;

[0209] f e (E t ) is the energy consumption loss function, defined as:

[0210]

[0211] wherein, P(A t ) is the current light power consumption, P max is the maximum power consumption;

[0212] If the cumulative reward value G =∑ t γ t R t of the strategy optimization exceeds the threshold value G thres , step 2.3 is entered to solve the optimal strategy;

[0213] Step 2.3, optimal strategy solving and decision execution:

[0214] Based on the cumulative reward value calculated in step 2.2, the value iteration method is used to solve the optimal light control strategy, and the state value function is defined as follows:

[0215]

[0216] wherein, 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 value at the current time, S t+1 is the state at the next time, a t is the control action at the current time, S t is the state at the current time, and V(S t+1 ) is the optimal value function of state S t+1 ;

[0217] If the optimal strategy π * (S t ) is calculated, the system executes the optimal control action and adjusts the light state, and then enters step 3 to train the reinforcement learning model;

[0218] Step 3, intelligent lighting control strategy generation, based on the environmental state calculated in step 2, a hierarchical Markov decision process is used to establish the lighting control strategy;

[0219] Step 4, reinforcement learning training optimizes the lighting control strategy, based on the decision process constructed in step 3, the control strategy is trained using reinforcement learning method, combined with user's operation feedback and environmental change data;

[0220] 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 trigger time of AI computing task;

[0221] Step 6, low-power hardware execution and lighting device control, combined with the optimization calculation strategy in step 5, magnetic latching relay and low-power microcontroller are used to control lighting devices;

[0222] Step 7, data security protection and system stability guarantee, based on the hardware architecture in step 6, encryption algorithm is used to protect data transmission, and an abnormal detection mechanism is established;

[0223] Step 8, system maintainability improvement and remote management support, based on the data security in step 7, modular design architecture is used;

[0224] Step 9, human-computer interaction and intelligent control method, based on the system scalability in step 8, interactive methods are provided, supporting visual terminal and shortcut keyboard, combined with user identity recognition function.

[0225] In step 1, when the set environmental change conditions are met, low-power sensors are used to monitor the environmental light and user activity state, and data collection is activated when significant changes in light occur and users are detected to be close, further including:

[0226] Environmental state change monitoring and perception trigger:

[0227] Based on the set light threshold and user activity detection mechanism, it is judged whether to trigger data collection, the perception trigger conditions are as follows:

[0228]

[0229] Where, T s is the environmental state change rate, L t and L t-1 are the light intensity values at the current time and the last time, M t and M t-1 are the user movement detection values at the current time and the last time, and Δt is the data collection time interval;

[0230] If T sC exceeds a set threshold T thres environment data collection is triggered;

[0231] environment state estimate calculated according to step 1 whether to trigger an AI computing task, and the computing task triggering condition is as follows:

[0232]

[0233] wherein C compute is a computing task triggering threshold, a and β are weight parameters, E t-1 is the environment state estimate at the previous time,

[0234] σ D is the uncertainty of the sensor data at the current time, and the calculation method is as follows:

[0235]

[0236] wherein 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 time.

[0237] If C compute exceeds a set threshold C thres , AI computing is triggered, and step 2 is entered to generate an intelligent lighting control strategy.

[0238] 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 environment state feedback, so that the system can adapt to different scenes and optimize the lighting adjustment rules, further including:

[0239] Step 3.1, reinforcement learning state space construction and strategy initialization

[0240] Based on the optimal control strategy π * (S t ) calculated in step 2.3 and the state space S t , the state set, action set and reward function of reinforcement learning are constructed, and the strategy is initialized, and the reinforcement learning task is defined as follows:

[0241] M = (S, A, P, R, γ),

[0242] wherein 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;

[0243] The reinforcement learning strategy initialization adopts an arbitrary initialization method, so that the initial control strategy π(S t ) in each state S t obeys a uniform distribution:

[0244]

[0245] where |A| is the dimension of the action space. After the strategy initialization is completed, step 3.2 is performed for Q value updating and strategy iteration;

[0246] Step 3.2, strategy optimization based on Q learning:

[0247] Based on the strategy π0(S t ) initialized in step 3.1, the Q learning algorithm is used to optimize the light control strategy, and the Q value updating formula is defined as follows:

[0248]

[0249] where Q(S t ,a t ) is the Q value of performing action a t in state S t , α is the learning rate, R t is the reward value at the current time, γ is the discount factor,

[0250] represents the Q value of the best action taken in the next state S t+1 ;

[0251] The Q value updating is performed in an iterative manner, and after each update, the next action a t is selected using the ε-greedy strategy:

[0252]

[0253] where ∈ is the exploration probability;

[0254] If the change in the Q value is less than a set threshold Q min , step 3.3 is performed for strategy convergence judgment and optimal strategy selection;

[0255] Step 3.3, strategy convergence judgment and optimal strategy selection:

[0256] Based on the Q value calculated in step 3.2, it is judged whether the reinforcement learning strategy converges or not, and the strategy convergence condition is as follows:

[0257]

[0258] where Q (k) (S t ,a t) and Q (k-1) (S t , t ) represents the Q value of the kth round and the k-1th round iteration, ∈ Q is the convergence threshold, S and A are the set state space and action space;

[0259] When the convergence condition is met, the final light control strategy is determined by the following formula:

[0260]

[0261] Where, π * (S t ) is the optimal light control strategy, which is used for subsequent intelligent control decision;

[0262] After the reinforcement learning strategy converges, the system executes the optimal control action Adjust the light state, and enter step 4 to optimize the computing resource management and task scheduling.

[0263] In step 4, based on the optimal light 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 light control system are optimized, which further includes:

[0264] Step 4.1, calculate the task load evaluation and resource demand prediction:

[0265] Based on the optimal strategy π * (S t ) calculated in step 3.3 and the current task queue of the system, the computing load of different tasks is calculated, and the resource demand at future time is predicted, and the task load calculation is as follows:

[0266]

[0267] Where, L t is the computing load at the current time t, N is the total number of tasks to be executed, w i is the priority weight of task i, C i (T t , S t ) is the computing demand of task i under the current temperature T t and environmental state S t ;

[0268] The computing load prediction uses the exponential weighted moving average method to calculate the load prediction value at future time t+1:

[0269]

[0270] wherein, is the predicted value of the computing load at the next time, and λ is the smoothing factor;

[0271] If the predicted load exceeds the set threshold L thres , go to step 4.2 to optimize the task scheduling;

[0272] Step 4.2, task scheduling optimization and computing resource allocation:

[0273] Based on the predicted load value calculated in step 4.1 Optimize the task scheduling strategy to efficiently allocate computing resources between edge devices and cloud servers, and the task scheduling decision is as follows:

[0274]

[0275] wherein, D t is the optimal task scheduling decision at the current time, d is the task scheduling option, is the scheduling optimization weight, T d is the execution time of the scheduling option d, P d is the energy consumption overhead of the scheduling option d, R d is the resource occupancy rate of the scheduling option d;

[0276] wherein, the task execution time is calculated as follows:

[0277] wherein, C d is the computing demand of task d, F d is the processing capacity of the computing resource;

[0278] After the task scheduling optimization is completed, go to step 4.3 to monitor the system execution state and dynamically adjust;

[0279] Step 4.3, system execution state monitoring and dynamic adjustment:

[0280] Based on the task scheduling decision D t calculated in step 4.2, real-time monitor the execution state of the computing resource, and dynamically adjust, the system state monitoring indicators are as follows:

[0281] S exec ={U t ,D t ,E t ,T time},

[0282] wherein, S exec is the current system execution state;

[0283] U t is the utilization rate of the computing resource, defined as:

[0284] wherein C exec is the computational amount of the executed task, C max is the maximum processing capacity of the computing resource;

[0285] D t is the task scheduling decision, E t is the energy consumption of the task execution, calculated as follows:

[0286] E t =∑ d P d T d ,

[0287] wherein P d is the power consumption of the scheduling option d, T d is the task execution time.

[0288] T time is the task execution time, calculated as follows: T time =max(T queue ,T compute ),

[0289] wherein T queue is the waiting time of the task in the queue, T compute is the computing time of the task;

[0290] If the execution state exceeds a set threshold, the system adjusts the task scheduling strategy D t , and feeds back to step 4.2 for re-optimization, otherwise, the task execution is completed, and enters step 5 for safety management and stability optimization of the intelligent lighting system.

[0291] 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 running in complex environment, further including:

[0292] Step 7.1, system anomaly detection and fault warning:

[0293] Based on the optimal energy efficiency scheduling scheme calculated in step 6, the running state of the system is monitored, and the abnormal situation is detected and warned, and the system abnormal state is defined as follows:

[0294] A t ={P t ,V t ,I t ,L t ,T t},

[0295] wherein 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;

[0296] The abnormal state determination adopts the chi-square test method, and the abnormal detection statistic is defined as follows:

[0297]

[0298] wherein χ 2 is the abnormal detection statistic, A i,t is the i-th monitoring parameter value at the current time, μ i is the historical mean of the parameter, σ i is the standard deviation of the parameter;

[0299] If χ 2 exceeds the set threshold value , a fault warning is triggered, and step 7.2 is entered to perform abnormal correction and adaptive adjustment;

[0300] Step 7.2, abnormal correction and system adaptive adjustment:

[0301] 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 to perform state estimation, and the state update formula is as follows:

[0302]

[0303] wherein x is the optimal state estimation value at the current time, x is the predicted state at the last time, K t is the Kalman gain, Z t is the measurement value at the current time t, and the calculation formula is as follows:

[0304]

[0305] wherein P t|t-1 is the covariance matrix of the predicted state, H t is the observation matrix, r t is the measurement noise covariance matrix;

[0306] If the state estimation error is less than the set threshold value ∈ thres , step 7.3 is entered to perform system safety evaluation and stability optimization;

[0307] Step 7.3, system security evaluation and stability optimization:

[0308] Based on the revised state calculated in step 7.2, the safety and stability of the system are optimized, and the safety evaluation uses the information entropy method to calculate the chaos degree of the system state, and the information entropy is calculated as follows:

[0309]

[0310] Where H(A t ) is the information entropy of the system state set A t , P i is the probability of state A i,t occurrence, and A i,t is the i-th specific state at time t.

[0311] 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, and the optimization method is as follows:

[0312]

[0313] Where S opt is the optimized system running state, is the optimization weight, T s is the system response time, P s is the power consumption, and R s is the system resource occupancy rate.

[0314] After the system optimization is completed, the system returns to normal operation, and enters step 8 for the expandability design and future optimization strategy planning of the intelligent lighting system.

[0315] In step 8, based on the system security evaluation results and stability optimization scheme calculated in step 7, the expandability design of the intelligent lighting system is further carried out to ensure the adaptability of the system in future scenarios, and optimization strategies are developed to improve the overall performance, which further includes:

[0316] Step 8.1, system expandability evaluation and architecture optimization:

[0317] Based on the optimized system state S opt calculated in step 7.3, the expandability of the intelligent lighting system is evaluated, and the system architecture is optimized, and the expandability index is defined as follows:

[0318]

[0319] Where E t is the system expandability index at the current time t, N t is the number of currently connected devices, and Ct For computing capability, define as:

[0320] Where F t is the processing capability of current computing resource, D t is the computing demand of current task scheduling, is the system resource utilization, is the scalability weight;

[0321] If the scalability index E t is lower than the set threshold E thres , go to step 8.2 to adjust the system optimization strategy;

[0322] Step 8.2, intelligent control algorithm optimization and adaptive strategy update:

[0323] Based on the scalability index calculated in step 8.1, optimize the intelligent control algorithm and update the system strategy adaptively. The optimization method uses reinforcement learning adaptive update, and the update formula is as follows:

[0324]

[0325] Where π′(S t ) is the updated control strategy, π * (S t ) is the optimal strategy calculated in step 3.3, is the strategy based on the latest data training, and η is the update rate;

[0326] After the strategy is updated, go to step 8.3 to plan the future optimization strategy and design the system sustainability;

[0327] Step 8.3, future optimization strategy planning and system sustainability design:

[0328] Based on the optimized control strategy π′(S t ) calculated in step 8.2, develop a long-term optimization plan for the intelligent lighting system and conduct sustainability design. The objective function is as follows:

[0329] O = min(w1·P t +w2·T time +w3·C t ),

[0330] Where O is the long-term optimization target value of the system, P t is the power consumption, T time is the task execution time, C t is the computing resource occupation, and w1, w2, w3 are the optimization weights;

[0331] If the optimization target O is lower than the set threshold O thres , the system enters a long-term stable operation mode, and feedback to step 3.3 for periodic adjustment of the reinforcement learning strategy, otherwise, adjust the optimization scheme, recalculate step 8.1 for scalability optimization.

[0332] In step 9, based on the long-term optimization results calculated in step 8 and the sustainable design scheme, the feedback mechanism and optimization strategy update of the intelligent lighting system are further implemented to ensure that the system can adapt to environmental changes and continuously improve performance, further including:

[0333] Step 9.1, system feedback monitoring and performance evaluation:

[0334] Based on the long-term optimization target O calculated in step 8.3, real-time feedback monitoring of the running state of the intelligent lighting system is performed, and the system performance is comprehensively evaluated. The performance evaluation indicators include system response time T s , energy efficiency η s and system stability λ s , where:

[0335] T s = max(T Queue , T compute ),

[0336]

[0337] where T s is the system response time, η s is the system energy efficiency, 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, and σ total is the total number of states of the system.

[0338] If the performance evaluation result of the system does not meet the set requirements, go to step 9.2 for feedback adjustment and strategy update;

[0339] Step 9.2, feedback adjustment and control strategy update:

[0340] Based on the evaluation results of step 9.1, the control strategy is adjusted adaptively using reinforcement learning to further improve system performance. The updated control strategy π″(S t ) is adjusted according to the following formula:

[0341]

[0342] 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;

[0343] After the strategy is updated, step 9.3 is entered to perform long-term operation and optimization path planning of the intelligent lighting system;

[0344] Step 9.3, long-term optimization path planning and system continuous optimization:

[0345] Based on the adjusted control strategy π"(S t ) calculated in step 9.2, the long-term optimization path and continuous optimization planning of the system are formulated, and the objective function is as follows:

[0346]

[0347] Where, O long is the long-term optimization target value of the system;

[0348] P long is the power consumption of the system in long-term operation, T long is the long-term task execution time of the system, C long is the long-term computing resource occupation of the system, is the optimization weight;

[0349] If the long-term optimization target O long reaches the set requirement, the system enters the long-term stable operation stage, and the adaptive optimization of the intelligent lighting system is completed, otherwise, feedback is given to step 8 for further optimization and strategy adjustment.

[0350] The advantage of step 1 is to use low-power sensors and event-driven mechanism to effectively reduce unnecessary data collection frequency and reduce energy consumption. At the same time, based on the set threshold and change rate detection method, the changes of environmental light and user activity state can be accurately captured, ensuring the accuracy of light adjustment, which is more efficient than traditional periodic data collection, avoiding data redundancy and waste of computing resources, and improving the overall response ability of the system;

[0351] The advantage of step 2 is to fuse the data of multiple sensors through the Bayesian update method, which greatly improves the accuracy of environmental state estimation. Unlike single sensor detection, the invention can effectively reduce the influence of single-point sensor errors, making the lighting control system have high adaptability in complex environments. At the same time, the optimal estimation value of the current environment state is dynamically calculated to provide data support for subsequent intelligent control, so that the system can reasonably adjust the light mode;

[0352] The advantage of step 3 utilizes a reinforcement learning method, enabling the system to continuously learn the habits of users and the rules of environmental changes, and automatically optimizing the light control strategy. Compared with the traditional rule-based control method, the present application has flexibility and adaptability, and can dynamically adjust the light state according to different scenes, realizing personalized and intelligent illumination management. At the same time, the Q-learning algorithm is used to optimize the decision, so that the light control strategy can maintain stability and high efficiency under various environmental factors;

[0353] The advantage of step 4 is that through load evaluation and resource prediction, the allocation of computing resources is efficient and reasonable, avoiding the problems of tight and idle computing resources. Unlike the traditional fixed computing resource allocation method, the present application can dynamically adjust the computing resources according to the current task queue and load changes of the system, ensuring smooth operation of the system during peak periods and saving energy during low load. In addition, the task scheduling optimization scheme reduces the task waiting time and improves the overall response speed of the system;

[0354] The advantage of step 5 is to establish a complete system safety monitoring and anomaly detection mechanism, which can detect device failures in real time and make adjustments to ensure stable operation of the system. Compared with the manual inspection and passive alarm method in the prior art, the present application can actively identify potential system anomalies, and correct the light control scheme through adaptive optimization strategy, greatly improving the reliability of the device. At the same time, the anomaly detection combined with the intelligent regulation mechanism enables the device to quickly adjust in the event of an emergency, avoiding the impact on normal use;

[0355] The advantage of step 6 is to use a magnetic latching relay and a low-power microcontroller to realize energy-saving operation of the light device. Compared with traditional relays, the magnetic latching relay consumes power when switching states, and does not consume power when in a static state, greatly reducing energy consumption. At the same time, the application of low-power microcontrollers enables the system to maintain high efficiency while minimizing power consumption, improving the endurance of the device, and is particularly suitable for long-term operation requirements in smart home scenarios;

[0356] The advantage of step 7 is to use encryption algorithms in data transmission to ensure user privacy and system security. At the same time, combined with the anomaly detection mechanism, the system state can be monitored in real time to prevent system crashes caused by hardware failures or external attacks. Compared with the traditional non-encrypted transmission method, the present application 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 adjust in time before the fault occurs, ensuring the long-term stability of the device;

[0357] The advantage of step 8 is to use modular design, making the system have good scalability and maintainability. Unlike traditional closed architectures, the present application makes it easy 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 state of the console light, greatly improving the convenience and experience of use;

[0358] The step 9 provides visual terminal, shortcut keyboard operation and user identity recognition, so that the interaction mode is rich and varied. Compared with the traditional single APP control mode, the application supports multiple input modes, so that the user can choose the most suitable operation mode according to personal preference. At the same time, the personalized setting based on user identity recognition makes the light control conform to personal habits, improves the practicability of the intelligent light system and the user satisfaction.

[0359] 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 light switching control method based on artificial intelligence, 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 light switch state, and the multiple groups of sensors are used to collect environmental data.

[0360] A storage medium stores computer readable instructions, and the instructions are executed by a processor to make the terminal device execute the console light switching control method based on artificial intelligence.

[0361] The environment monitoring, sedentary reminding and fatigue monitoring rely on the event-driven data collection in step 1 and the multi-modal data fusion in step 2, and combine the illumination, human activity detection and historical data to calculate the user state;

[0362] The intelligent lifting, sound-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, and the system dynamically adjusts the light and environmental equipment state according to the user behavior mode;

[0363] The identity recognition and business login are provided by the data security protection in step 7, and the identity authentication mechanism is used to identify the user and authorize the operation permission;

[0364] The language interaction, visual terminal and shortcut keyboard are realized by the human-computer interaction and intelligent control mode in step 9, multiple modes are supported for light adjustment, and the usability and operation convenience of the system are improved;

[0365] The vascular platform relies on the remote management support in step 8 to realize the remote maintenance and data monitoring of the system, and improves the management efficiency and maintainability of the equipment.

[0366] Although the embodiments of the application have been shown and described, it can be understood by those skilled in the art that various changes, modifications, replacements and variations can be made to the embodiments without departing from the principles and spirits of the application, and the scope of the application is defined by the appended claims and their equivalents.

Claims

1. A console lighting switching control method based on artificial intelligence, characterized in that, include: Step 1, event-driven data acquisition, using low-power sensors to monitor ambient light and user activity status, triggering the sensing module through a set threshold and rate of change detection mechanism; Based on the environmental data acquisition in step 1, the Bayesian update method is used to fuse and calculate the multi-sensor data to obtain the optimal estimate of the current environmental state. The data fusion process is as follows: Among them, E t D represents the current environmental state. t Given the sensor dataset at the current moment, P(E) t Let P(D) be the prior probability of the environmental state. t |E t P(D) represents the conditional probability of the observed data. t ) represents the normalized probability of the sensor data; Based on this calculation, the optimal estimate of the current environmental state is obtained. Step 2, Multimodal data fusion and environmental state estimation: Based on the data collected in Step 1, and combined with the illumination, temperature and human activity information from multiple sensors, the Bayesian update method is used to perform data fusion and dynamically calculate the optimal estimate of the current environmental state. In step 2, the environmental state estimate obtained in step 1 As input, an intelligent lighting control strategy is established based on Markov decision processes. This strategy adjusts the lighting according to the current environmental conditions and user behavior patterns, improving control accuracy and adaptability. Further components include: Step 2.1, State-space modeling and transition probability calculation: Based on the environmental state estimate calculated in step 1 Based on user behavior data, a state space is constructed, and the state transition probabilities are calculated. The state transition model is defined as follows: S t ={L t ,M t ,T t ,A t }, Among them, S t Let L be the environment state vector at the current time t. t M represents the light intensity. t For user movement status, T t For ambient temperature, A t The current brightness of the lighting equipment; 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 For the state at the next moment, a t For the control action at the current moment, O i External disturbances that affect the state of the environment; If the state transition probability exceeds the set threshold P thres If this occurs, proceed to step 2.2 for strategy optimization calculation; Step 2.2, Strategy Optimization and Reward Function Construction: Based on the state transition probabilities calculated in step 2.1, a reinforcement learning method is used to optimize the lighting control strategy, and the reward function is defined as follows: R t =w1f c (A t )+w2f u (U t )-w3f e (E t ), Among them, R t The reward value at the current moment, w1, w2, and w3 are weight parameters, and f is the weight value at the current moment. c (A t Let ) be the comfort function for lighting control, defined as: f c (A t )=-(A t -A opt ) 2 , Among them, A opt To achieve the optimal light brightness desired by the user; f u (U t Let ) be the user behavior preference function, defined as: Among them, U t Based on the current user's usage behavior, U hist Based on historical user habits, U max This represents the maximum range of behavioral deviation. f e (E t Let ) be the energy loss function, defined as: Among them, P(A) t P represents the current power consumption of the light. max This represents the maximum power consumption. If the cumulative reward value of strategy optimization G = ∑ t γ t R t Exceeding threshold G thres If the optimal strategy is found, proceed to step 2.

3. Step 2.3, Solving for the optimal strategy and executing the decision: Based on the cumulative reward value calculated in step 2.2, the optimal lighting control strategy is solved using the value iteration method, and the state value function is defined as follows: Among them, V(S) t ) is state S t The optimal value function, where γ is the discount factor, P(S t+1 |S t ,a t R represents the state transition probability calculated in step 2.

1. t S represents the reward value at the current moment. t+1 For the state at the next moment, a t S is the control action at the current moment. t V(S) represents the current state. t+1 ) is state S t+1 The optimal value function; If the optimal strategy is π * (S t After the calculation is completed, the system executes the optimal control action. After adjusting the lighting status, proceed to step 3 to train the reinforcement learning model; Step 3: Intelligent lighting control strategy generation. Based on the environmental state calculated in Step 2, a hierarchical Markov decision process is used to establish a lighting control strategy. Step 4: Reinforcement learning training optimizes the lighting control strategy. Based on the decision-making process constructed in Step 3, reinforcement learning is used to train the control strategy, combined with user operation feedback and environmental change data. Step 5, computational resource management and task scheduling: based on the optimized lighting control strategy in Step 4, the triggering timing of AI computation tasks is optimized using the Pontryagin maximum principle. Step 6: Low-power hardware execution and lighting equipment control. Combining the optimized calculation strategy in Step 5, magnetic latching relays and low-power microcontrollers are used to control the lighting equipment. Step 7, Data security protection and system stability assurance: Based on the hardware architecture of Step 6, encryption algorithms are used to protect data transmission, and an anomaly detection mechanism is established at the same time. Step 8: Improve system maintainability and remote management support. Based on the data security in Step 7, adopt a modular design architecture. Step 9, Human-computer interaction and intelligent control methods: Based on the system scalability of Step 8, provide interaction methods, support visual terminals and shortcut keyboards, and combine user identity recognition functions.

2. The artificial intelligence-based console lighting switching control method according to claim 1, characterized in that, In step 1, when the set environmental change conditions are met, a low-power sensor is used to monitor ambient light and user activity status, and data acquisition is activated when there is a significant change in light and when a user is detected approaching. This further includes: Environmental state change monitoring and sensing triggering: Based on the set illumination threshold and user activity detection mechanism, it is determined whether data collection should be triggered. The triggering conditions are as follows: Among them, T s L represents the rate of change of environmental state. t and L t-1 M represents the light intensity values ​​at the current and previous moments. t and M t-1 The current and previous time values ​​represent the user movement detection values, and Δt represents the time interval for data collection. If T s Exceeding the set threshold T thres At that time, environmental data collection is triggered; Based on the environmental state estimate calculated in step 1 To determine whether to trigger an AI computation task, the following conditions must be met: Among them, C compute To calculate the task trigger threshold, α and β are weight parameters, E t-1 This is an estimate of the environmental state at the previous moment. σ D The uncertainty of the sensor data at the current moment is calculated as follows: Among them, w i Let D be the weight of the i-th sensor. i,t Let be the current data value of the i-th sensor. This is the weighted average of all sensor data at the current moment; If C compute Exceeding the set threshold C thres When the AI ​​calculation is triggered, step 2 is entered to generate a smart lighting control strategy.

3. The artificial intelligence-based console lighting switching control method 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, and the control decisions are continuously optimized based on environmental state feedback, enabling the system to adapt to different scenarios and optimize lighting adjustment rules. This further includes: Step 3.1, Reinforcement Learning State Space Construction and Policy Initialization Based on the optimal control strategy π calculated in step 2.3 * (S t ) and state space S t Construct the state set, action set, and reward function for reinforcement learning, initialize the policy, and 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 reinforcement learning policy initialization uses an arbitrary initialization method, so that each state S t The initial control strategy π(S) t () follows a uniform distribution: Where |A| is the dimension of the action space, after the policy initialization is completed, proceed to step 3.2 to update the Q value and iterate the policy; Step 3.2, Optimization of the strategy based on Q-learning: Based on the strategy π0(S) initialized in step 3.1 t The Q-learning algorithm is used to optimize the lighting control strategy, and the Q-value update formula is defined as follows: Among them, Q(S) t ,a t ) is state S t Next, execute action a t Q-value, α is the learning rate, R t γ is the reward value at the current moment, and γ is the discount factor. Indicates the next state S t+1 The Q value of the optimal action to take; Q-value updates are performed iteratively. After each update, an ∈-greedy strategy is used to select the next action 'a'. t : Where ∈ represents the exploration probability; If the change in Q is less than the set threshold Q min If the strategy convergence is not determined, proceed to step 3.3 to determine the optimal strategy. Step 3.3, Policy convergence assessment and optimal policy selection: Based on the Q-value calculated in step 3.2, determine whether the reinforcement learning policy has converged. The convergence condition of the policy is as follows: Among them, Q (k) (S t ,a t ) and Q (k-1) (S t ,a t ) represents the Q-value of the k-th and (k-1)-th iterations, ∈ Q S and A are the set state space and action space, respectively, representing the convergence threshold. When the convergence condition is met, the final lighting control strategy is determined by the following formula: Where, π * (S t This is the optimal lighting control strategy, used for subsequent intelligent control decisions; After the reinforcement learning strategy converges, the system executes the optimal control action. Adjust the lighting status and proceed to step 4 for computing resource management and task scheduling optimization.

4. The artificial intelligence-based console lighting switching control method according to claim 1, characterized in that, In step 4, the optimal lighting control strategy π calculated in step 3 is... * (S t Based on the convergence results of the reinforcement learning model, optimizations are made to the allocation of computational resources and task scheduling of the intelligent lighting control system, including: Step 4.1, calculate task load assessment and resource requirement forecast: Based on the optimal strategy π calculated in step 3.3 * (S t Based on the system's current task queue, the computational load of different tasks is calculated, and the resource requirements at future times are predicted. The task load calculation is as follows: Among them, L t Let w be the computational load at time t, N be the total number of tasks to be executed, and w be the total computational load at time t. i C represents the priority weight of task i. i (T t ,S t For task i at the current temperature T t and environmental state S t The computational requirements are as follows; Load forecasting is calculated using an exponentially weighted moving average method to determine the load forecast for future time t+1: in, λ is the calculated load forecast value for the next time step, and λ is the smoothing factor. Predicted load exceeds set threshold L thres If this happens, proceed to step 4.2 for task scheduling optimization; Step 4.2, Task scheduling optimization and computing resource allocation: Based on the load forecast calculated in step 4.1 The task scheduling strategy is optimized to enable efficient allocation of computing resources between edge devices and cloud servers. The task scheduling decisions are as follows: Among them, D t This represents the optimal task scheduling decision at the current moment, where d represents the task scheduling options. To optimize weights for scheduling, T d For the execution time of scheduling option d, P d For the energy consumption of scheduling option d, R d Resource utilization rate for scheduling option d; The task execution time is calculated as follows: Among them, C d F represents the computational requirements of task d. d The processing power of computing resources; After the task scheduling optimization is completed, proceed to step 4.3 to monitor and dynamically adjust the system execution status; Step 4.3, System execution status monitoring and dynamic adjustment: Based on the task scheduling decision D calculated in step 4.2 t The system monitors the execution status of computing resources in real time and makes dynamic adjustments. The system status monitoring indicators are as follows: S exec ={U t ,D t ,E t ,T time }, Among them, S exec This represents the current execution status of the system. U t To calculate resource utilization, it is defined as: Among them, C exec C represents the computational load of the executed task. max This represents the maximum processing capacity of computing resources; D t For task scheduling decisions, E t The energy consumption for task execution is calculated as follows: E t =∑ d P d T d , Among them, P d For the power consumption of scheduling option d, T d For task execution time; T time The task execution time is calculated as follows: T time =max(T) queue ,T compute ), Among them, T queue T is the waiting time of a task in the queue. compute The computation time for the task; When the execution status exceeds a set threshold, the system adjusts the task scheduling strategy. t If the feedback is not received, it will be sent to step 4.2 for re-optimization; otherwise, the task is completed and proceeds to step 5 for security management and stability optimization of the intelligent lighting system.

5. The artificial intelligence-based console lighting switching control method according to claim 1, characterized in that, In step 7, based on the system energy efficiency optimization scheme calculated in step 6, the design focuses on the safety management and stability optimization of the intelligent lighting control system to ensure the reliability and anti-interference capability of the system in complex environments. This further includes: Step 7.1, System Anomaly Detection and Fault Early Warning: Based on the optimal energy efficiency scheduling scheme calculated in step 6, the system's operating status is monitored, and abnormal situations are detected and warned. The abnormal system states are defined as follows: A t ={P t ,V t ,I t ,L t ,T t }, Among them, A t Let P be the set of system states at the current time t. t V represents the current power consumption. t I is the power supply voltage. t For current, L t T represents the light intensity. t Ambient temperature; Anomaly detection is performed using the chi-square test, and the anomaly detection statistic is defined as follows: Where, χ 2 A is an anomaly detection statistic. i,t Let μ be the value of the i-th monitoring parameter at the current time. i σ is the historical mean of this parameter. i This is the standard deviation of the parameter; If χ 2 Exceeding the set threshold When this occurs, a fault warning is triggered, and the process proceeds to step 7.2 for anomaly correction and adaptive adjustment; Step 7.2, Anomaly Correction and System Adaptive Adjustment: Based on the abnormal states detected in step 7.1, the system is corrected and adaptively adjusted. The correction model uses the Kalman filter method for state estimation, and the state update formula is as follows: in, This is the optimal state estimate at the current moment. K represents the predicted state from the previous time step. t For Kalman gain, Z t The measurement value at the current time t is calculated using the following formula: Among them, P t|t-1 H is the covariance matrix of the predicted state. t Let r be the observation matrix. t To measure the noise covariance matrix; If the state estimation error is less than the set threshold ∈ thres Then, proceed to step 7.3 to conduct 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 uses the information entropy method to calculate the disorder of the system state. The information entropy is calculated as follows: Among them, H(A) t Let A be the system state set. t Information entropy, P i State A i,t The probability of occurrence, A i,t Let i be the i-th specific state at time t; If the information entropy H(A) t Exceeding the set threshold H thres When the system enters a high-risk state, the control strategy is adjusted, and the optimization method is as follows: Among them, S opt To optimize the system's operating status, To optimize weights, T s P represents the system response time. s For power consumption, R s This refers to the system resource utilization rate. After the system optimization is completed, the system returns to normal operation and proceeds to step 8 to carry out the scalability design and future optimization strategy planning of the intelligent lighting system.

6. The artificial intelligence-based console lighting switching control method according to claim 1, characterized in that, In step 8, based on the system security assessment results and stability optimization scheme obtained in step 7, further scalability design of the intelligent lighting system is carried out to ensure the system's adaptability in future scenarios, and optimization strategies are formulated to improve overall performance, further including: Step 8.1, System Scalability Assessment and Architecture Optimization: Based on the optimized system state S calculated in step 7.3 opt The scalability of the intelligent lighting system is evaluated, and the system architecture is optimized. The scalability indicators are defined as follows: Among them, E t Let N be the system scalability index at time t. t C represents the number of currently connected devices. t Computational capability is defined as: Among them, F t Given the current processing power of computing resources, D t This represents the computational requirements of the current task scheduling. To improve system resource utilization, For extended weights; If the expansion index E t Below the set threshold E thres If this happens, proceed to step 8.2 to adjust the system optimization strategy; Step 8.2, Intelligent control algorithm optimization and adaptive strategy update: Based on the scalability index calculated in step 8.1, the intelligent control algorithm is optimized, and the system strategy is updated adaptively. The optimization method adopts reinforcement learning adaptive update, and the update formula is as follows: Wherein, π′(S t ) represents the updated control strategy, π * (S t The optimal strategy calculated in step 3.3 is as follows: Let η be the update rate, where η is the strategy trained based on the latest data. After the strategy is updated, proceed to step 8.3 to plan future optimization strategies and design system sustainability. Step 8.3, Future Optimization Strategy Planning and System Sustainability Design: Based on the optimized control strategy π′(S) calculated in step 8.2 t Develop 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 time +w3·C t ), Where O is the long-term optimization target value of the system, and P t For power consumption, T time For task execution time, C t To calculate resource usage, w1, w2, and w3 are optimization weights; If the optimization target O is lower than the set threshold O thres When the system enters a long-term stable operation mode, it feeds back to step 3.3 for periodic adjustment of the reinforcement learning strategy; otherwise, it adjusts the optimization scheme and recalculates step 8.1 for scalability optimization.

7. The artificial intelligence-based console lighting switching control method according to claim 1, characterized in that, In step 9, based on the long-term optimization results and sustainable design scheme obtained in step 8, the feedback mechanism and optimization strategy of the intelligent lighting system are further updated to ensure that the system can adapt to environmental changes and continuously improve performance. This 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 status of the intelligent lighting system is monitored in real time, 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 ,in: T s =max(T Queue ,T compute ), Among them, T s η is the system response time. s For system energy efficiency, E useful For effective energy consumption, E total For total energy consumption, λ s For system stability, σ stable Let σ be the total number of stable states of the system. total The total number of states in the system; If the system's performance evaluation results do 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 in step 9.1, reinforcement learning is used to adaptively adjust the control strategy to further improve system performance. The updated control strategy π″(S) t Adjust according to the following formula: Among them, π″(S t ) represents the adjusted control strategy, π′(S t The optimized control strategy calculated in step 8.2 is as follows: Let ζ be the state-of-the-art policy trained based on real-time feedback data; After the strategy is updated, proceed to step 9.3 to plan the long-term operation and optimization path of the intelligent lighting system; Step 9.3, Long-term optimization of path planning and continuous system optimization: Based on the adjusted control strategy π″(S) calculated in step 9.2 t ), and formulate the long-term optimization path and continuous optimization plan for the system. The objective function is as follows: Among them, O long The target value for long-term system optimization; P long T represents the power consumption of the system during long-term operation. long For the long-running task execution time of the system, C long To prevent long-term system computational resource consumption, To optimize weights; If the long-term optimization objective is O long When the set requirements are met, the system enters a long-term stable operation phase and completes the adaptive optimization of the intelligent lighting system; otherwise, it is fed back to step 8 for further optimization and strategy adjustment.

8. A terminal device, characterized in that, The device includes a processor, a memory, a low-power microcontroller, a magnetic latching relay, and multiple sets of sensors. The processor is used to execute the artificial intelligence-based console lighting switching control method according to any one of claims 1 to 7. 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 sets of sensors are used to collect environmental data.

9. A storage medium, characterized in that, The device stores computer-readable instructions, which, when executed by a processor, cause the terminal device to perform the AI-based console lighting switching control method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Intelligent interactive energy-saving lamp control platform

    CN117156635A

  • LED light intelligent control method and system and computer equipment

    CN117979487A