Password updating method, device, computer equipment, storage medium and program product

Through an automated password update process, the target password and identity authentication mechanism are used to solve the problems of inefficient and security risks of manual server password change in the existing technology, and a high security and availability system is achieved.

CN119783127APending Publication Date: 2025-04-08镁佳(北京)科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411799824.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

In the prior art, managers need to manually and regularly change server passwords, which are inefficient and prone to password leakage or loss due to human operation errors, increasing security risks.

Method used

By obtaining the login verification request and verifying the data matching, if it does not match, the password update process will be triggered, and the target password with high complexity and randomness will be generated, and login verification will be performed after the authentication is successful, limiting the number of verifications to prevent brute-force cracking.

Benefits of technology

An automated password update process is realized, reducing the risk of human errors, improving the security and usability of the system, and preventing password leakage and brute-force cracking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119783127A_ABST
    Figure CN119783127A_ABST
Patent Text Reader

Abstract

The present invention relates to the field of computer technology, and discloses a password update method, device, computer equipment, storage medium and program product. The method comprises: obtaining a login verification request for a first page; wherein the login verification request stores first verification data; if the first verification data does not match the pre-stored login data, obtaining a password update request for a second page; generating a target password according to the password update request; and updating the password to be updated according to the target password.
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 updating method, device, computer equipment, storage medium and program product. Background Art

[0002] In the current information age, Linux servers are critical infrastructure for enterprise data storage, business processing, and user services, and their security is extremely important. Server passwords are the first line of defense to protect servers from unauthorized access, and are extremely important to managers. Passwords are not only related to the security of user permissions, but are also directly related to the security of data stored on the server and even the information security of the entire enterprise. Currently, managers need to manually change server passwords regularly to ensure the timeliness and security of passwords. However, relying on managers to manually change passwords is not only inefficient, but also prone to password leakage or loss due to human errors, increasing security risks. Summary of the invention

[0003] In view of this, the present invention provides a password updating method, apparatus, computer equipment, storage medium and program product.

[0004] In a first aspect, the present invention provides a password updating method, comprising: obtaining a login verification request for a first page; wherein the login verification request stores first verification data; if the first verification data does not match pre-stored login data, obtaining a password updating request for a second page; generating a target password according to the password updating request; and updating the password to be updated according to the target password.

[0005] The password update method provided in this embodiment triggers the password update process when the first verification data does not match the pre-stored login data, which helps to timely replace the password that may have been leaked and reduce security risks. At the same time, the target password generated by the pseudo-random number generator usually has high complexity and randomness, which is difficult to guess or brute force, thereby improving the security of the system. In addition, by performing login verification on the first page and jumping to the second page for password update when the verification fails, the flexibility and usability of the system are enhanced.

[0006] In one possible implementation, obtaining a login verification request for a first page includes: obtaining an identity authentication request for the first page; wherein the identity authentication request stores second verification data; if the second verification data matches pre-stored identity information data, generating a verification code corresponding to the second verification data, and detecting whether the second verification data is successfully verified based on the verification code; if the second verification data is successfully verified, obtaining a login verification request for the first page.

[0007] The password update method provided in this embodiment introduces a dual mechanism of identity authentication and login authentication. Login authentication is performed only after identity authentication is successful, which greatly enhances the security of the system. In addition, by generating a verification code and detecting its correctness, security threats such as brute force cracking and automated attacks can be effectively prevented, further improving the system's protection capabilities.

[0008] In one possible implementation, if the first verification data and the pre-stored login data do not match, a password update request for the second page is obtained, including: if the first verification data and the pre-stored login data do not match, obtaining the target verification time and current time of the first verification data; wherein the target verification time is the time of the last verification of the first verification data; if the difference between the target verification time and the current time of the first verification data is less than a first preset threshold, obtaining the historical verification times of the first verification data; wherein the historical verification times are the verification times before the current difference is less than the first preset threshold; if the sum of the historical verification times and the current verification times is not less than a second preset threshold, obtaining a password update request for the second page.

[0009] The password update method provided in this embodiment can effectively prevent attackers from cracking passwords through continuous attempts by limiting the number of verifications (i.e., when the sum of the number of historical verifications and the number of current verifications is not less than a second preset threshold, a password update request is triggered), thereby improving the security of the system. In addition, by considering the difference between the target verification time and the current time, multiple login attempts in a short period of time can be limited, which helps prevent malicious users from guessing passwords through frequent attempts.

