Password setting method and device

By searching and verifying the historical password and its identification information in the ROM, the security of the current password setting process is ensured, and the problem of failure of the ROM storage historical password is solved, and the security of the computer is improved.

CN116010938BActive Publication Date: 2025-06-13INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211740438.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2025-06-13
Estimated Expiration
2042-12-30

AI Technical Summary

Technical Problem

There are vulnerabilities in the method of utilizing ROMs to store historical passwords in the prior art, resulting in the invalidation of the historical password stored in the ROM, which may in turn cause the currently set password to be the same as the historical password, posing a major security risk.

Method used

When obtaining the current password, look up the historical password in the ROM and obtain the historical password and its identification information. Based on this information, the ROM and the current password are used for security verification. The password is set only when the ROM and the current password pass the security verification, and the current password is stored as a new historical password.

Benefits of technology

It effectively avoids the invalidity of historical passwords stored in ROM, improves the security of ROM storage of historical passwords, ensures a more secure password setting process, and enhances the security of the computer.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116010938B_ABST
    Figure CN116010938B_ABST
Patent Text Reader

Abstract

The present invention provides a password setting method and device. The method includes: when obtaining the current password to be set by a password setting object this time, searching for the historical password of the password setting object in a read-only memory (ROM); when the historical password is found in the ROM, obtaining the historical password and the identification information of the historical password, and the identification information of any historical password includes characters used to describe the setting order of any historical password among all historical passwords; based on the historical password and the identification information of the historical password, when it is determined that the ROM and the current password pass the security verification, performing password setting on the password setting object based on the current password. The password setting method and device provided by the present invention can effectively avoid the invalidation of the historical password stored in the ROM with only a small amount of computing resources consumed, improve the security of storing the historical password in the ROM, and perform password setting more securely.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a password setting method and device. Background Art

[0002] With the rapid development of computer technology, the requirements for computer security are getting higher and higher.

[0003] In the prior art, the security of a computer can be improved by setting a password. However, usually, the currently set password cannot be repeated with a previously used historical password.

[0004] Generally, when setting passwords, historical passwords can be stored in a read-only memory (ROM). However, there are loopholes in the prior art method of using ROM to store historical passwords, which will cause the historical passwords stored in ROM to become invalid, so that the currently set password may be the same as the historical password, which poses a great security risk. Therefore, how to set passwords more safely is a technical problem that needs to be solved urgently in this field. Summary of the invention

[0005] The present invention provides a password setting method and device, which are used to solve the defect in the prior art that the historical passwords stored in the ROM are invalid, resulting in the current set password being the same as the historical password, which poses a great security risk, and realizes safer password setting.

[0006] The present invention provides a password setting method, comprising:

[0007] When the current password to be set by the password setting object is obtained, searching the read-only memory ROM for the historical password of the password setting object;

[0008] In the case where the historical password is found in the ROM, acquiring the historical password and identification information of the historical password, wherein the identification information of any historical password includes characters used to describe the setting order of any historical password among all historical passwords;

[0009] Based on the historical password and the identification information of the historical password, performing security verification on the ROM and the current password;

[0010] In the case where it is determined that the ROM and the current password pass the security check, a password is set for the password setting object based on the current password.

[0011] According to a password setting method provided by the present invention, after determining that the ROM and the current password pass the security check and setting a password for the password setting object based on the current password, the method further includes:

[0012] Determine the current password as the target historical password of the password setting object, generate identification information for the target historical password based on the setting order of the target historical password among all historical passwords, and store the target historical password and the identification information of the target historical password in the ROM.

[0013] According to a password setting method provided by the present invention,

[0014] After obtaining the current password to be set by the password setting object this time and searching for the historical password of the password setting object in the read-only memory ROM, the method further includes:

[0015] If the historical password is not found in the ROM, obtain the storage address of the ROM;

[0016] Based on the storage address, perform a security check on the ROM;

[0017] If it is determined that the ROM passes the security check, set a password for the password setting object based on the current password;

[0018] Determine the current password as the first historical password of the password setting object, generate identification information for the first historical password, and store the first historical password and the identification information of the first historical password in the ROM.

[0019] According to a password setting method provided by the present invention, the security check on the ROM and the current password based on the historical password and the identification information of the historical password includes:

[0020] Judge whether the historical password is the same as the current password, whether the identification information of the historical password matches the number of historical passwords, and when the number of historical passwords is multiple, judge whether the identification information of the historical password is continuous;

[0021] If the historical password is different from the current password and the identification information of the historical password matches the number of historical passwords, or, if the historical password is different from the current password, the number of historical passwords is multiple, the identification information of the historical password matches the number of historical passwords and the identification information of the historical password is continuous, determine that the ROM passes the security check.

[0022] A password setting method provided by the present invention, based on the storage address, performing a security check on the ROM, includes:

[0023] Determine whether the storage address is the same as a preset value;

[0024] When the storage address is the same as the preset value, determine that the ROM passes the security check.

[0025] A password setting method provided by the present invention, after performing a security check on the ROM and the current password based on the historical password and the identification information of the historical password, the method further includes:

[0026] When the ROM fails the security check, display a first message on the user interface, the first message is used to prompt the user that there is a risk of the ROM being tampered with and ask the user whether to clear the ROM;

[0027] When receiving a second message input by the user based on the first message indicating confirmation to clear the ROM, clear the ROM through the Basic Input / Output System (BIOS).

[0028] A password setting method provided by the present invention, after performing a security check on the ROM based on the storage address, the method further includes:

