Smart home control method and system based on Internet of Things
By deploying multiple sets of sensors in the smart home system, constructing a communication topology network and a global control scheme, the problems of incomplete environmental data coverage and rigid control schemes are solved, achieving precise response to user needs and a comfortable smart living experience.
Patent Information
- Application Number
- CN202511711246.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-20
- Publication Date
- 2026-02-13
AI Technical Summary
Existing smart home control methods suffer from incomplete environmental data coverage, rigid control schemes, and an inability to dynamically adapt to user needs, resulting in low control accuracy and a poor user experience.
By deploying multiple sets of sensors to build a communication topology network, analyzing environmental data, generating a global control scheme, and adjusting it according to user needs, precise control of smart home devices can be achieved.
It improves the completeness of environmental data coverage and the adaptability of control schemes, enabling rapid response to environmental changes and user needs, and providing a more comfortable and convenient smart living experience.
Smart Images

Figure CN121523078A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent control technology, and in particular to a control method and system for smart homes based on the Internet of Things. Background Technology
[0002] With the deep penetration of IoT technology and AI algorithms into home scenarios, smart home systems have evolved from single-device control to multi-device collaboration and environmental adaptation, becoming a core carrier for improving living comfort and reducing energy consumption. Currently, mainstream smart home control methods typically revolve around the chain of sensor data acquisition, data transmission, and control command generation. However, in practical applications, there are still significant technical shortcomings in achieving complete coverage of environmental data for preset areas and in the collaborative optimization of control schemes to dynamically adapt to scenarios and user needs. This shortcoming has become a core issue restricting the achievement of accurate and efficient home control.
[0003] Specifically, the shortcomings of existing technologies are mainly reflected in the following aspects: First, there are physical blind spots and logical gaps in environmental data coverage. In traditional solutions, sensor deployment often relies on manual experience or uniform distribution strategies, without taking into account the regional structure of the preset area (such as wall layout and the location of connecting passages) for targeted planning. For example, temperature sensors are only deployed in the sofa area of the living room, while the corner near the balcony connecting passage is a physical blind spot due to the lack of sensor deployment. At the same time, the massive data processing and spatial analysis capabilities of industrial cloud platforms are not utilized, making it impossible to integrate multi-area and multi-scenario sensor deployment optimization cases through the platform, resulting in insufficient scientific deployment. Furthermore, the data processing stage only simply summarizes the measured data of the deployed sensors, without considering the circulation of connecting passages, such as the impact of airflow on corner temperature after the balcony door is opened, or the disturbance of environmental parameters caused by people walking in the passage between the living room and dining room. It is impossible to supplement the environmental parameters of non-sensor deployment locations through diffusion analysis, resulting in the construction of only a single-point detection layer rather than a complete detection layer covering the entire area. There are logical gaps in the environmental data, which cannot provide full-scenario data support for subsequent control schemes.
[0004] Secondly, the control scheme is not adaptive to the scene and user demand. In the prior art, when generating a control scheme, only single type detection data such as temperature data is referred to for controlling an air conditioner or a fixed threshold such as setting the temperature to 24℃ is used, and global analysis is not performed on multi-type complete detection layer data. For example, in a bedroom scene, only temperature data is used to adjust the air conditioner, but the synergistic effect of humidity data and human activity data on comfort is ignored. More importantly, the control scheme lacks a response mechanism for the dynamic changes of the regional scene and the personalized needs of the user. For example, when the bedroom switches from a daily activity scene to a sleep scene, the traditional scheme cannot automatically reduce the sensitivity of the infrared sensor to avoid the device being triggered by human micro-movement, nor can it adjust the parameters according to the user's preference for a temperature of 22℃ instead of the default 24℃ during sleep. As a result, the control scheme is rigid and has poor flexibility, making it difficult to meet the differentiated needs of users in different scenes, and ultimately affecting the control accuracy of smart home and user experience.
[0005] In summary, the existing smart home control method cannot realize the synergy of complete environmental data coverage and dynamic adaptation of the control scheme, resulting in low control accuracy and poor user experience. Therefore, the present application proposes a control method and system for smart home based on Internet of Things. SUMMARY
[0006] The present application provides a control method and system for smart home based on Internet of Things, which combines regional structure and flow conditions to complete environmental data, and optimizes the control scheme based on the scene and user demand, to solve the above technical problems.
[0007] The present application provides a control method for smart home based on Internet of Things, comprising: Step 1: deploying multiple groups of sensors according to the regional structure of a preset region, constructing a communication topology network of the multiple groups of sensors and edge nodes, and transmitting environmental data of the preset region collected by the multiple groups of sensors to the edge nodes based on the communication topology network; Step 2: performing data analysis on the received environmental data based on the edge nodes, constructing a single-point detection layer based on each sensor, and performing diffusion analysis on the single-point detection layer to obtain a complete detection layer for each sensor according to the corresponding detection type and the flow condition of each connected channel of the preset region; Step 3: performing global analysis on all complete detection layers to obtain an initial control scheme for the preset region, adjusting the initial control scheme according to the regional scene of the preset region and user demand to obtain a smart control scheme, and controlling the corresponding smart home of the preset region to perform a control operation.
[0008] Preferably, deploying multiple groups of sensors according to the regional structure of a preset region comprises: determine a use action of each region position based on a historical use database of the preset region, and build an action distribution matrix, wherein the use action comprises at least one demand action of an output of different users in the corresponding region position, and the demand action is a true action, a false action or an ambiguous action associated with a user identity label and an action timing; determine a trigger probability of each region position according to a demand type set of each demand action in the action distribution matrix, and set a first deployment quantity to the corresponding region position; adjust the first deployment quantity according to a region structure particularity existing in each region position and dynamic structure change data to obtain a second deployment quantity, and realize deployment of multiple groups of sensors.
[0009] Preferably, a communication topology network of multiple groups of sensors and edge nodes is built, comprising: real-time collection of transmission parameters of a candidate link of a sensor-edge node in a preset region, a working state and a dynamic priority of each group of sensors, a resource state of an edge node, a spatial communication attenuation parameter constructed by a region structure and an interference parameter of the preset region, determination of a multi-dimensional data set of the corresponding candidate link; training of a neural network model based on the multi-dimensional data set, classification output of a connection quality probability of each candidate link, wherein the classification comprises excellent transmission, load adaptive transmission or unsuitable transmission; setting of a reward function to each candidate link based on the classification output result, and embedding in a reinforcement learning model, with maximization of a total reward value of the topology as a core target, dynamic generation of a connection relationship of each group of sensors and edge nodes, and construction of the communication topology network.
[0010] Preferably, a single-point detection layer based on each sensor is built, comprising: based on a spatial structure parameter of a sensor deployment region, reference to a preset environmental parameter diffusion characteristic, division of at least one environmental interference diffusion difference sub-region, and quantification of an influence coefficient of environmental interference on environmental data of each sub-region; calling a preset environmental data diffusion function list to calculate a diffusion deviation amount of environmental data of the edge of the sub-region, and compensating and correcting the corresponding environmental data based on the diffusion deviation amount; time stamp alignment and format standardization processing of the compensated and corrected data, and amplification of features corresponding to key environmental events based on an attention mechanism, generation of a high-dimensional feature vector of spatial-environmental fusion; quantification of a spatial correlation representation coefficient of corresponding data based on a straight-line distance of a sensor and a preset key monitoring point, and a distribution density of surrounding same-type sensors; input the spatial correlation representation coefficient and the high-dimensional feature vector into a lightweight neural network model, embed parameters corresponding to an environmental data diffusion function to simulate spatial diffusion rules of environmental parameters, and complete event detection and classification; weight and fuse the event classification confidence output by the model and the spatial correlation representation coefficient to obtain a spatial-confidence composite coefficient; based on the influence coefficient, the spatial-confidence composite coefficient, and the physical position of the corresponding sensor, determine the current weight of the corresponding sensor; set a first interval duration for the sensor whose current weight is greater than or equal to a preset weight, and set a second interval duration for the sensor whose current weight is less than the preset weight, wherein the second interval duration is greater than the first interval duration; based on the current weight and the corresponding interval duration, construct a single-point detection layer at a logical level for each type of sensor, wherein the single-point detection layer is a dynamic data network with a weight mark and a corresponding interval duration.
[0011] Preferably, the single-point detection layer is subjected to diffusion analysis of non-deployed sensor position points to obtain a complete detection layer for each sensor, including: for each sensor detection type, predefine corresponding parameter diffusion adaptation attributes, and collect flow data of each connected channel in the preset area to quantitatively obtain flow characteristic parameters, including flow intensity, flow frequency, and flow direction; train a machine learning model adapted to the detection type to obtain diffusion prediction weights of non-deployed sensor position points; based on the diffusion prediction weights, divide the non-deployed sensor position points into a core diffusion area and an edge diffusion area; for the non-deployed points in the core diffusion area, predict the environmental parameters of the core non-deployed points in combination with the flow direction and intensity of the connected channel, and for the non-deployed points in the edge diffusion area, based on the diffusion adaptation attributes of the detection type and in combination with the distance from the nearest deployed sensor, attenuate and correct the predicted parameters of the core diffusion area to obtain the environmental parameters of the non-deployed points in the edge area, and obtain a complete detection layer.
[0012] Preferably, the input of the machine learning model is the measured data of the deployed sensors in the single-point detection layer, the diffusion adaptation attributes of the corresponding detection type, and the flow characteristic parameters of the connected channels around the corresponding sensor, the output is the diffusion prediction weights of the non-deployed sensor position points, and the diffusion prediction weights are positively correlated with the flow intensity of the connected channel and negatively correlated with the diffusion attenuation attributes of the detection type.
[0013] Preferably, global analysis is performed on all complete detection layers to obtain an initial control scheme for the preset area, including: Extract the parameter perturbation features of each complete detection layer, traverse the parameter distribution of each detection layer along the spatial dimension of the preset region, and obtain the feature perturbation map of the corresponding detection layer. Based on historical device control data of a preset area, and combined with the operating characteristics of smart home devices, a complete disturbance-control effective set for the detection layer is constructed. The system identifies dynamic scene labels in a preset area. Simultaneously, it quantifies the sensitivity coefficients of each complete detection layer parameter to the device control effect based on a global sensitivity analysis method. Furthermore, it combines the feature perturbation map and scene labels to perform sensitivity-scene-based weighted correction on each detection layer parameter. Finally, it integrates the modal correlation relationships of each detection layer to obtain a global sensitive adaptation detection dataset. A multi-objective optimization function based on comfort, energy consumption, and control effectiveness is constructed and solved, wherein the global sensitive adaptation detection dataset is used as input and the effective threshold of the perturbation-control effective set introduced into the complete detection layer is used as constraint term; Based on the solution results, and by verifying the control effectiveness of the candidate solutions under parameter disturbance scenarios through a global effectiveness analysis method, the final output includes the action type, execution parameters and trigger timing of each smart home device.
[0014] Preferably, the intelligent control scheme is obtained by adjusting the scheme according to the regional scenario and user needs of the preset area, including: Collect regional scene characteristics and quantitative data of user needs in a preset area, and associate them with the execution effect data of historical intelligent control schemes to construct a dynamic correlation dataset of scene-demand-device control; Based on the dynamic association dataset, and by quantifying the influence weight of user needs on the control parameters of smart home devices in different regional scenarios through global sensitivity analysis, the device control parameters in the initial control scheme are adjusted.
[0015] This invention provides a smart home control system based on the Internet of Things, comprising: The communication network construction module is used to deploy multiple sets of sensors according to the regional structure of a preset area, construct a communication topology network between the multiple sets of sensors and edge nodes, and transmit the environmental data of the preset area collected by the multiple sets of sensors to the edge nodes based on the communication topology network. The detection layer construction module is used to perform data analysis on the received environmental data based on the edge nodes, construct a single-point detection layer based on each sensor, and perform diffusion analysis on the location points of the single-point detection layer without deployed sensors according to the corresponding detection type and the flow of each connected channel in the preset area to obtain the complete detection layer for each sensor. A scheme generation module is configured to perform global analysis on all complete detection layers to obtain an initial control scheme of the preset area, and adjust the initial control scheme according to a regional scene of the preset area and user demand to obtain an intelligent control scheme, so as to control the corresponding smart home of the preset area to perform a control operation.
[0016] Compared with the prior art, the application has the following beneficial effects: Through the complete process of sensor deployment-communication topology construction-detection layer construction-control scheme generation and adjustment, the full-link optimization of the smart home control is realized, the problems of incomplete coverage and inaccurate control of the traditional scheme are effectively solved, the adaptability of the control scheme and the reliability of the environmental data are improved, the environmental changes and user demand can be quickly responded to, and more comfortable and convenient smart life experience is provided for the user. Meanwhile, the application can be deeply connected with an industrial cloud platform, and with the help of high computing power, massive storage and remote collaboration capability of the platform, unified data management and collaborative control of the multi-pre-set-area smart home system are realized.
[0017] Other features and advantages of the present application will be further described in the following specification, and some will become apparent from the specification, or will be learned by practice of the present application. The objects and other advantages of the present application can be achieved and obtained by the structure particularly pointed out in the written specification and the accompanying drawings.
[0018] The technical solutions of the present application will be further described in detail below with the help of the accompanying drawings and embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0019] The accompanying drawings are used to provide further understanding of the present application, and constitute a part of the specification, and are used to explain the present application together with embodiments of the present application, and do not constitute a limitation on the present application. In the drawings: Figure 1 A flowchart of a control method of a smart home based on Internet of Things in an embodiment of the present application; Figure 2 A structural diagram of a control system of a smart home based on Internet of Things in an embodiment of the present application. DETAILED DESCRIPTION
[0020] The preferred embodiments of the present application will be described below in combination with the accompanying drawings, and it should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and do not limit the present application.
[0021] The present application provides a control method of a smart home based on Internet of Things, as shown in Figure 1 The control method comprises the following steps: Step 1: Deploy multiple sets of sensors according to the regional structure of the preset area, construct a communication topology network between the multiple sets of sensors and the edge nodes, and transmit the environmental data of the preset area collected by the multiple sets of sensors to the edge nodes based on the communication topology network. Step 2: Based on the edge node, perform data analysis on the received environmental data, construct a single-point detection layer based on each sensor, and according to the corresponding detection type and the flow of each connected channel in the preset area, perform diffusion analysis on the location points of the non-deployed sensor in the single-point detection layer to obtain the complete detection layer for each sensor. Step 3: Perform a global analysis on all complete detection layers to obtain the initial control scheme for the preset area, and adjust it according to the regional scene and user needs of the preset area to obtain an intelligent control scheme, and control the corresponding smart home in the preset area to perform control operations.
[0022] In this embodiment, the preset area refers to the physical space that needs to be controlled by smart home technology. It can be divided into sub-areas according to function, such as the living room, bedroom, kitchen, and bathroom in a residence. The boundaries of the preset area are defined by importing the floor plan into the system.
[0023] In this embodiment, the area structure includes physical structural features such as the wall layout, door and window positions, furniture arrangement, and passage distribution of the preset area. For example, the living room wall is a brick-concrete structure, has a sliding door connecting to the balcony, the sofa is located in the middle of the area, and the bedroom has a corner area covered by a wardrobe.
[0024] In this embodiment, the sensor refers to an Internet of Things (IoT) device with environmental parameter acquisition capabilities, including temperature sensors, humidity sensors, infrared human body sensors, smoke sensors, light sensors, sound sensors, etc., such as the temperature and humidity sensor with model number SHT30 and the infrared human body sensor with model number HC-SR501.
[0025] In this embodiment, edge nodes refer to intelligent devices deployed in a preset area that have the ability to receive, process, store, and perform local computing, such as edge gateways equipped with processors or intelligent routers with edge computing capabilities.
[0026] In this embodiment, the communication topology network refers to the connection structure formed between the sensor and the edge node through communication links, including star topology, mesh topology, etc., such as the mesh communication topology network formed by the sensor and the edge node through the Zigbee protocol.
[0027] In this embodiment, environmental data refers to various physical environmental parameters within a preset area collected by sensors, such as 25°C collected by a temperature sensor, 50%RH collected by a humidity sensor, presence status signals collected by an infrared human body sensor, and smoke sensors. Smoke concentration data.
[0028] In this embodiment, the single-point detection layer refers to a logical detection layer formed based on the collected data of a single type of sensor, and each sensor corresponds to a data collection node in the detection layer. For example, the collected data of all temperature sensors forms a temperature single-point detection layer, and the collected data of all infrared human body sensors forms an infrared single-point detection layer.
[0029] In this embodiment, the detection type refers to the detection parameter category corresponding to the sensor, including temperature detection, humidity detection, human presence detection, smoke detection, light intensity detection, sound decibel detection, etc.
[0030] In this embodiment, the communication channel refers to a path in the preset area for the flow of personnel, airflow, signals, etc., such as the sliding door channel between the living room and the balcony, the door hole channel between the kitchen and the dining room, the channel between the bedroom and the corridor, etc.
[0031] In this embodiment, the flow situation refers to the frequency of personnel passing through the communication channel, the intensity of airflow flowing, the signal transmission status, etc., for example, the daily passing frequency of the living room and balcony channel is 20 times, and the airflow flowing intensity of the kitchen and dining room channel is 0.3 m / s.
[0032] The non-deployed sensor position point refers to a physical location in the preset area that does not have a sensor installed but needs to obtain its environmental parameters, such as the area in the middle of the living room where no temperature sensor is deployed, and the corner position of the wardrobe in the bedroom.
[0033] In this embodiment, the complete detection layer refers to a logical detection layer formed by fusing the measured data of the deployed sensors and the predicted data of the non-deployed sensor position points, covering the entire range of the preset area, such as the temperature complete detection layer covering the temperature parameters of all positions in the living room, including sensor measured values and non-deployed point predicted values.
[0034] Global analysis refers to the process of comprehensive processing and correlation analysis of the complete detection layer data of all types of sensors, combined with the spatial characteristics and equipment characteristics of the preset area, to mine the correlation between data and the change rule.
[0035] The initial control scheme refers to the basic control scheme obtained through global analysis without adjusting the user's individual needs, which includes the preliminary action instructions and execution parameters of smart home devices, such as the initial setting temperature of the air conditioner being 24℃ and the initial setting brightness of the light being 80%.
[0036] The regional scene refers to a specific use scenario formed in the preset area according to the user's activity state, time period, etc., such as the sleep scene in the bedroom, the viewing scene in the living room, and the cooking scene in the kitchen.
[0037] User demand refers to the personalized requirements of users for preset regional environmental parameters and equipment operating states, including comfort demand, energy saving demand, health demand, and use habit demand, etc., for example, the user requires that the temperature be kept at 22±1℃ and the light be in a low blue light mode in a sleep scene.
[0038] The intelligent control scheme refers to the final control scheme that can be directly executed after the regional scene adaptation and user demand adjustment, and can accurately match user demand and environmental changes, for example, the air conditioner is set to 22℃ and the wind speed is level 1, the light is turned on in a low blue light mode and the brightness is 30%.
[0039] Smart home refers to a home device with intelligent control function, including air conditioners, lights, curtains, range hoods, fresh air systems, and smart door locks, etc., such as variable frequency air conditioners, LED intelligent lamps, and electric curtains.
[0040] In the embodiment, in a 100 square meter residential scene (including a living room, a bedroom, a kitchen, and a bathroom), the parameter prediction accuracy of the present application without deploying sensor position points is 93%, which is 28% higher than the prior art of 65%; the delay of the control scheme of the present application from data acquisition to instruction issuance is 325ms, which is 35% lower than the prior art of 500ms; the daily average energy consumption of the present application is 4.6kWh, which is 12% lower than the prior art of 5.2kWh, and at the same time, the user comfort score is 86 points (full score 100), which is 15% higher than the prior art of 75 points.
[0041] The above technical scheme has the beneficial effects that: through the complete process of sensor deployment-communication topology construction-detection layer construction-control scheme generation and adjustment, the full-link optimization of smart home control is realized, the problems of traditional schemes such as incomplete coverage and inaccurate control are effectively solved, the adaptability of the control scheme and the reliability of the environmental data are improved, the environmental changes and user demand can be quickly responded to, and more comfortable and convenient smart life experience is provided for users. At the same time, the present application can be deeply connected with an industrial cloud platform, and with the help of the high computing power, massive storage, and remote collaboration capabilities of the platform, unified data management and collaborative control of multiple preset regional smart home systems are realized: on the one hand, the industrial cloud platform can provide a cross-regional sensor deployment optimization case library and an environmental data diffusion model library, further improving the scientific nature of sensor deployment and the parameter prediction accuracy of non-deployment points; on the other hand, the platform supports remote iterative upgrading and multi-scene data sharing of the control scheme, combines with industry-level user demand big data, continuously optimizes the universality and personalized adaptation ability of the control scheme, simultaneously realizes the linkage of home systems and industrial-level data ecology, and expands the application boundary of intelligent control.
[0042] The present application provides a control method of smart home based on Internet of Things, according to the regional structure of the preset region, a plurality of groups of sensors are deployed, comprising: determining a use action of each region position based on a historical use database of the preset region, and constructing an action distribution matrix, wherein the use action comprises at least one demand action of an output of a different user at a corresponding region position, and the demand action is a true action, a false action or a fuzzy action associated with a user identity label and an action time sequence; determining a trigger probability of each region position according to a demand type set of each demand action in the action distribution matrix, and setting a first deployment quantity to the corresponding region position; adjusting the first deployment quantity according to a region structure particularity existing in each region position and dynamic structure change data to obtain a second deployment quantity, and realizing deployment of multiple groups of sensors.
[0043] In this embodiment, the historical use database is a database for storing use behaviors of different users, device operation records and sensor trigger history in the preset region, such as storing data of a temperature adjustment action of user A in a bedroom, a light turning-on action of user B in a living room and the like in 30 days, and storing the data to a MySQL database through operation logs of a smart home terminal APP and a smart sound box and sensor trigger logs, and a storage period is set to 90 days.
[0044] In this embodiment, the region position is a specific functional position further subdivided in the preset region, such as a sofa area and a television area in the living room, and a bedside area in the bedroom, and the region position is divided by means of a house type drawing digitization tool and in combination with space measurement data of a laser range finder.
[0045] In this embodiment, the use action is a demand action of an output of a different user at a corresponding region position, associated with a user identity label and an action time sequence, such as a temperature adjustment action of user A in a bedside area of a bedroom at 22:00 associated with an adult identity label, which is: the action time sequence is temperature adjustment→light turning-off, and the action information is collected through terminal operation records and sensor state change data; the user identity label is an identification for distinguishing different users, such as adult user A and child user B, and the corresponding identity label is bound through a smart home terminal account.
[0046] In this embodiment, the action time sequence is a time sequence of a use action, such as a time sequence of user A performing temperature adjustment of an air conditioner and then performing light turning-off, and the time stamp of each action is recorded and associated in sequence; the true action is an action of a user explicitly reflecting a real demand, such as an action of user A actively adjusting a temperature of a bedroom to 22℃ before going to bed; the false action is a false action of a user without actual demand, such as an action of user B mistakenly touching a light switch in a living room; and the fuzzy action is an action of a user with unclear intention, such as an action of user A adjusting light brightness in a living room for three times in a short time.
[0047] In this embodiment, the action distribution matrix is a carrier for presenting the association of the three of area orientation, user identity, and use action and the action occurrence frequency in the form of a matrix. For example, the matrix rows represent area orientations, the columns represent user identities, and the matrix elements are the action occurrence frequencies of the corresponding users in the areas. The data of the historical use database is statistically analyzed by using a Python data analysis tool to generate the matrix.
[0048] In this embodiment, the demand type set is a set formed by classifying the user demands corresponding to the use actions. For example, the comfort demand corresponding to the action of adjusting the air conditioner temperature and the safety demand corresponding to the action of turning on the smoke alarm. The use actions are classified into corresponding demand types by manual annotation combined with a machine learning algorithm.
[0049] In this embodiment, The unit is % / day, and the number of statistical days is generally 30, which is representative of the data.
[0050] In this embodiment, The first deployment number wherein, is the area orientation area; is the basic deployment density; is the upward rounding symbol.
[0051] In this embodiment, the second deployment number wherein, a is a structure influence coefficient, and the value range is 0.2 to 0.5. For example, the value in the dense shelter area is 0.5, and the value in the unsheltered area is 0.2.
[0052] In this embodiment, the area structure particularity is a special physical structure in the area orientation that affects the detection effect of the sensor, such as a wardrobe in the bedside area of a bedroom and an electromagnetic interference source in a kitchen area. The area orientation is scanned by a laser radar, and the special structure is identified in combination with a house type diagram.
[0053] In this embodiment, the collection and processing scheme of dynamic structure change data is as follows: 1. Sensor selection: Intel RealSense D455 RGB-D vision sensor is used, which is deployed in the corner of the ceiling of the preset area (at least one per 20 square meters), the collection frequency is set to 1 time / minute, the resolution is 1280*720, and color image and depth information can be obtained simultaneously; 2. Data processing algorithm: YOLOv8 target detection algorithm is used to process the collected image data, first the pre-trained model (based on COCO dataset training) is used to identify furniture (sofa, wardrobe, dining table, etc.), door and window structure targets, and then the spatial coordinates of the targets are calculated through the depth information, and the coordinate data of adjacent two times is compared to judge whether there is structure change (such as sofa moving, door and window opening and closing); 3. Trigger condition: when the coordinate change of a structure target is greater than 10% (such as the original position coordinate of the sofa is (2, 3) m, and the changed coordinate is (2.5, 3) m, the change is 25%), it is determined that there is dynamic structure change, and the re-computation of the number of sensor deployments is triggered (i.e. adjusting the second deployment number based on the new structure data); 4. Data storage: the dynamic structure change data is stored in the local database of the edge node in the format of timestamp-region orientation-change target-coordinate change, and the retention period is 7 days, which is used for subsequent sensor deployment optimization.
[0054] The beneficial effects of the above technical scheme are: constructing an action distribution matrix based on historical use data, preliminarily determining the number of sensor deployments combined with demand types and trigger probabilities, and adjusting the number of deployments according to the static particularity and dynamic change of the regional structure, so that the sensor deployment can accurately match the user demand and environmental characteristics of the preset area, avoid the problems of redundant sensor resources or insufficient deployment in key areas, and improve the pertinence and effectiveness of subsequent environmental data collection, laying a data foundation for accurate implementation of intelligent home control method.
[0055] The application provides a control method for intelligent home based on Internet of Things, which constructs a communication topology network of multiple groups of sensors and edge nodes, comprising: Real-time collection of transmission parameters of candidate links of sensors-edge nodes in a preset area, working state and dynamic priority of each group of sensors, resource state of edge nodes, spatial communication attenuation parameters constructed by regional structure and interference parameters of the preset area, determination of multi-dimensional data set of corresponding candidate links; Training a neural network model based on the multi-dimensional data set, and classifying the connection quality probability of each candidate link, wherein the classification includes: high-quality transmission, load-adaptive transmission or unsuitable transmission; Based on the classification output result, a reward function is set to each candidate link, and a reinforcement learning model is embedded, with the core goal of maximizing the total reward value of the topology, dynamically generating the connection relationship between each group of sensors and edge nodes, and constructing the communication topology network.
[0056] In this embodiment, the candidate link refers to the transmission path that the sensor and the edge node can establish a communication connection, including a direct transmission path, a transmission path relayed through other sensors, etc., such as a direct wireless transmission path of temperature sensor A and the edge node, a relayed transmission path of temperature sensor A through humidity sensor B and the edge node.
[0057] In this embodiment, the transmission parameter refers to a performance index parameter for data transmission of the candidate link, reflecting the transmission quality of the link, including signal strength, bit error rate, packet loss rate, transmission delay, etc., such as a signal strength of-65dBm, a bit error rate of 0.2%, a packet loss rate of 0.5%, and a transmission delay of 20ms for a certain candidate link.
[0058] The working state refers to the running state of the sensor, including normal working state, low power state, fault state, weak signal state, etc., such as the temperature sensor being in normal working state, and the infrared sensor being in low power state (battery power remaining 20%).
[0059] The dynamic priority refers to the priority level dynamically adjusted according to the functional importance of the sensor, the working state, the data urgency, etc., used to determine the priority order of data transmission, such as the dynamic priority of the smoke sensor being the highest level and the dynamic priority of the ambient light sensor being the ordinary level.
[0060] The resource state refers to the hardware resource occupation of the edge node for data processing, storage, and transmission, including CPU usage, memory occupation, storage remaining space, network bandwidth occupation, etc., such as the CPU usage of the edge node being 30%, the memory occupation being 40%, the storage remaining space being 10GB, and the network bandwidth occupation being 25%.
[0061] The interference parameter refers to the external interference factor related parameter affecting the signal transmission of the candidate link, including electromagnetic interference intensity, obstacle shielding degree, other wireless signal interference, etc., such as the electromagnetic interference intensity of a certain candidate link being and the obstacle shielding degree being 30%.
[0062] In this embodiment, the spatial communication attenuation parameter , wherein, is the total communication attenuation parameter; is the reference distance attenuation, fixed at 40dB, corresponding to the attenuation when d0=1m; n0 is the path loss index, taking the value of 2.4, suitable for indoor environment; d is the actual distance between the sensor and the edge node; is the material attenuation increment.
[0063] In this embodiment, the attenuation increment is shown in Table 1: Table 1 Material attenuation increment table
[0064] It should be noted that in actual application, if the material not covered in the table is encountered, the rule of increasing 2dB per increase of material density is used for calculation.
[0065] In this embodiment, the signal strength tester and the network performance monitoring tool are used to collect the transmission parameters of the candidate link in real time, including signal strength, bit error rate, packet loss rate, and transmission delay, and the collection interval is set to 1 second; the state detection module built-in the sensor is used to obtain the working state, such as the battery voltage detection circuit to judge the power state, based on the importance of the sensor function, such as the priority of the security sensor is higher than that of the environmental monitoring sensor and the urgency of the data, the weighted scoring method is used to dynamically calculate the priority; the system monitoring tool of the edge node is used to collect the resource state, including CPU usage, memory occupancy, etc., and the collection interval is set to 1 second; the electromagnetic interference tester and the laser range finder are used to obtain the interference parameters and the regional structure data, and the spatial communication attenuation parameters are calculated combined with the wireless signal transmission attenuation model, such as the logarithmic distance path loss model; the above multi-dimensional data is classified and integrated according to the candidate link, the abnormal values are removed to construct a multi-dimensional data set, and the CSV format is used for storage. The multi-dimensional data set is divided into a training set (70%), a validation set (15%), and a test set (15%), the training set is used for model parameter training, the validation set is used for adjusting the model hyperparameters, and the test set is used for evaluating the model performance; the improved MobileNet neural network is selected as the classification model, the normalized parameters of the feature vector of the multi-dimensional data set, such as signal strength, bit error rate, and resource state, are input, and the connection quality probability is output; the probability threshold of high-quality transmission is set to 80%, and the probability threshold of load adaptive transmission is set to 60%, the model judges the connection quality probability of each candidate link, and outputs the classification result, i.e. high-quality transmission, load adaptive transmission, or unsuitable transmission; the classification accuracy of the model is verified through the test set, and when the accuracy is ≥90%, the model training is completed and put into use.
[0066] In this embodiment, the reward function is set based on the classification result, and the reward function formula is Q=w1×(1-bit error rate)+w2×(1-packet loss rate)+w3×(1-transmission delay normalization coefficient)+w4×(1-edge node CPU usage)+w5×dynamic priority normalization coefficient, wherein w1-w5 are weight coefficients, and the sum is 1, which can be adjusted according to the actual scene, such as w1=0.2, w2=0.2, w3=0.2, w4=0.2, w5=0.2.
[0067] In this embodiment, the high-quality transmission refers to the connection quality probability reaching a preset high threshold (such as ≥ 80%), and the link state capable of realizing low-delay, low-packet-loss, and high-reliability data transmission, for example, a transmission state with a transmission delay ≤ 30 ms and a packet loss rate ≤ 1%.
[0068] The load-adaptive transmission refers to the connection quality probability reaching a preset adaptive threshold (such as ≥ 60%), and the link state capable of adapting to the current resource load of the edge node to ensure effective data transmission, for example, a state capable of stably transmitting data when the CPU usage of the edge node is ≤ 50%.
[0069] The reinforcement learning model refers to a machine learning model used for dynamically optimizing the connection relationship between the sensor and the edge node, and constantly adjusts the strategy through interaction with the environment to maximize the total reward value, such as a deep Q network (DQN) model or a Q-learning model.
[0070] The total reward value of the topology refers to the sum of the reward values corresponding to all the connection links established between the sensors and the edge nodes, and reflects the overall advantages and disadvantages of the communication topology network; the higher the total reward value, the better the transmission quality and resource adaptability of the topology network.
[0071] The connection relationship refers to the communication connection mode between the sensor and the edge node, including that the sensor directly connects the edge node, the sensor connects the edge node through a relay node, and the like, such as that a temperature sensor A directly connects an edge node and a humidity sensor B connects the edge node through the temperature sensor A.
[0072] The above technical solution has the beneficial effects that: by constructing a multi-dimensional data set and a neural network classification model, the connection quality of the candidate link is accurately evaluated, the reinforcement learning model is combined to realize dynamic optimization of the communication topology network, the topology structure can adapt to changes in the link transmission quality, the sensor priority, and the edge node resource state, the reliability and efficiency of data transmission are improved, the transmission delay and the packet loss rate are reduced, and stable data transmission support is provided for subsequent data analysis and control scheme generation.
[0073] The application provides a control method for an intelligent home based on an Internet of Things, and a single-point detection layer is constructed based on each sensor, including: Based on the spatial structure parameters of the sensor deployment area, at least one environment interference diffusion difference sub-area is divided by referring to preset environment parameter diffusion characteristics, and the influence coefficient of the environment interference of each sub-area on the environment data is quantified; A preset environment data diffusion function list is called to calculate the diffusion deviation amount of the environment data of the edge of the sub-area, and the corresponding environment data is compensated and corrected based on the diffusion deviation amount. The compensated and corrected data is timestamp aligned and standardized in format, and based on an attention mechanism, features corresponding to key environmental events are amplified to generate a high-dimensional feature vector that integrates space and environment; Based on the straight-line distance between the sensor and the preset key monitoring point, and the distribution density of the surrounding sensors of the same type, a spatial correlation representation coefficient of the corresponding data is quantified. The spatial correlation representation coefficient and the high-dimensional feature vector are input into a lightweight neural network model, and at the same time, the parameters corresponding to the environmental data diffusion function are embedded to simulate the spatial diffusion law of environmental parameters, and event detection and classification are completed. The event classification confidence output by the model is weighted and fused with the spatial correlation representation coefficient to obtain a spatial-confidence composite coefficient. Based on the influence coefficient, the spatial-confidence composite coefficient, and the physical location of the corresponding sensor, the current weight of the corresponding sensor is determined. A first interval duration is set for sensors with a current weight greater than or equal to a preset weight, and a second interval duration is set for sensors with a current weight less than the preset weight, wherein the second interval duration is greater than the first interval duration. Based on the current weight and the corresponding interval duration, a single-point detection layer at the logical level is constructed for each type of sensor, wherein the single-point detection layer is a dynamic data network with a weight mark and a corresponding interval duration.
[0074] In this embodiment, the spatial structure parameters refer to the physical space characteristic parameters of the sensor deployment area, including the area, wall position and thickness, door and window size, furniture placement position and size, passage width, etc. For example, the area of the living room is , the wall thickness is 20 cm, and the passage width is 1.2 m.
[0075] The environmental parameter diffusion characteristic refers to the inherent law of the propagation and diffusion of environmental parameters such as temperature, humidity, and smoke in space, including diffusion rate, attenuation coefficient, and propagation direction dependence, etc. For example, the diffusion rate of temperature is 0.5 m / s, and the diffusion attenuation coefficient of smoke is 0.1 / m.
[0076] The environmental interference diffusion difference sub-area refers to a sub-area with different degrees of influence on data according to the spatial structure parameters and the environmental parameter diffusion characteristics, such as the kitchen oil smoke diffusion sub-area, the living room air conditioner wind diffusion sub-area, and the bedroom quiet sub-area.
[0077] The influence coefficient refers to a parameter that quantifies the degree of influence of environmental interference on the accuracy of environmental data, with a value range of 0-1. The larger the coefficient, the greater the influence of the interference. For example, the influence coefficient of the oil smoke diffusion sub-area is 0.7, and the influence coefficient of the quiet sub-area is 0.1.
[0078] The environmental data diffusion function list refers to a collection of diffusion calculation functions corresponding to different environmental parameters (temperature, humidity, smoke, etc.), used to calculate the diffusion changes of environmental data in space. For example, the temperature diffusion function is a Gaussian diffusion function, and the smoke diffusion function is an exponential decay function.
[0079] The diffusion deviation refers to the difference between the measured value and the true value of environmental data at the edge of a sub-region due to diffusion effects. For example, the temperature measurement at the edge of a sub-region is 25°C, and the true value is 24°C, with a diffusion deviation of 1°C.
[0080] The compensation correction refers to the adjustment of environmental data based on the diffusion deviation to eliminate errors caused by diffusion effects, making the data closer to the true value. For example, subtracting the diffusion deviation of 1°C from the measured value of 25°C gives the temperature value of 24°C after compensation correction.
[0081] Timestamp alignment refers to synchronizing and matching environmental data collected by different sensors according to the collection time to ensure consistency in the time dimension. For example, align the data collected by temperature sensor 1 at 10:00:01 with the data collected by humidity sensor at 10:00:01.
[0082] Format standardization refers to converting the collected data of different types of sensors into a unified data format (such as numerical range, unit, storage format) to facilitate subsequent processing. For example, all temperature data is converted to Celsius (℃) with one decimal place and stored as a floating-point number format.
[0083] Attention mechanism refers to an algorithm mechanism that can automatically identify and highlight key information while suppressing redundant information. In data processing, it is used to amplify the feature data corresponding to key environmental events, such as amplifying the feature data corresponding to smoke concentration exceeding events.
[0084] Key environmental events refer to environmental state change events that have a significant impact on smart home control, including temperature exceeding, smoke concentration anomaly, human intrusion, humidity anomaly, etc. For example, events where smoke concentration exceeds 0.3 mg / m³ or temperature exceeds 28°C.
[0085] The spatial-environmental fusion high-dimensional feature vector refers to a high-dimensional data vector formed by fusing spatial structure features, environmental data features, diffusion compensation features, etc. It can comprehensively reflect the environmental state and spatial characteristics, such as a feature vector containing temperature value, humidity value, diffusion deviation, influence coefficient, etc.
[0086] The pre-set key monitoring point refers to a physical location in the pre-set area that needs to be monitored, usually an area that is sensitive to environmental changes, has frequent user activities, or has high safety risks, such as the bedside location in the bedroom, the area near the kitchen stove, and the entrance location in the living room.
[0087] Linear distance refers to the linear spatial distance between the sensor and the preset key monitoring point. For example, if a temperature sensor is located beside the sofa in the living room, the linear distance between the sensor and the key monitoring point (the entrance of the living room) is 3 m.
[0088] Distribution density refers to the number of sensors of the same type deployed per unit area, reflecting the degree of sensor density. For example, if the area of the living room is 20 m2 and three temperature sensors are deployed, the distribution density is 0.15 sensors / m2.
[0089] In this embodiment, the spatial correlation characteristic coefficient wherein, is the linear distance between the sensor and the key monitoring point; is the maximum monitoring distance; is the distribution density of sensors of the same type; is the maximum distribution density.
[0090] In this embodiment, the lightweight neural network used by the present application is improved based on the MobileNetV3-Small version. The improvement focuses on spatial feature extraction capability and inference speed optimization, specifically including: 1. Convolution layer improvement: replace the 3x3 convolution kernel of the original network 3rd layer and 5th layer with a 5x5 depth separable convolution kernel, which improves the extraction accuracy of environmental parameter spatial distribution features, and reduces the parameter amount through grouped convolution (each group of convolution kernel number is reduced by 40%); 2. Attention module addition: insert a Squeeze-and-Excitation (SE) attention module before the fully connected layer, and the module weight calculation formula is wherein, Favg is the global average pooling result of the feature map, W1 is the dimension compression fully connected layer weight (input dimension 512→output dimension 64), W2 is the dimension recovery fully connected layer weight (input dimension 64→output dimension 512), is the ReLU activation function, is the sigmoid activation function, which amplifies the feature weight of key environmental events (such as temperature mutation and personnel intrusion) through the module; 3. Parameter amount and inference speed: after improvement, the network parameter amount is reduced from the original MobileNetV3-Small of 1.5M to 1.2M, and the inference speed on the edge node (equipped with ARMCortex-A53 processor) is improved from 30ms / frame to 24ms / frame, meeting the real-time detection requirements. During model training, the Adam optimizer is used, the initial learning rate is 0.001 (decreased by 10% every 10 rounds), the loss function is cross-entropy loss, and the training iteration number is set to 200 rounds. When the validation set accuracy does not improve for 10 consecutive rounds, stop training.
[0091] In this embodiment, event detection refers to the process of analyzing data through the model to determine whether a preset key environmental event occurs, such as determining whether a temperature exceeds a standard, smoke concentration is abnormal, etc.
[0092] Event classification refers to the process of classifying the detected key environmental event into types, such as classifying the event into a temperature exceeding a standard, humidity being abnormal, smoke concentration being abnormal, etc.
[0093] Event classification confidence refers to the reliability evaluation value of the model for the event classification result, with a value range of 0-1, and the higher the confidence, the more reliable the classification result, such as the model determining that the confidence of a certain event being a smoke concentration abnormal event is 0.92.
[0094] In this embodiment, Space-confidence composite coefficient , wherein, is the event classification confidence.
[0095] In this embodiment, the current weight , wherein, β is an environmental interference influence coefficient, with a value range of 0.1 to 0.7, and the value in a strong interference area is 0.7 and the value in a weak interference area is 0.1.
[0096] In this embodiment, Collection interval , wherein, T1 is the first interval length, T2 is the second interval length, k is the interval multiple, the default value is 2, 0.6 is the preset weight, and is based on the detection accuracy comparison experiment under 10 different house type scenes.
[0097] The beneficial effects of the above technical solution are: by dividing the environmental interference diffusion difference sub-region and performing compensation correction, the influence of spatial diffusion and environmental interference on data is eliminated, the effectiveness and reliability of data features are improved by combining attention mechanism and spatial correlation analysis, the system energy consumption is reduced while ensuring the real-time of key data by adjusting the dynamic weight and collection interval, the data quality of the single-point detection layer is higher and the adaptability is stronger, which provides high-quality data support for the construction of a complete detection layer.
[0098] The present application provides a control method for an intelligent home based on the Internet of Things, which performs diffusion analysis on the position points of non-deployed sensors on the single-point detection layer to obtain a complete detection layer for each sensor, comprising: Predefining corresponding parameter diffusion adaptation attributes for the detection type of each sensor, and at the same time, collecting flow data of each connected channel in a preset area to quantitatively obtain flow characteristic parameters, including flow intensity, flow frequency and flow direction; Training a machine learning model adapted to the detection type to obtain diffusion prediction weights of non-deployed sensor position points; based on the diffusion prediction weight, dividing the non-deployed sensor position points into a core diffusion area and an edge diffusion area; For the non-deployed points in the core diffusion area, the environmental parameters of the core non-deployed points are predicted in combination with the flow direction and intensity of the connected channel. Meanwhile, for the non-deployed points in the edge diffusion area, the predicted parameters of the core diffusion area are attenuated and corrected based on the diffusion adaptation properties of the detection type and in combination with the distance to the nearest deployed sensor, so as to obtain the environmental parameters of the non-deployed points in the edge area and obtain a complete detection layer.
[0099] Preferably, the input of the machine learning model is the measured data of the deployed sensors in the single-point detection layer, the diffusion adaptation properties of the corresponding detection type, and the flow feature parameters of the connected channel around the corresponding sensor, the output is the diffusion prediction weight of the non-deployed sensor position points, and the diffusion prediction weight is positively correlated with the flow intensity of the connected channel and negatively correlated with the diffusion attenuation properties of the detection type.
[0100] In this embodiment, the parameter diffusion adaptation property refers to a property corresponding to the sensor detection type and reflecting the diffusion characteristics of the environmental parameters, including diffusion rate, diffusion attenuation property, diffusion direction dependence, etc. For example, the parameter diffusion adaptation property of the temperature detection type is a diffusion rate of 0.5 m / s and a diffusion attenuation property of 0.1 / m; the parameter diffusion adaptation property of the infrared human body detection type is a diffusion attenuation property of 0.3 / m and a strong direction dependence.
[0101] The flow data refers to the original data reflecting the flow situation in the connected channel, including personnel passing records, air flow velocity measurement data, signal transmission quality data, etc., such as personnel passing video records of the connected channel, real-time air flow velocity measurement values.
[0102] The flow feature parameter refers to a parameter obtained by quantitatively processing the flow data, which is used to characterize the flow situation of the connected channel, including flow intensity, flow frequency, flow direction, etc., such as a flow intensity of 0.4 m / s, a flow frequency of 20 times / day, and a flow direction from the kitchen to the dining room.
[0103] The flow intensity refers to the intensity of the flow of people, air flow, or signal in the connected channel, for example, a personnel flow intensity of 0.5 person / minute and an air flow flow intensity of 0.3 m / s.
[0104] The flow frequency refers to the number of flow events, such as personnel passing and air flow switching, in the connected channel, for example, a daily personnel passing frequency of 30 times and an air flow direction switching frequency of 5 times / day.
[0105] The flow direction refers to the direction of personnel passing, air flow flowing, or signal transmission in the connected channel, for example, personnel passing from the living room to the balcony and air flowing from the dining room to the kitchen.
[0106] The machine learning model refers to a model for predicting the non-deployed sensor location point diffusion prediction weight, which has the ability to learn the law from data and make predictions, such as gradient boosting tree model and random forest model.
[0107] The diffusion prediction weight refers to the weight value output by the machine learning model for evaluating the degree of influence of the non-deployed sensor location point on the connectivity channel flow and the detection type diffusion characteristics, with a value range of 0-1. The higher the weight, the more the parameter prediction of the location point depends on the flow and diffusion characteristics. For example, the diffusion prediction weight of a certain non-deployed point is 0.8, The diffusion attenuation attribute refers to an attribute in the parameter diffusion adaptation attribute that reflects the degree of intensity attenuation of the environmental parameter in the diffusion process. The stronger the attenuation attribute, the faster the intensity decreases in the parameter diffusion process. For example, the diffusion attenuation attribute of the infrared detection type is 0.3 / m, which is stronger than the 0.1 / m of the temperature detection type.
[0108] The core non-deployed point refers to a non-deployed sensor location point in the core diffusion zone, such as a location point 30 cm away from the periphery of the connectivity channel without deploying a sensor.
[0109] The edge zone non-deployed point refers to a non-deployed sensor location point in the edge diffusion zone, such as a location point 1 m away from the connectivity channel without deploying a sensor.
[0110] The attenuation correction refers to the process of adjusting the intensity attenuation of the predicted parameters in the core diffusion zone based on the diffusion attenuation attribute of the detection type and the distance from the non-deployed point to the nearest deployed sensor, so that the predicted value is closer to the true value. For example, the predicted temperature in the core zone is 25℃, the distance from the non-deployed point in the edge zone to the nearest sensor is 2m, and the diffusion attenuation attribute is 0.1 / m. After attenuation correction, the temperature is 23℃.
[0111] In this embodiment, the machine learning model is trained and the diffusion area is divided, which specifically includes: The measured data of the deployed sensors in the single-point detection layer, the diffusion adaptation attribute of the corresponding detection type, and the flow characteristic parameters of the connectivity channel around the sensor are collected to construct a model training data set. A random forest model is selected as the machine learning model for detection type adaptation. The training data set is divided into a training set and a test set in a ratio of 7:3. The training set is used for model parameter training, and the test set is used for evaluating the model performance. The model input is the measured data of the deployed sensors, the diffusion adaptation attribute, and the flow characteristic parameters. The output is the diffusion prediction weight of the non-deployed point, which is positively correlated with the flow intensity and negatively correlated with the diffusion attenuation attribute. When the model prediction accuracy is ≥85%, the training is completed and the model is put into use. A preset diffusion threshold of 0.6 is set. The non-deployed points with a diffusion prediction weight >0.6 are divided into the core diffusion zone, and the non-deployed points with a diffusion prediction weight ≤0.6 are divided into the edge diffusion zone.
[0112] In this embodiment, Core diffusion zone non-deployment point parameter prediction wherein, is the flow time; is the adjacent deployment sensor measured value; is the flow intensity, unit m / s; is the detection type diffusion attenuation attribute, such as 0.1 / m for temperature and 0.3 / m for infrared.
[0113] In this embodiment, Edge diffusion zone non-deployment point parameter correction wherein, V2 is the edge zone non-deployment point environmental parameter; is the distance between the edge zone non-deployment point and the nearest sensor; is the core zone non-deployment point environmental parameter.
[0114] In this embodiment, the measured data of the deployed sensor and the predicted data of the non-deployment point are integrated, classified according to the sensor type, to form a complete detection layer covering the entire range of the preset area, and stored in the database of the edge node for subsequent global analysis.
[0115] The beneficial effects of the above technical solution are: based on the diffusion adaptation attribute of the detection type and the flow characteristics of the connected channel, the environmental parameters of the non-deployment sensor position point are accurately predicted through the machine learning model, the core and edge diffusion zones are divided and the differentiated prediction algorithm is adopted, the accuracy of the non-deployment point parameter prediction is improved, and the complete detection layer can comprehensively and reliably cover the preset area, providing complete environmental data support for the global analysis and control scheme generation.
[0116] The present application provides a control method of smart home based on Internet of Things, which performs global analysis on all complete detection layers to obtain an initial control scheme of the preset area, comprising: extracting the parameter disturbance features of each complete detection layer, traversing the parameter distribution of each detection layer along the spatial dimension of the preset area, and obtaining the feature disturbance map of the corresponding detection layer; based on the historical device control data of the preset area, combining the operation characteristics of the smart home device, and constructing the disturbance-control effective set of the complete detection layer; identify the dynamic scene label of the preset area, at the same time, based on the global sensitivity analysis method, quantize the sensitivity coefficient of each complete detection layer parameter to the device control effect, and combine the feature disturbance map and scene label to perform sensitivity-scenarization weighted correction on each detection layer parameter, and integrate the global sensitive adaptation detection data set based on the modal correlation of each detection layer; A multi-objective optimization function based on comfort, energy consumption, and control effectiveness is constructed and solved, wherein the global sensitive adaptation detection dataset is used as input and the effective threshold of the perturbation-control effective set introduced into the complete detection layer is used as constraint term; Based on the solution results, and by verifying the control effectiveness of the candidate solutions under parameter disturbance scenarios through a global effectiveness analysis method, the final output includes the action type, execution parameters and trigger timing of each smart home device.
[0117] In this embodiment, the complete detection layer is a logical detection layer that covers the entire range of the preset area. It includes the measured data of the deployed sensors and the predicted data of the non-deployed sensor locations. For example, the complete temperature detection layer covers the temperature values of all locations in the living room, including the measured 24°C in the sofa area and the predicted 23°C in the corner of the balcony. It integrates the measured sensor data and the predicted data obtained from diffusion analysis.
[0118] In this embodiment, the parameter perturbation feature is the fluctuation and change feature of environmental parameters in the complete detection layer, including perturbation amplitude, frequency, etc. For example, the temperature parameter fluctuates from 24℃ to 25℃ and then falls back to 24℃ within 10 minutes, with a perturbation amplitude of ±1℃ and a perturbation frequency of 0.1 times / minute. The parameter fluctuation data is extracted using the sliding window method (window duration is set to 10 seconds).
[0119] In this embodiment, the spatial dimension traversal is performed by accessing the parameter data of all location points in the complete detection layer one by one according to the spatial coordinates of the preset area (such as the x and y plane coordinates of the living room), and combining the spatial coordinate information of the floor plan to read the parameters of each location point in sequence.
[0120] In this embodiment, the feature perturbation map is a visual chart that intuitively presents the spatial distribution of parameter perturbation features, such as a heat map of temperature perturbation amplitude (red areas represent large perturbation amplitudes), which is generated using data visualization tools (such as Python's matplotlib library). The function of this step is to obtain the dynamic fluctuation characteristics of the parameters of each complete detection layer and present their spatial distribution patterns in a visual form.
[0121] In this embodiment, historical device control data is a record of past control operations of smart home devices within a preset area, including device action type, execution parameters, runtime, etc., such as the temperature setting record of an air conditioner for the past 30 days (150 hours of operation at 24℃, 80 hours of operation at 25℃). The device operation logs are collected and stored in a MySQL database.
[0122] In this embodiment, the operating characteristics are the inherent performance and limitations of smart home devices, such as the temperature adjustment range of an air conditioner being 16-30℃ and the response speed being 30 seconds (the time from the issuance of the command to the temperature change). Performance parameters are extracted from the device manual and entered into the system.
[0123] In this embodiment, the disturbance-control effective set is a set of parameter disturbance scenarios and corresponding effective control strategies, such as the effective control strategy corresponding to the temperature disturbance amplitude ±1°C is air conditioner temperature fine adjustment ±0.5°C, and a correlation rule mining algorithm (such as the Apriori algorithm) is used to analyze the corresponding relationship between parameter disturbance and control strategy in historical equipment control data.
[0124] In this embodiment, the dynamic scene label is a scene identification marked according to dynamic information such as environmental parameters and personnel states of a preset area, such as a viewing scene of a living room (personnel sitting still, weak ambient light) and a sleep scene of a bedroom (personnel still, quiet environment), and the scene is automatically marked by a visual sensor to identify the personnel state and combine a timestamp and environmental parameters.
[0125] In this embodiment, the global sensitivity analysis method is an analysis method for quantifying the influence degree of each parameter on the control effect, such as the Sobol method, which calculates the influence of parameter changes on the control effect with the help of a professional analysis tool.
[0126] In this embodiment, the sensitivity coefficient is a quantitative value of the influence degree of each complete detection layer parameter on the equipment control effect, such as the sensitivity coefficient of the temperature parameter is 0.8, which has a significant influence on the control effect, and the sensitivity coefficient of the humidity parameter is 0.3, which has a weak influence, and the fluctuation amplitude of the control effect is calculated when the parameter changes.
[0127] In this embodiment, the control effect is the degree to which the environmental parameters reach the target state after the smart home equipment executes the control operation, such as the compliance rate of reaching the preset interval after temperature adjustment.
[0128] In this embodiment, the sensitivity-scenarized weighted correction is to adjust the weight of the parameter according to the scene demand, such as increasing the weight of the temperature parameter to 0.9 and reducing the weight of the humidity parameter to 0.7 in the sleep scene, and the parameter weight is matched and adjusted according to the scene label.
[0129] In this embodiment, the modal correlation relationship is the internal correlation between different complete detection layers, such as the correlation between the temperature detection layer and the humidity detection layer (temperature rise will affect humidity change), and the Pearson correlation coefficient is used to analyze the correlation degree of each detection layer parameter.
[0130] In this embodiment, the global sensitive adaptive detection data set is a comprehensive data set integrating the sensitivity-scenarized weighted corrected data and the detection layer modal correlation relationship, and the corrected parameters are merged and structured according to the correlation relationship.
[0131] In this embodiment, comfort is the degree of physical comfort of the user in the preset area, related to parameters such as temperature and humidity, for example, when the temperature is 22-26℃ and the humidity is 40%-60%, the comfort score is 9 points (full score 10 points), and the score is calculated according to the matching degree of environmental parameters and the comfort interval.
[0132] Energy consumption is the electrical energy consumed by the smart home device to perform control operations, for example, an air conditioner consumes 1.2kWh of electricity for 1 hour of operation, which is calculated based on the device power and the running time.
[0133] Control effectiveness is the degree to which the control operation achieves the intended goal, for example, the compliance rate of temperature adjustment to reach the preset interval is 90%, and the number of times the environmental parameter meets the standard after control operation is counted.
[0134] In this embodiment, the multi-objective optimization function is where Sf is the comfort score normalized value, and Ee is the control effectiveness; wa, wb, and wc are weight coefficients, which are adjusted according to the actual scene, and wa+wb+wc=1, and the constraint condition is: where is the actual energy consumption of the device.
[0135] It should be noted that wa, wb, and wc are adjusted according to the area scene, where wa=0.5, wb=0.3, and wc=0.2 in the sleep scene, and wa=0.4, wb=0.3, and wc=0.3 in the viewing scene.
[0136] In this embodiment, the effective threshold is the critical value for judging the effectiveness of the control strategy, for example, the effective threshold of control effectiveness is 85%, which is a threshold preset based on historical data.
[0137] In this embodiment, the constraint term is a limiting condition for variables in the optimization solving process, for example, the device running energy consumption ≤1.5kWh / hour, which is added as a limiting condition in the optimization solving.
[0138] In this embodiment, the global effectiveness analysis method is a method for verifying the stability of the control scheme in the parameter fluctuation scenario, for example, the Monte Carlo simulation method, and the implementation means is to generate multiple parameter perturbation scenarios such as a sudden temperature increase of 2℃ and test the control scheme.
[0139] In this embodiment, the parameter perturbation scenario is a scenario in which the parameters of the complete detection layer fluctuate, for example, the humidity suddenly decreases by 10%, simulating the dynamic changes of environmental parameters.
[0140] In this embodiment, the candidate solution is a potential control scheme obtained by solving the multi-objective optimization function, for example, the air conditioner performs a cooling action, the temperature is set to 24℃, and the wind speed is set to level 2, and the control strategy is extracted from the optimization result.
[0141] In this embodiment, the action type is the control operation category of the smart home device, such as the refrigeration action of the air conditioner and the brightness adjustment action of the light, which is the function option of the corresponding device, and the execution parameter is the specific setting of the control action, such as the execution parameter of the air conditioner refrigeration action is the temperature 24℃ and the wind speed 2 level, which is the adjustable parameter of the device; the trigger timing is the time sequence of multiple device control actions, such as the new air system performs the air supply action 30 seconds after the air conditioner is turned on, which is the time interval of setting the action.
[0142] The beneficial effects of the above technical solution are: by extracting parameter perturbation features, constructing perturbation-control correlation, adapting dynamic scene and parameter sensitivity integration dataset, and then verifying the effectiveness in the parameter perturbation scene through multi-objective optimization, an initial control scheme is obtained which takes into account comfort, energy consumption and control stability, which not only improves the scientificity and adaptability of the control scheme, but also enhances its robustness in the environmental parameter fluctuation scene, providing high-quality foundation support for subsequent adjustment of intelligent control scheme combined with user demand.
[0143] The application provides a control method of smart home based on Internet of Things, which adjusts the smart control scheme according to the regional scene of the preset area and the user demand, comprising: Collecting the regional scene features of the preset area, the user demand quantization data, and the execution effect data of the historical smart control scheme, and constructing a dynamic correlation dataset of scene-demand-device control; Based on the dynamic correlation dataset, and by using a global sensitivity analysis method to quantify the influence weight of each user demand on the smart home device control parameter under different regional scenes, the device control parameter in the initial control scheme is adjusted.
[0144] In this embodiment, the regional scene feature is the information reflecting the scene state in the preset area, including the scene type such as the living room viewing scene and the bedroom sleeping scene, and the dynamic parameter such as the environmental light intensity in the viewing scene and the personnel activity density, which is identified by a visual sensor and light intensity data collected by a light sensor, and the scene type is labeled by a time stamp.
[0145] In this embodiment, the user demand quantization data is to convert the user's fuzzy demand into quantifiable parameter threshold, such as the user saying that the sleep is comfortable and quiet, which is quantified as temperature 22±1℃ and air conditioner wind speed≤1 level, which is quantified by the demand input module of the smart home terminal APP or the machine learning algorithm based on the user's historical operation behavior.
[0146] In this embodiment, the execution effect data of the historical smart control scheme is the device running parameter, the environmental change result and the user feedback of the past control scheme, such as the environmental temperature stabilizing at 24.5℃ and the user feedback being slightly hot after setting the air conditioner to 24℃ in a certain scheme, and the device running log and user score data of the terminal are collected.
[0147] In this embodiment, the dynamic association dataset of scene-demand-device control is a structured collection of the above three types of data, such as the association record of bedroom sleep scene + demand temperature 22℃'→ air conditioner set 22℃, air speed 1 level, and the data is stored in a MySQL database, and the dataset is updated every 7 days based on newly generated use data.
[0148] In this embodiment, the control parameter adjustment amplitude , wherein, is the user demand influence weight, the value range is 0 to 1, and the global sensitivity analysis is obtained as 0.9, is the basic adjustment amplitude; λ is the adjustment coefficient, and when , 2 is taken, when , 0.5 is taken, and the rest is 1.
[0149] The beneficial effects of the above technical solutions are: by constructing the dynamic association dataset of scene, demand and device control, combining the global sensitivity analysis to quantify the influence weight of demand on the control parameter, accurately adjusting the device parameters of the initial control scheme, making the control scheme adapt to the user's personalized demand in different regional scenes, and improving the adaptability of intelligent home control and user's living experience.
[0150] The application provides a control system of an intelligent home based on an Internet of Things, as shown in Figure 2 , comprising: A communication network construction module is configured to deploy multiple groups of sensors according to the regional structure of a preset area, construct a communication topology network of the multiple groups of sensors and edge nodes, and transmit environmental data of the preset area collected by the multiple groups of sensors to the edge nodes based on the communication topology network. A detection layer construction module is configured to perform data analysis on the received environmental data based on the edge nodes, construct a single-point detection layer based on each type of sensor, and perform diffusion analysis on the single-point detection layer to obtain a complete detection layer of each type of sensor according to the corresponding detection type and the flow condition of each connected channel of the preset area. A scheme generation module is configured to perform global analysis on all complete detection layers to obtain an initial control scheme of the preset area, adjust the initial control scheme according to the regional scene of the preset area and user demand to obtain an intelligent control scheme, and control the corresponding intelligent home of the preset area to perform a control operation.
[0151] The above technical scheme has the beneficial effects that: through the complete flow of sensor deployment-communication topology construction-detection layer construction-control scheme generation and adjustment, the full-link optimization of smart home control is realized, the problems of traditional schemes that coverage is not comprehensive and control is not accurate are effectively solved, the adaptability of the control scheme and the reliability of the environmental data are improved, the environmental changes and user needs can be quickly responded to, and more comfortable and convenient smart life experiences are provided for users.
[0152] Obviously, various modifications and changes can be made to the present application by those skilled in the art without departing from the spirit and scope of the application. Accordingly, it is intended that the present application embrace all such modifications and changes as fall within the scope of the claims and their equivalents.
Claims
1. A control method for smart homes based on the Internet of Things, characterized in that, include: Step 1: Deploy multiple sets of sensors according to the regional structure of the preset area, construct a communication topology network between the multiple sets of sensors and the edge nodes, and transmit the environmental data of the preset area collected by the multiple sets of sensors to the edge nodes based on the communication topology network. Step 2: Based on the edge node, perform data analysis on the received environmental data, construct a single-point detection layer based on each sensor, and according to the corresponding detection type and the flow of each connected channel in the preset area, perform diffusion analysis on the location points of the non-deployed sensor in the single-point detection layer to obtain the complete detection layer for each sensor. Step 3: Perform a global analysis on all complete detection layers to obtain the initial control scheme for the preset area, and adjust it according to the regional scene and user needs of the preset area to obtain an intelligent control scheme, and control the corresponding smart home in the preset area to perform control operations.
2. The control method for smart homes based on the Internet of Things according to claim 1, characterized in that, Multiple sets of sensors are deployed according to the regional structure of the preset area, including: Based on the historical usage database of the preset area, the usage actions of each area are determined and an action distribution matrix is constructed. The usage actions include at least one demand action output by different users in the corresponding area, and the demand action is a true action, a false action, or a fuzzy action that is associated with the user's identity tag and the action sequence. Based on the demand type set of each demand action in the action distribution matrix, determine the trigger probability of each region and set the first deployment quantity for the corresponding region. Based on the unique regional structure and dynamic structural change data in each region, the first deployment quantity is adjusted to obtain the second deployment quantity, thereby enabling the deployment of multiple sets of sensors.
3. The control method for smart homes based on the Internet of Things according to claim 1, characterized in that, Construct a communication topology network of multiple sensors and edge nodes, including: The system collects in real time the transmission parameters of candidate links between sensors and edge nodes within a preset area, the working status and dynamic priority of each group of sensors, the resource status of edge nodes, and the spatial communication attenuation parameters constructed from the regional structure and interference parameters of the preset area, and determines the multidimensional dataset of the corresponding candidate links. A neural network model is trained based on the multidimensional dataset to classify and output the connection quality probability of each candidate link. The classification includes: high-quality transmission, load-adaptive transmission, or unsuitable transmission. Based on the classification output, a reward function is set for each candidate link and embedded into the reinforcement learning model. With the goal of maximizing the total topological reward value, the connection relationship between each group of sensors and edge nodes is dynamically generated to construct the communication topology network.
4. The control method for smart homes based on the Internet of Things according to claim 1, characterized in that, Constructing a single-point detection layer based on each sensor, including: Based on the spatial structure parameters of the sensor deployment area and with reference to the preset environmental parameter diffusion characteristics, at least one sub-region with different environmental interference diffusion is divided, and the influence coefficient of environmental interference on environmental data in each sub-region is quantified. The system calls a preset list of environmental data diffusion functions to calculate the diffusion deviation of the environmental data at the edge of the sub-region, and then compensates and corrects the corresponding environmental data based on the diffusion deviation. The compensated and corrected data is time-stamp aligned and format standardized, and the features corresponding to key environmental events are amplified based on the attention mechanism to generate a high-dimensional feature vector of spatial-environment fusion. Based on the straight-line distance between the sensor and the preset key monitoring points, and the distribution density of similar sensors in the surrounding area, the spatial correlation characterization coefficient of the corresponding data is quantified. The spatial correlation characterization coefficients and the high-dimensional feature vectors are input into a lightweight neural network model. At the same time, the parameters corresponding to the environmental data diffusion function are embedded to simulate the spatial diffusion law of environmental parameters and complete event detection and classification. The event classification confidence score output by the model is weighted and fused with the spatial correlation characterization coefficient to obtain the spatial-confidence composite coefficient. Based on the influence coefficient, the spatial-confidence composite coefficient, and the physical location of the corresponding sensor, the current weight of the corresponding sensor is determined. A first interval duration is set for sensors whose current weight is greater than or equal to a preset weight, and a second interval duration is set for sensors whose current weight is less than a preset weight, wherein the second interval duration is longer than the first interval duration; Based on the current weights and corresponding interval durations, a single-point detection layer is constructed at the logical level for each type of sensor. The single-point detection layer is a dynamic data network with weighted labels and corresponding interval durations.
5. The control method for smart homes based on the Internet of Things according to claim 1, characterized in that, By performing diffusion analysis on the location points of the non-deployed sensors in the single-point detection layer, a complete detection layer for each sensor is obtained, including: For each sensor detection type, a corresponding parameter diffusion adaptation attribute is predefined. At the same time, the flow data of each connected channel in the preset area is collected and the flow characteristic parameters are quantified, including flow intensity, flow frequency and flow direction. Train a machine learning model that adapts to the detection type to obtain the diffusion prediction weights for non-deployed sensor location points; Based on the diffusion prediction weights, the locations of non-deployed sensors are divided into core diffusion zones and edge diffusion zones; For non-deployment points in the core diffusion zone, the environmental parameters of the core non-deployment points are predicted by combining the flow direction and intensity of the connecting channels. At the same time, for non-deployment points in the edge diffusion zone, the predicted parameters of the core diffusion zone are attenuated and corrected based on the diffusion adaptation attribute of the detection type and the distance to the nearest deployed sensor, so as to obtain the environmental parameters of the non-deployment points in the edge zone and obtain the complete detection layer.
6. The control method for smart homes based on the Internet of Things according to claim 5, characterized in that, The machine learning model is input to the measured data of the deployed sensors in the single-point detection layer, the diffusion adaptation attributes of the corresponding detection type, and the flow characteristic parameters of the surrounding connected channels of the corresponding sensor. The output is the diffusion prediction weight of the non-deployed sensor location point. The diffusion prediction weight is positively correlated with the flow intensity of the connected channel and negatively correlated with the diffusion attenuation attribute of the detection type.
7. The control method for smart homes based on the Internet of Things according to claim 1, characterized in that, A global analysis of all complete detection layers yields an initial control scheme for the preset region, including: Extract the parameter perturbation features of each complete detection layer, traverse the parameter distribution of each detection layer along the spatial dimension of the preset region, and obtain the feature perturbation map of the corresponding detection layer. Based on historical device control data of a preset area, and combined with the operating characteristics of smart home devices, a complete disturbance-control effective set for the detection layer is constructed. The system identifies dynamic scene labels in a preset area. Simultaneously, it quantifies the sensitivity coefficients of each complete detection layer parameter to the device control effect based on a global sensitivity analysis method. Furthermore, it combines the feature perturbation map and scene labels to perform sensitivity-scene-based weighted correction on each detection layer parameter. Finally, it integrates the modal correlation relationships of each detection layer to obtain a global sensitive adaptation detection dataset. A multi-objective optimization function based on comfort, energy consumption, and control effectiveness is constructed and solved, wherein the global sensitive adaptation detection dataset is used as input and the effective threshold of the perturbation-control effective set introduced into the complete detection layer is used as constraint term; Based on the solution results, and by verifying the control effectiveness of the candidate solutions under parameter disturbance scenarios through a global effectiveness analysis method, the final output includes the action type, execution parameters and trigger timing of each smart home device.
8. The control method for smart homes based on the Internet of Things according to claim 1, characterized in that, The intelligent control scheme is obtained by adjusting the settings according to the preset area's scenario and user needs, including: Collect regional scene characteristics and quantitative data of user needs in a preset area, and associate them with the execution effect data of historical intelligent control schemes to construct a dynamic correlation dataset of scene-demand-device control; Based on the dynamic association dataset, and by quantifying the influence weight of user needs on the control parameters of smart home devices in different regional scenarios through global sensitivity analysis, the device control parameters in the initial control scheme are adjusted.
9. A smart home control system based on the Internet of Things, characterized in that, include: The communication network construction module is used to deploy multiple sets of sensors according to the regional structure of a preset area, construct a communication topology network between the multiple sets of sensors and edge nodes, and transmit the environmental data of the preset area collected by the multiple sets of sensors to the edge nodes based on the communication topology network. The detection layer construction module is used to perform data analysis on the received environmental data based on the edge nodes, construct a single-point detection layer based on each sensor, and perform diffusion analysis on the location points of the single-point detection layer without deployed sensors according to the corresponding detection type and the flow of each connected channel in the preset area to obtain the complete detection layer for each sensor. The scheme generation module is used to perform a global analysis of all complete detection layers to obtain an initial control scheme for the preset area, and adjust it according to the regional scenario and user needs of the preset area to obtain an intelligent control scheme, thereby controlling the corresponding smart home devices in the preset area to perform control operations.