[0010] At the same time, when a user's login behavior is misjudged as abnormal (such as multiple failed logins due to network problems), the system will not immediately ask the user to update the password, but will judge based on the verification time and number of times, which helps improve the user experience.

[0011] In a possible implementation, the method further includes: if the difference between the target verification time and the current time of the first verification data is not less than a first preset threshold, clearing the historical stored verification time and the historical verification times, and using the target verification time as the first verification time.

[0012] The password updating method provided in this embodiment can avoid interference of these data with subsequent verification requests by clearing outdated verification time and historical verification times, and ensure that the system can make judgments based on the latest information, thereby improving the security of the system.

[0013] In one possible implementation, if the second verification data matches the pre-stored identity information data, a verification code corresponding to the second verification data is generated, including: if the second verification data matches the pre-stored identity information data, detecting whether the last identity authentication request for the first page exists; if the last identity authentication request for the first page does not exist, generating a verification code corresponding to the second verification data; if the last identity authentication request for the first page exists, detecting whether the difference between the time of the last identity authentication request for the first page and the current time is greater than a third preset threshold; if the difference between the time of the last identity authentication request for the first page and the current time is greater than the third preset threshold, generating a verification code corresponding to the second verification data.

[0014] The password update method provided in this embodiment can avoid repeated verification of the same verification data in a short period of time by detecting the existence of the last identity authentication request, thereby preventing malicious users from bypassing the system's security policy by repeated requests. In addition, considering the difference between the time of the last identity authentication request and the current time, it can ensure that the verification code is generated within a reasonable time interval, which helps prevent outdated verification data from being abused. At the same time, for users who continuously authenticate their identities within a short period of time, the system will not repeatedly generate verification codes, thereby reducing the user's operating burden and improving the user experience.

[0015] In one possible implementation, a target password is generated according to a password update request, including: obtaining a preset seed file and a preset password table according to the password update request; wherein the preset seed file is configured with data to be converted, and the preset password table includes a preset character string; performing binary conversion on the data to be converted to obtain target data; and generating a target password according to the target data and the preset character string.

[0016] The password update method provided in this embodiment uses a preset seed file and password table, which can ensure that the password is not generated randomly but based on a specific and verifiable algorithm. The preset nature of the seed file and password table means that they can be created and stored in a secure environment, thereby reducing the risk of the password being guessed or cracked by an external attacker.

[0017] In a second aspect, the present invention provides a password updating device, which includes a first acquisition module for acquiring a login verification request for a first page; wherein the login verification request stores first verification data; a second acquisition module for acquiring a password update request for a second page if the first verification data and pre-stored login data do not match; a generation module for generating a target password according to the password update request; and an update module for updating the password to be updated according to the target password.

[0018] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the password updating method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0019] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the password updating method of the first aspect or any corresponding embodiment thereof.

[0020] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions, wherein the computer instructions are used to enable a computer to execute the password updating method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 is a flowchart of a password updating method according to an embodiment of the present invention;

[0023] Figure 2 is a schematic diagram of a password updating method according to an embodiment of the present invention;

[0024] Figure 3 is a schematic diagram of another password updating method according to an embodiment of the present invention;

[0025] Figure 4 is a schematic diagram of another password updating method according to an embodiment of the present invention;

[0026] Figure 5 is a structural block diagram of a password updating device according to an embodiment of the present invention;

[0027] Figure 6 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0029] Based on relevant technologies, in the current information age, Linux servers are critical infrastructure for enterprise data storage, business processing and user services, and their security is extremely important. Server passwords are the first line of defense to protect servers from unauthorized access, and are extremely important to managers. Passwords are not only related to the security of user permissions, but are also directly related to the security of data stored on the server and even the information security of the entire enterprise. At present, managers need to manually change server passwords regularly to ensure the timeliness and security of passwords. However, relying on managers to manually change passwords is not only inefficient, but also prone to password leakage or loss due to human errors, increasing security risks.

[0030] Based on this, the present invention provides a password update method. When the first verification data does not match the pre-stored login data, the password update process is triggered, which helps to timely replace the password that may have been leaked and reduce security risks. At the same time, the target password generated by the pseudo-random number generator usually has high complexity and randomness, which is difficult to guess or brute force, thereby improving the security of the system. In addition, by performing login verification on the first page and jumping to the second page for password update when the verification fails, the flexibility and usability of the system are enhanced.

