Password input mode control method and device, computer device, and storage medium

By acquiring historical usage information and real-time sensor data from smart locks, the risk of password leakage can be dynamically assessed and illegal activities can be monitored, thus solving the problem of rigid password verification mechanisms in smart locks and improving their security capabilities.

CN122241678APending Publication Date: 2026-06-19DESSMANN CHINA MACHINERY & ELECTRONICS

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DESSMANN CHINA MACHINERY & ELECTRONICS
Filing Date
2026-02-10
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing smart locks have rigid password verification mechanisms that lack the ability to analyze historical password usage and dynamically perceive the current unlocking environment, making it impossible to respond to potential security threats in a timely manner and resulting in a high risk of password leakage.

Method used

By acquiring information about the current password's usage in previous unlocking scenarios, combined with historical unlocking databases and real-time sensor data, the risk of password leakage is dynamically assessed, and unlocking modes, including identity recognition, environmental monitoring, and behavioral analysis, are disabled when unauthorized unlocking behavior is detected.

Benefits of technology

It enables intelligent and dynamic assessment of password security risks and real-time environmental threat awareness, enhancing the proactive defense capabilities of smart locks, avoiding user experience degradation caused by misjudgments, and promptly blocking potential attacks in high-risk scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122241678A_ABST
    Figure CN122241678A_ABST
Patent Text Reader

Abstract

This invention relates to the field of password verification technology, and discloses a password input mode control method, apparatus, computer device, and storage medium. The method includes: responding to an unlock request, obtaining usage information of the current password in its previous unlock scenario, and determining whether the current password has a risk of leakage based on the usage information; monitoring whether there is any illegal unlocking behavior in the current unlock space; if it is determined that the current password has a risk of leakage, and illegal unlocking behavior is detected in the current unlock space, then disabling the unlock mode corresponding to the current password. This invention solves the problem that the password verification mechanism in the prior art is rigid, lacks intelligence, and cannot dynamically respond to security threats by combining the historical usage risks of the password with the current environmental threats.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cryptographic verification technology, specifically to cryptographic input mode control methods, devices, computer equipment, and storage media. Background Technology

[0002] With the rapid development of smart home technology, smart locks have become increasingly popular due to their convenience. Among them, the numeric keypad password unlocking method is one of the most commonly used unlocking methods because it is simple to operate and eliminates the need to carry a physical key. However, during the password input process, the password can be easily spied on by those nearby, posing a security risk. Although some smart locks offer anti-spying features such as decoy passwords, the cumbersome operation reduces user willingness to use them, resulting in the risk of password leakage still existing.

[0003] In existing technologies, smart locks typically employ fixed password verification mechanisms, lacking the ability to analyze password usage history or dynamically perceive the current unlocking environment. The system cannot assess the risk of password leakage based on information from previous usage scenarios, nor can it automatically trigger corresponding security policies when it detects potential unauthorized unlocking activity within the current unlocking space. Users who wish to enhance security typically rely on manual settings or additional physical structures, which is not only inconvenient but also makes it difficult to respond promptly and intelligently to sudden security threats, resulting in limited overall security response capabilities. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a password input mode control method, apparatus, computer equipment, and storage medium to solve the problems of rigid and unintelligent password verification mechanisms in the prior art, which are unable to dynamically respond to security threats by combining historical password usage risks with current environmental threats.

[0005] In a first aspect, embodiments of the present invention provide a password input mode control method, applied to an electronic device, the method comprising:

[0006] In response to an unlock request, the system obtains usage information of the current password in its previous unlock scenario and determines whether there is a risk of leakage of the current password based on the usage information. Monitor whether there are any unauthorized unlocking attempts within the currently unlocked space; If it is determined that the current password is at risk of being leaked, and illegal unlocking behavior is detected in the current unlock space, then the unlocking mode corresponding to the current password is disabled.

[0007] Furthermore, the step of obtaining usage information of the current password in its previous unlocking scenario, and determining whether the current password is at risk of being leaked based on the usage information, includes: Extract the usage information of the current password in its previous unlocking scenario from the historical unlocking database, and determine the number of people in the unlocked space in the previous unlocking scenario based on the usage information; Based on the number of people, determine the identity information of at least one person; Based on the identity information, determine whether the current password is at risk of being leaked in its previous unlocking scenario.

[0008] Furthermore, the step of determining whether the current password poses a risk of leakage in its previous unlocking scenario based on the identity information includes: Based on the identity information, determine at least one identity category to which the at least one person belongs; The at least one identity category is matched with a pre-stored identity category to obtain the identity composition information within the unlock space; Based on the identity information, determine whether the current password is at risk of being leaked.

[0009] Furthermore, determining whether the current password poses a risk of leakage based on the identity information includes: If the identity information indicates that both authorized and unauthorized personnel exist within the unlock space, then the current password is deemed to be at risk of being leaked. If the identity information indicates that only unauthorized personnel exist in the unlock space, then it is further detected whether there is a bound terminal connected to the protected electronic device in the unlock space during the previous unlocking scenario; if so, it is determined that the current password is at risk of being leaked. If the identity information indicates that only authorized personnel exist in the unlock space, then it is further detected whether the risk recording mode was triggered within the preset time period of the previous unlock scenario; if it has been triggered, then it is determined that the current password is at risk of being leaked.

[0010] Furthermore, the monitoring of whether there is any unauthorized unlocking behavior within the currently unlocked space includes: Monitor password input requests for the electronic device; The key features in the password input request are analyzed, wherein the key features include at least one of the following: requester permissions, input mode, and environmental feature information of the current unlock space; Determine whether the key features match the preset abnormal features; When the key features match the preset abnormal features, it is determined that there is an illegal unlocking behavior in the current unlock space.

