Disaster recovery method and device of service and storage medium

By configuring the repair system on the client side, the service interruption problem caused by server-side anomalies was resolved, ensuring service continuity and stability and improving the user experience.

CN121098697APending Publication Date: 2025-12-09BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410741195.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2025-12-09

AI Technical Summary

Technical Problem

Existing server-side disaster recovery solutions are prone to causing large-scale impact on users under abnormal circumstances, and their reliance on the network may lead to service interruptions, failing to guarantee service stability and user experience.

Method used

Configure a repair system on the client side. By performing the same processing procedure on service requests, generate second response data, and select the first or second response data as the target response data based on the server-side anomaly, thus ensuring service continuity.

Benefits of technology

When server-side anomalies occur, the client-side repair system ensures service continuity, improves service stability and disaster recovery capabilities, and enhances user experience without the user noticing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121098697A_ABST
    Figure CN121098697A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a disaster recovery method and device for a service and a storage medium, and the method comprises the steps: sending a service request to a server through a client, enabling the server to carry out the processing process of the service request, and obtaining first response data; transmitting the service request to a pre-configured repair system in the client, and running the same processing process as that of the server on the service request in the repair system to obtain second response data; judging whether the server side is abnormal or not; if it is determined that the server is not abnormal, determining the first response data as target response data of the service request; or, if it is determined that the server side is abnormal, determining the second response data as the target response data of the service request. By configuring the repair system at the client and operating the same processing process as the server on the service request, the service can be still ensured to continue when the server is abnormal, so that the user does not perceive the service, the service use experience of the user is not influenced, and the service stability and the disaster recovery capability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The embodiment of the present disclosure relates to the technical field of computer and network communication, in particular to a service disaster recovery method, device and storage medium. BACKGROUND

[0002] Because of processing requests from thousands of distributed devices, the server needs a large amount of storage and computing. When the service is abnormal due to various reasons, a large number of users will be affected, so the server itself has evolved a lot of disaster recovery solutions. SUMMARY

[0003] The embodiment of the present disclosure provides a service disaster recovery method, device and storage medium to improve service stability and disaster recovery capability.

[0004] In a first aspect, the embodiment of the present disclosure provides a service disaster recovery method applied to a client, which comprises:

[0005] sending a service request to a server to make the server run a processing procedure on the service request to obtain first response data;

[0006] transmitting the service request to a pre-configured repair system in the client, running the same processing procedure on the service request in the repair system as the server to obtain second response data;

[0007] determining whether the server is abnormal; if it is determined that the server is not abnormal, determining the first response data as target response data of the service request; or if it is determined that the server is abnormal, determining the second response data as the target response data of the service request.

[0008] In a second aspect, the embodiment of the present disclosure provides a service disaster recovery method applied to a server, which comprises:

[0009] receiving a service request sent by a client and running a processing procedure on the service request to obtain first response data;

[0010] sending the first response data to the client to make the client determine whether the server is abnormal and select the first response data or second response data as target response data of the service request according to the determination result, wherein the second response data is obtained by running the same processing procedure on the service request in a pre-configured repair system in the client as the server.

[0011] In a third aspect, the embodiment of the present disclosure provides a service disaster recovery device, which comprises:

[0012] The request unit is configured to send a service request to a server, so that the server runs a processing procedure on the service request to obtain first response data.

[0013] The repair unit is configured to transmit the service request to a pre-configured repair system in the client, and run the same processing procedure on the service request in the repair system as the server to obtain second response data.

[0014] The judgment unit is configured to determine whether the server is abnormal. If it is determined that the server is not abnormal, the first response data is determined as the target response data of the service request. Or, if it is determined that the server is abnormal, the second response data is determined as the target response data of the service request.

[0015] In a fourth aspect, the embodiments of the present disclosure provide a service disaster recovery device, comprising:

[0016] The receiving unit is configured to receive a service request sent by a client.

[0017] The processing unit is configured to run a processing procedure on the service request to obtain first response data.

[0018] The sending unit is configured to send the first response data to the client, so that the client determines whether the server is abnormal, and selects the first response data or second response data as the target response data of the service request according to the determination result, wherein the second response data is obtained by running the same processing procedure on the service request in a pre-configured repair system in the client as the server.

[0019] In a fifth aspect, the embodiments of the present disclosure provide an electronic device, comprising at least one processor and a memory.

[0020] The memory stores computer execution instructions.

[0021] The at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the service disaster recovery method as described in the first aspect and various possible designs of the first aspect, or the service disaster recovery method as described in the second aspect and various possible designs of the second aspect.

[0022] In a sixth aspect, the embodiments of the present disclosure provide a computer readable storage medium, which stores computer execution instructions. When the processor executes the computer execution instructions, the service disaster recovery method as described in the first aspect and various possible designs of the first aspect, or the service disaster recovery method as described in the second aspect and various possible designs of the second aspect is implemented.

[0023] In a seventh aspect, the present disclosure provides a computer program product, which includes computer execution instructions. When a processor executes the computer execution instructions, a disaster recovery method of a service is implemented, as described in the first aspect and various possible designs of the first aspect, or a disaster recovery method of a service is implemented, as described in the second aspect and various possible designs of the second aspect.

[0024] The disaster recovery method of a service, the device, and the storage medium provided by the embodiments of the present disclosure send a service request to a service end through a client, so that the service end runs a processing procedure on the service request to obtain first response data. The service request is transmitted to a repair system pre-configured in the client, and the same processing procedure as the service end is run on the service request in the repair system to obtain second response data. It is determined whether the service end is abnormal. If it is determined that the service end is not abnormal, the first response data is determined as the target response data of the service request. Or, if it is determined that the service end is abnormal, the second response data is determined as the target response data of the service request. By configuring the repair system in the client, the same processing procedure as the service end is run on the service request, and the service can continue when the service end is abnormal, so that the user has no perception, and the user experience of using the service is not affected, and the service stability and disaster recovery capability are improved. BRIEF DESCRIPTION OF DRAWINGS

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

[0026] Figure 1 A scene example diagram of the disaster recovery method of a service provided by an embodiment of the present disclosure is shown in the following figure.

[0027] Figure 2 A flowchart of the disaster recovery method of a service provided by an embodiment of the present disclosure is shown in the following figure.

[0028] Figure 3 A flowchart of the disaster recovery method of a service provided by an embodiment of the present disclosure is shown in the following figure.

[0029] Figure 4 A flowchart of the disaster recovery method of a service provided by another embodiment of the present disclosure is shown in the following figure.

