Business communication method, device and system for realizing disaster recovery
By transmitting signed business credentials and authentication credentials between service nodes and terminal devices, the problem of business switching when service nodes fail in the SaaS model is solved, achieving smooth switching and high security of user-side services and improving user experience.
Patent Information
- Application Number
- CN202210718976.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-23
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2042-06-23
AI Technical Summary
In the SaaS model, how can user-side services smoothly switch to another service node when one service node fails, avoiding business unavailability caused by a single node failure, and without being limited by user login methods and database performance?
By transmitting credential information containing business credentials and authentication credentials between service nodes and terminal devices, and using signature algorithms to ensure the validity and security of credentials, a smooth switchover of user-side services between primary and backup nodes is achieved.
It enables a smooth switch between primary and backup nodes for user-side services, without the user noticing, thus improving the user experience and reducing application limitations and security risks.
Smart Images

Figure CN117318969B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of communication technology, in particular to a service communication method, device and system for realizing disaster recovery. BACKGROUND
[0002] Software as a service (SaaS) is one of the main modes of cloud computing. In the SaaS mode, a vendor provides software through the Internet, and a user can order the software from the vendor, and then access a service node through a web page or an application program interface (API) of the vendor. The service node is used to provide software services. In the SaaS mode, users of the same type with common needs are referred to as tenants, and the users finally rent the software in the unit of tenants.
[0003] A process in which a user side accesses the service node through a terminal device includes that when the user logs in on the terminal device, the terminal device obtains identity authentication information of the user based on the login operation, and then sends a login request containing the identity authentication information to the service node. After the service node verifies the identity authentication information, the service node sends a service credential to the terminal device. The terminal device accesses the service node based on the service credential. The service node verifies whether the service credential from the terminal device is authentic and valid. If the service credential is authentic and valid, the service node provides software services with corresponding permissions to the terminal device.
[0004] Currently, in order to avoid that a single node failure causes a service to be unavailable, a service node is usually deployed for disaster recovery. When one service node fails, another service node takes over the service, so as to ensure normal operation of online services. How to smoothly switch user side services to another service node when one service node fails is a problem to be solved at present. SUMMARY
[0005] The present application provides a service communication method, device and system for realizing disaster recovery, which can smoothly switch user side services to another service node when one service node fails.
[0006] In a first aspect, a method for implementing a business communication method for disaster recovery is provided. The method is applied to a disaster recovery system. The disaster recovery system includes a first service node and a second service node. The second service node is an application level backup node of the first service node. The method includes: receiving, by the first service node, a login request from a terminal device, the login request including identity authentication information; if the identity authentication information is verified by the first service node, generating, by the first service node, first credential information. The first credential information includes a first business credential and a first authentication credential. The first business credential is used for the terminal device to access the service node. The first authentication credential includes first authentication information and a signature of the first authentication information generated by the first service node using a first key. The first authentication information includes user identity information matching the identity authentication information. The first service node sends a login response corresponding to the login request to the terminal device, the login response including the first credential information.
[0007] In the present application, when a user logs in on a terminal device, the first service node provides the terminal device with a business credential and an authentication credential. The authentication credential can be used by the terminal device to authenticate to the second service node when the first service node has a communication failure, so as to obtain a business credential provided by the second service node. In this way, when the first service node has a communication failure, the terminal device can automatically switch the business to the second service node, realizing smooth switching of user-side business between the primary and backup nodes, and the entire switching process is transparent to the user, which can ensure user experience. In addition, the present application scheme is not limited by the user login method and the database performance, and has low application limitations.
[0008] Optionally, the first authentication information further includes one or more of a signature algorithm, an indication of a validity period of the first authentication credential, or a first random number.
[0009] Optionally, the second service node receives an authentication request from the terminal device, the authentication request including the first authentication credential. The second service node verifies the signature in the first authentication credential using a second key. If the signature in the first authentication credential is verified by the second service node, the second service node generates second credential information. The second credential information includes a second business credential and a second authentication credential. The second business credential is used for the terminal device to access the service node. The second authentication credential includes second authentication information and a signature of the second authentication information generated by the second service node using the first key. The second authentication information includes the user identity information in the first authentication information. The second service node sends an authentication response corresponding to the authentication request to the terminal device, the authentication response including the second credential information.
[0010] In the present application, after the second service node receives the authentication request from the terminal device, the terminal device can be authenticated based on the authentication credential in the authentication request, and new service credentials are provided to the terminal device that passes the authentication, so as to ensure that the service on the terminal device can continue to run and improve user experience.
[0011] Optionally, the second authentication information further includes one or more of a signature algorithm, an indication of a validity period of the second authentication credential, or a second random number.
[0012] Optionally, the first key and the second key are shared keys. Alternatively, the first key is a private key and the second key is a public key.
[0013] In a second aspect, a service communication method for implementing disaster recovery is provided. The method is applied to a disaster recovery system. The disaster recovery system includes a first service node and a second service node. The second service node is an application-level backup node of the first service node. The method includes: a terminal device sends a login request to the first service node, the login request including identity authentication information. The terminal device receives a login response corresponding to the login request from the first service node. The login response includes first credential information. The first credential information includes a first service credential and a first authentication credential. The first service credential is used for the terminal device to access the service node. The first authentication credential includes first authentication information and a signature of the first authentication information generated by the first service node using a first key. The first authentication information includes user identity information that matches the identity authentication information.
[0014] In the present application, when a user logs in on a terminal device, the terminal device receives service credentials and authentication credentials provided by the first service node. The authentication credentials can be used by the terminal device to authenticate to the second service node when the first service node has a communication failure, so as to obtain service credentials provided by the second service node. In this way, when the first service node has a communication failure, the terminal device can automatically switch the service to the second service node, realizing smooth switching of user-side services between the primary and backup nodes, and the entire switching process is user-agnostic, which can ensure user experience. In addition, the present application scheme is not limited by the user login method and the database performance, and has low application limitations.
[0015] Optionally, when the first service node has a communication failure, the terminal device sends an authentication request to the second service node, the authentication request including the first authentication credential. The terminal device receives an authentication response corresponding to the authentication request from the second service node, the authentication response including second credential information. The second credential information includes a second service credential and a second authentication credential. The second service credential is used for the terminal device to access the service node. The second authentication credential includes second authentication information and a signature of the second authentication information generated by the second service node using the first key. The second authentication information includes user identity information.
[0016] In the present application, the terminal device only needs to store the authentication credential provided by the service node. When the service node fails in communication, the terminal device can automatically authenticate to another service node based on the authentication credential to maintain the operation of the service, which is transparent to the user and can improve the user experience. In addition, the terminal device does not need to store identity authentication information such as user account and password, so the security of the present application is higher.
[0017] Optionally, when the first service node and the second service node both fail in communication, the terminal device sends an access request to the service node, and the access request includes the latest authentication credential received by the terminal device.
[0018] In the present application, when multiple service nodes in the disaster recovery system fail in communication at the same time, the service node can take over the authentication service, realize the local escape capability of the service node, maintain the continuous operation of the online service, improve the reliability of the service communication, and further improve the user experience.
[0019] Optionally, the access request further includes user permission information corresponding to the user identity information.
[0020] In a third aspect, a first service node in a disaster recovery system is provided, and the disaster recovery system further includes a second service node, which is an application-level backup node of the first service node. The first service node includes: a receiving module configured to receive a login request from a terminal device, the login request including identity authentication information; a generating module configured to generate first credential information if the identity authentication information is verified, the first credential information including a first service credential and a first authentication credential, the first service credential being used for the terminal device to access the service node, the first authentication credential including first authentication information and a signature of the first authentication information generated by the first service node using a first key, the first authentication information including user identity information matched with the identity authentication information; and a sending module configured to send a login response corresponding to the login request to the terminal device, the login response including the first credential information.
[0021] Optionally, the first authentication information further includes one or more of a signature algorithm, an indication of a validity period of the first authentication credential, or a random number.
[0022] In a fourth aspect, a second service node in a disaster recovery system is provided, the disaster recovery system further comprising a first service node, the second service node being an application-level backup node of the first service node. The second service node comprises: a receiving module configured to receive an authentication request from a terminal device, the authentication request comprising a first authentication credential, the first authentication credential comprising first authentication information and a signature of the first authentication information generated by the first service node using a first key, the first authentication information comprising user identity information; a verifying module configured to verify the signature in the first authentication credential using a second key; a generating module configured to, if the verification of the signature in the first authentication credential is passed, generate second credential information according to the user identity information in the first authentication information, the second credential information comprising a second service credential and a second authentication credential, the second service credential being used by the terminal device to access a service node, the second authentication credential comprising second authentication information and a signature of the second authentication information generated by the second service node using the first key, the second authentication information comprising the user identity information; and a sending module configured to send an authentication response corresponding to the authentication request to the terminal device, the authentication response comprising the second credential information.
[0023] Optionally, the second authentication information further comprises one or more of a signature algorithm, an indication of a validity period of the second authentication credential, or a random number.
[0024] Optionally, the first key and the second key are shared keys, or the first key is a private key and the second key is a public key.
[0025] In a fifth aspect, a terminal device is provided. The terminal device comprises: a sending module configured to send a login request to a first service node in a disaster recovery system, the login request comprising identity verification information, the disaster recovery system further comprising a second service node, the second service node being an application-level backup node of the first service node; and a receiving module configured to receive a login response corresponding to the login request from the first service node, the login response comprising first credential information, the first credential information comprising a first service credential and a first authentication credential, the first service credential being used by the terminal device to access a service node, the first authentication credential comprising first authentication information and a signature of the first authentication information generated by the first service node using a first key, the first authentication information comprising user identity information matching the identity verification information.
[0026] Optionally, the sending module is further configured to send, when the first service node has a communication failure, an authentication request to the second service node, the authentication request comprising the first authentication credential. The receiving module is further configured to receive an authentication response corresponding to the authentication request from the second service node, the authentication response comprising second credential information, the second credential information comprising a second service credential and a second authentication credential, the second service credential being used by the terminal device to access the service node, and the second authentication credential comprising second authentication information and a signature of the second authentication information generated by the second service node using the first key, the second authentication information comprising user identity information.
[0027] Optionally, the sending module is further configured to send, when the first service node and the second service node both have communication failures, an access request to the service node, the access request comprising the latest authentication credential received by the terminal device.
[0028] Optionally, the access request further comprises user permission information corresponding to the user identity information.
[0029] In a sixth aspect, a service communication system for implementing disaster recovery is provided. The service communication system comprises a disaster recovery system and a terminal device. The disaster recovery system comprises the first service node according to the third aspect and the second service node according to the fourth aspect, the second service node being an application-level backup node of the first service node. The terminal device is the terminal device according to the fifth aspect.
[0030] Optionally, the service communication system further comprises a service node. The terminal device is configured to send, when the first service node and the second service node both have communication failures, an access request to the service node, the access request comprising the latest authentication credential received by the terminal device, the latest authentication credential comprising authentication information and a signature of the authentication information generated by the first service node or the second service node using the first key, the authentication information comprising user identity information. The service node is configured to verify the signature in the latest authentication credential using the second key. If the verification of the signature in the latest authentication credential is passed, the service node is further configured to provide, according to user permission information corresponding to the user identity information, a service matching the user permission information to the terminal device.
[0031] Optionally, the service node is further configured to send, after the first service node and / or the second service node resumes communication, an access mode switching instruction to the terminal device, the access mode switching instruction being used to instruct the terminal device to re-authenticate with the service node that resumes communication.
[0032] In a seventh aspect, a service communication apparatus for implementing disaster recovery is provided, comprising a processor and a transceiver.
[0033] The processor is configured to invoke a computer program to cooperate with the transceiver to implement the actions performed by the first service node, the second service node or the terminal device in the first aspect and the embodiments thereof or the second aspect and the embodiments thereof.
[0034] Specifically, when the service communication apparatus is the first service node, the processor is configured to invoke a computer program to cooperate with the transceiver to implement the actions performed by the first service node in the first aspect and the embodiments thereof. When the service communication apparatus is the second service node, the processor is configured to invoke a computer program to cooperate with the transceiver to implement the actions performed by the second service node in the first aspect and the embodiments thereof. When the service communication apparatus is the terminal device, the processor is configured to invoke a computer program to cooperate with the transceiver to implement the actions performed by the terminal device in the second aspect and the embodiments thereof.
[0035] The eighth aspect provides a computer readable storage medium, and the computer readable storage medium stores instructions. When the instructions are executed by a processor, the actions performed by the first service node, the second service node or the terminal device in the first aspect and the embodiments thereof or the second aspect and the embodiments thereof are implemented.
[0036] The ninth aspect provides a computer program product, and the computer program product includes a computer program. When the computer program is executed by a processor, the actions performed by the first service node, the second service node or the terminal device in the first aspect and the embodiments thereof or the second aspect and the embodiments thereof are implemented.
[0037] The tenth aspect provides a chip, and the chip includes programmable logic circuit and / or program instructions. When the chip is running, the actions performed by the first service node, the second service node or the terminal device in the first aspect and the embodiments thereof or the second aspect and the embodiments thereof are implemented. BRIEF DESCRIPTION OF DRAWINGS
[0038] Figure 1 is a disaster recovery scenario provided by an embodiment of the present application;
[0039] Figure 2 is a service communication method for implementing disaster recovery provided by an embodiment of the present application;
[0040] Figure 3 is a structure diagram of a first service node in a disaster recovery system provided by an embodiment of the present application;
[0041] Figure 4 is a structure diagram of a second service node in a disaster recovery system provided by an embodiment of the present application;
[0042] Figure 5 is a structure diagram of a terminal device provided by an embodiment of the present application;
[0043] Figure 6 This is a schematic diagram of the hardware structure of a service communication device for disaster recovery provided in an embodiment of this application. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0045] Figure 1 This is a schematic diagram of a disaster recovery scenario provided in an embodiment of this application. For example... Figure 1 As shown, this disaster recovery scenario includes: a disaster recovery system 101, multiple service nodes 102A-102C (collectively referred to as service nodes 102), and terminal equipment 103. The disaster recovery system 101 includes multiple service nodes. These multiple service nodes include service node 101A and service node 101B. Service node 101A and service node 101B are connected via a wired network or a wireless network. Figure 1 The number of various devices is used only as an example and is not intended to limit the disaster recovery scenarios provided in the embodiments of this application.
[0046] Optionally, a service node can be a single computing device or a cluster of multiple computing devices. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, laptop computer, or smartphone. Optionally, the disaster recovery system 101 is deployed on a cloud platform.
[0047] exist Figure 1In the illustrated disaster recovery scenario, the service node 101 A and the service node 101B are deployed in different regions, i.e., the service node 101 A and the service node 101B are deployed in different regions. For example, the service node 101 A is deployed in region A, and the service node 101B is deployed in region B. Optionally, the service node 101 A is a disaster recovery production center (referred to as a master node). The service node 101B is a disaster recovery center in a different region (referred to as a backup node). The service node 101B is an application-level backup node of the service node 101 A. That is, the disaster recovery system 101 can implement application-level disaster recovery. The application-level disaster recovery is constructed on the basis of data-level disaster recovery. In the application-level disaster recovery, the master node and the backup node are synchronized through a synchronous or asynchronous replication technology, and the backup node is constructed with an application system identical to the master node. In this way, when the master node fails, some online services can be quickly switched to the backup node, so that some important or critical services can be recovered within the allowed time range, minimizing the loss caused by the disaster, and making users basically feel that the disaster has not occurred. In this way, the services provided by the disaster recovery system are complete, reliable and safe. The disaster recovery production center and the disaster recovery center in a different region can realize data transmission through a wide area network. In the embodiment of the application, the data synchronized between the master node and the backup node includes user-related information, including but not limited to identity verification information, user identity information and user permission information. For example, in an online conference service scenario, the user permission information includes sharing conference resource permission, sharing desktop permission, speaking permission, etc.
[0048] Optionally, please continue to refer to Figure 1The service node 101A and the service node 101B include a plurality of service function modules, including an authentication service function module, a status manager service function module, and a data manager service function module. The authentication service function module is configured to perform identity verification on the terminal device 103, that is, to perform login authentication on the terminal device 103, and to issue a certificate information for the terminal device 103 that passes the verification, where the certificate information includes a service certificate. Unlike the prior art, the certificate information in the embodiment of the present application further includes an authentication certificate, and the authentication certificate will be specifically explained in the following method embodiment. The authentication service function module is further configured to verify the authenticity and validity of the service certificate from the terminal device 103 for the service node 102, that is, to perform service certificate authentication for the service node 102. The status manager service function module is configured to monitor and maintain the state of itself, and to arbitrate a disaster recovery switching strategy based on the monitored state. After disaster recovery switching, the master and standby node states are switched, and the master node is downgraded to a standby node, and the standby node is upgraded to a master node. For example, after the service node 101A fails, the status manager service function module in the service node 101B switches the service node 101B to a disaster recovery production center, and after the service node 101A is started, the status manager service function module in the service node 101A switches the service node 101A to a remote disaster recovery center, that is, after disaster recovery switching, the master and standby identities of the service node 101A and the service node 101B are exchanged, and the service node 101A is an application-level disaster recovery node of the service node 101B. The data manager service function module in the master node is configured to synchronize the managed user data, organization data, tenant data, and service configuration data to the standby node through database cross-domain binlog, to realize real-time synchronization of business-related basic static persistent data. After disaster recovery switching, the master and standby node states are switched, and correspondingly, the database reversely synchronizes, to ensure that the changed data after disaster recovery can also be synchronized and refreshed in real time.
[0049] Optionally, the service nodes in the disaster recovery system run a network time protocol (NTP) uniformly, to realize time synchronization of the master and standby nodes.
[0050] Optionally, the disaster recovery system can adopt a cross-site disaster recovery deployment or a two-site three-center disaster recovery deployment. The disaster recovery system adopting the cross-site disaster recovery deployment includes a disaster recovery production center and a cross-site disaster recovery center. If a disaster occurs in the disaster recovery production center, service switching can be implemented in the cross-site disaster recovery center. The disaster recovery system adopting the two-site three-center disaster recovery deployment includes a disaster recovery production center, a same-city disaster recovery center and a cross-site disaster recovery center. If a disaster occurs in the disaster recovery production center, service switching can be implemented in the same-city disaster recovery center, and the disaster recovery relationship with the cross-site disaster recovery center is maintained. If disasters occur in the disaster recovery production center and the same-city disaster recovery center, service switching can be implemented in the cross-site disaster recovery center. The embodiments of the present application take the cross-site disaster recovery deployment of the disaster recovery system as an example for description, for example, refer to Figure 1 .
[0051] Optionally, the service node 102 can be a server or a server cluster composed of multiple servers. The service node 102 is configured to provide software services with corresponding permissions for users, including but not limited to controlling and managing business logic and user permissions. The service node 102 is capable of performing business credential authentication with the service node to determine user permissions and the like. Multiple service nodes 102A-102C can be respectively deployed in multiple regions. For example, refer to Figure 1 , the service node 102A is deployed in region 1, the service node 102B is deployed in region 2, and the service node 102C is deployed in region 3.
[0052] Optionally, the terminal device 103 can be a mobile phone, a computer or a smart wearable device, etc. The terminal device 103 is installed with a client. The terminal device 103 is capable of performing login authentication with the service node based on the installed client, and after obtaining the business credential issued by the service node, initiates an access request to the service node 102 based on the business credential to enjoy the corresponding application service. The application service refers to the service provided by various types of applications (application, APP) for the terminal device, such as computing processing service, application online service, content storage service, online conference service, etc.
[0053] The process of the user side accessing the service node through the terminal device includes that when the user logs in the terminal device, the terminal device obtains the identity authentication information of the user based on the login operation, and then sends a login request containing the identity authentication information to the service node. After the service node verifies the identity authentication information, the service node sends a business credential to the terminal device. The terminal device accesses the service node based on the business credential. The service node verifies whether the business credential from the terminal device is authentic and valid. If the business credential is authentic and valid, the service node provides software services with corresponding permissions for the terminal device.
[0054] After the service node fails, the service node can no longer verify whether the service credential from the terminal device is authentic and valid, and the service node interrupts the software service provided for the terminal device, and the terminal device can no longer rely on the service node to continue to access the service node. For the disaster recovery deployment scenario of the service node, the related technology provides two schemes for switching the user-side service from the master node to the backup node.
[0055] One scheme is applied to the case that the identity authentication information used when the user logs in is long-term credentials, for example, the identity authentication information is a registered user account and password. When the user logs in on the terminal device by using the user account and password, the terminal device saves the user account and password. When the terminal device detects that the master node fails, the terminal device sends a login request containing the user account and password to the backup node, and the backup node sends new service credentials to the terminal device after the user account and password are verified. The terminal device continues to access the service node based on the new service credentials. The service node verifies whether the service credential from the terminal device is authentic and valid. If the service credential is authentic and valid, the service node continues to provide the software service with corresponding permissions to the terminal device. However, this scheme is only applicable to the case that the identity authentication information used when the user logs in is long-term credentials. For the case that the identity authentication information used when the user logs in is one-time credentials such as dynamic verification code or two-dimensional code scanning information, this scheme cannot realize automatic switching of the user-side service between the master node and the backup node, and the user needs to log in again on the terminal device at this time, and therefore the application limitation of this scheme is relatively high. In addition, when this scheme is used, the terminal device always needs to save the user account and password, and the security risk is relatively large.
[0056] Another scheme is that the master node and the backup node synchronize and backup the service credentials through a database. The master node synchronizes and backs up the generated service credentials for sending to the terminal device to the backup node through the database. When the master node fails, the terminal device continues to access the service node based on the service credential sent by the master node. The service node verifies whether the service credential from the terminal device is authentic and valid. Since the backup node stores the service credential issued by the master node, the backup node can also determine whether the service credential from the terminal device is authentic and valid. However, due to frequent login operations of a large number of terminal devices, when the master node and the backup node synchronize and backup the service credentials through the database, a large number of database input / output (I / O) accesses are involved, which affects the database access performance.
[0057] Based on this, the embodiment of the present application provides a service communication method for realizing disaster recovery. After receiving a login request from a terminal device, if the identity authentication information in the login request is verified by the first service node, the first service node generates credential information containing a service credential and an authentication credential, and sends a login response containing the credential information to the terminal device. The service credential is used for the terminal device to access a service node. The authentication credential includes authentication information and a signature of the authentication information generated by the first service node using a first key, and the authentication information includes user identity information matched with the identity authentication information in the login request. The authentication credential can be used by the terminal device to perform identity authentication on a second service node when the first service node has a communication failure, so as to obtain a service credential provided by the second service node. In this way, when the first service node has a communication failure, the terminal device can automatically switch the service to the second service node, realize smooth switching of the user-side service between the primary node and the backup node, the user has no perception in the whole switching process, and the user experience can be ensured. In addition, the present application scheme is not limited by the user login mode and the database performance, and has low application limitation.
[0058] The method flow of the embodiment of the present application is exemplified below.
[0059] Figure 2 FIG. 1 is a flow diagram of a service communication method 200 for realizing disaster recovery provided by the embodiment of the present application. The method 200 is applied to a disaster recovery system, and the disaster recovery system includes a first service node and a second service node. The second service node is an application-level backup node of the first service node. As shown in FIG. 1, the method 200 includes steps 201 to 211. Figure 2
[0060] Optionally, the disaster recovery system is deployed by using a different-place disaster recovery. The first service node in the method 200 is a disaster recovery production center, and the second service node in the method 200 is a different-place disaster recovery center. For example, the method 200 can be applied to the disaster recovery scenario as shown in FIG. 1, the disaster recovery system in the method 200 can be the disaster recovery system 101, the first service node in the method 200 can be the service node 101A, the second service node in the method 200 can be the service node 101B, the service node in the method 200 can be the service node 102, and the terminal device in the method 200 can be the terminal device 103. Figure 1 Alternatively, the disaster recovery system can also be deployed by using a two-place three-center disaster recovery. The first service node in the method 200 is a disaster recovery production center, and the second service node in the method 200 is a same-city disaster recovery center. Alternatively, the first service node in the method 200 is a same-city disaster recovery center, and the second service node in the method 200 is a different-place disaster recovery center.
[0061]
[0062] Step 201, the terminal device sends a login request to the first service node, the login request comprising identity authentication information.
[0063] Optionally, after the user performs a login operation on the terminal device, the terminal device sends a login request to the first service node. The login operation may be, for example, inputting a user account and password, inputting a dynamic verification code (such as an SMS verification code), or scanning a two-dimensional code, etc. Correspondingly, the identity authentication information may be a user account and password, a dynamic verification code, or two-dimensional code scanning information. The identity authentication information may also be other information capable of verifying identity, which is not limited in the embodiments of the present application.
[0064] Step 202, the first service node verifies the identity authentication information.
[0065] Optionally, the identity authentication information of registered legitimate users is pre-stored in the first service node. The first service node verifies the identity authentication information in the login request, that is, the first service node determines whether the identity authentication information stored in the first service node matches the identity authentication information in the login request. If the first service node stores identity authentication information matching the identity authentication information in the login request, the first service node determines that the identity authentication information is verified, that is, the user performing the login operation on the terminal device is a registered legitimate user, and the first service node allows the user to log in at this time. After the first service node allows the user to log in, the following steps 203 to 204 can be continued. If the first service node does not store identity authentication information matching the identity authentication information in the login request, the first service node determines that the identity authentication information is not verified, that is, the user performing the login operation on the terminal device is an illegitimate user, and the first service node refuses the user to log in at this time.
[0066] Step 203, if the first service node verifies the identity authentication information, the first service node generates first credential information, the first credential information comprising a first service credential and a first authentication credential.
[0067] The first service credential is used for the terminal device to access a service node. The first service credential is an authorization credential for accessing the service node. When the terminal device accesses the service node based on the first service credential, the service node requests the first service node to authenticate the first service credential, that is, to verify whether the first service credential is authentic and valid. After the first service node authenticates the first service credential, the first service node can return user identity data and user-associated tenant data associated with the first service credential to the service node, and the service node performs business permission control on the user based on the authentication result. In the embodiments of the present application, a tenant refers to a software ordering party, and a user refers to a software user. One tenant can include one or more users.
[0068] The first authentication credential is a credential for offline authentication after disaster recovery. The first authentication credential includes first authentication information and a signature of the first authentication information generated by the first service node using a first key. The first authentication information includes user identity information matched with identity verification information in the login request. The service nodes in the disaster recovery system store a correspondence between identity verification information and user identity information. After the first service node verifies the identity verification information in the login request, the first service node can obtain the user identity information matched with the identity verification information, and generate the first authentication credential according to the user identity information. The user identity information includes but is not limited to a user identifier and / or a tenant identifier associated with the user. The user identity information used herein can be related desensitization data capable of identifying the user identity in the disaster recovery system (different from a user account and a password). Compared with the first scheme of the related technology in which the terminal device directly saves the user account and the password, the terminal device obtains and saves the related desensitization data capable of identifying the user identity, and the security of user data can be improved.
[0069] Optionally, the first authentication information further includes one or more of a signature algorithm, an indication of a validity period of the first authentication credential, or a first random number. The indication of the validity period of the first authentication credential includes but is not limited to a time stamp of generation of the first authentication credential plus a validity duration, or a time stamp of expiration of the first authentication credential. By carrying the random number in the authentication information, the freshness of the message can be verified, and a replay attack can be prevented. For example, the sending structure of the first authentication credential is as follows.
[0070] "eyJhbGciOiJIbWFjU0hBMjU2IiwidXNlcklkIjoieHh4IiwidGVuYW50SWQiOiJ4eHgiLCJ0aW1lc3RhbXAiOjE1NTc5MDUzMDgsIm5vbmNlIjoieHh4eHh4eCJ9.xxxxxxxxx"
[0071] The analysis structure corresponding to the sending structure is as follows.
[0072] {"alg":"HmacSHA256","userId":"xxx","tenantId":"xxx","timestamp":1557905308,"nonce":"xxxxxxx"}.signature
[0073] alg represents a signature algorithm. userId represents a user identifier. tenantId represents a tenant identifier. timestamp represents a time stamp of expiration of the first authentication credential. nonce represents a random number. signature represents a signature.
[0074] In the embodiments of the present application, the first service node and the second service node are pre-stored with the same signature key. The signature key can be a shared key, or can also be a key pair including a public key and a private key. The first key can be a shared key, or can also be a private key in the key pair. For example, the first service node and the second service node are pre-stored with the same certificate, and the first key can be a private key of the certificate. Alternatively, the service nodes in the disaster recovery system can also not rely on the certificate, and negotiate the key pair to be used.
[0075] Optionally, the service nodes in the disaster recovery system periodically update the signature key to be used, so as to improve the information security.
[0076] Optionally, the first credential information further includes a first refresh credential. The first refresh credential is used by the terminal device to request the first service node to refresh the service credential and the authentication credential. The refresh credential can be used to update and keep alive the service credential and the authentication credential, and solve the problem of the terminal device maintaining or waking up the APP automatic login capability for a long time. The validity period of the refresh credential is usually longer than the validity period of the service credential and the authentication credential. For example, the validity period of the refresh credential is one week, and the validity period of the service credential is 24 hours. The validity period of the service credential and the authentication credential can be the same, or can be different. In the case that the validity period of the service credential and the authentication credential is the same, when the service credential and the authentication credential are about to expire, the terminal device can request the service node to refresh the service credential and the authentication credential based on the refresh credential. In the case that the validity period of the service credential and the authentication credential is different, when the service credential is about to expire, the terminal device can request the service node to refresh the service credential based on the refresh credential. When the authentication credential is about to expire, the terminal device can request the service node to refresh the authentication credential based on the refresh credential. That is, the terminal device can request the service node to refresh the service credential or the authentication credential based on the refresh credential. Alternatively, when the service credential or the authentication credential is about to expire, the terminal device can request the service node to refresh the service credential and the authentication credential based on the refresh credential.
[0077] Optionally, when the refresh credential is about to expire, the terminal device can request the service node to update the refresh credential based on the original refresh credential. Alternatively, the refresh credential does not support automatic refreshing, and after the refresh credential expires, the terminal device can prompt the user to log in again to perform identity authentication on the service node. In the embodiments of the present application, refreshing a credential includes updating the validity period of the credential.
[0078] In step 204, the first service node sends a login response corresponding to the login request to the terminal device, and the login response includes the first credential information.
[0079] After receiving the login response, the terminal device can access the service node based on the first service credential. Specifically, the terminal device can send an access request to the service node, where the access request includes the first service credential. The service node can then request the first service node to authenticate the first service credential. After the authentication is passed, the first service node can send user permission information to the service node, and the service node provides the terminal device with a software service of corresponding permission.
[0080] Optionally, the first credential information includes a first refresh credential. The terminal device requests the first service node to refresh the service credential and the authentication credential based on the first refresh credential. For example, when the first service credential is about to expire, the terminal device can send a credential refresh request to the first service node based on the first refresh credential, where the credential refresh request includes the first refresh credential, and the credential refresh request is used to request to refresh the service credential. The terminal device then receives a credential refresh response from the first service node, where the credential refresh response includes an updated service credential. The terminal device replaces the original service credential with the updated service credential. For another example, when the first authentication credential is about to expire, the terminal device can send a credential refresh request to the first service node based on the first refresh credential, where the credential refresh request includes the first refresh credential, and the credential refresh request is used to request to refresh the authentication credential. The terminal device then receives a credential refresh response from the first service node, where the credential refresh response includes an updated authentication credential. The terminal device replaces the original authentication credential with the updated authentication credential.
[0081] Optionally, when the terminal device detects that the first service node has a communication failure, the terminal device can continue to perform steps 205 to 208. The terminal device can determine the first service node to have a communication failure in various ways, which are not limited by the embodiments of the present application. For example, if the terminal device does not receive a credential refresh response from the first service node within a preset time period after sending a credential refresh request to the first service node, the terminal device determines that the first service node has a communication failure. Alternatively, a long connection is established between the terminal device and the first service node, and if the terminal device does not receive a heartbeat packet from the first service node within a preset time period, the terminal device determines that the first service node has a communication failure. Alternatively, if the terminal device receives an access failure response from the service node, the access failure response indicating that the first service node has a communication failure, the terminal device determines that the first service node has a communication failure.
[0082] Step 205, when the first service node has a communication failure, the terminal device sends an authentication request to the second service node, where the authentication request includes the first authentication credential.
[0083] After the first service node has a communication failure, the second service node is upgraded to a master node for providing authentication services.
[0084] Step 206, the second service node verifies the signature in the first authentication credential by using the second key.
[0085] Optionally, the first key and the second key are shared keys, i.e., the first key and the second key are the same key. Alternatively, the first key is a private key and the second key is a public key. For example, the first key is a certificate private key and the second key is a certificate public key.
[0086] In an implementation, the first key and the second key are shared keys. In the implementation that the first service node generates the signature of the first authentication information by using the first key, the first service node calculates a message authentication code (MAC) value of the first authentication information by using the first key and an encryption algorithm, i.e., the signature is the MAC value. Correspondingly, in the implementation that the second service node verifies the signature in the first authentication credential by using the second key, the second service node calculates the MAC value of the first authentication message in the received first authentication credential by using the second key and the encryption algorithm. If the MAC value calculated by the second service node is the same as the MAC value carried in the first authentication credential, it indicates that the first authentication information is not tampered with, and the second service node determines that the verification of the signature in the first authentication credential is passed. Otherwise, if the MAC value calculated by the second service node is different from the MAC value carried in the first authentication credential, it indicates that the first authentication information is tampered with, and the second service node determines that the verification of the signature in the first authentication credential is failed. The encryption algorithm may be, for example, HmacSHA256, and the embodiments of the present application do not limit the encryption algorithm.
[0087] In another implementation, the first key is a private key and the second key is a public key. In the implementation that the first service node generates the signature of the first authentication information by using the first key, the first service node calculates a digest value of the first authentication information by using a hash algorithm, and then encrypts the digest value of the first authentication information by using the first key to obtain the signature. Correspondingly, in the implementation that the second service node verifies the signature in the first authentication credential by using the second key, the second service node decrypts the signature by using the second key to obtain the digest value, and calculates the digest value of the first authentication message in the received first authentication credential by using the same hash algorithm. If the digest value calculated by the second service node is the same as the digest value obtained by decryption, it indicates that the first authentication information is not tampered with, and the second service node determines that the verification of the signature in the first authentication credential is passed. Otherwise, if the digest value calculated by the second service node is different from the digest value obtained by decryption, it indicates that the first authentication information is tampered with, and the second service node determines that the verification of the signature in the first authentication credential is failed.
[0088] Step 207, if the signature in the first authentication credential is verified by the second service node, the second service node generates second credential information, the second credential information including a second service credential and a second authentication credential.
[0089] The second service credential is used for the terminal device to access the service node. The second authentication credential includes second authentication information and a signature of the second authentication information generated by the second service node using the first key. The second authentication information includes the user identity information in the first authentication information. Optionally, the second authentication information further includes one or more of a signature algorithm, an indication of a validity period of the second authentication credential, or a second random number.
[0090] Optionally, the second credential information further includes a second refresh credential. The second refresh credential is used for the terminal device to request the second service node to refresh the service credential and the authentication credential.
[0091] The explanations of the second service credential, the second authentication credential, and the second refresh credential in this step 207 can refer to the explanations of the first service credential, the first authentication credential, and the first refresh credential in the above step 203 respectively, and the embodiments of the present application will not be repeated here.
[0092] Optionally, the first authentication information includes an indication of a validity period of the first authentication credential. If the first authentication credential is within the validity period, the second service node generates the second credential information. If the first authentication credential is out of the validity period, the second service node can send an authentication failure indication to the terminal device, which is used to prompt the user to log in again.
[0093] Optionally, the user identity information in the first authentication credential is a user identifier and / or a tenant identifier associated with the user. The second service node can query a local database according to the user identifier and / or the tenant identifier to obtain complete user information.
[0094] Step 208, the second service node sends an authentication response corresponding to the authentication request to the terminal device, the authentication response including the second credential information.
[0095] After receiving the authentication response, the terminal device can continue to access the service node based on the second service credential. Specifically, the terminal device can send an access request to the service node, the access request including the second service credential. Then the service node requests the second service node to authenticate the second service credential. After the authentication is passed, the second service node can send user permission information to the service node, and the service node provides software services with corresponding permissions to the terminal device.
[0096] In the embodiments of the present application, when a user logs in on a terminal device, the first service node provides the terminal device with a service credential and an authentication credential. The authentication credential can be used by the terminal device to authenticate to the second service node when the first service node has a communication failure, so as to obtain a service credential provided by the second service node. In this way, when the first service node has a communication failure, the terminal device can automatically switch the service to the second service node, thereby realizing smooth switching of the user-side service between the primary and backup nodes, and the entire switching process is transparent to the user, and the user experience can be ensured. In addition, the scheme of the present application is not limited by the user login mode and the database performance, and has low application limitations.
[0097] Optionally, if the first service node recovers normal communication later, the first service node can serve as an application-level backup node of the second service node. Alternatively, the terminal device can perform an action similar to step 205 to send an authentication request including the second authentication credential to the first service node, so as to switch the service back to the first service node.
[0098] Optionally, the service node is preconfigured with the same signature key as the service node in the disaster recovery system. The signature key can be a shared key, or can also be a key pair including a public key and a private key. The first key can be a shared key, or can also be a private key in the key pair. For example, the service node and the service node in the disaster recovery system are built-in with the same certificate, and the first key can be a certificate private key. Alternatively, the service node and the service node in the disaster recovery system can also not rely on the certificate, but negotiate the key pair to be used. Optionally, the service node and the service node in the disaster recovery system update the signature key to be used regularly, so as to improve the information security.
[0099] Optionally, when the terminal device detects that the first service node and the second service node both have communication failures, the following steps 209 to 211 can be continued to be performed. The manner in which the terminal device determines that the service node has a communication failure can refer to the related content of step 204 described above, and the embodiments of the present application will not be repeated here.
[0100] Step 209, when the first service node and the second service node both have communication failures, the terminal device sends an access request to the service node, and the access request includes the latest authentication credential received by the terminal device.
[0101] Optionally, the access request further comprises user permission information corresponding to the user identity information. The user permission information can be added in the authentication credential in the form of an extension field. In combination with steps 201 to 208 described above, the latest authentication credential received by the terminal device is the second authentication credential. For example, the first service node first experiences a communication failure, the service credential provided by the first service node is invalid, and the terminal device switches the service to the second service node. If the second service node experiences a communication failure and the first service node has not yet recovered normal communication, at this time the service credential provided by the second service node is also invalid, and the terminal device can send an access request carrying the authentication credential sent by the second service node to the service node.
[0102] In step 210, the service node verifies the signature in the latest authentication credential using the second key.
[0103] The implementation of this step 210 can refer to the implementation of step 206 described above, and the embodiments of the present application will not be repeated here.
[0104] In step 211, if the service node verifies the signature in the latest authentication credential successfully, the service node provides the terminal device with a service matching the user permission information according to the user permission information corresponding to the user identity information.
[0105] In the embodiments of the present application, when multiple service nodes in the disaster recovery system simultaneously experience communication failures, the service node can take over the authentication service, realize the local escape capability of the service node, maintain the continuous operation of the online service, improve the reliability of the service communication, and further improve the user experience.
[0106] Optionally, after the first service node and / or the second service node resumes communication, the service node sends an access mode switching instruction to the terminal device, which is used to instruct the terminal device to re-authenticate with the service node that resumes communication. Optionally, after monitoring that the service node resumes communication, the service node can notify the terminal device to re-authenticate with the service node that resumes communication through a websocket link. The process of the terminal device re-authenticating with the service node can refer to steps 205 to 208 described above, and the embodiments of the present application will not be repeated here.
[0107] In conclusion, in the service communication method for realizing disaster recovery provided in the embodiments of the present application, when a user logs in on a terminal device, the first service node provides the terminal device with service credentials and authentication credentials. The authentication credentials can be used by the terminal device to perform identity verification on the second service node when the first service node has a communication failure, so as to obtain the service credentials provided by the second service node. In this way, when the first service node has a communication failure, the terminal device can automatically switch the service to the second service node, realizing smooth switching of the user-side service between the primary node and the backup node, and the entire switching process is transparent to the user, which can guarantee the user experience. In addition, the present application is not limited by the user login mode and the database performance, and has low application limitations. Further, when multiple service nodes in the disaster recovery system have a communication failure at the same time, the service node can take over the authentication service, realizing the local escape capability of the service node, maintaining the continuous operation of the online service, improving the service communication reliability, and further improving the user experience.
[0108] The sequence of the steps of the service communication method for realizing disaster recovery provided in the embodiments of the present application can be adjusted appropriately, and the steps can be increased or decreased as appropriate. Any person skilled in the art can easily think of changes within the technical range disclosed in the present application, which should be covered within the protection scope of the present application.
[0109] The virtual device of the embodiments of the present application is illustrated below.
[0110] For example, Figure 3 is a structural schematic diagram of a first service node in a disaster recovery system provided in the embodiments of the present application. The disaster recovery system further includes a second service node. The second service node is an application-level backup node of the first service node. As Figure 3 indicated, the first service node 300 includes a receiving module 301, a generating module 302, and a sending module 303.
[0111] The receiving module 301 is configured to receive a login request from a terminal device, the login request including identity verification information.
[0112] The generating module 302 is configured to generate first credential information if the identity verification information is verified, the first credential information including first service credentials and first authentication credentials, the first service credentials being used by the terminal device to access the service node, and the first authentication credentials including first authentication information and a signature of the first authentication information generated by the first service node using a first key, the first authentication information including user identity information matched with the identity verification information.
[0113] The sending module 303 is configured to send a login response corresponding to the login request to the terminal device, the login response including the first credential information.
[0114] Here, the detailed working processes of the receiving module 301, the generating module 302, and the sending module 303 can refer to the descriptions in the foregoing method embodiments. For example, the working manner of the receiving module 301 can refer to step 201 in the foregoing method 200. The working manner of the generating module 302 can refer to step 203 in the foregoing method 200. The working manner of the sending module 303 can refer to step 204 in the foregoing method 200. The embodiments of the present application do not repeat the descriptions here.
[0115] Optionally, the first authentication information further includes one or more of a signature algorithm, an indication of a validity period of the first authentication credential, or a random number.
[0116] For example, Figure 4 is a structural schematic diagram of a second service node in a disaster recovery system provided by an embodiment of the present application. The disaster recovery system further includes a first service node. The second service node is an application-level backup node of the first service node. As shown in Figure 4 The second service node 400 includes a receiving module 401, a verifying module 402, a generating module 403, and a sending module 404.
[0117] The receiving module 401 is configured to receive an authentication request from a terminal device, the authentication request including a first authentication credential, the first authentication credential including first authentication information and a signature of the first authentication information generated by the first service node using a first key, the first authentication information including user identity information.
[0118] The verifying module 402 is configured to verify the signature in the first authentication credential using a second key.
[0119] The generating module 403 is configured to, if the verification of the signature in the first authentication credential is passed, generate second credential information according to the user identity information in the first authentication information, the second credential information including a second service credential and a second authentication credential, the second service credential being used by the terminal device to access the service node, the second authentication credential including second authentication information and a signature of the second authentication information generated by the second service node using the first key, the second authentication information including the user identity information.
[0120] The sending module 404 is configured to send, to the terminal device, an authentication response corresponding to the authentication request, the authentication response including the second credential information.
[0121] Here, the detailed working processes of the receiving module 401, the verifying module 402, the generating module 403, and the sending module 404 can refer to the descriptions in the foregoing method embodiments. For example, the working manner of the receiving module 401 can refer to step 205 in method 200. The working manner of the verifying module 402 can refer to step 206 in method 200. The working manner of the generating module 403 can refer to step 207 in method 200. The working manner of the sending module 404 can refer to step 208 in method 200. The embodiments of the present application do not repeat the descriptions here.
[0122] Optionally, the second authentication information further includes one or more of a signature algorithm, an indication of a validity period of the second authentication credential, or a random number.
[0123] Optionally, the first key and the second key are shared keys; or the first key is a private key and the second key is a public key.
[0124] It is worth mentioning that the first service node 300 can have the function of the second service node 400, and the second service node 400 can also have the function of the first service node 300. That is, the service node in the disaster recovery system provided by the embodiments of the present application can have the function of the first service node 300 and the function of the second service node 400 at the same time. In this way, each service node can serve as a disaster recovery production center or a disaster recovery center.
[0125] For example, Figure 5 FIG. 5 is a structural schematic diagram of a terminal device provided by an embodiment of the present application. As shown in FIG. 5, the terminal device 500 includes a sending module 501 and a receiving module 502. Figure 5
[0126] The sending module 501 is configured to send a login request to a first service node in a disaster recovery system, the login request including identity authentication information, the disaster recovery system further including a second service node, the second service node being an application-level backup node of the first service node.
[0127] The receiving module 502 is configured to receive a login response corresponding to the login request from the first service node, the login response including first credential information, the first credential information including a first service credential and a first authentication credential, the first service credential being used by the terminal device to access a service node, the first authentication credential including first authentication information and a signature of the first authentication information generated by the first service node using a first key, the first authentication information including user identity information matching the identity authentication information.
[0128] Here, the detailed working processes of the sending module 501 and the receiving module 502 can refer to the descriptions in the foregoing method embodiments. For example, the working manner of the sending module 501 can refer to step 201 in the foregoing method 200. The working manner of the receiving module 502 can refer to step 204 in the foregoing method 200. The embodiments of the present application do not repeat the descriptions here.
[0129] Optionally, the sending module 501 is further configured to send, to the second service node, an authentication request when the first service node has a communication failure, the authentication request comprising the first authentication credential. The receiving module 502 is further configured to receive, from the second service node, an authentication response corresponding to the authentication request, the authentication response comprising second credential information, the second credential information comprising a second service credential and a second authentication credential, the second service credential being used by the terminal device to access the service node, and the second authentication credential comprising second authentication information and a signature of the second authentication information generated by the second service node using the first key, the second authentication information comprising user identity information. Here, the working manner of the sending module 501 can refer to step 205 in the foregoing method 200. The working manner of the receiving module 502 can refer to step 208 in the foregoing method 200. The embodiments of the present application do not repeat the descriptions here.
[0130] Optionally, the sending module 501 is further configured to send, to the service node, an access request when both the first service node and the second service node have a communication failure, the access request comprising the latest authentication credential received by the terminal device. Here, the working manner of the sending module 501 can refer to step 209 in the foregoing method 200.
[0131] Optionally, the access request further comprises user permission information corresponding to the user identity information.
[0132] The system of the embodiments of the present application is described below.
[0133] For example, the business communication system for implementing disaster recovery provided by the embodiments of the present application can be applied to the disaster recovery scenario as shown in Figure 1 . The business communication system comprises a disaster recovery system and a terminal device. The disaster recovery system comprises a first service node as shown in Figure 3 and a second service node as shown in Figure 4 . The second service node is an application-level backup node of the first service node. The terminal device is a terminal device as shown in Figure 5 . The interaction process between the first service node, the second service node and the terminal device can refer to steps 201 to 208 in the foregoing method 200, and the embodiments of the present application do not repeat the descriptions here.
[0134] Optionally, the service communication system further comprises a service node. The terminal device is configured to send an access request to the service node when both the first service node and the second service node are out of communication. The access request comprises a latest authentication credential received by the terminal device. The latest authentication credential comprises authentication information and a signature of the authentication information generated by the first service node or the second service node using a first key. The authentication information comprises user identity information. The service node is configured to verify the signature in the latest authentication credential using a second key. If the verification of the signature in the latest authentication credential is passed, the service node is further configured to provide the terminal device with a service matching user permission information corresponding to the user identity information according to the user permission information.
[0135] Optionally, the service node is further configured to send an access mode switching instruction to the terminal device after the first service node and / or the second service node resumes communication, the access mode switching instruction being used to instruct the terminal device to re-authenticate with the service node that resumes communication.
[0136] Here, the interaction process between the terminal device and the service node can refer to steps 209 to 211 in the method 200 described above, and will not be described here again.
[0137] The hardware structure of the embodiment of the present application is described below.
[0138] The embodiment of the present application further provides a service communication device for realizing disaster recovery. The service communication device comprises a processor and a transceiver. The processor is configured to invoke a computer program and cooperate with the transceiver to realize the actions performed by the first service node, the second service node, the terminal device or the service node in the method 200.
[0139] For example, Figure 6 is a hardware structure schematic diagram of a service communication device for realizing disaster recovery provided by the embodiment of the present application. The service communication device can be any service node in a disaster recovery system, or a terminal device, or a service node. As Figure 6 shown, the service communication device 600 comprises a processor 601 and a memory 602, and the memory 601 and the memory 602 are connected through a bus 603. Figure 6 The processor 601 and the memory 602 are described independently of each other. Optionally, the processor 601 and the memory 602 are integrated together.
[0140] The memory 602 is used to store computer programs, including an operating system and program codes. The memory 602 is various types of storage media, such as read-only memory (ROM), random access memory (RAM), electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), flash memory, optical memory, register, optical disc storage, optical disc storage, magnetic disk or other magnetic storage device.
[0141] The processor 601 is a general-purpose processor or a special-purpose processor. The processor 601 can be a single-core processor or a multi-core processor. The processor 601 includes at least one circuit to perform the actions of the first service node, the second service node, the terminal device or the service node in the above method 200 provided by the embodiments of the present application.
[0142] Optionally, the service communication apparatus 600 further includes a network interface 604 connected with the processor 601 and the memory 602 through the bus 603. The network interface 604 can enable the service communication apparatus 600 to communicate with other devices. For example, the processor 601 of the service node can interact with the terminal device through the network interface 604 to implement the identity authentication of the terminal device. The processor 601 of the service node can also interact with the service node through the network interface 604 to implement the authentication of the service credential for the service node.
[0143] Optionally, the service communication apparatus 600 further includes an I / O interface 605 connected with the processor 601 and the memory 602 through the bus 603. The processor 601 can receive input commands or data through the I / O interface 605. The I / O interface 605 is used for the service communication apparatus 600 to connect input devices, such as a keyboard and a mouse.
[0144] Optionally, the service communication apparatus 600 further includes a display 606 connected with the processor 601 and the memory 602 through the bus 603. The display 606 can be used to display the intermediate results and / or final results generated by the processor 601 in the above method. In a possible implementation manner, the display 606 is a touch display screen to provide a human-computer interaction interface.
[0145] The bus 603 is any type of communication bus, for example, a system bus, for interconnecting internal components of the service communication device 600. In the embodiment of the present application, the above-mentioned components inside the service communication device 600 are interconnected by the bus 603. Alternatively, the above-mentioned components inside the service communication device 600 are communicatively connected with each other by means other than the bus 603, for example, the above-mentioned components inside the service communication device 600 are interconnected by logical interfaces inside the service communication device 600.
[0146] The above-mentioned components can be respectively arranged on independent chips, or at least partially or entirely arranged on the same chip. Whether to arrange each component on a separate chip or to integrate the components on one or more chips depends on the product design requirement. The embodiment of the present application does not limit the specific implementation form of the above-mentioned components.
[0147] Figure 6 The service communication device 600 shown is only exemplary. In the implementation process, the service communication device 600 includes other components, which are not listed one by one herein. Figure 6 The service communication device 600 shown can implement service communication by executing all or part of the steps of the first service node, the second service node, the terminal device or the service node in the method provided by the above-mentioned embodiment.
[0148] The embodiment of the present application further provides a computer readable storage medium, and instructions are stored on the computer readable storage medium. When the instructions are executed by a processor, the actions performed by the first service node, the second service node or the terminal device in the above-mentioned method 200 are implemented.
[0149] The embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the actions performed by the first service node, the second service node or the terminal device in the above-mentioned method 200 are implemented.
[0150] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or by a program instructing related hardware to complete, and the program can be stored in a computer readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk.
[0151] In the embodiment of the present application, the terms "first", "second" and "third" are only for descriptive purposes, and cannot be understood as indicating or implying relative importance.
[0152] The term "and / or" in the present application is only used to describe the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent three cases of A alone, A and B together, and B alone. In addition, the character " / " in this paper generally represents that the associated objects before and after are an "or" relationship.
[0153] It should be noted that the information (including but not limited to user equipment information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.) and signals involved in the present application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions. For example, the identity verification information, user identity information, user permission information and the like involved in the present application are obtained under sufficient authorization.
[0154] The above is only an optional embodiment of the present application, and is not used to limit the present application. Any modification, equivalent replacement, improvement, etc. within the concept and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A service communication method for disaster recovery, characterized in that, The method is applied to a disaster recovery system, which includes a first service node and a second service node, wherein the second service node is an application-level disaster recovery node of the first service node. The first service node receives a login request from a terminal device, the login request including authentication information; If the first service node verifies the identity verification information, the first service node generates first credential information. The first credential information includes a first business credential and a first authentication credential. The first business credential is used by the terminal device to access the business node. The first authentication credential includes first authentication information and a signature of the first authentication information generated by the first service node using a first key. The first authentication information includes user identity information that matches the identity verification information. The first service node sends a login response corresponding to the login request to the terminal device, and the login response includes the first credential information.
2. The method according to claim 1, characterized in that, The first authentication information further includes one or more of the following: a signature algorithm, an indication of the validity period of the first authentication credential, or a first random number.
3. The method according to claim 1 or 2, characterized in that, The method further includes: The second service node receives an authentication request from the terminal device, the authentication request including the first authentication credential; The second service node uses the second key to verify the signature in the first authentication credential; If the second service node verifies the signature in the first authentication credential, the second service node generates second credential information. The second credential information includes a second business credential and a second authentication credential. The second business credential is used by the terminal device to access the business node. The second authentication credential includes second authentication information and a signature of the second authentication information generated by the second service node using the first key. The second authentication information includes the user identity information in the first authentication information. The second service node sends an authentication response corresponding to the authentication request to the terminal device, and the authentication response includes the second credential information.
4. The method according to claim 3, characterized in that, The second authentication information also includes one or more of the following: a signature algorithm, an indication of the validity period of the second authentication credential, or a second random number.
5. The method according to claim 3, characterized in that, The first key and the second key are a shared key; or, the first key is a private key and the second key is a public key.
6. A service communication method for disaster recovery, characterized in that, The method is applied to a disaster recovery system, which includes a first service node and a second service node, wherein the second service node is an application-level disaster recovery node of the first service node. The terminal device sends a login request to the first service node, the login request including authentication information; The terminal device receives a login response corresponding to the login request from the first service node. The login response includes first credential information, which includes a first business credential and a first authentication credential. The first business credential is used by the terminal device to access the business node. The first authentication credential includes first authentication information and a signature of the first authentication information generated by the first service node using a first key. The first authentication information includes user identity information that matches the identity verification information.
7. The method according to claim 6, characterized in that, The method further includes: When the first service node experiences a communication failure, the terminal device sends an authentication request to the second service node, the authentication request including the first authentication credential. The terminal device receives an authentication response corresponding to the authentication request from the second service node. The authentication response includes second credential information, which includes a second business credential and a second authentication credential. The second business credential is used by the terminal device to access the business node. The second authentication credential includes second authentication information and a signature of the second authentication information generated by the second service node using the first key. The second authentication information includes the user identity information.
8. The method according to claim 6 or 7, characterized in that, The method further includes: When both the first service node and the second service node experience communication failures, the terminal device sends an access request to the service node, the access request including the latest authentication credentials received by the terminal device.
9. The method according to claim 8, characterized in that, The access request also includes user permission information corresponding to the user identity information.
10. A first service node in a disaster recovery system, characterized in that, The disaster recovery system further includes a second service node, which is an application-level disaster recovery node of the first service node. The first service node includes: The receiving module is used to receive login requests from terminal devices, the login requests including authentication information; The generation module is used to generate first credential information if the authentication information is verified successfully. The first credential information includes a first business credential and a first authentication credential. The first business credential is used by the terminal device to access the business node. The first authentication credential includes first authentication information and a signature of the first authentication information generated by the first service node using a first key. The first authentication information includes user identity information that matches the authentication information. The sending module is used to send a login response corresponding to the login request to the terminal device, wherein the login response includes the first credential information.
11. The first service node according to claim 10, characterized in that, The first authentication information also includes one or more of the following: a signature algorithm, an indication of the validity period of the first authentication credential, or a random number.
12. A second service node in a disaster recovery system, characterized in that, The disaster recovery system further includes a first service node, and the second service node is an application-level disaster recovery node of the first service node. The second service node includes: The receiving module is configured to receive an authentication request from a terminal device. The authentication request includes a first authentication credential, the first authentication credential includes first authentication information and a signature of the first authentication information generated by the first service node using a first key. The first authentication information includes user identity information. The verification module is used to verify the signature in the first authentication credential using the second key; The generation module is configured to generate second credential information based on the user identity information in the first authentication information if the signature verification in the first authentication credential passes. The second credential information includes a second business credential and a second authentication credential. The second business credential is used by the terminal device to access the business node. The second authentication credential includes second authentication information and a signature of the second authentication information generated by the second service node using the first key. The second authentication information includes the user identity information. The sending module is used to send the authentication response corresponding to the authentication request to the terminal device, wherein the authentication response includes the second credential information.
13. The second service node according to claim 12, characterized in that, The second authentication information also includes one or more of the following: a signature algorithm, an indication of the validity period of the second authentication credential, or a random number.
14. The second service node according to claim 12 or 13, characterized in that, The first key and the second key are a shared key; or, the first key is a private key and the second key is a public key.
15. A terminal device, characterized in that, The terminal device includes: The sending module is used to send a login request to the first service node in the disaster recovery system. The login request includes authentication information. The disaster recovery system also includes a second service node, which is the application-level disaster recovery node of the first service node. The receiving module is configured to receive a login response corresponding to the login request from the first service node. The login response includes first credential information, which includes a first business credential and a first authentication credential. The first business credential is used by the terminal device to access the business node. The first authentication credential includes first authentication information and a signature of the first authentication information generated by the first service node using a first key. The first authentication information includes user identity information that matches the identity verification information.
16. The terminal device according to claim 15, characterized in that, The sending module is further configured to send an authentication request to the second service node when the first service node experiences a communication failure, the authentication request including the first authentication credential; The receiving module is further configured to receive an authentication response corresponding to the authentication request from the second service node. The authentication response includes second credential information, which includes a second business credential and a second authentication credential. The second business credential is used by the terminal device to access the business node. The second authentication credential includes second authentication information and a signature of the second authentication information generated by the second service node using the first key. The second authentication information includes the user identity information.
17. The terminal device according to claim 15 or 16, characterized in that, The sending module is further configured to send an access request to the service node when both the first service node and the second service node experience communication failures. The access request includes the latest authentication credentials received by the terminal device.
18. The terminal device according to claim 17, characterized in that, The access request also includes user permission information corresponding to the user identity information.
19. A business communication system for disaster recovery, characterized in that, The business communication system includes a disaster recovery system and terminal equipment. The disaster recovery system includes a first service node as described in claim 10 or 11 and a second service node as described in any one of claims 12 to 14. The second service node is an application-level disaster recovery node of the first service node. The terminal equipment is the terminal equipment as described in claim 15 or 16.
20. The business communication system according to claim 19, characterized in that, The business communication system also includes business nodes; The terminal device is used to send an access request to the service node when both the first service node and the second service node experience communication failures. The access request includes the latest authentication credential received by the terminal device. The latest authentication credential includes authentication information and a signature of the authentication information generated by the first service node or the second service node using a first key. The authentication information includes user identity information. The business node is used to verify the signature in the latest authentication credential using the second key; If the signature verification in the latest authentication credential passes, the service node is also used to provide services to the terminal device that match the user permission information based on the user permission information corresponding to the user identity information.
21. The business communication system according to claim 20, characterized in that, The service node is also used to send an access mode switching instruction to the terminal device after the first service node and / or the second service node resume communication. The access mode switching instruction is used to instruct the terminal device to re-authenticate with the service node that has resumed communication.
22. A service communication device for disaster recovery, characterized in that, include: Processor and transceiver; The processor is used to invoke a computer program to coordinate with the transceiver to implement the actions performed by the first service node, the second service node, or the terminal device as described in any one of claims 1 to 9.
23. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed by a processor, implement the actions performed by the first service node, the second service node, or the terminal device as described in any one of claims 1 to 9.
24. A computer program product, characterized in that, It includes a computer program, which, when executed by a processor, implements the actions performed by the first service node, the second service node, or the terminal device as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Data processing system and method, related equipment and storage medium
CN112149105A
Single sign-on method, device, and system
WO2021031689A1