System login method, device and equipment

By generating and transmitting identification codes across domains from the main system to the target system, the single sign-on problem for systems with different domains is solved, enabling cross-domain access without repeated logins and improving the flexibility of system login.

CN118487850BActive Publication Date: 2025-12-26CHINA CONSTRUCTION BANK +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410724622.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2025-12-26
Estimated Expiration
2044-06-05

AI Technical Summary

Technical Problem

In existing technologies, the main system and subsystems share the same domain name, which prevents users from logging into multiple systems with different domain names through single sign-on, resulting in poor system login flexibility.

Method used

Cross-domain login is achieved by generating an initial identification code in the main system and transmitting it across domains to the target system, which then verifies the code and obtains the user information.

Benefits of technology

This allows users to access subsystems with different domains without having to log in again after logging into the main system, thus improving the flexibility of system login.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118487850B_ABST
    Figure CN118487850B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a system login method, device and equipment, the method is applied to a main system, comprising: receiving a first login request sent by a client, the first login request is used for requesting to log in the main system; generating a first identification code according to the first login request, and sending the first identification code to the client, the first identification code is used for representing that the client successfully logs in the main system; receiving a second login request sent by the client, the second login request includes the first identification code and a target identifier of a target system, the second login request is used for requesting to log in the target system, the target system is a system embedded in the main system, and the domain name of the main system is different from the domain name of the target system; sending the first identification code included in the second login request to the target system through a cross-domain transmission mode; receiving a first verification request sent by the target system, and sending user information corresponding to the client to the target system according to the first verification request. The above method can improve the flexibility of system login.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of computer, and particularly relate to a system login method, device and equipment. BACKGROUND

[0002] A user can log in multiple systems through single sign-on. The multiple systems can include a main system and multiple subsystems. Specifically, after logging in the main system, the user can access multiple subsystems embedded in the main system.

[0003] At present, the domain names of the main system and the multiple subsystems are the same. That is, the main system and the multiple subsystems need to be deployed in the same region. In this way, for multiple systems with different domain names, the user cannot log in through single sign-on, resulting in poor flexibility of system login. SUMMARY

[0004] Embodiments of the present application provide a system login method, device and equipment, which can improve the flexibility of system login.

[0005] In a first aspect, the present application provides a system login method applied to a main system, and the method comprises:

[0006] receiving a first login request sent by a client, the first login request being used to request login of the main system;

[0007] generating a first identification code according to the first login request and sending the first identification code to the client, the first identification code being used to represent that the client successfully logs in the main system;

[0008] receiving a second login request sent by the client, the second login request including the first identification code and a target identifier of a target system, the second login request being used to request login of the target system, the target system being a system embedded in the main system, and the domain name of the main system being different from the domain name of the target system;

[0009] sending the first identification code included in the second login request to the target system through cross-domain transmission;

[0010] receiving a first verification request sent by the target system and sending user information corresponding to the client to the target system according to the first verification request.

[0011] In a possible implementation manner, the first login request includes a target account and a target password corresponding to the client; and generating the first identification code according to the first login request comprises:

[0012] verifying the target account and the target password;

[0013] In a case where the target account and the target password are verified, a first identification code corresponding to the first login request is generated, and the first identification code is a random string of a preset length.

[0014] In a possible implementation, verifying the target account and the target password comprises:

[0015] finding a candidate account in a first database, the candidate account being the same as the target account, the first database comprising a plurality of accounts and a password corresponding to each account;

[0016] determining a candidate password corresponding to the candidate account in the first database;

[0017] If the candidate password is the same as the target password, it is determined that the target account and the target password are verified.

[0018] In a possible implementation, sending, according to the first verification request, user information corresponding to the client to the target system comprises:

[0019] generating a second identification code according to the first verification request, and sending the second identification code to the target system;

[0020] receiving a second verification request sent by the target system, the second verification request comprising the second identification code, the target identifier, and a key corresponding to the target identifier;

[0021] sending, according to the second verification request, the user information corresponding to the client to the target system.

[0022] In a possible implementation, the first verification request comprises the first identification code and the target identifier, and generating a second identification code according to the first verification request and sending the second identification code to the target system comprises:

[0023] finding a target callback address corresponding to the target identifier in a second database, the target callback address being an access address of the target system, the second database comprising identifiers of a plurality of systems and callback addresses corresponding to each identifier;

[0024] generating a second identification code corresponding to the first identification code, and storing the first identification code and the second identification code correspondingly;

[0025] sending, according to the target callback address, the second identification code to the target system.

[0026] In a possible implementation, sending, according to the second verification request, the user information corresponding to the client to the target system comprises:

[0027] verify the key according to the target identifier;

[0028] determine user information corresponding to the client according to the second identifier code in a case where the key verification is passed, the user information including a target account and a target password corresponding to the client;

[0029] send the user information corresponding to the client to the target system;

[0030] wherein, before the determining of the user information corresponding to the client according to the second identifier code, the second identifier code is in a valid state; and after the determining of the user information corresponding to the client according to the second identifier code, the second identifier code is in an invalid state.

[0031] In a possible implementation manner, before receiving the first login request sent by the client, the method further includes:

[0032] generating a key pair corresponding to the target system, the key pair including a target identifier of the target system and a key corresponding to the target identifier;

[0033] determining a target callback address of the target system, and storing the key pair and the target callback address in a second database correspondingly.

[0034] In a second aspect, the present application provides a system login method, applied to a target system, the method including:

[0035] receiving a first identifier code sent by a main system, the first identifier code being an identifier code obtained by the main system from a client, the target system being a system embedded in the main system, a domain name of the main system being different from a domain name of the target system;

