Disclosure of Invention
The embodiment of the invention provides a method and a device for switching multi-user accounts, computer equipment and a storage medium, which are used for improving the efficiency of switching the multi-user accounts.
In order to solve the foregoing technical problem, an embodiment of the present application provides a method for switching a multi-user account, including:
monitoring the identity authentication request in real time;
if an identity authentication request is received, acquiring identity authentication information contained in the identity authentication request as first identity information;
and performing identity authentication on the first identity information to obtain an authentication result.
And when the verification result is that the verification is passed, switching the application scene to the application scene corresponding to the first identity information.
Optionally, the identity authentication information includes at least one biometric feature of fingerprint information, voiceprint information, face information, and pupillary membrane information.
Optionally, before monitoring the identity authentication request in real time, the method for switching the multi-user account further includes:
inputting identity authentication information to be associated in a current application scene;
after the input is successful, the identity authentication information to be associated is used as verification information;
generating an identity corresponding to the verification information, and taking the identity as account information;
and taking the current application scene as an application scene corresponding to the account information, establishing an incidence relation among the verification information, the account information and the application scene corresponding to the account information, and storing the incidence relation.
Optionally, the performing identity verification on the first identity information to obtain a verification result includes:
respectively calculating similarity values of the first identity information and each piece of stored check information;
if the similarity value larger than the preset threshold value exists, acquiring verification information corresponding to the similarity value as target information, confirming that the verification result is verification passing, and taking an application scene corresponding to the target information as an application scene corresponding to the first identity information;
and if the similarity value larger than the preset threshold value does not exist, confirming that the verification fails.
Optionally, the switching the application scenario to the application scenario corresponding to the first identity information when the verification result is that the verification passes includes:
determining account information corresponding to the first identity information and an application scene corresponding to the account information according to the stored association relation;
and taking the account information as a parameter, and switching the current application scene into the application scene corresponding to the account information by adopting a preset jump function.
In order to solve the foregoing technical problem, an embodiment of the present application further provides a device for switching a multi-user account, including:
the request monitoring module is used for monitoring the identity authentication request in real time;
the information acquisition module is used for acquiring the identity authentication information contained in the identity authentication request as first identity information if the identity authentication request is received;
and the information verification module is used for performing identity verification on the first identity information to obtain a verification result.
And the scene switching module is used for switching the application scene to the application scene corresponding to the first identity information when the verification result is that the verification is passed.
Optionally, the apparatus for switching between multiple user accounts further includes:
the information input module is used for inputting the identity authentication information to be associated under the current application scene;
the information verification module is used for taking the identity authentication information to be associated as verification information after the entry is successful;
the account generation module is used for generating an identity corresponding to the verification information and taking the identity as account information;
and the association storage module is used for taking the current application scene as an application scene corresponding to the account information, establishing an association relation among the verification information, the account information and the application scene corresponding to the account information, and storing the association relation.
Optionally, the information verification module includes:
the similarity calculation unit is used for calculating similarity values of the first identity information and each piece of stored check information respectively;
a first judging unit, configured to, if a similarity value greater than a preset threshold exists, acquire, as target information, verification information corresponding to the similarity value, determine that a verification result is a verification pass, and use an application scene corresponding to the target information as an application scene corresponding to the first identity information;
and the second judgment unit is used for confirming that the verification fails if the similarity value larger than the preset threshold does not exist.
Optionally, the scene switching module includes:
the scene determining unit is used for determining account information corresponding to the first identity information and an application scene corresponding to the account information according to the stored association relation;
and the scene switching unit is used for switching the current application scene into the application scene corresponding to the account information by using a preset jump function with the account information as a parameter.
In order to solve the technical problem, an embodiment of the present application further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method for switching between multiple user accounts when executing the computer program.
In order to solve the above technical problem, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored, and the computer program, when executed by a processor, implements the steps of the above switching method for multi-user accounts.
The method, the device, the computer equipment and the storage medium for switching the multi-user account provided by the embodiment of the invention monitor the identity authentication request in real time, acquire the identity authentication information contained in the identity authentication request as the first identity information if the identity authentication request is received, authenticate the first identity information to obtain the authentication result, and switch the application scene to the application scene corresponding to the first identity information when the authentication result is that the authentication is passed.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, as shown in fig. 1, asystem architecture 100 may includeterminal devices 101, 102, 103, anetwork 104 and aserver 105. Thenetwork 104 serves as a medium for providing communication links between theterminal devices 101, 102, 103 and theserver 105.Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use theterminal devices 101, 102, 103 to interact with theserver 105 via thenetwork 104 to receive or send messages or the like.
Theterminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture experts group audio Layer III, motion Picture experts compression standard audio Layer 3), MP4 players (Moving Picture experts group audio Layer IV, motion Picture experts compression standard audio Layer 4), laptop portable computers, desktop computers, and the like.
Theserver 105 may be a server providing various services, such as a background server providing support for pages displayed on theterminal devices 101, 102, 103.
The switching method of the multi-user account provided by the embodiment of the present application is executed by the server, and accordingly, the switching device of the multi-user account is disposed in the server.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. Any number of terminal devices, networks and servers may be provided according to implementation needs, and theterminal devices 101, 102 and 103 in this embodiment may specifically correspond to an application system in actual production.
Referring to fig. 2, fig. 2 shows a method for switching a multi-user account according to an embodiment of the present invention, which is described by taking the method applied to the server in fig. 1 as an example, and is detailed as follows:
s201: and monitoring the identity authentication request in real time.
Specifically, the information of the mobile terminal related to identity authentication is monitored through a background monitoring process.
Taking the information of identity authentication as fingerprint information as an example, the fingerprint keeps a monitoring state all the time, namely, after fingerprint identification, the authentication of the fingerprint is pulled up again except user scenes of inputting the fingerprint, verifying the fingerprint, fingerprint payment, fingerprint login and the like, and the fingerprint keeps activated and in an authentication state all the time, so that a fingerprint device can always identify the touch condition of the finger. Similarly, the detection state may be maintained, but not limited to, the fingerprint information, the current fingerprint identifier may be maintained in the monitoring state, and after the fingerprint state information is detected, subsequent determination processing may be performed according to the state identification result of the current information.
S202: and if the identity authentication request is received, acquiring identity authentication information contained in the identity authentication request as first identity information.
Specifically, when a user interacts with a device of the mobile terminal, an identity authentication request is generated, and when the identity authentication request is monitored, identity authentication information included in the identity authentication request is acquired as first identity information.
The identity authentication is also called as "identity verification" or "identity authentication", and refers to a process of confirming the identity of an operator in a computer and a computer network system, so as to determine whether the user has access and use authority to a certain resource, thereby enabling the access policy of the computer and the network system to be reliably and effectively executed, preventing an attacker from impersonating a legitimate user to obtain the access authority of the resource, ensuring the security of the system and data, and authorizing the legitimate interest of the accessor.
Further, the identity authentication information includes at least one biometric feature of fingerprint information, voiceprint information, face information, and pupillary membrane information.
As will be readily appreciated, the present embodiment applies biometrics to the switching operation of the user, thereby improving the convenience of the user switching operation. And the biological characteristics are high in safety and not easy to crack, and safety guarantee is provided for comparing personal information data of different users.
The above process is explained with the identity authentication information as the fingerprint information, which specifically includes the following steps: the user needs to switch the current account, provides fingerprint information by interacting with a fingerprint identification area of the mobile terminal, generates identity authentication information containing the fingerprint information after the fingerprint information is detected by the fingerprint identification area, and then analyzes and processes the identity authentication information through the server.
The fingerprint identification area is a fingerprint sensing area in which a fingerprint area and/or a fingerprint non-touch screen area can be recorded in the touch screen, and if the fact that a user has fingerprint input in the trigger area is detected, whether the operation is directed at scene switching or specific application is further judged.
S203: and performing identity authentication on the first identity information to obtain an authentication result.
Specifically, according to the type of the first identity information, a corresponding verification mode is adopted, and the first identity information is compared with pre-stored verification information to verify, so that a verification result is obtained.
Taking the first identity information as the fingerprint information as an example, the server side stores the fingerprint information of each legal user in advance, and after the first identity information is obtained, the first identity information is compared with the fingerprint information of each legal user stored in advance through a fingerprint identification method, so that an authentication result is obtained.
Among them, Fingerprint identification (Fingerprint) is to identify an identity by using a Fingerprint in which a finger and a thumb tip are pressed. Fingerprints are a reliable method of identifying identity because the texture arrangement on each finger of each individual varies and does not change with development or age. Fingerprints are used to reveal the true identity of a person despite personal repudiation, the use of pseudonyms, or changes in appearance due to age disorders, plastic surgery, or accidents. The use of fingerprints as an aid to identity authentication is an indispensable aid in modern law enforcement.
S204: and when the verification result is that the verification is passed, switching the application scene to the application scene corresponding to the first identity information.
In particular, since application data may be separated by user, the states of these applications may also vary from user to user. For example, fingerprint data is respectively input into different user spaces, so that the fingerprint data can be obtained only in the current space, in this embodiment, the different user spaces are used as application scenes corresponding to the user account, each piece of identity information is pre-associated with a corresponding application scene, and after the user account passes the verification, the current application scene is switched to the application scene corresponding to the first identity information, so that the account switching is realized.
In the embodiment, the identity authentication request is monitored in real time, if the identity authentication request is received, the identity authentication information contained in the identity authentication request is obtained and used as the first identity information, the first identity information is authenticated to obtain the authentication result, and when the authentication result is that the authentication is passed, the application scene is switched to the application scene corresponding to the first identity information.
Optionally, before step S201, the method for switching the multi-user account further includes:
inputting identity authentication information to be associated in a current application scene;
after the input is successful, the identity authentication information to be associated is used as verification information;
generating an identity corresponding to the verification information, and taking the identity as account information;
and taking the current application scene as an application scene corresponding to the account information, establishing an incidence relation among the verification information, the account information and the application scene corresponding to the account information, and storing the incidence relation.
In this embodiment, by inputting the verification information for each account in advance and associating the corresponding application scenario, the verification information, the account information, and the associated storage of the corresponding scenario are realized, which is beneficial to determining the corresponding scenario quickly through an association relationship subsequently, and then switching.
In some optional implementation manners of this embodiment, in step S203, performing identity verification on the first identity information, and obtaining a verification result includes:
respectively calculating the similarity value of the first identity information and each piece of stored check information;
if the similarity value larger than the preset threshold value exists, acquiring verification information corresponding to the similarity value as target information, confirming that the verification result is verification passing, and taking an application scene corresponding to the target information as an application scene corresponding to the first identity information;
and if the similarity value larger than the preset threshold value does not exist, confirming that the verification fails.
The preset threshold may be set according to actual requirements, and is not limited herein.
It should be noted that, after the verification fails, a corresponding prompt message is given on the interface of the mobile terminal, and the switching of the user account is terminated.
In this embodiment, the verification result is determined by comparing with each piece of pre-stored verification information, so as to ensure the accuracy of the verification result.
In some optional implementation manners of this embodiment, in step S204, when the verification result is that the verification passes, switching the application scenario to the application scenario corresponding to the first identity information includes:
determining account information corresponding to the first identity information and an application scene corresponding to the account information according to the stored association relation;
and taking the account information as a parameter, and switching the current application scene into an application scene corresponding to the account information by adopting a preset jump function.
The preset jump function may be an activtymanagnative getdefault () function, and the account information is used as a parameter of the function, so that the application scene corresponding to the account information can be quickly switched to.
In the embodiment, the scene switching is rapidly realized by presetting the skip function and the account information, and the scene switching efficiency is improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 3 is a schematic block diagram of a switching apparatus for multi-user accounts, which corresponds to the switching method for multi-user accounts in one-to-one manner in the foregoing embodiments. As shown in fig. 3, the switching apparatus for multi-user accounts includes arequest monitoring module 31, aninformation obtaining module 32, aninformation verifying module 33, and ascene switching module 34. The functional modules are explained in detail as follows:
arequest monitoring module 31, configured to monitor the identity authentication request in real time;
aninformation obtaining module 32, configured to, if an identity authentication request is received, obtain identity authentication information included in the identity authentication request as first identity information;
theinformation verification module 33 is configured to perform identity verification on the first identity information to obtain a verification result;
and thescene switching module 34 is configured to switch the application scene to the application scene corresponding to the first identity information when the verification result is that the verification passes.
Optionally, the apparatus for switching between multiple user accounts further includes:
the information input module is used for inputting the identity authentication information to be associated under the current application scene;
the information verification module is used for taking the identity authentication information to be associated as verification information after the entry is successful;
the account generation module is used for generating an identity corresponding to the verification information and taking the identity as account information;
and the association storage module is used for taking the current application scene as the application scene corresponding to the account information, establishing an association relation among the verification information, the account information and the application scene corresponding to the account information, and storing the association relation.
Optionally, theinformation verification module 33 includes:
the similarity calculation unit is used for calculating the similarity value of the first identity information and each piece of stored check information respectively;
the first judging unit is used for acquiring verification information corresponding to the similarity value as target information if the similarity value larger than the preset threshold exists, confirming that the verification result is verification passing, and taking an application scene corresponding to the target information as an application scene corresponding to the first identity information;
and the second judgment unit is used for confirming that the verification fails if the similarity value larger than the preset threshold does not exist.
Optionally, thescene switching module 34 includes:
the scene determining unit is used for determining account information corresponding to the first identity information and an application scene corresponding to the account information according to the stored association relation;
and the scene switching unit is used for switching the current application scene into the application scene corresponding to the account information by using the account information as a parameter and adopting a preset jump function.
For specific limitations of the switching device for the multi-user account, reference may be made to the above limitations of the switching method for the multi-user account, and details are not described here. All or part of each module in the switching device of the multi-user account can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In order to solve the technical problem, an embodiment of the present application further provides a computer device. Referring to fig. 4, fig. 4 is a block diagram of a basic structure of a computer device according to the present embodiment.
The computer device 4 comprises amemory 41, aprocessor 42, anetwork interface 43 communicatively connected to each other via a system bus. It is noted that only the computer device 4 having thecomponents connection memory 41,processor 42,network interface 43 is shown, but it is understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead. As will be understood by those skilled in the art, the computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable gate array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
Thememory 41 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or D interface display memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, thememory 41 may be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. In other embodiments, thememory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the computer device 4. Of course, thememory 41 may also include both internal and external storage devices of the computer device 4. In this embodiment, thememory 41 is generally used for storing an operating system installed in the computer device 4 and various types of application software, such as program codes for controlling electronic files. Further, thememory 41 may also be used to temporarily store various types of data that have been output or are to be output.
Theprocessor 42 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. Theprocessor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, theprocessor 42 is configured to execute the program code stored in thememory 41 or process data, such as program code for executing control of an electronic file.
Thenetwork interface 43 may comprise a wireless network interface or a wired network interface, and thenetwork interface 43 is generally used for establishing communication connection between the computer device 4 and other electronic devices.
The present application further provides another embodiment, which is to provide a computer-readable storage medium, where an interface display program is stored, and the interface display program is executable by at least one processor to cause the at least one processor to execute the steps of the method for switching between multiple user accounts as described above.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
It is to be understood that the above-described embodiments are merely illustrative of some, but not restrictive, of the broad invention, and that the appended drawings illustrate preferred embodiments of the invention and do not limit the scope of the invention. This application is capable of embodiments in many different forms and is provided for the purpose of enabling a thorough understanding of the disclosure of the application. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that the present application may be practiced without modification or with equivalents of some of the features described in the foregoing embodiments. All equivalent structures made by using the contents of the specification and the drawings of the present application are directly or indirectly applied to other related technical fields and are within the protection scope of the present application.