[0030] Figure 5 A flowchart of the disaster recovery method of a service provided by another embodiment of the present disclosure is shown in the following figure.

[0031] Figure 6 A structural block diagram of the disaster recovery device of a service provided by an embodiment of the present disclosure is shown in the following figure.

[0032] Figure 7 A structural block diagram of a disaster recovery device providing a service for another embodiment of the present disclosure;

[0033] Figure 8 A hardware structure schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0034] In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by a person of ordinary skill in the art without creative labor fall within the protection scope of the present disclosure.

[0035] The disaster recovery scheme in the related art usually establishes a backup service or a backup storage for the service of the service end, and quickly switches to a backup line to maintain the stability of the service when the service is abnormal. However, this disaster recovery scheme also has certain unreliable conditions. For example, this disaster recovery scheme often needs to be verified and iterated for a long time. When the service end disaster recovery system is incomplete, the abnormality is devastating, and in the peak period, a large number of complaints can be caused. In addition, this disaster recovery scheme also depends on the network. When the network has a problem, it is also impossible to maintain the continuous operation of the service.

[0036] In order to solve at least one of the above technical problems, the present disclosure provides a service disaster recovery method. A service request is sent from a client to a service end, so that the service end runs a processing process on the service request to obtain first response data. The service request is transmitted to a repair system pre-configured in the client, and the same processing process as the service end is run on the service request in the repair system to obtain second response data. It is determined whether the service end is abnormal. If it is determined that the service end is not abnormal, the first response data is determined as the target response data of the service request. Or, if it is determined that the service end is abnormal, the second response data is determined as the target response data of the service request. By configuring the repair system in the client, the same processing process as the service end is run on the service request, and the service can still be continued when the service end is abnormal, so that the user has no perception, and the user's experience of using the service is not affected, and the service stability and disaster recovery capability are improved.

[0037] The service disaster recovery method of the present disclosure is applied to the following application scenarios: Figure 1As shown, the service includes a server and a client, wherein the client is pre-installed with a repair system, the service module of the client can send a service request to the server when there is a service demand, and the service request is transmitted to the repair system of the client, the server runs a processing process on the service request to obtain first response data, the repair system runs the same processing process as the server on the service request to obtain second response data, and the target response data is selected from the first response data and the second response data according to whether the server is abnormal.

[0038] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present disclosure are all information and data authorized by the user or 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, and provide corresponding operation portal for user to choose authorization or refusal.

[0039] The disaster recovery method of the service of the present disclosure will be described in detail below in combination with specific embodiments.

[0040] Reference Figure 2 , Figure 2 The service disaster recovery method flow diagram provided by an embodiment of the present disclosure. The method of the present embodiment can be applied in a client, and the service disaster recovery method includes:

[0041] S201, a service request is sent to a server, so that the server runs a processing process on the service request to obtain first response data.

[0042] In the present embodiment, as shown, the client can send a service request to the server when there is a service demand, wherein the service can be any network service provided by the server, which is not limited in the present embodiment, when the server does not appear abnormal, the server can process the service request to obtain first response data and send it to the client, but if the server appears abnormal, the client may not receive or may not receive the first response data in time, or the first response data may also be error data. Figure 3

[0043] S202, the service request is transmitted to the pre-configured repair system in the client, and the same processing process as the server is run on the service request in the repair system to obtain second response data.

[0044] ​In the embodiment, in order to improve the disaster recovery capability, a repair system (or also referred to as a backup system) can be pre-configured in the client, the repair system can have the same processing capability as the server, when the client sends a service request to the server, the service request can also be transmitted to the repair system in the client, so that the repair system runs the same processing process on the service request as the server to obtain second response data, in the case that the correctness of the repair system is high enough, for example, the accuracy is x%, x% is greater than the preset accuracy threshold, the second response data and the first response data of the server when there is no exception are theoretically completely matched, so the second response data can be used as the alternative response data.

[0045] Wherein the accuracy of the repair system is x% (the optimization of the repair system expects the accuracy of the repair system to tend to 1), then the disaster recovery rate of the whole system is x%, if the stability of the server itself is A, then the overall stability of the service can be improved by (1-A)*x% through the repair system, that is, the repair rate of the client. The more stable the server is, the lower the role of the repair system is, and the stability of the server itself tends to 1, and the repair rate of the client tends to 0.

[0046] In the embodiment, the repair system is configured on the client instead of being configured on the standby server or other electronic devices, in order to avoid dependence on the network, that is, to avoid that the service cannot be continuously provided when the network is abnormal. In addition, for any service of the server, whether the corresponding repair system is configured on the client needs to consider the cost and benefit, for example, for some services, if the following conditions are met: the stability of the server is not enough (for example, when the service is early online), the service is important or the user is more concerned, the service calculation complexity is low, and the long-term data is not needed, the corresponding repair system can be configured on the client; if the above conditions are not met, whether the corresponding repair system is configured on the client can be determined by comprehensively evaluating the cost and benefit.

[0047] S203, determining whether the server appears abnormal; if it is determined that the server does not appear abnormal, the first response data is determined as the target response data of the service request; or if it is determined that the server appears abnormal, the second response data is determined as the target response data of the service request.

[0048] In the embodiment, after the service request is sent to the service end, it can be judged whether the service end is abnormal. If it is determined that the service end is not abnormal, that is, the service end can normally return the first response data, and the first response data is correct, the first response data can be determined as the target response data of the service request, and returned to the business module of the client, and the second response data can be ignored. If it is determined that the service end is abnormal, including but not limited to the service end cannot normally return the first response data, or cannot return the first response data in time, or the first response data is incorrect, etc. At this time, the second response data can be determined as the target response data of the service request, and returned to the business module of the client. In this way, it is ensured that the service can continue when the service end is abnormal, the service stability is improved, the service disaster recovery capability is improved, the user is not aware, and the user's experience of using the service is not affected.

[0049] Among them, judging whether the service end is abnormal is a key step. Optionally, common abnormality calibration methods of the service end include but are not limited to the following:

[0050] Absolute error:

[0051] 1) Service end interface failure (return error code), that is, receiving the error code returned by the interface of the service end;

[0052] 2) Request timeout (network exception / service exception), that is, not receiving the first response data returned by the service end within the first preset time;

[0053] Relative error:

[0054] 1) Notification type no response, that is, for the service end to return the service request related notification message, but not receiving the notification message pushed by the service end within the second preset time;