[0036] verifying the first identifier code;

[0037] in a case where the first identifier code verification is passed, sending a first verification request to the main system, the first verification request being used for requesting login verification of the client;

[0038] receiving a second identifier code sent by the main system, the second identifier code being used for instructing the target system to obtain user information corresponding to the client;

[0039] sending a second verification request to the main system, the second verification request including the second identifier code, a target identifier of the target system, and a key corresponding to the target identifier, the second verification request being used for obtaining the user information corresponding to the client.

[0040] In a possible implementation manner, the verification on the first identification code comprises:

[0041] obtaining a third identification code from the main system, the third identification code being the first identification code stored in the main system;

[0042] if the first identification code is the same as the third identification code, determining that the first identification code is verified.

[0043] In a third aspect, the present application provides a system login apparatus applied to a main system, the system login apparatus comprising a receiving module, a generating module and a sending module, wherein,

[0044] the receiving module is configured to receive a first login request sent by a client, the first login request being used to request to log in to the main system;

[0045] the generating module is configured to generate a first identification code according to the first login request;

[0046] the sending module is configured to send the first identification code to the client, the first identification code being used to represent that the client successfully logs in to the main system;

[0047] the receiving module is further configured to receive a second login request sent by the client, the second login request comprising the first identification code and a target identification of a target system, the second login request being used to request to log in to the target system, the target system being a system embedded in the main system, and a domain name of the main system being different from a domain name of the target system;

[0048] the sending module is further configured to send the first identification code comprised in the second login request to the target system in a cross-domain transmission manner;

[0049] the receiving module is further configured to receive a first verification request sent by the target system and send user information corresponding to the client to the target system according to the first verification request.

[0050] In a possible implementation manner, the first login request comprises a target account and a target password corresponding to the client, and the generating module is specifically configured to,

[0051] verify the target account and the target password;

[0052] generate a first identification code corresponding to the first login request in a case where the target account and the target password are verified, the first identification code being a random string with a preset length.

[0053] In a possible implementation manner, the generating module is specifically configured to,

[0054] finding a candidate account in a first database, the candidate account being identical to the target account, the first database including a plurality of accounts and a password corresponding to each account;

[0055] determining a candidate password corresponding to the candidate account in the first database;

[0056] if the candidate password is identical to the target password, determining that the target account and the target password are verified.

[0057] In a possible implementation, the sending module is specifically configured to,

[0058] generating a second identification code according to the first verification request, and sending the second identification code to the target system;

[0059] receiving a second verification request sent by the target system, the second verification request including the second identification code, the target identifier, and a key corresponding to the target identifier;

[0060] sending user information corresponding to the client to the target system according to the second verification request.

[0061] In a possible implementation, the first verification request includes the first identification code and the target identifier, and the sending module is specifically configured to,

[0062] finding a target callback address corresponding to the target identifier in a second database, the target callback address being an access address of the target system, the second database including a plurality of identifiers of systems and a callback address corresponding to each identifier;

[0063] generating a second identification code corresponding to the first identification code, and storing the first identification code and the second identification code correspondingly;

[0064] sending the second identification code to the target system according to the target callback address.

[0065] In a possible implementation, the sending module is specifically configured to,

[0066] verifying the key according to the target identifier;

[0067] in a case where the key is verified, determining user information corresponding to the client according to the second identification code, the user information including a target account and a target password corresponding to the client;

[0068] sending the user information corresponding to the client to the target system;

[0069] The second identification code is in a valid state before the user information corresponding to the client is determined according to the second identification code, and the second identification code is in an invalid state after the user information corresponding to the client is determined according to the second identification code.

[0070] In a possible implementation, before receiving the first login request sent by the client, the generation module is further configured to,

[0071] generate a key pair corresponding to the target system, the key pair including a target identifier of the target system and a key corresponding to the target identifier;

[0072] determine a target callback address of the target system, and store the key pair and the target callback address in the second database correspondingly.

[0073] In a third aspect, the present application provides a system login apparatus applied to a target system, the system login apparatus comprising a receiving module, a verification module and a sending module, wherein,

[0074] The receiving module is configured to receive a first identification code sent by a main system, the first identification code being an identification code obtained by the main system from a client, the target system being a system embedded in the main system, and the domain name of the main system being different from the domain name of the target system.

[0075] The verification module is configured to verify the first identification code.

[0076] The sending module is configured to send a first verification request to the main system in the case that the first identification code passes the verification, the first verification request being used to request login verification of the client.

[0077] The receiving module is further configured to receive a second identification code sent by the main system, the second identification code being used to instruct the target system to obtain user information corresponding to the client.

[0078] The sending module is further configured to send a second verification request to the main system, the second verification request including the second identification code, a target identifier of the target system and a key corresponding to the target identifier, and the second verification request being used to obtain the user information corresponding to the client.

[0079] In a possible implementation, the verification module is specifically configured to,

[0080] obtain a third identification code from the main system, the third identification code being the first identification code stored in the main system.

[0081] If the first identification code is the same as the third identification code, it is determined that the first identification code is verified.

[0082] In a fifth aspect, the present application provides a system login device, comprising: a processor, and a memory connected with the processor in communication;

[0083] The memory stores computer-executable instructions.

[0084] The processor executes the computer-executable instructions stored in the memory to implement the method of any one of the first aspect.

[0085] In a sixth aspect, the present application provides a system login device, comprising: a processor, and a memory connected with the processor in communication;

[0086] The memory stores computer-executable instructions.

[0087] The processor executes the computer-executable instructions stored in the memory to implement the method of any one of the second aspect.

[0088] In a seventh aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method of any one of the first aspect.