[0031] According to an embodiment of the present invention, a password updating method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0032] In this embodiment, a password updating method is provided, which can be used in computer devices, such as computers, servers (Linux systems), etc. Figure 1 is a flowchart of a password updating method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0033] Step S101, obtaining a login verification request for a first page; wherein the login verification request stores first verification data.

[0034] The first page may represent a page for user login. The first page may be a system login page of a system server, or other pages, which are not specifically limited here. A login verification request sent when a user attempts to log in to a system (such as a Linux system). The login verification request may store first verification data. The first verification data may represent verification data for a user to log in to the system. The first verification data may include a user ID, a user password corresponding to the user ID, etc., which are not specifically limited here.

[0035] As an example, in response to a user's triggering operation on the first page (such as keyboard tapping, mouse clicking, etc.), first verification data is input into the system login page, and a login verification request corresponding to the first verification data is obtained.

[0036] Step S102: If the first verification data and the pre-stored login data do not match, a password update request for the second page is obtained.

[0037] The pre-stored login data, that is, the historical login data, can be obtained by querying the historical data table. The second page can represent a page for updating the password. Among them, the second page can be a password management page of the system server, and the system login page stores a link interface for jumping to the password management page. If the first verification data and the pre-stored login data do not match, the password management page is entered according to the link interface.

[0038] Specifically, if the first verification data does not match the pre-stored login data, it indicates that the page login cannot be performed through the first verification data, that is, there is an error in the first verification data. After determining the first verification data, it is necessary to detect whether the first verification data and the pre-stored login data match. If the first verification data and the pre-stored login data do not match, a password update request for the second page is obtained.

[0039] As an example, in response to the user's trigger operation on the second page, the user ID and the user's reserved mobile phone number are entered on the second page, and the system server obtains the verification code corresponding to the password update request according to the password update request to unlock the password update operation.

[0040] Step S103: Generate a target password according to the password update request.

[0041] After confirming the password update request, the server generates a target password according to the password update request.

[0042] As an example, read the data in the seed file seed.txt, convert the hexadecimal data into binary; use the string to generate a password table; use the password table and binary seed data to generate 64-bit DES encrypted ciphertext; add 1 to the data in the seed file seed.txt; use the encrypted ciphertext as a random number.

[0043] As an example, a secure pseudo-random number generation algorithm (such as a cryptography-based random number generator) is used to generate the target password.

[0044] Please refer to Figure 2 and Figure 3 , Figure 2 is a schematic diagram of a password updating method provided according to an embodiment of the present invention. Figure 3 is a schematic diagram of another password updating method provided according to an embodiment of the present invention.

[0045] Please refer to Figure 2 , set the seed and DES key generation scheldule respectively through get_seed(seed_text) and get_key_scheldule(&key_scheldule); call the function long long DES_encrypt_rand(), use the ecd_DES algorithm to encrypt seed_txt through key_scheldule to obtain a 64-bit DES encrypted ciphertext, and use the DES encrypted ciphertext as a random number of type long long(); initialize a DES_key_scheldule password table, read the seed file seed.txt, convert the hexadecimal string to binary, and output the encrypted pseudo-random number sequence.

[0046] Please refer to Figure 3 , according to the above Figure 2 The process is known, Figure 2 This is the first password update process, that is, after reading the seed file seed.txt, converting the hexadecimal string into binary, and outputting the encrypted pseudo-random number sequence, the first seed file will be increased by 1 to obtain a new seed file, and the counter will be increased by 1, and then a new encrypted ciphertext will be generated through the new seed file, and the encrypted ciphertext will be used as the new target password.

[0047] Step S104: updating the password to be updated according to the target password.

[0048] The system updates the generated target password to the user's new password, replacing the original password to be updated.

[0049] As an example, the password management page includes a password update window, and the obtained encrypted pseudo-random number sequence is repeatedly entered into the password update window twice to confirm submission of the password update operation, and the encrypted pseudo-random number sequence includes at least one of the characters of numbers, letters or special symbols.

[0050] The password update method provided in this embodiment triggers the password update process when the first verification data does not match the pre-stored login data, which helps to timely replace the password that may have been leaked and reduce security risks. At the same time, the target password generated by the pseudo-random number generator usually has high complexity and randomness, which is difficult to guess or brute force, thereby improving the security of the system. In addition, by performing login verification on the first page and jumping to the second page for password update when the verification fails, the flexibility and usability of the system are enhanced.