[0055] 2) Return error notification or error data, that is, receiving the first response data (or notification message) returned by the service end, but the first response data is incorrect, wherein whether the first response data is incorrect can be judged based on a preset rule and / or context information. Or, in the case that the repair system correctness is high enough (for example, higher than a preset correctness threshold), the first response data and the second response data are compared, and whether the first response data is incorrect is determined according to the comparison result. If the first response data and the second response data are inconsistent, it is considered that the first response data is incorrect.

[0056] Among them, the relative error is unable to determine the server exception 100%, and the second response data can be directly applied as the target response data of the service request in the case that the repair system correctness is high enough or does not have a negative impact on normal service. In addition, for the check of the relative error, the strictness of the check can be adjusted according to the business expectation, for example, in the case that the expectation is not high and the strictness is not high, when the number or proportion of the notification type of no response or error data is small, it can be determined that the server has a relative error.

[0057] Based on the above examples of absolute error and relative error, when judging whether the server has an exception, one or more of the following can be included:

[0058] determining whether an error code returned by an interface of the server is received; or

[0059] determining whether the first response data returned by the server is not received within a first preset time period; or

[0060] determining whether a notification message related to the service request pushed by the server is not received within a second preset time period; or

[0061] If the first response data returned by the server is received, it is determined whether the first response data is error data.

[0062] Further, if the above at least one determination condition is met, it is determined that the server has an exception, and the second response data is determined as the target response data of the service request; if any determination condition is not met, it is determined that the server has no exception, and the first response data is determined as the target response data of the service request.

[0063] The disaster recovery method of the service provided by the embodiment is that the client sends a service request to the server, so that the server runs a processing process on the service request to obtain first response data; the service request is transmitted to a repair system pre-configured in the client, and the same processing process as the server is run on the service request in the repair system to obtain second response data; it is determined whether the server has an exception; if it is determined that the server has no exception, the first response data is determined as the target response data of the service request; or, if it is determined that the server has an exception, the second response data is determined as the target response data of the service request. By configuring the repair system in the client, the same processing process as the server is run on the service request, and the service can continue when the server has an exception, so that the user has no perception and the user's experience of using the service is not affected, and the service stability and disaster recovery capability are improved.

[0064] On the basis of the above embodiment, if it is determined that the server has an exception, the exception rate of the server can be counted to facilitate monitoring of the service stability, which can be as follows:

[0065] The proportion of the target response data obtained from multiple service requests using the second response data of the repair system is determined as the server's anomaly rate.

[0066] If the anomaly rate exceeds the preset anomaly rate threshold, a first notification is sent to the terminal of a preset user (e.g., an administrator) to notify the preset user to repair the server, or a second notification is sent to the server so that the server can automatically repair according to the second notification.

[0067] In this embodiment, some service requests may use the first response data returned by the server as the target response data, while others may use the second response data from the repair system as the target response data. The abnormality rate of the server is calculated by the proportion of service requests that use the second response data from the repair system, that is, the proportion of the number of service requests that use the second response data from the repair system to all service requests (all service requests within a certain time range, or all service requests that meet certain conditions). Furthermore, if the server-side failure rate is relatively low, such as not exceeding a preset failure rate threshold, then no server repair is required. If the server-side failure rate is relatively high, such as exceeding a preset failure rate threshold, then server repair is necessary. Optionally, a first notification can be sent to the terminals of preset users (e.g., developers, maintenance personnel) to notify them to repair the server. Alternatively, the server can also have certain automatic repair functions. For example, for server-side failures caused by insufficient resources, the server can automatically request resources for expansion to solve the resource shortage problem. Or, the server can achieve certain automatic repair capabilities through artificial intelligence models, so a second notification can be sent to the server so that the server can automatically repair according to the second notification, continuously improving the stability of the server.

[0068] Based on any of the above embodiments, considering that the client's computing and / or storage logic will inevitably differ slightly from the server's, and that server-side data can be verified across multiple devices to ensure accuracy, while client-side data is distributed across multiple user devices and may be isolated from each other, client-side data is prone to discrepancies between devices. Therefore, it is necessary to continuously verify the correctness of the client's repair system when no anomalies occur on the server side. Specifically, the following process can be executed:

[0069] If it is determined that the server has not encountered any abnormalities, the accuracy of the repair system is determined by comparing the second response data and the first response data.

[0070] If the accuracy of the repair system is lower than a preset accuracy threshold, a third notification is sent to the terminal of a preset user to notify the preset user to optimize the repair system.

[0071] In the embodiment, when no exception occurs on the service side, it is explained that the first response data is accurate data, the second response data can be compared with the first response data, if consistent, it is explained that the second response data is also correct data, if inconsistent, it is explained that the second response data is error data, the proportion of correct data in all second response data (all second response data in a certain time range, or all second response data meeting certain conditions) can be calculated as the accuracy of the repair system. Further, when the accuracy of the repair system is relatively low, for example, lower than a preset accuracy threshold, the repair system needs to be repaired, optionally, a third notification can be sent to the terminal of the preset user (such as a developer, a maintenance personnel, etc.) to inform the preset user to repair the repair system, for example, to repair the repair system according to the running log, to constantly improve the boundary condition, and to constantly improve the accuracy of the repair system; and generally, the client side does not have automatic repair capability, of course, if the client side has automatic repair capability, the repair system can also be repaired by the client or the repair system can also be repaired by the server and the repaired repair system is issued to the client.

[0072] In the above embodiment, when no exception occurs on the service side, the accuracy of the repair system of the client is monitored, and the accuracy of the repair system is improved through continuous iteration; when an exception occurs on the service side, the exception rate of the service side is monitored, and the stability of the service side is improved through repair of the service side, the entire service system is continuously optimized through the above two kinds of negative feedback, so that the stability of the entire service system is continuously improved, and the user experience is greatly improved.

[0073] On the basis of any of the above embodiments, in order to ensure that the repair system of the client can effectively improve the service stability when the service side crashes, a verification stage is needed before the service is put on line, which can be specifically as shown in Figure 4 as shown, comprising:

[0074] S301, before the service is put on line, a test request is sent to the service side, so that the service side runs a processing process on the test request to obtain third response data;

[0075] S302, the test request is transmitted to the repair system, and the same processing process as the service side is run on the test request in the repair system to obtain fourth response data;

[0076] S303, the accuracy of the repair system is determined by comparing the third response data and the fourth response data;

[0077] S304, if the accuracy of the repair system is lower than a preset accuracy threshold, a fourth notification is sent to the terminal of a preset user to inform the preset user to optimize the repair system.