[0089] In an eighth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method of any one of the second aspect.

[0090] In a ninth aspect, the present application provides a computer program product, comprising a computer program, and the computer program is executed by a computer to implement the method of any one of the first aspect.

[0091] In a tenth aspect, the present application provides a computer program product, comprising a computer program, and the computer program is executed by a computer to implement the method of any one of the first aspect.

[0092] The system login method, device and equipment provided by the embodiments of the present application, the main system can receive the first login request sent by the client, the first login request is used to request to log in the main system; the first identification code can be generated according to the first login request, and the first identification code is sent to the client; the second login request sent by the client can be received, the first identification code and the target identification of the target system are included in the second login request; the first identification code included in the second login request can be sent to the target system through the cross-domain transmission mode; and the first verification request sent by the target system can be received, and the user information corresponding to the client is sent to the target system according to the first verification request. In the above method, after the client successfully logs in the main system, the target system embedded in the main system and different in domain name can be accessed. In the process of accessing the target system by the client, it is not necessary to log in again, and the flexibility of system login is improved. BRIEF DESCRIPTION OF DRAWINGS

[0093] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0094] Figure 1 The application scenario provided by the embodiments of the present application is shown in the schematic diagram.

[0095] Figure 2 The flowchart of the system login method provided by the embodiments of the present application is shown in the schematic diagram.

[0096] Figure 3 The flowchart of another system login method provided by the embodiments of the present application is shown in the schematic diagram.

[0097] Figure 4 The flowchart of another system login method provided by the embodiments of the present application is shown in the schematic diagram.

[0098] Figure 5 The structure schematic diagram of the system login device provided by the embodiments of the present application is shown in the schematic diagram.

[0099] Figure 6 The structure schematic diagram of another system login device provided by the embodiments of the present application is shown in the schematic diagram.

[0100] Figure 7 The hardware structure schematic diagram of the system login equipment provided by the embodiments of the present application is shown in the schematic diagram.

[0101] The specific embodiments of the application have been shown and described in the above drawings and text, and will be described in more detail below. These drawings and text are not intended to limit the scope of the concept of the application in any way, but to illustrate the concept of the application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0102] The exemplary embodiments will be described in detail herein with reference to the attached drawings. The same numbers are used in different drawings to represent the same or similar elements. The embodiments described in the following exemplary embodiments are not meant to represent all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the appended claims.

[0103] It should be noted that, in this document, the terms "comprises", "comprising", or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by an indefinite article "a" does not exclude the existence, of additional identical elements in the process, method, article, or apparatus that includes the element.

[0104] In the technical solution of the present application, the collection, storage, use, processing, transmission, provision and disclosure of information such as financial data and user data comply with relevant laws and regulations and do not violate public order and good customs.

[0105] For ease of understanding, the following will be described in conjunction with Figure 1 The application scenarios involved in the embodiments of the present application are described.

[0106] Figure 1 The application scenarios provided by the embodiments of the present application are illustrated. Please refer to Figure 1 The main system can be embedded with subsystem 1, subsystem 2, and subsystem 3.

[0107] Figure 1 In the scenario shown, after logging in to the main system, the user can access each subsystem embedded in the main system. That is, after logging in to the main system, the user can access the main system 1, the subsystem 2 and the subsystem 3. For example, the user can log in to the main system through an account password.

[0108] At present, the main system and each subsystem can be a system deployed in the same region. That is, the domain name of the main system and each subsystem is the same. For any one of the subsystems, if the domain name of the subsystem is different from that of the main system, the user cannot access the subsystem through the above-mentioned login method of the main system. In this way, the flexibility of system login is poor.

[0109] Therefore, the embodiment of the present application provides a system login method. In the method, the main system can synchronize the login state of the user to the subsystem with a different domain name. If the user successfully logs in the main system, the main system can synchronize the state of the user successfully logging in the main system to the subsystem with a different domain name, so that the user can access the above-mentioned subsystem. Through the above-mentioned method, the user can access multiple systems with different domain names through a single sign-on method, and the flexibility of system login is improved.

[0110] The technical solutions of the present application and how the technical solutions solve the above-mentioned technical problems will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described in detail in some embodiments. The embodiments of the present application will be described below with reference to the drawings.

[0111] Figure 2 A flowchart of a system login method provided by the embodiment of the present application is shown. The execution subject of the method can be a main system or a system login device arranged in the main system. The system login device can be implemented by software or by a combination of software and hardware. Please refer to Figure 2 The method can include the following steps.

[0112] S201, receiving a first login request sent by a client, the first login request being used to request to log in a main system.

[0113] The client can be a terminal device used by a user or a terminal device used by an administrator. For example, the terminal device can be a mobile phone, a desktop computer, a tablet computer, or a smart terminal, etc.

[0114] The main system can be a platform in which at least one subsystem can be embedded.

[0115] The first login request can include a target account and a target password corresponding to the client.

[0116] The target account can be an account registered by the user in the main system. The target password can be a login password corresponding to the target account.

[0117] In this embodiment, the user can input the target account and the target password on the display page of the client, and can click the "login" button displayed on the display page of the client. In response to the "login" button input by the user on the display page of the client, the client can send a first login request to the main system.

[0118] S202, generating a first identification code according to the first login request, and sending the first identification code to the client.

[0119] In this embodiment, the main system can verify the target account and the target password in the first login request. If the main system verifies the target password and the target account successfully, the main system can generate a first identification code and send the first identification code to the client.

[0120] Optionally, the main system can include an authorization (auth) module, and the main system can generate the first identification code through the auth module.

[0121] The first identification code is used to represent that the client successfully logs in the main system. The first identification code can be a string of a preset length.