[0011] Furthermore, the preset abnormal features include: the requester's permission is unauthorized, and / or, the current behavior features of the input mode do not conform to the standard range of the security model, and / or, the environmental feature information of the current unlock space has abnormal changes compared with the environmental feature information of the previous unlock space.

[0012] Furthermore, after monitoring whether there is any unauthorized unlocking behavior within the current unlock space, the method further includes: When the aforementioned unauthorized unlocking behavior occurs, a security response operation will be performed; The security response operation includes: recording a security event log, which includes the characteristics, time, and associated password information of the illegal unlocking behavior; and / or, performing an alarm operation through the electronic device; and / or, activating a backup authentication method for the electronic device to replace the current password for unlocking verification.

[0013] Secondly, embodiments of the present invention provide a password input mode control device, applied to an electronic device, the device comprising: The acquisition module is used to, in response to an unlock request, acquire the usage information of the current password in its previous unlock scenario, and determine whether the current password is at risk of being leaked based on the usage information; The monitoring module is used to monitor whether there are any unauthorized unlocking attempts within the currently unlocked space; The execution module is used to disable the unlocking mode corresponding to the current password if it is determined that the current password is at risk of being leaked and illegal unlocking behavior is detected in the current unlocking space.

[0014] Thirdly, embodiments of the present invention provide a computer device, including: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the method described in the first aspect or any corresponding embodiment thereof.

[0015] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer instructions that cause a computer to perform the method described in the first aspect or any of its corresponding embodiments.

[0016] The method provided in this application has the following beneficial effects: The method provided in this application, by responding to unlocking requests and analyzing the usage information of the current password in the previous unlocking scenario, can dynamically and intelligently assess whether the password may have been spied on or leaked during use, thus realizing post-event tracking and proactive prediction of password security risks. By monitoring in real time whether there are illegal unlocking behaviors such as spying or tailgating in the current unlocking space, the system's ability to perceive threats in the real-time environment is enhanced, extending security protection from static verification to dynamic environment monitoring. By automatically disabling the unlocking mode corresponding to the password when the above two risk conditions are met simultaneously, adaptive triggering of security policies is achieved, which not only avoids the decline in user experience caused by misjudgment of a single risk, but also timely blocks potential attacks in high-risk complex scenarios, improving the overall authentication system's proactive defense capabilities and intelligent security level. Attached Figure Description

[0017] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating a password input mode control method according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating another password input mode control method according to an embodiment of the present invention; Figure 3 This is a structural block diagram of a password input mode control device according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] According to embodiments of the present invention, a password input mode control method, apparatus, computer device, and storage medium are provided. It should be noted that the steps shown in the flowcharts in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0021] This embodiment provides a password input mode control method, applied to electronic devices. Figure 1 This is a flowchart of a password input mode control method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps: Step S101: In response to the unlock request, obtain the usage information of the current password in its previous unlock scenario, and determine whether there is a risk of leakage of the current password based on the usage information.

[0022] In this embodiment, when an electronic device (such as a smart lock) responds to a new unlocking request, it does not simply perform a password comparison, but first performs a dynamic security risk assessment. This assessment is based on usage information generated during the previous successful unlock (i.e., the previous unlocking scenario). This usage information is a comprehensive dataset whose purpose is to reconstruct the environment and personnel context of the previous unlock to determine whether the password might have been spied on or leaked at that time. Its specific implementation includes: First, the system retrieves and extracts multi-dimensional usage information corresponding to the current password from the historical unlocking database, based on the scenarios recorded in the previous successful unlocking. This information includes at least environmental feature information (such as lighting and spatial point clouds) collected by built-in sensors (such as cameras and millimeter-wave radar), behavioral feature information of the user when entering the password (such as input timing patterns), and identity and quantity information obtained through analysis of the previous scenario data (such as the number of people and their identities determined by facial recognition or radar trajectory analysis). Then, a risk assessment of leakage is performed based on this usage information: first, each person present in the previous scenario is labeled with an identity category (such as authorized or unauthorized) based on their identity information, thus obtaining identity composition information; finally, the identity composition information is matched with preset risk rules (for example, if both authorized and unauthorized personnel were present in the previous scenario, the password is deemed to have a high risk of being leaked by onlookers), or a machine learning model is used to comprehensively evaluate the multi-dimensional information to determine whether the current password is at risk of leakage.

[0023] In addition, risk assessment can be performed through usage records: if the password is identified as high-risk in any previous unlocking scenario, it is determined that the password has a potential risk of leakage, and accordingly, the corresponding enhanced verification or alarm process is triggered in the current unlocking request.

[0024] As an example, at 3 PM, user B attempted to unlock the door using the same password "123456". The system responded to this request by first retrieving the record of the password's previous use. It found that user A had successfully unlocked their door this morning at 9 AM using the password "123456". Simultaneously, the smart lock's built-in camera captured a photo of the area in front of the lock, and millimeter-wave radar recorded two independent moving targets within the space. The system associated and stored the unlock time, password, environmental photo, and radar data as usage information. By analyzing the stored photos, the facial recognition module identified one person as user A (authorized user), while the other could not be matched with any registered user (unauthorized user). Therefore, based on the high-risk rule that the identity information included both authorized and unauthorized users, the system determined that the password "123456" had a high probability of being leaked during its previous use, i.e., there was a risk of leakage.

[0025] Step S102: Monitor whether there is any illegal unlocking behavior in the current unlock space.

[0026] It should be noted that monitoring for unauthorized unlocking activities within the current unlock space is a dynamic security awareness process targeting the current real-time unlocking environment. This action can be performed in parallel with the risk assessment based on historical usage information, or it can be triggered sequentially after the risk assessment is completed. Its core objective is to instantly capture suspicious activities during the current unlocking attempt.

