CN112580002A - Login method and related equipment - Google Patents

Login method and related equipment Download PDF

Info

Publication number
CN112580002A
CN112580002A CN202011497360.9A CN202011497360A CN112580002A CN 112580002 A CN112580002 A CN 112580002A CN 202011497360 A CN202011497360 A CN 202011497360A CN 112580002 A CN112580002 A CN 112580002A
Authority
CN
China
Prior art keywords
login
steps
execution
information
mth
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011497360.9A
Other languages
Chinese (zh)
Inventor
李佳任
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202011497360.9A priority Critical patent/CN112580002A/en
Publication of CN112580002A publication Critical patent/CN112580002A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application relates to the technical field of process optimization and provides a login method and related equipment, wherein the login method comprises the following steps: determining a login process based on user operation, wherein the login process comprises N login steps; n is an integer greater than 1; sequentially executing the N login steps according to the execution sequence of the N login steps, and recording the execution state of each login step in the N login steps; if the execution of the Mth login step fails, acquiring the execution states of all login steps before the Mth login step is executed, and re-executing the Mth login step based on the execution states of all login steps; the Mth login step is any one of the N login steps. By implementing the method and the device, the step of executing the failure in the process can be re-entered according to the situation when the login process is executed, unnecessary repeated execution of other steps is reduced, user operation is reduced, and the experience of the user is improved.

Description