[0122] The preset length can be set according to actual needs, and this embodiment does not limit it. For example, the first identification code can be a 32-bit random string.

[0123] In this embodiment, after the main system generates the first identification code, the main system can also store the first identification code locally.

[0124] Optionally, the main system can store the first identification code in a local Redis (Remote Dictionary Server) database in the form of a key-value pair. The key can be the first identification code, and the value can be the target account and the target password.

[0125] Correspondingly, after the client receives the first identification code sent by the main system, the client can store the first identification code locally.

[0126] S203, receiving a second login request sent by the client, the second login request including the first identification code and a target identifier of a target system.

[0127] The target system can be any one of the subsystems embedded in the main system. The domain name of the main system is different from the domain name of the target system. That is, the main system and the target system can be deployed in different regions.

[0128] The target system can be embedded in the main system in the form of an iframe.

[0129] A target identifier can be used to uniquely identify a target system. For example, a target identifier can be a unique code for the target system (Identity Document, ID), etc.

[0130] The second login request is used to request login to the target system.

[0131] In this embodiment, after the client successfully logs into the main system, it can send a second login request to the main system to request to log into the target system embedded in the main system.

[0132] In this embodiment, the user can click the target system's icon on the client's display page. In response to the user clicking the target system's icon on the client's display page, the client can send a second login request to the main system.

[0133] In this embodiment, the page displayed on the main system can differ depending on the client's role. The client's role can be either a user or an administrator.

[0134] Users can be those who are users of the target system; administrators can be those who are administrators of the target system.

[0135] Specifically, the main system can display different function directories for different roles, allowing clients to access the corresponding target system and its corresponding function pages as needed. This achieves the goal of isolating user functions from administrator functions, enabling fine-grained access control over the target system's functions.

[0136] It should be noted that during the process of embedding the target system into the main system, technicians can set the roles of the clients corresponding to the target system and configure different functions for different clients. This ensures that different clients can only access the functions they are authorized to, thus enhancing system security.

[0137] S204. Send the first identification code included in the second login request to the target system via cross-domain transmission.

[0138] Cross-domain data transfer can be achieved through methods such as message posting (postMessage). It's important to note that cross-domain data transfer allows for the exchange of messages between systems deployed in different regions.

[0139] In this embodiment, since the main system and the target system are deployed in different regions, the main system can send the first identification code included in the second login request to the target system through cross-domain transmission, so that the target system can receive the first identification code included in the second login request and verify the first identification code included in the second login request.

[0140] S205, receiving the first verification request sent by the target system, and sending user information corresponding to the client to the target system according to the first verification request.

[0141] The user information corresponding to the client can be a target account and a target password corresponding to the client.

[0142] The first verification request can be used to request login verification of the client. In this embodiment, the target system can request to obtain the target account and the target password corresponding to the client through the first verification request.

[0143] In this embodiment, after the target system receives the first identification code included in the second login request sent by the main system, the target system can verify the first identification code included in the second login request. If the first identification code included in the second login request is verified, the target system can send the first verification request to the main system.

[0144] It should be noted that the specific method of verifying the first identification code included in the second login request by the target system can be referred to in the Figure 4 embodiment, which will not be described here.

[0145] The system login method provided in this embodiment can receive the first login request sent by the client, the first login request being used to request login of the main system; can generate a first identification code according to the first login request and send the first identification code to the client; can receive the second login request sent by the client, the second login request including the first identification code and a target identifier of the target system; can send the first identification code included in the second login request to the target system through cross-domain transmission; and can receive the first verification request sent by the target system and send user information corresponding to the client to the target system according to the first verification request. In the above method, after the client successfully logs in the main system, the client can access the target system embedded in the main system and having a different domain name. In the process of accessing the target system, the client does not need to log in again, thereby improving the flexibility of system login.

[0146] Based on the Figure 2 embodiment, the system login method provided in the present application will be further described in combination with Figure 3 .

[0147] Figure 3 Another flowchart of a system login method provided in an embodiment of the present application. The execution subject of the method can be a main system or a system login device arranged in the main system. The system login device can be implemented by software or by a combination of software and hardware. Please refer to Figure 3 , the method can include:

[0148] S301 receives a first login request sent by a client, the first login request being used to request to log in a main system.

[0149] It should be noted that the specific implementation of S301 can refer to S201, which will not be described here.

[0150] S302 verifies a target account and a target password included in the first login request.

[0151] In this embodiment, the first login request can include a target account and a target password corresponding to the client. When verifying the target account and the target password, the main system can find a candidate account in the first database, the candidate account being the same as the target account, the first database including a plurality of accounts and a password corresponding to each account; determine a candidate password corresponding to the candidate account in the first database; and if the candidate password is the same as the target password, it is determined that the target account and the target password are verified.

[0152] The first database may, for example, be a Redis database local to the main system.

[0153] Specifically, the main system can find a candidate account that is the same as the target account in the first database, and can find a candidate password corresponding to the candidate account in the first database. If the candidate password is the same as the target, it can be determined that the target account and the target password are verified.

[0154] For example, assume that the target account is account 2 and the target password is password 2, and the plurality of accounts and the password corresponding to each account included in the first database are as shown in Table 1:

[0155] Table 1

[0156] Account Password Account 1 Password 1 Account 2 Password 2 …… …… Account n Password n

[0157] As shown in Table 1, the password corresponding to account 1 in the first database can be password 1, the password corresponding to account 2 can be password 2, and the password corresponding to account n can be password n. The main system can determine that the candidate account in the first database is account 2, and can determine that the candidate password corresponding to the candidate account is password 2. Since the candidate password is the same as the target password, it can be determined that the target account and the target password are verified.

