Photoelectric sensing intelligent household linkage control method and system
By setting up multiple photoelectric sensors in the smart home system, monitoring and calculating lighting data, and generating adjustment instructions, the problem of inaccurate lighting adjustment in the existing system is solved, intelligent lighting control is realized, and equipment linkage efficiency and living comfort are improved. , while energy-saving and environmentally friendly.
Patent Information
- Application Number
- CN202411765766.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-01-07
AI Technical Summary
The existing smart home adjustment system has shortcomings in lighting adjustment. The single-position photoelectric sensor cannot fully reflect the lighting conditions of the home environment, and the adjustment strategy lacks intelligence, resulting in the equipment adjustment not being accurate and timely enough.
Set data points in two different locations in the home environment (next to the window and center of the room), and install photoelectric sensors to continuously monitor the light intensity data, calculate the cross data value and compare the preset light demand threshold, generate adjustment instructions, and automatically adjust the light and Curtains to achieve intelligent lighting adjustment.
It improves the accuracy and representativeness of lighting data, realizes intelligent judgment of the overall lighting needs of the home environment, improves the equipment linkage efficiency and automation level, provides a more comfortable living experience, and reduces energy consumption while ensuring comfort.
Smart Images

Figure CN119270671A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a photoelectric sensing smart home linkage control method and system. Background Art
[0002] The smart home adjustment system integrates various smart devices to achieve comprehensive monitoring and automatic adjustment of the home environment, providing residents with a more convenient, comfortable and energy-saving living experience.
[0003] Photoelectric sensors, as devices that can sense light intensity and convert it into electrical data, play an important role in smart home systems. By installing photoelectric sensors, the lighting conditions in the home environment can be monitored in real time, and home appliances such as lights and curtains can be automatically adjusted according to changes in light intensity, thus creating a suitable living environment.
[0004] However, existing smart home adjustment systems have some shortcomings in terms of lighting adjustment.
[0005] For example, some systems rely on a single photoelectric sensor for monitoring, and therefore may not fully reflect the lighting conditions of the home environment. In addition, some systems lack intelligent strategies when adjusting home devices, which may result in inaccurate and in-time adjustments of the devices. Summary of the invention
[0006] The technical problem to be solved by the present invention is to provide a photoelectric sensing smart home linkage control method and system, which improves the intelligence level of home lighting adjustment.
[0007] In order to solve the above technical problems, the technical solution of the present invention is as follows: In a first aspect, a photoelectric sensing smart home linkage control method is provided, the method comprising: Step 11, determining a first data point and a second data point, where the first data point and the second data point are two representative different locations in a home environment, the first data point is set next to a window to monitor natural light exposure; the second data point is set at the center of the room to monitor the overall indoor lighting conditions; Step 12, installing photoelectric sensors at the first data point and the second data point respectively, for continuously monitoring the light intensity data of the first data point and the second data point within a set time interval, and converting the light intensity data of the first data point and the second data point into first electrical data and second electrical data respectively; Step 13, receiving first electrical data and second electrical data, where the first electrical data and the second electrical data represent light intensity at a first data point and a second data point, respectively; Step 14, calculating the intersection data value of the illumination intensity of the first data point and the second data point; Step 15, comparing the cross data value with a preset lighting demand threshold to determine the overall lighting demand of the current home environment; Step 16, generating corresponding adjustment instructions based on the overall lighting requirements of the current home environment; Step 17, sending the adjustment instruction to the actuator connected to the home device, the actuator includes a smart light bulb and a smart curtain motor; Step 18: After receiving the adjustment instruction, the actuator automatically performs corresponding operations, including turning on the light, turning off the light or adjusting the curtains, so as to realize automatic adjustment of the home appliances.
[0008] Further, a first data point and a second data point are determined, where the first data point and the second data point are two representative different locations in a home environment, the first data point is set next to a window to monitor natural light exposure; the second data point is set at the center of the room to monitor the overall indoor lighting conditions, including: Preliminarily select a candidate area for the first data point according to the home layout, and mark multiple points in the candidate area as candidates for the first data point; Select a location near the center of the room as a candidate area for the second data point to represent the overall lighting conditions of the room, and mark multiple points in the candidate area as candidates for the second data point; Temporarily deploy photoelectric sensors at candidate points of the first data point and candidate points of the second data point; set the sensors to collect light intensity data at fixed time intervals for a period of time; Pre-process the collected light intensity data and analyze the light intensity variation range, average value and stability characteristics of each candidate point; According to the light intensity variation range, average value and stability characteristics of each candidate point, two positions are found among all the candidate points, which are used as the final first data point and the second data point respectively; Photoelectric sensors are installed at the final first data point and second data point positions.
[0009] Further, according to the illumination intensity variation range, average value and stability characteristics of each candidate point, two positions are found among all candidate points, which are used as the final first data point and second data point positions, respectively, including: According to the range, average value and stability characteristics of the light intensity at each candidate point, Calculate the fitness value of each individual, each individual represents a combination of alternative points, and temporarily deploy photoelectric sensors at the representative point of each individual, where: Indicates The data point in Light intensity at the time; is the total time of data collection; It is The data point in The maximum value of light intensity at the moment; It is The data point in The minimum light intensity at the moment; It represents the location of data points in the home environment; Represents a time index, used to refer to a moment in time The light intensity data collected on According to the fitness value, some individuals are selected for pairing, and crossover operation is performed to generate new individuals; Perform mutation and iterative operations on the newly generated individuals. When the termination condition is met, stop the execution to obtain the final individual, decode the final individual, and obtain the final positions of the first data point and the second data point.
[0010] Further, calculating the cross data value of the illumination intensity of the first data point and the second data point includes: pass Calculate the intersection data value of the illumination intensity of the first data point and the second data point; in, is the result of the calculation of the cross data value, indicating that the data point and A measure of the difference in illumination between is the total length of the time interval, indicating the time range within which the crossover data value is calculated; It is a data point The neighborhood area; It is a data point The neighborhood area; is a neighborhood point, belonging to the data point or data point Neighborhood of; It is a data point With neighboring points The Euclidean distance between It is a data point and neighboring points The Euclidean distance between is the standard deviation of the Gaussian decay function; It is a neighbor point In the The light intensity value at the moment; Represents neighborhood points For data points The weight of Represents neighborhood points For data points The weight of .
[0011] Furthermore, the cross data value is compared with a preset light demand threshold to determine the overall light demand of the current home environment, including: According to the specific needs of the home environment and the user's preferences, a light demand threshold is set, where the light demand threshold represents different light levels, and the different light levels include low light, moderate light, and high light, wherein the light demand threshold is between a first threshold and a second threshold, and the second threshold is greater than the first threshold; Compare the cross data value with the lighting requirement threshold to determine the overall lighting requirement level of the current home environment. If the cross data value is less than the first threshold, the lighting requirement of the current home environment is judged to be low light; if the first threshold ≤ cross data value ≤ second threshold, it is judged to be moderate light; if the cross data value is greater than the second threshold, it is judged to be high light.
[0012] Furthermore, based on the overall lighting requirements of the current home environment, corresponding adjustment instructions are generated, including: Pre-set control rules, including: under low light demand, specify to turn on all lights and adjust the brightness; under moderate light demand, specify to turn on some lights and adjust to medium brightness; under high light demand, specify to turn off all lights or adjust curtains to block part of the sunlight; Generate specific adjustment instructions based on current lighting requirements and control rules.
[0013] Further, sending the adjustment instruction to the actuator connected to the home device includes: Parse the adjustment instructions and extract the target device, operation type, parameter value and priority of each adjustment instruction; Sorting the adjustment instructions according to their priorities, and dividing the sorted adjustment instructions according to target devices or functional areas to form multiple data blocks; each data block contains a group of instructions for the same device or functional area; Encapsulate each data block and add header information, including data block identifier, instruction quantity and priority identifier; Establish a communication connection with the home device actuator and send the encapsulated data blocks to the corresponding actuator one by one in the order of priority.
[0014] In a second aspect, a photoelectric sensing smart home linkage control system includes: A determination module is used to determine a first data point and a second data point, where the first data point and the second data point are two representative different locations in a home environment, the first data point is set near a window to monitor natural light exposure; the second data point is set at the center of a room to monitor the overall indoor light exposure; a conversion module, used to install photoelectric sensors at the first data point and the second data point, respectively, to continuously monitor the light intensity data of the first data point and the second data point within a set time interval, and to convert the light intensity data of the first data point and the second data point into first electrical data and second electrical data, respectively; A receiving module, used for receiving first electrical data and second electrical data, wherein the first electrical data and the second electrical data represent light intensity of a first data point and a second data point respectively; A calculation module, used to calculate the cross data value of the illumination intensity of the first data point and the second data point; A comparison module, used to compare the cross data value with a preset lighting demand threshold value to determine the overall lighting demand of the current home environment; A generation module, used to generate corresponding adjustment instructions based on the overall lighting requirements of the current home environment; The sending module is used to send adjustment instructions to the actuators connected to the home appliances, which include smart light bulbs and smart curtain motors. After receiving the adjustment instructions, the actuators automatically perform corresponding operations, including turning on the lights, turning off the lights or adjusting the curtains, so as to realize the automatic adjustment of the home appliances.
[0015] According to a third aspect, a computing device includes: one or more processors; The storage device is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method described.
[0016] In a fourth aspect, a computer-readable storage medium stores a program, and when the program is executed by a processor, the method described is implemented.
[0017] The above solution of the present invention includes at least the following beneficial effects: By setting data points at two different locations in the home environment (next to the window and in the center of the room) and installing photoelectric sensors, changes in natural light and indoor lighting can be monitored more comprehensively. This dual-point monitoring method effectively improves the accuracy and representativeness of lighting data acquisition.
[0018] The present invention can intelligently judge the overall lighting demand of the current home environment by calculating the cross data value of the lighting intensity of two data points and comparing it with the preset lighting demand threshold. This judgment method not only takes into account the influence of natural light, but also combines the overall lighting conditions in the room, making the judgment of lighting demand more reasonable.
[0019] Based on the overall lighting demand of the current home environment, the present invention can generate corresponding adjustment instructions and send the instructions to the actuators connected to the home appliances. This linkage adjustment method ensures that the home appliances can respond quickly according to the changes in lighting demand, improving the linkage efficiency and automation level of the devices.
[0020] By automatically executing the operations of turning on the lights, turning off the lights or adjusting the curtains, the present invention can adjust the lighting conditions of the home environment in real time according to the lighting needs of the user, thereby providing the user with a more comfortable and pleasant living experience.
[0021] Reasonable light adjustment can not only meet the user's comfort needs, but also reduce unnecessary energy consumption to a certain extent. The present invention can reduce the energy consumption of household appliances while ensuring comfort through intelligent light adjustment strategy, thereby achieving the goal of energy saving and environmental protection. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a flow chart of a photoelectric sensing smart home linkage control method provided by an embodiment of the present invention.
[0023] Figure 2 It is a schematic diagram of a photoelectric sensing smart home linkage control system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0025] like Figure 1 As shown, an embodiment of the present invention provides a photoelectric sensing smart home linkage control method, the method comprising the following steps: Step 11, determining a first data point and a second data point, where the first data point and the second data point are two representative different locations in a home environment, the first data point is set next to a window to monitor natural light exposure; the second data point is set at the center of the room to monitor the overall indoor lighting conditions; Step 12, installing photoelectric sensors at the first data point and the second data point respectively, for continuously monitoring the light intensity data of the first data point and the second data point within a set time interval, and converting the light intensity data of the first data point and the second data point into first electrical data and second electrical data respectively; Step 13, receiving first electrical data and second electrical data, where the first electrical data and the second electrical data represent light intensity at a first data point and a second data point, respectively; Step 14, calculating the intersection data value of the illumination intensity of the first data point and the second data point; Step 15, comparing the cross data value with a preset lighting demand threshold to determine the overall lighting demand of the current home environment; Step 16, generating corresponding adjustment instructions based on the overall lighting requirements of the current home environment; Step 17, sending the adjustment instruction to the actuator connected to the home device, the actuator includes a smart light bulb and a smart curtain motor; Step 18: After receiving the adjustment instruction, the actuator automatically performs corresponding operations, including turning on the light, turning off the light or adjusting the curtains, so as to realize automatic adjustment of the home appliances.
[0026] In an embodiment of the present invention, by setting data points at two different positions (next to the window and in the center of the room) in the home environment and installing photoelectric sensors, the changes in natural light and indoor lighting can be more comprehensively monitored. This dual-point monitoring method effectively improves the accuracy and representativeness of light data acquisition. The present invention can intelligently judge the overall lighting demand of the current home environment by calculating the cross data value of the light intensity of the two data points and comparing it with the preset light demand threshold. This judgment method not only takes into account the influence of natural light, but also combines the overall indoor lighting conditions, making the judgment of the lighting demand more reasonable. Based on the overall lighting demand of the current home environment, the present invention can generate corresponding adjustment instructions and send the instructions to the actuator connected to the home appliance. This linkage adjustment method ensures that the home appliance can respond quickly according to the changes in the lighting demand, and improves the linkage efficiency and automation level of the equipment. By automatically executing the operation of turning on the light, turning off the light or adjusting the curtain, the present invention can adjust the lighting conditions of the home environment in real time according to the user's lighting demand, thereby providing the user with more comfort. Reasonable lighting adjustment can not only meet the user's comfort needs, but also reduce unnecessary power consumption to a certain extent. The present invention uses an intelligent lighting adjustment strategy to reduce the energy consumption of household appliances while ensuring comfort, thereby achieving the goal of energy saving and environmental protection.
[0027] In the embodiment of the present invention, the above step 11, determining the first data point and the second data point, where the first data point and the second data point are two representative different locations in the home environment, the first data point is set next to the window to monitor the natural light exposure; the second data point is set at the center of the room to monitor the overall indoor lighting conditions, may include: Step 111, based on the home layout, preliminarily select a candidate area for the first data point, and within the candidate area, mark multiple points as candidates for the first data point, specifically including: comprehensively analyzing the home environment, especially the position, size and orientation of the windows, because these factors directly affect the exposure of natural light; based on the home layout analysis, preliminarily select one or more areas close to the windows as candidate areas for the first data point, and these areas should be able to fully reflect the changes in natural light; within the selected candidate area, based on the possible incident path and distribution of light, mark multiple specific points as candidates for the first data point, and these points can be set along the edge of the window, the wall near the window, or the surface of furniture; Step 112, select a position near the center of the room as a candidate area for the second data point to represent the overall lighting conditions in the room, and mark multiple points in the candidate area as candidates for the second data point, specifically including: determining the physical center or functional center of the room, which can be achieved by measuring the size of the room or using an indoor map; using the center of the room as data, select a nearby area as a candidate area for the second data point, this area should be able to represent the overall lighting conditions in the room, and avoid being significantly affected by local light sources or shadows; in the candidate area, mark multiple points as candidates for the second data point, these points can be evenly distributed to ensure that the overall changes in indoor lighting can be captured.
[0028] Step 113, temporarily deploying photoelectric sensors at candidate points of the first data point and at candidate points of the second data point; setting the sensors to collect light intensity data at fixed time intervals and for a period of time, specifically including: selecting electrical sensors to ensure that they have sufficient sensitivity and response speed to capture changes in light intensity; temporarily installing photoelectric sensors at candidate points of the first data point and the second data point, respectively, using simple fixing devices or pasting methods to ensure that the sensors are stable and can accurately measure light intensity; configuring the sensors to automatically collect light intensity data at fixed time intervals (such as every minute, every hour, etc.), and setting the duration of data collection (such as several days or weeks) to ensure that sufficient data can be collected for analysis; starting the data collection function of the sensor, and monitoring its operating status to ensure that data can be collected smoothly.
[0029] Step 114, preprocessing the collected light intensity data, analyzing the light intensity variation range, average value and stability characteristics of each candidate point, specifically including: cleaning the collected light intensity data, removing abnormal values, noise or invalid data, ensuring the accuracy and reliability of the data; performing necessary preprocessing operations on the data, such as unit conversion, normalization, etc., for subsequent analysis and comparison; and performing detailed analysis on the light intensity data of each candidate point, including calculating the light intensity variation range (difference between the maximum and minimum values), average value and stability characteristics (such as the degree of fluctuation or standard deviation of the light intensity). These indicators help to evaluate the suitability of each point as a data point.
[0030] Step 115, according to the illumination intensity variation range, average value and stability characteristics of each candidate point, two positions are found among all candidate points, which are used as the final first data point and the second data point respectively; Step 116, installing photoelectric sensors at the final positions of the first data point and the second data point.
[0031] In an embodiment of the present invention, by preliminarily selecting a candidate area and marking a plurality of candidate points, and then combining the collection and analysis of actual illumination data, the positions of the first data point and the second data point can be more accurately determined. This optimization selection ensures that the data points can truly and effectively reflect the illumination conditions in the home environment. By temporarily deploying photoelectric sensors at the candidate points and continuously collecting illumination intensity data, more realistic and comprehensive illumination information can be obtained. By preprocessing and analyzing these data, the illumination characteristics of each candidate point can be more accurately evaluated, thereby providing a reliable basis for the final determination of the data points. By analyzing the range of illumination intensity variation, average value and stability characteristics to select data points, the system can better adapt to changes in different home environments and illumination conditions. This improved adaptability helps to ensure that the system can maintain efficient and stable illumination regulation performance under various circumstances. Based on the accurately selected data points for illumination monitoring and control, the response speed and control accuracy of the smart home system to illumination requirements can be significantly improved. This helps to create a more comfortable and personalized living light environment for users. Through the data point selection and installation process, system misjudgment and frequent adjustments caused by inaccurate illumination monitoring can be reduced. This not only reduces the system's operation and maintenance costs, but also improves user satisfaction and convenience.
[0032] In the embodiment of the present invention, the above step 115, according to the illumination intensity variation range, average value and stability characteristics of each candidate point, finds two positions among all candidate points, which are used as the final first data point and second data point positions respectively, including: Step 1151, according to the illumination intensity variation range, average value and stability characteristics of each candidate point, Calculate the fitness value of each individual, each individual represents a combination of alternative points, and temporarily deploy photoelectric sensors at the representative point of each individual, where: Indicates The data point in Light intensity at the time; is the total time of data collection; It is The data point in The maximum value of light intensity at the moment; It is The data point in The minimum light intensity at the moment; It represents the location of data points in the home environment; Represents a time index, used to refer to a moment in time The light intensity data collected on Step 1152, according to the fitness value, select some individuals for pairing, and perform a crossover operation to generate new individuals, specifically including: sorting the fitness values of all individuals, which is from the best to the worst order, where the fitness value represents the comprehensive evaluation of the illumination characteristics of the candidate point combination; based on the sorted fitness value, select a part of the individuals with excellent performance for pairing, which can be achieved through different selection strategies, such as roulette selection; the purpose is to ensure that excellent genes (i.e., point combinations with good illumination characteristics) have a greater chance of being passed on to the next generation. For each pair of paired individuals, a crossover operation is performed to generate a new individual. The crossover operation can be to cut and exchange gene fragments at a random position of the individual, where "gene" represents the combination of the candidate points. In this way, a new combination combining the advantages of both parents can be generated; the new individuals generated by the crossover operation and a part of the excellent individuals in the original population together form a new population for the next round of iteration.
[0033] Step 1153, performing mutation operation and iterative operation on the newly generated individual, stopping execution when the termination condition is met, so as to obtain the final individual, decode the final individual, and obtain the final first data point and second data point position, specifically including: In the newly generated population, a part of individuals are randomly selected for mutation operation. Mutation can be to randomly change a "gene" in an individual, that is, to change the combination of candidate points to increase the diversity of the population, which helps the algorithm to jump out of the local optimal solution. The new population after crossover and mutation operations is used as the current population, and steps 1152 and 1153 are repeated for multiple rounds of iterations. After each round of iteration, a new population is generated, and the point combination scheme contained in it may be better. After each round of iteration, check whether the termination condition is met. The termination condition can be that the preset maximum number of iterations is reached; once the termination condition is met, the iteration process is stopped. At this time, the individual with the best fitness value in the population is considered to be the best candidate point combination scheme. Decode this individual, that is, determine the specific location of the first data point and the second data point represented by it; finally, output the location of the first data point and the second data point determined after algorithm optimization, and these two locations will serve as the key points for light monitoring in the smart home system.
[0034] In an embodiment of the present invention, by comprehensively considering the range of change, average value and stability characteristics of the light intensity, the method can more scientifically evaluate the suitability of each candidate point. The fitness value is calculated using a specific mathematical formula, which increases the accuracy and objectivity of the selection. Through selection, crossover and mutation operations, the method can find the optimal combination solution among many candidate points, thereby ensuring that the selected first data point and the second data point can most accurately reflect the lighting conditions in the home environment. The method has a certain degree of adaptability and can dynamically adjust the selection of data points according to the lighting characteristics of the specific home environment, making the system more flexible and universal. The accurately selected first data point and the second data point can provide more reliable lighting data for the smart home system, thereby improving the control accuracy and response speed of the system and creating a more comfortable light environment for the user. The data points are selected by an automated algorithm, which reduces the process of manual selection and adjustment, improves the intelligence level of the system, and reduces the difficulty of use for the user. The method is not only applicable to the selection of two data points, but can also adapt to the selection scenarios of more data points by adjusting the algorithm, and has a certain degree of scalability.
[0035] The specific implementation process of step 12 is as follows: Select a high-precision, stable and reliable photoelectric sensor to ensure that it can accurately measure the light intensity and convert it into electrical data; mark the specific installation points according to the first data point and the second data point positions determined in step 11; at the first data point position, use appropriate installation materials and tools to fix the first photoelectric sensor, ensuring that its sensing surface is facing the light source and is not blocked; similarly, install the second photoelectric sensor at the second data point position, paying attention to maintaining the stability of the sensor and the correct orientation of the sensing surface. Set the sensor's sensitivity, measurement range and other parameters as needed to ensure that it can accurately capture changes in light intensity; configure the sensor to continuously monitor light intensity at set time intervals (such as every minute, every hour, etc.) and record the data; the sensor will convert the monitored light intensity data into electrical data. These electrical data are usually analog or digital signals, representing the real-time value of light intensity; ensure that the connection between the sensor and the data acquisition system is stable and reliable so that the electrical data can be accurately transmitted. After the installation is completed, test the sensor to ensure that it is working properly and the data transmission is correct, and calibrate it to improve the accuracy of the measurement.
[0036] The specific implementation process of step 13 is as follows: Configure a dedicated data acquisition device to receive electrical data from the photoelectric sensor; ensure that the connection line between the sensor and the data acquisition device is unobstructed to reduce signal attenuation and interference; the data acquisition device continuously monitors the electrical data input from the sensor, and when the electrical data is received, the device will decode it and convert it into a processable data format (such as a digital value); perform necessary processing on the received electrical data (representing light intensity), such as unit conversion, data smoothing, etc., and store the processed data in a specified database or file.
[0037] In the embodiment of the present invention, the above step 14, calculating the cross data value of the illumination intensity of the first data point and the second data point, includes: Step 141, pass Calculate the intersection data value of the illumination intensity of the first data point and the second data point; in, is the result of the calculation of the cross data value, indicating that the data point and A measure of the difference in illumination between is the total length of the time interval, indicating the time range within which the crossover data value is calculated; It is a data point The neighborhood area; It is a data point The neighborhood area; is a neighborhood point, belonging to the data point or data point Neighborhood of; It is a data point With neighboring points The Euclidean distance between It is a data point and neighboring points The Euclidean distance between is the standard deviation of the Gaussian decay function; It is a neighbor point In the The light intensity value at the moment; Represents neighborhood points For data points The weight of Represents neighborhood points For data points The weight of .
[0038] In an embodiment of the present invention, by comprehensively considering the light intensity and spatial distance within the data point and its neighborhood, the method can more accurately calculate the light difference between two data points. This helps to more accurately understand the changes in light intensity at different locations in the home environment. Since the method calculates cross-data values within a certain time interval, it can dynamically reflect the changes in light intensity in the home environment; by introducing the light intensity and distance weights of the neighborhood points, the method not only considers the light intensity of the data point itself, but also comprehensively considers the influence of the surrounding environment, which makes the calculation of cross-data values more comprehensive and accurate. Using a Gaussian attenuation function to calculate the weight of the neighborhood point to the data point can better simulate the distribution of light intensity in space. Accurate light difference measurement can provide important decision-making basis for smart home systems, such as automatically adjusting curtain switches, light brightness, etc., thereby creating a more comfortable and energy-saving light environment for users.
[0039] In the embodiment of the present invention, the above step 15, comparing the cross data value with the preset lighting demand threshold to determine the overall lighting demand of the current home environment, includes: Step 151, according to the specific needs of the home environment and the user's preference, the light demand threshold is set, the light demand threshold represents different light levels, and the different light levels include low light, moderate light and high light, wherein the light demand threshold is between a first threshold and a second threshold, and the second threshold is greater than the first threshold, specifically including: Obtain the specific layout of the home environment, functional areas (such as living room, bedroom, study, etc.) and the lighting requirements of each area. At the same time, collect user preferences for lighting through user surveys. For example, users may like bright light when reading and soft light when resting. Set lighting requirement thresholds for different functional areas or scenes based on the collected home environment information and user preferences. These thresholds are generally divided into three levels: low light, moderate light, and high light, corresponding to different light intensity ranges. Set a specific numerical range for each light level. For example, the first threshold can be set to a lower light intensity value, indicating the upper limit of the low light level; the second threshold can be set to a higher light intensity value, indicating the lower limit of the high light level. Ensure that the second threshold is greater than the first threshold so that a moderate light level range is formed between the two. Store the set light requirement thresholds (including the first threshold and the second threshold) in the database of the smart home. Among them: Low light is suitable for activities that require lower light intensity, such as resting and watching movies. The threshold range can be set from 0 to 30 lux.
[0040] Moderate lighting is suitable for daily activities such as reading, writing, dining, etc. The threshold can be set from 30 to 150 lux.
[0041] High light: Suitable for activities that require high concentration or fine manipulation, such as painting, handicrafts, etc. The threshold range can be set above 150 lux.
[0042] Set specific first and second thresholds: The first threshold (the boundary between low light and moderate light) is set to 30 lux.
[0043] The second threshold (the boundary between moderate light and high light) is set to 150 lux.
[0044] Step 152, compare the cross data value with the light demand threshold to determine the overall light demand level of the current home environment. If the cross data value is less than the first threshold, the light demand of the current home environment is judged to be low light; if the first threshold ≤ the cross data value ≤ the second threshold, it is judged to be moderate light; if the cross data value is greater than the second threshold, it is judged to be high light, specifically including: Obtain the cross data value of the light intensity of the first data point and the second data point from the previous calculation step; compare the obtained cross data value with the first threshold and the second threshold stored in the system; if the cross data value is less than the first threshold, it means that the light intensity of the current home environment is low, and it is judged to be a "low light" demand level.
[0045] If the cross data value is between the first threshold and the second threshold (including being equal to the first threshold), it means that the light intensity of the current home environment is moderate, and it is judged as the "moderate light" demand level; if the cross data value is greater than the second threshold, it means that the light intensity of the current home environment is high, and it is judged as the "high light" demand level; the determined light demand level information is output to the smart home for users to view or the system to further process; according to the light demand level, the smart home can automatically adjust the brightness, switch status, etc. of the lighting equipment to meet the light demand of the current home environment. Among them, when judging the light demand level, it can be specifically: If the cross data value is lower than the first threshold (30 lux), the lighting requirement of the current home environment is determined to be a "low light" level. If the cross data value is between the first threshold (30 lux) and the second threshold (150 lux), it is determined to be a "moderate light" level. If the cross data value is higher than the second threshold (150 lux), it is determined to be a "high light" level.
[0046] In an embodiment of the present invention, by setting a light demand threshold, the light level can be customized according to the specific needs of the home environment and the personal preferences of the user. This ensures that the light of the home environment can meet the personalized needs of the user and improve the living comfort. By comparing the cross data value with the light demand threshold, the smart home system can automatically determine the overall light demand level of the current home environment, and adjust the lighting equipment accordingly to achieve intelligent control. This improves the automation level of the home environment and brings convenience to the user. Adjusting the light level according to actual needs can avoid unnecessary light waste, thereby reducing energy consumption and achieving energy saving and environmental protection. When the light demand is low, the system can automatically lower the light intensity or turn off some lights to save energy. By accurately judging the light demand of the home environment and automatically adjusting the lighting equipment, a more comfortable and natural lighting environment can be created for the user. This helps to improve the user's quality of life and satisfaction with the smart home system. The light demand threshold can be flexibly adjusted according to actual conditions to adapt to different scenarios and user needs. At the same time, the method can also be combined with other smart home functions, such as curtain control, temperature adjustment, etc., to achieve a more comprehensive smart home experience.
[0047] In the embodiment of the present invention, the above step 16 generates corresponding adjustment instructions based on the overall lighting requirements of the current home environment, including: Step 161, pre-set control rules, the control rules include: under low light demand, specify to turn on all lights and adjust the brightness; under moderate light demand, specify to turn on some lights and adjust to medium brightness; under high light demand, specify to turn off all lights or adjust curtains to block part of the sunlight, specifically including: Obtain the layout of the home environment, including the size of the room, the location and size of the windows, the placement of furniture, etc.; determine the controllable lighting and curtain devices in the home environment, as well as their adjustment methods and ranges. When low light requirements are detected, automatically perform the following operations: Turn on all lighting devices in the home environment and adjust the light brightness to the preset lower brightness value to ensure that the ambient light is soft and not glaring. Define the control rules under moderate lighting requirements: When moderate light demand is detected, the following actions are automatically performed: According to the layout and usage of the home environment, selectively turn on some lighting devices and adjust the turned-on lighting devices to medium brightness values to provide sufficient and comfortable lighting.
[0048] Define control rules under high light demand: When high light demand is detected, automatically do one of the following: Turn off all lighting equipment to make full use of natural light. If the natural light is too strong, automatically adjust the curtain equipment to block part of the sunlight to keep the ambient light within an appropriate range. Storage control rules: Storing the defined control rules in the smart home system's database ensures that the system can access these rules at any time to automatically adjust according to current lighting needs.
[0049] Step 162, generating specific adjustment instructions according to the current lighting requirements and control rules, specifically including: Obtain the overall lighting requirement level (low light, moderate light or high light) of the current home environment from the previous steps; find the corresponding operation instructions in the pre-set control rules according to the current lighting requirement level; generate specific adjustment instructions according to the matching control rules, which include turning on or off specific lighting equipment, adjusting light brightness, opening or closing curtain equipment, etc. Send the generated adjustment instructions to the corresponding devices in the smart home system to ensure that the devices can correctly receive and execute these instructions to achieve automatic adjustment of the home environment lighting. After the adjustment instructions are executed, the lighting conditions of the home environment are continuously monitored. If it is found that the lighting effect does not meet expectations or user needs have changed, the adjustment instructions are adjusted in time to adapt to the new situation.
[0050] In an embodiment of the present invention, through the pre-set control rules, the smart home system can automatically generate adjustment instructions according to the current lighting demand without manual operation by the user. This greatly improves the convenience of home management and saves the user's time and energy. The control rules take into account different lighting demand levels, so the system can adjust the lighting of the home environment according to the actual needs and preferences of the user, thereby providing a more comfortable and personalized living experience. In the case of sufficient light, by turning off unnecessary lights or adjusting curtains to block part of the sunlight, energy consumption can be effectively reduced and energy saving and environmental protection can be achieved. This intelligent adjustment not only reduces electricity bills; the smart home system can automatically make adjustments according to real-time changes in ambient light, reflecting the high intelligence of the system. This intelligent management enhances the sense of technology and modernity of home life and meets the user's pursuit of high-quality life. Reasonable light adjustment helps prevent visual fatigue and protect the user's eye health. Especially when reading, writing or using electronic devices for a long time, a suitable lighting environment can significantly reduce eye discomfort.
[0051] In the embodiment of the present invention, the above step 17, sending the adjustment instruction to the actuator connected to the home appliance, includes: Step 171, parsing the adjustment instruction, extracting the target device, operation type, parameter value and instruction priority of each adjustment instruction, specifically including: obtaining the adjustment instruction to be sent from the instruction queue or database; parsing each adjustment instruction using the instruction format or protocol, which involves string segmentation, regular expression matching or a specific decoding process; extracting the target device identifier (such as device ID, name or type), operation type (such as on, off, adjustment, etc.), parameter value (such as brightness value, temperature setting, etc.) and instruction priority from the parsed instruction; checking whether the extracted information is complete and valid, and if there is any missing or error, performing corresponding error handling, such as recording a log, sending a warning or requesting to resend the instruction; wherein, parsing each adjustment instruction using the instruction format or protocol, which involves string segmentation, regular expression matching or a specific decoding process, specifically including: Before you begin, determine the format or protocol of the reconciliation command, which is a predefined set of rules that dictate the composition of the command and the meaning of its parts. For example, a command format might be: "<device ID>:<operation type>:<parameter value>". Receive the raw reconciliation command string from an input queue, network interface, or other source. Remove unnecessary characters from the command string, such as spaces, line breaks, and so on. Ensure that the command string conforms to the expected encoding format, such as UTF-8. Split the string based on the delimiters defined in the command format (such as colons, commas, and so on); for example, if the command format is "<device ID>:<operation type>:<parameter value>", you can use colons as delimiters to split the string. If the command format is complex or contains optional fields, you can use regular expressions to match and extract the parts of the command. Build a regular expression pattern that matches all possible combinations of the command format, use the regular expression engine to match the command string, and extract the corresponding fields. Encapsulate the parsed fields into a data structure, such as an object, dictionary, or structure, to ensure that the data structure can easily access and operate the parsed instruction information; return the encapsulated parsing results to the caller for subsequent processing or execution of corresponding operations.
[0052] Step 172, sorting the adjustment instructions according to their priorities, and segmenting the sorted adjustment instructions according to the target device or functional area to form multiple data blocks; each data block contains a group of instructions for the same device or functional area, specifically including: sorting all adjustment instructions according to the instruction priority extracted in step 171, and the instructions with high priority will be placed in front; traversing the sorted instruction list, and segmenting according to the target device or functional area of each instruction. Instructions for the same device or functional area are classified into the same data block; for the instructions in the data block, further optimization can be performed according to the actual situation, such as merging similar instructions or deleting redundant instructions; the segmented data blocks and the instruction information contained therein are stored in a suitable data structure for subsequent processing.
[0053] Step 173, encapsulate each data block and add header information, including a data block identifier, the number of instructions and a priority identifier, specifically including: creating an encapsulation structure for each data block, which can accommodate all instructions in the data block and related information; adding header information at the beginning of the encapsulation structure, including a data block identifier (used to uniquely identify the data block), the number of instructions (the number of instructions contained in the data block) and a priority identifier (reflecting the highest priority of the instructions in the data block); converting the encapsulated data block into a format suitable for network transmission, such as a byte stream or a specific data exchange format.
[0054] Step 174, establish a communication connection with the home appliance actuator, and send the encapsulated data blocks to the corresponding actuator one by one in the order of priority, specifically including: using a communication protocol (such as TCP / IP, UDP, Zigbee, ZWave, etc.) to establish a stable communication connection with the home appliance actuator; prepare the data blocks to be sent in order of priority. If there are multiple data blocks to be sent, they are sent in order from high to low according to the priority; send the encapsulated data blocks one by one to the corresponding actuator. Error detection and retry mechanisms can be implemented during the sending process to ensure reliable data transmission; wait for confirmation information from the actuator to verify whether the instruction has been successfully received and executed. If necessary, the status information or error code returned by the actuator can be processed; after all data blocks are sent, the communication connection with the actuator is closed to release resources.
[0055] In an embodiment of the present invention, step 171 ensures that the target device, operation type, parameter value and priority of each instruction are accurately extracted by parsing the adjustment instruction. This helps to reduce instruction execution errors and improve the accuracy of home appliance control. Step 172 sorts the adjustment instructions according to their priorities and divides them according to target devices or functional areas. This processing method can ensure that high-priority instructions are executed first, and instructions for the same device or area can be processed centrally, thereby improving the overall efficiency of instruction execution. Step 173 encapsulates each data block and adds header information, including data block identification, instruction quantity and priority identification. This increases the robustness of data transmission, so that even if some data is damaged during transmission, the data block can be identified and restored through the header information. Step 174 establishes a communication connection with the home appliance actuator and sends the encapsulated data blocks one by one in priority order. This orderly communication method can reduce network congestion and conflicts and ensure that the instructions can reach the actuator stably and safely. Since the entire sending process is optimized, including instruction sorting, segmentation, encapsulation and orderly sending, the home system can respond to the adjustment instruction more quickly and improve the user experience. Through the reasonable division and encapsulation of adjustment instructions, different home appliances can work together better to achieve overall optimization of the home environment.
[0056] The specific implementation process of step 18 is as follows: The actuator continuously monitors the adjustment instructions from the central controller or smart home system through the network interface; when receiving a data packet, the actuator first verifies the integrity and correctness of the data packet to ensure that the data has not been tampered with or damaged during transmission; the actuator parses the received data packet to extract the specific content of the adjustment instruction, including information such as the target device, operation type, parameter value, etc.; the parsing process may involve operations such as decryption, decompression or format conversion of the data packet to ensure that the instruction content is correctly read; the actuator checks whether the parsed instruction is related to the home device it controls, verifies the legitimacy of the instruction, and ensures that the instruction is a valid operation for the device connected to the actuator.
[0057] Before executing a command, the actuator will check the current state of the connected device to ensure that the execution of the command will not cause damage to the device or safety issues; for example, if the command is to turn on the light, the actuator will first check whether the light is already on to avoid repeated operations; according to the parsed command content, the actuator sends the corresponding control signal to the home device through the hardware interface. For operations such as turning on and off the light, the actuator will send a switch signal to the light device. For operations such as adjusting the curtains, the actuator will send a move or stop command to the curtain device, as well as the corresponding position parameters. During the execution of the command, the actuator will continuously monitor the state changes of the device and ensure that the command is executed correctly. If the device fails or anomalies during the execution of the command, the actuator will immediately stop the operation and send an error report to the central controller. When the command is executed, the actuator will send a confirmation signal of execution completion to the central controller to notify the system that the command has been successfully executed. At the same time, the actuator will also update its internal state to reflect the latest state of the home device.
[0058] like Figure 2 As shown, an embodiment of the present invention further provides a photoelectric sensing smart home linkage control system, comprising: A determination module is used to determine a first data point and a second data point, where the first data point and the second data point are two representative different locations in a home environment, the first data point is set near a window to monitor natural light exposure; the second data point is set at the center of a room to monitor the overall indoor light exposure; a conversion module, used to install photoelectric sensors at the first data point and the second data point, respectively, to continuously monitor the light intensity data of the first data point and the second data point within a set time interval, and to convert the light intensity data of the first data point and the second data point into first electrical data and second electrical data, respectively; A receiving module, used for receiving first electrical data and second electrical data, wherein the first electrical data and the second electrical data represent light intensity of a first data point and a second data point respectively; A calculation module, used to calculate the cross data value of the illumination intensity of the first data point and the second data point; A comparison module, used to compare the cross data value with a preset lighting demand threshold value to determine the overall lighting demand of the current home environment; A generation module, used to generate corresponding adjustment instructions based on the overall lighting requirements of the current home environment; The sending module is used to send adjustment instructions to the actuators connected to the home appliances, which include smart light bulbs and smart curtain motors. After receiving the adjustment instructions, the actuators automatically perform corresponding operations, including turning on the lights, turning off the lights or adjusting the curtains, so as to realize the automatic adjustment of the home appliances.
[0059] It should be noted that the system is a system corresponding to the above method, and all implementation methods in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.
[0060] The embodiment of the present invention further provides a computing device, comprising: a processor, a memory storing a computer program, wherein when the computer program is executed by the processor, the method described above is executed. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.
[0061] The embodiment of the present invention also provides a computer-readable storage medium storing instructions, which, when executed on a computer, enable the computer to execute the method described above. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.
[0062] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A photoelectric sensing smart home linkage control method, characterized in that The method comprises: Step 11, determining a first data point and a second data point, where the first data point and the second data point are two representative different locations in a home environment, the first data point is set next to a window to monitor natural light exposure; the second data point is set at the center of the room to monitor the overall indoor lighting conditions; Step 12, installing photoelectric sensors at the first data point and the second data point respectively, for continuously monitoring the light intensity data of the first data point and the second data point within a set time interval, and converting the light intensity data of the first data point and the second data point into first electrical data and second electrical data respectively; Step 13, receiving first electrical data and second electrical data, where the first electrical data and the second electrical data represent light intensity at a first data point and a second data point, respectively; Step 14, calculating the intersection data value of the illumination intensity of the first data point and the second data point; Step 15, comparing the cross data value with a preset lighting demand threshold to determine the overall lighting demand of the current home environment; Step 16, generating corresponding adjustment instructions based on the overall lighting requirements of the current home environment; Step 17, sending the adjustment instruction to the actuator connected to the home device, the actuator includes a smart light bulb and a smart curtain motor; Step 18: After receiving the adjustment instruction, the actuator automatically performs corresponding operations, including turning on the light, turning off the light or adjusting the curtains, so as to realize automatic adjustment of the home appliances.
2. A photoelectric sensing smart home linkage control method according to claim 1, characterized in that, Determine a first data point and a second data point, where the first data point and the second data point are two different representative locations in a home environment, and the first data point is located near a window to monitor natural light exposure; The second data point is set at the center of the room to monitor the overall lighting conditions in the room, including: Preliminarily select a candidate area for the first data point according to the home layout, and mark multiple points in the candidate area as candidates for the first data point; Select a location near the center of the room as a candidate area for the second data point to represent the overall lighting conditions of the room, and mark multiple points in the candidate area as candidates for the second data point; Temporarily deploy photoelectric sensors at candidate points of the first data point and candidate points of the second data point; set the sensors to collect light intensity data at fixed time intervals for a period of time; Pre-process the collected light intensity data and analyze the light intensity variation range, average value and stability characteristics of each candidate point; According to the light intensity variation range, average value and stability characteristics of each candidate point, two positions are found among all the candidate points, which are used as the final first data point and the second data point respectively; Photoelectric sensors are installed at the final first data point and second data point positions.
3. A photoelectric sensing smart home linkage control method according to claim 2, characterized in that, According to the light intensity variation range, average value and stability characteristics of each candidate point, two positions are found among all the candidate points, which are used as the final first data point and second data point positions, including: According to the range, average value and stability characteristics of the light intensity at each candidate point, Calculate the fitness value of each individual, each individual represents a combination of alternative points, and temporarily deploy photoelectric sensors at the representative point of each individual, where: Indicates The data point in Light intensity at the time; is the total time of data collection; It is The data point in The maximum value of light intensity at the moment; It is The data point in The minimum light intensity at the moment; It represents the location of data points in the home environment; Represents a time index, used to refer to a moment in time The light intensity data collected on According to the fitness value, some individuals are selected for pairing, and crossover operation is performed to generate new individuals; Perform mutation and iterative operations on the newly generated individuals. When the termination condition is met, stop the execution to obtain the final individual, decode the final individual, and obtain the final positions of the first data point and the second data point.
4. A photoelectric sensing smart home linkage control method according to claim 3, characterized in that: Calculating the intersection data value of the illumination intensity of the first data point and the second data point, including: pass Calculate the intersection data value of the illumination intensity of the first data point and the second data point; in, is the result of the calculation of the cross data value, indicating that the data point and A measure of the difference in illumination between is the total length of the time interval, indicating the time range within which the crossover data value is calculated; It is a data point The neighborhood area; It is a data point The neighborhood area; is a neighborhood point, belonging to the data point or data point Neighborhood of; It is a data point With neighboring points The Euclidean distance between It is a data point and neighboring points The Euclidean distance between is the standard deviation of the Gaussian decay function; It is a neighbor point In the The light intensity value at the moment; Represents neighborhood points For data points The weight of Represents neighborhood points For data points The weight of .
5. A photoelectric sensing smart home linkage control method according to claim 4, characterized in that: The cross-data value is compared with the preset light demand threshold to determine the overall light demand of the current home environment, including: According to the specific needs of the home environment and the user's preferences, a light demand threshold is set, where the light demand threshold represents different light levels, and the different light levels include low light, moderate light, and high light, wherein the light demand threshold is between a first threshold and a second threshold, and the second threshold is greater than the first threshold; Compare the cross data value with the lighting requirement threshold to determine the overall lighting requirement level of the current home environment. If the cross data value is less than the first threshold, the lighting requirement of the current home environment is judged to be low light; if the first threshold ≤ cross data value ≤ second threshold, it is judged to be moderate light; if the cross data value is greater than the second threshold, it is judged to be high light.
6. A photoelectric sensing smart home linkage control method according to claim 5, characterized in that: Based on the overall lighting requirements of the current home environment, generate corresponding adjustment instructions, including: Pre-set control rules, including: under low light demand, specify to turn on all lights and adjust the brightness; under moderate light demand, specify to turn on some lights and adjust to medium brightness; under high light demand, specify to turn off all lights or adjust curtains to block part of the sunlight; Generate specific adjustment instructions based on current lighting requirements and control rules.
7. A photoelectric sensing smart home linkage control method according to claim 6, characterized in that: Sends adjustment commands to actuators connected to home devices, including: Parse the adjustment instructions and extract the target device, operation type, parameter value and priority of each adjustment instruction; Sorting the adjustment instructions according to their priorities, and dividing the sorted adjustment instructions according to target devices or functional areas to form multiple data blocks; each data block contains a group of instructions for the same device or functional area; Encapsulate each data block and add header information, including data block identifier, instruction quantity and priority identifier; Establish a communication connection with the home device actuator and send the encapsulated data blocks to the corresponding actuator one by one in the order of priority.
8. A photoelectric sensing smart home linkage control system, characterized in that: Applied to the method according to any one of claims 1 to 7, comprising: A determination module is used to determine a first data point and a second data point, where the first data point and the second data point are two representative different locations in a home environment, the first data point is set near a window to monitor natural light exposure; the second data point is set at the center of a room to monitor the overall indoor light exposure; a conversion module, used to install photoelectric sensors at the first data point and the second data point, respectively, to continuously monitor the light intensity data of the first data point and the second data point within a set time interval, and to convert the light intensity data of the first data point and the second data point into first electrical data and second electrical data, respectively; A receiving module, used for receiving first electrical data and second electrical data, wherein the first electrical data and the second electrical data represent light intensity of a first data point and a second data point respectively; A calculation module, used to calculate the intersection data value of the illumination intensity of the first data point and the second data point; A comparison module, used to compare the cross data value with a preset lighting demand threshold value to determine the overall lighting demand of the current home environment; A generation module, used to generate corresponding adjustment instructions based on the overall lighting requirements of the current home environment; The sending module is used to send adjustment instructions to the actuators connected to the home appliances, which include smart light bulbs and smart curtain motors. After receiving the adjustment instructions, the actuators automatically perform corresponding operations, including turning on the lights, turning off the lights or adjusting the curtains, so as to realize the automatic adjustment of the home appliances.
9. A computing device, characterized in that include: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.
Citation Information
Cited By
Self-adaptive intelligent adjustment management method and system for customized home light
CN120029073A
Intelligent household temperature control system based on artificial intelligence
CN120295393A
AI-based smart home temperature control system
CN120295393B