Login method and related equipment
Technical Field
The present application relates to the field of process optimization technologies, and in particular, to a login method and a related device.
Background
At present, application software is in endless, and login modes are more and more diversified. At present, a login entry of an application usually has a plurality of login modes, such as login through a user name and a password or login through a mobile phone number and a short message authentication code. However, the existing login method cannot realize the reentry failure step, and often needs to restart the whole login process from the beginning after a certain login step in the login process fails to be executed, so that unnecessary repeated operations are added to the user, and the login operation experience of the user is greatly reduced.
Therefore, how to execute the login operation is to re-enter the login procedure that fails to execute without starting the whole login process from the beginning is a problem to be solved.
Disclosure of Invention
In view of the above, the present application is proposed to provide a login method and related device that overcome or at least partially solve the above problems.
In a first aspect, an embodiment of the present application provides a login method, which may include:
determining a login process based on user operation, wherein the login process comprises N login steps; n is an integer greater than 1;
sequentially executing the N login steps according to the execution sequence of the N login steps, and recording the execution state of each login step in the N login steps;
if the execution of the Mth login step fails, acquiring the execution states of all login steps before the Mth login step is executed, and re-executing the Mth login step based on the execution states of all login steps; the Mth login step is any one of the N login steps, and M is an integer greater than or equal to 1.
In one possible implementation, the method further includes:
acquiring configuration information, wherein the configuration information comprises description information of the N login steps;
analyzing the configuration information to obtain metadata corresponding to the N login steps, and generating the login flow according to the metadata corresponding to the N login steps; the metadata includes a unique code identifying a corresponding login step and an execution order of the corresponding login step.
In one possible implementation, the method further includes:
updating the configuration information by an open source component Apollo apollo;
according to the updated configuration information, dynamically updating the corresponding metadata, and according to the updated metadata, generating the updated login flow; the updated login process comprises K login steps, wherein K is an integer greater than or equal to 1.
In a possible implementation manner, the login process is one of X login processes corresponding to the login entry; y identical login steps are included among the X login processes, and the Y identical login steps are shared among the X login processes; x, Y is an integer greater than or equal to 1.
In a possible implementation manner, the recording the execution state of each of the N login steps includes:
storing the execution state of each login step in the N login steps into a cache in the process of sequentially executing the N login steps; the execution state includes entry information, exit information, and process information.
In one possible implementation manner, the participation information includes one or more of a user name, a password, a mobile phone number and an authentication code; the participation information comprises one or more of an execution result and an error information description of each login step, and the execution result is that the verification is passed or not passed; the process information includes one or more of the unique code identifying the each login step, an execution start time of the each login step, and an execution end time of the each login step.
In a second aspect, an embodiment of the present application provides a login apparatus, where the apparatus includes:
the system comprises a determining unit, a judging unit and a judging unit, wherein the determining unit is used for determining a login process based on user operation, and the login process comprises N login steps; n is an integer greater than 1;
the execution unit is used for sequentially executing the N login steps according to the execution sequence of the N login steps and recording the execution state of each login step in the N login steps;
a first obtaining unit, configured to, if an mth login step fails to be executed, obtain execution statuses of all login steps before the mth login step is executed, and re-execute the mth login step based on the execution statuses of all login steps; the Mth login step is any one of the N login steps, and M is an integer greater than or equal to 1.
In one possible implementation, the apparatus further includes:
a second obtaining unit, configured to obtain configuration information, where the configuration information includes description information of the N login steps;
a first generating unit, configured to analyze the configuration information to obtain metadata corresponding to each of the N login steps, and generate the login procedure according to the metadata corresponding to each of the N login steps; the metadata includes a unique code identifying a corresponding login step and an execution order of the corresponding login step.
In one possible implementation, the apparatus further includes:
an updating unit, configured to update the configuration information through an open source component apollo;
a second generating unit, configured to dynamically update the corresponding metadata according to the updated configuration information, and generate the updated login procedure according to the updated metadata; the updated login process comprises K login steps, wherein K is an integer greater than or equal to 1.
In a possible implementation manner, the login process is one of X login processes corresponding to the login entry; y identical login steps are included among the X login processes, and the Y identical login steps are shared among the X login processes; x, Y is an integer greater than or equal to 1.
In a possible implementation manner, the execution unit is specifically configured to:
storing the execution state of each login step in the N login steps into a cache in the process of sequentially executing the N login steps; the execution state includes entry information, exit information, and process information.
In one possible implementation manner, the participation information includes one or more of a user name, a password, a mobile phone number and an authentication code; the participation information comprises one or more of an execution result and an error information description of each login step, and the execution result is that the verification is passed or not passed; the process information includes one or more of the unique code identifying the each login step, an execution start time of the each login step, and an execution end time of the each login step.
In a third aspect, an embodiment of the present application provides a computer device, including a storage component, a processing component and a communication component, where the storage component, the processing component and the communication component are connected to each other, where the storage component is used to store a computer program, and the communication component is used to perform information interaction with an external device; the processing component is configured to invoke a computer program to perform the method according to the first aspect, which is not described herein again.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and the computer program is executed by a processor to implement the method in the first aspect, which is not described herein again.
By implementing the method and the device, when the user performs login operation, the execution state of each login step in the login process can be recorded (for example, the login and logout information, the execution start time and the execution end time of each login step can be included, and the like). Therefore, when a subsequent user operation error occurs and causes a certain login step in the login process to fail to be executed (for example, when an authentication code is input incorrectly), the previously stored execution state of each login step before the failed step can be directly acquired from the cache, and then the failed step is re-executed on the basis of the execution state of each login step. That is, when execution of a certain login step fails, the application can restore the executing login process to the state of the execution of the failed step (for example, to the state of inputting a mobile phone number and a password), and then reenter the failed step. Therefore, compared with the scheme in the prior art that when execution of a certain login step fails, login is often restarted from the first step of the login process (for example, a mobile phone number is input again, and the like), so that the user repeats the operation, and the efficiency is low. The method and the device can directly re-enter the step based on the state before the failure step without starting the login process from the beginning, thereby reducing unnecessary repeated operation for the user and improving the use experience of the user. In addition, the login entry referred to in the present application may include a plurality of login procedures, and each login procedure may share the same login procedure, thereby simplifying the code.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments or the background art of the present application, the drawings required to be used in the embodiments or the background art of the present application will be described below.
Fig. 1 is a schematic system architecture diagram of a login method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a login method according to an embodiment of the present application;
FIG. 3 is a schematic interface diagram of a reentry login procedure provided in an embodiment of the present application;
fig. 4 is a schematic flowchart of another login method provided in an embodiment of the present application;
fig. 5 is a schematic overall step diagram of a login method provided in an embodiment of the present application;
fig. 6 is a schematic structural diagram of a login device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The embodiments of the present application will be described below with reference to the drawings.
The terms "first," "second," and "third," etc. in the description and claims of this application and in the accompanying drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, "include" and "have" and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
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.
As used in this application, the terms "server," "unit," "system," and the like are intended to refer to a computer-related entity, either hardware, firmware, a combination of hardware and software, or software in execution. For example, a server may be, but is not limited to, a processor, a data processing platform, a computing device, a computer, two or more computers, and the like.
First, some terms in the present application are explained so as to be easily understood by those skilled in the art.
(1) apollo (apollo), an open source configuration management center developed by a portable framework department, can centrally manage and apply the configuration of different environments and different clusters, can push the configuration to an application end in real time after modification, and has the characteristics of standard authority, flow management and the like. In the application, the configuration information of the login process can be dynamically updated through the apollo, so that the sequence of a plurality of login steps in the login process can be added, deleted or changed, and the like.
(2) redis (a storage system) is a high-performance key-value storage system. Like the distributed cache system (Memcached), redis supports relatively more value types to store, including strings (string), linked lists (list), sets (set), and ordered sets (zset), among others. These data types all support push/pop (push/pop), add/delete (add/remove), and intersect union and difference and richer operations, and these operations are atomic. On this basis, redis supports various different ways of ordering. Like memcached, data is cached in memory to ensure efficiency. The difference is that the redis can periodically write updated data into a disk or write modification operation into an additional recording file, and realizes master-slave (master-slave) synchronization on the basis. In the present application, the execution state of each login step in the login flow may be stored by redis, including entry, exit, execution start time, execution end time, and the like of each login step. Therefore, when a certain login step fails to be executed subsequently, the execution states of a plurality of login steps before the failure step are acquired from the cache, and then the failed login step is re-entered on the basis of the execution states (namely, the state before the failure step is executed is recovered, and then the failure step is executed again), so that the login process does not need to be started from the beginning.
Next, a system architecture of one of the login methods based on the embodiments of the present application is described.
Referring to fig. 1, fig. 1 is a schematic diagram of a system architecture of a login method according to an embodiment of the present application. As shown in fig. 1, the system architecture may include a computer device 101 (exemplified by a desktop computer in fig. 1) and a server 201. The computer device 101 may run related application software or a website, and the like, and the application software or the website may include a login entry for a user to log in. The login entry may correspond to a plurality of login manners, each login manner may have a corresponding login procedure, and further, each login procedure may include a plurality of login steps. For example, the login process corresponding to the mobile phone number password login mode may include multiple login steps, such as mobile phone number verification, verification code verification, personnel information inquiry corresponding to the mobile phone number, wind control verification, equipment information verification, and the like. For another example, the login process corresponding to the account password login manner may include a plurality of login steps, such as account authentication, password authentication, wind control verification, device information verification, and the like. For example, the login process corresponding to the mobile phone number password login manner may include multiple login steps such as mobile phone number verification, password verification, personnel information query corresponding to the mobile phone number, wind control verification, equipment information verification, and the like, and thus, the description is omitted here. For the computer device 101 that needs to perform the login step, the login function provided by the embodiment of the application can be directly integrated on the computer device 101, or a client for implementing the method of the embodiment of the application can be installed on the computer device 101. Or, the login method provided by the present application may also be executed on a device such as the server 201 in the form of a Software Development Kit (SDK), an interface of a login function is provided in the form of an SDK, the computer device 101 or another device may implement execution of a login process through the provided interface, and the like, which is not specifically limited in this embodiment of the present application. The computer device 101 may establish a connection with the server 201 in a wired or wireless manner, and the server 201 may be a background server of the relevant application software or website, and the like. The server 201 may be a server, or may be a server cluster composed of a plurality of servers, or a cloud computing service center, and the like, which is not specifically limited in this embodiment of the present application.
In the following, taking the computer device 101 as an example, a login method provided in the embodiment of the present application is described in detail. The computer device 101 may determine a login process based on a user operation (for example, the user clicks a relevant control such as "login by account password" through a login interface provided by the computer device 101), and the login process may be one of a plurality of login processes corresponding to a login entry. The login procedure may include a plurality of login steps, and then the computer apparatus 101 may sequentially execute the plurality of login steps according to the execution order of the plurality of login steps, and record the execution state of each login step. Optionally, the execution state may include, for example, the entry information, the exit information, and the procedure information of each login step, and so on. The access information may include, for example, a user name, a password, a mobile phone number, an authentication code, and the like. The parameter information may include, for example, the execution result of each login step, such as a pass check or a fail check, and may include error description information (such as a username error, etc.), and the like. The process information may include, for example, a unique code for each login step, and a start time and an end time of execution of each login step, which are not specifically limited in this embodiment of the present application. Then, when a certain login step in the login flow fails to be executed, for example, when the user inputs an authentication code error, which results in a failure of verifying the login step by the authentication code, the computer device 101 may acquire the execution statuses of all login steps before the failed step is executed from the cache, and re-execute the failed step based on the execution statuses of all login steps before the failed step. That is, when a certain login step fails to be executed, the computer device 101 may restore the whole process to the state before the failed step is executed (for example, the state that the mobile phone number and the password are received and the unit performs the verification of the verification code), and then re-enter the failed step. Therefore, the whole login process can be avoided from being started from the beginning, unnecessary repeated operation of the user is reduced, and the experience of the user is improved.
As described above, the computer device in the embodiment of the present application may include, but is not limited to, any electronic product based on an intelligent operating system, which can perform human-computer interaction with a user through an input device such as a keyboard, a virtual keyboard, a touch pad, a touch screen, and a voice control device, such as a smart phone, a tablet computer, a notebook computer, and a desktop computer, which have the above interface testing function. Smart operating systems include, but are not limited to, any operating system that enriches device functionality by providing various mobile applications to a mobile device, such as: android (Android)TM)、iOSTM、Windows PhoneTMAnd the like. The computer device in the embodiment of the present application may further be one or more services having the above interface test functionA server (a plurality of servers may form a server cluster), and the like, which are not particularly limited in the embodiments of the present application.
It should also be understood that the system architecture of the login method shown in fig. 1 is only a partial exemplary implementation manner in the embodiment of the present application, and the system architecture of the login method in the embodiment of the present application includes, but is not limited to, the system architecture of the above login method.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating a login method according to an embodiment of the present disclosure. Applicable to the system of fig. 1 described above, and described below in connection with fig. 2 from a single side of the computer device 101. The method may include the following steps S201 to S203.
Step S201: determining a login process based on user operation, wherein the login process comprises N login steps.
Specifically, the computer device determines a login process based on a user operation, that is, based on a selection of a login manner by a user, where the login process may include N login steps, where N is an integer greater than 1. Optionally, one login entry may correspond to multiple login manners, and each login manner may have its own login procedure. That is, one login entry may correspond to X login procedures, and the login procedure may be one of the X login procedures. Y identical registration steps may be included among the X registration procedures, and the Y identical registration steps may be shared among the X registration procedures, and X, Y is an integer greater than or equal to 1.
Step S202: and sequentially executing the N login steps according to the execution sequence of the N login steps, and recording the execution state of each login step in the N login steps.
Specifically, the computer device may sequentially execute the N login steps according to an execution order of the N login steps in the login flow, and record an execution state of each of the N login steps. Optionally, the computer device may store, in the process of executing the login step, an execution state of each login step in a local cache or a cloud server, and the like, which is not specifically limited in this embodiment of the present application. Optionally, the execution state may include, for example, the entry information, the exit information, and the procedure information of each login step, and so on. The access information may include, for example, a user name, a password, a mobile phone number, an authentication code, and the like. The parameter information may include, for example, the result of execution of each login step, such as a pass check or a fail check, and may include error description information or the like. The process information may include, for example, a unique code for each login step, and a start time and an end time of execution of each login step, which are not specifically limited in this embodiment of the present application.
Step S203: if the Mth login step fails to be executed, acquiring the execution states of all login steps before the Mth login step is executed, and re-executing the Mth login step based on the execution states of all login steps.
Specifically, if the mth login step fails to be executed, the computer device may obtain the execution status of all login steps before the mth login step is executed from the cache, and re-execute the mth login step based on the execution status of all login steps. That is, when the mth login step fails to be executed, the entire login process may be restored to the state before the mth login step is executed based on the execution states of all (or part) of the login steps stored before the mth login step, and then the mth login step is re-entered, and the execution of the subsequent login step is continued. The mth registration step may be one of the N registration steps, and M is an integer greater than or equal to 1.
Optionally, referring to fig. 3, fig. 3 is an interface schematic diagram of a reentry login step provided in an embodiment of the present application. As shown in fig. 3, when the user inputs an authentication code error through the first login interface 301 and clicks the login control 302, the computer device may restore the entire login process to a state where the mobile phone number and the password have been input before the authentication code is input (e.g., the second login interface 303 shown in fig. 3). The user does not need to start the login process from the beginning, i.e. the user does not need to input the mobile phone number, the password and the like again, and only needs to input the verification code again, the subsequent login steps can be continued, and the login is completed. Therefore, unnecessary repeated operation of the user can be greatly reduced, and the use experience of the user is improved.
Referring to fig. 4, fig. 4 is a flowchart illustrating another login method according to an embodiment of the present disclosure. Applicable to the system of fig. 1 described above, and described below in connection with fig. 4 from a single side of the computer device 101. The method may include the following steps S401 to S405.
Step S401: configuration information is obtained, wherein the configuration information comprises description information of the N login steps.
In particular, the computer device obtains configuration information, which may include description information for the N login steps. For example, the login process of logging in through the mobile phone number verification code may include multiple login steps such as mobile phone number verification, verification code verification, personnel information inquiry corresponding to the mobile phone number, wind control verification, equipment information verification, and the like, and the corresponding configuration information may include description information of each login step in the login process.
Step S402: and analyzing the configuration information to obtain metadata corresponding to the N login steps, and generating a login flow according to the metadata corresponding to the N login steps.
Specifically, the computer device analyzes the configuration information to obtain metadata corresponding to each of the N login steps, and generates a login flow according to the metadata corresponding to each of the N login steps. The metadata may include a unique code identifying the corresponding login step and the execution order of the corresponding login steps.
Optionally, please refer to fig. 5, where fig. 5 is a schematic diagram illustrating an overall step of a login method according to an embodiment of the present application. As shown in fig. 5, configuration information of each of a plurality of login flows on apollo (apollo) is read, and each configuration information is analyzed by an analyzer (the analyzer can be implemented by a code) to obtain node metadata (i.e., metadata of each login step) of each of the plurality of login flows. The node metadata includes information used for describing each login step in the login flow, such as a unique code of the login step (used for distinguishing each step) and an execution sequence of the login step (used for determining the execution sequence of each step), and the corresponding login flow can be generated according to the node metadata.
Optionally, the login process may be dynamically modified by introducing an open source component apollo, where the apollo may modify configuration information of the login process without shutdown. The parser may parse the modified configuration information to obtain updated node metadata, thereby generating an updated login flow. The process controller (which may be implemented in code) shown in fig. 5 may perform the updated login process to meet the business requirements that may change at any time. For example, according to the service requirement, it may be that the same mobile phone number and password can only be logged in on one device for a certain period of time, if the limitation needs to be removed subsequently, the configuration information can be modified through apollo, the step of verifying the number of devices logged in simultaneously is directly deleted without changing codes, the configuration of the login process is flexible, and the modification is convenient. Therefore, after the configuration of the login process is completed in the compiling period, the login process can be modified, some login steps can be added or deleted, and the like according to the actual requirements in the running period.
Step S403: determining a login process based on user operation, wherein the login process comprises N login steps.
Specifically, step S403 may refer to step S201 in the embodiment corresponding to fig. 2, which is not described herein again.
Alternatively, as shown in fig. 5, the flow controller may invoke and execute a corresponding login flow in response to a user operation (for example, invoke a login flow corresponding to a corresponding mobile phone authentication code login manner in response to a user selection of a login manner).
Referring to fig. 5, as shown in fig. 5, the flow 1, the flow 2 and the flow 3 are different login flows of different login methods. The process 1 may be a login process corresponding to a mobile phone number password login mode, and may include, for example, multiple steps of mobile phone number verification, verification code verification, personnel information inquiry corresponding to the mobile phone number, wind control verification, equipment information verification, and the like; the process 2 may be a login process corresponding to an account password login manner, and may include, for example, a plurality of steps such as account authentication, password authentication, wind control verification, device information verification, and the like; the process 3 may be a login process corresponding to a mobile phone number password login manner, and may include, for example, multiple steps of mobile phone number verification, password verification, personnel information inquiry corresponding to the mobile phone number, wind control verification, equipment information verification, and the like. As described above, in a case where one login entry includes multiple login manners, if all the login steps involved above are coupled into one login flow in order to reduce the number of login flows, executing the login steps of each login manner by using a large number of determination conditions tends to lead to more and more determination conditions and more complex and complicated codes along with more and more login manners, which is not beneficial to development and maintenance.
Based on this, this application can split multiple login mode, and different login modes correspond different login processes respectively. Furthermore, in order to reduce the problem of a large number of codes caused by a plurality of login processes, the proposal can modularize each login process, and each module can execute one step in the login process. Therefore, if the same steps are included among the plurality of login processes, the plurality of login processes may share the same login steps, that is, the same login steps may be performed through a common module. For example, the flow 1, the flow 2, and the flow 3 include two steps of wind control verification and equipment information verification, and a module corresponding to the two steps of wind control verification and equipment information verification can be used as a common module of the flow 1, the flow 2, and the flow 3, so that the arrangement of repeated modules is saved, and the overall login flow is lighter. For another example, a login flow corresponding to a User Management (UM) login manner often includes a step of invoking a pacas system to perform UM number verification, and other login manners do not generally include the step, so that the step may be processed by a separate module. Alternatively, the modules can be connected in series through a responsibility chain mode to form a complete login process. For example, the flow 1 may be formed by connecting a mobile phone number verification module, a verification code verification module, a person information query module corresponding to the mobile phone number, a public module 1 (wind control verification) and a public module 2 (device information verification) in series, and so on, which is not described herein again. Therefore, the module of which step is executed by the modularized process is clear, the login process is formed by splicing a plurality of modules, the modules are coupled with each other at high cohesion, the login process is changed only by modifying the corresponding modules, other modules cannot be influenced, and development and maintenance are facilitated.
Step S404: and sequentially executing the N login steps according to the execution sequence of the N login steps, and recording the execution state of each login step in the N login steps.
Specifically, step S404 may refer to step S202 in the embodiment corresponding to fig. 2, which is not described herein again.
Optionally, as shown in fig. 5, in the process of executing a certain login process, the process controller may sequentially execute a plurality of process steps in the login process according to metadata control, each process node (i.e., each process step) interacts with the value stack, may record process information, store an execution state of each login step, and the like. For example, the entry parameters (e.g., user name, password, mobile phone number, and authentication code, etc.) and the exit parameters (e.g., the execution result (check is passed or not passed, login is successful or failed, etc.) and the error information description (e.g., user name and password error, authentication code error, or user name is not in compliance with the specification, etc.) of each login step, and the mobile phone number and user code of the user, etc.) and the process information (e.g., the unique code, execution start time, execution end time, etc. of the login step) of each login step may be stored, so that the login flow record is more clear. In this way, the description information of each login step can be added for recording, for example, the current step is a user name and password verification step, so that which login step, which parameters and the like can be more clearly identified. Therefore, when the user logs in, if any login step in the login process has a problem, the staff can quickly and accurately check and locate the problem, and the maintenance of application software and websites is facilitated.
Step S405: if the Mth login step fails to be executed, acquiring the execution states of all login steps before the Mth login step is executed, and re-executing the Mth login step based on the execution states of all login steps.
Specifically, step S405 may refer to step S203 in the embodiment corresponding to fig. 2, which is not described herein again.
Alternatively, as shown in fig. 5, the process controller may determine whether to continue the subsequent step, exit the login process, jump to the subsequent login step, and so on, according to the state of each step. That is, the flow controller may support different operations in a plurality of different states, and optionally, may also repeat the rollback flow, and so on. For example, when the verification code does not pass, the process controller may control the reentry controller (the reentry controller may be implemented by a code) to read the execution state of the current login process before the login step of verification code from the cache, and then reenter the step of verification code verification without starting the whole login process from the beginning, that is, without inputting the mobile phone number again, and the like, thereby reducing unnecessary repeated operations of the user and improving the user experience. The process controller can cache the execution state of each login step in the login process of the user operation by calling the open source component redis. As described above, when an intermediate step of the login process fails, the reentry controller may acquire the execution state of each login step before the failed step from the cache, and may further directly reenter the failed step in this state and continue the subsequent steps.
In summary, the embodiment of the present application may record the execution state of each login step in the login process when the user performs the login operation (for example, the execution state may include the entry and exit information, the execution start time, and the execution end time of each login step, and the like). Therefore, when a subsequent user operation error occurs and causes a certain login step in the login process to fail to be executed (for example, when an authentication code is input incorrectly), the previously stored execution state of each login step before the failed step can be directly acquired from the cache, and then the failed step is re-executed on the basis of the execution state of each login step. That is, when execution of a certain login step fails, the application can restore the executing login process to the state of the execution of the failed step (for example, to the state of inputting a mobile phone number and a password), and then reenter the failed step. Therefore, compared with the scheme in the prior art that when execution of a certain login step fails, login is often restarted from the first step of the login process (for example, a mobile phone number is input again, and the like), so that the user repeats the operation, and the efficiency is low. The method and the device can directly re-enter the step based on the state before the failure step without starting the login process from the beginning, thereby reducing unnecessary repeated operation for the user and improving the use experience of the user.
In addition, the login entry related in the application may include multiple login procedures, and each login procedure may share the same login procedure, so as to simplify the code and make the overall login procedure lighter.
On the other hand, according to the application, original configuration information of any login flow can be dynamically modified at any time through the open source component apollo according to actual requirements, the login step sequence in the login flow is adjusted, or login steps are increased or deleted, and the like, and bottom layer codes do not need to be modified, so that flow arrangement can be rapidly and efficiently carried out, configuration is more flexible, and requirements under different scenes can be met at any time.
The method of the embodiment of the present application is explained in detail above, and the following provides a related login device of the embodiment of the present application. Referring to fig. 6, fig. 6 is a schematic structural diagram of a login device according to an embodiment of the present disclosure. The login apparatus 60 may include a determination unit 601, an execution unit 602, a first acquisition unit 603, a second acquisition unit 604, a first generation unit 605, an update unit 606, and a second generation unit 607.
A determining unit 601, configured to determine a login procedure based on a user operation, where the login procedure includes N login steps; n is an integer greater than 1;
an executing unit 602, configured to sequentially execute the N login steps according to an execution sequence of the N login steps, and record an execution state of each login step in the N login steps;
a first obtaining unit 603, configured to, if an mth login step fails to be executed, obtain execution statuses of all login steps before the mth login step is executed, and re-execute the mth login step based on the execution statuses of all login steps; the Mth login step is any one of the N login steps, and M is an integer greater than or equal to 1.
In one possible implementation, the apparatus further includes:
a second obtaining unit 604, configured to obtain configuration information, where the configuration information includes description information of the N login steps;
a first generating unit 605, configured to analyze the configuration information to obtain metadata corresponding to each of the N login steps, and generate the login procedure according to the metadata corresponding to each of the N login steps; the metadata includes a unique code identifying a corresponding login step and an execution order of the corresponding login step.
In one possible implementation, the apparatus further includes:
an updating unit 606, configured to update the configuration information through an open source component apollo;
a second generating unit 607, configured to dynamically update the corresponding metadata according to the updated configuration information, and generate the updated login procedure according to the updated metadata; the updated login process comprises K login steps, wherein K is an integer greater than or equal to 1.
In a possible implementation manner, the login process is one of X login processes corresponding to the login entry; y identical login steps are included among the X login processes, and the Y identical login steps are shared among the X login processes; x, Y is an integer greater than or equal to 1.
In a possible implementation manner, the execution unit 602 is specifically configured to:
storing the execution state of each login step in the N login steps into a cache in the process of sequentially executing the N login steps; the execution state includes entry information, exit information, and process information.
In one possible implementation manner, the participation information includes one or more of a user name, a password, a mobile phone number and an authentication code; the participation information comprises one or more of an execution result and an error information description of each login step, and the execution result is that the verification is passed or not passed; the process information includes one or more of the unique code identifying each of the login steps, the execution start time of each of the login steps, and the execution end time of each of the login steps
It should be noted that implementation of each operation may also correspond to corresponding description of the method embodiments shown in fig. 2 and fig. 4, and details are not described here again.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present disclosure, where the computer device 70 includes at least one processor 701, at least one memory 702, and at least one communication interface 703. In addition, the device may also include common components such as an antenna, which will not be described in detail herein.
The processor 701 may be a general purpose Central Processing Unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of programs according to the above schemes.
Communication interface 703 is used for communicating with other devices or communication Networks, such as ethernet, Radio Access Network (RAN), core network, Wireless Local Area Networks (WLAN), etc.
The Memory 702 may be, but is not limited to, a Read-Only Memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory may be self-contained and coupled to the processor via a bus. The memory may also be integral to the processor.
The memory 702 is used for storing application program codes for executing the above schemes, and the processor 701 controls the execution. The processor 701 is configured to execute application program code stored in the memory 702.
The memory 702 stores code executable to perform the login method provided in fig. 2 or 3 above, for example, the computer device 70 may determine a login procedure based on a user operation, the login procedure comprising N login steps; n is an integer greater than 1; sequentially executing the N login steps according to the execution sequence of the N login steps, and recording the execution state of each login step in the N login steps; if the execution of the Mth login step fails, acquiring the execution states of all login steps before the Mth login step is executed, and re-executing the Mth login step based on the execution states of all login steps; the Mth login step is any one of the N login steps, and M is an integer greater than or equal to 1.
It should be noted that, the functions of the functional units in the computer device 70 described in the embodiment of the present application may refer to the corresponding descriptions of the method embodiments shown in fig. 2 and fig. 4, and are not described again here.
In this application, the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present application.
In addition, functional components in the embodiments of the present application may be integrated into one component, or each component may exist alone physically, or two or more components may be integrated into one component. The integrated components can be realized in a form of hardware or a form of software functional units.
The integrated components, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially or partially implemented in the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
While the invention has been described with reference to specific embodiments, the scope of the invention is not limited thereto, and those skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
It should be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the 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 application. While the present application has been described herein in conjunction with various embodiments, other variations to the disclosed embodiments may be understood and effected by those skilled in the art in practicing the present application as claimed herein.

