An intelligent door and window linkage control method based on multi-scene mode switching
Patent Information
- Application Number
- CN202511822815.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-05
- Publication Date
- 2026-09-04
- Estimated Expiration
- 2045-12-05
AI Technical Summary
[0003]传统的智能门窗控制技术主要存在以下几方面的不足:首先,传统技术往往缺乏对用户操作习惯的深入学习和分析,无法精准识别用户的个性化需求,导致控制策略缺乏针对性和灵活性;其次,传统技术在面对复杂多变的环境因素和用户行为时,难以实现动态调整,导致控制效果不理想,甚至出现误操作;此外,传统技术在数据存储和安全防护方面也存在明显短板,数据易丢失或被非法篡改,影响了系统的可靠性和安全性,具体来说,一些系统仅支持简单的定时开关功能,无法根据用户的实际使用场景进行智能调整;另一些系统虽然具备一定的学习功能,但由于算法模型和数据处理能力的限制,无法准确识别用户的行为模式和习惯变化,导致控制策略滞后或失效
一、该方法通过采集用户智能门窗的多维度历史操作数据,并利用改进门控机制的长短期记忆网络算法模型进行学习,能够精准识别用户的常规操作习惯及行为偏差特征,这种个性化的学习机制使得智能门窗能够根据不同用户的实际需求进行自动调整,提供更加贴心和便捷的使用体验,例如,系统能够根据用户的历史操作记录,在特定时间或环境下自动开启或关闭门窗,无需用户手动干预,大大提高了生活的便利性和舒适度。
Smart Images