[0029] When the ROM fails the security check, display a first message on the user interface, the first message is used to prompt the user that there is a risk of the ROM being tampered with and ask the user whether to clear the ROM;

[0030] When receiving a second message input by the user based on the first message indicating confirmation to clear the ROM, clear the ROM through the BIOS.

[0031] A password setting method provided by the present invention, after obtaining the current password to be set by the password setting object this time and searching for the historical password of the password setting object in the Read-Only Memory (ROM), the method further includes:

[0032] When the historical password is not found in the ROM, obtain the storage address of the ROM;

[0033] Based on the storage address, perform a security check on the ROM;

[0034] When it is determined that the ROM passes the security check, perform password setting for the password setting object based on the current password;

[0035] Determine the current password as the first historical password of the password setting object, and then generate identification information for the first historical password. Store the first historical password and the identification information of the first historical password in the ROM.

[0036] When the number of historical passwords exceeds a preset value, based on the identification information of the historical passwords, delete the historical password with the earliest setting order and the identification information of the historical password from the ROM.

[0037] The present invention also provides a password setting device, including:

[0038] A data search module, configured to search for the historical passwords of the password setting object in a read-only memory (ROM) when the current password to be set by the password setting object this time is obtained;

[0039] A data acquisition module, configured to acquire the historical password and the identification information of the historical password when the historical password is found in the ROM. The identification information of any historical password includes characters used to describe the setting order of the any historical password among all historical passwords;

[0040] A security verification module, configured to perform security verification on the ROM and the current password based on the historical password and the identification information of the historical password;

[0041] A password setting module, configured to perform password setting on the password setting object based on the current password when it is determined that the ROM and the current password pass the security verification.

[0042] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the password setting method described in any one of the above is implemented.

[0043] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the password setting method described in any one of the above is implemented.

[0044] The present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, the password setting method described in any one of the above is implemented.

[0045] The password setting method and device provided by the present invention, when the historical password of the password setting object is found in the ROM, determine that setting a password for the password setting object this time is not the first time to set a password, and then obtain the identification information of the above historical password from the ROM. The identification information of any historical password includes characters used to describe the setting order of the above any historical password among all historical passwords. Based on the historical password and the identification information of the historical password, the security verification of the ROM can be performed. When the ROM passes the security verification, the password of the password setting object is set. It can effectively avoid the invalidation of the historical password stored in the ROM with only a small amount of computing resources consumed, improve the security of the ROM storing historical passwords, perform password setting more securely, and better ensure the security of the computer. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0047] Figure 1 is one of the flow diagrams of the password setting method provided by the present invention;

[0048] Figure 2 is the shift diagram of updating the identification information of the historical password in the password setting method provided by the present invention;

[0049] Figure 3 is another flow diagram of the password setting method provided by the present invention;

[0050] Figure 4 is still another flow diagram of the password setting method provided by the present invention;

[0051] Figure 5 is the structural diagram of the password setting device provided by the present invention;

[0052] Figure 6 is the structural diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0053] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the present invention in conjunction with the drawings in the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.

[0054] In the description of the invention, it should be noted that unless otherwise clearly defined and limited, the terms "installed", "connected", and "coupled" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0055] It should be noted that the Basic Input Output System (BIOS) can usually set a password through a software-installed executable program (Setup).

[0056] When the BIOS sets a password through Setup, the historical password can be stored in the ROM. The historical password stored in the ROM is difficult to modify by external means and has relatively high external security.

[0057] However, the method of using the ROM to store the historical password has vulnerabilities. That is, in the case where the information corresponding to the ROM address storing the historical password does not match, the storage of the historical password will fail, and in the case where the ROM information is tampered with, the historical password stored in the ROM will become invalid, resulting in the possibility that the currently set password may be the same as the historical password, posing a relatively large security risk.

[0058] In view of this, the present invention provides a password setting method. Based on the password setting method provided by the present invention, in the case of setting a password for the non-first time, the identification information of the historical password can be obtained from the ROM. The identification information of any historical password includes characters used to describe the setting order of the above-mentioned any historical password among all historical passwords. Furthermore, the security of the ROM can be verified based on the historical password and the identification information of the historical password, and when the ROM passes the security verification, the password can be set again. It can effectively avoid the invalidation of the historical password stored in the ROM with only a small amount of computing resources consumed, improve the security of the ROM for storing the historical password, perform password setting more securely, and better ensure the security of the computer.

[0059] Figure 1 is one of the flow schematic diagrams of the password setting method provided by the present invention. The following combines Figure 1 to describe the password setting method of the present invention. As Figure 1 shown, the method includes: Step 101, when the current password to be set by the password setting object this time is obtained, search for the historical password of the password setting object in the read-only memory ROM.

[0060] It should be noted that the execution subject of the embodiments of the present invention is a password setting device.

[0061] It should be noted that the password setting object of the password setting method provided by the present invention can be a computer, or a certain software, a certain application program, or a certain display interface, etc. The password setting object of the password setting method in the embodiments of the present invention is not limited.

[0062] Specifically, in the case of receiving a request message indicating a request to set a password for the password setting object, the current password to be set by the password setting object this time can be obtained in various ways. For example: the current password to be set this time input by the user can be received; or, the current password to be set this time sent by other electronic devices can also be received. The specific way to obtain the current password to be set by the password setting object this time in the embodiments of the present invention is not limited.

[0063] After obtaining the current password to be set by the password setting object this time, the historical password corresponding to the password setting object can also be searched in the ROM.

