A Smart Lock Password Setting Method and System Based on Password Similarity of Nearby Users

By obtaining the user's geographical location information and calculating the similarity of passwords with nearby users, the system prompts the user to reset or score their password, thus solving the security risks caused by similar passwords in the same area and improving the security of smart door locks.

CN118570911BActive Publication Date: 2026-06-30SHENZHEN KAADAS INTELLIGENT TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN KAADAS INTELLIGENT TECH CO LTD
Filing Date
2024-06-11
Publication Date
2026-06-30

Smart Images

  • Figure CN118570911B_ABST
    Figure CN118570911B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for setting smart lock passwords based on the similarity of passwords from nearby users. The method includes: when a user registers or changes their password, obtaining the user's current geographical location information; searching a preset password database for all nearby users whose distance from the current geographical location is less than a preset threshold; determining whether at least one nearby user meets the distance requirement; if at least one nearby user is found, calculating the password similarity between the user's new password and the passwords of all the nearby users, and determining whether the password similarity is greater than a preset similarity threshold; if any password similarity is greater than the preset similarity threshold, prompting the user that the currently set or updated new password has security risks, and prompting the user to reset the new password. This invention aims to improve users' security awareness when setting passwords and guide users to create more complex and unique passwords, thereby improving the security of smart lock passwords.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart lock technology, and in particular to a smart lock password setting method, system, smart lock, and computer-readable storage medium based on the similarity of passwords of nearby users. Background Technology

[0002] Smart door locks, as part of smart homes, are widely used in homes, offices, and other places. When setting unlock passwords, users often only consider personal preferences and ease of remembering, neglecting password security. Especially among residents of the same building or floor, there's a possibility of unintentionally setting similar passwords, such as simple combinations of birthdays or phone numbers. Such similar passwords increase security risks because once one password is cracked or leaked, other similar passwords can be easily guessed.

[0003] Therefore, existing technologies still need to be improved and developed. Summary of the Invention

[0004] The main objective of this invention is to provide a smart lock password setting method, system, smart lock, and computer-readable storage medium based on the similarity of passwords of nearby users, aiming to solve the problem in the prior art that it is easy to set similar passwords in the same area, which increases security risks.

[0005] To achieve the above objectives, the present invention provides a smart lock password setting method based on the similarity of passwords from nearby users, the smart lock password setting method based on the similarity of passwords from nearby users includes the following steps:

[0006] When a user's registration password or password change is detected, the user's current geographical location information is obtained;

[0007] Based on the current geographic location information, search the preset password database for all nearby users whose distance from the current geographic location is less than a preset threshold;

[0008] Determine whether there is at least one neighboring user among all nearby users whose distance from the current geographic location is less than a preset threshold.

[0009] If it is determined that there is at least one neighboring user, calculate the password similarity between the user's new password and the passwords of all the neighboring users, and determine whether the password similarity of all passwords is greater than a preset similarity threshold.

[0010] If the password similarity exceeds the preset similarity threshold, the user will be prompted that the currently set or updated password has security risks and will be prompted to reset the password.

[0011] Optionally, the smart lock password setting method based on the similarity of passwords of nearby users, wherein, after determining whether there is at least one nearby user among all nearby users whose distance from the current geographical location is less than a preset threshold distance, further includes:

[0012] If no nearby users are found, the system scores the user's current password or the newly updated password and provides a password strength level suggestion based on the score.

[0013] Optionally, the smart lock password setting method based on the similarity of passwords from neighboring users further includes, after determining whether the similarity of all passwords is greater than a preset similarity threshold:

[0014] If no password similarity exceeds the preset similarity threshold, the user's current password or newly updated password will be scored to obtain a score result, and a password strength level prompt will be given based on the score result.

[0015] Optionally, in the smart lock password setting method based on the similarity of neighboring user passwords, the step of calculating the password similarity between the user's new password and all the passwords of the neighboring users includes:

[0016] Retrieve the user's new password and the password of any nearby user;

