Method and related device for realizing multi-user login password verification
By achieving a multi -user login password verification method on the installation of the device with a dragon core processor, match the user name and password entered by the user, and configure the operating permission of the user type configuration, solve the higher -level needs of the equipment in terms of information security, improve Information security.
Patent Information
- Application Number
- CN202411409706.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-01-24
AI Technical Summary
The prior art is difficult to meet the higher-level needs of devices equipped with Loongson processors in terms of information security, especially in the verification of multi-user login passwords.
Provide a method to determine whether the target user name and target user password input in the login interface match, and determine the operating permissions according to the user type. If matching, configure the corresponding operation permissions; if not match, lock the login interface and perform alarm operation.
The password verification of multi -user login is implemented, and different operating permissions are configured according to the user type configuration to improve information security; lock the login interface without matching, restrict user login, and further improve information security.
Smart Images

Figure CN119357934A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of password security technology, and in particular to a method and related device for implementing multi-user login password verification. Background Art
[0002] The Loongson processor is a high-performance general-purpose processor series independently developed by China. Its architecture is a MIPS-compatible RISC architecture, with the characteristics of high performance and low power consumption. It is widely used in government enterprises, information security, science and technology finance, energy and environment and other scenarios, and plays a vital role in national security and economic development.
[0003] PMON (Processor Monitor) is a monitoring program based on the MIPS architecture that combines the functions of BIOS (Basic Input Output System) and Bootloader (boot loader). It is one of the important startup firmware of the Loongson processor. PMON plays a key role in initializing the system, loading the operating system, and providing a system monitoring environment in devices equipped with Loongson processors.
[0004] With the continuous advancement and development of technology, users from all walks of life have increasingly higher requirements for information security. How to operate devices equipped with Loongson processors to meet users' higher-level security needs has become one of the most pressing technical issues in the field of cryptographic security technology. Summary of the invention
[0005] Based on the above problems, the present application provides a method for implementing multi-user login password verification, which is applied to a device equipped with a Loongson processor and can meet the higher-level information security requirements of users using the device.
[0006] The embodiments of the present application disclose the following technical solutions:
[0007] The first aspect of the present application provides a method for implementing multi-user login password verification, the method being applied to a device equipped with a Loongson processor, the method comprising:
[0008] Determine whether the target user name and target user password entered by the user on the login interface match;
[0009] If it is determined that the target user name and the target user password match, determining the user's operation authority for the device according to the user type of the user;
[0010] If it is determined that the target user name and the target user password do not match, the login interface is locked and an alarm operation is performed.
[0011] In an optional implementation manner, determining the operation authority of the user for the device according to the user type of the user includes:
[0012] Reading a structure array and obtaining the user type of the user stored in the structure array; the structure array is an array for storing a user name, a user password and a user type;
[0013] Determine the user's permission to operate the device according to the user type.
[0014] In an optional implementation, determining, according to the user type, the operation authority of the user for the device includes:
[0015] If the user type is the first type, a first permission is assigned to the user; the first permission indicates permission to obtain a target command array and perform initialization operations on a target device controller group;
[0016] If the user type is the second type, a second permission is assigned to the user; the second permission indicates permission to obtain other command arrays in the target command array except for modifying the user name, user password and device properties, and to perform initialization operations on other controllers in the target device controller group except for the controller that manages the external interactive function interface.
[0017] In an optional implementation, before determining whether the target user name and the target user password entered by the user on the login interface match, the method further includes:
[0018] A structure array is constructed through interactive commands, and the structure array is stored in the FLASH of the Loongson processor.
[0019] In an optional implementation, if it is determined that the target user name and the target user password do not match, locking the login interface and performing an alarm operation includes:
[0020] Counting the number of times the target user name and the target user password do not match continuously;
[0021] If the number of consecutive mismatches is less than N, the user is allowed to re-enter the target user name and target user password on the login interface; N is an integer greater than 2;
[0022] If the number of consecutive mismatches is greater than or equal to N, the login interface of the device is locked and an alarm operation is performed.
[0023] In an optional implementation, after determining that the target user name and the target user password match, the method further includes:
[0024] The target user name of the user and the login time of logging into the device are recorded.
[0025] In an optional implementation, the method further includes:
[0026] Create a structure, and store the structure in the FLASH of the Loongson processor;
[0027] The target user name of the user and the login time are recorded in the structure.
[0028] The second aspect of the present application provides a device for implementing multi-user login password verification, the device is applied to a device equipped with a Loongson processor, and the device includes:
[0029] A matching judgment module is used to judge whether the target user name and target user password entered by the user on the login interface match;
[0030] A first determination module, configured to determine the user's operation authority for the device according to the user type of the user if it is determined that the target user name and the target user password match;
[0031] The second determination module is used to lock the login interface and perform an alarm operation if it is determined that the target user name and the target user password do not match.
[0032] A third aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method introduced in any implementation manner of the first aspect.
[0033] A fourth aspect of the present application provides an electronic device, including:
[0034] a memory having a computer program stored thereon;
[0035] A processor is used to execute the computer program in the memory to implement the steps of the method introduced in any implementation manner of the first aspect.
[0036] Compared with the prior art, this application has the following beneficial effects:
[0037] The present application discloses a method for implementing multi-user login password verification, which is applied to a device equipped with a Loongson processor, and the method includes: judging whether the target user name and the target user password entered by the user in the login interface match; if it is determined that the target user name and the target user password match, determining the user's operating authority for the device according to the user type of the user; if it is determined that the target user name and the target user password do not match, locking the login interface and performing an alarm operation. In this way, when the target user name and the target user password match, different device operating authorities are configured for different types of users according to the user type, which can limit the operating authority of a certain type of user and improve information security; when the target user name and the target user password do not match, the login interface can be locked to limit the user from logging into the device, and an alarm operation can be performed to improve information security. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0039] Figure 1 A flowchart of a method for implementing multi-user login password verification provided in an embodiment of the present application;
[0040] Figure 2 A flowchart of another method for implementing multi-user login password verification provided in an embodiment of the present application;
[0041] Figure 3 A schematic diagram of the structure of a device for implementing multi-user login password verification provided in an embodiment of the present application. DETAILED DESCRIPTION
[0042] The Loongson processor is a high-performance general-purpose processor series independently developed by China. Its architecture is a MIPS-compatible RISC architecture, with the characteristics of high performance and low power consumption. It is widely used in government enterprises, information security, science and technology finance, energy and environment and other scenarios, and plays a vital role in national security and economic development.
[0043] PMON (Processor Monitor) is a monitoring program based on the MIPS architecture that combines the functions of BIOS (Basic Input Output System) and Bootloader (boot loader). It is one of the important startup firmware of the Loongson processor. PMON plays a key role in initializing the system, loading the operating system, and providing a system monitoring environment in devices equipped with Loongson processors.
[0044] As people's awareness of confidentiality increases, some party and government offices and even military units have extremely stringent confidentiality requirements for equipment. The security protection capabilities of the username and password functions under the operating system are limited. At this time, the firmware password plays a vital role in the confidentiality performance of the device. However, PMON currently does not support the firmware password function.
[0045] How to operate devices equipped with Loongson processors so that they can meet users' higher-level security needs has become one of the most pressing technical issues in the field of cryptographic security technology.
[0046] Based on the above problems, the present application discloses a method for implementing multi-user login password verification, which is applied to a device equipped with a Loongson processor, and the method includes: judging whether the target user name and target user password entered by the user in the login interface match; if it is determined that the target user name and target user password match, then determining the user's operating authority for the device according to the user type; if it is determined that the target user name and target user password do not match, then locking the login interface and performing an alarm operation. In this way, when the target user name and target user password match, different device operating authorities are configured for different types of users according to the user type, which can limit the operating authority of a certain type of user and improve information security; when the target user name and target user password do not match, the login interface can be locked to limit the user's login to the device, and an alarm operation can be performed to improve information security.
[0047] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0048] For ease of understanding, taking user A logging into device B equipped with a Loongson processor as an example, the multi-user login password verification method disclosed in this application is described in detail.
[0049] Figure 1 A flowchart of a method for implementing multi-user login password verification provided by an embodiment of the present application. The method for implementing multi-user login password verification in the present application is applied to a device equipped with a Loongson processor. Figure 1 As shown, the method for implementing multi-user login password verification disclosed in this application includes:
[0050] S101, determining whether the target user name and target user password entered by the user on the login interface match.
[0051] When user A logs in to device B, after the PMON in the Loongson processor of device B is started, a message asking user A to enter the user name and password will be printed on the screen and serial port of device B, that is, device B will display a login interface that user A can operate; user A can enter the target user name and target user password on the login interface.
[0052] Device B will traverse the structure array to determine whether the target user name and target user password entered by user A match; that is, device B will determine whether the target user name entered by user A exists, and whether the target user name and target user password are the matching user name and user password stored in device B. If it is determined that the target user name and target user password match, then enter S102; if it is determined that the target user name and target user password do not match, then enter S103.
[0053] Among them, the structure array is an array for storing the set user name, user password and user type. Those skilled in the art can construct the structure array through interactive commands and store the structure array in the FLASH of the Loongson processor. When the PMON in the Loongson processor in device B is started, the structure is initialized and the structure data is read out from the FLASH. Since constructing the structure array is a well-known content to those skilled in the art, no further elaboration is made on this content in this application.
[0054] S102: If it is determined that the target user name and the target user password match, determining the user's operation authority for the device according to the user type of the user.
[0055] If device B determines that the target user name and the target user password match, it determines the operation authority of user A on device B according to the user type of the user.
[0056] Specifically, the structure array is read, and the user type stored in the structure array is obtained; and then the user's operation authority for the device is determined according to the user type.
[0057] The user types in this application include the first type and the second type. The first type of user has greater operating authority over the device than the second type of user. The first type of user is the root user; the second type of user is an ordinary user.
[0058] If it is determined from the structure array that the user type of the user is the first type, the user is assigned a first permission, wherein the first permission indicates permission to obtain a target command array and to perform initialization operations on a target device controller group.
[0059] If the user type of the user is determined to be the second type from the structure array, the second permission is assigned to the user, wherein the second permission indicates permission to obtain other command arrays in the target command array except for modifying the user name, user password and device attributes, and to perform initialization operations on other controllers in the target device controller group except for the controller managing the external interaction function interface.
[0060] For ease of understanding, taking user A logging into device B equipped with a Loongson processor as an example, the step of "determining the user's operating authority over the device based on the user type" is explained in detail.
[0061] If the user type of user A set in the structure array is the first type, that is, user A is the root user, the first permission is assigned to user A, and the initialization permission of all device controllers of device B (that is, the target device in this application) is opened to user A, allowing user A to obtain all command arrays of device B (that is, the target command array).
[0062] If the user type of user A set in the structure array is the second type, that is, user A is an ordinary user, the second permission is assigned to user A, and the operation permission of device B to skip the interface of the interaction function with the outside world for initialization is opened to user A, allowing user A to obtain other command arrays in the command array that do not include modifying the user name, user password and device properties.
[0063] In an optional implementation, after determining that the target user name and the target user password match, the user name of the user can be obtained, and the login time of the user logging into the device can be obtained, and the above-obtained information can be recorded in a structure.
[0064] For example, when device B determines that the target user name and target user password of user A match, it can obtain the target user name entered by user A on the login interface and the time when user A logged into the system of device B, and record the obtained target user name and login time in the structure.
[0065] Among them, the structure is an array for recording the username and login time of each user. In this application, the structure is stored in the specified location of the FLASH of the Loongson processor, and it will not be lost even if the power is off.
[0066] In an optional implementation, a structure can be read by creating a command. The root user can read the structure stored in the FLASH of the Loongson processor through the command, and obtain the information recorded in the structure through software parsing.
[0067] S103: If it is determined that the target user name and the target user password do not match, the login interface is locked and an alarm operation is performed.
[0068] If the target user name and target user password do not match, the number of consecutive mismatches between the target user name and target user password is counted; if the number is less than N, user A is allowed to re-enter the target user name and target user password on the login interface of device B; if the number is greater than or equal to N, the login interface of device B is locked, and a while infinite loop is entered to continuously alarm. Among them, N is an integer greater than 2.
[0069] In summary, the present application discloses a method for implementing multi-user login password verification, which is applied to a device equipped with a Loongson processor, and the method includes: determining whether the target user name and target user password entered by the user in the login interface match; if it is determined that the target user name and target user password match, determining the user's operating authority for the device according to the user type; if it is determined that the target user name and target user password do not match, locking the login interface and performing an alarm operation. In this way, when the target user name and target user password match, different device operating authorities are configured for different types of users according to the user type, which can limit the operating authority of a certain type of user and improve information security; when the target user name and target user password do not match, the login interface can be locked to limit the user's login to the device, and an alarm operation can be performed to improve information security.
[0070] Figure 2 A flowchart of another method for implementing multi-user login password verification provided by an embodiment of the present application. Figure 2 As shown, the method for implementing multi-user login password verification includes the following steps:
[0071] S201, when user A logs in to device B, device B performs various initialization operations such as CPU initialization, memory initialization, bridge chip initialization, PCI (Peripheral Component Interconnect) device detection, and displays the login interface of device B to user A.
[0072] S202, input the target user name and target user password.
[0073] User A enters the target user name and target user password on the login interface of device B.
[0074] S203, determining whether the target user name and the target user password match.
[0075] The details of this step refer to the description in S101 and will not be repeated here.
[0076] If the target user name and the target user password match, proceed to S204; otherwise, proceed to S208.
[0077] S204, record the target user name and login date.
[0078] S205: Determine the user type of the user.
[0079] The details of this step refer to the description in S102 and will not be repeated here.
[0080] If it is determined that user A is a common user, proceed to S205; otherwise, proceed to S208.
[0081] S206: ordinary user, allocated second operation authority.
[0082] If user A is a common user, the second operation permission is assigned to user A. The second operation permission indicates that user A is allowed to initialize the USB, network port and all devices of device B, obtain the target command array and initialize the target device controller group.
[0083] S207: Assign the first operation permission to the root user.
[0084] If user A is a root user, a first operation permission is assigned to user A. The first operation permission indicates that user A is allowed to operate other devices of device B except USB and network port, and obtain other command arrays in the target command array except modifying user name, user password and device attributes.
[0085] S208, counting the number of times the target user name and the target user password do not match continuously.
[0086] S209, whether it is greater than N times.
[0087] If the number of consecutive mismatches is less than N times, proceed to S202; otherwise, proceed to S210.
[0088] S210, lock the login interface and continue to alarm.
[0089] The method for implementing multi-user login password verification disclosed in the present application can be applied to devices equipped with Loongson processors. From the introduction of the above embodiments, it can be seen that the method for implementing multi-user password login verification disclosed in the present application can meet the needs of users on the Loongson platform to improve the confidentiality performance of devices, can improve the security of devices, can prevent users without passwords from starting from any built-in or external storage device other than the disk selected by the real user, can reduce the usage rights of ordinary users, prevent the possibility of using startup key combinations, and effectively protect the data security of the device.
[0090] Based on the method for implementing multi-user login password verification disclosed in the above embodiment, the present application also discloses a device for implementing multi-user login password verification, which is applied to a device equipped with a Loongson processor. Figure 3As shown, the device 300 for implementing multi-user login password verification disclosed in the present application includes:
[0091] The matching judgment module 301 is used to judge whether the target user name and target user password entered by the user on the login interface match;
[0092] A first determination module 302 is used to determine the user's operation authority for the device according to the user type of the user if it is determined that the target user name and the target user password match;
[0093] The second determination module 303 is configured to lock the login interface and perform an alarm operation if it is determined that the target user name and the target user password do not match.
[0094] In an optional implementation, the first determining module 302 includes:
[0095] A structure array acquisition unit, used for reading a structure array and acquiring a user type of the user stored in the structure array; the structure array is an array for storing a user name, a user password and a user type;
[0096] An operation authority determination unit is used to determine the operation authority of the user on the device according to the user type.
[0097] In an optional implementation, the operation authority determination unit includes:
[0098] A first permission determination subunit is used to assign a first permission to the user if the user type is the first type; the first permission indicates permission to obtain a target command array and perform initialization operations on a target device controller group;
[0099] The second permission determination subunit is used to assign the second permission to the user if the type of the user is the second type; the second permission indicates permission to obtain other command arrays in the target command array except for modifying the user name, user password and device attributes, and to perform initialization operations on other controllers in the target device controller group except for the controller that manages the external interactive function interface.
[0100] In an optional implementation, the device 300 for implementing multi-user login password verification further includes:
[0101] The structure array creation module is used to construct a structure array through interactive commands and store the structure array in the FLASH of the Loongson processor.
[0102] In an optional implementation, the second determining module 303 includes:
[0103] A times counting unit, used to count the number of times the target user name and the target user password do not match continuously;
[0104] An information input unit, used for allowing the user to re-enter the target user name and target user password on the login interface if the number of consecutive mismatches is less than N; N is an integer greater than 2;
[0105] An information alarm unit is used to lock the login interface of the device and perform an alarm operation if the number of consecutive mismatches is greater than or equal to N.
[0106] In an optional implementation, the device 300 for implementing multi-user login password verification further includes:
[0107] A structure creation module, used for creating a structure and storing the structure in the FLASH of the Loongson processor;
[0108] The data recording module is used to record the target user name and the login time of the user in the structure.
[0109] Based on the method and device for implementing multi-user login password verification provided in the aforementioned embodiments, accordingly, the present application also provides a computer-readable storage medium on which a computer program is stored, which, when executed by a processor, implements some or all of the steps in the method for implementing multi-user login password verification mentioned above.
[0110] Based on the method and device for implementing multi-user login password verification provided in the above embodiments, the present application also provides an electronic device, including:
[0111] a memory having a computer program stored thereon;
[0112] The processor is used to execute the computer program in the memory to implement some or all steps of the method for implementing multi-user login password verification provided by the above embodiment.
[0113] It should be noted that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described above is merely schematic, in which the unit described as a separate component may or may not be physically separated, and the component prompted as a unit may or may not be a physical unit, that is, it may be located in one place, or it may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.
[0114] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for implementing multi-user login password verification, characterized in that: The method is applied to a device equipped with a Loongson processor, and the method comprises: Determine whether the target user name and target user password entered by the user on the login interface match; If it is determined that the target user name and the target user password match, determining the user's operation authority for the device according to the user type of the user; If it is determined that the target user name and the target user password do not match, the login interface is locked and an alarm operation is performed.
2. The method according to claim 1, characterized in that The determining, according to the user type of the user, the operation authority of the user for the device includes: Reading a structure array and obtaining the user type of the user stored in the structure array; the structure array is an array for storing a user name, a user password and a user type; Determine the user's permission to operate the device according to the user type.
3. The method according to claim 2, characterized in that The determining, according to the user type, the operation authority of the user for the device includes: If the user type is the first type, a first permission is assigned to the user; the first permission indicates permission to obtain a target command array and perform initialization operations on a target device controller group; If the user type is the second type, the second permission is assigned to the user; the second permission indicates permission to obtain other command arrays in the target command array except for modifying the user name, user password and device properties, and to perform initialization operations on other controllers in the target device controller group except for the controller that manages the external interactive function interface.
4. The method according to claim 1, characterized in that: Before determining whether the target user name and the target user password entered by the user on the login interface match, the method further includes: A structure array is constructed through interactive commands, and the structure array is stored in the FLASH of the Loongson processor.
5. The method according to claim 1, characterized in that If it is determined that the target user name and the target user password do not match, locking the login interface and performing an alarm operation includes: Counting the number of times the target user name and the target user password do not match continuously; If the number of consecutive mismatches is less than N, the user is allowed to re-enter the target user name and target user password on the login interface; N is an integer greater than 2; If the number of consecutive mismatches is greater than or equal to N, the login interface of the device is locked and an alarm operation is performed.
6. The method according to claim 1, characterized in that After determining that the target user name and the target user password match, the method further includes: The target user name of the user and the login time of logging into the device are recorded.
7. The method according to claim 6, characterized in that The method further comprises: Create a structure, and store the structure in the FLASH of the Loongson processor; The target user name of the user and the login time are recorded in the structure.
8. A device for implementing multi-user login password verification, characterized in that: The device is applied to a device equipped with a Loongson processor, and the device includes: A matching judgment module is used to judge whether the target user name and target user password entered by the user on the login interface match; A first determination module, configured to determine the user's operation authority for the device according to the user type of the user if it is determined that the target user name and the target user password match; The second determination module is used to lock the login interface and perform an alarm operation if it is determined that the target user name and the target user password do not match.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.
10. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 7.