[0064] It should be noted that the historical password in the embodiments of the present invention refers to all the passwords set for the password setting object before setting the password for the password setting object this time.

[0065] Step 102: When the historical password is found in the ROM, obtain the historical password and the identification information of the historical password. The identification information of any historical password includes characters used to describe the setting order of any historical password among all historical passwords.

[0066] Specifically, if the historical password corresponding to the password setting object is found in the ROM, it can be determined that setting the password this time is not the first time to set a password for the password setting object.

[0067] It can be understood that the number of historical passwords in the embodiments of the present invention can be one or more.

[0068] When it is determined that setting the password this time is not the first time to set a password for the password setting object, the historical password and the identification information of the historical password of the password setting object can be obtained from the ROM. Among them, the identification information of any historical password includes characters used to describe the setting order of the any historical password among all historical passwords.

[0069] The identification information of any historical password can be generated based on the setting order of the any historical password among all historical passwords and a preset generation rule after setting the any historical password for the password setting object.

[0070] Among them, the setting order of any of the above historical passwords in all historical passwords can represent the cumulative number of times the password has been set for the above password setting object after setting any of the above historical passwords. For example, when the character used to describe the setting order of a certain historical password is "1", it can be represented that after setting the above historical password for the above password setting object, the cumulative number of times the above password setting object has set a password is once, and setting the above historical password for the above password setting object is the first time to set a password for the above password setting object; when the character used to describe the setting order of a certain historical password is "3", it can be represented that after setting the above historical password for the above password setting object, the cumulative number of times the above password setting object has set a password is three times, and setting the above historical password for the above password setting object is the third time to set a password for the above password setting object.

[0071] It should be noted that the above preset generation rule can be determined according to the actual situation. For example, the above preset generation rule can include combining a preset special character with the character used to describe the setting order of the historical password as the identification information of the historical password.

[0072] Optionally, the above preset generation rule can include the special character "@#", plus the character used to describe the setting order of any historical password, as the identification information of any historical password. For example, when a certain historical password is "12345678" and the character used to describe the setting order of the above historical password is "2", the identification information of the above historical password can include "@#2". The identification information of the above historical password can represent that setting the password "12345678" for the above password setting object is the second time to set a password for the above password setting object.

[0073] Optionally, the identification information of the historical password can be suffixed after the historical password or inserted before the historical password. In the embodiments of the present invention, the specific setting position of the identification information of the historical password is not limited.

[0074] It should be noted that after setting the historical password for the above password setting object and generating the identification information of the above historical password, the above historical password and the identification information of the above historical password can be stored in the ROM.

[0075] Step 103: Based on the historical password and the identification information of the historical password, perform a security check on the ROM and the current password.

[0076] Specifically, after obtaining the identification information of the historical password from the ROM, the security verification of the ROM can be performed in various ways based on the identification information of the historical password. For example, conditional judgment can be made based on the identification information of the historical password, and then it can be determined whether the ROM passes the security verification based on the result of the conditional judgment. In the embodiments of the present invention, the specific method for performing the security verification of the ROM based on the identification information of the historical password is not limited.

[0077] After obtaining the historical password from the ROM, it is also possible to verify whether the historical password is the same as the current password described above.

[0078] As an optional embodiment, based on the historical password and the identification information of the historical password, the security verification of the ROM and the current password includes: determining whether the historical password is the same as the current password, determining whether the identification information of the historical password matches the number of historical passwords, and in the case where the number of historical passwords is multiple, determining whether the identification information of the historical passwords is continuous.

[0079] It can be understood that the current password to be set this time cannot be the same as the historical password.

[0080] Since the identification information of the historical password can be used to describe the setting order of the historical password, therefore, in the case where there is no vulnerability in the ROM, the identification information of the historical password should match the number of historical passwords, and in the case where the number of historical passwords is multiple, the identification information of each historical password should be continuous.

[0081] For example, in the case where the identification information of the historical password includes "@#1", "@#2", "@#3" and "@#4", the number of historical passwords should be 4. If the number of historical passwords is not 4, it can be indicated that the ROM has been tampered with and the historical passwords stored in the ROM are invalid.

[0082] For another example, in the case where the identification information of the historical password only includes "@#1", the number of historical passwords should be 1. If the number of historical passwords is not 1, it can be indicated that the ROM has been tampered with and the historical passwords stored in the ROM are invalid.

[0083] For another example, in the case where the identification information of the historical password includes "@#1", "@#2", "@#3" and "@#4", it can be indicated that the identification information of the historical passwords is continuous. If the identification information of the historical password includes "@#1", "@#2" and "@#4", it indicates that the identification information of each historical password is not continuous, the ROM has been tampered with, and the historical passwords stored in the ROM are invalid.

[0084] In an embodiment of the present invention, it is possible to determine whether the ROM passes the security check by determining whether the historical password is the same as the current password, whether the identification information of the historical password matches the number of historical passwords, and, in the case where the number of historical passwords is multiple, determining whether the identification information of the historical passwords is consecutive.

[0085] After obtaining the historical password from the ROM, it is possible to determine whether the historical password is the same as the current password.

[0086] After obtaining the identification information of the historical password from the ROM, based on the identification information of the historical password, it is possible to obtain the maximum value among the characters used to describe the setting order of the historical password, and then it is possible to determine whether the number of historical passwords is the same as the above maximum value. In the case where the number of historical passwords is the same as the above maximum value, it can be determined that the identification information of the historical password matches the number of historical passwords; in the case where the number of historical passwords is not the same as the above maximum value, it can be determined that the identification information of the historical password does not match the number of historical passwords.