[0017] Convert the user's new password and the passwords of neighboring users into user character sequences and neighboring user character sequences;

[0018] Calculate the edit distance between the user character sequence and the neighboring user character sequences;

[0019] The edit distance is standardized to obtain the password similarity between the user's new password and the passwords of neighboring users.

[0020] Optionally, the smart lock password setting method based on the similarity of passwords of nearby users, wherein the step of scoring the user's currently set or updated new password to obtain a scoring result specifically includes:

[0021] Extract multiple characteristics of the user's currently set or newly updated password;

[0022] Different scoring criteria should be developed for different characteristics;

[0023] Each feature is assigned a different weight based on its impact on cryptographic security.

[0024] The total score of the new password is calculated using a weighted scoring formula, and the score result is obtained.

[0025] Optionally, the smart lock password setting method based on the similarity of passwords from neighboring users, wherein providing a password strength level suggestion based on the scoring result specifically includes:

[0026] Passwords are categorized into different strength levels based on their total score, and a scoring threshold is set.

[0027] The total score of the new password is compared with the scoring threshold to determine the password strength level of the new password.

[0028] Password scores and strength levels are fed back to users, along with suggestions for improving passwords.

[0029] Optionally, in the smart lock password setting method based on the similarity of nearby user passwords, the preset password database contains multiple preset user passwords and corresponding location information.

[0030] Furthermore, to achieve the above objectives, the present invention also provides a smart door lock password setting system based on the similarity of passwords from nearby users, wherein the smart door lock password setting system based on the similarity of passwords from nearby users includes:

[0031] The geolocation acquisition module is used to obtain the user's current geolocation information when the user's registration password or password change is detected;

[0032] The nearby user search module is used to search for all nearby users whose distance from the current geographical location is less than a preset threshold distance from the current geographical location in a preset password database based on the current geographical location information.

[0033] The neighboring user determination module is used to determine whether there is at least one neighboring user among all users whose distance from the current geographical location is less than a preset threshold.

[0034] The password similarity judgment module is used to calculate the password similarity between the user's new password and the passwords of all the neighboring users if it is determined that at least one neighboring user exists, and to determine whether the password similarity of all passwords is greater than a preset similarity threshold.

[0035] The password risk warning module is used to alert users that their current or updated passwords have security risks if the similarity between passwords exceeds a preset similarity threshold, and to prompt users to reset their passwords.

[0036] Furthermore, to achieve the above objectives, the present invention also provides a smart lock, wherein the smart lock includes: a memory, a processor, and a smart lock password setting program based on the similarity of nearby user passwords stored in the memory and executable on the processor. When the smart lock password setting program based on the similarity of nearby user passwords is executed by the processor, it implements the steps of the smart lock password setting method based on the similarity of nearby user passwords as described above.

[0037] Furthermore, to achieve the above objectives, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a smart lock password setting program based on the similarity of passwords of nearby users, and when the smart lock password setting program based on the similarity of passwords of nearby users is executed by a processor, it implements the steps of the smart lock password setting method based on the similarity of passwords of nearby users as described above.

[0038] In this invention, when a user's registration password or password change is detected, the user's current geographical location information is obtained. Based on this information, all neighboring users within a preset password database are searched for that location. It is then determined whether at least one of these neighboring users exists. If at least one neighboring user is found, the similarity between the user's new password and all the neighboring users' passwords is calculated, and the similarity is checked against a preset similarity threshold. If any password similarity exceeds the threshold, the user is alerted that their current or updated password has security vulnerabilities and is prompted to reset their password. This invention aims to raise users' security awareness when setting passwords and guide them to create more complex and unique passwords, thereby improving the security of smart lock passwords. Attached Figure Description

[0039] Figure 1 This is a flowchart of a preferred embodiment of the smart lock password setting method based on the similarity of passwords of nearby users according to the present invention;

[0040] Figure 2 This is a schematic diagram of the entire process of smart lock password strength prompting in a preferred embodiment of the smart lock password setting method based on the similarity of nearby user passwords of the present invention;