[0158] S303, in the case where the target account and the target password are verified, a first identification code corresponding to the first login request is generated, and the first identification code is sent to the client.

[0159] In this embodiment, when the target account and the target password are verified, the main system can generate a random string of a preset length, can take the generated random string of the preset length as the first identification code, and can send the first identification code to the client. In addition, the main system can also store the first identification code in the first database in the form of a key-value pair. The key can be the first identification code, and the value can be the target account and the target password.

[0160] S304, receiving the second login request sent by the client, the second login request including the first identification code and the target identification of the target system.

[0161] S305, sending the first identification code included in the second login request to the target system in a cross-domain transmission manner.

[0162] S306, receiving the first verification request sent by the target system.

[0163] It should be noted that the specific implementation of S304-S306 can refer to S203-S205, which will not be repeated here.

[0164] S307, generating the second identification code according to the first verification request, and sending the second identification code to the target system.

[0165] The first verification request can include the first identification code and the target identification.

[0166] In this embodiment, the main system can find the target callback address corresponding to the target identification in the second database, the target callback address is the access address of the target system, the second database includes the identification of multiple systems and the callback address corresponding to each identification; generate the second identification code corresponding to the first identification code, and store the first identification code and the second identification code correspondingly; send the second identification code to the target system according to the target callback address.

[0167] The second identification code can be a random string different from the first identification code.

[0168] In this embodiment, after the main system generates the second identification code, it can also store the second identification code in the first database correspondingly.

[0169] Specifically, the main system can generate the second identification code corresponding to the first identification code, can find the target callback address corresponding to the target identification according to the target identification, and can send the second identification code to the target system according to the target callback address.

[0170] The second database and the first database can be the same database; or the second database and the first database can also be different databases. This embodiment does not limit this.

[0171] S308, receiving a second verification request sent by the target system, the second verification request comprising a second identification code, a target identifier, and a key corresponding to the target identifier.

[0172] It should be noted that before the main system receives the first login request sent by the client, the main system can also generate a key pair corresponding to the target system, the key pair comprising a target identifier of the target system and a key corresponding to the target identifier; determine a target callback address of the target system, and store the key pair and the target callback address in the second database.

[0173] Specifically, before the target system is embedded in the main system, the main system can generate a target identifier corresponding to the target system and a key corresponding to the target identifier, can send the target identifier and the key corresponding to the target identifier to the target system, and can store the target identifier and the key corresponding to the target identifier. The target identifier and the key corresponding to the target identifier can be referred to as a key pair.

[0174] In this embodiment, the second verification request can include the second identification code, the target identifier, and the key corresponding to the target identifier, so as to facilitate the main system to verify the key corresponding to the target identifier.

[0175] S309, according to the second verification request, sending user information corresponding to the client to the target system.

[0176] In this embodiment, the main system can verify the key included in the second verification request, and can send the user information corresponding to the client to the target system when the key verification is passed.

[0177] Specifically, the main system can verify the key according to the target identifier; in the case that the key verification is passed, determine the user information corresponding to the client according to the second identification code, the user information comprising a target account and a target password corresponding to the client; send the user information corresponding to the client to the target system; wherein, before determining the user information corresponding to the client according to the second identification code, the state of the second identification code is valid; after determining the user information corresponding to the client according to the second identification code, the state of the second identification code is invalid.

[0178] When verifying the key, the main system can query the locally stored key corresponding to the target identifier according to the target identifier. If the locally stored key corresponding to the target identifier is the same as the key included in the second verification request, the main system can determine that the key verification is passed.

[0179] After the key verification is passed, the main system can query the user information corresponding to the second identification code, can determine that the user information corresponding to the second identification code is the user information corresponding to the client, and can send the user information corresponding to the second identification code to the target system.

[0180] It should be noted that in this embodiment, according to the second identification code, the user information corresponding to the second identification code is queried, and the state of the second identification code can be converted from the valid state to the invalid state. In this way, the security of obtaining user information can be higher.

[0181] The system login method provided in this embodiment can receive a first login request sent by a client, the first login request being used to request login to a main system; can verify a target account and a target password included in the first login request; can generate a first identification code corresponding to the first login request and send the first identification code to the client in a case where the target account and the target password are verified; can receive a second login request sent by the client, the second login request including the first identification code and a target identifier of a target system; can send the first identification code included in the second login request to the target system in a cross-domain transmission manner; can receive a first verification request sent by the target system; can generate a second identification code according to the first verification request and send the second identification code to the target system; can receive a second verification request sent by the target system, the second verification request including the second identification code, the target identifier, and a key corresponding to the target identifier; and can send user information corresponding to the client to the target system according to the second verification request. In the above method, after the client successfully logs in to the main system, the client can access the target system embedded in the main system and having a different domain name. In the process of accessing the target system, the client does not need to log in again, and the flexibility of system login is improved.

[0182] On the basis of any of the above embodiments, the following will be combined Figure 4 The system login method provided in the embodiments of the present application is further described.

[0183] Figure 4 A flowchart of another system login method provided in the embodiments of the present application is shown. The execution subject of the method can be a target system or a system login device arranged in the target system. The system login device can be implemented by software or by a combination of software and hardware. Please refer to Figure 4 The method can include the following steps.

[0184] S401, receiving a first identification code sent by a main system, the first identification code being an identification code obtained by the main system from a client.

[0185] The target system is a system embedded in the main system, and the domain name of the main system is different from the domain name of the target system.

[0186] In this embodiment, when the client requests to access the target system, the main system can send the first identification code obtained from the client to the target system.

[0187] S402, verifying the first identification code.