[0027] In this embodiment, the system continuously or responsively scans and analyzes the current unlocking space (i.e., the real-time monitoring area in front of the door) using sensors and logic units integrated into electronic devices (such as smart locks). First, it monitors password input requests for electronic devices, which may originate from physical button triggers, touchscreen interactions, or remote access attempts. Next, it analyzes key features in these requests, extracted from the request event and accompanying sensor data. These features primarily include: the requester's permissions, such as determining whether the requesting device or person has pre-authorization through Bluetooth MAC address recognition or facial recognition; the current behavioral characteristics of the input mode, such as analyzing the input password rate, key pressure (if pressure sensing is supported), and whether there are any abnormal patterns in the input stream, such as tentative pauses or rapid, continuous erroneous attempts, deviating from user habits or security model standards; and environmental characteristics of the current unlocking space, such as the number, location, and movement trajectory of people in the space (e.g., someone lingering behind or to the side of the user for an extended period), obtained in real-time using cameras or millimeter-wave radar, and whether the ambient sound contains suspicious whispered conversations or suggestive keywords. Then, the system compares the analyzed key features with a predefined, preset abnormal feature library for judgment. These preset anomaly characteristics include: the requester is identified as a clearly unauthorized source; the input behavior exhibits machine characteristics of brute-force attack or screen recording replay; or the current environment's characteristics show statistically significant abnormal changes compared to the previous unlocking environment when unlocking was successful most recently (or historically normal) (such as a persistent heat source detected in a corner that should be unoccupied). When the key characteristics meet one or more preset anomaly characteristics, it is determined that there is illegal unlocking behavior in the current unlocking space.