[0041] Figure 3 This is a structural diagram of a preferred embodiment of the smart door lock password setting system based on the similarity of passwords of nearby users according to the present invention;

[0042] Figure 4 This is a structural diagram of a preferred embodiment of the smart door lock of the present invention. Detailed Implementation

[0043] To make the objectives, technical solutions, and advantages of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0044] The preferred embodiment of the smart lock password setting method based on the similarity of passwords of nearby users described in this invention, such as... Figure 1 and Figure 2 As shown, the smart lock password setting method based on the similarity of passwords from nearby users includes the following steps:

[0045] Step S10: When a user's registration password or password change is detected, obtain the user's current geographical location information.

[0046] Specifically, when the smart lock detects the user's registered password (first time setting the password) or password change, the smart lock system can obtain the user's current geographical location information through the smart lock's built-in positioning function or by linking with the user's mobile phone (for example, the user's mobile phone obtains the current location and sends it to the smart lock).

[0047] Step S20: Based on the current geographical location information, search the preset password database for all nearby users whose distance from the current geographical location is less than a preset threshold.

[0048] Specifically, the smart lock system maintains a preset password database containing multiple preset user passwords and their corresponding location information. Simultaneously, the smart lock system presets a threshold distance to determine which users are considered "nearby users." Then, based on the current geographical location information, it searches the maintained preset password database for all nearby users within a distance of less than the preset threshold distance (e.g., within 500 meters, which can be set according to actual conditions). Using the user's location information to identify nearby users facilitates subsequent password security assessment.

[0049] Step S30: Determine whether there is at least one neighboring user among all neighboring users whose distance from the current geographical location is less than a preset threshold.

[0050] Specifically, after obtaining the current geographical location information, the current geographical location is obtained. Then, it can be determined whether there is at least one neighboring user among all neighboring users whose distance from the current geographical location is less than a preset threshold.

[0051] Step S40: If it is determined that there is at least one neighboring user, calculate the password similarity between the user's new password and the passwords of all the neighboring users, and determine whether the password similarity of all passwords is greater than a preset similarity threshold.

[0052] Specifically, the smart lock system first sets a preset similarity threshold to determine whether passwords are too similar. Then, the system uses a password similarity algorithm to compare the similarity between the password set or modified by the current user and the passwords of neighboring users, that is, to determine whether the similarity of all passwords is greater than the preset similarity threshold.

[0053] Password similarity comparison algorithms (used to compare the similarity between the password set by the current user and the passwords of neighboring users to determine the relative security of passwords) aim to assess the degree of similarity between two passwords to determine whether they are unique enough to reduce security risks.

[0054] The calculation of the password similarity between the user's new password and the passwords of all neighboring users includes:

[0055] (1) Password retrieval: Retrieve the user's new password and the password of any nearby user.

[0056] (2) Convert the password into a character sequence: Convert the new password of the user and the password of the neighboring user into a user character sequence and a neighboring user character sequence; for example, the password "P@ssw0rd" can be represented as the sequence ['P','@','s','s','w','0','r','d'].

[0057] (3) Calculate the edit distance: Calculate the edit distance between the user character sequence and the neighboring user character sequences; use the Levenshtein distance algorithm to calculate the difference between the two passwords. Edit distance refers to the minimum number of editing operations (insertion, deletion, and replacement characters) required to transform one string into another.

[0058] (4) Standardized Edit Distance: The edit distance is standardized to obtain the password similarity between the user's new password and the passwords of neighboring users. To compare passwords of different lengths, the edit distance can be divided by the length of the longer password to obtain a similarity score between 0 and 1. 0 indicates completely different passwords, and 1 indicates completely different passwords. Subtract the standardized edit distance from 1 to obtain the similarity score.

[0059] (5) Similarity threshold setting: Set a preset similarity threshold, such as 0.5, to determine whether two passwords are too similar. If the similarity score is greater than the preset similarity threshold, the two passwords are considered too similar.

[0060] Step S50: If the password similarity exceeds the preset similarity threshold, the user is prompted that the currently set or updated new password has security risks, and the user is prompted to reset the new password.

[0061] Specifically, if the password similarity exceeds a preset similarity threshold, the smart lock system will prompt the user that the currently set or modified password is insecure and suggest resetting it, for example, by prompting the user to increase the password length or use more types of characters.

[0062] For example, suppose two adjacent users set passwords:

[0063] User A's password: P@ssw0rd and User B's password: P@ssw0rD.

[0064] Step 1: Convert the password into a character sequence.

[0065] User A's password sequence: ['P','@','s','s','w','0','r','d'];

[0066] User B's password sequence: ['P','@','s','s','w','0','r','D'].

[0067] Step 2: Calculate the edit distance.

[0068] Replacing the last character 'd' with 'D' requires one operation, with an edit distance of 1.

[0069] Step 3: Standardize edit distance.

[0070] With an edit distance of 1 and a longer password length of 8 (P@ssw0rD), the standardized edit distance is 1 / 8 = 0.125, resulting in a similarity score of 1 - 0.125 = 0.875.

[0071] Step 4: Determine similarity.

[0072] The similarity score is 0.875, which is greater than the preset similarity threshold of 0.5. Therefore, the two passwords are considered to be very similar and pose a security risk.

[0073] In practical applications, password similarity comparison algorithms may be more complex, considering more factors such as the similarity weight of character types (letters, numbers, special characters) and character positions. Furthermore, other algorithms, such as Hamming distance and Jaccard similarity coefficients, can be combined to improve the accuracy of the evaluation.

[0074] Furthermore, such as Figure 2 As shown, if it is determined that there are no nearby users or if there is no password similarity greater than the preset similarity threshold, the user's current password or the updated password is scored to obtain a score result, and a password strength level prompt is given based on the score result.

[0075] The smart lock system scores passwords based on factors such as complexity, length, and variety. Based on this score, the system provides users with hints about the password strength level. The purpose of password scoring is to assess the strength of the passwords set by users and to provide corresponding scores and hints to encourage users to create more secure passwords.

[0076] The process of scoring the user's currently set or updated password to obtain a scoring result specifically includes:

[0077] (1) Feature extraction: Extract multiple features of the user's current password or the new password that has been updated; that is, extract multiple features of the password, including password length, character diversity (including uppercase and lowercase letters, numbers, special characters), and whether it contains common patterns (such as consecutive numbers, repeated characters, etc.).

[0078] (2) Scoring Criteria Development: Different scoring criteria should be developed for different features; based on research on password security and best practices, scoring criteria should be developed for each password feature. For example, longer passwords, passwords containing multiple character types, and passwords without common patterns should receive higher scores.

[0079] (3) Feature weight allocation: Each feature is assigned a different weight according to its impact on password security; for example, password length and character diversity may have a higher weight than whether it contains common patterns.

[0080] (4) Score Calculation: Calculate the total score of the new password using a weighted scoring formula to obtain the score result. For example, the score of each feature can be multiplied by its weight, and then summed to obtain the total score.

[0081] (5) Password Level Classification: Based on the total score of the password, the password is divided into different levels, such as weak, medium, and strong. A scoring threshold can be set to determine the range of each level.

[0082] (6) Rating Feedback and Hints: Provide users with password ratings and scores, along with suggestions for improvement. For example, if a password score is low, suggest increasing password length or using more diverse characters.

[0083] For example, suppose a user sets their password to: P@ssw0rd.

[0084] Step 1: Extract password features.

[0085] Password length: 8; Character diversity: includes uppercase letters, lowercase letters, numbers, and special characters; Common pattern: does not contain consecutive numbers or repeated characters.

[0086] Step 2: Develop scoring criteria.

[0087] Password length: 10 points for each additional character; Character diversity: 20 points for each character type; Common patterns: 10 points for not having common patterns.

[0088] Step 3: Assign weights.

[0089] Password length: weight 1; character diversity: weight 2; common patterns: weight 1.

[0090] Step 4: Calculate the score.

[0091] Password length score: 8*10=80; Character diversity score: 4*20=80; Common pattern score: 10; Total score: 80*1+80*2+10*1=250.

[0092] Step 5: Determine the password level.

[0093] The scoring thresholds are set as follows: 0-100 is weak, 101-200 is medium, and 201-300 is strong. Therefore, the current password level is strong.

[0094] Step 6: Provide feedback and tips.

[0095] Feedback to the user: "Your password is very strong."

[0096] Improvement suggestions: Provide specific suggestions based on the user's password situation. For example, if the password does not contain special characters, you can prompt the user to add special characters to increase the password strength.

[0097] This invention uses a password scoring system to help users create more secure and unique passwords, thereby improving the overall security of smart locks. It should be noted that this is only an example scoring system, and adjustments and optimizations may be needed based on specific circumstances in real-world applications.

[0098] This invention effectively helps users realize the risks of setting similar passwords in specific geographical locations and motivates them to create more complex and unique passwords. Theoretically, this method can significantly improve the security of smart locks, especially in densely populated areas such as apartment buildings or residential complexes.

[0099] Furthermore, providing prompts (information display methods for users, including how to show password strength level prompts and how to guide users to set more secure passwords) in smart lock systems can be achieved in the following ways:

[0100] (1) Display prompts: The smart lock device itself can be equipped with a touch screen or digital display. When the user enters a password, the screen will display a password security score and related prompts. For example, if the user enters a password that is too simple or similar to the password of nearby users, the screen can display a warning message suggesting that the user use a more complex password.

[0101] (2) Voice prompts: Smart door locks can have a built-in voice module to provide feedback on password security through voice prompts. For example, when a user sets a less secure password, the door lock can inform the user through voice prompts and suggest a more secure password setting.

[0102] (3) User Interface Design: In the user password setting interface, intuitive indicator icons or color codes can be designed to represent the password security level. For example, green can represent a secure password, yellow a neutral password, and red a password with potential risks.

[0103] Implementing these features requires ensuring a user-friendly interface, clear information delivery, and avoiding user confusion or excessive intervention. Furthermore, all prompts and feedback should be based on analysis of password similarity and geolocation information to provide truly useful security advice.

[0104] For example, if Xiaoming sets a simple password on the 10th floor that is similar to the passwords of other residents on the same floor, the application will warn Xiaoming that his password has low security and suggest that he create a more complex password. Similarly, if Xiaohong sets a complex password on the 5th floor that is not similar to the passwords of other residents on the same floor, the application will warn Xiaohong that her password has high security. Likewise, if Xiaoli sets a complex password on the 10th floor that is similar to the passwords of other residents on the same floor, the application will warn Xiaoli that his password has low security and suggest that he create a unique password.

[0105] For example, scenario: A university dormitory building, each room is equipped with a smart door lock. User E's password setting process: User E selects a password "abc12345" and attempts to set it. The smart door lock system activates a password similarity comparison algorithm: The system searches for the passwords of other students in User E's dormitory building. User F's password "Abc12345" is identified as a neighboring user's password. Password similarity comparison: The system calculates the edit distance between User E's password and User F's password and finds them to be very similar, differing only in the capitalization of the first character. Due to the high password similarity, the system prompts User E: "Security is low, please try resetting."

[0106] The beneficial effects of this invention are:

[0107] (1) Improve password security: By assessing and prompting users on the similarity between their passwords and those of nearby users, the risk of passwords being guessed or cracked is reduced, thereby improving the security of smart locks.

[0108] (2) Enhance user security awareness: The system prompts users with information about password strength, which increases users’ awareness of password security and encourages them to be more cautious when setting passwords.

[0109] (3) Reduce password similarity: In densely populated areas, such as residential communities or apartment buildings, it reduces the security risks caused by high password similarity among users.

[0110] (4) Promote the use of complex passwords: The system encourages users to create more complex and unique passwords, which are more difficult to crack, thereby improving the overall security level.

[0111] (5) Customized security tips: The system provides customized security tips based on the user's geographical location and the passwords of nearby users, making the tips more relevant and effective.

[0112] (6) Preventive security measures: Providing a security assessment before passwords are set can prevent potential security problems, rather than taking action after a security problem occurs.

[0113] (7) Data privacy protection: Although the system needs to process users’ passwords and location data, it can compare and evaluate them without disclosing the specific password content, thereby protecting users’ privacy.

[0114] (8) Adaptability and scalability: The system can adjust the distance threshold and similarity threshold according to different geographical locations and user groups to adapt to different security needs and scenarios.

[0115] Through these technical effects, the present invention can improve the overall security performance of smart door lock systems without significantly increasing the burden on users, providing users with a safer and more reliable user experience.

[0116] Furthermore, such as Figure 3 As shown, based on the above-described smart lock password setting method based on the similarity of passwords from nearby users, the present invention also provides a smart lock password setting system based on the similarity of passwords from nearby users, wherein the smart lock password setting system based on the similarity of passwords from nearby users includes:

[0117] The geolocation acquisition module 51 is used to acquire the user's current geolocation information when the user's registration password or password change is detected;

[0118] The neighboring user search module 52 is used to search for all neighboring users whose distance from the current geographical location is less than a preset threshold distance from the current geographical location in the preset password database based on the current geographical location information.

[0119] The neighboring user determination module 53 is used to determine whether there is at least one neighboring user among all neighboring users whose distance from the current geographical location is less than a preset threshold distance;

[0120] The password similarity judgment module 54 is used to calculate the password similarity between the user's new password and the passwords of all the neighboring users if it is determined that at least one neighboring user exists, and to determine whether the password similarity of all passwords is greater than a preset similarity threshold.

[0121] The password risk warning module 55 is used to prompt the user that the currently set or updated new password has security risks if the password similarity is greater than the preset similarity threshold, and prompt the user to reset the new password.

[0122] Furthermore, such as Figure 4 As shown, based on the above-mentioned smart door lock password setting method and system based on the similarity of passwords of nearby users, the present invention also provides a smart door lock, which includes a processor 10, a memory 20 and a display 30. Figure 4 Only some components of the smart lock are shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0123] In some embodiments, the memory 20 may be an internal storage unit of the smart lock, such as a hard drive or memory. In other embodiments, the memory 20 may be an external storage device of the smart lock, such as a plug-in hard drive, smart media card (SMC), secure digital (SD) card, flash card, etc. Further, the memory 20 may include both internal and external storage units of the smart lock. The memory 20 is used to store application software and various types of data installed on the smart lock, such as the program code for installing the smart lock. The memory 20 can also be used to temporarily store data that has been output or will be output. In one embodiment, the memory 20 stores a smart lock password setting program 40 based on the similarity of passwords of nearby users. This smart lock password setting program 40 based on the similarity of passwords of nearby users can be executed by the processor 10, thereby implementing the smart lock password setting method based on the similarity of passwords of nearby users in this application.

