Account login method, device and machine-readable storage medium

By storing the correspondence between user information and account information in the store center, the problem of synchronous login and status synchronization of accounts in the merchant account system is solved, and an efficient login process and real-time status update are achieved.

CN112003871BActive Publication Date: 2025-01-10SHANGHAI SUMI TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010892100.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-31
Publication Date
2025-01-10
Estimated Expiration
2040-08-31

AI Technical Summary

Technical Problem

When managing the merchant account system, commercial store centers lack effective synchronized account data and resource data sharing solutions, which leads to difficulties in building the software ecosystem of system customizers.

Method used

By storing the correspondence between user information and account information after user login in the store center, we reduce dependence on the backend server, realize synchronous login between various APPs, and provide a real-time synchronization mechanism for login status.

Benefits of technology

It realizes synchronous login within the merchant account, reduces interaction with the backend server, improves login speed and efficiency, and ensures real-time consistency of the login status of each APP.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112003871B_ABST
    Figure CN112003871B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a method and device for logging into an account. The method includes obtaining a request for logging into an application, the request carrying user information, determining whether the database of the store center stores the user information, and when determining that the user information is stored, obtaining the account information corresponding to the user information from the database, and returning the account information to the application for logging in. When the user logs into the application, this solution first searches for the user information in the store center, and provides the user with the account information for logging in if the user information exists. This solution reduces the interaction between the login application and the backend server, and can achieve synchronous login of accounts of various applications in the store center.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computers, and in particular, to a method, device, and machine-readable storage medium for logging into an account. Background Art

[0002] To protect user information, the application (APP) provides an identity verification function. Before using the APP, the user needs to log in to the account first. Only after the APP successfully authenticates the user's identity can the user log in to the APP safely.

[0003] For system customizers, many of them have their own internal login systems, which can manage a person's account by synchronizing account data. For customizers of commercial stores, since the store center in the commercial field does not deal with individual accounts but with the merchant account system, they need to support the synchronization of account data and store resource data, and share this data with the internal components of the system customizer to form the software ecosystem of the system customizer. Currently, there is no good solution. Summary of the invention

[0004] The embodiments of the present application provide a method, device and machine-readable storage medium for logging into an account, which realizes the simultaneous login of various APP accounts in a store center.

[0005] On the one hand, the present application embodiment provides a method for logging into an account.

[0006] Obtain a request for logging into the application, the request carrying user information;

[0007] Determining whether the database of the store center stores the user information;

[0008] When it is determined that the user information is stored, the account information corresponding to the user information is obtained from the database, and the account information is returned to the application for login.

[0009] Furthermore, before obtaining the request to log in to the application, the method further includes:

[0010] Receiving a login request initiated by a user to log in to a first application, wherein the login request carries identification information;

[0011] Initiate a request to obtain user information from a backend server, and obtain the user information returned by the backend service, wherein the request carries the identification information;

[0012] Generate account information corresponding to the user information, and store the corresponding relationship between the user information and the account information in a database;

[0013] The user information is sent to other applications in the store center, and the account information is returned to the first application for login.

[0014] The step of determining whether the database of the store center stores the user information specifically includes:

[0015] The application determines whether the user information is stored in the database of the store center by monitoring the content provider of the store center, or,

[0016] The store center queries the database through the content provider whether the user information exists.

[0017] The application integrates the internal component login SDK provided by the store center, and the SDK uses a content parser to monitor and parse the content provider of the store center.

[0018] The SDK monitors the login status of the account of the application, and when it finds that the login status of the account has changed, the notification application listener notifies all applications to perform a monitoring callback.

[0019] Furthermore, when it is determined that the user information is to be stored, the method further includes:

[0020] The signature information of the first application is verified, and if the verification passes, the account information corresponding to the user information is obtained from the database.

[0021] The verifying the signature information of the first application specifically includes:

[0022] Determining whether the signature information of the first application is consistent with the signature information of the store center, or whether the first application is a system application;

[0023] If one of the judgment results is yes, the verification is successful, and if all of the judgment results are no, the verification is unsuccessful.

[0024] On the other hand, an embodiment of the present application provides a device for logging into an account, including an acquisition module and a verification module.

[0025] The login request module is used to obtain a request for logging into an application, wherein the request carries user information;