[0087] After obtaining the identification information of the historical password from the ROM, if the number of historical passwords is multiple, it is possible to determine whether the characters used to describe the setting order of the historical password in the identification information of each historical password are consecutive. If the above characters are consecutive, it can be determined that the identification information of each historical password is consecutive; if the above characters are not consecutive, it can be determined that the identification information of each historical password is not consecutive.

[0088] In the case where the historical password is different from the current password and the identification information of the historical password matches the number of historical passwords, or, in the case where the historical password is different from the current password, the number of historical passwords is multiple, the identification information of the historical password matches the number of historical passwords, and the identification information of the historical passwords is consecutive, it is determined that the ROM passes the security check.

[0089] Specifically, in the case where the number of historical passwords is one, if it is determined that the identification information of the historical password matches the number of historical passwords and the historical password is different from the current password, it can be determined that the ROM passes the security check;

[0090] In the case where the number of historical passwords is multiple, if it is determined that the historical password is different from the current password, the identification information of the historical password matches the number of historical passwords, and the identification information of each historical password is consecutive, it can be determined that the ROM passes the security check;

[0091] In the case where the number of historical passwords is one or more, if it is determined that the identification information of the historical password does not match the number of historical passwords, and / or, it is determined that the historical password is the same as the current password, it can be determined that the ROM fails the security check;

[0092] In the case where the number of historical passwords is multiple, if it is determined that the identification information of each historical password is not continuous, it can be determined that the ROM fails the security check.

[0093] Step 104: When it is determined that the ROM and the current password pass the security check, set the password for the password setting object based on the current password.

[0094] Specifically, when the ROM and the current password to be set this time pass the security check, the password of the above password setting object can be set to the above current password, and thus the password setting for the above device object this time can be completed.

[0095] As an optional embodiment, after setting the password for the password setting object based on the current password when it is determined that the ROM and the current password pass the security check, the method further includes: determining the current password as the target historical password of the password setting object, generating the identification information of the target historical password based on the setting order of the target historical password among all historical passwords, and storing the target historical password and the identification information of the target historical password in the ROM.

[0096] After setting the password of the above password setting object to the current password to be set this time, the above current password can be determined as the target historical password, and thus the identification information of the above target historical password can be generated based on the setting order of the above target historical password among all historical passwords of the password setting object and the above preset generation rule. Among them, the identification information of the above target historical password includes characters used to describe the setting order of the above target historical password among all historical passwords.

[0097] It should be noted that the above setting order of the target historical password can represent the cumulative number of times the password has been set for the above password setting object after setting the above target historical password for the above password setting object, usually the number of historical passwords obtained from the ROM plus 1, or the maximum value of the characters used to describe the setting order of the historical passwords in the identification information of the historical passwords plus 1. For example: in the case where the identification information of the historical passwords includes "@#1", "@#2", "@#3", and "@#4", the identification information of the current password can include "@#5".

[0098] After setting the above current password for the above password setting object, determining the above current password as the target historical password, and generating the identification information of the above target historical password, the above target historical password and the identification information of the above target historical password can be stored in the ROM for subsequent security check of the ROM when setting a password for the above password setting object.

[0099] It should be noted that after setting the above current password for the above password setting object, if it is necessary to verify the above current password, it is only necessary to verify whether the user's input is the same as the above current password, and it is not necessary to verify the identification information of the above current password.

[0100] In the embodiment of the present invention, when the historical password of the password setting object is found in the ROM, it is determined that setting the password for the password setting object this time is not the first time to set the password. Then, the identification information of the above historical password is obtained from the ROM. The identification information of any historical password includes characters used to describe the setting order of the above any historical password among all historical passwords. Based on the historical password and the identification information of the historical password, the security check of the ROM can be performed. When the ROM passes the security check, the password setting object is set with a password. It can effectively avoid the invalidation of the historical password stored in the ROM with only a small amount of computing resources consumed, improve the security of the ROM storing historical passwords, perform password setting more securely, and better ensure the security of the computer.

[0101] Based on the content of the above embodiments, when the current password to be set by the password setting object this time is obtained, after finding the historical password of the password setting object in the read-only memory ROM, the method further includes: when the historical password is not found in the ROM, obtaining the storage address of the ROM.

[0102] Specifically, if the historical password corresponding to the above password setting object is not found in the ROM, it can be determined that setting the password this time is the first time to set the password for the above password setting object.

[0103] When it is determined that setting the password this time is the first time to set the password for the above password setting object, the storage address in the ROM for storing the password can also be obtained.

[0104] Based on the storage address, perform a security check on the ROM.

[0105] Specifically, after obtaining the storage address in the ROM for storing the password, based on the above storage address, the ROM can be security-checked in various ways. For example: conditional judgment can be performed based on the above storage address, and based on the result of the conditional judgment, it can be determined whether the ROM passes the security check. In the embodiment of the present invention, the specific method for performing the security check on the ROM based on the above storage address is not limited.

[0106] As an optional embodiment, performing a security check on the ROM based on the storage address includes: judging whether the storage address is the same as a preset value.

[0107] Specifically, after obtaining the storage address in the ROM for storing the password, it can be determined whether the above storage address is the same as the preset value.

[0108] It should be noted that the above preset value can be determined based on prior knowledge and / or actual situations. In the embodiments of the present invention, the above preset value is not specifically limited.

[0109] When the storage address is the same as the preset value, it is determined that the ROM passes the security check.

[0110] If the above storage address is different from the preset value, it indicates that the ROM may have been tampered with, and it can be determined that the ROM fails the security check.

