A password management method, an electronic device, and a computer-readable storage medium
By receiving and converting algorithmic passwords to adapt to different keyboard modes, the problem that algorithmic passwords cannot adapt to keyboards in different numerical ranges is solved, achieving low-cost and secure keyboard adaptation.
Patent Information
- Application Number
- CN202111295052.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-03
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2041-11-03
AI Technical Summary
In the prior art, algorithmic passwords cannot be adapted to password keyboards of different numerical ranges, resulting in high maintenance costs or reduced security levels.
The first device receives and acquires the keyboard information of the second device, converts the first password into a second password adapted to the keyboard of the second device, and realizes the low-cost adaptation of various keyboard modes.
There is no need to change the server's original algorithm logic, and you can adapt to different keyboard modes through password conversion, reducing the adaptation cost and maintaining password security.
Smart Images

Figure CN114117466B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of intelligent devices, and particularly to a password management method, an electronic device, and a computer-readable storage medium. Background Art
[0002] Currently, the numerical range of the algorithm password used to unlock a device is generally within the range of 0 to 9. Such an algorithm password can only adapt to a ten-digit password keyboard with a corresponding numerical range of 0 to 9, and cannot adapt to password keyboards with other numerical ranges, such as a six-digit password keyboard with a numerical range of 1 to 6. Currently, there are two methods to adapt to the keyboard. One is to redesign the algorithm password according to the number range of the password keyboard, but the maintenance cost of this method is relatively high. The other is to discard the numbers outside the range according to the numerical range of the password keyboard, but this method will reduce the security level of the password. Summary of the Invention
[0003] This application provides a password management method, an electronic device, and a computer-readable storage medium, which can generate passwords adapted to multiple keyboard modes at low cost.
[0004] To solve the above technical problems, the technical solution adopted by this application is: to provide a password management method, which includes: a first device receives a first password for unlocking a second device; the first device obtains the keyboard information of the second device; the first device converts the first password into a second password adapted to the keyboard of the second device.
[0005] To solve the above technical problems, another technical solution adopted by this application is: to provide a password management method, which includes: a second device receives a second password for unlocking, and the second password is obtained by using the password management method in the above technical solution; verify the second password; in response to passing the verification, unlock the second device.
[0006] To solve the above technical problems, another technical solution adopted by this application is: to provide an electronic device, including a processor, and the processor is used to execute instructions to implement the password management method in the above technical solution.
[0007] To solve the above technical problems, another technical solution adopted by this application is: to provide a computer-readable storage medium, which is used to store a computer program, and when the computer program is executed by a processor, it is used to implement the password management method in the above technical solution.
[0008] Through the above solution, the beneficial effects of the present application are as follows: The first device receives the first password for unlocking the second device; the first device obtains the keyboard information of the second device, and then the first device converts the first password into a second password adapted to the keyboard of the second device, so as to unlock the second device through the second password. There is no need to change the original algorithm logic of the server to redesign a new password adapted to the device keyboard. By simply converting the originally generated first password, the adaptation to the keyboard of the second device can be achieved, and multiple keyboard modes can be adapted at low cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings. Among them:
[0010] Figure 1 is a schematic flowchart of an embodiment of the password management method provided by the present application;
[0011] Figure 2 is a schematic flowchart of another embodiment of the password management method provided by the present application;
[0012] Figure 3 is a schematic flowchart of yet another embodiment of the password management method provided by the present application;
[0013] Figure 4 is a schematic structural diagram of an embodiment of the electronic device provided by the present application;
[0014] Figure 5 is a schematic structural diagram of an embodiment of the computer-readable storage medium provided by the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0015] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0016] Please refer to Figure 1 , Figure 1It is a schematic flowchart of an embodiment of the password management method provided by this application. In this embodiment, the first password is an algorithm password, that is, a temporary password generated by the server according to its own algorithm logic. This embodiment can be applied to the scenario where a user unlocks a device with an algorithm password. When a password needs to be entered to unlock the device to be unlocked, the algorithm password can be obtained from the server through a mobile terminal, so as to use the algorithm password to unlock the device to be unlocked. However, currently, in the method of unlocking a device with an algorithm password, there is a situation where the algorithm password generated by the server according to the algorithm logic does not match the keyboard of the device to be unlocked. For example, the algorithm password generated by the server is 0589633568, while the keyboard of the device to be unlocked is a six-digit keyboard from 1 to 6, and it does not have the number 0 and numbers greater than 6. Therefore, at this time, the algorithm password does not match the keyboard of the second device, and the user cannot enter the algorithm password on the keyboard of the device to be unlocked to unlock it. Therefore, at this time, the password management method in this embodiment can be used to convert the algorithm password generated by the server to achieve low-cost adaptation of the algorithm password and the keyboard of the device to be unlocked. The password management method includes:
[0017] Step 11: The first device receives the first password for unlocking the second device.
[0018] The first device is the device that receives the algorithm password (i.e., the first password). Generally, a user can unlock the device to be unlocked by obtaining the algorithm password. Among them, the first device can be a mobile terminal, such as a mobile phone. The second device is the device to be unlocked, which can be an intelligent device, such as a lock, an intelligent device with a password, etc., such as an intelligent TV, a computer, a smart phone, etc. that require password unlocking; it can be understood that in a specific application scenario, the mobile terminal can also be used as the second device to be unlocked, that is, an algorithm password can be obtained through one mobile terminal to unlock another mobile terminal. Here, "first" and "second" only represent the distinction between the device that receives the algorithm password and the device to be unlocked, and do not limit the device types of the two.
[0019] Step 12: The first device obtains the keyboard information of the second device.
[0020] The first device obtains the keyboard information of the second device. The keyboard of the second device is used to enter the unlocking password. The keyboard of the second device can be a mechanical keyboard or a virtual keyboard, which is not limited here.
[0021] Step 13: The first device converts the first password into a second password that adapts to the keyboard of the second device.
[0022] When the first password (i.e., the algorithm password) does not match the keyboard of the device to be unlocked (i.e., the second device), the first device can convert the first password into a second password that adapts to the keyboard of the second device. For example, the key values of the keyboard of the second device are in the numerical range of 1 to 6, while the first password obtained by the first device is 76829103, whose numerical range is within 0 to 9 and cannot adapt to the six-digit keyboard of the second device with a numerical range of 1 to 6. Then, at this time, the first device can convert the first password into 22453525254, converting the numerical range between 1 and 6, so that the user can input this password through the six-digit keyboard of the second device to perform the unlocking operation.
[0023] In this embodiment, the first device receives the first password for unlocking the second device; the first device obtains the keyboard information of the second device, and then the first device converts the first password into a second password that adapts to the keyboard of the second device, so as to unlock the second device through the second password. There is no need to change the original algorithm logic of the server to redesign a new password that adapts to the device keyboard. Just by converting the originally generated first password, the adaptation to the keyboard of the second device can be achieved, which can greatly reduce the adaptation cost.
[0024] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of another embodiment of the password management method provided by this application. The method includes:
[0025] The first device sends a request message for obtaining the first password to the server / second device to receive the first password for unlocking the second device. Specifically, the server can generate an algorithm password based on the current time information, secret key information, or device parameters, etc. When the second device is first installed, the second device can synchronize its secret key information and device parameters, etc. to the server. Among them, the secret key information corresponds to the second device one by one, and the device parameters can include the device ID number, device name, etc. The time information is the current system time. It can be understood that the algorithm password is related to the current system time. Therefore, the user can input the algorithm password in the second device within a preset time range (such as 30s) after obtaining the algorithm password. Otherwise, the algorithm password will become invalid and a new algorithm password needs to be obtained from the server to unlock.
[0026] The first device obtains the keyboard information of the second device; in a specific embodiment, the keyboard information of the second device obtained by the first device includes the number of key positions, and the number of key positions is the number of keys on the keyboard of the second device. For example, if the keyboard of the second device includes six keys with key values of 1, 2, 3, 4, 5, and 6 respectively, then at this time, the number of its keys (i.e., the number of key positions) is 6; the method by which the first device converts the first password into a second password that adapts to the keyboard of the second device includes:
[0027] Step 21: Obtain the number of digits of the second password in a certain base.
[0028] The second password is the target password that the first device needs to convert the first password into to adapt to the keyboard of the second device. Obtain the number of digits of the second password, that is, obtain the number of digits of the second password required to adapt to the keyboard of the second device. Among them, the number of digits of the second password is equal to the number of keys.
[0029] Step 22: Obtain the number of digits of the first password.
[0030] Generally, the algorithm password (i.e., the first password) generated by the server is a password with a numerical range of 0 to 9, that is, a decimal password. Understandably, in actual application scenarios, the number of digits of the first password can be changed according to the change of the algorithm logic set in the server. That is, the server can also generate algorithm passwords with the number of digits of hexadecimal / binary, etc.
[0031] Step 23: Convert the first password with the first number of digits into the second password with the second number of digits according to the number system conversion rules.
[0032] In order to generate the second password that adapts to the keyboard of the second device, the number system conversion of the first password can be performed according to the number system conversion rules. Specifically, the number system conversion rule can be to perform the corresponding number system conversion on the first password according to the number of keys of the keyboard of the second device, and convert the first password into the second password with the same number of digits as the value of the number of keys. For example, if the second device is a six-digit keyboard from 0 to 5, then the number of its keys is six. At this time, the first password with a numerical range of 0 to 9 can be converted into hexadecimal. Then the numerical range of the converted second password is controlled within 0 to 5, so as to achieve the purpose of adapting to the keyboard of the second device. At the same time, because only the password value of the first password is converted in terms of numbers, and the number of effective digits is not deleted, the data content in the original password can be effectively guaranteed, and the security factor of the password will not be reduced.
[0033] In a specific embodiment, the keyboard information of the second device obtained by the first device further includes key values. At this time, there is also a situation where the numerical range of the password value of the second password generated after the number system conversion does not correspond to the numerical range of the key values of the keyboard of the second device. For example, the second password generated after the number system conversion has a numerical range of 0 to 5, and at this time, the numerical range of the key values corresponding to the six-digit keyboard of the second device is from 1 to 6. Then, not only does the first password need to be converted accordingly, but also the password value of the second password generated after the number system conversion needs to be converted, so that each password value in the second password is within the numerical range of the key values of the keyboard of the second device. The specific steps are as follows:
[0034] Step 24: Obtain the password value of the second password.
[0035] Step 25: In response to the password value containing non-key values, at least convert the non-key values into key values.
[0036] Obtain the password value of the second password generated after base conversion, and determine whether the password value of the second password contains non-key values. Here, the password value of the second password is the specific value of the password, such as 11342414143. The key values of the second device keyboard are the values represented by each key on the keyboard, and the non-key values are other values outside the range of the key values of the second device keyboard. For example, if the password value of the second password generated after base conversion is 11342414143, and the value range of the key values of the second device is 3 to 8, then the password value of the second password at this time contains non-key values "1" and "2". Therefore, at least the non-key values need to be converted into key values so that each password value of the second password after conversion is within the value range of the key values of the second device.
[0037] In a specific embodiment, when the password value of the second password contains non-key values, it is possible to choose to only convert the non-key values in the password value. Specifically, add a first random number to the non-key value to obtain a new password value, where the first random number is less than the difference between the maximum key value and the non-key value, so that the non-key values in the password value of the second password are converted into key values.
[0038] Still taking the password value of the second password as 11342414143 as an example for illustration, the value range of the key values of the second device is within the range of 3 to 8, and the password value of the second password contains non-key values "1" and "2". At this time, only the non-key values "1" and "2" in the second password can be numerically converted. Since the minimum key value is 3 and the maximum key value is 8, the difference between the maximum key value and the non-key value "1" is 7, and the difference from the non-key value "2" is 6. Then, a first random number less than 7 can be added to the non-key value "1", for example, adding 5, so that the non-key value "1" is converted into the key value "6". Similarly, a first random number less than 6 can be added to the non-key value "2", for example, adding 4, so that the non-key value "2" is converted into the key value "6". It can be understood that in order to make the non-key value after numerical conversion fall within the value range of the key value, the first random number should also be greater than the difference between the minimum key value and the non-key value, that is, the first random number added to the non-key value "1" should be greater than 2, and the first random number added to the non-key value "2" should be greater than 1. Further, there may be multiple non-key values in the second password. In this case, the first random numbers added to each non-key value can be the same or different. For example, in the above example, the same first random number 4 can be directly added to all non-key values, or any first random number within the respective optional value range can be added to each non-key value.
[0039] In a specific embodiment, when the password value of the second password contains non-key values, it is also possible to choose to convert all the password values in the second password. Specifically, each password value of the second password can be added with a second random number to obtain a new password value. Here, the second random number is less than the difference between the maximum value of the key values and the maximum value of the password values. It can be understood that the first random number and the second random number are just names defined according to different password conversion schemes and do not have actual different meanings. For example, in the above example, the maximum key value is 8, the maximum password value is 4, and the difference between them is 4. Then, a second random number less than 4 can be selected to be added to each password value. For example, the second random number 2 is added to each password value, and the password value of the second password is converted to 33564636365. It can be understood that in order to ensure that the converted password values all fall within the numerical range of the key values, the value of the second random number should also be greater than the difference between the minimum value of the key values and the minimum value of the non-key values, that is, the difference 2 between the minimum key value "3" and the minimum non-key value "1". Then, the value range of the second random number can be between 2 and 4. Further, the second random numbers added to each password value of the second password can be the same or different.
[0040] The above embodiments are all described by taking the key values of the second device keyboard as numbers as an example. In a specific embodiment, the key values in the second device keyboard can also be other symbols besides numerical values, such as letters A to Z or special symbols such as @, #, &, *. Then, when performing numerical conversion on the second password, the numbers in the second password can be directly converted into corresponding symbols according to a pre-established correspondence table between symbols and numerical values.
[0041] In this embodiment, the first password is converted in base according to the number of key positions of the second device keyboard to generate a second password with the same number of base positions as the number of key positions. When the second password contains non-key values different from the key values of the second device keyboard, numerical conversion is performed on the second password to convert all non-key values into key values, so that all password values of the finally generated second password are within the numerical range of the key values of the second device keyboard; in the first device, the adaptation of the password to the second device keyboard is completed through base conversion and password value conversion. Only the original first password needs to be numerically converted, which can flexibly adapt to various types of device keyboards on the market without changing the data content of the original password and without reducing the security level of the password. At the same time, there is no need to spend additional costs on the server to develop new algorithm logics to directly generate adapted passwords, which can greatly save costs.
[0042] Please refer to Figure 3 , Figure 3 which is a schematic flowchart of another embodiment of the password management method provided by this application. The method includes:
[0043] Step 31: The second device receives a second password for unlocking.
[0044] The second password is obtained by using the password management method in the above embodiments. After obtaining the second password generated by the first device conversion, the user can enter the second password on the second device to unlock the second device.
[0045] Step 32: Verify the second password.
[0046] Step 33: In response to successful verification, unlock the second device.
[0047] In a specific embodiment, the verification method of the second device may include: the second device obtains a password conversion rule, then performs inverse conversion on the second password based on the password conversion rule to obtain a first password; finally, verifies the first password; specifically, the password conversion rule is the specific conversion method of the base conversion and password value conversion of the first password in the above embodiments. For example, convert the decimal first password to hexadecimal, and then add the value "2" to all password values in the generated hexadecimal password to finally generate a second password adapted to the keyboard of the second device. Therefore, when the second device receives the second password, performing inverse conversion on the second password based on the password conversion rule can obtain the first password, that is, first subtract the value "2" from all password values in the second password, and then perform decimal conversion to obtain the first password, and then compare the first password to determine whether the verification is successful. If the verification is successful, the second device is unlocked.
[0048] It can be understood that, in a specific embodiment, when the second device is always connected to the server, when the server sends the first password to the first device, it can also send the first password to the second device at the same time. At this time, the second device can directly compare the first password generated by inverse conversion with the first password sent by the server received. If the two are the same, it means the verification is successful; in another specific embodiment, when the second device is not connected to the server, the server and the second device can store the same algorithm logic, and the second device can also generate the same first password as the server based on the same algorithm logic. Therefore, the second device can compare the first password generated by inverse conversion with the first password generated by itself. If they are the same, it means the verification is successful.
[0049] Understandably, the above embodiments are only examples of the method for the first password verification, and other verification methods can also be used for password verification. The specific verification method can be selected according to the actual situation. For example, in other embodiments, after the second password is inversely converted to generate the first password, the time information and / or key information of the first password can be extracted to complete the verification of the first password; or, the time information and / or key information of the second password can be directly obtained and then verified; specifically, when the same algorithm logic as that of the server is stored in the second device, the first password is generated based on the time information or key information, etc. Therefore, when the second device performs verification, the time information and / or key information included in the received second password can also be directly extracted and then verified. Further, each second device can correspond to a unique key information. When the second device is first installed, its unique key information can be synchronized to the server. Therefore, after the second device extracts the key information included in the second password, it can compare it with its corresponding key information. If they are the same, it means the verification is successful and the second device is unlocked.
[0050] In this embodiment, the second device can inversely convert the received second password based on the password conversion rule to generate the first password, and then verify it with the first password generated by the same algorithm logic stored in itself as that stored in the server, or directly use the algorithm logic to extract the time information and / or key information of the second password for verification. The second device can implement the verification of the second password generated in the above embodiment through the above verification method and unlock when the verification is successful.
[0051] Please refer to Figure 4 , Figure 4 FIG. is a schematic structural diagram of an embodiment of an electronic device 40 provided by the present application. The electronic device 40 includes a processor 41, and the processor 41 is configured to execute instructions to implement the password management method in the above embodiment.
[0052] In a specific embodiment, the electronic device 40 can be the first device that generates the second password adapted to the keyboard of the second device through the password management method in the above embodiment, or the electronic device 40 can also be the second device to be unlocked, and it can verify the second password through the password management method in the above embodiment to complete the unlocking operation.
[0053] Please refer to Figure 5 , Figure 5 FIG. is a schematic structural diagram of an embodiment of a computer-readable storage medium provided by the present application. The computer-readable storage medium 50 is used to store a computer program 51, and when the computer program 51 is executed by a processor, it is used to implement the password management method in the above embodiment.
[0054] The computer-readable storage medium 50 may be a server, a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc, or other media that can store program codes.
[0055] In several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0056] The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0057] In addition, each functional unit in various embodiments of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0058] The above are only the embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present application.
Claims
1. A password management method, characterized in that, Comprising: A first device receives a first password for unlocking a second device; The first device obtains keyboard information of the second device; The first device converts the first password into a second password adapted to the keyboard of the second device; The keyboard information includes the number of key presses, and the converting the first password into a second password adapted to the keyboard of the second device includes: Obtaining the number of digits of the second password, where the number of digits of the second password is equal to the number of key presses; Obtaining the number of digits of the first password; Converting the first password with the first number of digits into the second password with the second number of digits according to the number system conversion rule; The keyboard information includes key values, and the key values include numbers and symbols. The method further includes: Obtaining the password value of the second password; in response to the password value containing a non-key value, at least converting the non-key value into the key value, where the non-key value is a value other than the key value; Wherein, the key value includes a symbol, and the at least converting the non-key value into the key value includes: a pre-established correspondence table between the symbol and the number, and converting the numbers in the second password into the corresponding symbols; Wherein, the key value includes a number, and the at least converting the non-key value into the key value includes: adding a first random number to the non-key value to obtain a new password value, where the first random number is less than the difference between the maximum value of the key value and the non-key value; or, adding a second random number to each password value of the second password to obtain a new password value, where the second random number is less than the difference between the maximum value of the key value and the maximum value of the password value.
2. The password management method according to claim 1, wherein Before receiving the first password for unlocking the second device, it further includes: The first device sends a request message for obtaining the first password to the server / second device.
3. A password management method, characterized in that, Comprising: A second device receives a second password for unlocking, and the second password is obtained by using the password management method according to any one of claims 1-2; Verifying the second password; In response to passing the verification, unlocking the second device.
4. The password management method according to claim 3, wherein Verifying the second password includes: The second device obtains the password conversion rule; Performing inverse conversion on the second password based on the password conversion rule to obtain a first password; Verifying the first password.
5. An electronic device, characterized in that, Including a processor, where the processor is configured to execute instructions to implement the password management method according to any one of claims 1-4.
6. A computer-readable storage medium for storing a computer program, characterized in that, When the computer program is executed by the processor, it is used to implement the password management method according to any one of claims 1-4.
Citation Information
Patent Citations
Password input method and system of smart lock
CN104966338A
Unlocking method, intelligent terminal and computer readable storage medium
CN111222107A