AI-based energy-saving lamp control method
By placing sensors in the classroom to collect data, building a prediction model, and dynamically adjusting the switching and light intensity of energy-saving lamps, the problem of the inability to predict personnel situations and adjust lighting in existing technologies is solved, and energy saving and personalized lighting control are achieved.
Patent Information
- Application Number
- CN202511110458.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-08
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-08-08
AI Technical Summary
Existing energy-saving lamp control technology cannot predict the number of people in the classroom based on historical data, cannot dynamically adjust the lighting area and light intensity, and cannot meet the personalized needs of users.
Various sensors are placed in the classroom to collect data on people's presence and behavior, build predictive models, analyze light intensity, and dynamically adjust lamp switches and light intensity.
It can predict the number of people in the classroom based on historical data, dynamically adjust the lighting area and light intensity, improve energy efficiency, and meet the personalized needs of users.
Smart Images

Figure CN120603112A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of energy-saving lamp control, and in particular to an AI-based energy-saving lamp control method. Background Art
[0002] Energy-saving lamp control technology refers to a comprehensive technical system that uses electronic circuit design, intelligent algorithms, sensor integration and other means to precisely control the working state of energy-saving lamps in order to achieve energy saving and efficiency improvement, extend lifespan and enhance ease of use.
[0003] When controlling the energy-saving lamps in the self-study classroom, the existing energy-saving lamp control technology often uses a human presence sensor to determine whether there is someone in the classroom, thereby controlling the turning on of the energy-saving lamps; and when controlling the turning on of the energy-saving lamps, it is based on the current status of the people; the personnel situation in the classroom is predicted in advance, and the energy-saving lamp extraction is adjusted; and when controlling according to the human presence sensor, the energy-saving lamps in the classroom are often turned on and off as a whole, and the lighting area cannot be dynamically adjusted according to the position and activity area of the people, nor can the optimal light intensity be automatically adjusted according to the user's behavior and needs; for example, the patent application with publication number CN116193682A discloses a classroom lighting control method and device, which controls the lamps in the classroom by determining whether there are people in the classroom. It cannot predict the personnel situation in the classroom in advance, nor can it dynamically adjust the lighting area and intensity according to the position and activity area of the people. Therefore, when controlling the energy-saving lamps in the self-study classroom, the existing energy-saving lamp control technology cannot predict the personnel situation in the classroom based on historical data, and at the same time control and adjust the lamp switching and light intensity of the personnel activity area according to the activity status of the people. Summary of the Invention
[0004] The present invention aims to solve at least one of the technical problems in the prior art to a certain extent, by arranging multiple sensors in the classroom to collect data on the presence of people and their behavior within the lighting range of energy-saving lamps, and to collect light intensity control data of energy-saving lamps; constructing a prediction model, and performing personnel presence prediction analysis to obtain personnel presence prediction data; and performing light intensity analysis to obtain optimal light intensity data; and controlling and adjusting the energy-saving lamps according to the personnel presence prediction data and the optimal light intensity data, so as to solve the problem that the existing energy-saving lamp control technology cannot predict the personnel situation in the classroom based on historical data when controlling the energy-saving lamps in the study room, and at the same time control and adjust the lamp switches and light intensity in the personnel activity area according to the activity status of the personnel.
[0005] To achieve the above objectives, this application provides an AI-based energy-saving lamp control method, comprising the following steps: Multiple sensors are deployed in classrooms to collect data on the presence and behavior of people within the lighting range of energy-saving lamps, as well as light intensity control data for energy-saving lamps. Build a prediction model based on personnel presence data, and perform personnel presence prediction analysis to obtain personnel presence prediction data; Perform light intensity analysis based on personnel behavior data and light intensity control data to obtain optimal light intensity data; Energy-saving lamps are controlled and adjusted based on occupant presence prediction data and optimal light intensity data.
[0006] Furthermore, multiple sensors are arranged in the classroom to collect the presence data and behavior data of people within the lighting range of the energy-saving lamps, and to collect the light intensity control data of the energy-saving lamps, including the following sub-steps: Deploy a human presence sensor, a light intensity sensor, and an image sensor in the classroom; for any energy-saving lamp in the classroom, record it as a first energy-saving lamp, and record the lighting range of the first energy-saving lamp as a first lighting range; Get the theoretical range of indoor light intensity and divide it into k1 indoor light intensity levels, where k1 is the set number; The human presence sensor is used to detect whether there is a person in the first lighting range at a first time interval, and the time of the detection is recorded as the person presence data of the first energy-saving lamp, wherein the first time interval is t1.
[0007] Furthermore, arranging multiple sensors in the classroom to collect the presence data and behavior data of people within the lighting range of the energy-saving lamps and collecting the light intensity control data of the energy-saving lamps also includes the following sub-steps: If there are people within the first lighting range, the image sensor is used to collect behavior images of each person within the first lighting range at a first time interval and synchronously with the human presence sensor, and the behavior type of each person is obtained based on the behavior image of each person, which is recorded as the person behavior data of the first energy-saving lamp. The behavior type of the person includes learning behavior, resting behavior, and interactive behavior; If there is a person within the first lighting range, the light intensity sensor is used to collect the light intensity level of the first energy-saving lamp and the indoor light intensity level at a first time interval and synchronously with the human presence sensor, and recorded as light intensity control data.
[0008] Furthermore, a prediction model is constructed based on the personnel presence data, and personnel presence prediction analysis is performed to obtain personnel presence prediction data, including the following sub-steps: In the personnel presence data, the presence of a person in the first lighting range is recorded as 1, and the absence of a person is recorded as 0. The data is sorted in the order of the corresponding date and collection time, and divided according to the corresponding date. After completion, the personnel presence time series data is obtained; For the personnel presence time series data of any date, arrange them in chronological order from the most recent to the most recent time, and record them as the first personnel presence sequence; set the second time period as ZT2; The first person presence sequence is divided into multiple subsequences with a time length of ZT2 using ZT2. Any subsequence is recorded as a first subsequence, and a time period corresponding to the first subsequence is recorded as a first time period.
[0009] Furthermore, building a prediction model based on the personnel presence data and performing personnel presence prediction analysis to obtain personnel presence prediction data also includes the following sub-steps: For the first subsequence, obtain the proportion coefficient of 1 in the first subsequence, and record it as the personnel coefficient of the first subsequence; repeatedly obtain the personnel coefficients of all subsequences in the first personnel existence sequence, and arrange them in the corresponding time order, and record them as the personnel coefficient sequence of the first personnel existence sequence; Repeatedly obtain the personnel coefficient sequence of all dates in the personnel existence data, and connect them in order of date, and record them as the first personnel coefficient data; For the first subsequence, obtain the subsequences corresponding to the first time period in other dates and arrange them in date order, recording them as the personnel coefficient data of the first time period. Repeat to obtain the personnel coefficient data of all time periods, recording them as the second personnel coefficient data.
[0010] Furthermore, building a prediction model based on the personnel presence data and performing personnel presence prediction analysis to obtain personnel presence prediction data also includes the following sub-steps: The long short-term memory network is trained using the first personnel coefficient data and the second personnel coefficient data, and a first prediction model and a second prediction model are obtained respectively after the training is completed; Obtain the mean absolute errors of the first prediction model and the second prediction model respectively, which are denoted as MA1 and MA2 in order; Use the first personnel coefficient data and the first prediction model to predict the personnel coefficient data of all time periods of the next k2 dates to obtain the first prediction data, where k2 is the number of set dates; The second personnel coefficient data and the second prediction model are used to predict the personnel coefficient data of each time period in the future k2 dates, and the personnel coefficient data of each time period predicted for each future date are arranged in the corresponding time sequence to obtain the personnel coefficient data of each future date, which is recorded as the second prediction data; For any time period in the future k2 dates, record it as the second time period; obtain the data corresponding to the first prediction data and the second prediction data in the second time period, and record them as AE1 and AE2 respectively in order; Calculate AE0, denoted as the final personnel coefficient for the second time period, where AE0 = Q1 * AE1 + Q2 * AE2, Q1 = MA2 / (MA1 + MA2), Q2 = MA1 / (MA1 + MA2); and calculate MA0, MA0 = Q1 * MA1 + Q2 * MA2; For the second time period, if AE0 < MA0, mark the second time period as an unoccupied period; otherwise, mark the second time period as an occupied period. Repeat the marking for all time periods in the next k2 dates. After completion, personnel presence prediction data is obtained.
[0011] Furthermore, based on personnel behavior data and light intensity control data, perform light intensity analysis to obtain the optimal light intensity data, including the following sub-steps: For any acquisition moment in the personnel behavior data, denoted as the first moment, obtain the total number of personnel collected at the first moment, and calculate the proportions of personnel in learning behavior, rest behavior, and interaction behavior at the first moment, denoted as PA1, PA2, and PA3 in sequence; If PA1 = PA2 = PA3, mark the first moment as a learning behavior; otherwise, select the two largest values among PA1, PA2, and PA3, and denote them as VA1 and VA2 in descending order; In the case where VA1 is equal to VA2, if VA1 and VA2 include PA1, mark the first moment as a learning behavior; otherwise, the first moment is an interaction behavior.
[0012] Furthermore, based on personnel behavior data and light intensity control data, perform light intensity analysis to obtain the optimal light intensity data, which also includes the following sub-steps: In the case where VA1 is not equal to VA2, if VA1 and VA2 include PA1 and PA1 > k3 * (VA2 + VA1); mark the first moment as a learning behavior; otherwise, mark the first moment as the behavior type corresponding to max(VA1, VA2), where k3 is a set proportionality coefficient, k3 ≤ 0.5; Repeat the marking for all acquisition moments in the personnel behavior data. After completion, the first behavior data is obtained; Denote the learning behavior, rest behavior, and interaction behavior in the first behavior data as 00, 01, and 10 in sequence, and sort them in the order of the corresponding date and acquisition time, denoted as personnel behavior time series data.
[0013] Furthermore, based on personnel behavior data and light intensity control data, perform light intensity analysis to obtain the optimal light intensity data, which also includes the following sub-steps: For any two adjacent data in the personnel behavior time series data of any date, if the two data are different, the middle of the two data is used as the dividing position, and all dividing positions are repeatedly obtained and divided to obtain the first behavior sequence; For any two adjacent division positions in the first behavior sequence, the data contained in the two division positions are marked as corresponding behavior periods, and the behavior periods include learning period, rest period and interaction period; For any behavior period, recorded as the first behavior period, obtain the light intensity level of the first energy-saving lamp corresponding to each collection moment in the first behavior period, recorded as the first light intensity sequence; Obtain the proportion of each light intensity level in the first light intensity sequence, and obtain the light intensity level with the largest proportion, recording it as the first light intensity level. Simultaneously, obtain the indoor light intensity levels collected at the collection moment corresponding to each light intensity level with the largest proportion, calculate the average value, and record it as the indoor reference light intensity. Record the first light intensity level as the optimal light intensity under the indoor reference light intensity for the first behavior period. Repeatedly obtain the indoor reference light intensity and the optimal light intensity corresponding to all behavior periods in the first behavior sequence, and record them as the optimal light intensity data of the date corresponding to the first behavior sequence; and repeatedly obtain the optimal light intensity data of all dates.
[0014] Furthermore, controlling and adjusting the energy-saving lamp according to the personnel presence prediction data and the optimal light intensity data includes the following sub-steps: For the current moment, the time period corresponding to the personnel presence prediction data at the current moment is recorded as the current time period; if there is no person in the first lighting range of the current time period, and the next time period adjacent to the current time period in the personnel presence prediction data is an unmanned period, the first energy-saving lamp is turned off; If there is a person in the first lighting range in the current time period, or if the next time period adjacent to the current time period in the person presence prediction data is a time period with people, then turn on the first energy-saving lamp; At the current moment, when the first energy-saving lamp is on, obtain the indoor light intensity, which is recorded as the current indoor light intensity HD; if there is a person within the first lighting range, obtain the corresponding behavior type at the current moment, which is recorded as the current behavior; if there is no person within the first lighting range, record the learned behavior as the current behavior; Obtain the optimal light intensity data for the k4 dates before the current moment, and record them as reference optimal light intensity data. From the reference optimal light intensity data, obtain the two optimal light intensities corresponding to the behavior period of the current behavior, which have the smallest difference with the current indoor light intensity, and record them as LA and LB respectively. Also, record the indoor reference light intensities corresponding to LA and LB in order as HA and HB, where k4 is the number of settings. Calculate LZ and adjust the light intensity of the first energy-saving lamp to LZ, where LZ=Q3*LA+Q4*LB. If HB-HD=HA-HD=0, then Q3=Q4=0.5; otherwise, Q3=|HB-HD| / (|HB-HD|+|HA-HD|), and Q4=1-Q3. Repeat the control for all energy-saving lamps in the classroom.
[0015] The beneficial effects of the present invention are as follows: the present invention arranges multiple sensors in the classroom to collect data on the presence and behavior of people within the lighting range of energy-saving lamps, and collects light intensity control data of energy-saving lamps; constructs a prediction model based on the person presence data, and performs person presence prediction analysis to obtain person presence prediction data; performs light intensity analysis based on the person behavior data and light intensity control data to obtain optimal light intensity data; and controls and adjusts the energy-saving lamps based on the person presence prediction data and the optimal light intensity data. When controlling the energy-saving lamps in the study room, the personnel situation in the classroom can be predicted based on historical data, and the lamp switches and light intensity in the personnel activity area can be controlled and adjusted based on the personnel activity status. The present invention forms the first personnel coefficient data by sequentially splicing the personnel coefficients of each day, and arranges the personnel coefficients at the same time of each day to form the second personnel coefficient data; trains two sets of models separately, which can respectively capture the overall dynamic changes of personnel flow within a day and the periodic characteristics of a single time of each day, and performs weighted averaging on the results according to the mean absolute error, thereby improving the accuracy and robustness of the prediction results; according to the personnel situation and combined with personnel behavior and indoor and outdoor light intensity, different optimal lighting conditions are provided for people with different behaviors in different areas, thereby realizing precise control of the lighting system, improving energy utilization efficiency, reducing energy consumption, and meeting the user's personalized needs for the lighting environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a flow chart of the steps of the method of the present invention; Figure 2 This is a first moment marking flow chart of the present invention; Figure 3 This is a flow chart of the energy-saving lamp control adjustment of the present invention; Figure 4 Schematic diagram of the structure of the electronic device of the present invention. DETAILED DESCRIPTION
[0017] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0018] Example 1, please refer to Figure 1 As shown, this application provides an AI-based energy-saving lamp control method, including the following steps: Step S1: multiple sensors are arranged in the classroom to collect data on the presence and behavior of people within the lighting range of the energy-saving lamps, and to collect light intensity control data of the energy-saving lamps. Step S1 includes the following sub-steps: Step S101: Deploy a human presence sensor, a light intensity sensor, and an image sensor in the classroom. Any energy-saving lamp in the classroom is designated as a first energy-saving lamp, and its lighting range is designated as a first lighting range. The human presence sensor is used to detect the presence and activity of people in the space, and the image sensor is used to analyze the environment and people's behavior. The light intensity sensor is used to record the current output intensity of the lamp and the ambient light level, providing data for subsequent lighting adjustments. Step S102: Obtain the theoretical range of indoor light intensity and divide it into k1 indoor light intensity levels, where k1 is a set number. Discretize the continuous light values to facilitate subsequent data comparison and fusion. k1 can be set according to the actual application scenario. A larger k1 allows for more precise subsequent adjustments, but also requires more computing power. Step S103, using a human presence sensor to detect whether a person is within the first lighting range at a first time interval, and recording the time of the detection as the person presence data of the first energy-saving lamp, wherein the first time interval is t1; in this embodiment, t1 is 1 minute; In step S104, if there are people within the first lighting range, the image sensor is used to collect the behavior image of each person within the first lighting range at a first time interval and synchronously with the human presence sensor, and the behavior type of each person is obtained based on the behavior image analysis of each person, which is recorded as the person behavior data of the first energy-saving lamp. The behavior types of people include learning behavior, resting behavior and interactive behavior; learning behavior is an active or passive learning activity centered on knowledge acquisition and skill training, and is the main person behavior in the classroom; resting behavior refers to the behavior of a person temporarily leaving the learning state, relaxing the body and mind, or adjusting the personal state, which is usually a short, low-intensity activity, mainly including closing the eyes to rest and lying on the table for a short rest; interactive behavior refers to other behaviors other than learning behavior and resting behavior, which is between learning and resting, and is mainly interpersonal interaction or environmental interaction.
[0019] Step S105: If a person is present within the first lighting range, the light intensity sensor is used to collect the light intensity level of the first energy-saving lamp and the indoor light intensity level at a first time interval and synchronously with the human presence sensor, and the data is recorded as light intensity control data. During the specific implementation process, the illumination requirements for different activity states are different. For example, higher illumination is required during learning, and it can be appropriately reduced during rest or discussion. The behavior classification results will serve as an important reference feature for subsequent processing, and dynamic dimming will be performed based on the behavior of people within the range. The classification of human behavior can also be self-classified according to the actual application scenario.
[0020] Step S2: constructing a prediction model based on the personnel presence data and performing personnel presence prediction analysis to obtain personnel presence prediction data; Step S2 includes the following sub-steps: Step S201: In the personnel presence data, the presence of a person within the first lighting range is recorded as 1, and the absence of a person is recorded as 0. The data is then sorted according to the corresponding date and collection time, and divided according to the corresponding date. After completion, the personnel presence time series data is obtained. Through unified 0 / 1 encoding and accurate time tags, a clear time series structure is provided for subsequent model input. Step S202: For the personnel presence time series data of any date, arrange them in chronological order from the most recent to the most recent time series, and record them as the first personnel presence sequence; set the second time period as ZT2; in this embodiment, the second time period is 20 minutes; Step S203: using ZT2, the first person presence sequence is divided into multiple subsequences of a time length of ZT2, any subsequence is recorded as a first subsequence, and the time period corresponding to the first subsequence is recorded as a first time period; Step S204: For the first subsequence, obtain the proportion coefficient of 1 in the first subsequence, and record it as the personnel coefficient of the first subsequence; repeatedly obtain the personnel coefficients of all subsequences in the first personnel presence sequence, and arrange them in the corresponding time order, and record them as the personnel coefficient sequence of the first personnel presence sequence; compress the discrete 0 / 1 sequence into a continuous proportion indicator, which not only reduces the sparsity of the model input, but also can intuitively reflect the characteristics of the change in personnel density in each time period.
[0021] Step S205, repeatedly obtain the personnel coefficient sequence of all dates in the personnel presence data, and connect them in order of date, and record them as the first personnel coefficient data; construct a training set with a long time span so that the subsequent model can learn the macro-changing rules of the personnel coefficient with the date; for example, the overall attendance changes at the beginning and end of the semester, before and after holidays, and on different days of the week; the attendance of personnel in the classroom often evolves slowly, and the long sequence allows the model to learn these slow-changing trends, thereby better predicting the overall attendance level in the next few days.
[0022] Step S206: For the first subsequence, obtain the subsequences corresponding to the first time period on other dates and arrange them in date order, recording them as the personnel coefficient data for the first time period. Repeat to obtain the personnel coefficient data for all time periods, recording them as the second personnel coefficient data. Construct an independent time series input for each specific time period, for example, 8:00–8:20, to capture the regular fluctuations of this time period on different days. The personnel situation in the classroom often shows highly similar attendance patterns in the same time period, such as before the start of class every morning. After aggregation and arrangement, it helps to accurately capture this cyclical fluctuation. Compared with long-term trend data spliced across dates, single-time period series have lower noise, and the model input is more focused on the "volatility" characteristics of the time period, improving the accuracy of short-term predictions. In step S207, the long short-term memory network is trained using the first personnel coefficient data and the second personnel coefficient data, and a first prediction model and a second prediction model are obtained after completion. That is, the first prediction model is obtained by training the first personnel coefficient data to capture long-term trends; that is, the second prediction model is obtained by training the second personnel coefficient data to capture the changing rules within a time period. The dual-model architecture takes into account both global trends and local fluctuations, and can learn long-term trends as well as capture fine-grained changes in specific time periods.
[0023] Step S208: Obtain the mean absolute error of the first prediction model and the second prediction model, which are denoted as MA1 and MA2 in order; quantify the prediction accuracy of the model to provide a basis for subsequent weighted fusion; the smaller the error, the higher the prediction credibility of the model; Step S209: Using the first personnel coefficient data and the first prediction model, predict the personnel coefficient data for all time periods of k2 dates in the future to obtain first predicted data, where k2 is the number of dates set; k2 can be set according to the actual application scenario. In this embodiment, k2=3, that is, predicting data for the next three days; Step S210, using the second personnel coefficient data and the second prediction model to predict the personnel coefficient data of each time period in the future k2 dates, and arrange the personnel coefficient data of each time period predicted for each future date in the corresponding time sequence to obtain the personnel coefficient data of each future date, which is recorded as the second prediction data; when the second prediction model makes a prediction, it is necessary to make a separate prediction for each future time period, and then splice them together to obtain continuous data.
[0024] Step S211: For any time period in the future k2 dates, record it as the second time period; obtain the first prediction data and the second prediction data corresponding to the second time period, and record them as AE1 and AE2 respectively in order; Step S212: Calculate AE0, denoted as the final personnel coefficient for the second time period, where AE0 = Q1 * AE1 + Q2 * AE2, Q1 = MA2 / (MA1 + MA2), Q2 = MA1 / (MA1 + MA2); and calculate MA0, MA0 = Q1 * MA1 + Q2 * MA2; automatically allocate weights according to the historical errors of each model to make the fusion prediction have both short-term accuracy and long-term stability; Step S213: For the second time period, if AE0 < MA0, mark the second time period as an unoccupied period; otherwise, mark the second time period as an occupied period. Repeat the marking for all time periods in the next k2 dates. After completion, obtain the personnel presence prediction data; In the specific implementation process, the first personnel coefficient data and the second personnel coefficient data can be respectively divided into a training part and a testing part, which are respectively used for training and testing to obtain the corresponding mean absolute error; and use MA0 as the judgment criterion to achieve the uncertainty control of the prediction result and reduce the misjudgment risk caused by the overconfidence of the model; provide a reliable judgment for the subsequent switching decision of the energy-saving lamp.
[0025] Step S3: Conduct an analysis of the illumination intensity based on the personnel behavior data and the light intensity control data to obtain the optimal illumination intensity data; Step S3 includes the following sub-steps: Step S301: As shown in Figure 2 For any acquisition moment in the personnel behavior data, denoted as the first moment, obtain the total number of personnel collected at the first moment, and calculate the personnel ratios of learning behavior, rest behavior, and interaction behavior at the first moment, denoted as PA1, PA2, and PA3 in sequence; Step S302: If PA1 = PA2 = PA3, mark the first moment as a learning behavior; otherwise, select the two largest among PA1, PA2, and PA3, and denote them as VA1 and VA2 in descending order; ensure that the learning behavior is given priority when the number of participants is the same; Step S303: In the case where VA1 is equal to VA2, if VA1 and VA2 include PA1, mark the first moment as a learning behavior; otherwise, the first moment is an interaction behavior; the lighting demand for interaction behavior is higher than that for rest behavior; Step S304: In the case where VA1 is not equal to VA2, if VA1 and VA2 include PA1 and PA1 > k3 * (VA2 + VA1); then mark the first moment as a learning behavior; otherwise, mark the first moment as the behavior type corresponding to max(VA1, VA2). For example, if max(VA1, VA2) = PA2, mark the first moment as a rest behavior; where k3 is the set proportionality coefficient, k3 ≤ 0.5; in this embodiment, k = 0.4; Because the classroom is the main place for learning, and learning behavior requires more lighting than resting behavior and interactive behavior, a considerable number of people in all areas are in a learning state. Even if they do not account for the majority, the first moment is judged as learning behavior, that is, the lighting is subsequently improved according to the learning behavior.
[0026] Step S305, repeatedly marking all the collection moments in the personnel behavior data, and obtaining the first behavior data after completion; Step S306: Record the learning behavior, resting behavior, and interactive behavior in the first behavior data as 00, 01, and 10, respectively, and sort them according to the corresponding date and collection time to record them as personnel behavior time series data; the coding facilitates rapid comparison and segmentation of subsequent algorithms; Step S307: For any two adjacent data in the personnel behavior time series data of any date, if the two data are different, the middle of the two data is used as the dividing position, and all dividing positions are repeatedly obtained and divided to obtain the first behavior sequence; Step S308: For any two adjacent division positions in the first behavior sequence, mark them as corresponding behavior periods based on the data contained in the two division positions. The behavior periods include learning period, rest period and interaction period. For example, if the data contained in two division positions is 00, then the period corresponding to the two division positions is the learning period.
[0027] Step S309: for any behavior period, recorded as a first behavior period, obtain the light intensity level of the first energy-saving lamp corresponding to each collection moment in the first behavior period, recorded as a first light intensity sequence; Step S310: Obtain the proportion of each light intensity level in the first light intensity sequence, and obtain the light intensity level with the largest proportion, recording it as the first light intensity level. Simultaneously, obtain the indoor light intensity levels collected at the collection time corresponding to each light intensity level with the largest proportion, calculate the average value, and record it as the indoor reference light intensity. Record the first light intensity level as the optimal light intensity under the indoor reference light intensity for the first time period. Determine the illumination that is most energy-efficient and meets visual needs directly based on historical actual usage data. Step S311, repeatedly obtaining indoor reference light intensity and optimal light intensity corresponding to all behavior time periods in the first behavior sequence, recording them as optimal light intensity data for the date corresponding to the first behavior sequence; and repeatedly obtaining optimal light intensity data for all dates; In the specific implementation process, for any two adjacent division positions in the first line sequence, if the two adjacent division positions contain too little data, for example, only one or two, the interval can be removed and no subsequent analysis is performed. Because the data contained is too little, it may be abnormal data caused by sensor fluctuations and has no reference value.
[0028] Step S4, controlling and adjusting the energy-saving lamp according to the personnel presence prediction data and the optimal light intensity data; Step S4 includes the following sub-steps: Step S401, please refer to Figure 3 As shown, for the current moment, the time period corresponding to the personnel presence prediction data is recorded as the current time period; if there is no person in the first lighting range of the current time period, and the next time period adjacent to the current time period in the personnel presence prediction data is an unmanned period, the first energy-saving lamp is turned off; to avoid prematurely turning off the light due to short-term prediction errors, which affects the user experience, and the power is turned off only when no one is expected to be there continuously, minimizing no-load consumption; Step S402: If there is a person within the first lighting range in the current time period, or if the next time period adjacent to the current time period in the prediction data for the presence of a person is a time period with people, then the first energy-saving lamp is turned on; if it is predicted that there will be people in the next time period, the energy-saving lamp can be turned on in advance to improve the user experience; In step S403, when the first energy-saving lamp is turned on at the current moment, the indoor light intensity is obtained and recorded as the current indoor light intensity HD; if there is a person within the first lighting range, the behavior type corresponding to the current moment is obtained and recorded as the current behavior; if there is no person within the first lighting range, the learned behavior is recorded as the current behavior; the indoor light intensity is used as the basis for adjusting the energy-saving lamp light intensity. For example, if the indoor light intensity is greater than the optimal light intensity during the day, the energy-saving lamp does not need to provide additional light intensity.
[0029] Step S404: Obtain optimal light intensity data for k4 dates prior to the current moment, recorded as reference optimal light intensity data. From the reference optimal light intensity data, obtain the two optimal light intensities corresponding to the current behavior and the time period, which have the smallest difference from the current indoor light intensity, and record them as LA and LB, respectively. The indoor reference light intensities corresponding to LA and LB are recorded in sequence as HA and HB, respectively, where k4 is a set number. In this embodiment, k4=7. Different behaviors and different indoor light intensities have significantly different lighting requirements. The corresponding optimal light intensity is selected based on the behavior type and indoor light intensity. Step S405: Calculate LZ and adjust the light intensity of the first energy-saving lamp to LZ, where LZ = Q3*LA+Q4*LB. If HB-HD = HA-HD = 0, then Q3 = Q4 = 0.5; otherwise, Q3 = |HB-HD| / (|HB-HD| + |HA-HD|), and Q4 = 1-Q3. Average the current conditions based on their proximity to the reference condition to avoid instantaneous large jumps and improve visual comfort. Step S406, repeating the control of all energy-saving lamps in the classroom; In the specific implementation process, each energy-saving lamp is controlled individually, and the lighting area and brightness can be dynamically adjusted according to the location of personnel and activity area, which can reduce energy consumption and extend the service life of lighting equipment.
[0030] Example 2, please refer to Figure 4 As shown, Figure 4 The present invention provides a structural schematic diagram of an electronic device, which may include: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus. The memory stores computer-readable instructions, and the processor can call instructions from the memory. When the computer-readable instructions are executed by the processor, the steps in the AI-based energy-saving lamp control method are executed to implement the following functions: multiple sensors are arranged in the classroom to collect data on the presence and behavior of people within the lighting range of the energy-saving lamp, and to collect light intensity control data for the energy-saving lamp; a prediction model is constructed based on the person presence data, and a person presence prediction analysis is performed to obtain person presence prediction data; a light intensity analysis is performed based on the person behavior data and the light intensity control data to obtain optimal light intensity data; and the energy-saving lamp is controlled and adjusted according to the person presence prediction data and the optimal light intensity data.
[0031] In addition, the logical instructions in the above-mentioned memory can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program code.
[0032] Example 3. The present application also provides a computer-readable storage medium. The present application provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the AI-based energy-saving lamp control method are executed to achieve the following functions: multiple sensors are arranged in the classroom to collect personnel presence data and personnel behavior data within the lighting range of the energy-saving lamp, and collect light intensity control data of the energy-saving lamp; a prediction model is constructed based on the personnel presence data, and personnel presence prediction analysis is performed to obtain personnel presence prediction data; light intensity analysis is performed based on the personnel behavior data and light intensity control data to obtain optimal light intensity data; and the energy-saving lamp is controlled and adjusted according to the personnel presence prediction data and the optimal light intensity data.
[0033] Through the description of the above embodiments, the embodiments of the present invention can be provided as methods, systems, or computer program products. Based on this understanding, the essence of the above technical solutions or the portion that contributes to the prior art can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for enabling a computer device (such as a personal computer, server, or network device) to execute the methods described in various embodiments or certain portions of the embodiments.
[0034] In the embodiments provided in this application, it should be understood that the disclosed system or method can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of systems, modules and units can be electrical, mechanical or other forms.
[0035] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. The AI-based energy-saving lamp control method is characterized by: The steps include: Multiple sensors are deployed in classrooms to collect data on the presence and behavior of people within the lighting range of energy-saving lamps, as well as light intensity control data for energy-saving lamps. Build a prediction model based on personnel presence data, and perform personnel presence prediction analysis to obtain personnel presence prediction data; Perform light intensity analysis based on personnel behavior data and light intensity control data to obtain optimal light intensity data; Energy-saving lamps are controlled and adjusted based on occupant presence prediction data and optimal light intensity data.
2. The AI-based energy-saving lamp control method according to claim 1, characterized in that: Arranging multiple sensors in the classroom to collect data on the presence and behavior of people within the lighting range of energy-saving lamps, as well as light intensity control data of energy-saving lamps, includes the following sub-steps: Deploy a human presence sensor, a light intensity sensor, and an image sensor in the classroom; for any energy-saving lamp in the classroom, record it as a first energy-saving lamp, and record the lighting range of the first energy-saving lamp as a first lighting range; Get the theoretical range of indoor light intensity and divide it into k1 indoor light intensity levels, where k1 is the set number; The human presence sensor is used to detect whether there is a person in the first lighting range at a first time interval, and the time of the detection is recorded as the person presence data of the first energy-saving lamp, wherein the first time interval is t1.
3. The AI-based energy-saving lamp control method according to claim 2, characterized in that: Arranging multiple sensors in the classroom to collect data on the presence and behavior of people within the lighting range of energy-saving lamps, and collecting light intensity control data of energy-saving lamps also includes the following sub-steps: If there are people within the first lighting range, the image sensor is used to collect behavior images of each person within the first lighting range at a first time interval and synchronously with the human presence sensor, and the behavior type of each person is obtained based on the behavior image of each person, which is recorded as the person behavior data of the first energy-saving lamp. The behavior type of the person includes learning behavior, resting behavior, and interactive behavior; If there is a person within the first lighting range, the light intensity sensor is used to collect the light intensity level of the first energy-saving lamp and the indoor light intensity level at a first time interval and synchronously with the human presence sensor, and recorded as light intensity control data.
4. The AI-based energy-saving lamp control method according to claim 3, characterized in that: Constructing a prediction model based on personnel presence data and performing personnel presence prediction analysis to obtain personnel presence prediction data includes the following sub-steps: In the personnel presence data, the presence of a person in the first lighting range is recorded as 1, and the absence of a person is recorded as 0. The data is sorted in the order of the corresponding date and collection time, and divided according to the corresponding date. After completion, the personnel presence time series data is obtained; For the personnel presence time series data of any date, arrange them in chronological order from the most recent to the most recent time, and record them as the first personnel presence sequence; set the second time period as ZT2; The first person presence sequence is divided into multiple subsequences with a time length of ZT2 using ZT2. Any subsequence is recorded as a first subsequence, and a time period corresponding to the first subsequence is recorded as a first time period.
5. The AI-based energy-saving lamp control method according to claim 4, characterized in that: Building a prediction model based on personnel presence data and performing personnel presence prediction analysis to obtain personnel presence prediction data also includes the following sub-steps: For the first subsequence, obtain the proportion coefficient of 1s in the first subsequence, denoted as the personnel coefficient of the first subsequence; repeat to obtain the personnel coefficients of all subsequences in the first personnel presence sequence and arrange them in the corresponding chronological order, denoted as the personnel coefficient sequence of the first personnel presence sequence; Repeat to obtain the personnel coefficient sequences of all dates in the personnel presence data and connect them in sequence according to the date order, denoted as the first personnel coefficient data; For the first subsequence, obtain the corresponding subsequences in the first time period of other dates and arrange them in date order, denoted as the personnel coefficient data of the first time period; repeat to obtain the personnel coefficient data of all time periods, denoted as the second personnel coefficient data.
6. The AI-based energy-saving lamp control method according to claim 5, characterized in that: Based on the personnel presence data, construct a prediction model and conduct personnel presence prediction analysis. Obtaining the personnel presence prediction data further includes the following sub-steps: Use the first personnel coefficient data and the second personnel coefficient data to train the long short-term memory network model respectively. After completion, obtain the first prediction model and the second prediction model respectively; Respectively obtain the mean absolute errors of the first prediction model and the second prediction model, denoted as MA1 and MA2 in sequence; Use the first personnel coefficient data and the first prediction model to predict the personnel coefficient data of all time periods in the next k2 dates, where k2 is the set number of dates, to obtain the first prediction data; Use the second personnel coefficient data and the second prediction model to predict the personnel coefficient data of each time period in the next k2 dates, and arrange the personnel coefficient data of each time period predicted for each future date in the corresponding chronological order to obtain the personnel coefficient data of each future date, denoted as the second prediction data; For any time period in the next k2 dates, denoted as the second time period; respectively obtain the corresponding data of the first prediction data and the second prediction data in the second time period, denoted as AE1 and AE2 in sequence; Calculate AE0, denoted as the final personnel coefficient of the second time period, where AE0 = Q1 * AE1 + Q2 * AE2, Q1 = MA2 / (MA1 + MA2), Q2 = MA1 / (MA1 + MA2); and calculate MA0, MA0 = Q1 * MA1 + Q2 * MA2; For the second time period, if AE0 < MA0, then mark the second time period as an unoccupied period, otherwise mark the second time period as an occupied period. Repeat to mark all time periods in the next k2 dates. After completion, obtain the personnel presence prediction data.
7. The AI-based energy-saving lamp control method according to claim 6, characterized in that: Based on the personnel behavior data and the light intensity control data, conduct light intensity analysis. Obtaining the optimal light intensity data further includes the following sub-steps: For any acquisition moment in the personnel behavior data, denoted as the first moment, obtain the total number of personnel collected at the first moment, and calculate the personnel proportions of learning behavior, rest behavior, and interaction behavior at the first moment respectively, denoted as PA1, PA2, and PA3 in sequence; If PA1 = PA2 = PA3, then mark the first moment as a learning behavior; Otherwise, select the two largest values among PA1, PA2, and PA3, and denote them as VA1 and VA2 in descending order; In the case that VA1 is equal to VA2, if VA1 and VA2 include PA1, the first moment is marked as a learning behavior, otherwise the first moment is an interactive behavior.
8. The AI-based energy-saving lamp control method according to claim 7, characterized in that: Light intensity analysis based on personnel behavior data and light intensity control data to obtain optimal light intensity data also includes the following sub-steps: When VA1 is not equal to VA2, if VA1 and VA2 include PA1 and PA1>k3*(VA2+VA1), then mark the first moment as learning behavior; otherwise, mark the first moment as the behavior type corresponding to max(VA1, VA2), where k3 is the set proportional coefficient, k3≤0.5; Repeat the process of marking all collected moments in the personnel behavior data, and obtain the first behavior data after completion; The learning behavior, resting behavior, and interactive behavior in the first behavioral data are recorded as 00, 01, and 10 respectively, and are sorted in the order of the corresponding date and collection time, and recorded as personnel behavior time series data.
9. The AI-based energy-saving lamp control method according to claim 8, characterized in that: Light intensity analysis based on personnel behavior data and light intensity control data to obtain optimal light intensity data also includes the following sub-steps: For any two adjacent data in the personnel behavior time series data of any date, if the two data are different, the middle of the two data is used as the dividing position, and all dividing positions are repeatedly obtained and divided to obtain the first behavior sequence; For any two adjacent division positions in the first behavior sequence, the data contained in the two division positions are marked as corresponding behavior periods, and the behavior periods include learning period, rest period and interaction period; For any behavior period, recorded as the first behavior period, obtain the light intensity level of the first energy-saving lamp corresponding to each collection moment in the first behavior period, recorded as the first light intensity sequence; Obtain the proportion of each light intensity level in the first light intensity sequence, and obtain the light intensity level with the largest proportion, recording it as the first light intensity level. Simultaneously, obtain the indoor light intensity levels collected at the collection moment corresponding to each light intensity level with the largest proportion, calculate the average value, and record it as the indoor reference light intensity. Record the first light intensity level as the optimal light intensity under the indoor reference light intensity for the first behavior period. Repeatedly obtain the indoor reference light intensity and the optimal light intensity corresponding to all behavior periods in the first behavior sequence, and record them as the optimal light intensity data of the date corresponding to the first behavior sequence; and repeatedly obtain the optimal light intensity data of all dates.
10. The AI-based energy-saving lamp control method according to claim 9, characterized in that: Controlling and adjusting energy-saving lamps based on occupant presence prediction data and optimal light intensity data includes the following sub-steps: For the current moment, the time period corresponding to the personnel presence prediction data at the current moment is recorded as the current time period; if there is no person in the first lighting range of the current time period, and the next time period adjacent to the current time period in the personnel presence prediction data is an unmanned period, the first energy-saving lamp is turned off; If there is a person in the first lighting range in the current time period, or if the next time period adjacent to the current time period in the person presence prediction data is a time period with people, then turn on the first energy-saving lamp; At the current moment, when the first energy-saving lamp is turned on, obtain the indoor light intensity, which is recorded as the current indoor light intensity HD; If there is a person within the first lighting range, obtain the behavior type corresponding to the current moment and record it as the current behavior; if there is no person within the first lighting range, record the learned behavior as the current behavior; Get the best light intensity data within k4 dates before the current moment and record it as the reference best light intensity data; From the reference optimal light intensity data, obtain the two optimal light intensities corresponding to the behavior period of the current behavior and with the smallest difference from the current indoor light intensity, denoted as LA and LB respectively, and the indoor reference light intensities corresponding to LA and LB are denoted as HA and HB respectively, where k4 is the number of settings; Calculate LZ and adjust the light intensity of the first energy-saving lamp to LZ, where LZ=Q3*LA+Q4*LB. If HB-HD=HA-HD=0, then Q3=Q4=0.5; otherwise, Q3=|HB-HD| / (|HB-HD|+|HA-HD|), and Q4=1-Q3. Repeat the control for all energy-saving lamps in the classroom.
Citation Information
Patent Citations
Street lamp illumination control method and system, computer equipment and storage medium
CN116113112A
Building energy-saving control method, device and equipment based on edge intelligent control and medium
CN119165784A
Lighting energy-saving control system with self-learning function in public indoor space
CN119485859A
Multi-mode adaptive smart home illumination adjustment method and system
CN120091486A