[0078] In the embodiment, before the service goes online, the client can prepare multiple test requests, and send the test requests to the server and the repair system of the client respectively, and compare the third response data obtained by the server and the fourth response data obtained by the repair system, to determine the accuracy of the repair system. At this time, the third response data obtained by the server is considered to be correct data, and if the fourth response data obtained by the repair system is the same as the corresponding third response data, the fourth response data is considered to be correct data, otherwise, the fourth response data is incorrect data. The proportion of the correct fourth response data can be counted as the accuracy of the repair system. Further, if the accuracy of the repair system is lower than the preset accuracy threshold, the fourth notification is sent to the terminal of the preset user to inform the preset user to optimize the repair system. The accuracy of the repair system can be continuously improved through the above process until the target accuracy or other end conditions are reached.

[0079] Optionally, in the verification stage before the service goes online, each third response data and the corresponding fourth response data can be compared in real time, and of course, a plurality of third response data and the corresponding fourth response data can be compared in batches.

[0080] Optionally, the client can store the fourth response data of multiple test requests, and the server can also store the third response data of multiple test requests. At a preset time (for example, every interval of a preset time, or other appropriate time), the client can obtain the corresponding third response data of each fourth response data from the server, and compare the fourth response data and the corresponding third response data in batches to determine the accuracy of the repair system.

[0081] Optionally, the client can store the fourth response data of multiple test requests, and the server can also store the third response data of multiple test requests. At a preset time (for example, every interval of a preset time, or other appropriate time), the client can also send the stored fourth response data to the server in batches, so that the server compares the fourth response data and the corresponding third response data in batches to determine the accuracy of the repair system. Further, if the accuracy of the repair system is lower than the preset accuracy threshold, the server or the client can send the fourth notification to the terminal of the preset user to inform the preset user to optimize the repair system.

[0082] On the basis of any of the above embodiments, since the repair system is configured in the client, the computing and / or storage logic of the client and the server certainly exist some differences, that is, the repair system may also exist some differences with the server in the same processing process of the service request, therefore, when the service request (the test request in the verification stage is the same) is transmitted to the repair system, the context information of the service request is acquired first, the service request and the context information of the service request are both transmitted to the repair system, and then when the repair system runs, the processing process of the service request is run based on the context information, which can better approach the processing process of the server and improve the accuracy of the second response data. The context information can be acquired from any way, and the content of the context information can be any information required when the repair system runs the same processing process of the server, which is not limited in the embodiment.

[0083] On the basis of any of the above embodiments, a switch of the repair system can also be configured, such as the switch in Figure 3 , which is used for controlling the running or stopping of the service system, that is, when the switch is closed, the repair system is closed, the client only sends the service request to the server, and the service request is not transmitted to the repair system, and the second response data will not be obtained subsequently; and when the switch is opened, the repair system is opened, and the process in the above embodiments is executed, that is, the client sends the service request to the server, and the service request is also transmitted to the repair system, and the second response data can be obtained subsequently, and the first response data or the second response data is selected as the target response data of the service request based on whether the server is abnormal. Optionally, the switch can come from other independent interfaces of the server, or can be the configuration of the client.

[0084] Reference is made to Figure 5 , Figure 5 The service disaster recovery method flow diagram provided by an embodiment of the present disclosure. The method of the embodiment can be applied in a terminal device or a server, and the service disaster recovery method comprises the following steps.

[0085] S401, receiving a service request sent by a client, and running a processing process on the service request to obtain first response data;

[0086] S402, sending the first response data to the client, so that the client judges whether the server is abnormal, and selects the first response data or second response data as the target response data of the service request according to the judgment result, wherein the second response data is obtained by a repair system pre-configured in the client running the same processing process of the server on the service request.

[0087] The embodiment is a method embodiment on the server side in the above embodiments, and the principle and technical effects can be referred to the above embodiments, which will not be described here.

[0088] Optionally, the method further comprises:

[0089] receiving a second notification sent by the client after determining that the exception rate of the service end exceeds the preset exception rate threshold, and performing automatic repair according to the second notification.

[0090] Optionally, the method further comprises:

[0091] receiving a test request sent by the client before the service goes online, running a processing procedure on the test request to obtain third response data;

[0092] receiving fourth response data sent by the client, the fourth response data being obtained by the repair system running the same processing procedure as the service end on the test request;

[0093] determining the accuracy of the repair system by comparing the third response data and the fourth response data;

[0094] if the accuracy of the repair system is lower than a preset accuracy threshold, sending a fourth notification to a terminal of a preset user to inform the preset user to optimize the repair system.

[0095] Alternatively, the service end can also send the third response data to the client, and the client can determine the accuracy of the repair system by comparing the third response data and the fourth response data.

[0096] Optionally, the determining the accuracy of the repair system by comparing the third response data and the fourth response data comprises:

[0097] storing the third response data of multiple test requests, receiving fourth response data corresponding to each third response data sent in batches by the client at a preset time, and comparing each third response data and the corresponding fourth response data in batches to determine the accuracy of the repair system; or

[0098] storing the third response data, and sending each third response data stored in batches to the client at a preset time, so that the client compares each third response data and the corresponding fourth response data in batches to determine the accuracy of the repair system.

[0099] The service disaster recovery method provided in the embodiment can ensure the continuation of the service when the service end is abnormal, so that the user has no perception and the use experience of the user is not affected, and the service stability and disaster recovery capability are improved.

[0100] The service disaster recovery method on the client side corresponding to the above embodiment,Figure 6 A structural block diagram of a disaster recovery device of a service provided by an embodiment of the present disclosure is shown. For ease of illustration, only parts related to the embodiment of the present disclosure are shown. Refer to Figure 6 The disaster recovery device 500 of the service includes a request unit 501, a repair unit 502, and a judgment unit 503.

[0101] The request unit 501 is configured to send a service request to a service end, so that the service end runs a processing procedure on the service request to obtain first response data.

[0102] The repair unit 502 is configured to transmit the service request to a pre-configured repair system in the client, and run the same processing procedure on the service request in the repair system as the service end to obtain second response data.

[0103] The judgment unit 503 is configured to determine whether the service end is abnormal. If it is determined that the service end is not abnormal, the first response data is determined as target response data of the service request. Or, if it is determined that the service end is abnormal, the second response data is determined as the target response data of the service request.

[0104] In one or more embodiments of the present disclosure, when determining whether the service end is abnormal, the judgment unit 503 is configured to:

[0105] determine whether an error code returned by an interface of the service end is received; or

[0106] determine whether the first response data returned by the service end is not received within a first preset time period; or

[0107] determine whether a notification message related to the service request pushed by the service end is not received within a second preset time period; or

