A remote intelligent door lock control method and system based on the Internet of Things

By combining IoT technology with TensorFlow Lite models and multimodal sensors, fingerprint matching and environmental detection are optimized. Combined with HMAC-SHA256 encryption, high-precision, real-time security control of the smart door lock system is achieved, solving the problems of misidentification, insufficient environmental perception, and easy tampering of commands in existing technologies, thus improving the security and intelligence level of the system.

CN121096049BActive Publication Date: 2026-05-29SHENZHEN HHD TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN HHD TECH CO LTD
Filing Date
2025-08-01
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing smart door lock systems suffer from limitations in fingerprint recognition accuracy due to image quality and similarity, which can easily lead to misjudgments. They also lack a comprehensive perception and response mechanism for environmental anomalies, cannot perform dynamic security assessments based on user behavior patterns, have weak command verification mechanisms, and are susceptible to tampering and forgery attacks. Overall, their security and intelligence levels are insufficient.

Method used

The system employs an IoT-based remote smart door lock control method. It encrypts feature values ​​using the R305 fingerprint module, combines TensorFlow Lite models and multimodal sensors, optimizes fingerprint matching using LBP and cosine similarity algorithms, integrates door magnetic, vibration, and temperature and humidity sensors, combines GMM and TCN models for environmental and behavioral analysis, and uses the HMAC-SHA256 algorithm to encrypt verification commands to achieve multi-level security control.

Benefits of technology

It improves the accuracy of fingerprint recognition and the ability to detect environmental anomalies, prevents unauthorized operations, enhances the security and intelligence of the system, ensures the uniqueness and timeliness of commands, and improves security and adaptability in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121096049B_ABST
    Figure CN121096049B_ABST
Patent Text Reader

Abstract

The application discloses a kind of remote intelligent door lock control method and system based on Internet of Things, it is related to intelligent door lock control system technical field, including, based on TensorFlow Lite model is combined with LBP and cosine similarity algorithm optimization fingerprint matching reliability, after verification, based on integrated multimodal sensor, environmental state detection is carried out, after environmental state detection passes, using GMM model calculates behavior mode score, and based on time series convolutional neural network, the optimization of GMM model calculation result is carried out.LBP and cosine similarity algorithm are fused, the identification ability of system to low-quality fingerprint image and similar feature fingerprint is enhanced, the user operation time distribution is learned by Gaussian mixture model, and the continuity and stability of behavior are analyzed by combining time series convolutional neural network, realize the real-time modeling and credibility evaluation of user behavior, improve the identification ability of system to illegal operation, make up the short board that existing door lock system lacks the perception to environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent door lock control system technology, and in particular to a remote intelligent door lock control method and system based on the Internet of Things. Background Technology

[0002] With the rapid development of IoT technology, smart locks, as an important component of smart home systems, have gradually become one of the core devices for home and enterprise security management. However, existing fingerprint recognition technology still faces some challenges in practical applications. First, traditional fingerprint matching algorithms are prone to matching failures when fingerprint image quality is poor or user fingerprint features are highly similar. Second, existing fingerprint recognition systems typically only focus on physical fingerprint matching, neglecting the impact of environmental factors and changes in user behavior patterns on lock security. For example, external environmental vibrations and changes in temperature and humidity may be potential indicators of security threats, and traditional systems struggle to respond promptly in these situations. Furthermore, most existing smart lock systems only verify user identity through fingerprints or passwords, lacking comprehensive multimodal analysis and intelligent decision-making mechanisms, resulting in insufficient system security and adaptability. To address these issues, this paper proposes an IoT-based remote smart lock control method that combines fingerprint recognition technology, environmental state perception, user behavior pattern analysis, and deep learning optimization algorithms, significantly improving the security and reliability of smart locks. Firstly, it utilizes a Local Binary Pattern (LBP) algorithm and TensorFlow... The Lite model's fingerprint matching optimization technology solves the fingerprint matching accuracy problem and improves the matching ability of low-quality fingerprints or highly similar fingerprints. By integrating cosine similarity algorithm and deep learning technology, this invention further optimizes the confidence calculation of fingerprint verification, ensuring the accuracy and real-time performance of the verification process. Secondly, this invention integrates multiple environmental sensors, including door magnets, vibration sensors, and temperature and humidity sensors, which can detect environmental changes in real time and provide environmental anomaly scores. It also combines Gaussian mixture model (GMM) and temporal convolutional neural network (TCN) to intelligently analyze user behavior patterns, thereby determining whether the current behavior conforms to the normal pattern. Through logical condition fusion, the security of unlocking commands is ensured, and the HMAC-SHA256 algorithm is used to encrypt and verify the commands to prevent command tampering and forgery, thus providing a more comprehensive, intelligent, and secure door lock control method. Summary of the Invention

[0003] In view of the aforementioned existing problems, the present invention is proposed.

[0004] Therefore, this invention provides a remote smart door lock control method and system based on the Internet of Things, which solves the problems that fingerprint recognition accuracy is limited by image quality and similarity, which easily leads to misjudgment; lack of comprehensive perception and response mechanism for environmental anomalies; inability to perform dynamic security assessment based on user behavior patterns; weak command verification mechanism; vulnerability to tampering and forgery attacks; and insufficient overall security and intelligence level.

[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0006] In a first aspect, the present invention provides a remote smart door lock control method based on the Internet of Things, which includes: collecting user fingerprint feature values ​​through an R305 fingerprint module, encrypting the feature values ​​using an AES-256 encryption algorithm and storing them in an EEPROM, performing fingerprint matching using a TensorFlow Lite model, and integrating a multimodal sensor on the smart lock.