[0028] As an example, when a user approaches the smart lock and triggers wake-up (generating an unlock request), the system simultaneously performs threat assessments from the previous unlocking scenario and abnormal behavior assessments for the current scenario. During the abnormal behavior assessment: the smart lock's millimeter-wave radar scans the area in front of the door in real time and detects that, in addition to user A facing the lock, there is a stationary person B about 1 meter to their side and rear (abnormal environmental characteristics: compared to user A's usual calm and collected unlocking scenarios, there is an additional stationary person nearby). Simultaneously, the system detects the start of password input, but analysis of the keystroke timing reveals that the first two inputs were incorrect and quickly deleted, while the third input was significantly slower than the user's historical average speed and accompanied by a short pause (abnormal current input behavior characteristics: inconsistent with user habits, suggesting nervousness or interference under the gaze of others). Although user A's facial recognition passes (the requester's permissions are authorized), considering both the abnormal environmental characteristics and the abnormal input behavior, the system determines that they meet the preset abnormal characteristics of potential spying, thus confirming the presence of unauthorized unlocking behavior within the current unlocking space.

[0029] Step S103: If it is determined that the current password is at risk of being leaked and illegal unlocking behavior is detected in the current unlock space, then the unlocking mode corresponding to the current password is disabled.

[0030] In this embodiment, the highest level of security response—disabling the unlock mode corresponding to the current password—is triggered only when both a risk of current password leakage (a potential threat based on historical usage information) and illegal unlocking behavior exist in the current unlock space (an immediate threat based on real-time perception) are simultaneously present. The disabling action is implemented by: temporarily removing the current password (i.e., the password the current unlock request attempts to use) from its list of valid password credentials (such as a fixed password list) or marking it as invalid in the password verification module of the electronic device; or directly locking the entire unlock mode associated with that password (e.g., completely disabling the numeric password input function). The system performs this operation by modifying internal status flags or access control lists. As a result, any subsequent verification request using that password will be directly rejected by the system and will fail authentication. The disabling can be temporary (e.g., only invalidating the current unlock session; or temporarily disabling the password for a period of time; or, given the risk of password leakage, prohibiting the device from unlocking for a period of time upon recognizing multiple consecutive failed inputs), or permanent until the administrator resets it. In addition, when or after the current password mode is disabled, the system can automatically activate and switch to a preset backup authentication method (such as a temporary password, biometric recognition, or dynamic token) to replace the disabled password for this unlock verification, thereby maintaining the availability of the device while ensuring security.

[0031] In this embodiment of the application, obtaining usage information of the current password in its previous unlocking scenario, and determining whether there is a risk of leakage of the current password based on the usage information, includes: Step A1: Extract the usage information of the current password in its previous unlocking scenario from the historical unlocking database, and determine the number of people in the unlocked space in the previous unlocking scenario based on the usage information.

[0032] Specifically, after the system responds to the unlock request and recognizes the current password, it queries the historical unlock database that records past successful unlock events. This database uses the password and timestamp as key indexes and stores usage information associated with each successful unlock. The usage information is a structured data packet, including at least: environmental snapshot data, such as still images or short video streams captured by the camera when unlocking is triggered, background audio clips recorded by the microphone, and spatial point cloud or heat map data collected by millimeter-wave radar and infrared sensors; behavior log data, such as the total input time for this unlock, the precise timestamp sequence of each keystroke (used to calculate intervals); and metadata results generated by the system's real-time analysis of the environment within the unlock space at the time of or after the unlock event, such as the number of people obtained by analyzing stored images or radar data at that time, and the detected human bounding box positions. Based on the current password and the timestamp of the previous unlock scenario (usually the record of the most recent successful use of this password), the system extracts the corresponding data packet from the database. Subsequently, the number of people in the unlocked space in the previous unlocking scenario is determined based on the usage information. This can be achieved in two main ways: First, directly read the result field corresponding to the number of people that has been stored in the historical record and was obtained from real-time analysis during the previous unlocking; second, if the result is not pre-stored in the historical record, the system retrieves the stored raw sensor data (such as images or radar point clouds taken during the previous unlocking) and performs post-analysis during this judgment. For example, it runs offline human detection algorithms on the images or performs cluster analysis on the point cloud data to recalculate the number of independent targets in the previous scenario, which is then used as the number of people.

[0033] Step A2: Determine the identity information of at least one person based on the number of people.

[0034] Specifically, based on the number of people in the unlocked space during the previous unlocking scenario, the system initiates a targeted data collection process to determine the identity information of at least one person. Identity information refers to characteristic data that can be used to distinguish an individual's identity; its main components are typically biometric information, such as facial images, voiceprint features, or fingerprints (if the device supports them). Once the system obtains that there were N people in the previous scenario (N≥1), it retrieves or triggers a deep analysis of the corresponding raw sensor data from the stored usage information based on this number. If the usage information already contains pre-processed image or audio data (e.g., multiple photos taken and cached during the previous unlocking), this data is directly extracted as the identity information to be analyzed. If the raw data is insufficient, it is necessary to reprocess the lower-level sensor records (such as raw video streams). Subsequently, targeted feature extraction and person differentiation are performed on this data: for example, running a face detection algorithm on stored images to locate and crop the facial region image of each individual person; or performing sound source separation and voiceprint feature extraction on audio clips. The goal is to ensure that a set of characteristic data (i.e., the identity information of at least one person) that corresponds to or at least covers a portion of the people is output and can be used for identity determination. In addition to facial recognition, gait recognition (analyzing the walking posture of people in previous scene videos) or wearable device identifiers (such as Bluetooth MAC addresses) can also be used as auxiliary identity information.

[0035] Step A3: Based on the identity information, determine whether there is a risk of leakage of the current password in its previous unlocking scenario.

[0036] By extracting information on the use of the current password in the previous scenario from the historical unlocking database, and determining the number of people in the unlocking space at that time, a key scenario-scale data foundation is provided for subsequent risk analysis. By determining the identity information of at least one person present based on the number of people, core biometric characteristics are provided for risk assessment to distinguish individual identities. Finally, based on this identity information, a comprehensive judgment is made on whether there is a risk of password leakage in the previous use. This realizes intelligent reasoning from historical environmental data to specific risk conclusions, making the judgment of leakage risk more evidence-based and objective.

[0037] In this embodiment of the application, determining whether the current password poses a risk of leakage in its previous unlocking scenario based on identity information includes: Step A301: Based on the identity information, determine at least one identity category to which at least one person belongs.

[0038] Specifically, identity categories are predefined discrete classifications based on the relationship between individuals and electronic devices (such as smart locks) authorization systems. Examples include authorized personnel (e.g., registered family members) and unauthorized personnel (e.g., strangers). Identity information can be processed by running identity recognition algorithms: if the identity information is a facial image, a pre-trained facial recognition model extracts feature vectors and compares them with feature templates in a local or cloud-based authorization database. If the similarity exceeds a threshold, the person is considered authorized; otherwise, they are considered unauthorized. For information where biometric features cannot be effectively extracted (e.g., severely obscured face), the person can be directly classified as unauthorized. More granular categories can also be introduced, such as temporary visitors (a subclass of authorized access with a time limit) or high-risk strangers dynamically labeled based on behavioral risk. Multimodal identity information can be integrated for comprehensive judgment; for example, combining voiceprint recognition and facial recognition results, if either modality is recognized as authorized, the person is deemed authorized. A continuous learning mechanism can be employed: when the same unauthorized person appears frequently, the system can categorize them as a frequently visited stranger and record their characteristics for subsequent risk pattern analysis.

[0039] Step A302: Match at least one identity category with a pre-stored identity category to obtain the identity composition information within the unlock space.

[0040] Specifically, the pre-stored identity categories do not refer to individual category labels, but rather to a set of pre-configured rules for defining different security scenarios. These rules describe specific combinations of identity categories, such as rule one: the set includes both authorized and unauthorized personnel. The matching process is executed by the electronic device's logic control unit (such as the main controller): it takes the identity categories of all personnel in the previous unlocking scenario as a set, and then compares it sequentially with each pre-stored rule to check which rule (or rules) the current category set matches. Upon successful matching, the output identity composition information is a structured description that not only indicates which rule was matched but also clarifies the specific category composition, such as "Matching rule one, composition: 1 authorized person and 1 unauthorized person coexisting." Alternatively, a rule engine can be used for matching, supporting rules with ranges of numbers (such as "Authorized personnel ≥ 2 and unauthorized personnel ≥ 1"), or weighted judgments can be made by combining other contextual information such as time and location during matching.

[0041] Step A303: Based on the identity information, determine whether there is a risk of the current password being leaked.

[0042] By processing and analyzing identity information, the authorized or unauthorized identity category of each person is determined, thereby clarifying the specific identity attributes of the personnel within the unlocked space and providing clear, labeled input for subsequent logical matching. By matching the obtained set of identity categories with pre-stored rules, identity composition information such as the coexistence of authorized and unauthorized individuals is obtained, establishing an accurate correlation between the actual personnel composition and the preset security scenario. Finally, based on this identity composition information, it is determined whether there is a risk of password leakage, making the risk assessment more consistent with the actual personnel identity combination scenario, thus improving the logic and accuracy of the judgment.

[0043] In this embodiment of the application, determining whether the current password poses a risk of leakage based on identity composition information includes: Scenario 1: If the identity information indicates that both authorized and unauthorized personnel exist within the unlocked space, then the current password is deemed to be at risk of being leaked. Scenario 2: If the identity information indicates that only unauthorized personnel exist in the unlock space, further investigation will be conducted to determine whether there was a bound terminal connected to the protected electronic device in the unlock space during the previous unlocking scenario; if so, it will be determined that the current password is at risk of being leaked. Scenario 3: If the identity information indicates that only authorized personnel exist in the unlocked space, then further check whether the risk recording mode was triggered within the preset time period of the previous unlocking scenario; if it has been triggered, then it is determined that the current password is at risk of being leaked.

[0044] Specifically, regarding scenario one: when the identity information clearly indicates that both authorized and unauthorized personnel were present in the unlocked space during the previous unlocking scenario, the current password will be directly deemed to be at risk of leakage. Authorized personnel refer to registered users identified by the system and possessing regular permissions to use a fixed password; unauthorized personnel include individuals identified as strangers or unidentifiable individuals. Upon receiving the identity information (e.g., "one authorized person and one unauthorized person coexisting"), the risk assessment module directly compares it with pre-stored high-risk scenario rules. These rules are essentially a logical abstraction of the existence of unauthorized bystanders. Once a match is found, without any additional verification conditions, the assessment module immediately outputs a Boolean signal indicating a risk of leakage or a risk level indicator. In addition, a risk level mechanism can be introduced, such as classifying high, medium and low risk based on the number of unauthorized personnel, their relative position (e.g., directly behind the user) or behavioral characteristics (e.g., continuously staring at the keyboard); combining time decay factors, assigning higher risk weights to such scenarios that have occurred recently; further distinguishing unauthorized personnel subcategories (e.g., marked suspicious persons) in the identity composition information, and using different risk thresholds for different subcategories.

[0045] Specifically, for scenario two: when the identity information indicates that only unauthorized personnel were present in the previous unlocking scenario, supplementary verification is initiated: This involves detecting whether a bound terminal connected to a protected electronic device existed within the unlocking space during the previous unlocking scenario. Here, a bound terminal specifically refers to a personal electronic device (such as a smartphone, smartwatch, or dedicated Bluetooth key) that has been paired and registered with the smart lock and is typically carried by the authorized user. This is achieved by extracting wireless signal logs (such as Bluetooth scan records and Wi-Fi detection records) from the stored usage information before and after the previous unlocking timestamp, and checking for the presence of a unique identifier for a bound terminal (such as a Bluetooth MAC address or device name). If at least one bound terminal is detected to have a valid wireless connection with the smart lock during this time period (such as Bluetooth pairing or being within a detectable short range), it is determined that a bound terminal exists. The logic behind this determination is that the presence of a bound terminal indirectly suggests that its owner (i.e., the authorized user) is likely also within the unlocking space, but was not successfully identified as an authorized person by the visual system due to facial obstruction, being facing away from the camera, or other reasons. In this scenario, the previous unlock still constitutes a high-risk situation where an authorized user was present but an unauthorized person was observing, posing a potential threat of password eavesdropping. Therefore, the current password is deemed to be at risk of leakage. Additionally, a signal strength index (RSSI) threshold can be used to determine if the terminal was indeed within close-range unlocking space; the terminal's connection status must have remained active throughout the entire input process of the previous unlock; and different confidence weights should be assigned to different detected terminal types.

[0046] Specifically, for scenario three: when the identity information indicates that only authorized personnel existed in the previous unlocking scenario (i.e., all identified personnel were registered users), supplementary verification based on user-initiated feedback is initiated: This checks whether a risk recording mode was triggered within a preset time period of the previous unlocking scenario. The preset time period refers to a short period (e.g., 10 seconds) before the previous unlocking operation began and a short period after the operation was completed. The risk recording mode is triggered by the authorized user and is used to mark the system status where there may be special security threats in the current unlocking scenario (e.g., suspected covert filming, remote monitoring, etc.). It is implemented as follows: after each unlock, the system checks whether the usage information associated with that unlocking event contains a specific risk marker or event log. This marker is activated by the user within the preset time period by performing a predefined sequence of operations (e.g., quickly entering "##" on the keypad, clicking the "Mark Unsafe" button via the associated mobile app, or speaking a specific voice command). If, when tracing previous scenario data, it is detected that the risk marker has been set or a corresponding trigger event has been recorded, then it is determined that the risk recording mode has been triggered. The logic for this determination is: although all personnel present are trusted authorized users, the user, based on direct perception of the environment, actively judges that there is a risk of the password being leaked through additional means during this password input process, and therefore determines that the current password is at risk of being leaked. In addition, it supports multiple risk recording triggering methods to adapt to different scenarios; allows users to select subcategories for triggered risk records (such as "visual spying" or "audio eavesdropping"); and can automatically enhance the recording of environmental data for this unlocking process by combining the risk marker (such as initiating recording from additional angles or encrypting and storing operation videos).

[0047] By stipulating that if the identity information indicates the presence of both authorized and unauthorized personnel within the unlocked space, a direct assessment of the potential for data breach is made. This allows for the rapid and automatic identification of the most common high-risk scenarios, such as the presence of others, enabling immediate response to primary threats. Furthermore, by specifying that if only unauthorized personnel are present, the presence of bound terminals is further detected and assessed accordingly. This allows for the intelligent inference of potential risks associated with accompanying visitors, even when authorized users are not identified due to obstruction, by leveraging the indirect evidence of their presence. This avoids missed detections. Finally, by specifying that if only authorized personnel are present, the presence of risk recording modes is further detected and assessed accordingly. Even in scenarios where everyone is trusted, this approach respects and responds to higher-level security judgments made by users based on their subjective awareness. This achieves a flexible combination of automated risk perception and user-defined risk marking. These three progressively layered assessment logics comprehensively cover the risk assessment needs under different personnel compositions.

[0048] In this embodiment of the application, monitoring whether there is any unauthorized unlocking behavior within the currently unlocked space includes: Step B1: Monitor password input requests for electronic devices.

[0049] Specifically, a password input request refers to any initial signal or action intended to initiate a password verification process to unlock an electronic device (such as a smart lock). At the physical level, when a user operates the device through its physical input components (such as a numeric keypad, fingerprint sensor, or contact sensor on the door handle), the corresponding hardware circuitry generates a level change or interrupt signal. At the software or logic level, the device's microcontroller or main processor reads and analyzes the state changes of these input components in real time through hardware interrupt service routines or software polling. When an event matching the characteristics of an input start is detected (such as pressing the first password key, touching the active area of ​​the screen, or a remote terminal sending a data packet containing the password field), a password input request is identified. The source of this request is not limited to local physical operations; it can also originate from remote unlocking commands sent by authorized mobile applications or web services connected via a network (such as Wi-Fi or Bluetooth).

[0050] Step B2: Parse the key features in the password input request, wherein the key features include at least one of the following: the requester's permissions, the input mode, and the environmental features of the current unlock space.

[0051] Specifically, the password input request is analyzed to extract key features. These features are multi-dimensional indicators extracted from the request event itself and its context to assess the legitimacy of the behavior. These features include: the requester's authority, i.e., whether the entity initiating the password input request has legitimate authorization, which can be determined through real-time facial recognition, voiceprint verification, and accompanying verification via bound terminals (such as smartphone Bluetooth connection); the current behavioral characteristics of the input pattern, i.e., analyzing the dynamic behavioral patterns during the password input process, including but not limited to the timing characteristics of key presses (such as input speed, statistical distribution of key intervals), physical characteristics of input (such as the pressure distribution on pressure-sensitive keyboards), and the completeness of the input process (such as whether there are multiple deletions and re-entries). These features will be compared with a pre-established legitimate user security model; and environmental characteristics of the current unlocking space, i.e., real-time unlocking space status data collected by various sensors during the password input request, such as the number and spatial distribution of people obtained through cameras, micro-motion information obtained through millimeter-wave radar, and abnormal sound sources obtained through microphone arrays (such as whispered conversations). The parsing process is typically performed by the device’s embedded processor or coprocessor and involves signal processing, feature extraction, and pattern recognition algorithms.

[0052] Step B3: Determine whether the key features match the preset abnormal features.

[0053] In this application embodiment, the preset abnormal features include: the requester's permission is unauthorized, and / or the current behavior features of the input mode do not conform to the standard range of the security model, and / or the environmental feature information of the current unlock space has abnormal changes compared with the environmental feature information of the previous unlock space, and then it is determined to meet the preset abnormal features.

[0054] Specifically, preset anomaly features are a set of rules or feature models predefined in the system security policy library, describing various anomaly indicators that constitute potential unauthorized unlocking behavior. The judgment process is executed by the device's analysis module (such as a security coprocessor or dedicated logic unit), which is implemented by comparing or comprehensively evaluating each parsed key feature (such as unauthorized requester permissions, input intervals significantly lower than historical averages, and additional stationary personnel detected in the environment) with the corresponding entries in the preset anomaly feature library. For requester permissions, it is checked whether they explicitly match the unauthorized anomaly state; for the current behavioral characteristics of the input pattern, statistical methods (such as calculating Z-score) or pattern matching algorithms are used to determine whether it significantly deviates from the standard range of the security model established based on legitimate user habits; for the environmental feature information of the current unlocking space, it is compared and analyzed with the environmental feature information of the previous unlocking environment (such as baseline number of personnel, spatial layout) (such as calculating feature vector distance) to detect whether there are statistically significant abnormal changes. If one or more of the above key features are determined to meet the corresponding preset anomaly features, the overall judgment is that it meets the preset anomaly features.

[0055] By defining unauthorized requests as a preset anomaly feature, illegal requests from unknown or unverified sources can be directly identified, blocking security risks at the requester level. Similarly, defining input patterns that do not conform to the security model's standard range as a preset anomaly feature effectively detects abnormal input patterns such as brute-force attacks, screen recording replays, or coerced input, identifying potential attacks from the user's dynamic behavior. Furthermore, defining abnormal changes in the current environment compared to the previous environment as a preset anomaly feature allows for the keen detection of new bystanders, hidden devices, and other environmental changes within the unlocked space, uncovering spying threats at the physical environment level. These three types of features together constitute a multi-dimensional anomaly judgment standard covering permissions, behavior, and environment, making the monitoring of illegal unlocking behavior more comprehensive and accurate.

[0056] Step B4: When the key features match the preset abnormal features, it is determined that there is an illegal unlocking behavior in the current unlock space.

[0057] Specifically, the security decision module receives the judgment result (i.e., a Boolean value indicating compliance or non-compliance). If the result is compliance, the decision logic is triggered, generating a status flag or event signal indicating "illegal unlocking behavior exists." This decision process not only relies on the compliance of a single feature but also supports a comprehensive judgment of multiple key anomalies: for example, even if the requester's permissions are not explicitly defined as abnormal (e.g., failure to identify in real time), if the input pattern and environmental characteristics are highly abnormal simultaneously (e.g., the input behavior is extremely inconsistent with user habits and there are suspicious bystanders in the environment), it can still be comprehensively judged as meeting the overall abnormal characteristics, thereby determining the existence of illegal behavior.

[0058] By monitoring password input requests for electronic devices, any initial behavior intended to unlock the device can be captured in real time, providing a clear starting point for subsequent analysis. By analyzing key features in the request (such as requester permissions, input behavior patterns, and environmental information), quantitative indicators for evaluating the legality of the behavior can be extracted from multiple dimensions, including the request source, user behavior, and the surrounding environment. By determining whether these key features meet preset abnormal features, accurate compliance diagnosis and anomaly identification of the current unlocking behavior can be performed. Finally, when the key features are determined to meet abnormal features, it is determined that there is illegal unlocking behavior in the current unlocking space, making the identification of "illegal behavior" based on a solid foundation of multi-dimensional feature analysis, and the conclusion more reliable.

[0059] In this embodiment of the application, after monitoring whether there is an unauthorized unlocking behavior in the current unlock space, the method further includes: when an unauthorized unlocking behavior exists, performing a security response operation; wherein, performing a security response operation includes: recording a security event log, the security event log including the characteristics, time and associated password information of the unauthorized unlocking behavior; and / or, performing an alarm operation through the electronic device; and / or, activating a backup authentication method for the electronic device to replace the current password for unlock verification.

[0060] Specifically, upon determining that an unauthorized unlocking activity exists within the currently unlocked space, an independent security response operation is triggered. This operation aims to provide immediate alerts, preserve evidence, and offer alternative solutions for possible subsequent verification. Its implementation includes the parallel or sequential execution of one or more of the following actions: Recording Security Event Logs: The system writes detailed information about the unauthorized unlocking event into a protected security event log file or database in a structured manner. This log includes at least: the characteristics of the unauthorized unlocking behavior (i.e., specific key anomalies, such as "unauthorized request," "abnormal input sequence," "detected bystander"), the time (precise timestamp), and associated password information (such as the password hash or its identifier). This log is typically stored in the device's non-volatile memory and can be optionally encrypted and managed with cyclic overwrite for post-event security auditing and behavioral analysis.

[0061] The system executes alarm operations through electronic devices: it drives the local alarm unit of the electronic device (such as a bright flashing LED indicator, a high-decibel buzzer, or a voice warning) and / or sends an instant alarm push notification to a pre-bound remote management terminal (such as the user's smartphone APP) via a network connection, so as to alert the user and surrounding personnel to the detected security threat in a visual, audible, or tangible way.

[0062] Activate alternative authentication methods for electronic devices to replace the current password for unlocking verification: Upon detecting unauthorized activity or during subsequent unlocking attempts, automatically switch valid authentication credentials from the risky traditional password to one or more pre-configured alternative authentication methods. This could include forcing a temporary password input mode (such as requiring a one-time dynamic password), switching to biometric authentication (such as fingerprint or facial recognition), or requiring multi-factor authentication (such as password + mobile verification code). This switching aims to immediately bypass the current password, which may have been compromised or is under attack, enhancing immediate security.

[0063] By recording security event logs containing behavioral characteristics, time, and associated password information after detecting unauthorized unlocking behavior, a complete chain of security event evidence can be preserved, providing structured data support for post-event tracing, security auditing, and attack pattern analysis. By driving electronic devices to perform audible and visual alarms, it can immediately deter potential unauthorized actors on-site and provide emergency security alerts to surrounding personnel and remote users. By automatically activating backup authentication methods such as temporary passwords and biometrics to replace currently exposed passwords, it can immediately switch verification credentials to a more secure and undisclosed channel without interrupting authentication services. This directly enhances the system's real-time defense level while identifying threats, achieving a closed-loop security enhancement from threat detection to dynamic response.

[0064] As an example, such as Figure 2 As shown, the smart lock first triggers the unlocking process via radar, then wakes up the device and broadcasts a Bluetooth signal. The system first checks if the Bluetooth connection is successful. If the connection is unsuccessful, it directly enters the password verification stage. If the connection is successful, it further uses radar to sense whether multiple people are in the unlocking space. When multiple people are detected, the system automatically activates the temporary password mode and prompts the user. Then it checks if the user double-clicks the back button. If the user performs the double-click back button operation, it exits the temporary password mode. Regardless of whether the temporary mode is exited, it finally enters the password verification step. Once the password is verified correctly, the unlocking is completed, and the process ends.

[0065] When the smart lock is in temporary password input mode, monitoring the operation sequence on the input device can obtain the user's mode switching operation intention in real time; detecting whether the operation sequence conforms to the preset operation sequence can ensure the accuracy of the mode switching operation and avoid mode confusion caused by accidental triggering; if it conforms to the preset operation sequence, the smart lock is controlled to switch from temporary password input mode to fixed password input mode, allowing users to quickly switch back to fixed password mode from temporary mode, improving the convenience and flexibility of mode switching.

[0066] This embodiment also provides a password input mode control device, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0067] This embodiment provides a password input mode control device, applied to electronic devices, such as... Figure 3 As shown, it includes: The acquisition module 31 is used to respond to the unlock request, acquire the usage information of the current password in its previous unlock scenario, and determine whether there is a risk of leakage of the current password based on the usage information; Monitoring module 32 is used to monitor whether there is any unauthorized unlocking behavior in the current unlock space; Execution module 33 is used to disable the unlock mode corresponding to the current password if it is determined that there is a risk of leakage of the current password and illegal unlocking behavior is detected in the current unlock space.

[0068] In this embodiment of the application, the acquisition module 31 is specifically used to extract the usage information of the current password in its previous unlocking scenario from the historical unlocking database, and determine the number of people in the unlocking space in the previous unlocking scenario based on the usage information; determine the identity information of at least one person based on the number of people; and determine whether there is a risk of leakage of the current password in its previous unlocking scenario based on the identity information.

[0069] In this embodiment of the application, the acquisition module 31 is specifically used to determine at least one identity category to which at least one person belongs based on the identity information; match at least one identity category with pre-stored identity categories to obtain identity composition information within the unlock space; and determine whether there is a risk of leakage of the current password based on the identity composition information.

[0070] In this embodiment, the acquisition module 31 is specifically used to determine that the current password is at risk of leakage if the identity composition information indicates that both authorized and unauthorized personnel exist in the unlock space; if the identity composition information indicates that only unauthorized personnel exist in the unlock space, it further detects whether there is a bound terminal connected to the protected electronic device in the unlock space during the previous unlocking scenario; if so, it determines that the current password is at risk of leakage; if the identity composition information indicates that only authorized personnel exist in the unlock space, it further detects whether a risk recording mode has been triggered within a preset time period of the previous unlocking scenario; if it has been triggered, it determines that the current password is at risk of leakage.

[0071] In this embodiment of the application, the monitoring module 32 is specifically used to monitor password input requests for electronic devices; parse key features in the password input request, wherein the key features include at least one of the following: requester permissions, input mode, and environmental feature information of the current unlock space; determine whether the key features meet preset abnormal features; and when the key features meet preset abnormal features, determine that there is an illegal unlocking behavior in the current unlock space.

[0072] The preset abnormal characteristics include: the requester's permission is unauthorized, and / or, the current behavior characteristics of the input mode do not conform to the standard range of the security model, and / or, the environmental characteristic information of the current unlock space has abnormal changes compared with the environmental characteristic information of the previous unlock space.

[0073] In this embodiment of the application, the device further includes: a security response module, used to perform a security response operation when an unauthorized unlocking behavior occurs; wherein, performing the security response operation includes: recording a security event log, the security event log including the characteristics, time and associated password information of the unauthorized unlocking behavior; and / or, performing an alarm operation through the electronic device; and / or, activating a backup authentication method for the electronic device to replace the current password for unlocking verification.

[0074] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 4As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system).