[0108] If the first response data returned by the service end is received, it is determined whether the first response data is error data.

[0109] In one or more embodiments of the present disclosure, when determining whether the first response data is error data, the judgment unit 503 is configured to:

[0110] compare the first response data with the second response data, and determine whether the first response data is error data according to a comparison result.

[0111] In one or more embodiments of the present disclosure, the judgment unit 503 is further configured to:

[0112] The target response data of the plurality of service requests is obtained by using a proportion of the second response data of the repair system, and an abnormality rate of the service end is determined.

[0113] If the abnormality rate exceeds a preset abnormality rate threshold, a first notification is sent to a terminal of a preset user to inform the preset user to repair the service end, or a second notification is sent to the service end to enable the service end to automatically repair according to the second notification.

[0114] In one or more embodiments of the present disclosure, the determination unit 503 is further configured to:

[0115] If it is determined that the service end is not abnormal, the correctness rate of the repair system is determined by comparing the second response data and the first response data.

[0116] If the correctness rate of the repair system is lower than a preset correctness rate threshold, a third notification is sent to a terminal of a preset user to inform the preset user to optimize the repair system.

[0117] In one or more embodiments of the present disclosure, the request unit 501 is further configured to, before the service goes online, send a test request to the service end to enable the service end to run a processing process on the test request to obtain third response data.

[0118] The repair unit 502 is further configured to transmit the test request to the repair system, run the same processing process on the test request in the repair system as the service end, and obtain fourth response data.

[0119] The determination unit 503 is further configured to determine the correctness rate of the repair system by comparing the third response data and the fourth response data, and if the correctness rate of the repair system is lower than a preset correctness rate threshold, a fourth notification is sent to a terminal of a preset user to inform the preset user to optimize the repair system.

[0120] In one or more embodiments of the present disclosure, when the determination unit 503 determines the correctness rate of the repair system by comparing the third response data and the fourth response data, the determination unit 503 is configured to:

[0121] The fourth response data of the plurality of test requests is stored, and at a preset time, third response data corresponding to each fourth response data is obtained from the service end, and each fourth response data and the corresponding third response data are compared in batches to determine the correctness rate of the repair system; or

[0122] The fourth response data of the plurality of test requests is stored, and the stored fourth response data is batch sent to the server at a preset time, so that the server batch compares the fourth response data and the corresponding third response data to determine the accuracy of the repair system.

[0123] In one or more embodiments of the present disclosure, the repair unit 502 is configured to:

[0124] obtain context information of the service request, and transmit the service request and the context information to a repair system pre-configured in the client;

[0125] run the same processing procedure on the service request in the repair system based on the context information to obtain second response data.

[0126] The device provided in the embodiment can be used to execute the technical solutions of the above method embodiments, and has similar implementation principles and technical effects, which will not be described here in detail.

[0127] The disaster recovery method of the service on the server side corresponding to the above embodiment, Figure 7 A structural block diagram of a disaster recovery device for the service is provided in the embodiments of the present disclosure. For ease of illustration, only parts related to the embodiments of the present disclosure are shown. Referring to Figure 7 , the disaster recovery device 600 for the service includes a receiving unit 601, a processing unit 602, and a sending unit 603.

[0128] The receiving unit 601 is configured to receive a service request sent by a client.

[0129] The processing unit 602 is configured to run a processing procedure on the service request to obtain first response data.

[0130] The sending unit 603 is configured to send the first response data to the client, so that the client determines whether the server is abnormal, and selects the first response data or second response data as target response data of the service request according to the determination result, wherein the second response data is obtained by a repair system pre-configured in the client running the same processing procedure on the service request as the server

[0131] In one or more embodiments of the present disclosure, the receiving unit 601 is further configured to receive a second notification sent by the client after determining that the abnormality rate of the server exceeds a preset abnormality rate threshold.

[0132] The processing unit 602 is further configured to perform automatic repair according to the second notification.

[0133] In one or more embodiments of the present disclosure, the receiving unit 601 is further configured to receive a test request sent by the client before the service goes online.

[0134] The processing unit 602 is further configured to perform a processing process on the test request to obtain third response data.

[0135] The receiving unit 601 is further configured to receive fourth response data sent by the client, the fourth response data being obtained by the repair system performing the same processing process as the service end on the test request.

[0136] The processing unit 602 is further configured to determine the accuracy of the repair system by comparing the third response data and the fourth response data, and send a fourth notification to a terminal of a preset user to inform the preset user to optimize the repair system if the accuracy of the repair system is lower than a preset accuracy threshold.

[0137] In one or more embodiments of the present disclosure, when the processing unit 602 determines the accuracy of the repair system by comparing the third response data and the fourth response data, the processing unit 602 is configured to:

[0138] store the third response data of multiple test requests, receive the fourth response data corresponding to each third response data sent in batches by the client at a preset time, and compare each third response data and the corresponding fourth response data in batches to determine the accuracy of the repair system; or

[0139] store the third response data, and send the stored third response data to the client in batches at a preset time, so that the client compares each third response data and the corresponding fourth response data in batches to determine the accuracy of the repair system.

[0140] The device provided in the embodiment can be used to execute the technical solutions of the above-mentioned method embodiments, and has similar principles and technical effects, which will not be described here in detail.

[0141] Reference Figure 8The diagram illustrates a structural schematic of an electronic device 700 suitable for implementing embodiments of the present disclosure. The electronic device 700 can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, personal digital assistants (PDAs), portable Android devices (PADs), portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 8 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0142] like Figure 8 As shown, the electronic device 700 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the electronic device 700. The processing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0143] Typically, the following devices can be connected to I / O interface 705: input devices 706 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 707 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 708 including, for example, magnetic tapes, hard disks, etc.; and communication devices 709. Communication device 709 allows electronic device 700 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 8 An electronic device 700 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0144] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program comprising program code for performing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.

[0145] Note that the computer readable medium described above in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination thereof. The computer readable storage medium may, for example, be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any suitable combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus or device. In the present disclosure, the computer readable signal medium can include a data signal carried in a baseband or as part of a carrier wave, in which the computer readable program code is carried. Such a propagated data signal can take any of a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium can also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate or transport a program for use by or in connection with an instruction execution system, apparatus or device. The program code contained on the computer readable medium can be transmitted by any suitable medium, including but not limited to wire, cable, RF (radio frequency), or any suitable combination of the above.

[0146] The computer readable medium described above can be included in the electronic device described above; or can exist separately from the electronic device and not be assembled into the electronic device.