[0051] In a possible implementation, step S101 includes:

[0052] Step a1, obtaining an identity authentication request for the first page; wherein the identity authentication request stores second authentication data.

[0053] The identity authentication request may be a verification request sent by the user when attempting to log in to a system (such as a Linux system) before obtaining the login verification request. The identity authentication request may store the second verification data. The second verification data may represent the second verification data of the user logging in to the system. The second verification data may include a mobile phone number, etc., which is not specifically limited here.

[0054] Step a2: if the second verification data matches the pre-stored identity information data, a verification code corresponding to the second verification data is generated, and whether the second verification data is successfully verified is detected according to the verification code.

[0055] The pre-stored identity information data, that is, the historical identity information data, can be obtained by querying the historical data table. Specifically, after obtaining the identity authentication request, the historical data table can be queried to determine the pre-stored identity information data corresponding to the identity authentication request, and then detect whether the pre-stored identity information data and the second verification data match. If the second verification data and the pre-stored identity information data match, it is determined that login is possible, then a verification code corresponding to the second verification data needs to be generated, and the second verification data is detected based on the verification code to determine whether verification is successful.

[0056] As an example, a reserved number is entered on the system login page to send an identity authentication request, and the corresponding identity information data is retrieved according to the identity authentication request. If a match is successful, a verification code interface connection request is sent to the system server to connect the verification code request to the verification code interface.

[0057] Step a3: if the second verification data is successfully verified, a login verification request for the first page is obtained.

[0058] If the verification code is input correctly, it indicates that the second verification data is successfully verified, and then the above step S101 is executed, which will not be described in detail here.

[0059] The password update method provided in this embodiment introduces a dual mechanism of identity authentication and login authentication. Login authentication is performed only after identity authentication is successful, which greatly enhances the security of the system. In addition, by generating a verification code and detecting its correctness, security threats such as brute force cracking and automated attacks can be effectively prevented, further improving the system's protection capabilities.

[0060] In a possible implementation, step S102 includes:

[0061] Step b1, if the first verification data and the pre-stored login data do not match, obtain the target verification time and current time of the first verification data; wherein the target verification time is the time of the last verification of the first verification data.

[0062] The target verification time is the time when the first verification data was last verified. For example, the first verification data has been entered many times during this login process. Each time the first verification data is entered, there will be a corresponding verification time. The time of the last verification is used as the target verification time. The current time can represent the current time. Specifically, if the first verification data does not match the pre-stored login data, it indicates that the first verification data has failed. In order to avoid the step of updating the password after a single failure, it is necessary to make the first judgment on whether to update the password based on the target verification time and the current time.

[0063] Step b2: if the difference between the target verification time and the current time of the first verification data is less than the first preset threshold, obtain the historical verification times of the first verification data; wherein the historical verification times are the verification times before the current difference is less than the first preset threshold.

[0064] The first preset threshold can represent the threshold for first determining that a password update is required. The first preset threshold can be 24 hours, or 15 hours, etc., and is not specifically limited here. If the difference between the target verification time of the first verification data and the current time is less than the first preset threshold, indicating that a password update is required, a second judgment is made based on the number of historical verifications of the first verification data whether a password update is required; wherein the number of historical verifications is the number of verifications before the current difference is less than the first preset threshold, that is, entering step b3.

[0065] Step b3: If the sum of the historical verification times and the current verification times is not less than a second preset threshold, a password update request for the second page is obtained.

[0066] The second preset threshold may represent the threshold for the second judgment that a password update is required. The second preset threshold may be 5 times, 10 times, etc., which is not specifically limited here. Specifically, if the sum of the number of historical verifications and the number of current verifications is not less than the second preset threshold, it indicates that a password update is required, then a password update request for the second page needs to be obtained, and the above step S103 is continued to be executed, which will not be described in detail here.

[0067] As an example, the historical data table stores historical login data. The login ID and current login password are entered on the system login page. If the login is successful, the current login time, the current login IP location and IP address are recorded in the historical login data. Err_time and err_count are written to the user data table to determine the time and number of incorrect password inputs to display login failure. The determination method includes:

[0068] 1) If the current login password does not match successfully and the err_time is checked to be a non-null value, then determine the time difference between the recorded time of the input error and the current time;

[0069] 2) If the time limit interval difference is less than 24 hours, continue to check the err_count field value to determine the cumulative number of current input errors;

[0070] 3) If the current cumulative number of input errors is determined to be 5, it is determined to be an abnormal operation and the system account is temporarily frozen.

[0071] When the entered login ID and current login password are correct, the historical login data will be recorded. The historical login data consists of the current login time, current login IP location and IP address during normal login, etc., which is convenient for viewing and calling login records.

[0072] If the current login password entered is incorrect, when the number of errors has not reached or has reached 5 times and the login is successful, it is not recorded as an abnormal operation. Err_time records the recording time of the incorrect password input, err_count records the number of incorrect password input times, and determines whether the time interval difference with the current time is greater than 24h. If the time interval difference is greater than 24h, the values ​​of err_time and err_count are cleared. err_time indicates the time when the login password was incorrectly entered, and err_count indicates the number of incorrect login passwords.

[0073] When the number of errors reaches 5 times and no login is successful, it is recorded as an abnormal operation. The login time, login password, IP location and IP address of the abnormal login will be recorded in the abnormal login data, and the login password of the operation will be marked. The system account will be temporarily frozen and the login password of the operation will be locked, making it unusable and requiring a password reset.

[0074] In one possible implementation, the historical data table stores abnormal login data, which includes abnormal login time, abnormal login password, and IP location and IP address of abnormal login. If the cumulative number of times is determined to be 5, the login password for this operation is identified as an abnormal login password, the abnormal login password is in a frozen state, and the abnormal login password is stored in the abnormal login data.

[0075] The password update method provided in this embodiment can effectively prevent attackers from cracking passwords through continuous attempts by limiting the number of verifications (i.e., when the sum of the number of historical verifications and the number of current verifications is not less than a second preset threshold, a password update request is triggered), thereby improving the security of the system. In addition, by considering the difference between the target verification time and the current time, multiple login attempts in a short period of time can be limited, which helps prevent malicious users from guessing passwords through frequent attempts.

[0076] At the same time, when a user's login behavior is misjudged as abnormal (such as multiple failed logins due to network problems), the system will not immediately ask the user to update the password, but will judge based on the verification time and number of times, which helps improve the user experience.

[0077] In a possible implementation, the method further includes: if the difference between the target verification time and the current time of the first verification data is not less than a first preset threshold, clearing the historical stored verification time and the historical verification times, and using the target verification time as the first verification time.

[0078] If the difference between the target verification time and the current time of the first verification data is not less than the first preset threshold, the verification time and the historical verification times representing the current first verification data can be recalculated. For example: if the difference between the target verification time and the current time of the first verification data is not less than the first preset threshold, and the first verification data is verified for the third time, then the verification times of the first two times can be cleared, and the historical verification times can be cleared, that is, the current verification is the first verification after re-accumulation.

[0079] As an example, the first preset threshold is set to 24 hours (1 day). User: Xiao Ming.

[0080] Login attempt record: First attempt: 10:00 on October 1, 2023, historical verification times = 1. Second attempt: 12:00 on October 1, 2023, historical verification times = 2 (accumulated based on the first attempt).

[0081] Scenario description: October 1, 2023 14:00: Xiao Ming tries to log in again. At this time, the time difference between the current time and the second attempt is 2 hours, which is less than the first preset threshold of 24 hours. Therefore, this attempt is regarded as a continuation of the second attempt, and the number of historical verifications will be accumulated to 3. Record: October 1, 2023 14:00, number of historical verifications = 3.

[0082] 10:00 on October 2, 2023: Xiao Ming tries to log in again (it's already the next day). At this time, the time difference between the current time and the second attempt is 22 hours (or more accurately, the total time difference from the first attempt exceeds 24 hours), which is greater than or equal to the first preset threshold of 24 hours. This attempt is regarded as a new beginning, and the previous records should be cleared. Therefore, this login attempt is recorded as the first verification after re-accumulation. Record: 10:00 on October 2, 2023, historical verification times = 1 (restart counting).

[0083] The password updating method provided in this embodiment can avoid interference of these data with subsequent verification requests by clearing outdated verification time and historical verification times, and ensure that the system can make judgments based on the latest information, thereby improving the security of the system.

[0084] In a possible implementation, if the second verification data matches the pre-stored identity information data in step a2, generating a verification code corresponding to the second verification data includes:

[0085] Step c1: if the second verification data matches the pre-stored identity information data, it is detected whether the last identity authentication request for the first page exists.

[0086] Step c2: if the identity authentication request for the first page obtained last time does not exist, generate a verification code corresponding to the second verification data.

[0087] In order to avoid repeatedly generating verification codes in a short period of time, if the second verification data matches the pre-stored identity information data, it is necessary to first detect whether the last identity request for the first page exists. If the last identity request for the first page does not exist, there is no need to consider the problem of repeatedly generating verification codes in a short period of time, and the verification code corresponding to the second verification data can be directly generated.

[0088] Step c3: if the identity authentication request for the first page is obtained last time, detect whether the difference between the time of the last identity authentication request for the first page and the current time is greater than a third preset threshold.

[0089] Step c4: if the difference between the time of obtaining the identity authentication request for the first page last time and the current time is greater than a third preset threshold, generate a verification code corresponding to the second verification data.

[0090] The third preset threshold may represent the threshold for generating a verification code corresponding to the second verification data. The third threshold may be 1 minute, 2 minutes, etc., which is not specifically limited here.

[0091] If the last identity request for the first page exists, it is necessary to detect whether the difference between the time of the last identity authentication request for the first page and the current time is greater than the third preset threshold, that is, to determine whether the difference between the current time and the time when the verification code was last generated according to the identity authentication request is greater than the third preset threshold. If the difference between the time when the last identity authentication request for the first page was obtained and the current time is greater than the third preset threshold, it indicates that the verification code will not be repeatedly generated in a short period of time, and the verification code corresponding to the second verification data can be directly generated.

[0092] As an example, before logging into the system, enter the reserved number in the identity information data in the number input window, and verify the identity during the login operation by sending the generated verification code to the user's mobile phone. After successful verification, the ID and password input window is unlocked.

[0093] Further, the system server generates a verification code according to the interface connection request, the verification code is composed of 4 random digits and 6 random digits, and the steps include:

[0094] 1) Verify the time when the previous verification code request was sent, to check whether the verification code request is sent frequently;

[0095] 2) If it is determined that the previous verification code request does not exist or the sending interval is greater than 1 minute, the reserved number is used as the cache-key, the verification code is used as the cache-value, and the verification code validity period is stored in the cache structure;

[0096] 3) Execute the verification code sending instruction via SMS service according to the reserved number, and enter the verification code to successfully authenticate the identity, unlocking the ID and password input operation.

[0097] Specifically, the sending time of the previous verification code application is checked. If it is still within one minute, it is determined that the verification code request operation is repeated, and the verification code becomes invalid after one minute and then unlocked.

[0098] The password update method provided in this embodiment can avoid repeated verification of the same verification data in a short period of time by detecting the existence of the last identity authentication request, thereby preventing malicious users from bypassing the system's security policy by repeated requests. In addition, considering the difference between the time of the last identity authentication request and the current time, it can ensure that the verification code is generated within a reasonable time interval, which helps prevent outdated verification data from being abused. At the same time, for users who continuously authenticate their identities within a short period of time, the system will not repeatedly generate verification codes, thereby reducing the user's operating burden and improving the user experience.

[0099] In an optional implementation, the above step S103 includes:

[0100] Step d1, according to the password update request, obtain a preset seed file and a preset password table; wherein the preset seed file is configured with the data to be converted, and the preset password table includes a preset character string.

[0101] The preset seed file may represent a file containing data to be converted, which will be used to generate part or all of the password. The content of the seed file may be arbitrary, random or pseudo-random, to ensure that the generated password has sufficient randomness and security. The preset password table may be a table or database containing preset strings, which will be used to combine with the target data to generate the final password. The password table may contain various character combinations, such as letters, numbers, special symbols, etc. Specifically, when a password update request is received, the system first searches and loads the preset seed file and password table. The seed file is usually stored in a secure location and is subject to appropriate access control. The password table may be a static file or a dynamically generated database, depending on the specific implementation of the system. For example, the seed file may contain such content: "abc123def456". The password table may contain such strings: "P@ssw0rd", "Secure123", "MyP@ss!".

[0102] Step d2, performing binary conversion on the data to be converted to obtain target data.

[0103] The data to be converted may represent data extracted from the seed file and used to generate the password. Specifically, the data to be converted is converted from the original format (such as text) to a binary format. The binary format is more suitable for encryption and hashing operations. For example, if the data to be converted is "abc", its binary conversion may be "01100001 01100010 01100011" (ASCII representation).

[0104] Step d3, generating a target password according to the target data and a preset character string.

[0105] Select one or more preset strings from the password table. Combine these strings with the target data, possibly through concatenation, hashing, encryption, etc. to generate the final target password.

[0106] As an example, the system server includes a password management page (i.e., the second page), and the system login page stores a link interface for jumping to the password management page. The password management page is entered according to the link interface, and the login ID and reserved number are entered into the password management page, and a password update request is sent to the system server to obtain a verification code and unlock the random code generation operation. The password management page data is connected to a random number generator.

[0107] The random number generator is optimized based on the Des encryption algorithm. The operation method is as follows: set the seed and DES key generation scheldule respectively through get_seed(seed_text) and get_key_scheldule(&key_scheldule); call the function long long DES_encrypt_rand(), encrypt seed_txt through key_scheldule using the ecd_DES algorithm to obtain a 64-bit DES encrypted ciphertext, and use the DES encrypted ciphertext as a long long() type random number; initialize a DES_key_scheldule password table, read the seed file seed.txt, convert the hexadecimal string into binary, and output the encrypted pseudo-random number sequence. Among them, the seed is 68-bit plain text, and the random number generated by the random number generator is converted into an encrypted pseudo-random number sequence through the Des encryption algorithm to improve the password security protection capability. Furthermore, the password management page includes a password update window, and the obtained encrypted pseudo-random number sequence is repeatedly entered into the password update window twice to confirm the submission of the password update operation. The encrypted pseudo-random number sequence includes at least one of the characters of numbers, letters or special symbols. The password update operation is completed by submitting the encrypted pseudo-random number sequence twice as the new login password to replace the old login password.

[0108] The password update method provided in this embodiment uses a preset seed file and password table, which can ensure that the password is not generated randomly but based on a specific and verifiable algorithm. The preset nature of the seed file and password table means that they can be created and stored in a secure environment, thereby reducing the risk of the password being guessed or cracked by an external attacker.

[0109] Please refer to Figure 4 , Figure 4 is a schematic diagram of another password updating method provided according to an embodiment of the present invention.

[0110] Password update methods can include:

[0111] Step S1, send an identity authentication request, verify the identity information by entering the obtained verification code, enter the login ID and login password to log in to the system, and if the ID and password are correct, jump to the password management page normally.

[0112] Step S2: If the number of incorrect login passwords reaches the limit, the old login password is frozen and the page is redirected to the password management page.

[0113] Step S3, sending a password update request, and unlocking the password generation operation by inputting the obtained verification code.

[0114] Step S4, using the Des encryption algorithm to optimize the random number generator, generating a pseudo-random number generator to obtain an encrypted pseudo-random number sequence.

[0115] Step S5, the password is updated successfully by replacing the old login password with the encrypted pseudo-random number sequence as the new login password of the Linux system.

[0116] In this embodiment, a password updating device is also provided, which is used to implement the above embodiments and preferred implementations, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0117] This embodiment provides a password updating device, such as Figure 5 As shown, it includes: a first acquisition module 501, used to obtain a login verification request for a first page; wherein the login verification request stores first verification data; a second acquisition module 502, used to obtain a password update request for a second page if the first verification data and the pre-stored login data do not match; a generation module 503, used to generate a target password according to the password update request; an update module 504, used to update the password to be updated according to the target password.

[0118] In one possible implementation, the first acquisition module 501 includes: a first acquisition unit, used to obtain an identity authentication request for a first page; wherein the identity authentication request stores second verification data; a verification generation unit, used to generate a verification code corresponding to the second verification data if the second verification data matches pre-stored identity information data, and detect whether the second verification data is successfully verified based on the verification code; a second acquisition unit, used to obtain a login verification request for the first page if the second verification data is successfully verified.

[0119] In one possible implementation, the second acquisition module 502 includes: a third acquisition unit, used to obtain the target verification time and current time of the first verification data if the first verification data and the pre-stored login data do not match; wherein the target verification time is the time of the last verification of the first verification data; a fourth acquisition unit, used to obtain the historical verification times of the first verification data if the difference between the target verification time and the current time of the first verification data is less than a first preset threshold; wherein the historical verification times are the verification times before the current difference is less than the first preset threshold; a fifth acquisition unit, used to obtain a password update request for the second page if the sum of the historical verification times and the current verification times is not less than a second preset threshold.

[0120] In a possible implementation, the above-mentioned device also includes: a clearing module, which is used to clear the historical stored verification time and historical verification times if the difference between the target verification time and the current time of the first verification data is not less than a first preset threshold, and use the target verification time as the first verification time.