[0075] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0076] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.

[0077] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device as shown by a landing page for an app. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, which can be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0078] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0079] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.

[0080] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0081] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A password input mode control method, applied to electronic devices, characterized in that, The method includes: In response to an unlock request, the system obtains usage information of the current password in its previous unlock scenario and determines whether there is a risk of leakage of the current password based on the usage information. Monitor whether there are any unauthorized unlocking attempts within the currently unlocked space; If it is determined that the current password is at risk of being leaked, and illegal unlocking behavior is detected in the current unlock space, then the unlocking mode corresponding to the current password is disabled.

2. The method according to claim 1, characterized in that, The step of obtaining usage information of the current password in its previous unlocking scenario and determining whether the current password is at risk of being leaked based on the usage information includes: Extract the usage information of the current password in its previous unlocking scenario from the historical unlocking database, and determine the number of people in the unlocked space in the previous unlocking scenario based on the usage information; Based on the number of people, determine the identity information of at least one person; Based on the identity information, determine whether the current password is at risk of being leaked in its previous unlocking scenario.

3. The method according to claim 2, characterized in that, The step of determining whether the current password is at risk of being leaked in its previous unlocking scenario based on the identity information includes: Based on the identity information, determine at least one identity category to which the at least one person belongs; The at least one identity category is matched with a pre-stored identity category to obtain the identity composition information within the unlock space; Based on the identity information, determine whether the current password is at risk of being leaked.