[0147] The computer readable medium described above carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods shown in the embodiments described above.

[0148] Computer program code for carrying out operations of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0149] The flow diagrams and the block diagrams in the drawings are meant as possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flow diagrams and the block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flow diagrams, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.

[0150] The units described in the embodiments of the present disclosure can be implemented by software, or by hardware. In some cases, the name of the unit does not constitute a limitation on the unit itself. For example, the first obtaining unit can also be described as a unit for obtaining at least two Internet protocol addresses.

[0151] The functions described above in the specification of the present disclosure can be performed by one or more hardware logic components. For example, and without limitation, illustrative types of hardware logic components that can be used include Field-programmable Gate Arrays (FPGAs), Program-specific Integrated Circuits (ASICs), Application-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), etc.

[0152] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0153] In a first aspect, according to one or more embodiments of the present disclosure, a disaster recovery method of a service is provided, applied to a client, and the method comprises:

[0154] sending a service request to a server to make the server run a processing procedure on the service request to obtain first response data;

[0155] transmitting the service request to a pre-configured repair system in the client, running the same processing procedure on the service request in the repair system as the server to obtain second response data;

[0156] determining whether the server is abnormal; if it is determined that the server is not abnormal, determining the first response data as target response data of the service request; or if it is determined that the server is abnormal, determining the second response data as the target response data of the service request.

[0157] According to one or more embodiments of the present disclosure, the determining whether the server is abnormal comprises:

[0158] determining whether an error code returned by an interface of the server is received; or

[0159] determining whether the first response data returned by the server is not received within a first preset time period; or

[0160] determining whether a notification message related to the service request pushed by the server is not received within a second preset time period; or

[0161] if the first response data returned by the server is received, determining whether the first response data is error data.

[0162] According to one or more embodiments of the present disclosure, the determining whether the first response data is error data comprises:

[0163] The first response data is compared with the second response data, and whether the first response data is error data is determined according to a comparison result.

[0164] According to one or more embodiments of the present disclosure, the method further comprises:

[0165] A proportion of target response data of a plurality of service requests using the second response data of the repair system is obtained, and an abnormality rate of the service end is determined;

[0166] If the abnormality rate exceeds a preset abnormality rate threshold, a first notification is sent to a terminal of a preset user to inform the preset user to repair the service end, or a second notification is sent to the service end to enable the service end to automatically repair according to the second notification.

[0167] According to one or more embodiments of the present disclosure, the method further comprises:

[0168] If it is determined that the service end does not have an abnormality, a correct rate of the repair system is determined by comparing the second response data and the first response data.

[0169] If the correct rate of the repair system is lower than a preset correct rate threshold, a third notification is sent to a terminal of a preset user to inform the preset user to optimize the repair system.

[0170] According to one or more embodiments of the present disclosure, the method further comprises:

[0171] Before the service goes online, a test request is sent to the service end to enable the service end to run a processing process on the test request to obtain third response data;

[0172] The test request is transmitted to the repair system, and the same processing process as the service end is run on the test request in the repair system to obtain fourth response data;

[0173] A correct rate of the repair system is determined by comparing the third response data and the fourth response data.

[0174] If the correct rate of the repair system is lower than a preset correct rate threshold, a fourth notification is sent to a terminal of a preset user to inform the preset user to optimize the repair system.

[0175] According to one or more embodiments of the present disclosure, the determining the correct rate of the repair system by comparing the third response data and the fourth response data comprises:

[0176] The fourth response data of the plurality of test requests is stored, and the third response data corresponding to each fourth response data is obtained from the service end at a preset time, and each fourth response data and the corresponding third response data are compared in batches to determine the accuracy of the repair system; or

[0177] The fourth response data of the plurality of test requests is stored, and each fourth response data stored is sent to the service end in batches at a preset time, so that the service end compares each fourth response data and the corresponding third response data in batches to determine the accuracy of the repair system.

[0178] According to one or more embodiments of the present disclosure, the service request is transmitted to the pre-configured repair system in the client, and the same processing process as the service end is performed on the service request in the repair system to obtain second response data, which comprises:

[0179] Context information of the service request is obtained, and the service request and the context information are transmitted to the pre-configured repair system in the client;

[0180] The same processing process as the service end is performed on the service request in the repair system based on the context information to obtain second response data.

[0181] In a second aspect, according to one or more embodiments of the present disclosure, a service disaster recovery method is provided, which is applied to a service end and comprises:

[0182] The service request sent by the client is received, and a processing process is performed on the service request to obtain first response data;

[0183] The first response data is sent to the client, so that the client determines whether the service end is abnormal, and selects the first response data or second response data as the target response data of the service request according to the determination result, wherein the second response data is obtained by performing the same processing process as the service end on the service request in the pre-configured repair system in the client.

[0184] According to one or more embodiments of the present disclosure, the method further comprises:

[0185] The second notification sent by the client after determining that the abnormality rate of the service end exceeds a preset abnormality rate threshold is received, and automatic repair is performed according to the second notification.

[0186] According to one or more embodiments of the present disclosure, the method further comprises:

[0187] Before the service goes online, a test request sent by the client is received, a processing procedure is run on the test request, and third response data is obtained;

[0188] Fourth response data sent by the client is received, the fourth response data being obtained by the repair system running the same processing procedure as the service end on the test request;

[0189] The accuracy of the repair system is determined by comparing the third response data and the fourth response data;

[0190] If the accuracy of the repair system is lower than a preset accuracy threshold, a fourth notification is sent to a terminal of a preset user to inform the preset user to optimize the repair system.

[0191] According to one or more embodiments of the present disclosure, the accuracy of the repair system is determined by comparing the third response data and the fourth response data, including:

[0192] The third response data of a plurality of test requests is stored, and at a preset time, the fourth response data corresponding to each third response data sent in batches by the client is received, and each third response data and the corresponding fourth response data are compared in batches to determine the accuracy of the repair system; or

[0193] The third response data is stored, and at a preset time, each third response data stored is sent in batches to the client, so that the client compares each third response data and the corresponding fourth response data to determine the accuracy of the repair system.

[0194] In a third aspect, according to one or more embodiments of the present disclosure, a service disaster recovery device is provided, including:

[0195] The request unit is configured to send a service request to a service end, so that the service end runs a processing procedure on the service request to obtain first response data;

[0196] The repair unit is configured to transmit the service request to a pre-configured repair system in the client, and run the same processing procedure as the service end on the service request in the repair system to obtain second response data;