[0111] If the above storage address is the same as the preset value, it can be determined that the ROM passes the security check.

[0112] When it is determined that the ROM passes the security check, the password of the password setting object is set based on the current password.

[0113] Specifically, when the ROM passes the security check, the password of the above password setting object can be set to the current password to be set this time, and thus the password setting of the above device object can be completed.

[0114] The current password is determined as the first historical password of the password setting object, and then the identification information of the first historical password is generated, and the first historical password and the identification information of the first historical password are stored in the ROM.

[0115] Specifically, after setting the password of the above password setting object to the current password to be set this time, since this password setting is the first time to set a password for the above password setting object, the current password can be determined as the first historical password of the above password setting object, and then the identification information of the above first historical password can be generated based on the above preset generation rule. Among them, the identification information of the above first historical password includes the character "1", indicating that setting the above current password for the above password setting object is the first time to set a password for the above password setting object.

[0116] After setting the above current password for the above password setting object, determining the above current password as the first historical password of the above password setting object, and generating the identification information of the above first historical password, the above first historical password and the identification information of the above first historical password can be stored in the ROM for subsequent security check of the ROM when setting a password for the above password setting object.

[0117] In an embodiment of the present invention, when the historical password of the password setting object is found in the ROM, the storage address of the ROM is obtained, so that based on the above storage address, the security check of the ROM can be performed. When the ROM passes the security check, the first password setting of the above password setting object is performed, and after the first password setting of the above password setting object is completed, the above current password is determined as the first historical password of the above password setting object, the identification information of the above first historical password is generated, and the above first historical password and the identification information of the above first historical password are stored in the ROM, which can perform password setting more securely with only a small amount of computing resources when setting the password for the first time.

[0118] Based on the content of the above embodiments, after performing the security check on the ROM and the current password based on the historical password and the identification information of the historical password, the method further includes: when the ROM fails to pass the security check, display a first message on the user interaction interface, where the first message is used to prompt the user that there is a risk of the ROM being tampered with and ask the user whether to clear the ROM.

[0119] Specifically, when it is determined that the ROM fails to pass the security check based on the identification information of the historical password, the first message can be displayed on the user interaction interface, so as to prompt the user that the ROM has been tampered with and ask the user whether to clear the ROM.

[0120] Optionally, in an embodiment of the present invention, the above first message can be displayed on the user interaction interface in a pop-up window.

[0121] When receiving the second message representing the confirmation to clear the ROM input by the user based on the first message, the ROM is cleared through the Basic Input / Output System (BIOS).

[0122] Specifically, after the above first message for prompting the user that the ROM has been tampered with and asking the user whether to clear the ROM is displayed on the user interaction interface, if the second message representing the confirmation to clear the ROM input by the user based on the above first message is received, the ROM can be cleared through the BIOS.

[0123] Optionally, the BIOS can clear the section in the ROM for storing the historical password and the identification information of the historical password.

[0124] Based on the content of the above embodiments, after performing the security check on the ROM based on the storage address, the method further includes: when the ROM fails to pass the security check, display a first message on the user interaction interface, where the first message is used to prompt the user that there is a risk of the ROM being tampered with and ask the user whether to clear the ROM.

[0125] Specifically, when it is determined that the ROM fails the security check based on the storage address of the ROM, the first information can be displayed on the user interaction interface, so as to prompt the user that the ROM has been tampered with and ask the user whether to clear the ROM.

[0126] Optionally, in the embodiments of the present invention, the above first information can be encrypted and displayed in a pop-up window on the user interaction interface.

[0127] When receiving the second information indicating confirmation to clear the ROM input by the user based on the first information, the ROM is cleared through the BIOS.

[0128] Specifically, after the above first message for prompting the user that the ROM has been tampered with and asking the user whether to clear the ROM is displayed on the user interaction interface, if the second information indicating confirmation to clear the ROM is received based on the identification input by the user based on the above first message, the ROM can be cleared through the BIOS.

[0129] Optionally, the BIOS can clear the section in the ROM for storing passwords.

[0130] In the embodiments of the present invention, when the ROM fails the security check, the first message for prompting the user that the ROM has been tampered with and asking the user whether to clear the ROM is displayed on the user interaction interface, and when the second information indicating confirmation to clear the ROM is received based on the identification input by the user based on the above first message, the ROM is cleared through the BIOS, which can prompt the user of risks in a more timely manner. When there is a risk that the ROM has been tampered with, by clearing the ROM, the tampered data in the ROM can be cleared, which can further improve the security of storing historical passwords in the ROM and further improve the security of password setting.

[0131] Based on the content of the above embodiments, when the ROM and the current password pass the security check, after setting the password for the password setting object based on the current password, before storing the target historical password and the identification information of the target historical password into the ROM, the method further includes: when the number of historical passwords exceeds a preset value, based on the identification information of the historical passwords, deleting the historical password with the earliest setting order and the identification information of the historical password from the ROM.

[0132] Specifically, after obtaining the historical passwords from the ROM, it can be determined whether the number of historical passwords exceeds a preset value.

[0133] If the number of historical passwords exceeds a preset value, after setting the password of the above password setting object to the above current password and determining the above current password as the target historical password, before storing the above target historical password and the identification information of the above target historical password in the ROM, based on the characters in the identification information of the historical password used to describe the setting order of the historical password, delete the historical password with the earliest setting order and the identification information of the above historical password from the ROM.