[0026] The login response module is used to determine whether the database of the store center stores the user information. When it is determined that the user information is stored, the login response module obtains the account information corresponding to the user information from the database and returns the account information to the application for login.

[0027] Wherein, the login response module includes: a judgment unit, an acquisition unit and a response unit;

[0028] The judging unit is used for the application to judge whether the user information is stored in the database of the store center by monitoring the content provider of the store center, or for the store center to query whether the user information exists in the database through the content provider;

[0029] The acquiring unit is configured to acquire the account information corresponding to the user information from the database when the determination result of the determining unit is yes;

[0030] The response unit is used to return the account information obtained by the verification unit to the application for login.

[0031] Furthermore, the device also includes a verification module, which is connected to the login response module and is used to verify the signature information of the application. If the verification passes, the account information corresponding to the user information is obtained from the database.

[0032] On the other hand, an embodiment of the present application provides a machine-readable storage medium having executable instructions stored thereon, which implement the above method when executed by a machine.

[0033] It can be seen that in the above technical solution, by storing the corresponding relationship between the user information and the account information after the user logs in to the APP in the store center, when the user logs in to other APPs in the store center, it is no longer necessary to first request the backend server to obtain the user information, and then directly obtain the account information based on the obtained user information. Instead, it is first confirmed in the store center whether the user information exists. If it exists, it means that the user has logged in to the application of the store center, and then the account information can be provided to the user for login based on the user information of the store center. This solution reduces the interaction between logging in to other APPs and the backend server, and realizes the synchronous login of each APP account in the store center.

[0034] In addition, this solution also provides a synchronous update mechanism for the login status between APPs. If the login status of an APP changes, other APPs can be notified in time to ensure that the login status of each APP is synchronized in real time. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or prior art descriptions. However, those skilled in the art should understand that the drawings described below are only some examples of the present application and do not limit its scope.

[0036] Figure 1 The present invention is a flowchart of a method for logging into an account according to an embodiment.

[0037] Figure 2 The present invention is a flowchart of another method for logging into an account according to an embodiment.

[0038] Figure 3 It is a schematic diagram of the structure of a device for logging into an account according to an embodiment.

[0039] Figure 4 is another structural schematic diagram of a device for logging into an account according to an embodiment. DETAILED DESCRIPTION

[0040] The technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiment of the present application. It should be understood by those skilled in the art that the described embodiment is a part of the embodiment of the present invention, rather than all the embodiments. Based on the embodiment in the present application, those skilled in the art can make any appropriate modifications or variations to obtain all other embodiments.

[0041] The present invention is to achieve synchronous login of accounts in APP, keep one APP logged in, other APPs are logged in, and exit one APP, then all other APPs are exited. ContentProvider is used as the core technology, which is a native technology provided by the Android system, supports cross-process communication, can achieve system-level and signature-level information security, and natively supports notification and monitoring of data changes. It is very good in terms of compatibility and security, but the data structure of the account or store may change with the change of business. These data are stored in the form of a database, and the update and upgrade of the database need to be handled carefully.

[0042] In view of this, the embodiment of the present application provides a solution for logging in to an account. In this technical solution, after a user logs in to an APP in the store center, the store center will store the corresponding relationship between the user information and the account information after the user logs in to the APP. When the user logs in to other APPs in the store center, it is no longer necessary to first request the backend server to obtain the user information, and then directly obtain the account information based on the obtained user information. Instead, it is first confirmed in the store center whether the user information exists. If it exists, it means that the user has logged in to the application of the store center, then the account information can be provided to the user for login based on the user information of the store center. This solution reduces the interaction between logging in to other APPs and the backend server, and realizes the synchronous login of each APP account in the store center.

[0043] In addition, this solution also provides a synchronous update mechanism for the login status between APPs. If the login status of an APP changes, other APPs can be notified in time to ensure that the login status of each APP is synchronized in real time.

[0044] The above technical solution will be described in detail below in conjunction with specific embodiments.

[0045] Figure 1 It is a flowchart of a method for logging into an account according to an embodiment, and the method mainly includes three steps.

[0046] Step 101: Obtain a request for logging into an application, which carries user information;

[0047] The request to log in to the application in this embodiment refers to logging in to the application in the store center. When the store center obtains the user's request to log in to the application, it needs to provide the user with account information.

[0048] Step 102: Determine whether the database of the store center stores user information;