[0197] The judgment unit is configured to determine whether the service end is abnormal; if it is determined that the service end is not abnormal, the first response data is determined as target response data of the service request; or if it is determined that the service end is abnormal, the second response data is determined as the target response data of the service request.

[0198] According to one or more embodiments of the present disclosure, the judging unit, when judging whether the service end is abnormal, is configured to:

[0199] judge whether an error code returned by an interface of the service end is received; or

[0200] judge whether the first response data returned by the service end is not received within a first preset time period; or

[0201] judge whether a notification message related to the service request pushed by the service end is not received within a second preset time period; or

[0202] if the first response data returned by the service end is received, judge whether the first response data is error data.

[0203] According to one or more embodiments of the present disclosure, the judging unit, when judging whether the first response data is error data, is configured to:

[0204] compare the first response data with the second response data, and determine whether the first response data is error data according to a comparison result.

[0205] According to one or more embodiments of the present disclosure, the judging unit is further configured to:

[0206] obtain a proportion of target response data of a plurality of service requests using the second response data of the repair system, and determine an abnormal rate of the service end;

[0207] if the abnormal rate exceeds a preset abnormal rate threshold, send a first notification to a terminal of a preset user to inform the preset user to repair the service end, or send a second notification to the service end to enable the service end to automatically repair according to the second notification.

[0208] According to one or more embodiments of the present disclosure, the judging unit is further configured to:

[0209] if it is determined that the service end is not abnormal, determine a correct rate of the repair system by comparing the second response data and the first response data;

[0210] if the correct rate of the repair system is lower than a preset correct rate threshold, send a third notification to a terminal of a preset user to inform the preset user to optimize the repair system.

[0211] According to one or more embodiments of the present disclosure, the requesting unit is further configured to, before a service goes online, send a test request to the service end, so that the service end runs a processing process on the test request to obtain third response data;

[0212] The repair unit is further configured to transmit the test request to the repair system, and run the same processing procedure as the service end on the test request in the repair system to obtain fourth response data;

[0213] The judgment unit is further configured to determine the accuracy of the repair system by comparing the third response data and the fourth response data, and send a fourth notification to a terminal of a preset user to inform the preset user to optimize the repair system if the accuracy of the repair system is lower than a preset accuracy threshold.

[0214] According to one or more embodiments of the present disclosure, when determining the accuracy of the repair system by comparing the third response data and the fourth response data, the judgment unit is configured to:

[0215] store the fourth response data of the plurality of test requests, and obtain the third response data corresponding to each fourth response data from the service end at a preset time, and compare each fourth response data and the corresponding third response data in batches to determine the accuracy of the repair system; or

[0216] store the fourth response data of the plurality of test requests, and send the stored fourth response data to the service end in batches at a preset time, so that the service end compares each fourth response data and the corresponding third response data in batches to determine the accuracy of the repair system.

[0217] According to one or more embodiments of the present disclosure, when the repair unit transmits the service request to the repair system pre-configured in the client, and runs the same processing procedure as the service end on the service request in the repair system to obtain second response data, the repair unit is configured to:

[0218] obtain context information of the service request, and transmit the service request and the context information to the repair system pre-configured in the client;

[0219] run the same processing procedure as the service end on the service request based on the context information in the repair system to obtain second response data.

[0220] In a fourth aspect, according to one or more embodiments of the present disclosure, a disaster recovery device of a service is provided, comprising:

[0221] a receiving unit configured to receive a service request sent by a client;

[0222] a processing unit configured to run a processing procedure on the service request to obtain first response data;

[0223] a sending unit configured to send the first response data to the client, so that the client determines whether the service end is abnormal, and selects the first response data or second response data as the target response data of the service request according to the determination result, wherein the second response data is obtained by the repair system pre-configured in the client by performing the same processing process on the service request as the service end

[0224] According to one or more embodiments of the present disclosure, the receiving unit is further configured to receive a second notification sent by the client after determining that the abnormal rate of the service end exceeds a preset abnormal rate threshold;

[0225] The processing unit is further configured to perform automatic repair according to the second notification.

[0226] According to one or more embodiments of the present disclosure, the receiving unit is further configured to receive a test request sent by the client before the service is online;

[0227] The processing unit is further configured to perform a processing process on the test request to obtain third response data;

[0228] The receiving unit is further configured to receive fourth response data sent by the client, wherein the fourth response data is obtained by the repair system by performing the same processing process on the test request as the service end;

[0229] The processing unit is further configured to determine the correctness rate of the repair system by comparing the third response data and the fourth response data, and send a fourth notification to a terminal of a preset user to notify the preset user to optimize the repair system if the correctness rate of the repair system is lower than a preset correctness rate threshold.

[0230] According to one or more embodiments of the present disclosure, when the processing unit determines the correctness rate of the repair system by comparing the third response data and the fourth response data, the processing unit is configured to:

[0231] store third response data of a plurality of test requests, receive fourth response data corresponding to each third response data sent in batches by the client at a preset time, and compare each third response data and the corresponding fourth response data in batches to determine the correctness rate of the repair system; or

[0232] store the third response data, and send the stored third response data in batches to the client at a preset time, so that the client compares each third response data and the corresponding fourth response data in batches to determine the correctness rate of the repair system.

[0233] In a fifth aspect, an electronic device is provided according to one or more embodiments of the present disclosure, comprising: at least one processor and a memory;

[0234] The memory stores computer-executable instructions;

[0235] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the disaster recovery method of the service as described in the first aspect above and various possible designs of the first aspect, or the disaster recovery method of the service as described in the second aspect above and various possible designs of the second aspect.

[0236] In a sixth aspect, a computer-readable storage medium is provided according to one or more embodiments of the present disclosure, the computer-readable storage medium storing computer-executable instructions, when a processor executes the computer-executable instructions, implementing the disaster recovery method of the service as described in the first aspect above and various possible designs of the first aspect, or the disaster recovery method of the service as described in the second aspect above and various possible designs of the second aspect.

[0237] In a seventh aspect, a computer program product is provided according to one or more embodiments of the present disclosure, comprising computer-executable instructions, when a processor executes the computer-executable instructions, implementing the disaster recovery method of the service as described in the first aspect above and various possible designs of the first aspect, or the disaster recovery method of the service as described in the second aspect above and various possible designs of the second aspect.

[0238] The above description is merely exemplary of the present disclosure and the application of the principles thereof. It is not intended to limit the disclosed concepts to the precise forms disclosed. Rather, it is intended to cover such departures from the present disclosure as come within the scope of the concepts disclosed herein and the patentable scope of the following claims. For example, the features of the described embodiments can be combined in any combination.