[0007] The fingerprint matching confidence is calculated based on the LBP algorithm. The fingerprint matching confidence is optimized based on the TensorFlow Lite model combined with the LBP and cosine similarity algorithms. After verification, the environmental state is detected based on the integrated multimodal sensor. After the environmental state detection is successful, the behavior pattern score is calculated using the GMM model. The calculation result of the GMM model is optimized based on the temporal convolutional neural network. The command execution flag is calculated based on logical condition fusion. If the command execution flag is allowed, an unlocking command is generated.

[0008] The NodeMCU obtains the unlocking command, performs door lock operation and status verification, obtains the status verification result, updates the user interface and triggers alarm operations.

[0009] Calculate anomaly classification scores based on alarm anomalies and take corresponding measures. Adjust the polling frequency dynamically based on the anomaly classification scores.

[0010] As a preferred embodiment of the IoT-based remote smart door lock control method of the present invention, the following steps are taken: The user's fingerprint feature value is collected by the R305 fingerprint module, encrypted using the AES-256 encryption algorithm, and stored in the EEPROM. Fingerprint matching is performed using the TensorFlow Lite model. A multimodal sensor is integrated into the smart lock. When the user first accesses the system, a web platform under the local area network hotspot is opened through a browser. The user scans a QR code to enter the web configuration page, enters the home Wi-Fi SSID and password, and the NodeMCU connects to the Internet via the ESP8266 and returns an HTTP status code 200. The NodeMCU control terminal connects to the multimodal sensors, including a door magnetic sensor, a vibration sensor, and a DHT22 temperature and humidity sensor. The lock body's built-in buzzer is controlled via the D6 pin. The sensors are connected via the NodeMCU's GPIO pins. Abnormal events are pushed to the backend in real time via the MQTT protocol and triggered by the platform. The camera is configured as a sub-device of the smart lock via the Matter protocol. The NodeMCU loads the TensorFlow Lite model, using the recorded fingerprint as the fingerprint baseline.

[0011] As a preferred embodiment of the IoT-based remote smart door lock control method of the present invention, the following steps are performed: Fingerprint matching confidence is calculated based on the LBP algorithm; the fingerprint matching confidence is optimized using a TensorFlow Lite model combined with LBP and cosine similarity algorithms; after verification, environmental state detection is performed using an integrated multimodal sensor; after successful environmental state detection, a behavior pattern score is calculated using a GMM model; the GMM model calculation result is optimized using a temporal convolutional neural network; a command execution flag is calculated based on logical condition fusion; if the command execution flag is enabled, an unlocking command is generated, instructing the user to click the unlock button on the web page, triggering the R305 fingerprint module to collect the fingerprint; the NodeMCU loads the TensorFlow Lite model, reads the fingerprint baseline stored in the first step from the EEPROM, and calculates the fingerprint matching confidence based on the LBP algorithm. The TensorFlow Lite model combines the Local Binary Pattern (LBP) and cosine similarity algorithms to optimize fingerprint matching confidence. A threshold V is set; if the confidence P is lower than the threshold V, a failed attempt is recorded and an error is returned: "Fingerprint verification failed, please try again." If the confidence P is higher than the threshold V, the attempt is reversed. If the threshold V is reached, fingerprint verification is successful, triggering environmental status detection. The NodeMCU then reads the door status via the D3 pin. ,like Marked as closed, if The system directly marks environmental anomalies. Pin D5 collects vibration data and sets a threshold 0. If the frequency exceeds the set threshold 0, it is marked as abnormal. Pin D7 collects temperature and humidity data and sets thresholds C and T. If the temperature... Humidity greater than threshold C If the value exceeds a threshold T, it is marked as abnormal. By using a weighted linear combination to fuse normalized data from multiple sensors, the environmental anomaly index is comprehensively evaluated. ;

[0012] The web platform calls a local Gaussian mixture model to analyze the temporal distribution of the user's most recent actions over time. It then calculates the probability density of the behavior pattern using a weighted sum of multiple Gaussian distributions, which serves as the behavior pattern score. The behavioral pattern scores obtained from the Gaussian Mixture Model (GMM) are used as input to a Temporal Convolutional Neural Network (TCN). Each convolutional layer in the TCN uses causal convolution and dilated convolution to extract higher-level features layer by layer, outputting a behavioral confidence score. The score combines the behavioral pattern probabilities of the GMM and the predictive power of the TCN for time series data. The outputs of the two models are then fused using a weighted strategy to obtain the final confidence score. Set a threshold J, if If the threshold J is less than the threshold, the user is required to enter a verification code. After entering the verification code, the web platform will verify the user's identity. If the verification is successful, the next step of calculating the command execution flag will be performed; otherwise, the operation will be rejected.

[0013] Based on the logical condition fusion calculation command execution flag G, if the command execution flag is allowed, the Web platform generates an HMAC-SHA256 key. The Web platform uses the key to encrypt the unlocking command content and generates a secure signature. The unlocking command is uploaded to Firebase. If the conditions are not met, the Web platform does not generate a key, records the exception, and prompts the user that the verification failed.

[0014] As a preferred embodiment of the IoT-based remote smart door lock control method of the present invention, the steps of obtaining the unlocking command through the NodeMCU, executing the door lock operation and status verification refer to the NodeMCU obtaining encrypted commands through Wi-Fi polling from Firebase, and the NodeMCU sending a signal through the D1 pin to control the MG995 servo motor. If the command is "unlock", the motor rotates to 0°; if the command is "lock", the motor rotates to 180°. After the action is completed, the NodeMCU reads the door status through the D3 pin, detects the lock position through the D5 pin, and performs a consistency verification calculation. If the verification passes, a status record is generated; if the verification fails, an error record is generated and uploaded to Firebase. NodeMCU then sends the execution result to the Web platform via serial port.