[0049] Among them, the request initiated by the user carries user information. The store center first determines whether it has stored the corresponding relationship between the user information and the account information based on the user information. If so, it can directly provide it to the user. If not, it can send a request to the background server to obtain the account information, and then return the account information to the user for the user to log in.

[0050] Step 103: When it is determined that the user information is stored, the account information corresponding to the user information is obtained from the database, and the account information is returned to the application for login.

[0051] In this step, when the store center determines that the user information is stored, it can directly obtain the account information corresponding to the user information from the database and return the account information to the application for login. It can also obtain the merchant information corresponding to the user information from the database and return the merchant information to the application.

[0052] In actual use, the account information and merchant information can be carried in one message and returned to the user.

[0053] In one embodiment, after a user logs in to an APP in the store center, the store center will store the corresponding relationship between the user information and the account information after the user logs in to the APP. When the user logs in to other APPs in the store center, it is no longer necessary to first request the backend server to obtain the user information, and then directly obtain the account information based on the obtained user information. Instead, the user can directly confirm whether the user information exists in the store center. If it exists, it means that the user has logged in to the application of the store center, and then the account information can be provided to the user for login based on the user information of the store center. This solution reduces the interaction between logging in to other APPs and the backend server, and realizes the synchronous login of each APP account in the store center.

[0054] In order to help those skilled in the art better understand the technical solution of the present application, the following will be described in conjunction with specific examples. However, it should be understood that these examples do not impose any limitation on the protection scope of the present application.

[0055] Figure 2 This is an example of a method for logging into an account according to an embodiment.

[0056] Step 201: When a user logs in to a first application, a login request is initiated, and the login request carries identification information;

[0057] The identification information can be the ID information input by the user, such as mobile phone number, email address, user name, etc., and this application does not impose any restrictions on this.

[0058] Step 202: After receiving the login request, the store center first initiates a request to the backend server to obtain the information, and the request carries the identification information;

[0059] Step 203: After receiving the acquisition request, the backend server generates user information corresponding to the identification information and returns the user information to the store center;

[0060] Step 204: the store center generates account information according to the returned user information, stores the corresponding relationship between the user information and the account information in the database, and returns the account information to the first application for login;

[0061] The above account information includes, for example, avatar, nickname, store name and other information related to the login account.

[0062] Step 205: When the store center receives the login application request initiated by the user, it determines whether the database of the store center stores the user information;

[0063] Among them, in this step, the request for logging in to the application can be the application in the login step 201, or it can be other applications in the login store. When the store center receives the user's login request, it first searches the data for user information. If so, it obtains the account information corresponding to the user information from the database and returns it to the user for login.

[0064] The login request carries user information;

[0065] In actual use, the method of determining whether the store center database stores user information can be any of the following methods:

[0066] Method 1: The application monitors the ContentProvider of the store center to determine whether the user information is stored in the store center's database.

[0067] Method 2: The store center uses ContentProvider to query the database to see if there is user information.

[0068] In this embodiment, the application of the store center integrates the internal component login SDK provided by the store center. The SDK uses the content resolver ContentResover to monitor and parse the ContentProvider of the store center, so that each APP can call the SDK to jump to the store center for access.

[0069] Step 206: When it is determined that the user information is stored, the account information corresponding to the user information is obtained from the database, and the account information is returned to the application for login.

[0070] In actual use, after a user logs in to an application, the store center's database will store the account information corresponding to the user information in the database. By searching the database for the corresponding account information based on the user information, the account information is returned to the user for login.

[0071] The store center can also store the correspondence between user information and merchant information, search for corresponding merchant information based on user information, and return the merchant information to the user for login.

[0072] The store center of this embodiment serves as the center of accounts and merchants, stores the correspondence between user information, account information, and merchant information, and can also find account information and merchant information together based on user information, and return the account information and merchant information to the user for logging in. At this point, the user no longer needs to interact with the backend server, which reduces the interaction process with the backend server, not only improving the login speed, but also by obtaining account information in the store center, the consistency of account information in each APP can be achieved.

[0073] Step 207: When the signature information of the first application is verified, the account information corresponding to the user information is obtained from the database.