[0124] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run program code stored in the memory 20 or process data, such as executing the smart door lock password setting method based on the similarity of passwords of nearby users.

[0125] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-screen liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display 30 is used to display information about the smart lock and to display a visual user interface. The components 10-30 of the smart lock communicate with each other via a system bus.

[0126] In one embodiment, when the processor 10 executes the smart lock password setting program 40 based on the similarity of passwords of neighboring users in the memory 20, the following steps are performed:

[0127] When a user's registration password or password change is detected, the user's current geographical location information is obtained;

[0128] Based on the current geographic location information, search the preset password database for all nearby users whose distance from the current geographic location is less than a preset threshold;

[0129] Determine whether there is at least one neighboring user among all nearby users whose distance from the current geographic location is less than a preset threshold.

[0130] If it is determined that there is at least one neighboring user, calculate the password similarity between the user's new password and the passwords of all the neighboring users, and determine whether the password similarity of all passwords is greater than a preset similarity threshold.

[0131] If the password similarity exceeds the preset similarity threshold, the user will be prompted that the currently set or updated password has security risks and will be prompted to reset the password.

[0132] The step of determining whether there is at least one neighboring user among all neighboring users whose distance from the current geographical location is less than a preset threshold distance further includes:

[0133] If no nearby users are found, the system scores the user's current password or the newly updated password and provides a password strength level suggestion based on the score.

[0134] The step of determining whether the similarity of all passwords is greater than a preset similarity threshold further includes:

[0135] If no password similarity exceeds the preset similarity threshold, the user's current password or newly updated password will be scored to obtain a score result, and a password strength level prompt will be given based on the score result.

[0136] The calculation of the password similarity between the user's new password and the passwords of all neighboring users includes:

[0137] Retrieve the user's new password and the password of any nearby user;

[0138] Convert the user's new password and the passwords of neighboring users into user character sequences and neighboring user character sequences;

[0139] Calculate the edit distance between the user character sequence and the neighboring user character sequences;

[0140] The edit distance is standardized to obtain the password similarity between the user's new password and the passwords of neighboring users.

[0141] Specifically, the process of scoring the user's currently set or updated password to obtain a scoring result includes:

[0142] Extract multiple characteristics of the user's currently set or newly updated password;

[0143] Different scoring criteria should be developed for different characteristics;

[0144] Each feature is assigned a different weight based on its impact on cryptographic security.

[0145] The total score of the new password is calculated using a weighted scoring formula, and the score result is obtained.

[0146] The provision of password strength level suggestions based on the scoring results specifically includes:

[0147] Passwords are categorized into different strength levels based on their total score, and a scoring threshold is set.

[0148] The total score of the new password is compared with the scoring threshold to determine the password strength level of the new password.