4. The method according to claim 3, characterized in that, The step of determining whether the current password is at risk of being leaked based on the identity information includes: If the identity information indicates that both authorized and unauthorized personnel exist within the unlock space, then the current password is deemed to be at risk of being leaked. If the identity information indicates that only unauthorized personnel exist in the unlock space, then it is further detected whether there is a bound terminal connected to the protected electronic device in the unlock space during the previous unlocking scenario; if so, it is determined that the current password is at risk of being leaked. If the identity information indicates that only authorized personnel exist in the unlock space, then it is further detected whether the risk recording mode was triggered within the preset time period of the previous unlock scenario; if it has been triggered, then it is determined that the current password is at risk of being leaked.

5. The method according to claim 1, characterized in that, The monitoring of whether there is any unauthorized unlocking behavior within the currently unlocked space includes: Monitor password input requests for the electronic device; The key features in the password input request are analyzed, wherein the key features include at least one of the following: requester permissions, input mode, and environmental feature information of the current unlock space; Determine whether the key features match the preset abnormal features; When the key features match the preset abnormal features, it is determined that there is an illegal unlocking behavior in the current unlock space.

6. The method according to claim 5, characterized in that, The preset abnormal features include: the requester's permission is unauthorized, and / or, the current behavior features of the input mode do not conform to the standard range of the security model, and / or, the environmental feature information of the current unlock space has abnormal changes compared with the environmental feature information of the previous unlock space.

7. The method according to claim 1, characterized in that, After monitoring whether there is any unauthorized unlocking behavior within the current unlock space, the method further includes: When the aforementioned unauthorized unlocking behavior occurs, a security response operation will be performed; The security response operation includes: recording a security event log, which includes the characteristics, time, and associated password information of the illegal unlocking behavior; and / or, performing an alarm operation through the electronic device; and / or, activating a backup authentication method for the electronic device to replace the current password for unlocking verification.

8. A password input mode control device, applied to electronic devices, characterized in that, The device includes: The acquisition module is used to, in response to an unlock request, acquire the usage information of the current password in its previous unlock scenario, and determine whether the current password is at risk of being leaked based on the usage information; The monitoring module is used to monitor whether there are any unauthorized unlocking attempts within the currently unlocked space; The execution module is used to disable the unlocking mode corresponding to the current password if it is determined that the current password is at risk of being leaked and illegal unlocking behavior is detected in the current unlocking space.

9. A computer device, characterized in that, include: A memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, the processor executing the computer instructions to perform the method of any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the method of any one of claims 1 to 7.