[0074] This application provides signature-level verification. When the first application is a system application or the signature information of the first application is the signature information recognized by the store center, it indicates that the first application has been successfully verified, allowing the first application to obtain the account information corresponding to the user information from the database. By using signature-level verification, only when the signature information used by the application is consistent with that of the store center or is a system application, can the data in the ContentProvider be obtained, ensuring the absolute security of the data.

[0075] The verification process of this application is as follows: determine whether the signature information of the first application is consistent with the signature information of the store center, or whether the first application is a system application;

[0076] If one of the judgment results is yes, the verification passes; if all the judgment results are no, the verification fails.

[0077] In addition, after the store center logs in to each APP, the SDK also monitors the account login status of the logged-in application and calls back. When it is found that the account login status of an APP has changed, the notification application listener notifies all applications to perform a monitoring callback.

[0078] For example, when the SDK monitors the account login status of the logged-in application and finds that the user browsed illegal web pages or phishing websites while logging into an APP, the SDK closes the user's login status to the APP and notifies the application listener to notify all applications to perform a monitoring callback. After other applications perform a monitoring callback, the user's login status is also closed for other applications.

[0079] Through this operation, when the login status of an APP changes, other APPs can be notified in time, so that the login status of each APP can be synchronized.

[0080] According to the method adopted in the embodiment of the present invention, after a user logs in to an APP in the store center, the store center will store the corresponding relationship between the user information and the account information after the user logs in to the APP. Therefore, when the user logs in to other APPs in the store center, it is no longer necessary to first request the backend server to obtain the user information, and then directly obtain the account information based on the obtained user information. Instead, it is directly confirmed in the store center whether the user information exists. If it exists, it means that the user has logged in to the application of the store center, and then the account information can be provided to the user for login based on the user information of the store center. This solution reduces the interaction between logging in to other APPs and the backend server, and realizes the synchronous login of each APP account in the store center.

[0081] In addition, this solution also provides a synchronous update mechanism for the login status between APPs. If the login status of an APP changes, other APPs can be notified in time to ensure that the login status of each APP is synchronized in real time.

[0082] In one embodiment, Figure 3 A device for logging into an account is provided, the device comprising: a login request module 301 and a login response module 302,

[0083] A login request module 301 is used to obtain a request for logging into an application, wherein the request carries user information;

[0084] The login response module 302 is used to determine whether the database of the store center stores the user information. If it is determined that the user information is stored, the account information corresponding to the user information is obtained from the database, and the account information is returned to the application for login.

[0085] Among them, Figure 4The device schematic diagram of the login account provided, the login response module 302 of the present application includes: a judgment unit 3021, an acquisition unit 3022 and a response unit 3023;

[0086] The determining unit 3021 is configured to determine whether the user information is stored in the database of the store center by the application by monitoring the content provider of the store center, or to query whether the user information exists in the database through the content provider by the store center;

[0087] The acquisition unit 3022 is configured to acquire the account information corresponding to the user information from the database when the determination result of the determination unit 3021 is yes;

[0088] The responding unit 3023 is used to return the account information obtained by the acquiring unit 3022 to the application for login.

[0089] Furthermore, the device of the present application further comprises a verification module 303, which is connected to the login response module 302 and is used to verify the signature information of the application. If the verification passes, the account information corresponding to the user information is obtained from the database.

[0090] In the device provided by the embodiment of the present invention, after a user logs in to an APP in the store center, the store center will store the corresponding relationship between the user information and the account information of the user after logging in to the APP. Therefore, when the user logs in to other APPs in the store center, it is no longer necessary to first request the backend server to obtain the user information, and then directly obtain the account information based on the obtained user information. Instead, it is directly confirmed in the store center whether the user information exists. If it exists, it means that the user has logged in to the application of the store center, and then the account information can be provided to the user for login based on the user information of the store center. This solution reduces the interaction between logging in to other APPs and the backend server, and realizes the synchronous login of each APP account in the store center.

[0091] In addition, the present application also provides a machine-readable storage medium. The machine-readable storage medium may store executable instructions, which, when executed by a machine, enable the machine to implement the above reference Figure 1 , Figure 2 The specific process of the method embodiment is described.

[0092] For example, machine-readable storage media may include, but are not limited to, random access memory (Random Access Memory, RAM), read-only memory (Read-Only Memory, ROM), electrically erasable programmable read-only memory (EEPROM), static random access memory (Static Random Access Memory, SRAM), hard disk, flash memory, and the like.