Claims (10)

1. A login method, comprising:
determining a login process based on user operation, wherein the login process comprises N login steps; n is an integer greater than 1;
sequentially executing the N login steps according to the execution sequence of the N login steps, and recording the execution state of each login step in the N login steps;
if the execution of the Mth login step fails, acquiring the execution states of all login steps before the Mth login step is executed, and re-executing the Mth login step based on the execution states of all login steps; the Mth login step is any one of the N login steps, and M is an integer greater than or equal to 1.
2. The method of claim 1, further comprising:
acquiring configuration information, wherein the configuration information comprises description information of the N login steps;
analyzing the configuration information to obtain metadata corresponding to the N login steps, and generating the login flow according to the metadata corresponding to the N login steps; the metadata includes a unique code identifying a corresponding login step and an execution order of the corresponding login step.
3. The method of claim 2, further comprising:
updating the configuration information by an open source component Apollo apollo;
according to the updated configuration information, dynamically updating the corresponding metadata, and according to the updated metadata, generating the updated login flow; the updated login process comprises K login steps, wherein K is an integer greater than or equal to 1.
4. The method according to claim 1, wherein the login procedure is one of X login procedures corresponding to a login entry; y identical login steps are included among the X login processes, and the Y identical login steps are shared among the X login processes; x, Y is an integer greater than or equal to 1.
5. The method of claim 1, wherein said recording the status of the execution of each of said N login steps comprises:
storing the execution state of each login step in the N login steps into a cache in the process of sequentially executing the N login steps; the execution state includes entry information, exit information, and process information.
6. The method of claim 5, wherein the access information comprises one or more of a user name, a password, a mobile phone number, and an authentication code; the participation information comprises one or more of an execution result and an error information description of each login step, and the execution result is that the verification is passed or not passed; the process information includes one or more of the unique code identifying the each login step, an execution start time of the each login step, and an execution end time of the each login step.
7. A login apparatus, comprising:
the system comprises a determining unit, a judging unit and a judging unit, wherein the determining unit is used for determining a login process based on user operation, and the login process comprises N login steps; n is an integer greater than 1;
the execution unit is used for sequentially executing the N login steps according to the execution sequence of the N login steps and recording the execution state of each login step in the N login steps;
a first obtaining unit, configured to, if an mth login step fails to be executed, obtain execution statuses of all login steps before the mth login step is executed, and re-execute the mth login step based on the execution statuses of all login steps; the Mth login step is any one of the N login steps, and M is an integer greater than or equal to 1.
8. The apparatus of claim 7, further comprising:
a second obtaining unit, configured to obtain configuration information, where the configuration information includes description information of the N login steps;
a first generating unit, configured to analyze the configuration information to obtain metadata corresponding to each of the N login steps, and generate the login procedure according to the metadata corresponding to each of the N login steps; the metadata includes a unique code identifying a corresponding login step and an execution order of the corresponding login step.
9. A computer device, characterized in that the computer device comprises a processor, a memory, wherein the memory is used for storing a computer program, and the processor is configured for calling the computer program to execute the method according to any one of claims 1-6.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which is executed by a processor to implement the method of any one of claims 1-6.
CN202011497360.9A 2020-12-17 2020-12-17 Login method and related equipment Pending CN112580002A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011497360.9A CN112580002A (en) 2020-12-17 2020-12-17 Login method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011497360.9A CN112580002A (en) 2020-12-17 2020-12-17 Login method and related equipment