[0239] In addition, while operations are depicted in a particular, chronological sequence, this should not be understood as requiring such order unless specifically specified. One of ordinary skill in the art will recognize that many steps can be performed in different order, or concurrently, and that some steps can be performed in different ways. In addition, not all illustrated steps can be required to implement a methodology in accordance with disclosure. Also, the various features of the different embodiments can be combined in any combination. Similarly, the various features of the disclosure can be extended to any suitable electronic device.

[0240] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims

1. A disaster recovery method for a service, characterized in that, Applied to a client, the method includes: Send a service request to the server so that the server can run a processing procedure on the service request to obtain first response data; The service request is transmitted to a pre-configured repair system in the client, where the same processing procedure as the server is performed on the service request to obtain second response data. Determine whether the server is experiencing an anomaly; if the server is determined to be normal, then the first response data is determined as the target response data for the service request; or, if the server is determined to be abnormal, then the second response data is determined as the target response data for the service request.

2. The method according to claim 1, characterized in that, The determination of whether the server has encountered an anomaly includes: Determine whether an error code has been received from the server's interface; or Determine whether the first response data returned by the server has not been received within a first preset time period; or Determine whether a second preset time period has elapsed without receiving a notification message related to the service request pushed by the server; or If the first response data returned by the server is received, it is determined whether the first response data is erroneous.

3. The method according to claim 2, characterized in that, The step of determining whether the first response data is erroneous data includes: The first response data is compared with the second response data, and the first response data is determined to be erroneous based on the comparison result.

4. The method according to claim 1, characterized in that, The method further includes: The proportion of the target response data obtained from multiple service requests using the second response data of the repair system is determined as the anomaly rate of the server. If the anomaly rate exceeds a preset anomaly rate threshold, a first notification is sent to the terminal of a preset user to notify the preset user to repair the server, or a second notification is sent to the server to enable the server to automatically repair according to the second notification.

5. The method according to claim 1, characterized in that, The method further includes: If it is determined that the server has not encountered any abnormalities, the accuracy of the repair system is determined by comparing the second response data and the first response data. If the accuracy of the repair system is lower than a preset accuracy threshold, a third notification is sent to the terminal of a preset user to notify the preset user to optimize the repair system.

6. The method according to claim 1, characterized in that, The method further includes: Before the service goes live, a test request is sent to the server so that the server can run a processing procedure on the test request to obtain third response data; The test request is transmitted to the repair system, where the same processing procedure as the server is performed on the test request to obtain the fourth response data. The accuracy of the repair system is determined by comparing the third response data and the fourth response data. If the accuracy of the repair system is lower than a preset accuracy threshold, a fourth notification is sent to the terminal of a preset user to notify the preset user to optimize the repair system.

7. The method according to claim 6, characterized in that, The step of determining the accuracy of the repair system by comparing the third response data and the fourth response data includes: The system stores the fourth response data for multiple test requests, retrieves the corresponding third response data from the server at preset times, and compares each fourth response data with its corresponding third response data in batches to determine the accuracy of the repair system; or The fourth response data of multiple test requests are stored, and the stored fourth response data are sent to the server in batches at a preset time, so that the server compares each fourth response data with the corresponding third response data in batches to determine the accuracy of the repair system.

8. The method according to claim 1, characterized in that, The service request is transmitted to a pre-configured repair system in the client. The repair system performs the same processing procedure on the service request as the server, obtaining second response data, including: Obtain the context information of the service request, and transmit the service request and the context information to the pre-configured repair system in the client; The repair system performs the same processing procedure on the service request as the server based on the context information to obtain the second response data.

9. A disaster recovery method for a service, characterized in that, Applied to the server side, the method includes: Receive a service request sent by the client, and run a processing procedure on the service request to obtain the first response data; The first response data is sent to the client so that the client can determine whether an anomaly has occurred on the server and select the first response data or the second response data as the target response data for the service request based on the determination result. The second response data is obtained by the repair system pre-configured in the client running the same processing procedure as the server on the service request.

10. The method according to claim 9, characterized in that, The method further includes: The system receives a second notification from the client after determining that the server's anomaly rate exceeds a preset anomaly rate threshold, and performs automatic repair based on the second notification.

11. The method according to claim 9, characterized in that, The method further includes: Before the service goes live, a test request sent by the client is received, a processing procedure is run on the test request, and third response data is obtained. The system receives fourth response data sent by the client, which is obtained by the repair system running the same processing procedure as the server on the test request. The accuracy of the repair system is determined by comparing the third response data and the fourth response data. If the accuracy of the repair system is lower than a preset accuracy threshold, a fourth notification is sent to the terminal of a preset user to notify the preset user to optimize the repair system.

12. The method according to claim 11, characterized in that, The step of determining the accuracy of the repair system by comparing the third response data and the fourth response data includes: The system stores third-response data from multiple test requests, and receives fourth-response data corresponding to each third-response data sent in batches by the client at preset times. It then compares each third-response data with its corresponding fourth-response data in batches to determine the accuracy of the repair system; or... The third response data is stored, and the stored third response data is sent to the client in batches at a preset time, so that the client can compare each third response data with the corresponding fourth response data in batches to determine the accuracy of the repair system.

13. A disaster recovery device for a service, characterized in that, include: The request unit is used to send a service request to the server so that the server can run a processing procedure on the service request to obtain first response data; The repair unit is used to transmit the service request to a pre-configured repair system in the client, and to run the same processing procedure on the service request as the server in the repair system to obtain second response data; A judgment unit is used to determine whether the server has encountered an abnormality. If it is determined that the server is not experiencing any abnormalities, then the first response data is determined as the target response data for the service request; Alternatively, if it is determined that the server is malfunctioning, the second response data is determined as the target response data for the service request.

14. A disaster recovery device for a service, characterized in that, include: The receiving unit is used to receive service requests sent by the client; The processing unit is used to run a processing procedure on the service request and obtain first response data; The sending unit is configured to send the first response data to the client, so that the client can determine whether an anomaly has occurred on the server and select the first response data or the second response data as the target response data for the service request based on the determination result, wherein the second response data is obtained by the repair system pre-configured in the client running the same processing procedure as the server on the service request.

15. An electronic device, characterized in that, include: At least one processor and memory; The memory stores computer-executed instructions; The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the method as described in any one of claims 1-12.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the method as described in any one of claims 1-12.

17. A computer program product, characterized in that, Includes computer execution instructions, which, when executed by a processor, implement the method as described in any one of claims 1-12.