Intelligent lock energy consumption optimization control method and intelligent lock
By obtaining the user's historical behavior information to predict the unlocking time and method, and dynamically adjusting the working status of the smart lock module, the high energy consumption problem of the smart lock is solved and efficient energy consumption management is achieved.
Patent Information
- Application Number
- CN202511316582.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-16
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2045-09-16
AI Technical Summary
The identification module of existing smart locks is often open or polled at high frequency, which causes a surge in standby power consumption. In addition, when the modules work in parallel, ineffective energy consumption is serious, leading to high energy consumption problems.
By obtaining the user's historical behavior information, the time period and method of the user's next unlocking are predicted, and the working parameters of the sensor and recognition module are dynamically adjusted. The relevant modules are only started during the predicted time period, and enter low-power mode during other time periods.
The smart lock can respond with high precision during the predicted period and defend with low power consumption during the non-predicted period, thus reducing the standby energy consumption and improving the energy efficiency of the smart lock.
Smart Images

Figure CN120823657A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of smart lock technology, and in particular relates to a smart lock energy consumption optimization control method and a smart lock. Background Art
[0002] A smart lock is an intelligent device based on electronic technology, the Internet of Things, and biometric technology that replaces traditional mechanical locks to control door switches.
[0003] The core functionality of smart locks relies on identification modules that recognize users' fingerprints, passwords, NFC, and other authentication methods. In existing technologies, these modules are constantly on or frequently polled, leading to a surge in standby power consumption. Furthermore, each module operates in parallel, meaning that when one is triggered, others remain in standby mode, resulting in inefficient energy consumption. Consequently, existing smart locks suffer from a lag in the control strategies for the identification modules, leading to high energy consumption. Summary of the Invention
[0004] The embodiments of the present application provide a smart lock energy consumption optimization control method and a smart lock, which can solve the problem of high energy consumption caused by the lagging control strategy of the identification module of the smart lock.
[0005] In a first aspect, an embodiment of the present application provides a method for optimizing energy consumption control of a smart lock, comprising: Real-time acquisition of historical behavior information of users using the smart lock; Predicting first behavior information based on the historical behavior information; wherein the first behavior information includes a first time period for the user's next unlocking and a corresponding first unlocking method; During the first time period, when it is determined that the user is approaching the smart lock, performing a first operation according to the first unlocking method; wherein the first operation refers to activating the sensor module and the corresponding identification module of the smart lock; If it is not within the first time period and it is determined according to the real-time location information that the user is close to the smart lock, a second operation is performed and a third operation on the smart lock after the second operation is performed is received; wherein the second operation is to activate only the sensor module, and the third operation is an input signal from the user; The corresponding identification module is started based on the third operation.
[0006] The above technical solutions in the embodiments of the present application have at least the following technical effects: The smart lock energy consumption optimization control method provided in the embodiment of the present application obtains historical behavior information of the user using the smart lock in real time; predicts first behavior information based on the historical behavior information; performs a first operation according to a first unlocking method within a first time period if the user is determined to be close to the smart lock; performs a second operation and receives a third operation on the smart lock after the second operation is performed if the user is determined to be close to the smart lock outside the first time period; and activates a corresponding identification module based on the third operation. Therefore, the smart lock energy consumption optimization control method provided in the embodiment of the present application combines historical behavior information and real-time location information to form a dynamic strategy with high-precision response during the prediction period and low-power defense during the non-prediction period, which is conducive to reducing the standby energy consumption of the smart lock.
[0007] In a possible implementation of the first aspect, the method further includes: Adjust the working parameters of the smart lock according to the first behavior information; wherein, the working parameters include the working cycle of the identification module of the smart lock and the sampling frequency of the sensor module.
[0008] In a possible implementation of the first aspect, the historical behavior information includes multiple unlocking information, each of which includes the time and method of each unlocking by the user; and predicting the first behavior information based on the historical behavior information includes: Determine the associated features and user features of each unlocking information based on the historical behavior information; wherein the associated features include the time features and corresponding behavior features of the user using the smart lock, the behavior features are used to reflect the user's unlocking method, and the user features are used to reflect the user's behavior pattern; The first behavior information is obtained by prediction based on the association feature and the user feature.
[0009] In a possible implementation of the first aspect, determining the associated features and user features of each unlocking information based on the historical behavior information includes: Determining short-term features of each unlocking information based on each unlocking information in the historical behavior information; wherein the short-term features are used to reflect the local correlation of each unlocking information; Determining a long-term feature based on the short-term feature of each unlocking information; wherein the long-term feature is used to reflect the periodicity of each unlocking information; The short-term features and the long-term features are gated and fused to obtain the associated features of the smart lock.
[0010] In a possible implementation of the first aspect, determining the short-term feature of each piece of unlocking information based on each piece of unlocking information in the historical behavior information includes: Calculating a first correlation between each piece of unlocking information to obtain a feature matrix corresponding to each piece of unlocking information; wherein the first correlation is used to reflect the correlation between the time intervals of each piece of unlocking information and the corresponding unlocking methods within the second time period; The short-term feature of each unlocking information is obtained according to each feature matrix.
[0011] In a possible implementation of the first aspect, determining the long-term feature based on the short-term feature of each unlocking information includes: Calculating mutual information values between each unlocking information based on each short-term feature to obtain a feature vector corresponding to each unlocking information; Feature enhancement is performed on each of the feature vectors according to the similarity between the feature vectors to obtain the long-term feature of each unlocking information.
[0012] In a possible implementation of the first aspect, determining the associated features and user features of each unlocking information based on the historical behavior information further includes: Constructing a directed graph based on the time sequence of each unlocking information in the historical behavior information; Calculating attention weights between nodes with directed edges in the directed graph, and determining attention features of each unlocked information based on the attention weights; Aggregate the attention features to obtain the user features.
[0013] In a possible implementation of the first aspect, calculating attention weights between nodes having directed edges in a directed graph, and determining an attention feature of each piece of unlocking information based on the attention weights includes: Initialize each node in the directed graph based on each unlocking information to obtain the initial features of each node; The attention weights between nodes with directed edges in the directed graph are calculated, and the initial features of the nodes are updated according to the attention weights to obtain the attention features of each unlocked information.
[0014] In a possible implementation of the first aspect, the predicting based on the association feature and the user feature to obtain the first behavior information includes: Probability distribution information is predicted based on the associated features, the user features, and the most recent unlocking information; wherein the probability distribution information includes a probability distribution of a time period and an unlocking method for the user's next unlocking; The first behavior information is obtained according to the probability distribution information.
[0015] In a second aspect, an embodiment of the present application provides a smart lock energy consumption optimization control device, comprising: An acquisition module is used to obtain historical behavior information of users using the smart lock in real time; A prediction module, configured to predict first behavior information based on the historical behavior information; wherein the first behavior information includes a first time period for the user's next unlocking and a corresponding first unlocking method; A first operating module, configured to, within the first time period, perform a first operation according to the first unlocking method when determining that a user is approaching the smart lock; wherein the first operation refers to activating the sensor module and the corresponding identification module of the smart lock; a receiving module, configured to, when it is determined that the user is approaching the smart lock outside the first time period, perform a second operation, and receive a third operation of the user on the smart lock after the second operation is performed; wherein the second operation is to activate only the sensor module, and the third operation is an input signal from the user; A starting module is used to start the corresponding identification module based on the third operation.
[0016] In a third aspect, an embodiment of the present application provides a smart lock, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method described in any one of the first aspects above is implemented.
[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of the first aspects above is implemented.
[0018] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when run on a smart lock, enables the smart lock to execute any of the methods described in the first aspect above.
[0019] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0021] Figure 1 This is a flow chart of a smart lock energy consumption optimization control method provided by an embodiment of the present application; Figure 2 This is a schematic diagram of the implementation flow of step S200 in the smart lock energy consumption optimization control method provided in one embodiment of the present application; Figure 3 This is a schematic diagram of the implementation flow of steps S210, S211, S212, S215, and S220 in the smart lock energy consumption optimization control method provided in one embodiment of the present application; Figure 4 This is a schematic diagram of the structure of the smart lock energy consumption optimization control device provided in an embodiment of the present application; Figure 5 It is a structural diagram of the smart lock provided in an embodiment of the present application. DETAILED DESCRIPTION
[0022] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0023] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0024] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0025] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0026] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0027] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0028] In the prior art, the constant operation or high-frequency polling of identification modules causes a surge in standby power consumption. Furthermore, each identification module operates in parallel, so when one is triggered, the others remain in standby mode, resulting in inefficient energy consumption. Consequently, existing smart locks suffer from a lag in the control strategy for the identification modules, leading to high energy consumption.
[0029] To solve the above problems, the embodiments of the present application provide a method for optimizing energy consumption control of a smart lock and a smart lock. In this method, historical behavior information of the user using the smart lock is obtained; first behavior information is predicted based on the historical behavior information; within a first time period, when it is determined that the user is close to the smart lock, a first operation is performed according to a first unlocking method; if it is not within the first time period, when it is determined that the user is close to the smart lock, a second operation is performed and a third operation on the smart lock after the second operation is performed is received; and a corresponding identification module is started based on the third operation. Therefore, the method for optimizing energy consumption control of a smart lock provided by the embodiments of the present application combines historical behavior information and real-time location information to form a dynamic strategy of high-precision response in the prediction period and low-power defense in the non-prediction period, which is conducive to reducing the standby energy consumption of the smart lock.
[0030] The smart lock energy consumption optimization control method provided in the embodiment of the present application can be applied to a smart lock. In this case, the smart lock is the executor of the smart lock energy consumption optimization control method provided in the embodiment of the present application. The embodiment of the present application does not impose any restrictions on the specific type of the smart lock.
[0031] For example, a smart lock may include multiple sensor modules and multiple identification modules. The sensor modules are arranged on the outer panel of the smart lock, and the identification modules are built into the interior of the smart lock panel. The sensor modules and the identification modules are connected in a one-to-one communication manner. The sensor module is used to receive the user's input signal and can be a semiconductor capacitive sensor, a mechanical key matrix, a capacitive touch screen, or a face recognition camera, but is not limited to these. The identification module is used to analyze the user's input signal to determine whether to unlock the device. The identification module can be a capacitive fingerprint recognition module (including a fingerprint algorithm chip (such as ARM Cortex-M0)), a password recognition module (including a key scanning chip (such as TM1638)), a touch password / pattern recognition module (including a touch controller (such as STM32F407)), or a face recognition module (including a 3D structured light chip), but is not limited to these.
[0032] The smart lock may also include a communication module for supporting remote control such as a mobile phone APP, temporary password sharing, and simultaneous recording of unlocking, wherein the communication module may include a Bluetooth 5.0 chip (such as Nordic nRF52840) and a WiFi module; a lock body drive module for receiving control instructions sent by the main control board and driving the lock tongue to extend and retract to achieve unlocking / locking, wherein the lock body drive module may include a DC motor, a reduction gear set, and a lock tongue control board; a security alarm module for detecting illegal prying or continuous password errors, wherein the security alarm module may include an accelerometer, a trial and error locking chip, and a buzzer, etc.; environmental sensors, power supplies, and a main control board (MCU) responsible for coordinating the work of each module and processing data, etc., but not limited to these.
[0033] In order to better understand the smart lock energy consumption optimization control method provided in the embodiment of the present application, the specific implementation process of the smart lock energy consumption optimization control method provided in the embodiment of the present application is exemplarily introduced below.
[0034] Figure 1 A schematic flow chart of a smart lock energy consumption optimization control method provided in an embodiment of the present application is shown. The smart lock energy consumption optimization control method includes: S100, obtaining historical behavior information of users using smart locks in real time.
[0035] It can be understood that real-time acquisition of historical behavior information of users using smart locks means sensing user operations in real time through the sensor module of the smart lock, and synchronously recording the time and method of unlocking when the user successfully unlocks the lock.
[0036] For example, the smart lock's main control board communicates with the sensor module and identification module. The main control board can integrate a real-time clock (RTC) chip (such as a DS3231) to record the timestamp and unlocking method (fingerprint / password / NFC / Bluetooth) of each unlock. This data is uploaded to a cloud database or local storage via the smart lock's communication module and formatted as a structured log (such as JSON) to obtain historical behavior information. This historical behavior information can also be aggregated by user ID.
[0037] S200: Obtain first behavior information based on the historical behavior information, wherein the first behavior information includes a first time period for the user's next unlocking and a corresponding first unlocking method.
[0038] For example, time features (such as which hour time period, whether it is a weekday or a weekend, etc.) and unlocking method features (such as the frequency of various unlocking methods within a period of time) can be extracted based on historical behavior information. A time series model (such as an LSTM) is trained based on the historical behavior information: the time features of unlocking within a period of time (such as the sequence of time periods for each user to unlock within 30 days) are input, and the time period of the next unlocking is output (regression task). A classification model (such as a random forest) is trained based on the historical behavior information: the features of the most recent N unlocking times (such as the proportion of various unlocking methods used by each user to unlock within 30 days) are input, and the category of the next unlocking method is output (classification task) (wherein the MSE (mean square error) is used for time period prediction, and the cross entropy loss function is used for unlocking method prediction). The time features and unlocking method features of the most recent N unlocking times in the historical behavior information are respectively input into the time series model (such as the LSTM) and the classification model (such as the random forest) to predict the first time period and first unlocking method for each user's next unlocking.
[0039] S300: Within a first time period, if it is determined that a user is approaching the smart lock, performing a first operation according to a first unlocking method, wherein the first operation is to activate a sensor module and a corresponding identification module of the smart lock.
[0040] Exemplarily, a smart lock can communicate with an electronic device carried by a user and include environmental sensors (such as infrared sensors, Doppler microwave sensors, and Bluetooth sensors). The smart lock receives a user's location signal from the electronic device (this can be calculated based on the Bluetooth Low Energy (BLE) connection established between the smart lock and the user's electronic device, using the received signal strength indicator (RSSI) and time difference of arrival (TDOA) of the Bluetooth signal). The smart lock can also determine the user ID based on the user's electronic device, which can be a mobile phone, electronic watch, or tablet. The smart lock can also determine the user's location signal based on environmental sensors (such as detecting the duration of infrared (wavelength 9-10μm) signals radiated by the human body, or detecting the speed and direction of moving objects using Doppler frequency shift). Based on the location signal, the smart lock determines whether the user is close to the smart lock. For example, if the user's distance is determined to be ≤ 2 meters using Bluetooth RSSI or UWB ranging, and the current time is between 08:10 and 08:20, the semiconductor capacitive sensor and fingerprint recognition module are activated according to the first unlocking method in the first behavior information.
[0041] S400: If it is determined that the user is approaching the smart lock outside the first time period, a second operation is performed, and a third operation of the smart lock performed by the user after the second operation is performed is received. The second operation is to activate only the sensor module, and the third operation is an input signal from the user.
[0042] For example, when it is not within the first time period, only the environmental sensor in the first device is activated to monitor proximity events. After determining that the user is approaching, all sensor modules are started and the user is waited for to manually trigger the identification module. If there is no operation within 30 seconds, it enters the sleep state.
[0043] S500: Start a corresponding identification module based on the third operation.
[0044] For example, the user's unlocking method may be determined according to the third operation received by the sensor module, and the corresponding recognition module may be started.
[0045] In existing technologies, smart lock control methods typically employ fixed wake-up intervals or sensor triggering. All sensors (e.g., fingerprint sensors, infrared sensors, and password keypads) are kept in a low-power listening state for extended periods. Upon detecting a user action (e.g., a touch, a keypress), they are simultaneously awakened, and all identification modules (e.g., fingerprint recognition chips, password decoders, and NFC readers) are activated simultaneously. While the user may only use one unlocking method (e.g., fingerprint), all sensors and identification modules are awakened, resulting in significant inefficient power consumption. Furthermore, the system cannot be dynamically adjusted based on user behavior, leading to unnecessary power consumption. Current energy optimization approaches for smart locks typically consider overall user usage, without factoring in individual differences in user behavior (e.g., homecoming times and common unlocking methods).
[0046] To this end, each sensor module in this application connects to a unique identification module via a dedicated interface (such as UART or SPI), forming a one-to-one channel. Each sensor module can independently switch between low-power and high-response modes, reducing the number of invalid wake-ups of the smart lock's sensor and identification modules and lowering energy consumption. By aggregating data by user ID within historical behavior information, detailed data on each user's smart lock usage is collected, enabling a more accurate understanding of user behavior patterns. Based on historical behavior information, the first time period and corresponding first unlocking method for the user's next unlocking are predicted. This dynamically determines the user's likely unlocking time and method based on their historical behavior, rather than using a fixed wake-up interval. This avoids unnecessary wake-ups and reduces power consumption. When acquiring historical behavior information, data is aggregated by user ID, making each user's behavior data relatively independent and complete. Subsequent processing and analysis take into account individual differences between users, such as their return home times and common unlocking methods. This allows the prediction model to better adapt to the behavioral characteristics of different users, improving its generalization and enabling more accurate predictions of different users' unlocking behaviors.
[0047] In one possible implementation, see Figure 2 , the method further comprises: S600: Adjust operating parameters of the smart lock according to the first behavior information, wherein the operating parameters include a working cycle of the identification module and a sampling frequency of the sensor module of the smart lock.
[0048] Exemplarily, the operating parameters of the recognition module and the sensor module can be dynamically adjusted based on the predicted first behavior information (first time period, first unlocking method), and the operating parameters of the environmental sensor in the first device can be adjusted. For example, during the predicted first time period: the environmental sensor and the sensor module corresponding to the first unlocking method maintain a high sampling rate, and the recognition module corresponding to the first unlocking method (such as a face recognition camera) maintains a high-frequency wake-up only during the predicted first time period; during the non-first time period: the environmental sensor and each sensor module maintain a low sampling rate to save power consumption (such as the infrared sensor is reduced from 10Hz to 5Hz), and the recognition cycle of each recognition module is extended to reduce invalid wake-ups.
[0049] Through step S600, during the first predicted time period, the system assumes the user is about to arrive. Therefore, it increases the sampling rate and shortens the recognition cycle, entering "high-response mode" in advance to enable a quick response to the user's approach. High-frequency sensor sampling enables earlier detection of approaching behavior. High-frequency wakeup of the recognition module shortens the total time from approach to unlocking. During non-predicted time periods, the system defaults to "low-power mode," which reduces inefficient computations by extending the recognition cycle and reducing the sampling rate.
[0050] In one possible implementation, see Figure 2 The historical behavior information includes multiple unlocking information, and the unlocking information includes the time and unlocking method of each unlocking by the user. S200, based on the historical behavior information, the first behavior information is predicted, including: S210: Determine the associated features and user features of each unlocking information based on the historical behavior information. The associated features include the time features of the user using the smart lock and the corresponding behavior features. The behavior features are used to reflect the user's unlocking method, and the user features are used to reflect the user's behavior pattern.
[0051] It can be understood that historical behavior information includes the time and unlocking methods of multiple users using the smart lock.
[0052] For example, the timestamp can be decomposed into hours, days of the week, and whether it is a weekday based on historical behavior information to obtain time features, and the unlocking method can be one-hot encoded to obtain associated features. Based on historical behavior information, the historical behavior patterns of multiple users can be counted to obtain user features. For example, the unlocking method frequency: P (fingerprint) = 0.7, P (password) = 0.3, unlocking time period: peak period = 7:00-9:00 (accounting for 60%).
[0053] S220: Predict first behavior information based on the correlation feature and the user feature.
[0054] For example, a prediction model can be trained based on the associated features of data within each time period (such as 30 days) in the historical behavior information and the user features of different users. For example, a time series classification model (such as LSTM) or a gradient boosting tree (such as XGBoost) (the label is the time period (such as 08:00-09:00) and method (such as fingerprint) of the next unlocking, and a cross-entropy loss function is used to optimize the multi-classification task: time period classification, unlocking method classification). The associated features of the most recent period (such as 30 days) in the historical behavior information and the user features of different users are input. The prediction model outputs a probability distribution, and the highest probability is taken as the prediction result to obtain the first behavior information.
[0055] Through steps S210 to S220 above, user behavior exhibits periodicity (e.g., frequent fingerprint unlocking on weekday mornings). By decomposing timestamps into features such as hour and day of the week, the model can learn the pattern that fingerprint unlocking is more likely at 8:00 AM on Mondays. Behavioral features (e.g., unlocking method) directly reflect single-time actions and require one-hot encoding to avoid numerical bias (e.g., password = 2 should not be considered twice as likely as fingerprint = 1). User features (e.g., frequency of commonly used unlocking methods) reflect long-term behavioral patterns and are used to refine predictions (e.g., if a user uses fingerprint 90% of the time, the model should be more inclined to predict fingerprint unlocking). Combining time, behavior, and user features into a vector allows the model to capture the complex relationship between "specific time + specific user → specific unlocking method." Static historical data is combined with dynamic sensor data (e.g., Bluetooth RSSI) to avoid rigid predictions.
[0056] Optionally, see Figure 3 S210, determining the associated features and user features of each unlocking information based on the historical behavior information, including: S211: Determine short-term features of each unlocking information based on each unlocking information in the historical behavior information, wherein the short-term features are used to reflect the local correlation of each unlocking information.
[0057] For example, a sliding window can be set for the unlocking time series in the historical behavior information (such as the last five unlocking records) to extract local behavior patterns, namely short-term features, including: behavior continuity: counting the number of consecutive unlocking methods (such as fingerprints three times in a row); time interval pattern: calculating the mean and variance of the time intervals between adjacent unlocking methods (such as μ=36900s, σ=500s); local entropy: measuring the randomness of the unlocking method (such as fingerprints accounting for 80%, passwords accounting for 20%, and low entropy values indicating strong regularity).
[0058] S212: Determine a long-term feature based on the short-term feature of each unlocking information, wherein the long-term feature is used to reflect the periodicity of each unlocking information.
[0059] For example, Fourier transforms or seasonal decomposition (STL) can be used to extract long-term features. For example, an FFT of User A's unlocking time (in hours) over the past 30 days reveals significant cycles of 24 hours (daily) and 168 hours (weekly). Long-term feature extraction includes: peak hour frequency: calculating the percentage of unlocks during fixed daily hours (e.g., 7:00-9:00 AM); cycle strength: calculating the autocorrelation coefficient (e.g., the autocorrelation value for a 24-hour cycle is 0.85); and unlock method periodicity: calculating the percentage of fingerprints unlocked on Monday to Friday mornings (e.g., 90% on weekdays and 50% on weekends).
[0060] S213: Perform gated fusion on the short-term features and the long-term features to obtain the associated features of the smart lock.
[0061] For example, a gated recurrent unit (GRU) or attention mechanism can be used to dynamically adjust the weights of short-term and long-term features, and weighted fusion can be used to obtain the relevant features of the smart lock. If the current time is during the historical peak user period (such as 8:00), the weight of the long-term features is increased; if an abnormal time interval is detected (such as a 20-minute interval instead of the usual 9 hours), the weight of the short-term features is increased.
[0062] Through steps S211 to S213 above, the core of short-term features is to capture the local dynamics of user behavior. A sliding window is used to analyze the behavioral patterns of recent unlocks. By quantifying short-term features, the model can distinguish between "daily habits" and "temporary behaviors." For example, when a user suddenly changes their unlocking method, short-term features (such as high interval variance) will trigger anomaly detection. Long-term features aim to reveal the underlying cyclical patterns of user behavior. Their stability makes them an anchor for prediction, especially when data is sparse (such as for new users), relying on group cyclical patterns to initialize predictions. When an unusual time interval is detected (e.g., a user typically unlocks their phone every 12 hours, but only one hour has passed since their last unlock), the weight of short-term features is increased to quickly respond to behavioral changes. Long-term features dominate predictions during historically peak user times (e.g., Monday at 8:00 AM), minimizing short-term noise. The Transformer's attention score can be further incorporated to dynamically adjust weights based on the similarity between the unlock time and historical patterns (e.g., if the current time matches a historical Monday afternoon with a score of 0.85, the weight of the corresponding long-term feature is increased). Through gated fusion, the model can not only utilize historical periodic patterns, but also flexibly adapt to real-time behavioral changes. For example, when users temporarily adjust their work and rest schedules, the weight of long-term features can be gradually reduced to avoid prediction rigidity.
[0063] For example, see Figure 3 S211: Determine the short-term characteristics of each unlocking information based on each unlocking information in the historical behavior information, including: S2111: Calculate a first correlation between each piece of unlocking information to obtain a feature matrix corresponding to each piece of unlocking information, wherein the first correlation is used to reflect the correlation between the time intervals of each piece of unlocking information and the corresponding unlocking methods within the second time period.
[0064] For example, the first correlation measures the joint correlation between the time intervals and unlocking methods between each unlocking message within a second time period (e.g., the last hour or the last five unlocking attempts). For each unlocking message, we can backtrack to other unlocking messages within the second time period (e.g., the last five attempts) to form a subsequence. For each pair of unlocking messages in the subsequence, we calculate the time interval similarity and unlocking method similarity to obtain the joint correlation. For each unlocking message, the feature matrix is an N×N symmetric matrix representing the joint correlation of all unlocking pairs within the window.
[0065] S2112: Obtain short-term features of each unlocking information according to each feature matrix.
[0066] For example, for the feature matrix of each unlocking information, statistics (such as the trace, average value, proportion of elements exceeding a preset threshold, etc. of the feature matrix) can be extracted as short-term features.
[0067] Through steps S2111 to S2112 above, a weighted combination can be used to balance the importance of time and method. If the user habitually uses fingerprints at fixed intervals, the time interval similarity will dominate; if the user frequently switches methods, the weight of unlocking method similarity will increase. By aggregating the statistics of the feature matrix, short-term features can compress high-dimensional correlation information into low-dimensional vectors while preserving key patterns of local correlation (such as regularities and mutation points), providing a foundation for subsequent long-term feature fusion or anomaly detection.
[0068] For example, see Figure 3 S212: Determining long-term features based on the short-term features of each unlocking information, including: S2121 , calculating mutual information values between each unlocking information based on each short-term feature, and obtaining a feature vector corresponding to each unlocking information.
[0069] For example, the short-term features can be binned and discretized and converted into discrete symbols. For each pair of unlocking information, the frequency of the joint distribution of its short-term features is counted, and the mutual information value is calculated based on the marginal probability and joint probability of each pair of unlocking information to obtain the characteristic vector of the mutual information value corresponding to each unlocking information.
[0070] S2122: Perform feature enhancement on each feature vector based on the similarity between the feature vectors to obtain a long-term feature of each unlocking information.
[0071] For example, the cosine similarity or Euclidean distance can be used to calculate the similarity between each feature vector, the unlocked information is regarded as a graph node, the similarity is the edge weight, the Top-K similar edges (such as K=3) are retained, and the feature vectors of the neighboring nodes of the explanatory information are aggregated according to the similarity or dynamic weights are assigned using the attention mechanism. The aggregated vector is spliced with the short-term feature to obtain the long-term feature.
[0072] Through steps S2121 to S2122, the unlocked information is treated as a graph node, and similarity is used as an edge weight, allowing information to flow from similar nodes. Concatenating the original short-term features with the enhanced features preserves the original information while introducing global context.
[0073] Optionally, see Figure 3 S210, determining the associated features and user features of each unlocking information based on the historical behavior information, further comprising: S214: Construct a directed graph based on the time sequence of each unlocking information in the historical behavior information.
[0074] It can be understood that the directed graph includes a directed graph corresponding to each user ID in the historical behavior information.
[0075] For example, a directed graph may be constructed according to the time sequence of multiple unlocking information corresponding to each user ID in the historical behavior information.
[0076] S215, calculating the attention weights between nodes with directed edges in the directed graph, and determining the attention features of each unlocking information according to the attention weights.
[0077] For example, there can be a node pair (U_i, U_j) with a directed edge in a directed graph. For the edge U_i→U_j, the unnormalized attention weight is calculated using scaled dot product attention. For all outgoing edges of U_i, the attention weight is normalized using Softmax. The neighbor features of each unlocked information are aggregated according to the attention weight to obtain the attention feature.
[0078] S216: Aggregate the attention features to obtain user features.
[0079] It can be understood that the user features include user features corresponding to each user ID.
[0080] For example, the attention features corresponding to a certain user ID can be globally pooled (the mean or maximum value of all attention features can be taken). If the timing information needs to be retained, it can be further encoded using LSTM or Transformer, and LayerNorm or BatchNorm can be performed to obtain the user features corresponding to the user ID.
[0081] Through steps S214 to S216 above, the directed graph explicitly encodes the temporal dependencies of behaviors through edges. Compared to unordered sets, the graph structure preserves temporal context, facilitating subsequent analysis of behavioral patterns. Mean pooling is simple and efficient, suitable for short sequences; LSTM can be used to model temporal dependencies for long sequences. By modeling temporal sequences with a directed graph, capturing key dependencies through an attention mechanism, and aggregating to generate user-level features, the system can efficiently utilize historical behavioral information and adapt to dynamic scenarios.
[0082] For example, see Figure 3 , S215, calculate the attention weights between nodes with directed edges in the directed graph, and determine the attention features of each unlocking information according to the attention weights, including: S2151: Initialize each node in the directed graph based on each unlocking information to obtain an initial feature of each node.
[0083] For example, computable features (such as statistics and unlocking method type codes) can be extracted for each unlocking information, and the computable features after linear layer projection are assigned to corresponding nodes to form an initial node feature matrix of the directed graph.
[0084] S2152, calculate the attention weights between nodes with directed edges in the directed graph, and update the initial features of the nodes according to the attention weights to obtain the attention features of each unlocking information.
[0085] For example, the attention weight of the node can be calculated and normalized, the neighbor information can be aggregated according to the attention weight, and the initial features of the node can be updated to obtain the attention feature.
[0086] Through the above steps S2151 to S2152, by initializing semantically clear node features and using the attention mechanism to dynamically aggregate neighbor information, the temporal dependencies and key patterns in the unlocking behavior can be efficiently captured.
[0087] Optionally, see Figure 3 S220, predicting based on the correlation feature and the user feature to obtain first behavior information, including: S221: Probability distribution information is obtained based on the associated features, user features, and the most recent unlocking information, wherein the probability distribution information includes the probability distribution of the time period and unlocking method of the user's next unlocking.
[0088] It is understood that the most recent unlocking information may include the time and unlocking method of the last N unlocking times.
[0089] For example, the first behavior information can be obtained by concatenating three types of features: association features, user features for each user, and recent unlocking information. These features can be compressed into a unified dimension through a fully connected layer and then input into the prediction model. For example, the prediction model includes: a time prediction branch that uses Softmax to output the probability of a 24-hour time period (e.g., one probability value per hour); an unlocking method prediction branch that uses Softmax to output the probability of the unlocking method (e.g., fingerprint, password, facial recognition, etc.). The prediction model is jointly trained based on the association features of data within each time period (e.g., 30 days) in the historical behavior information, the user features of each user, and the recent unlocking information. The two branches share the underlying features, and the total loss is the weighted sum of cross-entropy.
[0090] S222: Obtain first behavior information according to the probability distribution information.
[0091] It is understandable that the first behavior information may include the time period and unlocking method for the next unlocking of different users.
[0092] For example, the probability distribution information can be used to determine the time periods and unlocking method combinations with the highest probability for different users to unlock the smart lock in the future (e.g., "3:00 PM - 4:00 PM + fingerprint unlock"). If the user ID has been determined in advance based on the electronic device the user carries, the user's predicted first behavior information is matched to determine whether they are within the first time period. If the user ID cannot be determined in advance, the predicted first behavior information of all users is used to determine whether the user's approach to the smart lock is within the first time period. Alternatively, a top-K behavior candidate (e.g., the top three high-probability user combinations) can be generated to obtain the first behavior information. If the highest probability falls below a preset threshold, it is marked as a "low confidence prediction."
[0093] Through steps S221 and S222 above, in a fully trained model, the highest-probability combination typically corresponds to the most likely behavior, and mispredictions should be avoided in data-sparse areas (such as 3:00 AM). For example, if historical data shows fewer than N early-night unlocks (e.g., 10), the model may be forced to output a low-confidence prediction. In this case, the prediction should be rejected rather than outputting an erroneous result. Multiple candidate behaviors can be generated for subsequent smart lock energy consumption planning.
[0094] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0095] Corresponding to the smart lock energy consumption optimization control method described in the above embodiment, the embodiment of the present application also provides a smart lock energy consumption optimization control device, and the various modules of the device can implement the various steps of the smart lock energy consumption optimization control method. Figure 5 A structural block diagram of the smart lock energy consumption optimization control device provided in an embodiment of the present application is shown. For the sake of convenience, only the parts related to the embodiment of the present application are shown.
[0096] Reference Figure 4 , the device comprises: An acquisition module is used to obtain historical behavior information of users using the smart lock in real time; A prediction module, configured to predict first behavior information based on the historical behavior information; wherein the first behavior information includes a first time period for the user's next unlocking and a corresponding first unlocking method; A first operating module, configured to, within the first time period, perform a first operation according to the first unlocking method when determining that a user is approaching the smart lock; wherein the first operation refers to activating the sensor module and the corresponding identification module of the smart lock; a receiving module, configured to, when it is determined that the user is approaching the smart lock outside the first time period, perform a second operation, and receive a third operation of the user on the smart lock after the second operation is performed; wherein the second operation is to activate only the sensor module, and the third operation is an input signal from the user; A starting module is used to start the corresponding identification module based on the third operation.
[0097] It should be noted that the information interaction, execution process and other contents between the above modules are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0098] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned device can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0099] The embodiment of the present application also provides a smart lock, Figure 5 This is a schematic diagram of the structure of the smart lock provided by an embodiment of the present application. Figure 5 As shown, the smart lock 5 of this embodiment includes: at least one processor 50 ( Figure 5 Only one is shown), at least one memory 51 ( Figure 5 Only one is shown) and a computer program 52 stored in the at least one memory 51 and executable on the at least one processor 50. When the processor 50 executes the computer program 52, the smart lock 5 implements the steps of any of the above-mentioned smart lock energy consumption optimization control method embodiments, or the smart lock 5 implements the functions of each module / unit in the above-mentioned device embodiments.
[0100] For example, the computer program 52 can be divided into one or more modules / units, which are stored in the memory 51 and executed by the processor 50 to complete the present application. The one or more modules / units can be a series of computer program instruction segments that can perform specific functions, and the instruction segments are used to describe the execution process of the computer program 52 in the smart lock 5.
[0101] The smart lock 5 includes a sensor and an analysis device, wherein the analysis device can be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server. The smart lock may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art will understand that Figure 5 It is only an example of the smart lock 5 and does not constitute a limitation on the smart lock 5. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, buses, etc.
[0102] The processor 50 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor.
[0103] In some embodiments, the memory 51 may be an internal storage unit of the smart lock 5, such as a hard drive or memory of the smart lock 5. In other embodiments, the memory 51 may also be an external storage device of the smart lock 5, such as a plug-in hard drive, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the smart lock 5. Furthermore, the memory 51 may include both the internal storage unit of the smart lock 5 and an external storage device. The memory 51 is used to store an operating system, application programs, a boot loader, data, and other programs, such as the program code of the computer program. The memory 51 may also be used to temporarily store data that has been output or is about to be output.
[0104] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0105] An embodiment of the present application provides a computer program product. When the computer program product is run on a smart lock, the smart lock implements the steps in any of the above method embodiments.
[0106] If the integrated unit is implemented as a software functional unit and sold or used as a standalone product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the process steps in the above-mentioned method embodiments by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to the smart lock, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, mobile hard drive, magnetic disk, or optical disk.
[0107] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0108] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0109] In the embodiments provided in this application, it should be understood that the disclosed smart locks and methods can be implemented in other ways. For example, the smart lock embodiments described above are merely illustrative. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0110] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0111] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A smart lock energy consumption optimization control method, characterized in that: Applied to smart locks; the method includes: Real-time acquisition of historical behavior information of users using the smart lock; Predicting first behavior information based on the historical behavior information; wherein the first behavior information includes a first time period for the user's next unlocking and a corresponding first unlocking method; During the first time period, if it is determined that the user is approaching the smart lock, performing a first operation according to the first unlocking method; wherein the first operation refers to activating the sensor module and the corresponding identification module of the smart lock; If it is determined that the user is approaching the smart lock during the first time period, a second operation is performed, and a third operation of the user on the smart lock after the second operation is performed is received; wherein the second operation is to activate only the sensor module, and the third operation is an input signal from the user; The corresponding identification module is started based on the third operation.
2. The smart lock energy consumption optimization control method according to claim 1, characterized in that: The method further comprises: Adjust the working parameters of the smart lock according to the first behavior information; wherein, the working parameters include the working cycle of the identification module of the smart lock and the sampling frequency of the sensor module.
3. The smart lock energy consumption optimization control method according to claim 1, characterized in that: The historical behavior information includes a plurality of unlocking information, wherein the unlocking information includes the time and unlocking method of each unlocking by the user; the first behavior information predicted based on the historical behavior information includes: Determine the associated features and user features of each unlocking information based on the historical behavior information; wherein the associated features include the time features and corresponding behavior features of the user using the smart lock, the behavior features are used to reflect the user's unlocking method, and the user features are used to reflect the user's behavior pattern; The first behavior information is obtained by prediction based on the association feature and the user feature.
4. The smart lock energy consumption optimization control method according to claim 3, characterized in that: The determining, based on the historical behavior information, the associated features and user features of each unlocking information includes: Determining short-term features of each unlocking information based on each unlocking information in the historical behavior information; wherein the short-term features are used to reflect the local correlation of each unlocking information; Determining a long-term feature based on the short-term feature of each unlocking information; wherein the long-term feature is used to reflect the periodicity of each unlocking information; The short-term features and the long-term features are gated and fused to obtain the associated features of the smart lock.
5. The smart lock energy consumption optimization control method according to claim 4, characterized in that: The determining of the short-term characteristics of each unlocking information based on each unlocking information in the historical behavior information includes: Calculating a first correlation between each piece of unlocking information to obtain a feature matrix corresponding to each piece of unlocking information; wherein the first correlation is used to reflect the correlation between the time intervals of each piece of unlocking information and the corresponding unlocking methods within the second time period; The short-term feature of each unlocking information is obtained according to each feature matrix.
6. The smart lock energy consumption optimization control method according to claim 4, characterized in that: The determining of the long-term feature based on the short-term feature of each unlocking information includes: Calculating mutual information values between each unlocking information based on each short-term feature to obtain a feature vector corresponding to each unlocking information; Feature enhancement is performed on each of the feature vectors according to the similarity between the feature vectors to obtain the long-term feature of each unlocking information.
7. The smart lock energy consumption optimization control method according to claim 3, characterized in that: The determining of the associated features and user features of each unlocking information based on the historical behavior information further includes: Constructing a directed graph based on the time sequence of each unlocking information in the historical behavior information; Calculating attention weights between nodes with directed edges in the directed graph, and determining attention features of each unlocked information based on the attention weights; Aggregate the attention features to obtain the user features.
8. The smart lock energy consumption optimization control method according to claim 7, characterized in that: The calculating the attention weights between nodes with directed edges in the directed graph, and determining the attention features of each unlocking information according to the attention weights, includes: Initialize each node in the directed graph based on each unlocking information to obtain the initial features of each node; The attention weights between nodes with directed edges in the directed graph are calculated, and the initial features of the nodes are updated according to the attention weights to obtain the attention features of each unlocked information.
9. The smart lock energy consumption optimization control method according to claim 3, characterized in that: The obtaining of the first behavior information by prediction based on the association feature and the user feature includes: Probability distribution information is predicted based on the associated features, the user features, and the most recent unlocking information; wherein the probability distribution information includes a probability distribution of a time period and an unlocking method for the user's next unlocking; The first behavior information is obtained according to the probability distribution information.
10. A smart lock comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Wireless unlocking method and device for intelligent door lock
CN109064608A
Hotel authentication management method, system and platform and hotel PMS system
CN111401160A
Intelligent lock control method and device, equipment and storage medium
CN113129479A
Intelligent lock low-power-consumption control method and device, intelligent lock and storage medium
CN115100759A
Door lock control method and device, storage medium, control equipment and door lock
CN115661980A