[0188] In this embodiment, after receiving the first identification code sent by the main system, the target system can verify the first identification code. When verifying the first identification code, the target system can obtain a third identification code from the main system, the third identification code being the first identification code stored in the main system; if the first identification code is the same as the third identification code, it is determined that the first identification code is verified.

[0189] Specifically, the target system can obtain the first identification code stored in the main system, and can determine whether the first identification code stored in the main system is the same as the first identification code obtained by the main system from the client. If the first identification code stored in the main system is the same as the first identification code obtained by the main system from the client, the target system can determine that the first identification code is verified. For example, the target system can also obtain the first identification code stored in the main system by calling the API of the main system.

[0190] S403, in the case where the first identification code is verified, a first verification request is sent to the main system.

[0191] The first verification request is used to request login verification of the client. The first verification request can include the first identification code and the target identifier, so that the main system determines the target system according to the target identifier.

[0192] In this embodiment, if the first identification code is verified, the target system can request login verification of the client.

[0193] S404, receiving a second identification code sent by the main system.

[0194] The second identification code is used to instruct the target system to obtain user information corresponding to the client.

[0195] In this embodiment, after receiving the first verification request sent by the target system, the main system can generate a second identification code, and can send the second identification code to the target system, so that the target system obtains user information corresponding to the client through the second identification code.

[0196] S405, sending a second verification request to the main system, the second verification request including the second identification code, the target identifier of the target system, and the key corresponding to the target identifier.

[0197] The second verification request is used to obtain user information corresponding to the client.

[0198] In this embodiment, after receiving the second identification code, the target system can send a second verification request to the main system to request to obtain user information corresponding to the client.

[0199] It should be noted that after the target system obtains the user information corresponding to the client, the client can be logged in according to the user information, so that the client can access the target system.

[0200] It should be noted that if the client logs in the main system through other account and password, the main system can generate a first identification code corresponding to the other account and password. The first identification code corresponding to the other account and password is different from the first identification code corresponding to the target account and target password. If the target system perceives that the first identification code stored in the main system changes, the first verification request can be re-sent to the main system to ensure that the content displayed on the display page matches the user account.

[0201] The system login method provided in the embodiment can receive the first identification code sent by the main system, the first identification code being an identification code obtained by the main system from the client; the first identification code can be verified; in the case that the first identification code is verified, the first verification request can be sent to the main system; the second identification code sent by the main system can be received, and the second verification request including the second identification code, the target identifier of the target system, and the key corresponding to the target identifier can be sent to the main system. In the above method, after the client successfully logs in the main system, the target system can automatically log in the client so that the client can access the target system. In the process of accessing the target system, the client does not need to log in again, thereby improving the flexibility of system login.

[0202] Figure 5 A structural schematic diagram of a system login device provided in the embodiment of the present application is shown. The system login device 10 is applied to a main system. Please refer to Figure 5 The system login device 10 includes a receiving module 11, a generating module 12, and a sending module 13, wherein,

[0203] The receiving module 11 is configured to receive a first login request sent by a client, the first login request being used to request to log in the main system;

[0204] The generating module 12 is configured to generate a first identification code according to the first login request;

[0205] The sending module 13 is configured to send the first identification code to the client, the first identification code being used to represent that the client successfully logs in the main system;

[0206] The receiving module 11 is further configured to receive a second login request sent by the client, the second login request including the first identification code and a target identifier of a target system, the second login request being used to request to log in the target system, the target system being a system embedded in the main system, the domain name of the main system being different from the domain name of the target system;

[0207] The sending module 13 is further configured to send the first identification code included in the second login request to the target system in a cross-domain transmission manner.

[0208] The receiving module 11 is further configured to receive a first verification request sent by the target system, and send user information corresponding to the client to the target system according to the first verification request.

[0209] The system login apparatus provided in the embodiment can be used to execute the system login method executed by the main system in the method embodiment, and has similar implementation principles and technical effects, which will not be described herein.

[0210] In a possible implementation, the first login request includes a target account number and a target password corresponding to the client; the generating module 12 is specifically configured to,

[0211] verify the target account number and the target password;

[0212] generate a first identification code corresponding to the first login request in a case where the target account number and the target password are verified, the first identification code being a random string with a preset length.

[0213] In a possible implementation, the generating module 12 is specifically configured to,

[0214] find a candidate account number in a first database, the candidate account number being the same as the target account number, the first database including a plurality of account numbers and a password corresponding to each account number;

[0215] determine a candidate password corresponding to the candidate account number in the first database;

[0216] if the candidate password is the same as the target password, it is determined that the target account number and the target password are verified.

[0217] In a possible implementation, the sending module 13 is specifically configured to,

[0218] generate a second identification code according to a first verification request, and send the second identification code to the target system;

[0219] receive a second verification request sent by the target system, the second verification request including the second identification code, the target identifier, and a key corresponding to the target identifier;

[0220] send user information corresponding to the client to the target system according to the second verification request.

[0221] In a possible implementation, the first verification request includes the first identification code and the target identifier; and the sending module 13 is specifically configured to,

[0222] find a target callback address corresponding to the target identifier in a second database, the target callback address being an access address of the target system, the second database including identifiers of a plurality of systems and callback addresses corresponding to the identifiers;

[0223] generate a second identification code corresponding to the first identification code, and store the first identification code and the second identification code correspondingly;

[0224] send the second identification code to the target system according to the target callback address.

[0225] In a possible implementation, the sending module 13 is specifically configured to,

[0226] verify the key according to the target identifier;

[0227] determine user information corresponding to the client according to the second identification code in a case where the key is verified successfully, the user information including a target account and a target password corresponding to the client;