[0149] Password scores and strength levels are fed back to users, along with suggestions for improving passwords.

[0150] The preset password database contains multiple preset user passwords and their corresponding location information.

[0151] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a smart lock password setting program based on the similarity of passwords of nearby users, and the smart lock password setting program based on the similarity of passwords of nearby users, when executed by a processor, implements the steps of the smart lock password setting method based on the similarity of passwords of nearby users as described above.

[0152] In summary, this invention provides a smart lock password setting method, system, smart lock, and storage medium based on the similarity of passwords from nearby users. The method includes: when a user registers a password or changes their password, obtaining the user's current geographical location information; searching a preset password database for all nearby users whose distance from the current geographical location is less than a preset threshold based on the current geographical location information; determining whether at least one of the nearby users whose distance from the current geographical location is less than the preset threshold exists; if at least one nearby user is determined to exist, calculating the password similarity between the user's new password and the passwords of all the nearby users, and determining whether the password similarity is greater than a preset similarity threshold; if any password similarity is greater than the preset similarity threshold, prompting the user that the currently set or updated new password has a security risk, and prompting the user to reset the new password. This invention aims to improve users' security awareness when setting passwords and guide users to create more complex and unique passwords, thereby improving the security of smart lock passwords.

[0153] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or smart lock that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or smart lock. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or smart lock that includes that element.