[0093] It will be appreciated by those skilled in the art that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0094] In the embodiments of the present application, the disclosed systems, devices and methods can be implemented in other ways. For example, the division of the units is only a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system. In addition, the coupling between the units can be direct coupling or indirect coupling. In addition, the functional units in the embodiments of the present application can be integrated into a processing unit, or can be separate physical existences, etc.

[0095] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a machine-readable storage medium. Therefore, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a machine-readable storage medium, which can include several instructions to enable an electronic device to perform all or part of the technical solution described in the embodiments of the present application. The above-mentioned storage medium may include various media that can store program codes, such as ROM, RAM, removable disk, hard disk, magnetic disk or optical disk.

[0096] The above contents are only specific implementation methods of the present application, and the protection scope of the present application is not limited thereto. Those skilled in the art may make changes or substitutions within the technical scope disclosed in the present application, and these changes or substitutions shall be within the protection scope of the present application.

Claims

1. A method for logging into an account, characterized in that: Applied in a store center, the method comprises: Obtain a request for logging into the application, the request carrying user information; Determining whether the database of the store center stores the user information; When it is determined that the user information is stored, the account information corresponding to the user information is obtained from the database, and the account information is returned to the application for login; Before obtaining the request to log in to the application, the method further includes: receiving a login request initiated by a user to log in to the first application, wherein the login request carries identification information; Initiate a request to obtain user information from a backend server, and obtain the user information returned by the backend service, wherein the request carries the identification information; Generate account information corresponding to the user information, and store the corresponding relationship between the user information and the account information in a database; The user information is sent to other applications in the store center, a synchronous update mechanism for login status between applications is provided, and the account information is returned to the first application for login.

2. The method according to claim 1, characterized in that The determining whether the database of the store center stores the user information specifically includes: The application determines whether the user information is stored in the database of the store center by monitoring the content provider of the store center, or, The store center queries the database through the content provider whether the user information exists.

3. The method according to claim 2, characterized in that The application integrates the internal component login SDK provided by the store center, and the SDK uses a content parser to monitor and parse the content provider of the store center.

4. The method according to claim 3, characterized in that: The SDK monitors the login status of the account of the login application and performs a callback. When it is found that the login status of the account changes, the notification application listener notifies all applications to perform a monitoring callback.

5. The method according to claim 1, characterized in that When it is determined that the user information is to be stored, the method further comprises: The signature information of the first application is verified, and if the verification passes, the account information corresponding to the user information is obtained from the database.

6. The method according to claim 5, characterized in that The verifying the signature information of the first application specifically includes: Determining whether the signature information of the first application is consistent with the signature information of the store center, or whether the first application is a system application; If one of the judgment results is yes, the verification is successful, and if all of the judgment results are no, the verification is unsuccessful.

7. A device for logging into an account, characterized in that: Including login request module and login response module, The login request module is used to obtain a request for logging into an application, wherein the request carries user information; before obtaining the request for logging into an application, a login request for logging into a first application initiated by a user is received, a request for obtaining user information is initiated to a backend server, account information corresponding to the user information is generated, and a corresponding relationship between the user information and the account information is stored in a database; the user information is sent to other applications in the store center, a synchronous update mechanism for the login status between the applications is provided, and the account information is returned to the first application for login; The login response module is used to determine whether the database of the store center stores the user information. When it is determined that the user information is stored, the account information corresponding to the user information is obtained from the database, and the account information is returned to the application for login, so as to implement the method as described in any one of claims 1 to 6.

8. The device according to claim 7, characterized in that The login response module includes: a judgment unit, an acquisition unit and a response unit; The judging unit is used for the application to judge whether the user information is stored in the database of the store center by monitoring the content provider of the store center, or for the store center to query whether the user information exists in the database through the content provider; The acquiring unit is configured to acquire the account information corresponding to the user information from the database when the determination result of the determining unit is yes; The responding unit is used to return the account information obtained by the acquiring unit to the application for login.

9. The device according to claim 7, characterized in that The device also includes a verification module, which is connected to the login response module and is used to verify the signature information of the application. If the verification passes, the account information corresponding to the user information is obtained from the database.

10. A machine-readable storage medium having executable instructions stored thereon, wherein when the executable instructions are executed by a machine, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Login method, server and mobile terminal

    CN104601590A