[0228] send the user information corresponding to the client to the target system;

[0229] wherein, before the second identification code is used to determine the user information corresponding to the client, the second identification code is in a valid state; and after the second identification code is used to determine the user information corresponding to the client, the second identification code is in an invalid state.

[0230] In a possible implementation, before receiving the first login request sent by the client, the generating module 12 is further configured to,

[0231] generate a key pair corresponding to the target system, the key pair including a target identifier of the target system and a key corresponding to the target identifier;

[0232] determine a target callback address of the target system, and store the key pair and the target callback address correspondingly in a second database.

[0233] The system login apparatus provided in this embodiment can be used to execute the system login method executed by the main system in the method embodiments, and has similar implementation principles and technical effects, which will not be described here.

[0234] Figure 6 Another structural schematic diagram of a system login apparatus is provided in this embodiment. The system login apparatus 20 is applied to a target system. Please refer toFigure 6 The system login apparatus 20 comprises a receiving module 21, a verifying module 22 and a sending module 23, wherein,

[0235] The receiving module 21 is configured to receive a first identification code sent by a main system, the first identification code being an identification code obtained by the main system from a client, the target system being a system embedded in the main system, the domain name of the main system being different from the domain name of the target system;

[0236] The verifying module 22 is configured to verify the first identification code;

[0237] The sending module 23 is configured to send a first verification request to the main system in a case where the first identification code is verified, the first verification request being configured to request login verification of the client;

[0238] The receiving module 21 is further configured to receive a second identification code sent by the main system, the second identification code being configured to instruct the target system to obtain user information corresponding to the client;

[0239] The sending module 23 is further configured to send a second verification request to the main system, the second verification request comprising the second identification code, a target identification of the target system and a key corresponding to the target identification, the second verification request being configured to obtain the user information corresponding to the client.

[0240] In a possible implementation, the verifying module 22 is specifically configured to,

[0241] obtain a third identification code from the main system, the third identification code being the first identification code stored in the main system;

[0242] If the first identification code is the same as the third identification code, it is determined that the first identification code is verified.

[0243] The system login apparatus provided in the embodiment can be used to execute the system login method executed by the target system in the method embodiment, and has similar implementation principles and technical effects, which will not be described herein.

[0244] Figure 7 A hardware structure diagram of a system login device provided in the embodiment of the present application is shown in FIG. 3. Figure 7 The system login device 30 can comprise a processor 31 and a memory 32, wherein the processor 31 and the memory 32 can communicate; for example, the processor 31 and the memory 32 communicate through a communication bus 33, the memory 32 is configured to store computer execution instructions, and the processor 31 is configured to invoke the computer execution instructions in the memory to execute the system login method shown in any method embodiment.

[0245] Optionally, the system login device 30 can further include a communication interface, which can include a transmitter and / or a receiver.

[0246] Optionally, the processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), or the like. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor or the like. The steps of the method disclosed in the present application can be directly embodied as hardware processor execution, or executed by a combination of hardware and software modules in the processor.

[0247] The present application provides a computer readable storage medium, and the computer readable storage medium stores computer execution instructions; the computer execution instructions are used to implement the system login method according to any of the above embodiments.

[0248] The present application provides a computer program product, and the computer program product includes a computer program, when the computer program is executed, the computer program causes a computer to execute the system login method.

[0249] All or part of the steps of the above method embodiments can be completed by program instruction related hardware. The foregoing program can be stored in a readable memory. When the program is executed, the steps of the above method embodiments are executed; and the foregoing memory (storage medium) includes: read-only memory (English: read-only memory, abbreviation: ROM), RAM, flash memory, hard disk, solid state disk, magnetic tape (English: magnetic tape), floppy disk (English: floppy disk), optical disc (English: optical disc) and any combination thereof.

[0250] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams according to the method, device (system) and computer program product of the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor or other programmable terminal equipment to produce a machine, so that the instructions executed by the computer or other programmable terminal equipment produce a machine for implementing the steps in the flowcharts and / or block diagrams. Figure 1one or more processes and / or blocks Figure 1 an apparatus for performing the functions specified in the flowchart or multiple flows and / or blocks.

[0251] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the flowchart or multiple flows and / or blocks. Figure 1 one or more processes and / or blocks Figure 1 an apparatus for performing the functions specified in the flowchart or multiple flows and / or blocks.

[0252] These computer program instructions can also be loaded onto a computer or other programmable apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the flowchart or multiple flows and / or blocks. Figure 1 one or more processes and / or blocks Figure 1 an apparatus for performing the functions specified in the flowchart or multiple flows and / or blocks.

[0253] Obviously, persons having ordinary skill in the art can make various modifications and variations to the embodiments of the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

[0254] In the present application, the term "comprising" and its variants are intended to mean non-limiting inclusion; the term "or" and its variants are intended to mean "and / or"; the terms "first", "second", and the like are used to distinguish similar objects, not necessarily in a particular order or sequence. In the present application, "multiple" means two or more. "And / or", describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist together, and B exists alone. The character " / " generally represents an "or" relationship between the front and rear associated objects.

[0255] Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the present application cover any and all variations of the application that come within the scope of the present application along with its general principles and features.

Claims

1. A system login method characterized by, The method is applied to a main system, and the method comprises: receiving a first login request sent by a client, the first login request being used to request to log in to the main system; generating a first identification code according to the first login request and sending the first identification code to the client, the first identification code being used to represent that the client successfully logs in to the main system; receiving a second login request sent by the client, the second login request comprising the first identification code and a target identification of a target system, the second login request being used to request to log in to the target system, the target system being a system embedded in the main system, and a domain name of the main system being different from a domain name of the target system; sending the first identification code comprised in the second login request to the target system in a cross-domain transmission mode; receiving a first verification request sent by the target system and sending user information corresponding to the client to the target system according to the first verification request.