[0121] In one possible implementation, the verification generation unit includes: a first detection subunit, which is used to detect whether the last identity authentication request for the first page exists if the second verification data matches the pre-stored identity information data; a first generation subunit, which is used to generate a verification code corresponding to the second verification data if the last identity authentication request for the first page does not exist; a second detection subunit, which is used to detect whether the difference between the time of the last identity authentication request for the first page and the current time is greater than a third preset threshold if the last identity authentication request for the first page exists; and a second generation subunit, which is used to generate a verification code corresponding to the second verification data if the difference between the time of the last identity authentication request for the first page and the current time is greater than the third preset threshold.

[0122] In one possible implementation, the generation module 503 includes: a sixth acquisition unit, used to obtain a preset seed file and a preset password table according to a password update request; wherein the preset seed file is configured with data to be converted, and the preset password table includes a preset character string; a conversion unit, used to perform binary conversion on the data to be converted to obtain target data; and a generation unit, used to generate a target password according to the target data and the preset character string.

[0123] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0124] The password updating device in this embodiment is presented in the form of a functional unit, where the functional unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0125] The embodiment of the present invention also provides a computer device having the above Figure 5 The password updating device shown.

[0126] See also Figure 6 , Figure 6 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 6 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.

[0127] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0128] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0129] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

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

[0131] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0132] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0133] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

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

Claims

1. A password updating method, characterized in that: The method comprises: Obtaining a login verification request for a first page; wherein the login verification request stores first verification data; If the first verification data does not match the pre-stored login data, obtaining a password update request for the second page; Generate a target password according to the password update request; The password to be updated is updated according to the target password.

2. The password updating method according to claim 1, characterized in that: The obtaining of the login verification request for the first page includes: Obtaining an identity authentication request for the first page; wherein the identity authentication request stores second verification data; If the second verification data matches the pre-stored identity information data, generating a verification code corresponding to the second verification data, and detecting whether the second verification data is successfully verified according to the verification code; If the second verification data is successfully verified, a login verification request for the first page is obtained.

3. The password updating method according to claim 1, characterized in that: If the first verification data does not match the pre-stored login data, obtaining a password update request for the second page includes: If the first verification data does not match the pre-stored login data, obtaining the target verification time and current time of the first verification data; wherein the target verification time is the time of the last verification of the first verification data; If the difference between the target verification time and the current time of the first verification data is less than a first preset threshold, obtaining the number of historical verifications of the first verification data; wherein the number of historical verifications is the number of verifications before the current difference is less than the first preset threshold; If the sum of the historical verification times and the current verification times is not less than a second preset threshold, a password update request for the second page is obtained.

4. The password updating method according to claim 3, characterized in that: The method further comprises: If the difference between the target verification time and the current time of the first verification data is not less than a first preset threshold, the historically stored verification time and the number of historical verifications are cleared, and the target verification time is used as the first verification time.

5. The password updating method according to claim 2, characterized in that: If the second verification data matches the pre-stored identity information data, generating a verification code corresponding to the second verification data includes: If the second verification data matches the pre-stored identity information data, detecting whether the last identity authentication request for the first page exists; If the identity authentication request for the first page obtained last time does not exist, generating a verification code corresponding to the second verification data; If the identity authentication request for the first page is obtained last time, detect whether the difference between the time of the last identity authentication request for the first page and the current time is greater than a third preset threshold; If the difference between the time of last obtaining the identity authentication request for the first page and the current time is greater than a third preset threshold, a verification code corresponding to the second verification data is generated.

6. The password updating method according to claim 1, characterized in that: The step of generating a target password according to the password update request includes: According to the password update request, a preset seed file and a preset password table are obtained; wherein the preset seed file is configured with data to be converted, and the preset password table includes a preset character string; Performing binary conversion on the data to be converted to obtain target data; A target password is generated according to the target data and the preset character string.

7. A password updating device, characterized in that: The device comprises: A first acquisition module, configured to acquire a login verification request for a first page; wherein the login verification request stores first verification data; A second acquisition module, configured to acquire a password update request for a second page if the first verification data does not match the pre-stored login data; A generating module, used for generating a target password according to the password update request; An updating module is used to update the password to be updated according to the target password.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the password updating method according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the password updating method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to cause a computer to execute the password updating method according to any one of claims 1 to 6.