[0154] Of course, those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.). The program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The computer-readable storage medium can be a memory, magnetic disk, optical disk, etc.

[0155] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.

Claims

1. A method for setting passwords for smart locks based on the similarity of passwords from nearby users, characterized in that, The smart lock password setting method based on the similarity of passwords from nearby users includes: When a user's registration password or password change is detected, the user's current geographical location information is obtained; Based on the current geographic location information, search the preset password database for all nearby users whose distance from the current geographic location is less than a preset threshold; Determine whether there is at least one neighboring user among all nearby users whose distance from the current geographic location is less than a preset threshold. If it is determined that there is at least one neighboring user, calculate the password similarity between the user's new password and the passwords of all the neighboring users, and determine whether the password similarity of all passwords is greater than a preset similarity threshold. If the password similarity exceeds the preset similarity threshold, the user will be prompted that the currently set or updated password has security risks and will be prompted to reset the password. The calculation of the password similarity between the user's new password and the passwords of all neighboring users includes: Retrieve the user's new password and the password of any nearby user; Convert the user's new password and the passwords of neighboring users into user character sequences and neighboring user character sequences; Calculate the edit distance between the user character sequence and the neighboring user character sequences; The edit distance is standardized to obtain the password similarity between the user's new password and the passwords of neighboring users.