[0015] As a preferred embodiment of the IoT-based remote smart door lock control method of the present invention, wherein: obtaining the status verification result, updating the user interface (UI), and triggering the alarm operation refers to the Web platform obtaining the latest verification data from Firebase through Webview at specified intervals. and The web platform displays "The door is securely locked". If the status check result is "Please check the door", and if the status check result is "fail" or E>R, display "Abnormal alarm", update the UI display content according to the status check logic. or This triggers the alarm logic and uploads the exception details to Firebase. The web platform then pushes a notification to the user via the FCM service.

[0016] As a preferred embodiment of the IoT-based remote smart door lock control method of the present invention, wherein: calculating the anomaly classification score and taking corresponding measures based on the anomaly situation refers to the NodeMCU obtaining the latest anomaly details from Firebase via Wi-Fi and checking... Based on the anomaly type and frequency, calculate anomaly classification scores using UI and other methods. Set threshold ,like The NodeMCU automatically retryes the unlocking action if... The security response is triggered: the NodeMCU activates the buzzer through the D6 pin, triggers the camera to record 30 seconds of video through the Matter protocol, and pushes an FCM notification to the Web platform.

[0017] As a preferred embodiment of the IoT-based remote smart door lock control method of the present invention, wherein: the dynamic adjustment of the polling frequency based on anomaly classification and scoring refers to NodeMCU analyzing response records, statistically analyzing the anomaly frequency of content within a set time period, the Web platform using Zstandard compression for the lock command, generating a signature via HMAC-SHA256, uploading it to Firebase, and NodeMCU... Dynamically adjust the polling frequency, if The polling frequency is set to a low frequency. The polling frequency is set to a high frequency. If the battery power is less than the specified power, the NodeMCU enters DeepSleep, retaining only the RTC and fingerprint modules, pausing Wi-Fi polling until the battery is restored. When the network is disconnected, the NodeMCU caches the instructions to the EEPROM, and synchronizes them to Firebase after the network is connected. The Web platform receives the execution results, updates the UI, and pushes FCM notifications.

[0018] Secondly, the present invention provides a remote smart door lock control method system based on the Internet of Things, including a smart lock initial configuration and communication configuration module for user identity management fingerprint enrollment and management;

[0019] The multi-factor authentication and environment analysis module is used for model loading and inference, multimodal sensor reading, environmental status judgment and anomaly scoring, and unlocking action control.

[0020] The physical control and state consistency verification module is used for instruction polling and execution;

[0021] The alarm and security response module is used to trigger the buzzer and push abnormal notifications to the web platform upon anomaly detection;

[0022] The anomaly scoring and response strategy module is used to calculate anomaly classification scores based on anomaly frequency and to take corresponding strategies based on the scores.

[0023] Thirdly, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, wherein the computer program, when executed by the processor, implements any step of the Internet of Things-based remote smart door lock control method as described in the first aspect of the present invention.

[0024] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the Internet of Things-based remote smart door lock control method as described in the first aspect of the present invention.

[0025] The beneficial effects of this invention are as follows: By integrating the Local Binary Pattern (LBP) algorithm with the TensorFlow Lite model and combining it with cosine similarity to optimize fingerprint matching confidence, not only is the recognition accuracy improved, but the system's ability to identify low-quality fingerprint images and fingerprints with similar features is also enhanced, solving the problem of high false recognition rate in traditional recognition methods. By learning the user operation time distribution through Gaussian Mixture Model (GMM) and combining it with Temporal Convolutional Neural Network (TCN) to analyze the continuity and stability of behavior, real-time modeling and confidence assessment of user behavior are achieved, effectively preventing false triggering during abnormal periods or abnormal behaviors, and improving the system's ability to identify illegal operations. By integrating multiple sensors such as door magnets, vibration sensors, and temperature and humidity sensors, and by analyzing the environmental state of the door lock in real time through weighted algorithms and environmental anomaly scoring models, the system can effectively detect abnormal situations such as doors not being closed or external damage, making up for the shortcomings of existing door lock systems in lacking environmental awareness. Attached Figure Description

[0026] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is a flowchart of the IoT-based remote smart door lock control method in Example 1.

[0028] Figure 2 This is a schematic diagram of the IoT-based remote smart door lock control system in Example 1.

[0029] Figure 3 This is a flowchart of the abnormal response and polling adjustment process of the IoT-based remote smart door lock control method in Example 1. Detailed Implementation

[0030] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0031] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0032] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0033] Example 1, referring to Figures 1 to 3 This is the first embodiment of the present invention, which provides a remote smart door lock control method based on the Internet of Things, including the following steps:

[0034] S1. Collect user fingerprint feature values ​​through R305 fingerprint module, encrypt the feature values ​​using AES-256 encryption algorithm and store them in EEPROM, perform fingerprint matching using TensorFlow Lite model, and integrate multimodal sensor on smart lock.

[0035] The fingerprint matching confidence is calculated based on the LBP algorithm. The fingerprint matching confidence is optimized based on the TensorFlow Lite model combined with the LBP and cosine similarity algorithms. After verification, the environmental state is detected based on the integrated multimodal sensor. After the environmental state detection is successful, the behavior pattern score is calculated using the GMM model. The calculation result of the GMM model is optimized based on the temporal convolutional neural network. The command execution flag is calculated based on logical condition fusion. If the command execution flag is allowed, an unlocking command is generated.