Publications (1)

Publication Number Publication Date
CN112580002A true CN112580002A (en) 2021-03-30

Family

ID=75135951

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011497360.9A Pending CN112580002A (en) 2020-12-17 2020-12-17 Login method and related equipment

Country Status (1)

Country Link
CN (1) CN112580002A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113194079A (en) * 2021-04-23 2021-07-30 平安科技(深圳)有限公司 Login verification method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113194079A (en) * 2021-04-23 2021-07-30 平安科技(深圳)有限公司 Login verification method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US11847480B2 (en) System for detecting impairment issues of distributed hosts
US10628294B2 (en) Mock services for software infrastructures
US10289468B1 (en) Identification of virtual computing instance issues
CN112867988A (en) Implementing compliance settings by a mobile device to follow a configuration scenario
CN112636992B (en) Dynamic routing method, device, equipment and storage medium
WO2021260398A1 (en) Determining risk metrics for access requests in network environments using multivariate modeling
CN110673936B (en) Breakpoint continuous operation method and device for arrangement service, storage medium and electronic equipment
CN111125064B (en) Method and device for generating database schema definition statement
US9116808B2 (en) Method and system for determining device configuration settings
CN113312072A (en) Configuration file updating method and device, electronic equipment and medium
US9977819B2 (en) Sharing data on mobile devices
WO2021243342A1 (en) Action recommendation for application failure
CN109241128B (en) Automatic triggering method and system for overdue event
WO2021102368A1 (en) System and method for application release orchestration and deployment
US10095545B1 (en) Automated and configurable fleet refresh
CN112580002A (en) Login method and related equipment
CN107526838B (en) Method and device for database cluster capacity expansion
US10649833B1 (en) Consensus-based remediation of offerings' problems
US10375202B2 (en) Database selection in distributed computing systems
EP3671459B1 (en) Method and apparatus for generating log data having increased filterability
US11288114B2 (en) Remote diagnostic of computing devices
JP2023546904A (en) Accelerated non-volatile memory device inspection and forensics
CN111258873A (en) Test method and device
US20240078164A1 (en) Techniques for managing software agent health
CN112131550B (en) Windows system unlocking method and device, electronic equipment and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination