CN114185659A - Task recovery method and device, electronic equipment and storage medium - Google Patents

Task recovery method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114185659A
CN114185659A CN202111505600.XA CN202111505600A CN114185659A CN 114185659 A CN114185659 A CN 114185659A CN 202111505600 A CN202111505600 A CN 202111505600A CN 114185659 A CN114185659 A CN 114185659A
Authority
CN
China
Prior art keywords
task
recovery
target
server
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111505600.XA
Other languages
Chinese (zh)
Inventor
王晨鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202111505600.XA priority Critical patent/CN114185659A/en
Publication of CN114185659A publication Critical patent/CN114185659A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution

Abstract

The present disclosure relates to a task recovery method, apparatus, electronic device, and storage medium, the method comprising: receiving a target processing task for processing a target business service; when the target business service is determined to meet the degradation condition, degrading the target processing task and storing task request data corresponding to the target processing task; and aiming at a recovery server corresponding to the target processing task in the degraded state selected from the candidate server set, sending a recovery indication message corresponding to the target processing task in the degraded state to the recovery server, so that the recovery server detects a recovery condition corresponding to the target processing task in the degraded state, and when the recovery condition is met, acquiring task request data and processing the target processing task based on the task request data. By adopting the method and the device, loss of the service caused by service interruption after degradation can be avoided, task processing can be performed in time when degradation is recovered, and the task processing efficiency of the service is improved.

Description

Task recovery method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a task recovery method and apparatus, an electronic device, a storage medium, and a computer program product.
Background
With the development of application services, when providing business service processing for a plurality of business functions related to the application services, in many cases, a basic service on which the business service depends needs to be called to perform related business service processing, for example, when a user uses a shopping application service to perform an order placing operation, the basic service on which the order placing business service depends needs to be called based on the order placing operation to perform related flow processing.
At present, after basic services relied on by business services are degraded, a mode of directly blocking related processes and returning error information is generally adopted, and the normal execution of a server interface is blocked, so that the business services are interrupted, and loss is caused to the business services. Therefore, there is a problem in the related art that the degradation affects the business service processing.
Disclosure of Invention
The present disclosure provides a task recovery method, apparatus, electronic device, storage medium, and computer program product to at least solve the problem in the related art that the impact on business service processing after degradation exists. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a task recovery method, including:
receiving a target processing task for processing a target business service;
when the target business service is determined to meet the degradation condition, degrading the target processing task, and storing task request data corresponding to the target processing task;
and sending a recovery indication message corresponding to the target processing task in the degraded state to a recovery server aiming at the recovery server corresponding to the target processing task in the degraded state selected from the candidate server set, so that the recovery server detects a recovery condition corresponding to the target processing task in the degraded state, acquires the task request data when the recovery condition is met, and processes the target processing task based on the task request data.
In a possible implementation manner, when it is determined that the target business service meets the degradation condition, the degrading the target processing task and storing task request data corresponding to the target processing task includes:
determining a service state of a basic server on which the target business service depends, and acquiring a target business execution attribute corresponding to the target business service when the service state is determined to be a degraded state;
and when the target business execution attribute corresponds to the business execution attribute corresponding to the degradation, determining that the target business service meets the degradation condition, degrading the target processing task, and storing task request data corresponding to the target processing task.
In one possible implementation manner, the determining that the target business service meets the degradation condition when the target business execution attribute corresponds to the business execution attribute corresponding to the degradation includes:
comparing the service responsiveness with the responsiveness corresponding to the degradation to obtain a first comparison result;
comparing the service dependency with the dependency corresponding to the degradation to obtain a second comparison result;
and when the first comparison result is that the responsiveness of the business is less than or equal to the responsiveness corresponding to degradation, and the second comparison result is that the dependency of the business is less than or equal to the dependency corresponding to degradation, determining that the target business service meets the degradation condition.
In a possible implementation manner, the obtaining of the target service execution attribute corresponding to the target service includes:
acquiring a service request interface corresponding to the target processing task;
and determining a target business execution attribute corresponding to the target business service according to the interface information corresponding to the service request interface.
In a possible implementation manner, the storing task request data corresponding to the target processing task includes:
determining a currently written target memory from a data memory set corresponding to a downgrade task, and writing the task request data into the target memory;
when the writing degree of the target storage reaches the writing degree threshold value, migrating the data in the target storage into a degraded task data storage space, and switching the currently written storage from the target storage to other data storages in the data storage set.
According to a second aspect of the embodiments of the present disclosure, there is provided a task recovery method, including:
receiving a recovery indication message; the recovery indication information is indication information for recovering the target processing task in the degraded state;
based on the recovery indication information, acquiring a task identifier corresponding to task request data corresponding to the target processing task;
task request data corresponding to the task identification is obtained from a degraded task data storage space; the task request data is stored in the degraded task data storage space when the target processing task is degraded;
and when the recovery condition is met, processing the target processing task based on the task request data.
In one possible implementation, the processing the target processing task based on the task request data when the recovery condition is met includes:
when the recovery condition is met, reading service request parameters and a task execution method from the task request data;
and performing request playback processing on the service request parameters according to the task execution method, and taking a request playback result as a processing result of the target processing task.
In one possible implementation manner, after the step of processing the target processing task based on the task request data when the recovery condition is met, the method further includes:
deleting the task request data acquired from the degraded task data storage space;
and sending a data deleting instruction to a storage server corresponding to the degraded task data storage space, wherein the data deleting instruction carries the task identifier, so that the storage server responds to the data deleting instruction, acquires the task request data according to the task identifier, and deletes the task request data corresponding to the task identifier.
In a possible implementation manner, the sending a data deletion instruction to a storage server corresponding to the degraded task data storage space includes:
sending a data deletion instruction to a storage server corresponding to the degraded task data storage space, wherein the data deletion instruction carries the task identifier and a deletion permission indication key, and the deletion permission indication key is returned to the recovery server when the storage server acquires the task request data corresponding to the task identifier from the degraded task data storage space;
and the storage server receives a deletion permission indication key carried by the data deletion instruction, performs deletion permission verification based on the deletion permission indication key, and deletes the task request data corresponding to the task identifier when the verification is passed.
According to a third aspect of the embodiments of the present disclosure, there is provided a task recovery apparatus including:
a processing task receiving unit configured to execute a target processing task of receiving processing of a target business service;
the degraded data storage unit is configured to perform degradation on the target processing task when the target business service is determined to meet the degradation condition, and store task request data corresponding to the target processing task;
and a recovery indicating unit configured to execute a recovery server corresponding to the target processing task in the degraded state selected from the candidate server set, and send a recovery indicating message corresponding to the target processing task in the degraded state to the recovery server, so that the recovery server detects a recovery condition corresponding to the target processing task in the degraded state, and when the recovery condition is met, acquire the task request data, and process the target processing task based on the task request data.
In a possible implementation manner, the degraded data storage unit is specifically configured to perform determining a service state of a base server on which the target business service depends, and when it is determined that the service state is the degraded state, obtain a target business execution attribute corresponding to the target business service; and when the target business execution attribute corresponds to the business execution attribute corresponding to the degradation, determining that the target business service meets the degradation condition, degrading the target processing task, and storing task request data corresponding to the target processing task.
In a possible implementation manner, the target service execution attribute includes a service responsiveness and a service dependency, and the degradation data storage unit is specifically further configured to perform comparison between the service responsiveness and a responsiveness corresponding to degradation, so as to obtain a first comparison result; comparing the service dependency with the dependency corresponding to the degradation to obtain a second comparison result; and when the first comparison result is that the responsiveness of the business is less than or equal to the responsiveness corresponding to degradation, and the second comparison result is that the dependency of the business is less than or equal to the dependency corresponding to degradation, determining that the target business service meets the degradation condition.
In a possible implementation manner, the degraded data storage unit is specifically further configured to execute obtaining of a service request interface corresponding to the target processing task; and determining a target business execution attribute corresponding to the target business service according to the interface information corresponding to the service request interface.
In a possible implementation manner, the destaging data storage unit is specifically configured to determine a currently written target storage from a data storage set corresponding to a destaging task, and write the task request data into the target storage; when the writing degree of the target storage reaches the writing degree threshold value, migrating the data in the target storage into a degraded task data storage space, and switching the currently written storage from the target storage to other data storages in the data storage set.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a task recovery apparatus, applied to a recovery server, where the recovery server is selected from a candidate server set, and the task recovery apparatus includes:
a restoration instruction receiving unit configured to perform receiving a restoration instruction message; the recovery indication information is indication information for recovering the target processing task in the degraded state;
the task identifier acquisition unit is configured to execute task identifier acquisition based on the recovery indication information and corresponding to the task request data corresponding to the target processing task;
the task request data acquisition unit is configured to acquire task request data corresponding to the task identifier from a degraded task data storage space; the task request data is stored in the degraded task data storage space when the target processing task is degraded;
a recovery processing unit configured to perform processing on the target processing task based on the task request data when the recovery condition is satisfied.
In a possible implementation manner, the recovery processing unit is specifically configured to read a service request parameter and a task execution method from the task request data when the recovery condition is met; and performing request playback processing on the service request parameters according to the task execution method, and taking a request playback result as a processing result of the target processing task.
In one possible implementation, the method further includes:
a first deletion unit configured to perform deletion of the task request data acquired from the degraded task data storage space;
and the second deleting unit is configured to execute sending of a data deleting instruction to a storage server corresponding to the degraded task data storage space, wherein the data deleting instruction carries the task identifier, so that the storage server responds to the data deleting instruction, acquires the task request data according to the task identifier, and deletes the task request data corresponding to the task identifier.
In a possible implementation manner, the second deleting unit is specifically configured to execute sending of a data deleting instruction to a storage server corresponding to the degraded task data storage space, where the data deleting instruction carries the task identifier and a deletion permission indication key, and the deletion permission indication key is returned to the recovery server when the storage server obtains task request data corresponding to the task identifier from the degraded task data storage space; and the storage server receives a deletion permission indication key carried by the data deletion instruction, performs deletion permission verification based on the deletion permission indication key, and deletes the task request data corresponding to the task identifier when the verification is passed.
According to a fifth aspect of the embodiments of the present disclosure, there is provided an electronic device, including a memory and a processor, the memory storing a computer program, the processor implementing the task recovery method as described in any one of the above when executing the computer program.
According to a sixth aspect of embodiments of the present disclosure, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the task recovery method as defined in any one of the above.
According to a seventh aspect of embodiments of the present disclosure, there is provided a computer program product, the program product comprising a computer program, the computer program being stored in a readable storage medium, from which at least one processor of a device reads and executes the computer program, so that the device performs the task recovery method described in any one of the first and second aspects.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
according to the scheme, the target processing task for processing the target business service is received, when the target business service is determined to meet the degradation condition, the target processing task is degraded, the task request data corresponding to the target processing task is stored, then the recovery indication message corresponding to the target processing task in the degradation state is sent to the recovery server aiming at the recovery server corresponding to the target processing task in the degradation state, which is selected from the candidate server set, so that the recovery server detects the recovery condition corresponding to the target processing task in the degradation state, when the recovery condition is met, the task request data are obtained, and the target processing task is processed based on the task request data. Therefore, normal execution of the server interface is not blocked after degradation, loss of service caused by service interruption is avoided, task processing can be timely performed during degradation recovery through the recovery server, and task processing efficiency corresponding to the service is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a diagram of an application environment illustrating a method of task recovery in accordance with an exemplary embodiment.
FIG. 2 is a flowchart illustrating a method of task recovery in accordance with an exemplary embodiment.
FIG. 3 is a schematic diagram illustrating a service request processing flow when degradation occurs in accordance with an illustrative embodiment.
FIG. 4 is a flow diagram illustrating another method of task recovery in accordance with an exemplary embodiment.
FIG. 5 is a diagram illustrating a degraded data recovery flow, according to an example embodiment.
FIG. 6 is a flowchart illustrating yet another method of task recovery in accordance with an exemplary embodiment.
FIG. 7 is a block diagram illustrating a task recovery device in accordance with an exemplary embodiment.
FIG. 8 is a block diagram illustrating another task recovery device in accordance with an exemplary embodiment.
Fig. 9 is an internal block diagram of an electronic device shown in accordance with an example embodiment.
Fig. 10 is an internal block diagram of another electronic device shown in accordance with an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure.
It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for presentation, analyzed data, etc.) referred to in the present disclosure are both information and data that are authorized by the user or sufficiently authorized by various parties.
The task recovery method provided by the present disclosure can be applied to the application environment shown in fig. 1. The terminal 110 is in communication connection with the server 120 through a network, the terminal 110 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 120 may be implemented by an independent server or a server cluster formed by a plurality of servers.
Since the business service may be deployed on multiple servers, the server 120 may provide the terminal 110 with related business services of application functions, such as business services for ordering a purchase, paying, and the like. The terminal 110 may have a plurality of application clients installed therein, such as a shopping application, a search application, a social communication application, a mailbox client application, and the like, and the server 120 may provide various business services for each application client, such as a server providing business service support for the shopping application. When the base server 150 on which the server 120 depends is in a degraded state, the server 120 may upload the received task request data to the storage server 130; based on the recovery server 140 selected from the candidate server set in advance, it may download the stored task request data from the storage server 130, and further, when the degradation is recovered, the recovery server 140 may invoke the base server 150 to perform corresponding business process processing according to the task request data.
FIG. 2 is a flowchart illustrating a task recovery method, which may be used in a computer device such as the server 120 of FIG. 1, as shown in FIG. 2, according to an example embodiment, including the following steps.
In step S210, a target processing task for processing a target business service is received;
the target service may be a service provided by the server 120 for the terminal 110, such as a related service provided for implementing an application function when the user uses an application service.
In actual application, a target business service can be triggered based on an operation of a user on the application service, and then the server can receive a target processing task for processing the target business service so as to perform corresponding business process processing aiming at the target processing task.
In step S220, when it is determined that the target service meets the degradation condition, degrading the target processing task, and storing task request data corresponding to the target processing task;
after receiving the target processing task, when it is determined that the target business service meets the degradation condition, the target processing task is degraded, and task request data corresponding to the target processing task can be stored, where the task request data may include a service request parameter and a task execution method, and the target processing task can be completed by processing the service request parameter based on the task execution method.
Specifically, the target business service may include a flow with a high real-time requirement and strong dependence, and a flow with a low real-time requirement and non-strong dependence, and if a base server on which the target business service depends degrades, a target processing task processed according to the flow with a low real-time requirement and non-strong dependence may be stored, so that when subsequent degradation is recovered, a request playback process is performed on the target processing task based on the task request data.
In an example, since a base server that depends on a shopping ordering service (i.e., a target business service) needs to be called when a business process is performed on the shopping ordering service, for example, a goods inventory query (i.e., a process that requires high real-time performance and is strongly dependent) is performed in a shopping ordering service process, and a goods inventory condition (i.e., a process that requires low real-time performance and is not strongly dependent) is fed back to a seller, if the base server is degraded due to a server failure or a high traffic load, a processing task that is processed for the process that requires low real-time performance and is not strongly dependent can be stored, and a return value that is successfully executed can be returned to a user after the storage is completed, thereby greatly improving response efficiency and performance of the server when the degradation occurs.
In step S230, for the recovery server corresponding to the target processing task in the degraded state selected from the candidate server set, sending a recovery indication message corresponding to the target processing task in the degraded state to the recovery server, so that the recovery server detects a recovery condition corresponding to the target processing task in the degraded state, and when the recovery condition is met, acquiring task request data and processing the target processing task based on the task request data.
In a specific implementation, a server may be selected from the candidate server set in advance based on the candidate server set, and the selected server may be used as a recovery server corresponding to the target processing task in the degraded state, so that when the degradation is recovered, a compensation process after the degradation is recovered is executed by the recovery server.
For example, the service may be deployed on a plurality of servers, and by selecting a server from a plurality of servers belonging to the same service in advance, the selected server may be used as a recovery server, and since the service operated by the recovery server is the same as the service operated by other servers, the difference between the service operated by the recovery server and other servers is that the recovery server has a role of compensating and recovering data, that is, the recovery server may sense whether the base server which was degraded before is recovered.
In an optional embodiment, based on the coordination configuration system, the recovery server selection may be performed for multiple servers (i.e., a candidate server set) belonging to the same service, and when a certain server successfully completes the relevant configuration of the recovery server in the coordination configuration system, the server may be determined to be the selected recovery server; the coordination configuration system can also be detected at regular time by a plurality of servers, if the recovery server is not configured, the relevant configuration of the recovery server can be carried out, and then the recovery server can be selected according to the configuration time sequence.
After the recovery server is determined, a recovery indication message corresponding to the target processing task in the degraded state may be sent to the recovery server, where the recovery indication message may carry a task identifier corresponding to task request data corresponding to the target processing task in the degraded state, and the recovery server may detect a recovery condition corresponding to the target processing task in the degraded state, and when the recovery condition is met, may obtain the task request data, and process the target processing task based on the task request data.
In the task recovery method, the target processing task for processing the target business service is received, when the target business service is determined to meet the degradation condition, the target processing task is degraded, the task request data corresponding to the target processing task is stored, and then the recovery indication message corresponding to the target processing task in the degraded state is sent to the recovery server aiming at the recovery server corresponding to the target processing task in the degraded state, which is selected from the candidate server set, so that the recovery server detects the recovery condition corresponding to the target processing task in the degraded state, and when the recovery condition is met, the task request data is obtained, and the target processing task is processed based on the task request data. Therefore, normal execution of the server interface is not blocked after degradation, loss of service caused by service interruption is avoided, task processing can be timely performed during degradation recovery through the recovery server, and task processing efficiency corresponding to the service is improved.
In an exemplary embodiment, when it is determined that the target business service meets the degradation condition, degrading the target processing task, and storing task request data corresponding to the target processing task, includes: determining the service state of a basic server on which the target service depends, and acquiring a target service execution attribute corresponding to the target service when the service state is determined to be a degraded state; and when the target business execution attribute corresponds to the business execution attribute corresponding to the degradation, determining that the target business service meets the degradation condition, degrading the target processing task, and storing task request data corresponding to the target processing task.
In a specific implementation, based on a target business service, a server may send a call request to a base server on which the server depends, and when the base server is in an undegraded state, a response message for the call request may be returned to the server, and then the server may determine a service state of the base server on which the target business service depends according to whether the response message sent by the base server is received, and if the response message sent by the base server is not received, the service state may be determined to be in a degraded state.
In an example, based on a target business execution attribute of a target business service, it may be determined that the target business service is a flow with high real-time requirement and strong dependency or a flow with low real-time requirement and non-strong dependency. When the service state is determined to be the degraded state, namely the basic server is degraded and cannot provide the basic service which the target business service depends on, the target business execution attribute corresponding to the target business service can be obtained, and further when the target business execution attribute corresponds to the business execution attribute corresponding to the degradation, the target business service is determined to meet the degradation condition, namely the process which has low real-time requirement and is not strongly dependent is processed, the target processing task can be degraded, and the task request data corresponding to the target processing task can be stored.
According to the technical scheme, by determining the service state of the basic server on which the target business service depends, when the service state is determined to be the degraded state, the target business execution attribute corresponding to the target business service is obtained, further when the target business execution attribute corresponds to the business execution attribute corresponding to the degradation, the target business service is determined to meet the degradation condition, the target processing task is degraded, and the task request data corresponding to the target processing task is stored.
In an exemplary embodiment, the determining that the target business service meets the degradation condition when the target business execution attribute corresponds to the business execution attribute corresponding to the degradation includes: comparing the service responsiveness with the responsiveness corresponding to the degradation to obtain a first comparison result; comparing the service dependency with the dependency corresponding to the degradation to obtain a second comparison result; and when the first comparison result is that the service responsiveness is less than or equal to the responsiveness corresponding to the degradation, and the second comparison result is that the service dependency is less than or equal to the dependency corresponding to the degradation, determining that the target service meets the degradation condition.
As an example, the target service execution attribute may include a service responsiveness and a service dependency, where the service responsiveness may represent a real-time requirement of the service process, and the service dependency may represent a dependency degree of the service process on the basic service, such as a responsiveness and a service dependency of a process with a high real-time requirement and a strong dependency, and a responsiveness and a service dependency higher than a process with a low real-time requirement and a non-strong dependency.
In practical application, the service responsiveness and the responsiveness corresponding to degradation can be compared according to the target service execution attribute of the target service to obtain a first comparison result, the service dependency and the dependency corresponding to degradation can be compared to obtain a second comparison result, and further, when the first comparison result is that the service responsiveness is less than or equal to the responsiveness corresponding to degradation, and the second comparison result is that the service dependency is less than or equal to the dependency corresponding to degradation, it can be determined that the target service meets the degradation condition.
For example, when the first comparison result is that the service responsiveness is less than or equal to the responsiveness corresponding to the degradation, it may be determined that the real-time requirement of the service flow corresponding to the target service is not high, and when the second comparison result is that the service dependency is less than or equal to the dependency corresponding to the degradation, it may be determined that the service flow corresponding to the target service is not strongly dependent on the basic service, and it may be further determined that the target service meets the degradation condition, that is, the service flow corresponding to the target service is a flow which is not highly required in real-time and is not strongly dependent.
According to the technical scheme of the embodiment, the service responsiveness is compared with the responsiveness corresponding to the degradation to obtain a first comparison result, then the service dependency and the dependency corresponding to the degradation are compared to obtain a second comparison result, and when the first comparison result is that the service responsiveness is less than or equal to the responsiveness corresponding to the degradation and the second comparison result is that the service dependency is less than or equal to the dependency corresponding to the degradation, it is determined that the target service meets the degradation condition, the relevant processing after degradation can be performed on the flow which is not high in real-time requirement and not strongly dependent, and the loss of the service caused by service interruption can be avoided.
In an exemplary embodiment, obtaining a target service execution attribute corresponding to a target service includes: acquiring a service request interface corresponding to a target processing task; and determining a target business execution attribute corresponding to the target business service according to the interface information corresponding to the service request interface.
The server may have a plurality of service request interfaces, and each service request interface may correspond to a service flow of a service.
After receiving a target processing task for processing a target business service, a service request interface corresponding to the target processing task can be obtained, and because the service request interface has a corresponding relationship with a business process of the target business service, a target business execution attribute corresponding to the target business service can be determined according to interface information corresponding to the service request interface.
For example, when a user requests a server interface (i.e., a service request interface), it may be determined that a flow with high real-time requirement and strong dependency or a flow with low real-time requirement and non-strong dependency is in the interface according to interface information corresponding to the server interface.
According to the technical scheme of the embodiment, the service request interface corresponding to the target processing task is obtained, the target service execution attribute corresponding to the target service is determined according to the interface information corresponding to the service request interface, whether the interior of the service request interface is a flow with low real-time requirement and non-strong dependence can be determined based on the service request interface, the relevant processing is performed after degradation aiming at the flow with low real-time requirement and non-strong dependence, and the processing efficiency and performance of the server when degradation occurs are improved.
In an exemplary embodiment, storing task request data corresponding to a target processing task includes: determining a currently written target memory from a data memory set corresponding to the downgrade task, and writing task request data into the target memory; when the writing degree of the target storage reaches the writing degree threshold value, migrating the data in the target storage into the degraded task data storage space, and switching the currently written storage from the target storage to other data storages in the data storage set.
The data storage may be a file memory map in the server, which is a map of a file inside the server in a server memory, and the server may have a plurality of data storages, and the plurality of data storages may be switched with each other.
In an example, in a case that the server has two file memory maps (i.e., a data storage set) inside, data storage may be performed by switching between the two file memory maps, for example, the file memory map a (i.e., a target storage) may be used to sequentially write data (i.e., task request data) into the server memory, and the file memory map B may be used to write data in the server memory into a disk file of the server, and may asynchronously upload data in the disk file to a file server (i.e., a storage server corresponding to a degraded task data storage space), so that the recovery server may download data and perform request playback and compensation operations after degraded recovery.
In yet another example, by writing the task request data into the server memory after the destaging, after a specified time interval, or a specified number of writes, or the data is full (i.e., the write-in degree reaches a write-in degree threshold), the data in the server memory may be written into the server disk file, and the memory mapping of the file to be written in the memory (i.e., the currently written-in storage) may be switched.
According to the technical scheme, the currently written target storage is determined from the data storage set corresponding to the degradation task, the task request data are written into the target storage, and then when the write-in degree of the target storage reaches the write-in degree threshold, the data in the target storage are migrated into the data storage space of the degradation task, and the currently written storage is switched from the target storage to other data storages in the data storage set.
In order to enable those skilled in the art to better understand the above steps, the embodiment of the present disclosure is illustrated below by an example, but it should be understood that the embodiment of the present disclosure is not limited thereto.
As shown in fig. 3, when a user requests a server interface (i.e., a service request interface), if the inside of the interface is a flow with high real-time requirement and strong dependency, when a basic server depended by a service (i.e., a target service) is in a degraded state, error information or a preset return value may be directly returned to the user; step two can be entered when the state is not degraded and the normal execution is successful; if the interface is internally provided with a flow which has low real-time requirement and is not strongly dependent, when the basic server which the service depends on is in the non-degraded state and is successfully executed normally, a return value of successful execution can be returned to the user, and when the basic server which the service depends on is in the degraded state, the third step can be carried out; the service request parameters and the task execution method (i.e., the task request data) can be saved through the file memory map a and the file memory map B (i.e., the data storage set), and a return value of successful execution can be returned to the user after the saving is successful.
Fig. 4 is a flowchart illustrating another task recovery method according to an exemplary embodiment, which is applied to a recovery server selected from a candidate server set, as shown in fig. 4, and includes the following steps, taking the method as an example applied to the recovery server 140 in fig. 1.
In step S410, a recovery indication message is received; the restoration instruction information is instruction information for restoring the target processing task in the degraded state;
in a specific implementation, for a recovery server selected from a candidate server set, the recovery server may receive a recovery indication message, where the recovery indication message is indication information for recovering a target processing task in a degraded state, and then the recovery server will assume the roles of compensation and recovery of data.
In step S420, based on the recovery indication information, a task identifier corresponding to task request data corresponding to the target processing task is obtained;
after receiving the recovery indication information, the recovery indication message may carry a task identifier corresponding to task request data corresponding to the target processing task in the degraded state, and the recovery server may further obtain the task identifier corresponding to the task request data corresponding to the target processing task based on the recovery indication information, so as to determine the target processing task in the degraded state to be recovered according to the task identifier.
In step S430, task request data corresponding to the task identifier is obtained from the degraded task data storage space; the task request data is stored in a degraded task data storage space when the target processing task is degraded;
the degraded task data storage space may have a corresponding storage server, such as a file server, which may store task request data corresponding to the target processing task in the degraded state to be recovered.
In practical application, the recovery server may obtain task request data corresponding to the task identifier from the degraded task data storage space according to the task identifier, where the task request data is stored in the degraded task data storage space when the target processing task is degraded, for example, when the degradation occurs, the task request data may be uploaded to a storage server corresponding to the degraded task data storage space, so that the recovery server may download data and perform request playback and compensation operations after the degradation is recovered.
In an example, the recovery server may detect a storage server corresponding to the degraded task data storage space to determine whether there is uploaded task request data, and when there is task request data corresponding to a target processing task to be recovered in a degraded state, the task request data may be downloaded locally to the recovery server; the recovery server can also repeatedly detect the storage server corresponding to the degraded task data storage space according to the specified time interval.
In step S440, when the recovery condition is met, the target processing task is processed based on the task request data.
In practical application, since the recovery server can sense whether the base server degraded before is recovered, it can be determined that the recovery condition is met when the base server is recovered, and the recovery server can process the target processing task based on the downloaded task request data, such as performing request playback and compensation operations after the degradation recovery.
Specifically, the recovery server may call the degraded base server according to a preset time threshold, and when the base server returns a response message to the call request sent by the recovery server, it may be determined that the previous degraded base server has been recovered.
According to the task recovery method, the task identification corresponding to the task request data corresponding to the target processing task is obtained based on the recovery indication information by receiving the recovery indication message, then the task request data corresponding to the task identification is obtained from the degraded task data storage space, and further when the recovery condition is met, the target processing task is processed based on the task request data, the recovered state of the basic server which is degraded before can be obtained in time through the recovery server, the task processing can be carried out in time during the degradation recovery, and the processing efficiency of the server during the degradation is improved.
In an exemplary embodiment, when the recovery condition is met, processing the target processing task based on the task request data includes: when the recovery condition is met, reading service request parameters and a task execution method from the task request data; and performing request playback processing on the service request parameters according to the task execution method, and taking a request playback result as a processing result of the target processing task.
In a specific implementation, when the recovery condition is met, the recovery server can read the service request parameter and the task execution method from the task request data, and further can perform request playback processing on the service request parameter according to the task execution method, and take a request playback result as a processing result of a target processing task, so that data compensation operation can be performed at the first time after basic service degradation recovery, and request playback is completed.
According to the technical scheme, when the recovery condition is met, the service request parameter and the task execution method are read from the task request data, the service request parameter is subjected to request playback processing according to the task execution method, and the request playback result is used as the processing result of the target processing task, so that the task request data can be requested to be played back in time when the recovery server recovers degradation, and the processing effectiveness of the server when degradation occurs is guaranteed.
In an exemplary embodiment, after the step of processing the target processing task based on the task request data when the recovery condition is met, the method further includes: deleting the task request data acquired from the degraded task data storage space; and sending a data deleting instruction to a storage server corresponding to the degraded task data storage space, wherein the data deleting instruction carries a task identifier, so that the storage server responds to the data deleting instruction, obtains task request data according to the task identifier and deletes the task request data corresponding to the task identifier.
In a specific implementation, the recovery server may delete the task request data acquired from the degraded task data storage space, and may send a data deletion instruction to the storage server corresponding to the degraded task data storage space, where the data deletion instruction may carry a task identifier, and the storage server may further respond to the data deletion instruction, acquire the task request data according to the task identifier, and delete the task request data corresponding to the task identifier.
According to the technical scheme of the embodiment, task request data acquired from the degraded task data storage space is deleted; and sending a data deleting instruction to a storage server corresponding to the degraded task data storage space, wherein the data deleting instruction carries a task identifier, so that the storage server responds to the data deleting instruction, acquires the task request data according to the task identifier, deletes the task request data corresponding to the task identifier, and can delete the task request data which is processed after the degradation recovery, thereby saving the storage space and improving the performance of the server.
In an exemplary embodiment, sending a data deletion instruction to a storage server corresponding to the destage task data storage space includes: sending a data deleting instruction to a storage server corresponding to the degraded task data storage space, wherein the data deleting instruction carries a task identifier and a deleting authority indicating key, and the deleting authority indicating key is returned to the recovery server when the recovery server acquires the task request data corresponding to the task identifier from the degraded task data storage space; and the storage server receives a deletion authority indicating key carried by the data deletion instruction, performs deletion authority verification based on the deletion authority indicating key, and deletes the task request data corresponding to the task identifier when the verification is passed.
In an example, when the recovery server obtains the task request data corresponding to the task identifier from the degraded task data storage space, the storage server may return a deletion permission indication key to the recovery server, where the deletion permission indication key may be used to delete the task request data corresponding to the task identifier, and the storage server may store the deletion permission indication key in correspondence with the task identifier. When the storage server receives a data deletion instruction sent by the recovery server, a deletion permission indication key which is stored correspondingly in advance can be obtained according to a task identifier carried in the data deletion instruction, and then the stored deletion permission indication key and the deletion permission indication key in the received data deletion instruction can be compared (namely deletion permission verification), and when the comparison is consistent, the verification can be determined to pass, and the task request data corresponding to the task identifier is deleted.
According to the technical scheme, a data deleting instruction is sent to a storage server corresponding to the degraded task data storage space, the data deleting instruction carries a task identifier and a deleting permission indication key, the deleting permission indication key is returned to a recovery server when the storage server obtains task request data corresponding to the task identifier from the degraded task data storage space, the storage server receives the deleting permission indication key carried by the data deleting instruction, deleting permission verification is conducted based on the deleting permission indication key, when the verification is passed, the task request data corresponding to the task identifier is deleted, deleting permission verification can be conducted based on the deleting permission indication key, and accuracy and safety of data deleting are guaranteed.
In order to enable those skilled in the art to better understand the above steps, the embodiment of the present disclosure is illustrated below by an example, but it should be understood that the embodiment of the present disclosure is not limited thereto.
As shown in fig. 5, in the election stage, since the service may be deployed on multiple servers, each server may initiate election, and further a recovery server corresponding to the target processing task in the degraded state may be selected from the candidate server set, for example, both server a and server B may initiate election, and it may be determined that server a is a recovery server and server B is a non-recovery server according to the selection result of the candidate server set; in the degradation stage, when degradation occurs, the server a and the server B can save parameter memory mapping (i.e., store task request data corresponding to a target processing task) for a process with low real-time requirement and no strong dependence; in the first recovery stage, the server a serving as a recovery server may detect a file storage server (i.e., a storage server corresponding to the degraded task data storage space), and when it is determined that the parameter file (i.e., the task request data) is stored, may download the stored parameter file to the local of the server a; in the second recovery stage, the recovery server can sense whether the previously degraded downstream basic server is recovered, and if the degraded recovery is performed, the recovery server can read data from the parameter file and call the corresponding downstream basic servers one by one to perform compensation operation and request playback based on the downloaded stored parameter file; in the third recovery stage, for the parameter file that has completed the compensation operation and requested playback, the corresponding parameter file may be deleted from the file storage server, and the corresponding parameter file downloaded locally in the recovery server may be deleted.
FIG. 6 is a flowchart illustrating yet another task recovery method, as shown in FIG. 6, for use in a computer device, such as a server, according to an example embodiment, including the following steps.
In step S610, a target processing task that processes a target business service is received. In step S620, when it is determined that the target business service meets the degradation condition, the target processing task is degraded, and task request data corresponding to the target processing task is stored. In step S630, for a recovery server corresponding to the target processing task in the degraded state selected from the candidate server set, sending a recovery indication message corresponding to the target processing task in the degraded state to the recovery server, so that the recovery server detects a recovery condition corresponding to the target processing task in the degraded state, and when the recovery condition is met, acquiring the task request data, and processing the target processing task based on the task request data. In step S640, a recovery indication message is received; the restoration instruction information is instruction information for restoring the target processing task in the degraded state. In step S650, based on the recovery indication information, a task identifier corresponding to task request data corresponding to the target processing task is obtained. In step S660, task request data corresponding to the task identifier is acquired from a degraded task data storage space; and the task request data is stored in the degraded task data storage space when the target processing task is degraded. In step S670, when the recovery condition is met, the target processing task is processed based on the task request data. In step S680, the task request data acquired from the degraded task data storage space is deleted. In step S690, a data deletion instruction is sent to the storage server corresponding to the degraded task data storage space, where the data deletion instruction carries the task identifier, so that the storage server responds to the data deletion instruction, obtains the task request data according to the task identifier, and deletes the task request data corresponding to the task identifier. It should be noted that, for the specific limitations of the above steps, reference may be made to the above specific limitations of a task recovery method, which are not described herein again.
It should be understood that, although the steps in the flowcharts of fig. 2, 4 and 6 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 2, 4, and 6 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the steps or stages in other steps.
It is understood that the same/similar parts between the embodiments of the method described above in this specification can be referred to each other, and each embodiment focuses on the differences from the other embodiments, and it is sufficient that the relevant points are referred to the descriptions of the other method embodiments.
FIG. 7 is a block diagram illustrating a task recovery device according to an example embodiment. Referring to fig. 7, the apparatus includes:
a processing task receiving unit 701 configured to execute a target processing task of receiving processing of a target business service;
a degraded data storage unit 702, configured to perform, when it is determined that the target business service meets a degradation condition, degrading the target processing task, and storing task request data corresponding to the target processing task;
a recovery indicating unit 703 configured to execute a recovery server corresponding to the target processing task in the degraded state selected from the candidate server set, and send a recovery indicating message corresponding to the target processing task in the degraded state to the recovery server, so that the recovery server detects a recovery condition corresponding to the target processing task in the degraded state, and when the recovery condition is met, acquires the task request data, and processes the target processing task based on the task request data.
In a possible implementation manner, the degraded data storage unit 702 is specifically configured to perform determining a service state of a base server on which the target business service depends, and when it is determined that the service state is a degraded state, obtain a target business execution attribute corresponding to the target business service; and when the target business execution attribute corresponds to the business execution attribute corresponding to the degradation, determining that the target business service meets the degradation condition, degrading the target processing task, and storing task request data corresponding to the target processing task.
In a possible implementation manner, the target service execution attribute includes a service responsiveness and a service dependency, and the degradation data storage unit 702 is further specifically configured to perform comparison between the service responsiveness and a responsiveness corresponding to degradation, so as to obtain a first comparison result; comparing the service dependency with the dependency corresponding to the degradation to obtain a second comparison result; and when the first comparison result is that the responsiveness of the business is less than or equal to the responsiveness corresponding to degradation, and the second comparison result is that the dependency of the business is less than or equal to the dependency corresponding to degradation, determining that the target business service meets the degradation condition.
In a possible implementation manner, the degraded data storage unit 702 is further specifically configured to execute obtaining a service request interface corresponding to the target processing task; and determining a target business execution attribute corresponding to the target business service according to the interface information corresponding to the service request interface.
In a possible implementation manner, the degraded data storage unit 702 is specifically configured to determine a currently written target storage from a data storage set corresponding to a degraded task, and write the task request data into the target storage; when the writing degree of the target storage reaches the writing degree threshold value, migrating the data in the target storage into a degraded task data storage space, and switching the currently written storage from the target storage to other data storages in the data storage set.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 8 is a block diagram illustrating another task recovery device, according to an example embodiment. Referring to fig. 8, the apparatus is applied to a recovery server, which is selected from a candidate server set, and includes:
a recovery indication receiving unit 801 configured to perform receiving a recovery indication message; the recovery indication information is indication information for recovering the target processing task in the degraded state;
a task identifier obtaining unit 802, configured to perform, based on the recovery indication information, obtaining a task identifier corresponding to task request data corresponding to the target processing task;
a task request data obtaining unit 803, configured to perform obtaining task request data corresponding to the task identifier from a degraded task data storage space; the task request data is stored in the degraded task data storage space when the target processing task is degraded;
a recovery processing unit 804 configured to perform processing on the target processing task based on the task request data when the recovery condition is met.
In a possible implementation manner, the recovery processing unit 804 is specifically configured to read a service request parameter and a task execution method from the task request data when the recovery condition is met; and performing request playback processing on the service request parameters according to the task execution method, and taking a request playback result as a processing result of the target processing task.
In one possible implementation manner, the task recovery apparatus further includes:
a first deletion unit configured to perform deletion of the task request data acquired from the degraded task data storage space;
and the second deleting unit is configured to execute sending of a data deleting instruction to a storage server corresponding to the degraded task data storage space, wherein the data deleting instruction carries the task identifier, so that the storage server responds to the data deleting instruction, acquires the task request data according to the task identifier, and deletes the task request data corresponding to the task identifier.
In a possible implementation manner, the second deleting unit is specifically configured to execute sending of a data deleting instruction to a storage server corresponding to the degraded task data storage space, where the data deleting instruction carries the task identifier and a deletion permission indication key, and the deletion permission indication key is returned to the recovery server when the storage server obtains task request data corresponding to the task identifier from the degraded task data storage space; and the storage server receives a deletion permission indication key carried by the data deletion instruction, performs deletion permission verification based on the deletion permission indication key, and deletes the task request data corresponding to the task identifier when the verification is passed.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 9 is a block diagram illustrating an electronic device 900 for task recovery in accordance with an exemplary embodiment. For example, the electronic device 900 may be a server. Referring to fig. 9, electronic device 900 includes a processing component 920 that further includes one or more processors and memory resources, represented by memory 922, for storing instructions, such as applications, that are executable by processing component 920. The application programs stored in memory 922 may include one or more modules that each correspond to a set of instructions. Further, the processing component 920 is configured to execute instructions to perform the above-described methods.
The electronic device 900 may further include: the power component 924 is configured to perform power management of the electronic device 900, the wired or wireless network interface 926 is configured to connect the electronic device 900 to a network, and the input-output (I/O) interface 928. The electronic device 900 may operate based on an operating system stored in memory 922, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, or the like.
In an exemplary embodiment, a computer-readable storage medium comprising instructions, such as the memory 922 comprising instructions, executable by a processor of the electronic device 900 to perform the above-described method is also provided. The storage medium may be a computer-readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, a computer program product is also provided that includes instructions executable by a processor of the electronic device 900 to perform the above-described method.
FIG. 10 is a block diagram illustrating another electronic device 1000 for task recovery in accordance with an illustrative embodiment. For example, the electronic device 1000 may be a server. Referring to fig. 10, the electronic device 1000 includes a processing component 1020 that further includes one or more processors and memory resources, represented by memory 1022, for storing instructions, such as application programs, that are executable by the processing component 1020. The application programs stored in memory 1022 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1020 is configured to execute instructions to perform the above-described methods.
The electronic device 1000 may further include: the power component 1024 is configured to perform power management for the electronic device 1000, the wired or wireless network interface 1026 is configured to connect the electronic device 1000 to a network, and the input-output (I/O) interface 1028. The electronic device 1000 may operate based on an operating system stored in the memory 1022, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, or the like.
In an exemplary embodiment, a computer-readable storage medium comprising instructions, such as the memory 1022 comprising instructions, executable by the processor of the electronic device 1000 to perform the above-described method is also provided. The storage medium may be a computer-readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, a computer program product is also provided, which includes instructions executable by a processor of the electronic device 1000 to perform the above-described method.
It should be noted that the descriptions of the above-mentioned apparatus, the electronic device, the computer-readable storage medium, the computer program product, and the like according to the method embodiments may also include other embodiments, and specific implementations may refer to the descriptions of the related method embodiments, which are not described in detail herein.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method of task recovery, the method comprising:
receiving a target processing task for processing a target business service;
when the target business service is determined to meet the degradation condition, degrading the target processing task, and storing task request data corresponding to the target processing task;
and sending a recovery indication message corresponding to the target processing task in the degraded state to a recovery server aiming at the recovery server corresponding to the target processing task in the degraded state selected from the candidate server set, so that the recovery server detects a recovery condition corresponding to the target processing task in the degraded state, acquires the task request data when the recovery condition is met, and processes the target processing task based on the task request data.
2. The method according to claim 1, wherein when it is determined that the target business service meets a degradation condition, degrading the target processing task, and storing task request data corresponding to the target processing task, includes:
determining a service state of a basic server on which the target business service depends, and acquiring a target business execution attribute corresponding to the target business service when the service state is determined to be a degraded state;
and when the target business execution attribute corresponds to the business execution attribute corresponding to the degradation, determining that the target business service meets the degradation condition, degrading the target processing task, and storing task request data corresponding to the target processing task.
3. The method of claim 2, wherein the target business execution attribute comprises a business responsiveness and a business dependency, and wherein determining that the target business service meets a degradation condition when the target business execution attribute corresponds to a business execution attribute corresponding to degradation comprises:
comparing the service responsiveness with the responsiveness corresponding to the degradation to obtain a first comparison result;
comparing the service dependency with the dependency corresponding to the degradation to obtain a second comparison result;
and when the first comparison result is that the responsiveness of the business is less than or equal to the responsiveness corresponding to degradation, and the second comparison result is that the dependency of the business is less than or equal to the dependency corresponding to degradation, determining that the target business service meets the degradation condition.
4. A task recovery method is applied to a recovery server, wherein the recovery server is selected from a candidate server set, and the method comprises the following steps:
receiving a recovery indication message; the recovery indication information is indication information for recovering the target processing task in the degraded state;
based on the recovery indication information, acquiring a task identifier corresponding to task request data corresponding to the target processing task;
task request data corresponding to the task identification is obtained from a degraded task data storage space; the task request data is stored in the degraded task data storage space when the target processing task is degraded;
and when the recovery condition is met, processing the target processing task based on the task request data.
5. The method of claim 4, wherein processing the target processing task based on the task request data when the recovery condition is met comprises:
when the recovery condition is met, reading service request parameters and a task execution method from the task request data;
and performing request playback processing on the service request parameters according to the task execution method, and taking a request playback result as a processing result of the target processing task.
6. A task recovery apparatus, comprising:
a processing task receiving unit configured to execute a target processing task of receiving processing of a target business service;
the degraded data storage unit is configured to perform degradation on the target processing task when the target business service is determined to meet the degradation condition, and store task request data corresponding to the target processing task;
and a recovery indicating unit configured to execute a recovery server corresponding to the target processing task in the degraded state selected from the candidate server set, and send a recovery indicating message corresponding to the target processing task in the degraded state to the recovery server, so that the recovery server detects a recovery condition corresponding to the target processing task in the degraded state, and when the recovery condition is met, acquire the task request data, and process the target processing task based on the task request data.
7. A task recovery apparatus, applied to a recovery server, wherein the recovery server is selected from a candidate server set, and the task recovery apparatus includes:
a restoration instruction receiving unit configured to perform receiving a restoration instruction message; the recovery indication information is indication information for recovering the target processing task in the degraded state;
the task identifier acquisition unit is configured to execute task identifier acquisition based on the recovery indication information and corresponding to the task request data corresponding to the target processing task;
the task request data acquisition unit is configured to acquire task request data corresponding to the task identifier from a degraded task data storage space; the task request data is stored in the degraded task data storage space when the target processing task is degraded;
a recovery processing unit configured to perform processing on the target processing task based on the task request data when the recovery condition is satisfied.
8. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the task recovery method of any one of claims 1 to 5.
9. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the task recovery method of any of claims 1 to 5.
10. A computer program product comprising instructions which, when executed by a processor of an electronic device, enable the electronic device to perform the task recovery method of any of claims 1 to 5.
CN202111505600.XA 2021-12-10 2021-12-10 Task recovery method and device, electronic equipment and storage medium Pending CN114185659A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111505600.XA CN114185659A (en) 2021-12-10 2021-12-10 Task recovery method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111505600.XA CN114185659A (en) 2021-12-10 2021-12-10 Task recovery method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114185659A true CN114185659A (en) 2022-03-15