2. The smart door lock password setting method based on the similarity of passwords of nearby users according to claim 1, characterized in that, The step of determining whether there is at least one neighboring user among all neighboring users whose distance from the current geographical location is less than a preset threshold distance also includes: If no nearby users are found, the system scores the user's current password or the newly updated password and provides a password strength level suggestion based on the score.

3. The smart door lock password setting method based on the similarity of passwords of nearby users according to claim 1, characterized in that, The step of determining whether the similarity of all passwords is greater than a preset similarity threshold further includes: If no password similarity exceeds the preset similarity threshold, the user's current password or newly updated password will be scored to obtain a score result, and a password strength level prompt will be given based on the score result.

4. The smart lock password setting method based on the similarity of passwords of nearby users according to claim 2 or 3, characterized in that, The process of scoring the user's currently set or updated password to obtain a scoring result specifically includes: Extract multiple characteristics of the user's currently set or newly updated password; Different scoring criteria should be developed for different characteristics; Each feature is assigned a different weight based on its impact on cryptographic security. The total score of the new password is calculated using a weighted scoring formula, and the score result is obtained.

5. The smart lock password setting method based on the similarity of passwords of nearby users according to claim 2 or 3, characterized in that, The provision of password strength level suggestions based on the scoring results specifically includes: Passwords are categorized into different strength levels based on their total score, and a scoring threshold is set. The total score of the new password is compared with the scoring threshold to determine the password strength level of the new password. Password scores and strength levels are fed back to users, along with suggestions for improving passwords.

6. The smart door lock password setting method based on the similarity of passwords of nearby users according to claim 1, characterized in that, The preset password database contains multiple preset user passwords and their corresponding location information.

7. A smart door lock password setting system based on the similarity of passwords from nearby users, characterized in that, The smart lock password setting system based on the similarity of nearby user passwords is used to implement the smart lock password setting method based on the similarity of nearby user passwords as described in any one of claims 1-6, wherein the smart lock password setting system based on the similarity of nearby user passwords includes: The geolocation acquisition module is used to obtain the user's current geolocation information when the user's registration password or password change is detected; The nearby user search module is used to search for all nearby users whose distance from the current geographical location is less than a preset threshold distance from the current geographical location in a preset password database based on the current geographical location information. The neighboring user determination module is used to determine whether there is at least one neighboring user among all users whose distance from the current geographical location is less than a preset threshold. The password similarity judgment module is used to calculate the password similarity between the user's new password and the passwords of all the neighboring users if it is determined that at least one neighboring user exists, and to determine whether the password similarity of all passwords is greater than a preset similarity threshold. The password risk warning module is used to alert users that their current or updated passwords have security risks if the similarity between passwords exceeds a preset similarity threshold, and to prompt users to reset their passwords.

8. A smart door lock, characterized in that, The smart lock includes: a memory, a processor, and a smart lock password setting program based on the similarity of nearby user passwords, stored in the memory and executable on the processor. When the smart lock password setting program based on the similarity of nearby user passwords is executed by the processor, it implements the steps of the smart lock password setting method based on the similarity of nearby user passwords as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a smart lock password setting program based on the similarity of passwords of nearby users. When the smart lock password setting program based on the similarity of passwords of nearby users is executed by a processor, it implements the steps of the smart lock password setting method based on the similarity of passwords of nearby users as described in any one of claims 1-6.