[0036] Specifically, the R305 fingerprint module collects the user's fingerprint features, encrypts the features using the AES-256 encryption algorithm, and stores them in EEPROM. Fingerprint matching is performed using a TensorFlow Lite model. A multimodal sensor is integrated into the smart lock. When a user first accesses the system, a web platform is accessed via a browser on the local area network hotspot. This platform uses Node.js (Express) to build the backend service, providing API interfaces for user registration, device binding, fingerprint enrollment requests, and remote unlocking control. The frontend uses React to build web pages for user login, status viewing, and command sending. MongoDB is used for data storage, saving user, device, and log information. The device (NodeMCU) communicates with the platform via the MQTT protocol to report status and execute commands. The platform is deployed on a cloud server, forming a complete platform architecture of "Web frontend + backend service + cloud database + NodeMCU control." A lightweight HTTP server automatically started by the NodeMCU generates a QR code webpage containing a Wi-Fi configuration entry. The user scans the QR code to enter the web configuration page, inputs the home Wi-Fi SSID and password, and the NodeMCU then uses ESP... The 8266 connects to the internet and returns an HTTP status code 200 (indicating a successful connection). The NodeMCU control unit connects to multimodal sensors, including a door magnetic sensor (installed between the door frame and the door panel to detect closure), a vibration sensor (fixed inside the door panel to monitor abnormal vibrations), and a DHT22 temperature and humidity sensor (placed inside the lock body to measure ambient temperature and humidity). The lock body's built-in buzzer is controlled via pin D6 (a digital input / output pin on the NodeMCU) to detect abnormal behavior or issue a prompt tone upon successful unlocking. The user-installed camera is pre-paired and configured as a sub-device of the smart lock via the Matter protocol. Sensors are connected via the NodeMCU's GPIO pins (D3, D5, D7, D8) to achieve real-time acquisition of environmental conditions. Abnormal events are pushed to the backend in real-time via the MQTT protocol and triggered by the platform. The camera is configured as a sub-device of the smart lock via the Matter protocol and integrates a video stream control interface. The NodeMCU loads a TensorFlow Lite model (a pre-trained fingerprint matching model) using the recorded fingerprint as a baseline to ensure low power consumption and real-time environmental awareness, adapting to smart home scenarios.

[0037] The fingerprint matching method based on the R305 fingerprint module and TensorFlow Lite model, combined with AES-256 encryption to ensure the security of fingerprint data storage, significantly improves recognition accuracy and system security. By integrating multimodal sensors and cameras, a real-time environmental monitoring mechanism is constructed to enhance the perception and response capabilities to abnormal behavior. A lightweight HTTP server is built using NodeMCU, and user Wi-Fi configuration is achieved via QR code, reducing the deployment threshold. The platform architecture is based on "Web front-end + Express back-end + MongoDB + MQTT communication", realizing a closed loop of user remote control and device status management. The overall system combines low power consumption, real-time performance, and intelligence, significantly overcoming the shortcomings of existing technologies in recognition, perception, communication, and user interaction.

[0038] Furthermore, fingerprint matching confidence is calculated based on the LBP algorithm. The fingerprint matching confidence is then optimized using a TensorFlow Lite model combined with LBP and cosine similarity algorithms. After successful verification, environmental state detection is performed using an integrated multimodal sensor. Once environmental state detection is successful, a behavior pattern score is calculated using a GMM model. The GMM model's calculation results are then optimized using a temporal convolutional neural network. A command execution flag is calculated based on logical conditional fusion. If the command execution flag is enabled, an unlock command is generated, instructing the user to click the unlock button on the web page. This triggers the R305 fingerprint module to acquire a fingerprint (128 bytes of feature value). The NodeMCU loads the TensorFlow Lite model (a pre-trained fingerprint matching model), reads the fingerprint baseline stored in the first step from the EEPROM, and calculates the fingerprint matching confidence based on the LBP algorithm. The calculation formula for (range 0-1) is:

[0039] ;

[0040] in, and These are the i-th dimension LBP feature values ​​of the fingerprint and the baseline fingerprint, respectively. The Local Binary Mode algorithm is used to extract texture features by comparing the gray values ​​of a pixel with those of its neighboring pixels and encoding the results into a binary mode. When applied to the fingerprint image, grayscale processing is performed first, and then the LBP value of each pixel is calculated using a sliding window. Finally, the fingerprint feature vector is generated, where N is the dimension of the LBP feature vector (usually 128 dimensions, adapted to the R305 module output).

[0041] The TensorFlow Lite model combines Local Binary Pattern (LBP) and cosine similarity algorithms to optimize fingerprint matching confidence.

[0042] ;

[0043] Where P is the fingerprint matching confidence level (range 0-1). Let i be the feature value of the i-th dimension of the input fingerprint. Let be the i-th dimension feature value of the baseline fingerprint, and α be the fusion weight of LBP and cosine similarity (adaptively adjusted using historical matching data), and the dot product. Measuring the similarity of feature vectors and The L2 norm of the input and baseline fingerprints;

[0044] ESP32 leverages the SIMD instruction set and parallel computing capabilities to reduce latency in LBP feature extraction and cosine similarity calculation, improving computational efficiency. A threshold V is set using ROC curve analysis; if the confidence level P is below V, a failed attempt is recorded and an error is returned: "Fingerprint verification failed, please retry." If the confidence level P is above V, the attempt is recorded as failed and an error is returned. If the threshold V is reached, fingerprint verification is successful, triggering environmental status detection. The NodeMCU then reads the door status via the D3 pin (door magnetic sensor). (Check if the door is physically closed (door panel and door frame are flush)) If Marked as closed, if The system directly marks environmental anomalies. The D5 pin (vibration sensor) collects vibration data (vibrations caused by gravitational acceleration, such as a door lock being impacted or pried). A threshold 0 is set using signal threshold analysis; if the frequency exceeds the set threshold 0, it is marked as abnormal. =1 indicates an error; otherwise =0), pin D7 (DHT22 humidity sensor) collects temperature and humidity, and sets thresholds C and T using receiver operating characteristic curve analysis. If the temperature Humidity greater than threshold C If the value is greater than the threshold T, it is marked as abnormal. =1, =1 indicates an error; otherwise =0, =0), by weighted linear combination and fusion of normalized data from multiple sensors, the environmental anomaly index is comprehensively evaluated. (Range 0-1):