[0134] For example, when the above preset value is 3 and the number of historical passwords obtained from the ROM is 4, and the identification information of each historical password includes "@#1", "@#2", "@#3", and "@#4", then based on the characters in the identification information of the above historical password used to describe the setting order of the historical password, it can be determined that the historical password with the identification information including "@#1" is the historical password with the earliest setting order, and the above historical password and the identification information of the above historical password can be deleted from the ROM.

[0135] It should be noted that the above preset value can be determined based on prior knowledge and / or actual situations. In the embodiments of the present invention, the above preset value is not specifically limited.

[0136] Optionally, after deleting the historical password with the earliest setting order and the identification information of the historical password from the ROM, the identification information of each existing historical password in the ROM can also be updated.

[0137] Figure 2 It is a schematic diagram of the shift of the identification information of the historical password updated in the password setting method provided by the present invention. As Figure 2 shown, after deleting the historical password with the earliest setting order and the identification information of the historical password from the ROM, the characters in the identification information of each historical password used to describe the setting order of the historical password can be advanced by 1 bit.

[0138] In the embodiments of the present invention, when the number of historical passwords obtained from the ROM exceeds the preset value, before storing the current password and the identification information of the current password in the ROM, based on the identification information of the historical password, deleting the historical password with the earliest setting order and the identification information of the historical password from the ROM can prevent the data volume stored in the ROM from being too large and causing the calculation speed to decrease.

[0139] To facilitate the understanding of the password setting method provided by the present invention, the following uses an example to illustrate the password setting method provided by the present invention.

[0140] Figure 3 It is the second schematic diagram of the process of the password setting method provided by the present invention. As Figure 3As shown, when the current password to be set this time is obtained, it is possible to check in the ROM whether there is a historical password.

[0141] If a historical password is found in the ROM, it can be determined that this password setting is not the first time to set a password for the above password setting object.

[0142] When it is determined that this password setting is not the first time to set a password for the above password setting object, the above historical password and the identification information of the above historical password can be obtained from the ROM.

[0143] After obtaining the identification information of the historical password from the ROM, the security of the ROM can be verified based on the identification information of the historical password. After obtaining the historical password from the ROM, it can also be verified whether the historical password is the same as the above current password.

[0144] When the ROM and the current password to be set this time pass the security verification, the password of the above password setting object can be set to the above current password, and then the password setting for the above device object can be completed this time.

[0145] If the historical password corresponding to the above password setting object is not found in the ROM, it can be determined that this password setting is the first time to set a password for the above password setting object.

[0146] After setting the password of the above password setting object to the current password to be set this time, the above current password can be determined as the target historical password, and the identification information of the above target historical password can be generated based on the setting order of the above target historical password among all historical passwords and the above preset generation rule.

[0147] After generating the identification information of the above target historical password, the above target historical password and the above target historical password can be stored in the ROM for security verification of the ROM when setting a password for the above password setting object next time.

[0148] When it is determined that this password setting is the first time to set a password for the above password setting object, the storage address in the ROM for storing passwords can also be obtained.

[0149] After obtaining the storage address in the ROM for storing passwords, it can be determined whether the above storage address is the same as the preset value.

[0150] If the above storage address is the same as the preset value, it can be determined that the ROM passes the security verification.

[0151] When the ROM passes the security verification, the password of the above password setting object can be set to the current password to be set this time, and then the password setting for the above device object can be completed.

[0152] After setting the password of the above password setting object to the current password to be set this time, the above current password can be determined as the first historical password of the above password setting object, and the identification information of the above first historical password can be generated based on the above preset generation rule.

[0153] After generating the identification information of the above first historical password, the above first historical password and the above first historical password can be stored in the ROM for security verification of the ROM when setting the password for the above password setting object next time.

[0154] Figure 4 It is the third flowchart of the password setting method provided by the present invention. As Figure 4 shown, after obtaining the historical password from the ROM, it can be determined whether the number of historical passwords exceeds a preset value.

[0155] If the number of historical passwords exceeds the preset value, then after setting the password of the above password setting object to the above current password and determining the above current password as the target historical password, before storing the above target historical password and the identification information of the above target historical password in the ROM, based on the character used to describe the setting order of the historical password in the identification information of the historical password, the historical password with the earliest setting order and the identification information of the above historical password are deleted from the ROM.

[0156] After deleting the historical password with the earliest setting order and the identification information of the historical password from the ROM, the identification information of each existing historical password in the ROM can also be updated.

[0157] Figure 5 It is the structural schematic diagram of the password setting device provided by the present invention. The following combines Figure 5 to describe the password setting device provided by the present invention. The password setting device described below can be correspondingly referred to the password setting method provided by the present invention described above. As Figure 5 shown, the device includes: a data search module 501, a data acquisition module 502, a security verification module 503, and a password setting module 504.

[0158] The data search module 501 is configured to search for the historical password of the password setting object in the read-only memory ROM when the current password to be set for the password setting object this time is obtained.

[0159] The data acquisition module 502 is configured to obtain the historical password and the identification information of the historical password when the historical password is found in the ROM. The identification information of any historical password includes a character used to describe the setting order of any historical password among all historical passwords.

[0160] A security verification module 503, configured to perform security verification on the ROM and the current password based on the historical password and the identification information of the historical password.

[0161] A password setting module 504, configured to perform password setting on a password setting object based on the current password when it is determined that the ROM and the current password pass the security verification.

[0162] Specifically, the data search module 501, the data acquisition module 502, the security verification module 503, and the password setting module 504 are electrically connected.

[0163] The data search module 501 can obtain the current password to be set for the password setting object in various ways. For example, it can receive the current password to be set input by the user; or it can also receive the current password to be set sent by other electronic devices. In the embodiments of the present invention, the specific manner of obtaining the current password to be set is not limited.

[0164] After obtaining the current password to be set, the data search module 501 can also search for the historical password corresponding to the password setting object in the ROM.

[0165] If the historical password corresponding to the password setting object is found in the ROM, the data acquisition module 502 can obtain the historical password and the identification information of the historical password from the ROM.

[0166] After obtaining the identification information of the historical password from the ROM, the security verification module 503 can perform security verification on the ROM in various ways based on the identification information of the historical password. For example, it can perform conditional judgment based on the identification information of the historical password, and then determine whether the ROM passes the security verification based on the conditional judgment result. In the embodiments of the present invention, the specific manner of performing security verification on the ROM based on the identification information of the historical password is not limited.

[0167] When the ROM and the current password to be set pass the security verification, the password setting module 504 can set the password of the password setting object to the current password, and thus complete the password setting for the device object this time.

[0168] Optionally, the password setting device may further include a data storage module.

[0169] The data storage module can be configured to determine the current password as the target historical password of the password setting object, generate the identification information of the target historical password based on the setting order of the target historical password among all historical passwords, and store the target historical password and the identification information of the target historical password in the ROM.

[0170] Optionally, the data lookup module 501 can also be used to obtain the storage address of the ROM when the historical password cannot be found in the ROM; based on the storage address, perform a security check on the ROM; when it is determined that the ROM passes the security check, set the password for the password setting object based on the current password; determine the current password as the first historical password of the password setting object, and then generate identification information for the first historical password, and store the first historical password and the identification information of the first historical password in the ROM.

[0171] Optionally, the security check module 503 can specifically be used to determine whether the historical password is the same as the current password, determine whether the identification information of the historical password matches the number of historical passwords, and when there are multiple historical passwords, determine whether the identification information of the historical passwords is continuous; when the historical password is different from the current password and the identification information of the historical password matches the number of historical passwords, or, when the historical password is different from the current password, there are multiple historical passwords, the identification information of the historical password matches the number of historical passwords, and the identification information of the historical passwords is continuous, it is determined that the ROM passes the security check.

[0172] Optionally, the security check module 503 can specifically be used to determine whether the storage address is the same as a preset value; when the storage address is the same as the preset value, it is determined that the ROM passes the security check.

[0173] Optionally, the password setting device can also include an alarm module.

[0174] The alarm module can be used to display a first message on the user interface when the ROM fails the security check. The first message is used to prompt the user that there is a risk of the ROM being tampered with and ask the user whether to clear the ROM; when receiving a second message indicating confirmation to clear the ROM input by the user based on the first message, clear the ROM through the Basic Input / Output System (BIOS).

[0175] Optionally, the password setting device can also include a historical password update module.

[0176] The historical password update module can be used to delete the historical password with the earliest setting order and the identification information of the historical password from the ROM based on the identification information of the historical password when the number of historical passwords exceeds the preset value.

[0177] In the password setting device according to the embodiment of the present invention, when the historical password of the password setting object is found in the ROM, it is determined that setting the password for the password setting object this time is not the first time to set the password. Then, the identification information of the above historical password is obtained from the ROM. The identification information of any historical password includes characters used to describe the setting order of the above any historical password among all historical passwords. Based on the historical password and the identification information of the historical password, the security verification of the ROM can be performed. When the ROM passes the security verification, the password of the password setting object is set. It can effectively avoid the invalidation of the historical password stored in the ROM with only a small amount of computing resources consumed, improve the security of the ROM storing the historical password, perform password setting more securely, and better ensure the security of the computer.

[0178] Figure 6 An example of the physical structure diagram of an electronic device is shown as Figure 6 shown. The electronic device may include: a processor 610, a communication interface 620, a memory 630, and a communication bus 640. Among them, the processor 610, the communication interface 620, and the memory 630 complete mutual communication through the communication bus 640. The processor 610 can call the logical instructions in the memory 630 to execute the password setting method, which includes: when the current password to be set by the password setting object this time is obtained, searching for the historical password of the password setting object in the read-only memory ROM; when the historical password is found in the ROM, obtaining the historical password and the identification information of the historical password. The identification information of any historical password includes characters used to describe the setting order of any historical password among all historical passwords; based on the historical password and the identification information of the historical password, performing security verification on the ROM and the current password; when it is determined that the ROM and the current password pass the security verification, setting the password of the password setting object based on the current password.

[0179] In addition, when the logical instructions in the above-mentioned memory 630 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs, Read-Only Memories), random access memories (RAMs, Random Access Memories), magnetic disks, or optical discs that can store program codes.

[0180] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the password setting method provided by the above-mentioned various methods. The method includes: when obtaining the current password to be set by the password setting object this time, searching for the historical password of the password setting object in the read-only memory ROM; when the historical password is found in the ROM, obtaining the historical password and the identification information of the historical password, and the identification information of any historical password includes characters used to describe the setting order of any historical password among all historical passwords; based on the historical password and the identification information of the historical password, performing a security check on the ROM and the current password; when it is determined that the ROM and the current password pass the security check, setting the password for the password setting object based on the current password.

[0181] In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is implemented to execute the password setting method provided by the above-mentioned various methods. The method includes: when obtaining the current password to be set by the password setting object this time, searching for the historical password of the password setting object in the read-only memory ROM; when the historical password is found in the ROM, obtaining the historical password and the identification information of the historical password, and the identification information of any historical password includes characters used to describe the setting order of any historical password among all historical passwords; based on the historical password and the identification information of the historical password, performing a security check on the ROM and the current password; when it is determined that the ROM and the current password pass the security check, setting the password for the password setting object based on the current password.

[0182] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative work.

[0183] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0184] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or equivalently replace some of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A password setting method, characterized in that, it includes: When the current password to be set by the password setting object this time is obtained, search for the historical password of the password setting object in the read-only memory (ROM); When the historical password is found in the ROM, obtain the historical password and the identification information of the historical password. The identification information of any historical password includes characters used to describe the setting order of the any historical password among all historical passwords; Based on the historical password and the identification information of the historical password, perform a security check on the ROM and the current password; When it is determined that the ROM and the current password pass the security check, perform password setting on the password setting object based on the current password; After performing password setting on the password setting object based on the current password when it is determined that the ROM and the current password pass the security check, the method further includes: Determine the current password as the target historical password of the password setting object, and generate the identification information of the target historical password based on the setting order of the target historical password among all historical passwords, and store the target historical password and the identification information of the target historical password into the ROM; The performing a security check on the ROM and the current password based on the historical password and the identification information of the historical password includes: Judge whether the historical password is the same as the current password, judge whether the identification information of the historical password matches the number of historical passwords, and when the number of historical passwords is multiple, judge whether the identification information of the historical passwords is continuous; When the historical password is different from the current password and the identification information of the historical password matches the number of historical passwords, or when the historical password is different from the current password, the number of historical passwords is multiple, the identification information of the historical password matches the number of historical passwords and the identification information of the historical passwords is continuous, determine that the ROM passes the security check.

2. The password setting method according to claim 1, characterized in that, after searching for the historical password of the password setting object in the read-only memory (ROM) when the current password to be set by the password setting object this time is obtained, the method further includes: When the historical password is not found in the ROM, obtain the storage address of the ROM; Based on the storage address, perform a security check on the ROM; When it is determined that the ROM passes the security check, perform password setting on the password setting object based on the current password; Determine the current password as the first historical password of the password setting object, and then generate the identification information of the first historical password, and store the first historical password and the identification information of the first historical password into the ROM.

3. The password setting method according to claim 2, characterized in that, the performing a security check on the ROM based on the storage address includes: Determine whether the storage address is the same as a preset value; In the case where the storage address is the same as the preset value, determine that the ROM passes the security check.

4. The password setting method according to claim 1, wherein, after performing the security check on the ROM and the current password based on the historical password and the identification information of the historical password, the method further includes: In the case where the ROM fails the security check, display a first message on the user interface, where the first message is used to prompt the user that there is a risk of the ROM being tampered with and ask the user whether to clear the ROM; In the case of receiving a second message input by the user based on the first message indicating confirmation to clear the ROM, clear the ROM through the Basic Input / Output System (BIOS).

5. The password setting method according to claim 3, wherein, after performing the security check on the ROM based on the storage address, the method further includes: In the case where the ROM fails the security check, display a first message on the user interface, where the first message is used to prompt the user that there is a risk of the ROM being tampered with and ask the user whether to clear the ROM; In the case of receiving a second message input by the user based on the first message indicating confirmation to clear the ROM, clear the ROM through the BIOS.

6. The password setting method according to claim 2, wherein, after setting the password for the password setting object based on the current password in the case where the ROM and the current password pass the security check, before storing the target historical password and the identification information of the target historical password into the ROM, the method further includes: In the case where the number of historical passwords exceeds the preset value, delete the historical password with the earliest setting order and the identification information of the historical password from the ROM based on the identification information of the historical password.

7. A password setting device, wherein, comprises: A data search module, configured to search for the historical password of the password setting object in a Read-Only Memory (ROM) when obtaining the current password to be set by the password setting object this time; A data acquisition module, configured to acquire the historical password and the identification information of the historical password when the historical password is found in the ROM, and the identification information of any historical password includes a character used to describe the setting order of the any historical password among all historical passwords; A security check module, configured to perform a security check on the ROM and the current password based on the historical password and the identification information of the historical password; A password setting module, configured to set the password for the password setting object based on the current password in the case where it is determined that the ROM and the current password pass the security check; When the password setting module determines that the ROM and the current password pass the security check, after setting the password for the password setting object based on the current password, it is further configured to: Determine the current password as the target historical password of the password setting object, generate identification information for the target historical password based on the setting order of the target historical password among all historical passwords, and store the target historical password and the identification information of the target historical password in the ROM; The security check module performs a security check on the ROM and the current password based on the historical password and the identification information of the historical password, including: Judging whether the historical password is the same as the current password, judging whether the identification information of the historical password matches the number of historical passwords, and when the number of historical passwords is multiple, judging whether the identification information of the historical password is continuous; When the historical password is different from the current password and the identification information of the historical password matches the number of historical passwords, or when the historical password is different from the current password, the number of historical passwords is multiple, the identification information of the historical password matches the number of historical passwords and the identification information of the historical password is continuous, it is determined that the ROM passes the security check.

8. An electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, Characterized in that When the processor executes the program, it implements the password setting method according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium, on which a computer program is stored, Characterized in that When the computer program is executed by a processor, it implements the password setting method according to any one of claims 1 to 6.

10. A computer program product, including a computer program, Characterized in that When the computer program is executed by a processor, it implements the password setting method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • GPSR routing security improvement method based on linear regression movement position prediction

    CN113301133A

  • Safe and credible computer based on domestic TPM encryption module

    CN212749835U