2. The method of claim 1, wherein, The first login request comprises a target account number and a target password corresponding to the client; the first identification code is generated according to the first login request, comprising: verifying the target account number and the target password; generating the first identification code corresponding to the first login request in a case where the target account number and the target password are verified, the first identification code being a random string of a preset length.

3. The method of claim 2, wherein, The target account number and the target password are verified, comprising: finding a candidate account number in a first database, the candidate account number being the same as the target account number, the first database comprising a plurality of account numbers and a password corresponding to each account number; determining a candidate password corresponding to the candidate account number in the first database; if the candidate password is the same as the target password, it is determined that the target account number and the target password are verified.

4. The method according to any one of claims 1 to 3, characterized in that, The user information corresponding to the client is sent to the target system according to the first verification request, comprising: generating a second identification code according to the first verification request and sending the second identification code to the target system; receiving a second verification request sent by the target system, the second verification request comprising the second identification code, the target identification and a key corresponding to the target identification; sending the user information corresponding to the client to the target system according to the second verification request.

5. The method of claim 4, wherein, The first verification request comprises the first identification code and the target identification; the second identification code is generated according to the first verification request and sent to the target system, comprising: finding a target callback address corresponding to the target identification in a second database, the target callback address being an access address of the target system, the second database comprising identifications of a plurality of systems and callback addresses corresponding to each identification; generating the second identification code corresponding to the first identification code and correspondingly storing the first identification code and the second identification code; sending the second identification code to the target system according to the target callback address.

6. The method according to claim 4 or 5, characterized in that, The user information corresponding to the client is sent to the target system according to the second verification request, comprising: verifying the key according to the target identification; In a case where the key verification passes, user information corresponding to the client is determined according to the second identification code, the user information including a target account number and a target password corresponding to the client; The target system is sent the user information corresponding to the client; Before the user information corresponding to the client is determined according to the second identification code, the second identification code is in a valid state; after the user information corresponding to the client is determined according to the second identification code, the second identification code is in an invalid state.

7. The method according to any one of claims 1 to 6, characterized in that, Before the first login request sent by the client is received, the method further includes: A key pair corresponding to the target system is generated, the key pair including a target identifier of the target system and a key corresponding to the target identifier; A target callback address of the target system is determined, and the key pair and the target callback address are stored in a second database correspondingly.

8. A system login method characterized by comprising: Applied to a target system, the method includes: A first identification code sent by a main system is received, the first identification code being an identification code obtained by the main system from a client, the target system being a system embedded in the main system, a domain name of the main system being different from a domain name of the target system; The first identification code is verified; In a case where the first identification code verification passes, a first verification request is sent to the main system, the first verification request being used to request login verification of the client; A second identification code sent by the main system is received, the second identification code being used to instruct the target system to obtain user information corresponding to the client; A second verification request is sent to the main system, the second verification request including the second identification code, a target identifier of the target system, and a key corresponding to the target identifier, the second verification request being used to obtain the user information corresponding to the client.

9. The method of claim 8, wherein, The first identification code is verified, including: A third identification code is obtained from the main system, the third identification code being the first identification code stored in the main system; If the first identification code is the same as the third identification code, it is determined that the first identification code verification passes.

10. A system login apparatus characterized by comprising: Applied to a main system, the system login device includes a receiving module, a generating module, and a sending module, wherein, The receiving module is used to receive a first login request sent by a client, the first login request being used to request login of the main system; The generating module is used to generate a first identification code according to the first login request; The sending module is used to send the first identification code to the client, the first identification code being used to represent that the client successfully logs in the main system; The receiving module is further used to receive a second login request sent by the client, the second login request including the first identification code and a target identifier of a target system, the second login request being used to request login of the target system, the target system being a system embedded in the main system, a domain name of the main system being different from a domain name of the target system; The sending module is further used to send the first identification code included in the second login request to the target system in a cross-domain transmission manner; The receiving module is further configured to receive a first verification request sent by the target system. The sending module is further configured to send, to the target system, user information corresponding to the client according to the first verification request.

11. A system login apparatus characterized by comprising: The system login apparatus is applied to a target system, and the apparatus includes a receiving module, a verification module, and a sending module. The receiving module is configured to receive a first identification code sent by a main system, the first identification code being an identification code obtained by the main system from a client, the target system being a system embedded in the main system, and the domain name of the main system being different from the domain name of the target system. The verification module is configured to verify the first identification code. The sending module is configured to send, to the main system, a first verification request in a case where the first identification code is verified, the first verification request being used to request login verification of the client. The receiving module is further configured to receive a second identification code sent by the main system, the second identification code being used to instruct the target system to obtain user information corresponding to the client. The sending module is further configured to send, to the main system, a second verification request, the second verification request including the second identification code, a target identifier of the target system, and a key corresponding to the target identifier, and the second verification request being used to obtain the user information corresponding to the client.

12. A system login apparatus, comprising: comprising: a processor, and a memory connected to the processor in communication; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method of any one of claims 1 to 7, or to implement the method of any one of claims 8 to 9.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by the processor to implement the method of any one of claims 1 to 7, or to implement the method of any one of claims 8 to 9.

14. A computer program product, characterised in that, The computer program is executed by the processor to implement the method of any one of claims 1 to 7, or to implement the method of any one of claims 8 to 9.

Citation Information

Patent Citations

  • Single sign-on method and device for heterogeneous user system

    CN106331042A

  • Cross-domain communication method and cross-domain communication system

    CN108737331A