[0045] ;

[0046] in, The vibration is rated as abnormal (e.g., 0 = normal, 1 = abnormal). Score for temperature anomalies. Scoring for humidity anomalies, and , The weighting coefficients are set using the analytic hierarchy process.

[0047] The threshold R is set using characteristic curve analysis, and the comprehensive environmental anomaly index E is calculated. If the threshold R is normal, the behavior pattern analysis will begin. If the value is greater than the threshold R, it is abnormal. The abnormal state will be recorded and instruction generation will be paused. If the network is disconnected, the abnormal score will be stored in EEPROM (2KB) and synchronized to Firebase after the network is connected.

[0048] The web platform calls a local Gaussian Mixture Model (GMM, stored in SQLite) to analyze the temporal distribution of the user's most recent actions (e.g., the last 100 times) at the current time (e.g., high frequency between 18:00-22:00). It calculates the probability density of the behavioral pattern using a weighted sum of multiple Gaussian distributions, which serves as the behavioral pattern score. :

[0049] ;

[0050] in, The current operation time is obtained from the NodeMCU's RTC module. The weight of the k-th component of the GMM is obtained by training on historical operation time data using the Expectation-Maximization (EM) algorithm. Operation time The probability density under the k-th Gaussian distribution The mean operation time of the k-th Gaussian component (behavioral pattern) is... The time variance is obtained through the expectation-maximization algorithm. K is the number of GMM components, K=3, which represents the number of behavioral pattern components (morning, noon, and evening habits). It is set by the Bayesian Information Criterion (BIC). The GMM model is updated online every 24 hours (based on incremental learning).

[0051] The behavioral pattern scores (along with environmental and user feature data, including operation duration, device interaction frequency, and behavior type) obtained from the Geometric Matrix Model (GMM) are used as input to the Temporal Convolutional Neural Network (TCN). Each convolutional layer in the TCN uses causal convolution (ensuring the current output depends only on the current and previous inputs) and dilated convolution (allowing the network to expand its receptive field without increasing the number of parameters, thus capturing dependencies over a longer time span), extracting higher-level features layer by layer. The core of the TCN is its ability to handle long-term dependencies and capture the changing trends of user behavior over time, outputting a behavior confidence score that indicates whether the current operation conforms to the user's normal behavioral pattern. This score combines the behavioral pattern probability of the GMM with the TCN's predictive ability for time series data. After obtaining the scores from both the GMM and TCN, the outputs of the two models are fused using a weighted strategy to obtain the final confidence score. Threshold J is set using receiver operation characteristic curve analysis. <Threshold J, requiring the user to enter a verification code. After entering the verification code, the web platform will verify the user's identity. If the verification is successful, the next step of calculating the command execution flag will be performed; otherwise, the operation will be rejected; (generated by the web platform and sent to the user's mobile phone).

[0052] Logical condition-based fusion calculation command execution flag G:

[0053] ;

[0054] in, This is a command execution flag (1 for allow, 0 for deny). Verify the validity of the HMAC-SHA256 signature (verify the HMAC-SHA256-based signature, ensuring it contains information including user ID, timestamp, MAC address, and behavior entropy generation; according to the prescribed time rotation, after receiving the instruction, the NodeMCU compares the received signature with the locally calculated signature; if they match, then...) =1, instruction is reliable; otherwise =0, record an error). (where Q is the timestamp delay and Q is the timestamp threshold, set using statistical distribution analysis).

[0055] If the command execution flag is enabled, the Web platform generates an HMAC-SHA256 key (based on user_id + timestamp + MAC + behavior entropy, rotating every 5 minutes; behavior entropy is calculated by the GMM model (the entropy value of the operation time distribution)). The Web platform uses the key to encrypt the unlocking command content (a secure digital command containing user identity, action instructions, timestamp, environmental status, and behavior credibility, protected by HMAC-SHA256 encryption to ensure that the door lock only executes legal and secure commands) and generates a secure signature to ensure that the command is not tampered with. The unlocking command is uploaded to Firebase. If the network is disconnected, the NodeMCU stores the command in EEPROM.

[0056] If the conditions are not met, the web platform will not generate a key, will record the exception (stored in EEPROM), and will prompt the user that the verification failed (e.g., "Environmental abnormality").

[0057] This smart door lock control method integrates fingerprint image feature extraction (based on LBP algorithm), deep learning optimization (TensorFlow Lite + TCN), multimodal environment perception, behavior pattern modeling (GMM), dynamic credibility scoring and encryption verification (HMAC-SHA256), forming a four-level linkage mechanism of "fingerprint verification - environment detection - behavior analysis - security command generation". Through multi-dimensional data fusion and deep feature extraction, the system effectively improves the matching ability of low-quality or similar fingerprints, achieves accurate identification of environmental and behavioral anomalies, and ensures the timeliness and uniqueness of command execution through logical fusion condition judgment and time signature verification mechanism. It greatly enhances the security, accuracy and intelligent adaptability of the system in complex environments, and comprehensively overcomes the key shortcomings of existing technologies such as poor recognition robustness, weak perception ability, inability to model behavior and weak command verification mechanism. It has practical value and innovative significance.

[0058] S2. Obtain the unlocking command through NodeMCU, perform door lock operation and status verification, obtain the status verification result, update the user interface and trigger alarm operation;

[0059] Specifically, the NodeMCU obtains the unlocking command, performs door lock operations, and verifies the status. The NodeMCU polls Firebase via Wi-Fi to obtain encrypted commands. The NodeMCU sends a signal through pin D1 (PWM, GPIO5) to control the MG995 servo motor. If the command is "unlock," the motor rotates to 0° (0° = unlocked); if the command is "lock," the motor rotates to 180° (180° = locked) (driving the bolt fully into the lock cylinder, achieving physical locking). After the operation is complete, the NodeMCU reads the door status (closed = 1, open = 0) through pin D3 (door magnetic sensor) and detects the lock position through pin D5 (lock status button). The consistency verification formula is as follows:

[0060] ;

[0061] in, To verify the results, This is the actual angle of the servo motor (0° or 180°, detected by pin D5). The target angle (0° or 180°, as determined by the command). The gate magnetic state is (1 = closed, 0 = open, detected by pin D3).

[0062] If the verification passes ( =="success"), generate a status record, if the verification fails ( Error logs are generated and uploaded to Firebase. NodeMCU sends the execution results (data containing status information, such as status logs or error logs) to the Web platform via serial port (115200 baud rate).

[0063] Based on the precise control and state closed-loop verification mechanism of NodeMCU, the system drives the MG995 servo motor to achieve physical lock control by securely obtaining encrypted commands from Firebase. Combined with dual-channel state feedback from door magnets and servo angle buttons, a consistency verification model is constructed to ensure that the command execution result matches the physical state, significantly improving execution accuracy and security reliability. At the same time, the system supports status recording and anomaly reporting functions. Combined with serial communication and the Firebase cloud platform, the system achieves traceability and visual management of the door lock execution process, comprehensively making up for the shortcomings of existing smart door lock systems in command closed-loop verification, execution transparency, and remote status synchronization, and improving the system's intelligent response capability and practicality.

[0064] Furthermore, obtaining the status verification results, updating the user interface (UI), and triggering alarms refer to the web platform retrieving the latest verification data from Firebase at specified intervals via WebView. and The web platform displays "The door is securely locked" (green indicator, 16pt font). The system displays "Please check the door" (red alert, 16pt font). If Sresult="fail" or E>R, it displays "Abnormal alarm" (red alert, 16pt font). The UI content is updated according to the status verification logic.

[0065] ;

[0066] like or This triggers the alarm logic and uploads the anomaly details (including timestamp, specific anomaly type, etc.) to Firebase. The web platform then pushes a notification to the user via the FCM service (e.g., "Abnormal vibration, please check the door lock").

[0067] To address the common issues of delayed user feedback and untimely anomaly response in traditional smart lock systems, a real-time user interface (UI) update and alarm linkage mechanism driven by status verification results was constructed. The web platform obtains execution feedback by periodically polling Firebase and dynamically adjusts the UI display content based on status verification results and environmental anomaly scores. Dual prompts using color and text are used to improve user perception efficiency. At the same time, an FCM push service is introduced to immediately send alarm notifications to users when command failure or environmental anomalies are detected. This achieves closed-loop management from backend verification to user interface feedback, effectively improving the anomaly response speed and user experience of the lock system, and making up for the lack of real-time interaction and intelligent alarm mechanisms in existing systems.

[0068] S3. Calculate the anomaly classification score based on the alarm anomaly and take corresponding measures. Dynamically adjust the polling frequency based on the anomaly classification score.

[0069] Specifically, based on the alarm anomaly, an anomaly classification score is calculated and corresponding measures are taken. This involves the NodeMCU obtaining the latest anomaly details from Firebase via Wi-Fi and checking... Based on the exception type and frequency, calculate the exception classification score using UI / UX:

[0070] ;

[0071] in, For anomaly classification, a score of [0-1] is given. This represents the number of failures within a recently set timeframe (e.g., 1 hour) (recorded by EEPROM). This represents the total number of operations. and , The weighting coefficients are set using the analytic hierarchy process.

[0072] Set thresholds using the Youden Index method. ,like <threshold (e.g., "Door not closed"), NodeMCU automatically retryes the unlocking action (D1 pin drives MG995 servo motor, Web platform pushes FCM notification ("Please confirm door is closed before retrying").

[0073] like ≥threshold (e.g., security threats, such as continuous vibration) trigger a security response: The NodeMCU activates the buzzer via the D6 pin (e.g., 1000Hz, 5 seconds, 20mA), triggers the camera to record 30 seconds of video via the Matter protocol (e.g., 1080p, uploaded to Firebase, taking 5 seconds), and pushes an FCM notification to the Web platform ("Abnormal vibration detected, please check the door lock", delay <1 second).

[0074] An anomaly classification and scoring mechanism is introduced, which combines anomaly type and occurrence frequency. By setting weights and YoudenIndex thresholds, it intelligently distinguishes between "minor faults" and "serious threats" and takes graded response measures to achieve targeted handling and rapid response. This effectively improves the system's security defense capabilities and intelligent decision-making level, and overcomes the shortcomings of existing technologies such as crude anomaly handling and delayed feedback.

[0075] Furthermore, the polling frequency is dynamically adjusted based on the anomaly classification score, allowing NodeMCU to analyze response records and statistically analyze the anomaly frequency within a set time period. (EEPROM record), the web platform uses Zstandard compression (50% compression rate, reducing 200 bytes to 100 bytes) for the open lock command, generates a signature using HMAC-SHA256 (key: user_id + timestamp (current timestamp) + MAC), uploads it to Firebase, and NodeMCU... Dynamically adjust polling frequency:

[0076] like <threshold The polling frequency is set to a low frequency (relative to the normal operating frequency of the system, which is in a slower polling range, used for non-emergency and energy-saving scenarios, reducing Wi-Fi communication (saving power), while still meeting the user's operational needs (5-10 times per day in residential scenarios)).

[0077] like ≥threshold The polling frequency is set to a high frequency (relative to the default frequency, in the fast response range, used for high-risk events).

[0078] If the battery level is lower than the specified level (detected by pin A0), the NodeMCU enters Deep Sleep (e.g., current drops to 0.1mA), retaining only the RTC and fingerprint module (R305), pausing Wi-Fi polling until the battery is restored. When the network is disconnected, the NodeMCU caches the instructions to the EEPROM, synchronizes them to Firebase upon reconnection, and the web platform receives the execution results, updates the UI ("Door securely locked" or "Instruction execution failed"), and pushes an FCM notification ("Remote unlocking successful, battery restored"). % (Battery charge content).

[0079] The polling frequency dynamic adjustment mechanism based on anomaly classification and scoring intelligently switches between high and low frequency polling modes by analyzing the anomaly frequency and power status in real time: reducing the communication frequency to save power when the security risk is low or the power is insufficient, and increasing the polling frequency to achieve rapid response when the risk level increases. At the same time, it combines Zstandard compression and HMAC-SHA256 signature to improve communication efficiency and security, and automatically enters Deep Sleep mode when the power is critical to ensure that critical functions (such as fingerprint recognition) continue to operate. This effectively makes up for the shortcomings of rigid polling and insufficient power management in existing technologies, and significantly enhances the security and battery life of the system.

[0080] This embodiment also provides a remote smart door lock control system based on the Internet of Things, including:

[0081] The smart lock initial configuration and communication configuration module is used for user identity management, fingerprint enrollment, and management.

[0082] The multi-factor authentication and environment analysis module is used for model loading and inference, multimodal sensor reading, environmental status judgment and anomaly scoring, and unlocking action control.

[0083] The physical control and state consistency verification module is used for instruction polling and execution;

[0084] The alarm and security response module is used to trigger the buzzer and push abnormal notifications to the web platform upon anomaly detection;

[0085] The anomaly scoring and response strategy module is used to calculate anomaly classification scores based on anomaly frequency and to take corresponding strategies based on the scores.

[0086] This embodiment also provides a computer device applicable to the Internet of Things (IoT)-based remote smart door lock control method, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the IoT-based remote smart door lock control method proposed in the above embodiment.

[0087] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0088] This embodiment also provides a storage medium storing a computer program. When executed by a processor, the program implements the remote smart door lock control method and system based on the Internet of Things as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0089] In summary, this invention improves the accuracy of fingerprint recognition by integrating the Local Binary Pattern (LBP) algorithm with the TensorFlow Lite model and combining cosine similarity to optimize fingerprint matching confidence. This not only enhances the system's ability to identify low-quality fingerprint images and fingerprints with similar features, but also addresses the high false recognition rate of traditional methods. Furthermore, by learning the user's operation time distribution using a Gaussian Mixture Model (GMM) and analyzing behavioral continuity and stability using a Temporal Convolutional Neural Network (TCN), real-time modeling and confidence assessment of user behavior are achieved. This effectively prevents false triggering during abnormal periods or due to unusual behavior, improving the system's ability to identify illegal operations. By integrating multiple sensors such as door magnets, vibration sensors, and temperature and humidity sensors, and using a weighted algorithm and an environmental anomaly scoring model to analyze the door lock's environmental state in real time, this invention can effectively detect abnormal situations such as open doors or external damage, thus addressing the shortcomings of existing door lock systems in their lack of environmental awareness.

[0090] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A remote smart door lock control method based on the Internet of Things, characterized in that: include, The R305 fingerprint module collects the user's fingerprint feature value, encrypts the feature value using the AES-256 encryption algorithm and stores it in EEPROM, uses the TensorFlow Lite model for fingerprint matching, and integrates a multimodal sensor on the smart lock. Fingerprint matching confidence is calculated based on the LBP algorithm. The fingerprint matching confidence is then optimized using a TensorFlow Lite model combined with LBP and cosine similarity algorithms. After successful verification, environmental state detection is performed using an integrated multimodal sensor. Following successful environmental state detection, a behavioral pattern score is calculated using a GMM model. The GMM model's calculation results are then optimized using a temporal convolutional neural network. A command execution flag is calculated based on logical conditional fusion. If the command execution flag is enabled, an unlocking command is generated, including: When a user clicks the unlock button on the web page, the R305 fingerprint module is triggered to acquire a fingerprint. The NodeMCU loads the TensorFlow Lite model, reads the fingerprint baseline stored in the first step from the EEPROM, and calculates the fingerprint matching confidence based on the LBP algorithm. The TensorFlow Lite model combines the Local Binary Pattern (LBP) and cosine similarity algorithms to optimize fingerprint matching confidence. A threshold V is set; if the confidence P is lower than the threshold V, a failed attempt is recorded and an error is returned: "Fingerprint verification failed, please retry." If the confidence P is higher than the threshold V, the failure attempt is recorded and an error is returned: "Fingerprint verification failed, please retry." If the threshold V is reached, fingerprint verification is successful, triggering environmental status detection. The NodeMCU then reads the door status via the D3 pin. ,like Marked as closed, if The system directly marks environmental anomalies. Pin D5 collects vibration data and sets a threshold 0. If the frequency exceeds the set threshold 0, it is marked as abnormal. Pin D7 collects temperature and humidity data and sets thresholds C and T. If the temperature... Humidity greater than threshold C If the value exceeds a threshold T, it is marked as abnormal. By using a weighted linear combination to fuse normalized data from multiple sensors, the environmental anomaly index is comprehensively evaluated. ; The web platform calls a local Gaussian mixture model to analyze the temporal distribution of the user's most recent actions over time. It then calculates the probability density of the behavior pattern using a weighted sum of multiple Gaussian distributions, which serves as the behavior pattern score. The behavioral pattern scores obtained from the Gaussian Mixture Model (GMM) are used as input to a Temporal Convolutional Neural Network (TCN). Each convolutional layer in the TCN uses causal convolution and dilated convolution to extract higher-level features layer by layer, outputting a behavioral confidence score. The score combines the behavioral pattern probabilities of the GMM and the predictive power of the TCN for time series data. The outputs of the two models are then fused using a weighted strategy to obtain the final confidence score. Set a threshold J, if If the threshold J is less than the threshold, the user is required to enter a verification code. After entering the verification code, the web platform will verify the user's identity. If the verification is successful, the next step of calculating the command execution flag will be performed; otherwise, the operation will be rejected. Based on the logical condition fusion calculation command execution flag G, if the command execution flag is allowed, the Web platform generates an HMAC-SHA256 key. The Web platform uses the key to encrypt the unlocking command content and generates a secure signature. The unlocking command is uploaded to Firebase. If the conditions are not met, the Web platform does not generate a key, records the exception, and prompts the user that the verification failed. The NodeMCU obtains the unlocking command, performs door lock operations and status verification, obtains the status verification result, updates the user interface, and triggers alarm operations. Calculate anomaly classification scores based on alarm anomalies and take corresponding measures. Adjust the polling frequency dynamically based on the anomaly classification scores.

2. The remote smart door lock control method based on the Internet of Things as described in claim 1, characterized in that: The system collects user fingerprint feature values ​​via the R305 fingerprint module, encrypts the feature values ​​using the AES-256 encryption algorithm, and stores them in EEPROM. Fingerprint matching is performed using a TensorFlow Lite model. A multimodal sensor is integrated into the smart lock. When a user first accesses the system, they open a web platform under the local area network hotspot through a browser. The user scans a QR code to enter the web configuration page, inputs the home Wi-Fi SSID and password, and the NodeMCU connects to the internet via the ESP8266 and returns an HTTP status code 200. The NodeMCU control terminal connects to the multimodal sensors, including a door magnetic sensor, a vibration sensor, and a DHT22 temperature and humidity sensor. The lock body's built-in buzzer is controlled via the D6 pin. The sensors are connected via the NodeMCU's GPIO pins. Abnormal events are pushed to the backend in real time via the MQTT protocol and triggered by the platform. The camera is configured as a sub-device of the smart lock via the Matter protocol. The NodeMCU loads the TensorFlow Lite model, using the recorded fingerprint as the fingerprint baseline.

3. The remote smart door lock control method based on the Internet of Things as described in claim 2, characterized in that: The process of obtaining the unlocking command via NodeMCU, executing door lock operations, and verifying status involves NodeMCU polling Firebase via Wi-Fi to obtain encrypted commands. NodeMCU sends a signal through its D1 pin to control the MG995 servo motor. If the command is "unlock," the motor rotates to 0°; if the command is "lock," the motor rotates to 180°. After the operation is complete, NodeMCU reads the door status through its D3 pin and detects the lock position through its D5 pin, performing a consistency check calculation. If the verification passes, a status record is generated; if the verification fails, an error record is generated and uploaded to Firebase. NodeMCU then sends the execution result to the Web platform via serial port.

4. The remote smart door lock control method based on the Internet of Things as described in claim 3, characterized in that: The process of obtaining the status verification result, updating the user interface (UI), and triggering alarms refers to the Web platform obtaining the latest verification data from Firebase at specified intervals through WebView. and The web platform displays "The door is securely locked". If the status check result is "Please check the door", and if the status check result is "fail" or E>R, display "Abnormal alarm", update the UI display content according to the status check logic. or This triggers the alarm logic and uploads the exception details to Firebase. The web platform then pushes a notification to the user via the FCM service.

5. The remote smart door lock control method based on the Internet of Things as described in claim 4, characterized in that: The step of calculating anomaly classification scores and taking corresponding measures based on anomalies refers to NodeMCU obtaining the latest anomaly details from Firebase via Wi-Fi and checking them. Based on the anomaly type and frequency, calculate anomaly classification scores using UI and other methods. Set threshold ,like <threshold The NodeMCU automatically retryes the unlocking action if... ≥threshold The security response is triggered: the NodeMCU activates the buzzer through the D6 pin, triggers the camera to record 30 seconds of video through the Matter protocol, and pushes an FCM notification to the Web platform.

6. The remote smart door lock control method based on the Internet of Things as described in claim 5, characterized in that: The dynamic adjustment of the polling frequency based on anomaly classification and scoring refers to NodeMCU analyzing response records, statistically analyzing the anomaly frequency within a set time period, using Zstandard compression for the lock command on the web platform, generating a signature via HMAC-SHA256, uploading it to Firebase, and then NodeMCU... Dynamically adjust the polling frequency, if <threshold The polling frequency is set to a low frequency. ≥threshold The polling frequency is set to high. If the battery level is lower than the specified level, the NodeMCU enters Deep Sleep, retaining only the RTC and fingerprint module, suspending Wi-Fi polling until the battery is restored. When the network is disconnected, the NodeMCU caches the instructions to the EEPROM, synchronizes them to Firebase after the network is connected, and the Web platform receives the execution results, updates the UI, and pushes FCM notifications.

7. A remote intelligent door lock control system based on the Internet of Things (IoT), based on the remote intelligent door lock control method based on the IoT as described in any one of claims 1 to 6, characterized in that: include, The smart lock initial configuration and communication configuration module is used for user identity management, fingerprint enrollment, and management. The multi-factor authentication and environment analysis module is used for model loading and inference, multimodal sensor reading, environmental status judgment and anomaly scoring, and unlocking action control. The physical control and state consistency verification module is used for instruction polling and execution; The alarm and security response module is used to trigger the buzzer and push abnormal notifications to the web platform upon anomaly detection; The anomaly scoring and response strategy module is used to calculate anomaly classification scores based on anomaly frequency and to take corresponding strategies based on the scores.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the remote smart door lock control method based on the Internet of Things as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the IoT-based remote smart door lock control method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method, processor and computer readable medium for event prevention and prediction

    CN112842258A

  • Fingerprint detection method and device, chip, storage medium, fingerprint module and terminal

    CN117671746A

  • Intelligent lock multi-mode authority management and record tracing method and system

    CN119728301A