Figure CN121364653B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart home control technology, specifically to a smart door and window linkage control method based on multi-scene mode switching. Background Technology
[0002] With the rapid development of smart home technology, users have put forward higher requirements for the comfort and convenience of their living environment. As an important part of the smart home system, the level of automation and intelligence of smart doors and windows directly affects the user's living experience.
[0003] Traditional intelligent door and window control technologies suffer from several shortcomings: First, they often lack in-depth learning and analysis of user operating habits, failing to accurately identify personalized user needs and resulting in a lack of targeted and flexible control strategies. Second, they struggle to dynamically adjust to complex and ever-changing environmental factors and user behaviors, leading to unsatisfactory control effects and even malfunctions. Furthermore, traditional technologies have significant weaknesses in data storage and security, making data susceptible to loss or illegal tampering, impacting system reliability and security. Specifically, some systems only support simple timed on / off functions and cannot intelligently adjust based on actual user scenarios; others, while possessing some learning capabilities, are limited by algorithmic models and data processing capabilities, failing to accurately identify user behavior patterns and habit changes, resulting in lagging or ineffective control strategies.
[0004] In view of the shortcomings of traditional intelligent door and window control technology, it is particularly important to propose an intelligent door and window linkage control method based on multi-scene mode switching. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of existing technologies and provide a smart door and window linkage control method based on multi-scene mode switching. This method can collect multi-dimensional historical operation data of the user's smart doors and windows and learn using an improved long short-term memory network algorithm model for door control mechanisms. It can accurately identify the user's regular operating habits and behavioral deviations, achieving personalized control. Furthermore, this method uses an improved K-means algorithm with a cluster center update formula to generate dynamic control strategies, which can dynamically adjust according to changes in actual scene type, environmental conditions, and user behavior, enhancing the system's adaptability and stability. In addition, a dual-partition redundancy design and segmented verification local storage module, along with a cloud server with end-to-cloud bidirectional encryption and biometric access control, form a dual data security mechanism, further ensuring the system's reliability and security.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a smart door and window linkage control method based on multi-scene mode switching, the specific steps of which are as follows: S1. Data processing and habit learning steps: Collect multi-dimensional historical operation data of users' smart doors and windows and preprocess it. Input the preprocessed data into a long short-term memory network algorithm model with an improved gating mechanism and online iterative optimization to learn users' regular operating habits and identify behavioral deviation characteristics. S2. Clustering and Strategy Generation: The routine operation habit data and behavioral deviation feature data output by the LSTM algorithm model are clustered using the K-means algorithm with an improved cluster center update formula to generate a dynamic control strategy of basic pattern + elastic offset that supports scene linkage adjustment. S3. Monitoring, Adjustment and Update: Real-time monitoring of users' manual adjustment operations on smart doors and windows. When three consecutive identical adjustments by the user that meet the conditions for scene consistency and amplitude stability are detected, the scene parameters are automatically updated and a confirmation prompt is pushed to the user. At the same time, scene-differentiated timeout processing and historical behavior consistency verification are performed. S4. Dual-Security Storage: User operation data, LSTM model data, and dynamic control strategy parameters are stored in a local storage module with dual-partition redundancy design and segmented verification, and synchronized to a cloud server that supports end-to-cloud bidirectional encryption and biometric access control, forming a dual data security mechanism.
[0007] Furthermore, the historical operation data in S1 includes at least six core dimensions: operation time, operation duration, operation start / stop trigger conditions, environmental parameters during operation, scene tag corresponding to the operation, and user feedback rating after the operation. Before inputting historical operation data into the LSTM model, data preprocessing is required, which includes three steps: The first step is outlier removal, using the 3σ criterion: calculate the mean and standard deviation of each data dimension. When the absolute value of the difference between a single data value and the mean of that dimension is greater than 3 times the standard deviation of that dimension, it is judged as an outlier and removed. The second step is continuous data normalization: for continuous data such as operation time, operation duration, outdoor temperature, and outdoor humidity, the Min-Max normalization method is used to uniformly map their numerical range to the [0, 1] interval. The specific calculation method is to subtract the minimum value of the data in that dimension from the single data value, and then divide by the difference between the maximum and minimum values of the data in that dimension, ensuring that continuous data of different magnitudes can adapt to the input requirements of the LSTM model. The third step is discrete data encoding: for discrete data such as operation start and stop trigger conditions, weather type, and scene label, one-hot encoding is used for format conversion. This method converts non-numerical discrete information into numerical signals that the model can recognize. In addition, to ensure that the user habits learned by the LSTM model are statistically significant, the preprocessed data sample size must meet two conditions: first, the continuous collection period is 30 days; second, the collection frequency is twice a day, and the collection time must correspond to the two typical operation periods in the morning and evening.
[0008] Furthermore, the LSTM algorithm model in S1 employs an improved gating mechanism, introducing scene-behavior association weights to enhance the recognition accuracy of behavioral deviation features. The formula is as follows: ,in For the conventional predicted loss term, The weighting coefficients for predicting loss range from 0.6 to 0.8 and are determined during the initial stage of model training using 5-fold cross-validation. Mean square error, User operation parameters predicted by the LSTM model. For actual user operation parameters, For scene deviation loss, This is the bias loss weighting coefficient. The weighting of operation time is determined based on the frequency of user operations at that time. For the scene The deviation between the user's actual operation and the basic scenario operation. For the scene The corresponding deviation baseline coefficient is determined by statistically analyzing the average deviation value of the previous 15 days under this scenario.
[0009] Furthermore, the LSTM algorithm model in S1 adopts an online iterative optimization mechanism. It does not need to remain fixed and can dynamically update parameters based on newly collected user operation data, continuously adapting to long-term changes in user habits. Iteration triggering conditions include: newly collected user operation data reaching a certain scale, users manually triggering the model update function, or user feedback scores for dynamic strategies failing to meet the satisfactory standard for several consecutive days. Parameter updates adopt an incremental learning approach, eliminating the need for retraining with all data. Model weights are adjusted only based on new data, avoiding resource waste. At the same time, the update rate is flexibly adapted according to the degree of habit deviation between new and historical data. After model iteration, it needs to undergo two verification steps: offline verification by comparing the prediction effect before and after iteration, and online trial operation by judging the optimization effect through user feedback scores in actual control scenarios. If either verification fails, a rollback mechanism is immediately triggered, restoring the model to the state before iteration and pushing a prompt to the user to ensure control stability.
[0010] Furthermore, the clustering analysis in S2 employs an improved K-means algorithm to achieve accurate separation between the base pattern and the elastic offset, as shown in the formula: ,in For the updated cluster centers, The weights for the routine operational data samples are determined based on the user feedback rating R corresponding to each sample. This is a sample of data from routine operations. The scene correlation coefficient, For bias operation data sample weights, This is a sample of data for deviation operations; The specific steps of the clustering process are as follows: First, determine the number of clusters K=2. The initial cluster centers are determined using the elbow rule, i.e., calculating the sum of squares within each cluster from K=1 to K=5. The value of K is 2 when the WCSS decreases sharply. Second, perform initial clustering assignment on more than 1000 valid data samples output by the LSTM, assigning samples to the clusters with closer proximity based on the Euclidean distance between the sample and the two cluster centers. Third, calculate the cluster center update using the cluster center update formula. The cluster centers are iteratively updated until the change in cluster centers is less than 0.01. After clustering, the mean of the basic pattern clusters is the basic pattern parameter, and the mean difference between each scene sample in the deviation feature cluster and the basic pattern is the elastic offset. The innovation of this clustering algorithm lies in the introduction of sample weights. , Correlation coefficient with scene This avoids the confusion between basic patterns and biased features caused by the traditional K-means algorithm treating all samples equally, ensuring that the clustering results can accurately match users' actual perception of common habits and scenario biases.
[0011] Furthermore, the elastic offset in S2 is not a fixed value, but is dynamically adapted through scene-linked adjustment logic. During the adjustment process, three core factors are comprehensively considered: scene type, environmental conditions, and user behavior habits. The system monitors the changes of these related factors in real time. When a significant change is detected in one or more factors that is sufficient to affect the user's actual needs for door and window operations, the elastic offset is immediately recalculated and updated. At the same time, an adjustment confirmation prompt is pushed to the user terminal, informing them of the adjusted door and window operation time. If the change in factors is small and has a negligible impact on the user's operational needs, the elastic offset is not updated temporarily to avoid frequent adjustments that may inconvenience the user. In addition, to prevent extreme combinations of factors from causing the elastic offset to exceed a reasonable range, the system presets upper and lower boundary thresholds for the offset. When the calculated offset exceeds the threshold, the boundary threshold is automatically used as the final adjustment basis to ensure that the door and window control strategy always fits the user's actual usage scenario, balancing flexibility and practicality.
[0012] Furthermore, in S3, the determination of a user making the same adjustment to the same control scenario three times consecutively requires meeting two core conditions: consistency of the adjustment scenario and stability of the adjustment amplitude. This eliminates interference from erroneous operations. Regarding the consistency of the adjustment scenario, it must be confirmed that all three adjustments belong to the same scenario tag. The criteria for determining the scenario tag include the date type of the adjustment, the environmental parameters at the time of the adjustment, and the corresponding operation type. All three must be completely consistent to be considered the same control scenario. Regarding the stability of the adjustment amplitude, the system first determines a reasonable standard for the effective adjustment amplitude based on the user's historical effective adjustment records. A single adjustment amplitude must reach this standard to be considered a valid adjustment; adjustments below this standard are considered erroneous operations and are not counted in the consecutive adjustment count. Simultaneously, the amplitude of the three valid adjustments must remain stable, with fluctuations controlled within a very small range, ensuring that the adjustment behavior is a conscious change in user habits rather than a random operation. Only when all three conditions—scenarios consistency, amplitude reaching the effective standard, and amplitude fluctuation meeting the stability requirement—are met can it be determined as three consecutive valid adjustments, thereby triggering the scenario parameter update process and improving the reliability and accuracy of system control.
[0013] Furthermore, the timeout handling mechanism in S3 after pushing parameter update confirmation prompts to users adopts a scenario-differentiated design, along with historical behavior consistency verification logic, to ensure the rationality of parameter updates and their matching degree with user intentions. The preset time setting is differentiated based on user device usage habits in different scenarios: during weekdays, users check their terminal devices more frequently, so the preset time is relatively short; on weekends, users may reduce device usage or delay checking information, so the preset time is correspondingly extended; on holidays, users are more likely to be out, further reducing device usage frequency, so the preset time is set to the longest, avoiding improper strategy updates due to users not checking in time. If the user does not provide any feedback within the preset time for the corresponding scenario, the system will not directly execute the parameter update, but will first update the parameters to be updated in accordance with the scenario. The system compares the user's actual operation records over a period of time. If the proposed updated parameters are consistent with most actual operations, it indicates that the update aligns with the user's potential habits, and the parameter update is completed automatically. If the consistency is low, it indicates that the user's recent operations have fluctuated, and the parameters are not updated for the time being. At the same time, a prompt is pushed to the user again with an extended feedback waiting time. The prompt clearly states that operation fluctuations have been detected, and asks the user to confirm whether an update is still needed. If the user clicks to modify and enters new parameters, the system treats the new parameters entered by the user as higher priority correction parameters, includes them in the deviation operation data category, and performs a new cluster analysis to generate a new elastic offset. Based on the new elastic offset, the system iteratively updates the dynamic control strategy, ensuring that the user's proactive adjustment needs can be accurately integrated into the system control logic, taking into account both user wishes and strategy continuity.
[0014] Furthermore, the local storage module in S4 adopts a dual-partition redundant storage design. Through hardware structure optimization and data verification mechanisms, it provides dual protection for the storage security and integrity of user operation data, LSTM model parameters, and dynamic control strategies. The local storage hardware uses an embedded NOR Flash chip, which is divided into two independent storage areas: a primary partition and a redundant partition. The storage capacity of both partitions can meet the continuous data storage requirements for at least 3 months. The primary partition is used to store various currently effective data and strategy parameters, while the redundant partition synchronizes all data in the primary partition in real time. The synchronization frequency is set to once per hour. If the data in the primary partition is updated, the synchronization process is triggered immediately to ensure the consistency of the data in the two partitions. Meanwhile, the redundant partition is equipped with a write protection mechanism, allowing only synchronous write data from the primary partition to be received, and does not support any direct modification operations, to prevent redundant data from being accidentally operated or damaged by failure. In terms of data integrity verification, a segmented verification method is adopted, dividing the stored data into several data segments of fixed size, and assigning different verification weights to each data segment according to its importance. The LSTM model weight parameter segment and the dynamic strategy parameter segment are given higher verification weights because they directly affect the system's operating accuracy, while the user operation history data segment is given a regular verification weight. Before reading data from the primary partition each time, the system will recalculate the verification value of each data segment and integrate it into an overall verification result, which is compared with the original verification value stored in the chip. If the comparison result is inconsistent, it is determined that the primary partition data is corrupted, and the system immediately and automatically switches to the redundant partition to read the complete data. At the same time, the primary partition data repair process is started, and the synchronous data of the redundant partition is overwritten with the damaged part of the primary partition. After the repair is completed, the primary partition data is verified again until the verification passes. Throughout the process, the system will push data repair prompts to the user terminal, informing the user that the local storage has returned to normal operation, avoiding the user's perception of data abnormality or system interruption.
[0015] Furthermore, the cloud backup in S4 adopts an end-to-cloud two-way encryption mechanism, combined with biometric access control to ensure data security. During data transmission, a connection is established through an improved encryption protocol, requiring device and user account binding verification, and the transmitted data blocks are encrypted. Cloud storage adopts a partitioned encryption strategy, and private data is stored through a special encryption method to ensure that service providers cannot decrypt it. Access permissions are based on user biometric verification, combined with multi-dimensional verification indicators to determine the permission level. Different levels correspond to permissions such as viewing, modifying, or denying access, thus constructing a full-link security protection for transmission, storage, and access to prevent data leakage or illegal tampering.
[0016] Compared with existing technologies, this intelligent door and window linkage control method based on multi-scene mode switching has the following advantages: First, this method collects multi-dimensional historical operation data of users' smart doors and windows, and uses a long short-term memory network algorithm model with improved door control mechanism for learning. It can accurately identify users' regular operating habits and behavioral deviation characteristics. This personalized learning mechanism enables smart doors and windows to automatically adjust according to the actual needs of different users, providing a more considerate and convenient user experience. For example, the system can automatically open or close doors and windows at specific times or in specific environments based on the user's historical operation records, without the need for manual intervention by the user, which greatly improves the convenience and comfort of life.
[0017] Second, this method employs the K-means algorithm with an improved cluster center update formula to perform cluster analysis on the data output by the LSTM model. This generates a basic pattern plus a dynamic control strategy with elastic offsets that supports scene-linked adjustments. This strategy can dynamically adjust the control parameters of doors and windows according to changes in actual scene type, environmental conditions, and user behavior habits, ensuring that the system always meets the actual needs of users. At the same time, the system also has the functions of real-time monitoring and manual adjustment. When it detects that the user has made the same adjustment multiple times in a row, it will automatically update the scene parameters and push a confirmation prompt to the user, effectively preventing misoperation and unnecessary adjustments, and enhancing the adaptability and stability of the system. In addition, through the dual-partition redundancy design and segmented verification of the local storage module, as well as the end-to-cloud bidirectional encryption and biometric permission control of the cloud server, a dual data security mechanism is formed, further ensuring the reliability and security of the system.
[0018] Other advantages, objectives and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination or study, or may be learned from the practice of the invention. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0020] Figure 1 This is a flowchart illustrating a smart door and window linkage control method based on multi-scene mode switching. Figure 2 A flowchart illustrating the LSTM model learning and iteration process for an intelligent door and window linkage control method based on multi-scene mode switching; Figure 3 This is a flowchart illustrating the dual-security storage process of an intelligent door and window linkage control method based on multi-scene mode switching. Detailed Implementation
[0021] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided below.
[0022] Example 1 The users are urban office workers who need to open windows and doors for ventilation after waking up in the morning and close them to keep the room warm after returning home in the evening. The system collects data and trains models as required. Figure 1 As shown, historical operation data of the user's smart doors and windows in six core dimensions were collected for 30 consecutive days. Specifically, the operation time was fixed at 7:00 AM and 6:00 PM daily; the operation duration was 30 minutes of ventilation after opening and heat preservation until the next morning after closing; the operation start and stop trigger conditions were manual triggering after waking up and remote triggering via the APP after returning home from get off work; the environmental parameters during operation were outdoor temperature of 22-25℃ and humidity of 55-60% when opening, and outdoor temperature of 15-18℃ and humidity of 65-70% when closing; the corresponding scene tags for the operation were weekday home - morning ventilation and weekday home - evening heat preservation; the user's feedback score after each operation was between 4.3 and 4.7.
[0023] In the data preprocessing stage, outliers were first removed using the 3σ criterion. On day 22, an operation duration of 120 minutes, recorded due to equipment failure, was identified as an outlier and removed because its absolute difference from the mean of that dimension exceeded three times the standard deviation. All other data passed validity checks. Next, for continuous data such as operation time, operation duration, and outdoor temperature and humidity, the Min-Max normalization method was used to map the numerical range to the [0, 1] interval. For discrete data such as operation start / stop trigger conditions, weather type, and scene labels, one-hot encoding was used for format conversion. The preprocessed data met the sample size requirement of continuous collection for 30 days, with two daily collections during typical morning and evening times. This data was then input into an LSTM algorithm model with an improved gating mechanism and online iterative optimization support. The formula is: ,in For the conventional predicted loss term, To predict the loss weighting coefficients, Mean square error, User operation parameters predicted by the LSTM model. For actual user operation parameters, For scene deviation loss, This is the bias loss weighting coefficient. Weights for operation time, For the scene The deviation between the user's actual operation and the basic scenario operation. For the scene The corresponding deviation benchmark coefficient.
[0024] During model training, such as Figure 2 As shown, when the cumulative number of newly collected user operation data reaches 50, the incremental learning method is used to adjust the model weights only based on the new data, without the need to retrain the model with all the data. After the model iterates, the prediction effect before and after the iteration is first compared through offline verification, and then the actual feedback scores of users are collected through online trial run for 3 days to complete the double verification. Finally, the model learns the user's routine operating habits of ventilating in the morning and keeping warm in the evening on weekdays, and identifies behavioral deviation characteristics such as turning off the windows 10 minutes earlier in the evening on rainy days.
[0025] The routine operation habit data and behavioral deviation feature data output by the LSTM algorithm model are input into the K-means algorithm with an improved cluster center update formula for cluster analysis. The formula is as follows: ,in For the updated cluster centers, The weights for the routine operational data samples are determined based on the user feedback rating R corresponding to each sample. This is a sample of data from routine operations. The scene correlation coefficient, For bias operation data sample weights, For the biased operation data samples, the number of clusters K=2 was first determined. The sum of squares within each cluster was calculated using the elbow rule for K=1 to K=5. When K=2, the decrease in WCSS was sharp, so this value of K was determined and the initial cluster centers were set. 1200 valid data samples from the LSTM output were selected for the first clustering assignment. Based on the Euclidean distance between each sample and the two initial cluster centers, samples with regular operating habits were assigned to one cluster, and samples with behavioral deviation features were assigned to another cluster.
[0026] Subsequently, an improved K-means cluster center update formula is used to calculate the updated cluster centers, and the update is continuously iterated until the change in cluster centers is less than 0.01, at which point the cluster analysis is complete. The mean of the regular operating habit cluster serves as the basic mode parameter, specifically: "Open doors and windows at 7:00 AM on weekdays, opening by 50% for 30 minutes; close doors and windows at 6:00 PM, closing by 100%." The mean difference between each scenario sample and the basic mode in the deviation feature cluster is the elastic offset. The elastic offset is dynamically adapted through scenario-linked adjustment logic, comprehensively considering three core factors: scenario type, environmental conditions, and user behavior habits. When the outdoor temperature is detected to drop sharply to 10℃, the system immediately recalculates the elastic offset, adjusts the morning opening rate to 30%, and pushes an adjustment confirmation prompt to the user's mobile app. When the outdoor humidity only changes from 60% to 62%, the elastic offset is not updated. Simultaneously, the system presets upper and lower boundary thresholds for the elastic offset to ensure that the offset always remains within a reasonable range.
[0027] The system monitors user manual adjustments in real time. From day 35 to day 37, the user performed three consecutive adjustments to the weekday home-morning ventilation scenario at 7:00 AM on weekdays. Each time, under conditions of an outdoor temperature of 23℃ and humidity of 58%, the user adjusted the opening degree of doors and windows from 50% to 60% in the basic mode. The system first performs a scenario consistency check, confirming that the date type of the three adjustments was weekdays, the environmental parameters were completely consistent, and the operation type was always an opening adjustment, thus meeting the scenario consistency requirements. Next, the system performs a magnitude stability check. Based on the user's historical valid adjustment records, the reasonable magnitude effective standard is ±20%. The magnitude of the three adjustments all met this standard, and the fluctuation range was only ±1%, meeting the stability requirements. Therefore, it was determined to be three consecutive valid adjustments, and the scenario parameter update process was automatically triggered.
[0028] The system pushes a confirmation prompt to the user's mobile app, indicating that the system detected that the user adjusted the on / off threshold to 60% three times consecutively on weekday mornings. The prompt asks whether the user wants to update the default parameters for this scenario. Since the current scenario is a weekday, the system uses a scenario-differentiated timeout handling mechanism with a preset feedback waiting time of 1 hour. If the user does not provide feedback within 30 minutes, the system initiates a historical behavior consistency check. The system compares the proposed on / off threshold of 60% with the user's actual operation records for this scenario over the past 15 days. It finds that the user manually adjusted the threshold to close to 60% on 12 days, indicating a high degree of consistency. Therefore, the system determines that the update aligns with the user's potential habits and automatically completes the parameter update.
[0029] like Figure 3As shown, the system stores user operation data, LSTM model data, and dynamic control strategy parameters in a local storage module that employs a dual-partition redundancy design and segmented verification. The local storage hardware uses an embedded NOR Flash chip, which is internally divided into a primary partition and a redundant partition. The storage capacity of both partitions can meet the continuous data storage requirements for 6 months.
[0030] The primary partition stores all currently active data and policy parameters. The redundant partition synchronizes all data in the primary partition every hour. If the data in the primary partition changes due to an update, the synchronization process is triggered immediately. The redundant partition is set up with a write protection mechanism, which only allows receiving synchronized write data from the primary partition and does not support direct modification. Data integrity verification adopts a segmented verification method, dividing the stored data into user operation history data segments, LSTM model weight parameter segments, and dynamic policy parameter segments of fixed size. The LSTM model weight parameter segments and dynamic policy parameter segments are given higher verification weights, while the user operation history data segments are given regular verification weights.
[0031] On day 40, voltage fluctuations caused inconsistencies in the verification of weight parameters in the primary partition model. The system immediately and automatically switched to the redundant partition to read the complete data. At the same time, it initiated the primary partition data repair process, overwriting the damaged part of the primary partition with the synchronized data from the redundant partition. After repair, the verification passed again. In addition, local data was synchronized to a cloud server that supports two-way encryption between the device and the cloud and biometric access control: during data transmission, a connection was established through an improved encryption protocol to complete the binding verification between the device and the user account, and the transmitted data blocks were encrypted; cloud storage adopted a partition encryption strategy, and private data was stored through a special encryption method that the service provider could not decrypt; access permissions were based on user fingerprint verification, combined with device binding, login password and other multi-dimensional verification indicators to determine the permission level, forming a dual data security mechanism of local and cloud.
[0032] Example 2 The users are urban families who vacation at their country villas every weekend. On weekend mornings, they open the windows to enjoy the natural breeze, and close them in the afternoons to avoid the sun as temperatures rise. The system collects data and trains models according to a set procedure. Figure 1As shown, historical operation data of the user's smart doors and windows across six core dimensions were collected over 30 consecutive days. Specifically: the operation times were fixed at 8:00 AM and 2:00 PM every Saturday and Sunday; the operation duration was 40 minutes of ventilation after opening and 5:00 PM of sun avoidance after closing; the start and stop trigger conditions were voice triggering after waking up in the morning and timed triggering via the APP in the afternoon; the environmental parameters during operation were outdoor temperature of 20-23℃, humidity of 65-70%, and wind force of 1-2 when opening, and outdoor temperature of 30-33℃, humidity of 50-55%, and wind force of 2-3 when closing; the corresponding scene tags for the operation were "Weekend Country Vacation - Morning Ventilation" and "Weekend Country Vacation - Afternoon Sun Avoidance"; and the user's daily feedback rating after operation was between 4.6 and 4.9 points.
[0033] In the data preprocessing stage, outliers were removed using the 3σ criterion. For example, on the 8th weekend, a user opened their doors and windows at 10:00 AM because they were out fishing. The absolute value of the difference between this data and the mean of the morning opening dimension exceeded three times the standard deviation, so it was identified as an outlier and removed. On the 15th weekend, an operation recorded due to a sudden thunderstorm lasted for 20 minutes. The absolute value of the difference between this data and the mean of that dimension did not exceed three times the standard deviation, so it was considered valid data. For continuous data such as operation time, operation duration, outdoor temperature and humidity, and wind force, the Min-Max normalization method was used to map them to the [0, 1] interval. For discrete data such as operation start and stop trigger conditions, weather type, and scene label, the format was converted using one-hot encoding.
[0034] The preprocessed data meets the sample size requirement of continuous collection for 30 days, with two collection sessions per day during typical morning and evening times. The input is an LSTM algorithm model that uses an improved gating mechanism and supports online iterative optimization, such as... Figure 2 As shown, during model training, due to user feedback on the 20th weekend that afternoon sun avoidance was insufficient, the system adopted an incremental learning approach to adjust the model weights based only on the new data from the last 10 days, without the need for full retraining. After model iteration, the prediction effects before and after iteration were first compared through offline verification, and then user feedback scores were collected through online trial runs over two days to complete the verification. Finally, the system learned the users' routine operating habits of ventilating in the early morning and avoiding sun in the afternoon on weekends, and identified behavioral deviations such as reducing the opening range when the wind force is above level 3.
[0035] The routine operation data and behavioral deviation feature data output by the LSTM model are input into the improved K-means algorithm for cluster analysis. The number of clusters is determined to be K=2. The WCSS from K=1 to K=5 is calculated by the elbow rule. When K=2, the WCSS decreases sharply. The value of K is determined and the initial cluster centers are set. 1100 valid data samples output by LSTM are selected for the first cluster assignment. According to the Euclidean distance between the sample and the two initial cluster centers, the routine operation samples are assigned to one cluster and the behavioral deviation samples are assigned to another cluster.
[0036] An improved cluster center update formula is used to calculate the updated cluster centers. The update is iterated until the change in cluster centers is less than 0.01, at which point clustering is complete. The mean of the regular operation clusters is used as the basic mode parameter. Specifically, on weekends, doors and windows are opened at 8:00 AM with an opening margin of 70% for 40 minutes; and closed at 2:00 PM with a closing margin of 100%. The mean difference between each scene sample in the deviation feature cluster and the basic mode is used as the elastic offset. The elastic offset is dynamically adapted through scene linkage adjustment logic, taking into account three core factors: scene type, environmental conditions, and user habits. When the outdoor wind force is detected to increase from level 2 to level 4, the system recalculates the elastic offset, adjusts the opening margin to 40%, and pushes an adjustment confirmation prompt to the user's smart speaker. When the outdoor temperature changes from 31℃ to 32℃, the elastic offset is not updated. The system presets upper and lower boundary thresholds for the elastic offset. If the calculated shutdown time during a thunderstorm is 13:20, it is directly adopted. If the calculated shutdown time during extreme high temperature weather is 12:30, then 13:00 is automatically used as the final adjustment basis.
[0037] The system monitors user manual adjustments in real time. From day 32 to day 34, the user performed three consecutive adjustments to the "Weekend Countryside Vacation - Afternoon Sun Avoidance" scenario at 2:00 PM on Sunday afternoons. Each time, the user adjusted the door and window closure from 100% to 95% in an environment with an outdoor temperature of 32℃, humidity of 52%, and wind force of level 2. The system performed scenario consistency checks and confirmed that the date type of all three adjustments was a weekend, the environmental parameters were completely consistent, and the operation type was a closure adjustment, thus meeting the scenario consistency requirements. Regarding the stability of the adjustment range, the reasonable effective standard for the adjustment range determined by the user's historical effective adjustment records is ±5%. All three adjustments met this standard, and the fluctuation range was only ±0.5%, which met the stability requirements. Therefore, it was determined to be three consecutive effective adjustments, and the scenario parameter update process was automatically triggered.
[0038] The system pushes a confirmation prompt to the user's mobile app, indicating that the system detected that the user adjusted the shutdown range to 95% three times consecutively on weekend afternoons. The prompt asks whether the user wants to update to the default parameter for this scenario. Since the current scenario is a weekend, according to the scenario-differentiated timeout handling mechanism, the preset feedback waiting time is 3 hours. If the user does not provide feedback within 2 hours, the system initiates a historical behavior consistency check. The proposed shutdown range of 95% is compared with the user's actual operation records for this scenario over the past 10 days. It is found that the user manually adjusted the range to close to 95% on 8 days, indicating high consistency. The parameter update is completed automatically. If the user subsequently clicks to modify the shutdown range in the app and adjusts it to 90%, the system will include the actively input parameter in the deviation operation data category, re-cluster analyze and generate a new elastic offset, completing the dynamic control strategy iteration.
[0039] like Figure 3As shown, user operation data, LSTM model data, and dynamic control strategy parameters are stored in a local storage module that employs a dual-partition redundancy design and segmented verification. The local storage hardware is an embedded NOR Flash chip, divided into a primary partition and a redundant partition. Both partitions have storage capacities sufficient for four months of continuous data storage. The primary partition stores currently active data and strategy parameters, while the redundant partition synchronizes with the primary partition's data hourly. Updates to the primary partition's data trigger synchronization immediately, and the redundant partition is write-protected, supporting only synchronous writes.
[0040] Data integrity is verified using a segmented approach, dividing the stored data into user operation history data segments, LSTM model weight parameter segments, and dynamic strategy parameter segments. The model weight and dynamic strategy parameter segments are assigned higher verification weights. On day 45, before the system reads data from the main partition, it finds that the verification value of the dynamic strategy parameter segment is inconsistent with the original value, indicating that the main partition data is corrupted. The system immediately switches to the redundant partition to read the complete data, initiates the main partition repair process, and uses the redundant partition data to overwrite the corrupted part. After repair, the verification passes.
[0041] When local data is synchronized to the cloud server, a two-way encryption mechanism between the end and the cloud is adopted: a connection is established through an improved encryption protocol to complete the binding and verification of the device and user account, and the transmitted data blocks are encrypted; the cloud adopts a partition encryption strategy, and privacy data is specially encrypted and stored, which cannot be decrypted by the service provider. Access permissions are based on user face verification, combined with multi-dimensional verification indicators such as villa access control binding and family account association to determine the permission level. Only the user and his / her family members can view and modify the data through face verification, and other personnel do not have access permissions, thus building a dual data security protection between the local and cloud.
[0042] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A smart door and window linkage control method based on multi-scene mode switching, characterized in that, The specific steps of this method are as follows: S1. Data Processing and Habit Learning Steps: Collect multi-dimensional historical operation data of users' smart doors and windows and preprocess it. Input the preprocessed data into a Long Short-Term Memory (LSTM) network algorithm model with an improved gating mechanism and online iterative optimization support to learn users' regular operating habits and identify behavioral deviation characteristics. The improved gating mechanism introduces scene-behavior association weights, with the following formula: ,in For the conventional predicted loss term, To predict the loss weighting coefficients, Mean square error, User operation parameters predicted by the LSTM model. For actual user operation parameters, For scene deviation loss, This is the bias loss weighting coefficient. Weights for operation time, For the scene The deviation between the user's actual operation and the basic scenario operation. For the scene The corresponding deviation benchmark coefficient; S2. Clustering and Strategy Generation: The routine operation habit data and behavioral deviation feature data output by the LSTM algorithm model are used for cluster analysis using the K-means algorithm with an improved cluster center update formula. This generates a dynamic control strategy that combines a basic pattern with elastic offsets supporting scene-based adjustments. The improved K-means algorithm formula is: ,in For the updated cluster centers, The weights for the routine operational data samples are determined based on the user feedback rating R corresponding to each sample. This is a sample of data from routine operations. The scene correlation coefficient, For bias operation data sample weights, For the biased operation data sample, the specific steps of the clustering process are as follows: determine the number of clusters K=2, and determine the initial cluster center by the elbow rule, that is, calculate the sum of squares within the cluster when K=1 to K=5. When the WCSS decreases sharply, the K value is 2; perform the first clustering assignment on more than 1000 valid data samples output by LSTM, and assign the sample to the cluster with the closer distance according to the Euclidean distance between the sample and the two cluster centers; Calculate using the cluster center update formula The cluster centers are iteratively updated until the change in the cluster centers is less than 0.
01. After clustering is completed, the mean of the basic pattern cluster is the basic pattern parameter, and the mean difference between each scene sample in the deviation feature cluster and the basic pattern is the elastic offset. S3. Monitoring, Adjustment and Update: Real-time monitoring of users' manual adjustment operations on smart doors and windows. When three consecutive identical adjustments by the user that meet the conditions for scene consistency and amplitude stability are detected, the scene parameters are automatically updated and a confirmation prompt is pushed to the user. At the same time, scene-differentiated timeout processing and historical behavior consistency verification are performed. S4. Dual-Security Storage: User operation data, LSTM model data, and dynamic control strategy parameters are stored in a local storage module with dual-partition redundancy design and segmented verification, and synchronized to a cloud server that supports end-to-cloud bidirectional encryption and biometric access control, forming a dual data security mechanism.
2. The intelligent door and window linkage control method based on multi-scene mode switching according to claim 1, characterized in that, The historical operation data in S1 includes at least 6 core dimensions: operation time, operation duration, operation start and stop trigger conditions, environmental parameters during operation, scene tag corresponding to the operation, and user feedback rating after the operation. Before inputting historical operation data into the LSTM model, data preprocessing is required, which includes three steps: The first step is to remove outliers, using the 3σ criterion: calculate the mean and standard deviation of each data dimension. When the absolute value of the difference between a single data value and the mean of that dimension is greater than 3 times the standard deviation of that dimension, it is judged as an outlier and removed. The second step is continuous data normalization: For continuous data such as operation time, operation duration, outdoor temperature, and outdoor humidity, the Min-Max normalization method is used to uniformly map their numerical range to the [0, 1] interval; the specific calculation method is to subtract the minimum value of the data in that dimension from the value of a single data point, and then divide by the difference between the maximum and minimum values of the data in that dimension. The third step is discrete data encoding: For discrete data such as operation start / stop trigger conditions, weather type, and scene label, one-hot encoding is used for format conversion. In addition, to ensure that the user habits learned by the LSTM model are statistically significant, the preprocessed data sample size must meet two conditions: first, the continuous collection period is 30 days; second, the collection frequency is twice a day, and the collection time must correspond to the two typical operation periods in the morning and evening.
3. The intelligent door and window linkage control method based on multi-scene mode switching according to claim 1, characterized in that, The LSTM algorithm model in S1 adopts an online iterative optimization mechanism. The iteration triggering conditions include: newly collected user operation data reaching a certain scale, users manually triggering the model update function, or user feedback scores for dynamic strategies failing to meet the satisfactory standard for several consecutive days. Parameter updates adopt an incremental learning method, without the need for retraining with all data, only adjusting the model weights based on new data. After model iteration, it needs to undergo two verification steps: offline verification by comparing the prediction effect before and after iteration, and online trial operation by judging the optimization effect through user feedback scores in actual control scenarios. If either verification fails, a rollback mechanism is immediately triggered, restoring the model to the state before iteration and pushing a prompt to the user.
4. The intelligent door and window linkage control method based on multi-scene mode switching according to claim 1, characterized in that, The elastic offset in S2 is not a fixed value, but is dynamically adapted through scene linkage adjustment logic. During the adjustment process, three core factors are comprehensively considered: scene type, environmental conditions, and user behavior habits. The system monitors the changes of these related factors in real time. When a significant change is detected in one or more factors, and the change is sufficient to affect the user's actual needs for door and window operations, the elastic offset is immediately recalculated and updated. At the same time, an adjustment confirmation prompt is pushed to the user terminal, informing them of the adjusted door and window operation time. If the change in factors is small and has little impact on user operation needs, the elastic offset will not be updated for the time being. In addition, to prevent extreme combinations of factors from causing the elastic offset to exceed the reasonable range, the system presets upper and lower boundary thresholds for the offset. When the calculated offset exceeds the threshold, the boundary threshold will be automatically used as the final adjustment basis.
5. The intelligent door and window linkage control method based on multi-scene mode switching according to claim 1, characterized in that, In S3, determining whether a user makes the same adjustment to the same control scenario three times consecutively requires meeting two core conditions: consistency of the adjustment scenario and stability of the adjustment range. Regarding consistency of the adjustment scenario, it must be confirmed that all three adjustments belong to the same scenario tag. The criteria for determining the scenario tag include the date type of the adjustment, the environmental parameters at the time of the adjustment, and the operation type corresponding to the adjustment. All three must be completely consistent to be considered the same control scenario. Regarding the stability of the adjustment range, the system first determines a reasonable standard for the effective adjustment range based on the user's historical effective adjustment records. A single adjustment range must reach this standard to be considered a valid adjustment; adjustments below this standard are considered erroneous operations and are not counted in the consecutive adjustment count. Simultaneously, the range of the three valid adjustments must remain stable, with fluctuations controlled within a very small range. Only when all three conditions—scenario consistency, reaching the effective standard, and the stability requirement of the amplitude fluctuations—are met can it be determined as three consecutive valid adjustments, thereby triggering the scenario parameter update process.
6. The intelligent door and window linkage control method based on multi-scene mode switching according to claim 1, characterized in that, The timeout handling mechanism after pushing parameter update confirmation prompts to users in S3 adopts a scenario-differentiated design and is equipped with historical behavior consistency verification logic. The preset time setting is adjusted based on the user's device usage habits in different scenarios: users check the terminal device more frequently during weekdays, so the preset time is relatively short. Users may reduce device usage or delay viewing information on weekends, so the preset time will be extended accordingly. During holidays, users are more likely to go out, and the frequency of device use is further reduced. The preset time is set to the longest to avoid improper policy updates due to users not checking in time. If the user does not make any feedback within the preset time of the corresponding scenario, the system will not directly execute the parameter update. Instead, it will first compare the parameter to be updated with the user's actual operation records in the past period of the scenario. If the parameter to be updated is consistent with most actual operations, it means that the update is in line with the user's potential habits, and the parameter update will be completed automatically. If the consistency is low, it indicates that the user's recent operations have fluctuated. The parameters will not be updated for the time being. At the same time, a prompt will be pushed to the user again and the feedback waiting time will be extended. The prompt will clearly state that operation fluctuations have been detected and ask the user to confirm whether an update is still needed. If the user clicks to modify and enters new parameters, the system will treat the new parameters entered by the user as higher priority correction parameters, include them in the deviation operation data category, and re-perform cluster analysis to generate new elastic offsets. Then, the dynamic control strategy will be iteratively updated based on the new elastic offsets.
7. The intelligent door and window linkage control method based on multi-scene mode switching according to claim 1, characterized in that, The local storage module in S4 adopts a dual-partition redundant storage design. Through hardware structure optimization and data verification mechanism, it provides dual protection for the storage security and integrity of user operation data, LSTM model parameters and dynamic control strategies. The local storage hardware uses an embedded NOR Flash chip, which is divided into two independent storage areas: a primary partition and a redundant partition. The storage capacity of both partitions can meet the continuous data storage needs of at least 3 months. The primary partition is used to store various data and strategy parameters that are currently in effect, while the redundant partition synchronizes all data in the primary partition in real time. The synchronization frequency is set to once per hour. If the data in the primary partition is updated, the synchronization process is triggered immediately. Meanwhile, the redundant partition is set up with a write protection mechanism, which only allows the receiving of synchronous write data from the main partition and does not support any direct modification operations. In terms of data integrity verification, a segmented verification method is adopted, which divides the stored data into several data segments of fixed size and assigns different verification weights according to the importance of each data segment. The LSTM model weight parameter segment and the dynamic strategy parameter segment are given higher verification weights because they directly affect the system's operating accuracy, while the user operation historical data segment is given a regular verification weight. Before reading data from the primary partition each time, the system recalculates the checksum of each data segment and integrates it into an overall checksum. This result is then compared with the original checksum stored in the chip. If the comparison results are inconsistent, the primary partition data is determined to be corrupted. The system immediately and automatically switches to the redundant partition to read the complete data and simultaneously initiates the primary partition data repair process. The synchronized data from the redundant partition is used to overwrite the corrupted part of the primary partition. After the repair is completed, the primary partition data is checked again until the checksum passes.
8. The intelligent door and window linkage control method based on multi-scene mode switching according to claim 1, characterized in that, The cloud backup in S4 adopts an end-to-cloud two-way encryption mechanism, combined with biometric access control to ensure data security. During data transmission, a connection is established through an improved encryption protocol, which requires binding verification between the device and the user account. Transmitted data blocks are encrypted. Cloud storage adopts a partitioned encryption strategy, and private data is stored through a special encryption method to ensure that the service provider cannot decrypt it. Access permissions are based on user biometric verification, combined with multi-dimensional verification indicators to determine the permission level. Different levels correspond to permissions such as viewing, modifying, or denying access, thus constructing a full-link security protection for transmission, storage, and access.
Citation Information
Patent Citations
Big data living habit and behavior analysis method and system for smart home
CN120315310A
Intelligent lighting control method and device based on gesture mapping, equipment and medium
CN120358654A
Intelligent monitoring method for sleeve gas recovery
CN120847014A