Family

ID=80604341

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111505600.XA Pending CN114185659A (en) 2021-12-10 2021-12-10 Task recovery method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114185659A (en)

Similar Documents

Publication Publication Date Title
US11416344B2 (en) Partial database restoration
CN106951345B (en) Consistency test method and device for disk data of virtual machine
US20060010337A1 (en) Management system and management method
US11176110B2 (en) Data updating method and device for a distributed database system
US9514176B2 (en) Database update notification method
CN109597707A (en) Clone volume data copying method, device and computer readable storage medium
CN109165078B (en) Virtual distributed server and access method thereof
CN110717130B (en) Dotting method, dotting device, dotting terminal and storage medium
CN111342986A (en) Distributed node management method and device, distributed system and storage medium
CN108959548B (en) Service request processing method and device
CN114185659A (en) Task recovery method and device, electronic equipment and storage medium
US11693844B2 (en) Processing delete requests based on change feed of updates
CN110928945B (en) Data processing method and device for database and data processing system
CN114928620A (en) User information synchronization method, device, equipment, storage medium and program product
CN111208949B (en) Method for determining data rollback time period in distributed storage system
CN110515803B (en) Processing method and device for log message and electronic equipment
CN110209351B (en) Distributed storage data processing method and device
CN112988192A (en) Version updating method and device, electronic equipment and storage medium
CN113238815A (en) Interface access control method, device, equipment and storage medium
CN112231290A (en) Method, device and equipment for processing local log and storage medium
CN106375354B (en) Data processing method and device
CN112286804B (en) System debugging method, device, equipment and medium
CN116662451A (en) Data synchronization processing method and device, computer equipment and storage medium
CN117076191A (en) File metadata backup method on HDD disk and metadata backup server
CN113672678A (en) Data synchronization method, device and system

Legal Events

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