Password changing method, terminal equipment, server and electronic equipment
By adopting a dual-authorized password change method on the fire alarm control panel and utilizing the authentication of terminal equipment and managers, the problem of low security of administrator account password management is solved and higher security and reliability are achieved.
Patent Information
- Application Number
- CN202310493453.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-28
- Publication Date
- 2024-10-29
AI Technical Summary
The administrator account password management of the existing fire alarm control panel has low security problems. The leakage of the super password makes it unsafe, and the password cannot be reset if the USB key device is lost.
The password change method of dual authorization is adopted. The verification request ciphertext is output through the terminal device user interface, and the administrator authenticates and authorizes it to ensure that the user has the right to change the password and improve security.
Through dual authorization, the security of the password change process is ensured, unauthorized and illegal changes are avoided, and the security of the terminal device is improved.
Smart Images

Figure CN118862047A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of fire protection technology, and in particular to a password changing method, terminal equipment, server, electronic equipment and computer-readable storage medium. Background Art
[0002] Fire protection systems installed in buildings or industrial environments usually include controllers and field devices. The controller can monitor the status of the field devices and respond to the on-site fire conditions or control instructions to control the field devices to perform actions such as fire alarm, fire wall lowering, and fire extinguishing. The controller is also called a fire alarm control panel (FACP).
[0003] Most fire alarm control panels are equipped with a user management system, which includes an administrator account for managing the controller. After the fire alarm system is put into use, users rarely use the administrator account to manage the controller for many years, or may never use it. Therefore, it is easy for users to forget the username and password of the administrator account.
[0004] In the prior art, the following two methods are generally used to solve this problem. One is to preset a super password when the fire alarm control panel leaves the factory, and the user can use the super password to reset the account number and password of the administrator account. Another method is to equip the fire alarm control panel with a corresponding USB key device, and the user inserts the USB key device into the fire alarm control panel. The fire alarm control panel verifies the encryption key in the USB key device, and after the verification is passed, the user is allowed to reset the account number and password of the administrator account.
[0005] However, the super password solution has low security. Once leaked, anyone can reset the account password of the administrator account of the fire alarm control panel. In the USB key device solution, once the USB key device is lost, the administrator account of the fire alarm control panel cannot be reset. Summary of the invention
[0006] The purpose of the present invention is to propose a password changing method, terminal device, server, electronic device and computer-readable medium, which can improve the security when the password of the terminal device is changed, and prevent the operator from illegally changing the password of the terminal device without authorization through a dual authorization method.
[0007] This application mainly includes the following aspects:
[0008] In a first aspect, an embodiment of the present application provides a method for changing a password in a terminal device, the method comprising:
[0009] Obtaining device information and permission information of the terminal device, randomly generating a verification key and recording the verification key;
[0010] Generate a verification request ciphertext based on the device information, the authority information and the verification key, and output the verification request ciphertext via a user interface of the terminal device;
[0011] Receiving a verification code, the verification code is generated by the server according to the verification request ciphertext;
[0012] The verification code is verified based on the verification key, and after the verification is passed, the password is allowed to be changed or reset.
[0013] The password reset scheme of the embodiment of the present application adopts a dual authorization method, which can more safely change the password of the terminal device to improve the security of the terminal device during use. The first authorization: output the verification request ciphertext through the user interface of the terminal device to ensure that the user must be able to access the terminal device on site; the second authorization, the administrator of the terminal device authenticates and authorizes the password change operation to ensure that the user has the right to change the password.
[0014] Furthermore, the verification code is generated by the server according to the verification request ciphertext after receiving an authorization pass message; the authorization pass message is fed back by the administrator of the terminal device; the administrator is determined by the server based on the device information and the authority information.
[0015] Furthermore, the verification request ciphertext is in the following forms: a character string, a barcode, a QR code, a spectral image, an optical signal, an acoustic signal or a short-range wireless communication signal.
[0016] Furthermore, the password updating method further includes: after the verification is passed, deleting the recorded verification key.
[0017] Furthermore, the password changing method further includes:
[0018] Obtaining a request time, wherein the request time corresponds to a generation time of the verification key;
[0019] The verification request ciphertext is generated based on the device information, the authority information, the verification key, and the request time.
[0020] Furthermore, the password changing method further includes:
[0021] Outputting the verification request ciphertext and the verification time together through the user interface of the terminal device;
[0022] The verification time is the request time or the current system time.
[0023] Furthermore, the password changing method further includes:
[0024] Generate a verification request message based on the device information, the authority information and the verification key;
[0025] The verification request information is encrypted using a public key of an asymmetric encryption algorithm to generate the verification request ciphertext.
[0026] In a second aspect, an embodiment of the present application further provides a password changing method, which is applied to a server, and the password changing method includes:
[0027] Receiving a password change request, wherein the password change request includes identity information of the requesting subject and a verification request ciphertext;
[0028] Decrypting the verification request ciphertext to obtain the device information and verification key of the terminal device carried in the verification request ciphertext;
[0029] After receiving an authorization pass message, a verification code is fed back to the requesting entity so that the terminal device verifies whether the password change or reset is allowed based on the verification code, wherein the authorization pass message corresponds to the password change request, and the verification code includes the verification key.
[0030] The password reset scheme of the embodiment of the present application adopts a dual authorization method, which can more safely change the password of the terminal device to improve the security of the terminal device during use. The first authorization: output the verification request ciphertext through the user interface of the terminal device to ensure that the user must be able to access the terminal device on site; the second authorization, the administrator of the terminal device authenticates and authorizes the password change operation to ensure that the user has the right to change the password.
[0031] Furthermore, the verification request ciphertext is provided to the requesting subject via a user interface of the terminal device.
[0032] Furthermore, the server stores a management authority list, and the password changing method further includes:
[0033] Searching the management authority list according to the device information to obtain the management personnel information corresponding to the device information;
[0034] Sending an authorization request to the administrator, wherein the authorization request includes the device information and the identity information of the requesting subject;
[0035] Receive authorization approval information fed back by the manager.
[0036] Furthermore, the verification request ciphertext includes authority information, and the password change method further includes:
[0037] Decrypting the verification request ciphertext to obtain the authority information;
[0038] According to the authority information, obtaining the management personnel information corresponding to the device information;
[0039] Sending an authorization request to the administrator, wherein the authorization request includes the device information and the identity information of the requesting subject;
[0040] Receive authorization approval information fed back by the manager.
[0041] Furthermore, the verification request ciphertext is in the following forms: a character string, a barcode, a QR code, a spectral image, an optical signal, an acoustic signal or a short-range wireless communication signal.
[0042] Furthermore, the verification request ciphertext also includes a request time, which corresponds to the generation time of the verification key; the password change request also includes a verification time; the server verifies the verification time based on the request time to determine whether the password change request is legal.
[0043] Furthermore, the step of verifying the verification time includes:
[0044] The verification time is compared with the request time to see if they are consistent. If they are consistent, it is determined that the password change request is a legitimate request.
[0045] Furthermore, the step of verifying the verification time includes:
[0046] Compare the time interval between the verification time and the request time to see whether it is within a threshold range, and if it is within the threshold range, determine that the password change request is a legal request.
[0047] In a third aspect, an embodiment of the present application further provides a terminal device, the terminal device comprising:
[0048] A first processing module, which is used to obtain device information and permission information of the terminal device, randomly generate a verification key and record the verification key, and generate a verification request ciphertext based on the device information, the permission information and the verification key;
[0049] An output module, used for outputting the verification request ciphertext;
[0050] An input module, used for receiving a verification code, wherein the verification code is generated by the server according to the verification request ciphertext;
[0051] The first processing module is further configured to verify the verification code based on the verification key, and allow the password to be changed or reset after the verification is passed.
[0052] In a fourth aspect, an embodiment of the present application further provides a server, the server comprising:
[0053] A communication module, which is used to receive a password change request, wherein the password change request includes identity information of the request subject and a verification request ciphertext;
[0054] A second processing module, which is used to decrypt the verification request ciphertext to obtain the device information and verification key of the terminal device carried in the verification request ciphertext;
[0055] After receiving an authorization pass message, the communication module is also used to feedback a verification code to the requesting entity so that the terminal device verifies whether the password change or reset is allowed based on the verification code, wherein the authorization pass message corresponds to the password change request, and the verification code contains the verification key.
[0056] In a fifth aspect, an embodiment of the present application further provides an electronic device, comprising a processor and a memory, wherein the memory stores machine-readable instructions that can be executed by the processor, and when the machine-readable instructions are executed by the processor, the password changing method as described above is executed.
[0057] In a fifth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the password changing method as described above is implemented.
[0058] In addition, the beneficial effects of the third to sixth aspects have the corresponding technical effects in the above-mentioned first and second aspects, and will not be repeated again. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] The following drawings are only used to schematically illustrate and explain the present invention, and do not limit the scope of the present invention.
[0060] Figure 1 This is a flow chart of a password changing method in an embodiment of the present application, which is applied to a terminal device.
[0061] Figure 2 This is a flow chart of a password changing method in an embodiment of the present application, which is applied to a server.
[0062] Figure 3 A schematic diagram for illustrating the password changing method of the present application.
[0063] The reference numerals are as follows:
[0064] 10 Operator
[0065] 100 terminal devices
[0066] 110 Input Module
[0067] 120 First processing module
[0068] 130 Output module
[0069] 200 Server
[0070] 210 Communication module
[0071] 220 Second processing module
[0072] 30 Management staff
[0073] 500 Communication equipment DETAILED DESCRIPTION
[0074] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, the specific embodiments of the present invention are now described with reference to the accompanying drawings. In the drawings, the same reference numerals represent components with the same structure or similar structures but the same functions.
[0075] In this document, “exemplary” means “serving as an example, instance or illustration”, and any diagram or implementation described in this document as “exemplary” should not be interpreted as a more preferred or more advantageous technical solution.
[0076] In order to simplify the drawings, only the parts related to the present invention are schematically shown in each figure, and they do not represent the actual structure of the product. In addition, in order to simplify the drawings and facilitate understanding, in some figures, only one of the parts with the same structure or function is schematically drawn or marked.
[0077] In this article, "a" or "an" not only means "only one", but also means "more than one". In this article, "first", "second", etc. are only used to distinguish each other, rather than to indicate their importance and order.
[0078] Figure 1 The following is a flowchart of a password change method in an embodiment of the present application, which is applied to a terminal device. The password change method includes:
[0079] S101: Obtain device information and permission information of the terminal device, randomly generate a verification key and record the verification key.
[0080] In specific applications, the device information may be one or more of the following information: the device ID, physical address, IP address or other information that can uniquely identify the identity of the terminal device. The authority information may also be in different forms. For example, the owner information of the terminal device may be used as the ownership information, or the manager information of the terminal device may be used as the ownership information. The manager of the terminal device may be determined through the authority information. The verification key is the random string, which may be a combination of one or more of numbers, letters, and special characters. Each time step S101 is executed, a new verification key is randomly generated.
[0081] S103: Generate a verification request ciphertext based on the device information, the authority information and the verification key, and output the verification request ciphertext via the user interface of the terminal device.
[0082] In specific applications, different methods can be selected to generate the verification request ciphertext. For example, method one: first combine the device information, permission information and verification key, and then encrypt the combined information to generate a verification request ciphertext; method two: first encrypt one of the three information to obtain a first encryption result, combine the first encryption result with another information and further encrypt it to obtain a second encryption result, and then combine the second encryption result with the last information and further encrypt it to obtain the verification request ciphertext; method three: combine and encrypt two of the information, and then combine and encrypt with another information. Among them, encryption can use an asymmetric encryption algorithm, and the terminal device uses the public key of the asymmetric encryption algorithm for encryption. The server has the corresponding private key and is used to decrypt the verification request ciphertext.
[0083] The above-mentioned combination can be implemented in a variety of ways, for example, directly concatenating or combining specific bits in each information according to preset rules, etc. There are a variety of ways to output the verification request ciphertext via the user interface of the terminal device. For example, when the verification request ciphertext is in the form of a string, a barcode, a QR code, a spectral image, etc., the verification request ciphertext can be output to the user through the display screen of the terminal device. When the verification request ciphertext is in the form of an optical signal, the verification request ciphertext can be output to the user through a light-emitting component such as an indicator light, a flashlight, or a display screen of the terminal device. When the verification request ciphertext is in the form of an acoustic signal, the verification request ciphertext can be output to the user through a sound-emitting component such as a speaker or buzzer of the terminal device. When the verification request ciphertext is in the form of a short-range wireless communication signal, the verification request ciphertext can be output to the user through a short-range wireless communication module such as an NFC coil of the terminal device.
[0084] S105: Receive a verification code, which is generated by the server according to the verification request ciphertext.
[0085] Specifically, after providing the verification request ciphertext to the server, the server parses the verification request ciphertext and generates or obtains a corresponding verification code, which is provided to the user who requests the password change operation and provided by the user to the terminal device.
[0086] S107: Verify the verification code based on the verification key, and after the verification is passed, allow the password to be changed or reset.
[0087] Specifically, the terminal device compares the verification code received in step S105 based on the verification key recorded in step S101. If the verification is successful, it means that the verification request ciphertext parsed by the server is consistent with the verification request ciphertext generated by the terminal device, and the user is allowed to change the password (i.e., modify or reset).
[0088] The password reset scheme of the embodiment of the present application adopts a dual authorization method, which can more safely change the password of the terminal device to improve the security of the terminal device during use. The first authorization: output the verification request ciphertext through the user interface of the terminal device to ensure that the user must be able to access the terminal device on site; the second authorization, the administrator of the terminal device authenticates and authorizes the password change operation to ensure that the user has the right to change the password.
[0089] In order to ensure that the password change operation is authorized by the terminal device administrator, it can be further designed as follows: the verification code is generated by the server based on the verification request ciphertext after receiving an authorization pass message; the authorization pass message is fed back by the administrator of the terminal device; the administrator is determined by the server through the device information and authority information.
[0090] In order to ensure the security of the password change method, after step S107, step S108 can be set: after the verification is passed, the recorded verification key is deleted. By executing step S108, it can be ensured that the verification key automatically expires after the verification, thereby preventing the user from continuing to use the same verification code to change the password of the terminal device again.
[0091] In order to further increase the security of the password change method of the present application, a request time may be obtained in step S101, and a verification request ciphertext may be generated in step S103 based on device information, permission information, verification key and the request time. The request time corresponds to the generation time of the verification key in step S101. "Corresponding" here may mean that the two are the same, or that the time gap between the two is kept within a preset range. In order to ensure the legality of the password change operation, it may also be set in step S103: the verification request ciphertext and a verification time are output together through the user interface of the terminal device, and the verification time may use the same time as the request time or the current system time. The verification time is output together with the verification request ciphertext, and the operating user provides the verification time and the verification request ciphertext to the server together. The server can verify the verification time based on the request time in the verification request ciphertext, thereby determining whether the password change request is legal.
[0092] Figure 2 The following is a flowchart of a password change method in an embodiment of the present application, which is applied to a server. The password change method includes:
[0093] S201: Receive a password change request, where the password change request includes identity information of the requesting subject and a verification request ciphertext.
[0094] Specifically, the verification request ciphertext received by the server in step S201 is the verification request ciphertext generated by the terminal device in step S103. The identity information of the request subject is the identity information of the operating user who initiates the password change. The identity information can be the operating user's mobile phone number, ID card number, email account or other account.
[0095] S203: Decrypt the verification request ciphertext to obtain the device information and verification key of the terminal device carried in the verification request ciphertext.
[0096] Specifically, the verification request ciphertext is provided to the requesting subject via the user interface of the terminal device. The decryption algorithm used by the server in step S203 corresponds to the encryption method used by the terminal device in step S103.
[0097] S205: After receiving an authorization pass message, a verification code is fed back to the requesting entity, so that the terminal device verifies whether the password change or reset is allowed based on the verification code, wherein the authorization pass message corresponds to the password change request, and the verification code includes a verification key.
[0098] Specifically, the authorization information indicates that the administrator agrees to perform the password change operation. The "verification code includes the verification key" mentioned above may be the verification code and the verification key are the same, or the verification code may be the encrypted verification key.
[0099] The password reset scheme of the embodiment of the present application adopts a dual authorization method, which can more safely change the password of the terminal device to improve the security of the terminal device during use. The first authorization: output the verification request ciphertext through the user interface of the terminal device to ensure that the user must be able to access the terminal device on site; the second authorization, the administrator of the terminal device authenticates and authorizes the password change operation to ensure that the user has the right to change the password.
[0100] The following two methods are proposed to enable the administrator of the terminal device to authorize the password change operation. In addition to these two methods, other implementation methods can also be used.
[0101] Method 1:
[0102] A management authority list is stored in the server, and the management authority list records the terminal devices and the management personnel information corresponding to the terminal devices. Figure 2 After step S203 and before step S205 shown in FIG. , the method may further include:
[0103] S2041: Search the management authority list according to the device information obtained in step S203 to obtain the management personnel information corresponding to the device information.
[0104] S2042: Send an authorization request to the administrator, which includes the device information and the identity information of the requesting subject. After receiving the authorization request, the administrator can know who initiated the password change operation on which terminal device, so that the administrator can determine whether to permit the operation.
[0105] S2043: After the administrator allows the authorization, the authorization information fed back by the administrator is received. If the administrator allows the password change operation, an authorization information is returned to the server; if the administrator does not allow the password change operation, the authorization request can be ignored or a rejection information can be returned.
[0106] Method 2:
[0107] In solution 2, the authority information can also be maintained by the terminal device, and the authority information is carried in the authentication request ciphertext. The server obtains the administrator information of the terminal device through the authority information. Figure 2 In step S203 shown in FIG, the server decrypts the verification request ciphertext to obtain the device information, verification key, and authority information of the terminal device carried in the verification request ciphertext; after step S203 and before step S205, the method may further include:
[0108] S2041': Obtaining the management personnel information corresponding to the device information according to the authority information;
[0109] S2042': After the administrator allows authorization, receive authorization approval information fed back by the administrator.
[0110] Through the above method 1 or method 2, the administrator of the terminal device can authorize the password change operation.
[0111] In order to further increase the security of the password change method of the present application, the verification request ciphertext obtained in step S201 can also be set to include a request time, which corresponds to the generation time of the verification key. When the terminal device outputs the verification request ciphertext to the operator, it also outputs a verification time. For example, when the verification request ciphertext is in the form of a QR code, the QR code contains the request time. When the terminal device outputs the QR code image, the verification time can be displayed below the QR code image. The operator can take a picture containing the QR code and the verification time and send it to the server. After receiving the picture, the server obtains the verification time, and obtains the request time after parsing the QR code. The server verifies the verification time based on the request time, that is, it can determine whether the password change request is legal.
[0112] For example, method 1: If the verification time in the terminal device uses the same time as the request time, the server can compare the plain text verification time with the request time in the verification request ciphertext. If they are consistent, it can be determined that the password change request is legal. If the two are inconsistent, it means that the operating user may have tampered with the verification time, and the password change request is likely to be illegal. Method 2: If the verification time in the terminal device uses the current system time, the server can compare the plain text verification time with the request time in the verification request ciphertext. If the time interval between the two is within the threshold range, it can be determined that the password change request is legal. For offline terminal devices, since they are not connected to the Internet, the time information in the device is likely to be different from the world time. The server cannot determine whether the password change request is legal based on the world time. Method 2 compares the request time with the system time of the terminal device to solve this problem.
[0113] like Figure 3As shown, the present application also provides a terminal device 100, which can be the fire alarm control panel mentioned in the background technology of the present application, and includes an input module 110, a first processing module 120 and an output module 130. Among them, the first processing module 120 is used to obtain the device information and authority information of the terminal device 100, randomly generate a verification key and record the verification key, and generate a verification request ciphertext based on the device information, authority information and verification key. The output module 130 is used to output the verification request ciphertext. The input module 110 is used to receive a verification code, which is generated by the server according to the verification request ciphertext. The first processing module 120 is also used to verify the verification code based on the verification key, and after the verification is passed, the password is allowed to be changed or reset.
[0114] Preferably, the verification code received by the input module 110 is generated by the server according to the verification request ciphertext after receiving an authorization pass message; the authorization pass message is fed back by the administrator of the terminal device; the administrator is determined by the server according to the device information and authority information.
[0115] The verification request ciphertext generated by the first processing module 120 can be outputted via the output module 130 in the following forms: a string, a barcode, a QR code, a spectral image, an optical signal, an acoustic signal, or a short-distance wireless communication module. Corresponding to the different forms of the verification request ciphertext output, the output module 130 can use different components (such as a display screen, an indicator light, a flashlight, or other light-emitting components; a speaker or a buzzer, or other sound-emitting components; an NFC coil, or other short-distance wireless communication module).
[0116] Preferably, the first processing module 120 may further include a clearing submodule, and the clearing submodule is used to delete the verification key currently recorded in the terminal device after the verification is passed.
[0117] Preferably, the first processing module 120 may further include a time submodule, which is used to obtain a request time, and the request time corresponds to the generation time of the verification key. The first processing module 120 is used to generate a verification request ciphertext based on the device information, the authority information, the verification key and the request time.
[0118] Preferably, when outputting the verification request ciphertext, the output module 130 will output a verification time together with the verification request ciphertext. The verification time is the same as the request time, or the verification time may also be the current system time.
[0119] Preferably, the first processing module 120 can generate a verification request message based on the device information, the authority information and the verification key, and encrypt the verification request message by a public key of an asymmetric encryption algorithm to generate a verification request ciphertext.
[0120] like Figure 3 As shown, the present application also provides a server 200, which includes a communication module 210 and a second processing module 220. The communication module 210 is used to receive a password change request, which includes the identity information of the requesting subject and the verification request ciphertext. The second processing module 220 is used to decrypt the verification request ciphertext to obtain the device information and verification key of the terminal device carried in the verification request ciphertext. After receiving an authorization pass message, the communication module 210 is also used to feedback a verification code to the requesting subject, so that the terminal device verifies whether the password change or reset is allowed based on the verification code, wherein the authorization pass message corresponds to the password change request, and the verification code includes the verification key.
[0121] Preferably, the server can also search for the administrator information of the terminal device and request authorization from the administrator for the password change operation. Two implementation methods are provided below as examples.
[0122] Method 1: The second processing module 220 of the server also includes an administrator information acquisition submodule. A management authority list is stored in the server, and the management authority list lists the correspondence between terminal devices and managers. The administrator information acquisition submodule is used to search the management authority list according to the device information obtained in the second processing module 220 to obtain the administrator information corresponding to the device information. The communication module 210 is also used to send an authorization request to the manager, and the authorization request includes device information and identity information of the requesting subject. After the manager allows authorization, the communication module 210 is also used to receive authorization approval information fed back by the manager.
[0123] Method 2: The verification request ciphertext sent by the terminal device also includes permission information, and the second processing module 220 of the server also includes an administrator information acquisition submodule. When the second processing module 220 decrypts the verification request ciphertext, it can also obtain the permission information carried in the verification request ciphertext. The administrator information acquisition submodule obtains the administrator information corresponding to the device information based on the permission information. The communication module 210 is also used to send an authorization request to the administrator, and the authorization request includes device information and identity information of the requesting subject. After the administrator allows authorization, the communication module 210 is also used to receive the authorization pass information fed back by the administrator.
[0124] If the verification request ciphertext generated by the terminal device also includes a request time, and if the password change request received by the server also includes a verification time. In this case, preferably, the server can also add a verification function to determine whether the password change request is legal. Specifically, the second processing module 220 of the server may further include a verification submodule, which is used to verify the verification time based on the request time to determine whether the password change request is legal. If the verification time in the terminal device uses the same time as the request time, the verification submodule can compare whether the verification time and the request time are consistent, and if they are consistent, determine that this password change request is a legal request; if the verification time in the terminal device uses the current system time, the verification submodule can compare whether the time interval between the verification time and the request time is within the threshold range, and if it is within the threshold range, determine that the password change request is a legal request.
[0125] The following combination Figure 3 , using an example to illustrate the password changing method of the present application.
[0126] Since the operator 10 has forgotten the account number / password of the administrator account of the terminal device 100 , he / she inputs a password change command to the input module 110 of the terminal device 100 , requesting to reset the account number / password of the administrator account of the terminal device 100 .
[0127] The first processing module 120 of the terminal device 100 obtains the device information (such as controller abc123) and authority information (such as manager 30 of company A) of the terminal device 100, and randomly generates a verification key (such as hjx392uz), and uses the generation time of the verification key as the request time (such as 08:00:00 on April 1, 2023). Based on the above device information, authority information, verification key and request time, a verification request message is generated (such as manager 30 of company A + controller abc123 + 08:00:00 on April 1, 2023 + hjx392uz), and the verification request message is encrypted using the public key of an asymmetric encryption algorithm to obtain a verification request ciphertext.
[0128] The output module 130 outputs the verification request ciphertext to the operating user 10 in the form of a QR code, and outputs the verification time (April 1, 2023 08:00:00) below the QR code. The operating user 10 uses his communication device 500 to take a picture and sends it to the server 200, which includes the above QR code picture and request time.
[0129] The communication module 210 of the server 200 receives a password change request, which includes the above-mentioned picture and the identity information of the operator 10. The second processing module 220 of the server 200 decodes the QR code in the picture to obtain the ciphertext content of the verification request, and then uses the private key of the asymmetric encryption algorithm corresponding to the terminal device 100 to decode the ciphertext of the verification request, thereby obtaining the device information (controller abc123), authority information (A company manager 30), verification key (hjx392uz) and request time (April 1, 2023 08:00:00).
[0130] The second processing module 220 of the server 200 compares the request time with the verification time to see if they are consistent. If they are consistent, the password change request is confirmed to be legitimate and the administrator authorization process begins.
[0131] The second processing module 220 of the server 200 obtains, based on the authority information, that the administrator of the terminal device is the administrator 30 of Company A.
[0132] The communication module 210 of the server 200 sends an authorization request to the manager 30 of Company A, which includes the device information (controller abc123) and the identity information of the requesting subject (i.e., the operator 10). If the manager 30 allows the password change operation, an authorization approval message is fed back through the communication device 500. After receiving the authorization approval message, the communication module 210 of the server 200 feeds back a verification code (hjx392uz) to the operator 10.
[0133] After receiving the verification code, the operator 10 inputs the verification code (hjx392uz) into the input module 110 of the terminal device 100. The first processing module 120 of the terminal device 100 determines whether the verification code is consistent with the currently stored verification key. If they are consistent, password reset is allowed.
[0134] The present invention also provides an electronic device, which includes a processor and a memory, wherein the memory stores machine-readable instructions that can be executed by the processor, and when the machine-readable instructions are executed by the processor, any of the above-mentioned password changing methods is executed.
[0135] The present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, any of the above-mentioned password changing methods is implemented.
[0136] Some aspects of the method and apparatus of the present invention may be performed entirely by hardware, entirely by software (including firmware, resident software, microcode, etc.), or by a combination of hardware and software. The above hardware or software may be referred to as "data blocks", "modules", "engines", "units", "components" or "systems". The processor may be one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DAPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors or combinations thereof. In addition, various aspects of the present invention may be represented as computer products located in one or more computer-readable media, which include computer-readable program codes. For example, computer-readable media may include, but are not limited to, magnetic storage devices (e.g., hard disks, floppy disks, tapes, etc.), optical disks (e.g., compact disks (CDs), digital versatile disks (DVDs), etc.), smart cards, and flash memory devices (e.g., cards, sticks, key drives, etc.). Optionally, program code may also be downloaded from a server computer via a communication network.
[0137] The advantages of the password changing method, terminal device, server, electronic device and computer-readable storage medium proposed in the present invention are basically corresponding to the advantages of the password changing method proposed in the present invention. The features, advantages or alternative embodiments mentioned in this regard can also be transferred to other objects claimed for protection, and vice versa.
[0138] It should be understood that although this specification is described according to various embodiments, not every embodiment contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.
[0139] The series of detailed descriptions listed above are only specific descriptions of feasible embodiments of the present invention, and they are not intended to limit the protection scope of the present invention. Any equivalent implementation scheme or changes that do not deviate from the technical spirit of the present invention, such as the combination, division or repetition of features, should be included in the protection scope of the present invention. The nouns and pronouns about people in this patent application are not limited to specific genders.
Claims
1. A password changing method, applied to a terminal device, characterized in that: The password changing method comprises: Obtaining device information and permission information of the terminal device, randomly generating a verification key and recording the verification key; Generate a verification request ciphertext based on the device information, the authority information and the verification key, and output the verification request ciphertext via a user interface of the terminal device; Receiving a verification code, the verification code is generated by the server according to the verification request ciphertext; The verification code is verified based on the verification key, and after the verification is passed, the password is allowed to be changed or reset.
2. The password changing method according to claim 1, characterized in that: The verification code is generated by the server according to the verification request ciphertext after receiving an authorization pass message; The authorization pass information is fed back by the administrator of the terminal device; The manager is determined by the server based on the device information and the authority information.
3. The password changing method according to claim 1, characterized in that: The verification request ciphertext is in the following forms: a character string, a barcode, a QR code, a spectral image, an optical signal, an acoustic signal or a short-distance wireless communication signal.
4. The password changing method according to claim 1, characterized in that: The password changing method further includes: after the verification is passed, deleting the recorded verification key.
5. The password changing method according to claim 1, characterized in that: The password changing method further includes: Obtaining a request time, wherein the request time corresponds to a generation time of the verification key; The verification request ciphertext is generated based on the device information, the authority information, the verification key, and the request time.
6. The password changing method according to claim 5, characterized in that: The password changing method further includes: Outputting the verification request ciphertext and the verification time together through the user interface of the terminal device; The verification time is the request time or the current system time.
7. The password changing method according to claim 1, characterized in that: The password changing method further includes: Generate a verification request message based on the device information, the authority information and the verification key; The verification request information is encrypted using a public key of an asymmetric encryption algorithm to generate the verification request ciphertext.
8. A password changing method, applied to a server, characterized in that: The password changing method comprises: Receiving a password change request, wherein the password change request includes identity information of the requesting subject and a verification request ciphertext; Decrypting the verification request ciphertext to obtain the device information and verification key of the terminal device carried in the verification request ciphertext; After receiving an authorization pass message, a verification code is fed back to the requesting entity so that the terminal device verifies whether the password change or reset is allowed based on the verification code, wherein the authorization pass message corresponds to the password change request, and the verification code includes the verification key.
9. The password changing method according to claim 8, characterized in that: The authentication request ciphertext is provided to the requesting subject via the user interface of the terminal device.
10. The password changing method according to claim 8, characterized in that: The server stores a management authority list, and the password changing method further includes: Searching the management authority list according to the device information to obtain the management personnel information corresponding to the device information; Sending an authorization request to the administrator, wherein the authorization request includes the device information and the identity information of the requesting subject; Receive authorization approval information fed back by the manager.
11. The password changing method according to claim 8, characterized in that: The verification request ciphertext includes authority information, and the password change method further includes: Decrypting the verification request ciphertext to obtain the authority information; According to the authority information, obtaining the management personnel information corresponding to the device information; Sending an authorization request to the administrator, wherein the authorization request includes the device information and the identity information of the requesting subject; Receive authorization approval information fed back by the manager.
12. The password changing method according to claim 8, characterized in that: The verification request ciphertext is in the following forms: a character string, a barcode, a QR code, a spectral image, an optical signal, an acoustic signal or a short-distance wireless communication signal.
13. The password changing method according to claim 8, characterized in that: The verification request ciphertext also includes a request time, and the request time corresponds to the generation time of the verification key; The password change request also includes a verification time; The server verifies the verification time based on the request time to determine whether the password change request is legal.
14. The password changing method according to claim 13, characterized in that: The step of verifying the verification time includes: The verification time is compared with the request time to see if they are consistent. If they are consistent, it is determined that the password change request is a legitimate request.
15. The password changing method according to claim 13, characterized in that: The step of verifying the verification time includes: Compare the time interval between the verification time and the request time to see whether it is within a threshold range, and if it is within the threshold range, determine that the password change request is a legal request.
16. A terminal device, characterized in that: include: A first processing module (120) is used to obtain device information and permission information of the terminal device, randomly generate a verification key and record the verification key, and generate a verification request ciphertext based on the device information, the permission information and the verification key; An output module (130), configured to output the verification request ciphertext; An input module (110) is used to receive a verification code, wherein the verification code is generated by the server according to the verification request ciphertext; The first processing module (120) is further configured to verify the verification code based on the verification key, and allow the password to be changed or reset after the verification is passed.
17. A server, characterized in that: include: A communication module (210) is used to receive a password change request, wherein the password change request includes identity information of a request subject and a verification request ciphertext; A second processing module (220) is used to decrypt the verification request ciphertext to obtain the device information and verification key of the terminal device carried in the verification request ciphertext; After receiving an authorization pass message, the communication module (210) is also used to feed back a verification code to the request subject, so that the terminal device verifies whether the password change or reset is allowed based on the verification code, wherein the authorization pass message corresponds to the password change request, and the verification code contains the verification key.
18. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the machine-readable instructions execute the password changing method according to any one of claims 1 to 15 when executed by the processor.
19. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the password changing method according to any one of claims 1 to 15 is implemented.
