A data processing method and device, electronic equipment and storage medium

By merging the recovery information of complement events and processing directed acyclic graphs, the problem that the complement device cannot accurately determine the generation status of task instances is solved, ensuring that each task instance accurately generates data and improving the accuracy of data processing.

CN114020506BActive Publication Date: 2026-03-10BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-29
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

The complement device cannot accurately determine whether a task instance has successfully generated data without quality issues, which may cause downstream task instances to generate problematic data, affecting the accuracy of data processing.

Method used

By determining the recovery information of the complement event, the target recovery information of the target complement event is obtained through merging and processing. The target complement event is then run to control the data generation of the task instance. The target directed acyclic graph is generated by merging the basic directed acyclic graph to obtain the dependencies and running status of the task instance, ensuring that each task instance generates data accurately.

Benefits of technology

To avoid duplicate data generation by task instances, accurately determine the generation status of each task instance, prevent downstream task instances from generating data with quality issues, and improve the accuracy of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114020506B_ABST
    Figure CN114020506B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a data processing method and device, electronic equipment and storage medium, and belongs to the technical field of computer. The method comprises: determining recovery information of one or more complement events; performing merging processing on the recovery information of the one or more complement events to obtain target recovery information of a target complement event; and running the target complement event, the target complement event being used to control each task instance in the plurality of task instances to generate data according to the target recovery information. In the present disclosure, the electronic equipment can avoid each task instance in the plurality of task instances from repeatedly generating data, can make each task instance start to generate data based on the same operation (i.e. running the target complement event), can accurately determine whether each task instance has successfully generated data, avoid downstream task instances from generating data with quality problems, and improve the accuracy of data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a data processing method, apparatus, electronic device, and storage medium. Background Technology

[0002] Currently, in cases where some historical data is missing or has been deleted, the complement device can generate multiple task instances corresponding to the historical data, so that the historical data can be generated after the multiple task instances have completed their operations.

[0003] However, in the above method, a single task instance may correspond to different projects. Specifically, for one project, the task instance may be in the process of not yet starting data generation; while for another project, the task instance may be in the process of just starting data generation. Thus, the complement device may not be able to accurately determine whether the task instance has successfully generated data without quality issues. Consequently, when the task instance generates data with quality issues, it may cause its corresponding downstream task instances to also generate problematic data, affecting the accuracy of data processing. Summary of the Invention

[0004] This disclosure provides a data processing method, apparatus, electronic device, and storage medium, which solves the technical problem that the complement device may be unable to accurately determine whether the task instance has successfully generated data without quality problems, thereby causing the downstream task instance to generate problematic data.

[0005] The technical solution of this disclosure is as follows:

[0006] According to a first aspect of the present disclosure, a data processing method is provided. The method may include: determining recovery information for one or more complement events, wherein the recovery information for one complement event includes identifiers of at least two task instances corresponding to the complement event, the running states of the at least two task instances, and dependencies between the at least two task instances; performing a merging process on the recovery information of the one or more complement events to obtain target recovery information for a target complement event, the target complement event including the one or more complement events, the target complement event corresponding to multiple task instances, the multiple task instances including each task instance corresponding to the one or more complement events, the target recovery information including the target running states of the multiple task instances, the target running states of the multiple task instances being determined based on the running states of the task instances corresponding to each of the one or more complement events; and running the target complement event, the target complement event being used to control each of the multiple task instances to generate data according to the target recovery information.

[0007] Optionally, the above data processing method further includes: generating a basic directed acyclic graph (DAG) corresponding to each of the one or more complement events based on the recovery information of the one or more complement events, wherein the basic DAG corresponding to a complement event includes a task instance node, the running state of the task instance represented by the task instance node, and an edge, the edge being used to connect task instance nodes with dependencies; the above-mentioned merging processing of the recovery information of the one or more complement events to obtain the target recovery information of the target complement event specifically includes: performing a merging processing on the basic DAG corresponding to each of the one or more complement events to generate a target DAG corresponding to the target complement event, the target DAG including the task instance nodes included in the basic DAG corresponding to each of the one or more complement events, the edges included in the basic DAG, and the target running states of the multiple task instances, the multiple task instances being the task instances represented by multiple task instance nodes, and the multiple task instance nodes being the task instance nodes included in the target DAG; and obtaining the target recovery information based on the target DAG.

[0008] Optionally, the above data processing method further includes: determining whether a first task instance node exists in the first basic directed acyclic graph, and whether the first task instance node exists in other basic directed acyclic graphs, wherein the first basic directed acyclic graph is the basic directed acyclic graph corresponding to the first complement event, the first complement event is one of the plurality of complement events, the other basic directed acyclic graphs are the basic directed acyclic graphs corresponding to other complement events, the other complement events are complement events other than the first complement event among the plurality of complement events, and the first task instance node is one of the plurality of task instance nodes; when the first task instance node exists in the first basic directed acyclic graph, and the first task instance node exists in the other basic directed acyclic graphs; When an instance node is defined, the target running state of the first task instance is determined based on its running state in the first basic directed acyclic graph and its running state in other basic directed acyclic graphs. The first task instance is the task instance represented by the first task instance node. The above-mentioned merging process of the basic directed acyclic graphs corresponding to each complement event in the one or more complement events to generate the target directed acyclic graph corresponding to the target complement event specifically includes: obtaining the target directed acyclic graph based on the multiple task instance nodes, the target running states of the multiple task instances, and multiple edges. The multiple edges include each edge included in the basic directed acyclic graph corresponding to each complement event in the one or more complement events.

[0009] Optionally, determining the target running state of the first task instance based on its running state in the first basic directed acyclic graph and its running state in other basic directed acyclic graphs specifically includes: when the running state of the first task instance in the first basic directed acyclic graph is "to be run", or when the running state of the first task instance in other basic directed acyclic graphs is "to be run", determining the target running state of the first task instance as "to be run".

[0010] Optionally, the above data processing method further includes: when the first task instance node exists in the first basic directed acyclic graph and the first task instance node does not exist in other basic directed acyclic graphs, determining the target running state of the first task instance based on the running state of the first task instance in the first basic directed acyclic graph.

[0011] Optionally, the current task instance node is either the root node or a non-root node in the target directed acyclic graph. The above-mentioned control of each task instance among the multiple task instances to generate data based on the target recovery information specifically includes: when the current task instance node is a non-root node, determining the number of directly upstream successful nodes of the current task instance node. Each directly upstream successful node is a node whose target running state is "running successfully" among the directly upstream nodes of the current task instance node. Each directly upstream node is an upstream task instance node that has a dependency relationship with the current task instance node. The target running state corresponding to a task instance node is the target running state of the task instance represented by the task instance node. When the number of directly upstream successful nodes equals the number of directly upstream nodes, controlling the current task instance to start generating data and updating the running state of the current task instance to "running," the current task instance being the task instance represented by the current task instance node.

[0012] Optionally, the target recovery information includes the priority of each of the multiple task instances, and the data processing method further includes: when the number of successful upstream nodes is equal to the number of direct upstream nodes, and the direct upstream node is the same as the direct upstream node of the second task instance node, determining whether the priority of the second task instance is higher than the priority of the current task instance, wherein the second task instance node is a task instance node other than the current task instance node among the multiple task instance nodes, and the second task instance is the task instance represented by the second task instance node; when the priority of the second task instance is higher than the priority of the current task instance, controlling the second task instance to start generating data first.

[0013] Optionally, the above data processing method further includes: terminating the one or more complement events.

[0014] According to a second aspect of the present disclosure, a data processing apparatus is provided. The apparatus may include: a determining module and a processing module; the determining module is configured to determine recovery information for one or more complement events, wherein the recovery information for one complement event includes identifiers of at least two task instances corresponding to the complement event, the running states of the at least two task instances, and dependencies between the at least two task instances; the processing module is configured to perform merging processing on the recovery information of the one or more complement events to obtain target recovery information for a target complement event, the target complement event corresponding to multiple task instances, the multiple task instances including each task instance corresponding to the one or more complement events, the target recovery information including the target running states of the multiple task instances, the target running states of the multiple task instances being determined based on the running states of the task instances corresponding to each complement event in the multiple complement events; the processing module is further configured to run the target complement event, the target complement event being used to control each task instance in the multiple task instances to generate data according to the target recovery information.

[0015] Optionally, the data processing device further includes an acquisition module; the processing module is further configured to generate a basic directed acyclic graph corresponding to each of the one or more complement events based on the recovery information of the one or more complement events, wherein the basic directed acyclic graph corresponding to a complement event includes task instance nodes, the running state of the task instance represented by the task instance node, and edges, the edges being used to connect task instance nodes with dependencies; the processing module is specifically configured to perform a merging process on the basic directed acyclic graphs corresponding to each of the one or more complement events to generate a target directed acyclic graph corresponding to the target complement event, the target directed acyclic graph including the task instance nodes included in the basic directed acyclic graphs corresponding to each of the one or more complement events, the edges included in the basic directed acyclic graphs, and the target running states of the multiple task instances, the multiple task instances being the task instances represented by the multiple task instance nodes, and the multiple task instance nodes being the task instance nodes included in the target directed acyclic graph; the acquisition module is configured to acquire the target recovery information based on the target directed acyclic graph.

[0016] Optionally, the determining module is further configured to determine whether a first task instance node exists in the first basic directed acyclic graph, and whether the first task instance node exists in other basic directed acyclic graphs, wherein the first basic directed acyclic graph is the basic directed acyclic graph corresponding to the first complement event, the first complement event is one of the plurality of complement events, the other basic directed acyclic graphs are the basic directed acyclic graphs corresponding to other complement events, the other complement events are complement events other than the first complement event among the plurality of complement events, and the first task instance node is one of the plurality of task instance nodes; the determining module is further configured to determine whether the first task instance node exists in the first basic directed acyclic graph. When a first task instance node exists in the other basic directed acyclic graph, the target running state of the first task instance is determined based on its running state in the first basic directed acyclic graph and its running state in the other basic directed acyclic graphs. The first task instance is the task instance represented by the first task instance node. Specifically, the processing module is further configured to obtain the target directed acyclic graph based on the multiple task instance nodes, the target running states of the multiple task instances, and multiple edges. The multiple edges include each edge included in the basic directed acyclic graph corresponding to each of the one or more complement events.

[0017] Optionally, the determining module is specifically configured to determine the target running state of the first task instance as "waiting to run" when the running state of the first task instance in the first basic directed acyclic graph is "waiting to run" or the running state of the first task instance in another basic directed acyclic graph is "waiting to run".

[0018] Optionally, the determining module is further configured to determine the target running state of the first task instance by the running state of the first task instance in the first basic directed acyclic graph when the first task instance node exists in the first basic directed acyclic graph and the first task instance node does not exist in the other basic directed acyclic graphs.

[0019] Optionally, the current task instance node is either the root node or a non-root node in the target directed acyclic graph. Specifically, the determining module is configured to, when the current task instance node is a non-root node, determine the number of directly upstream successful nodes of the current task instance node. A directly upstream successful node is a node among the directly upstream nodes of the current task instance node whose target running state is "running successfully." A directly upstream node is an upstream task instance node that has a dependency relationship with the current task instance node. The target running state corresponding to a task instance node is the target running state of the task instance represented by the task instance node. The processing module is further configured to, when the number of directly upstream successful nodes equals the number of directly upstream nodes, control the current task instance to start generating data and update the running state of the current task instance to "running." The current task instance is the task instance represented by the current task instance node.

[0020] Optionally, the target recovery information includes the priority of each of the plurality of task instances; the determining module is further configured to determine whether the priority of the second task instance is higher than the priority of the current task instance when the number of successful upstream nodes is equal to the number of direct upstream nodes, and the direct upstream node is the same as the direct upstream node of the second task instance node; the second task instance node is a task instance node other than the current task instance node among the plurality of task instance nodes, and the second task instance is the task instance represented by the second task instance node; the processing module is further configured to control the second task instance to start generating data first when the priority of the second task instance is higher than the priority of the current task instance.

[0021] Optionally, the processing module is also configured to terminate the one or more complement events.

[0022] According to a third aspect of the present disclosure, an electronic device is provided, which may include: a processor and a memory configured to store processor-executable instructions; wherein the processor is configured to execute the instructions to implement any of the optional data processing methods of the first aspect described above.

[0023] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, which stores instructions that, when executed by an electronic device, enable the electronic device to perform any of the optional data processing methods described in the first aspect.

[0024] According to a fifth aspect of the present disclosure, a computer program product is provided, the computer program product including computer instructions that, when executed on an electronic device, cause the electronic device to perform any of the optional data processing methods of the first aspect.

[0025] The technical solutions provided by the embodiments of this disclosure have at least the following beneficial effects:

[0026] Based on any of the foregoing aspects, in this disclosure, the electronic device can determine the recovery information of one or more complement events and perform merging processing on the recovery information of the one or more complement events to obtain the target recovery information of the target complement event. Since the target complement event corresponds to multiple task instances, and the multiple task instances include each task instance corresponding to the one or more complement events, the target recovery information includes the identifier of each task instance among the multiple task instances, the target running state of each task instance, and the dependency relationship between each task instance and other task instances. Then, the electronic device can run the target complement event, which is used to generate data for each task instance among the multiple task instances according to the target recovery information. In this embodiment of the disclosure, the electronic device can run the target complement event to control each task instance among the multiple task instances to generate data, i.e., without executing the one or more complement events, avoiding duplicate data generation by each task instance among the multiple task instances, enabling each task instance to start generating data based on the same operation (i.e., running the target complement event), accurately determining whether each task instance has successfully generated data, preventing downstream task instances from generating data with quality problems, and improving the accuracy of data processing.

[0027] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0028] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.

[0029] Figure 1 A schematic flowchart of a data processing method provided in an embodiment of this disclosure is shown;

[0030] Figure 2 A flowchart illustrating another data processing method provided in an embodiment of this disclosure is shown;

[0031] Figure 3 A flowchart illustrating another data processing method provided in an embodiment of this disclosure is shown;

[0032] Figure 4 A flowchart illustrating another data processing method provided in an embodiment of this disclosure is shown;

[0033] Figure 5A schematic diagram of a merging directed acyclic graph provided in an embodiment of this disclosure is shown;

[0034] Figure 6 A flowchart illustrating another data processing method provided in an embodiment of this disclosure is shown;

[0035] Figure 7 A flowchart illustrating another data processing method provided in an embodiment of this disclosure is shown;

[0036] Figure 8 A flowchart illustrating another data processing method provided in an embodiment of this disclosure is shown;

[0037] Figure 9 A flowchart illustrating another data processing method provided in an embodiment of this disclosure is shown;

[0038] Figure 10 A schematic diagram of the structure of a data processing apparatus provided in an embodiment of this disclosure is shown;

[0039] Figure 11 A schematic diagram of the structure of another data processing apparatus provided in an embodiment of the present disclosure is shown. Detailed Implementation

[0040] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0041] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0042] It should also be understood that the term "comprising" indicates the presence of the described feature, whole, step, operation, element and / or component, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements and / or components.

[0043] The data disclosed herein may be data authorized by the user or fully authorized by all parties.

[0044] As described in the background section, since the complement device may not be able to accurately determine whether a task instance has successfully generated data without quality issues, downstream task instances may generate problematic data. Based on this, embodiments of this disclosure provide a data processing method in which an electronic device can run a target complement event to control each task instance among multiple task instances to generate data. Specifically, one or more complement events are not executed, avoiding duplicate data generation by each task instance. This method enables each task instance to start generating data based on the same operation (i.e., running the target complement event), accurately determining whether each task instance has successfully generated data, preventing downstream task instances from generating data with quality issues, and improving the accuracy of data processing.

[0045] The data processing method, apparatus, electronic device, and storage medium provided in this disclosure are applied to scenarios involving the generation of historical data (or the recovery of historical data). When the electronic device obtains recovery information for multiple complement events, it can control each task instance among multiple task instances to generate data according to the method provided in this disclosure.

[0046] The data processing method provided in the embodiments of this disclosure is illustrated below with reference to the accompanying drawings:

[0047] It is understood that the electronic device executing the data processing method provided in the embodiments of this disclosure can be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) / virtual reality (VR) device, etc., which can install and use content community applications. This disclosure does not impose any special limitations on the specific form of the electronic device. It can interact with the user through one or more methods such as keyboard, touchpad, touch screen, remote control, voice interaction, or handwriting device.

[0048] like Figure 1 As shown, the data processing method provided in this embodiment may include S101-S103.

[0049] S101, The electronic device determines recovery information for one or more complement events.

[0050] The recovery information for a complement event includes the identifiers of at least two task instances corresponding to the complement event, the running status of the at least two task instances, and the dependencies between the at least two task instances.

[0051] It should be understood that the complement events (including the one or more complement events and the target complement event) in the embodiments of this disclosure can be applied to scenarios involving the generation of historical data (or the recovery of historical data). Specifically, the following situations may exist:

[0052] In one scenario, the current task instance might be a task instance generated in the current year (e.g., 2021), from which data for the current year can be generated. However, the electronic device might need to obtain data generated in a historical year (e.g., 2019). In this case, the electronic device needs to create and trigger a complement event, which corresponds to the task instance of that historical year, and then obtain the data generated in that historical year—i.e., historical data—based on that historical task instance.

[0053] In another scenario, historical data may have existed initially, but it might have been deleted during subsequent processing. In this case, when an electronic device needs to retrieve this data, it must process (or operate on) the task instance corresponding to a complement event to obtain the relevant data, i.e., the historical data.

[0054] In another scenario, the electronic device may determine that the data generated by the current task instance has quality issues, but this task instance may not be the source task instance that generated the problematic data. In this case, the electronic device can create a complement event to generate historical data based on the task instance corresponding to that complement event, thereby tracing back to the source task instance that generated the problematic data.

[0055] It is understandable that the relationship between a task and a task instance is similar to the relationship between a program and a process. For a task, each execution of the task will generate a task instance, and different task instances will generate different data partitions. These data partitions can be understood as partitions that store the data generated (or obtained after operations) by the task instance.

[0056] In this embodiment of the disclosure, the running status of a task instance may include pending execution, running, successful execution, and failed execution. Specifically, pending execution indicates that the task instance has not yet started generating data; running indicates that the task instance has started generating data (or is in the process of generating data); successful execution indicates that the task instance has successfully generated data; and failed execution indicates that the task instance failed to successfully generate data.

[0057] The dependency relationship between the aforementioned at least two task instances is used to characterize the upstream and downstream relationship between the at least two task instances. For example, assuming that the at least two task instances include a first task instance and a second task instance, if the first task instance is an upstream task instance of the second task instance (i.e., the second task instance is a downstream task instance of the first task instance), then the electronic device can determine that there is a dependency relationship between the first task instance and the second task instance.

[0058] It should be noted that the task instance corresponding to each of the one or more complement events can be understood as a complement instance. That is, if the complement event is executed, the task instance corresponding to the complement event (i.e., the complement instance) will be supplemented and executed. Specifically, the task instance corresponding to the complement event will generate data, that is, supplement the data of the task instance corresponding to the complement event.

[0059] Optionally, the identifier of a task instance can be the primary key of the task instance, which can be a combination of the name of the task corresponding to the task instance and the generation time of the task instance.

[0060] S102. The electronic device performs merging processing on the recovery information of one or more complement events to obtain the target recovery information of the target complement event.

[0061] The target complement event includes one or more complement events, the target complement event corresponds to multiple task instances, the multiple task instances include each task instance corresponding to the one or more complement events, the target recovery information includes the target running status of the multiple task instances, and the target running status of the multiple task instances is determined based on the running status of the task instances corresponding to each complement event in the one or more complement events.

[0062] It should be understood that the target complement event can be a new complement event created by the electronic device, and the target complement event can simultaneously characterize the one or more complement events. The target recovery information includes the recovery information of each complement event in the one or more complement events.

[0063] In one implementation of this disclosure, when any two of the multiple complement events correspond to (or exist) the same task instance, the electronic device can perform a merging operation on the recovery information of the multiple complement events.

[0064] S103, Electronic device operation target complement event.

[0065] The target complement event is used to control each task instance among the multiple task instances to generate data based on the target recovery information.

[0066] It should be understood that when an electronic device runs the target complement event, it controls each of the multiple task instances to perform a complement operation, thereby enabling each task instance to generate data.

[0067] It is understandable that an electronic device controlling one of the multiple task instances to generate data can include the following two scenarios:

[0068] In one scenario, if the task instance has not previously generated data, the electronic device controls the task instance to generate data, i.e., controls the task instance to generate data for the first time.

[0069] In another scenario, the task instance has previously generated data (which may have been deleted). The electronic device controls the task instance to generate data, which means controlling the task instance to regenerate data, or controlling the task instance to perform a rerun recovery operation.

[0070] Alternatively, the electronic device may also perform a blocking operation on the target complement event, causing each of the multiple task instances to pause data generation.

[0071] The technical solution provided by the above embodiments can bring at least the following beneficial effects: As shown in S101-S103, the electronic device can determine the recovery information of one or more complement events, and perform merging processing on the recovery information of the one or more complement events to obtain the target recovery information of the target complement event. Since the target complement event corresponds to multiple task instances, and the multiple task instances include each task instance corresponding to the one or more complement events, the target recovery information includes the identifier of each task instance among the multiple task instances, the target running state of each task instance, and the dependency relationship between each task instance and other task instances. Then the electronic device can run the target complement event, which is used to generate data for each task instance among the multiple task instances according to the target recovery information. In this embodiment of the disclosure, the electronic device can run a target complement event to control each task instance in multiple task instances to generate data. That is, without executing the one or more complement events, the data generation of each task instance in the multiple task instances is avoided. The device can start each task instance to generate data based on the same operation (i.e., running the target complement event), and can accurately determine whether each task instance has successfully generated data, thereby preventing downstream task instances from generating data with quality problems and improving the accuracy of data processing.

[0072] Combination Figure 1 ,like Figure 2 As shown, the data processing method provided in this embodiment may further include S104.

[0073] S104. The electronic device generates a basic directed acyclic graph corresponding to each complement event in one or more complement events based on the recovery information of one or more complement events.

[0074] The underlying directed acyclic graph corresponding to a complement event includes a task instance node, the running state of the task instance represented by the task instance node, and an edge used to connect task instance nodes with dependencies.

[0075] Based on the description of the above embodiments, it should be understood that the dependency relationship is used to characterize the upstream and downstream relationships between task instance nodes. For example, when a first task instance node (which is the end point of an edge, or the end point in the direction of the arrow on that edge) depends on a second task instance node (which is the start point of that edge, or the start point in the direction of the arrow on that edge), the electronic device can determine that the first task instance node is a (direct) downstream task instance node of the second task instance node.

[0076] Continue as Figure 2 As shown, the above-mentioned merging process is performed on the recovery information of one or more complement events to obtain the target recovery information of the target complement event, specifically including S1021-S1022.

[0077] S1021. The electronic device performs a merging process on the underlying directed acyclic graphs corresponding to each of the complement events in one or more complement events to generate a target directed acyclic graph corresponding to the target complement event.

[0078] The target directed acyclic graph includes the task instance nodes of the basic directed acyclic graph corresponding to each of the one or more complement events, the edges included in the basic directed acyclic graph, and the target running state of the multiple task instances. The multiple task instances are task instances represented by multiple task instance nodes, and the multiple task instance nodes are task instance nodes included in the target directed acyclic graph.

[0079] It should be understood that a task instance node in any directed acyclic graph (including the underlying directed acyclic graph corresponding to a complement event or the target directed acyclic graph) can represent a task instance. The type of the target running state of a task instance is the same as or similar to the type of the running state of the task instance mentioned above (i.e., pending, running, running successfully, and running failed, etc.), and will not be elaborated here.

[0080] In this embodiment of the disclosure, the electronic device can create a new graph, and then add the task instance nodes included in the basic directed acyclic graph corresponding to each of the one or more complement events, the edges included in the basic directed acyclic graph corresponding to each complement event, and the target running state of the multiple task instances to the graph to generate the target directed acyclic graph.

[0081] S1022. The electronic device obtains target recovery information based on the target directed acyclic graph.

[0082] Based on the description of the above embodiments, it should be understood that since the target directed acyclic graph includes the task instance nodes of the underlying directed acyclic graph corresponding to each complement of the one or more complement events, the edges included in the underlying directed acyclic graph, and the target running states of the multiple task instances, the electronic device can determine the identifier of each of the multiple task instances based on the task instance nodes included in the underlying directed acyclic graph, determine the dependency relationship between each task instance and other task instances based on the edges included in the underlying directed acyclic graph, and determine the target running states of all task instances included in the target directed acyclic graph based on the target running states of the multiple task instances. In other words, the electronic device can obtain the target recovery information.

[0083] The technical solution provided by the above embodiments can bring at least the following beneficial effects: As shown in S104, S1021-S1022, the electronic device can generate a basic directed acyclic graph corresponding to each of the one or more complement events based on the recovery information of one or more complement events. Then, the electronic device can perform a merging process on the basic directed acyclic graphs corresponding to each of the one or more complement events to generate a target directed acyclic graph corresponding to the target complement event, and obtain the target recovery information based on the target directed acyclic graph. In this embodiment, since the target directed acyclic graph includes the task instance nodes included in the basic directed acyclic graphs corresponding to each of the one or more complement events, the edges included in the basic directed acyclic graphs, and the target running states of multiple task instances, the electronic device can obtain the target recovery information based on the task instance nodes included in the basic directed acyclic graphs, the edges included in the basic directed acyclic graphs, and the target running states of multiple task instances. The merged recovery information can be obtained completely and effectively, thereby completing the unified processing of multiple complement events.

[0084] Combination Figure 2 ,like Figure 3 As shown, the data processing method provided in this embodiment further includes S105-S106.

[0085] S105. The electronic device determines whether the first task instance node exists in the first basic directed acyclic graph, and whether the first task instance node exists in other basic directed acyclic graphs.

[0086] Wherein, the first basic directed acyclic graph is the basic directed acyclic graph corresponding to the first complement event, the first complement event is one of the above-mentioned multiple complement events, the other basic directed acyclic graphs are the basic directed acyclic graphs corresponding to other complement events, the other complement events are complement events other than the first complement event among the multiple complement events, and the first task instance node is one of the above-mentioned multiple task instance nodes.

[0087] Based on the description of the above embodiments, it should be understood that the plurality of task instance nodes are the task instance nodes included in the above-mentioned target directed acyclic graph.

[0088] S106. When a first task instance node exists in the first basic directed acyclic graph and other basic directed acyclic graphs also contain first task instance nodes, the electronic device determines the target running state of the first task instance based on the running state of the first task instance in the first basic directed acyclic graph and the running state of the first task instance in other basic directed acyclic graphs.

[0089] The first task instance is the task instance represented by the first task instance node.

[0090] It should be understood that the running state of a task instance in a basic directed acyclic graph is the running state of the task instance included in the recovery information of the complement event corresponding to the basic directed acyclic graph.

[0091] It is understandable that when a first task instance node exists in both the first basic directed acyclic graph and other basic directed acyclic graphs, it indicates that the first basic directed acyclic graph and the other basic directed acyclic graphs contain the same task instance node (i.e., the first task instance node). Thus, the electronic device can determine the target running state of the first task instance in the target directed acyclic graph based on the running state of this same task instance node in the first basic directed acyclic graph and its running state in the other basic directed acyclic graphs.

[0092] Continue as Figure 3 As shown, the above-mentioned merging process is performed on the underlying directed acyclic graphs corresponding to each of the one or more complement events to generate the target directed acyclic graph corresponding to the target complement event, which may specifically include S1021a.

[0093] S1021a. The electronic device obtains a directed acyclic graph of the target based on multiple task instance nodes, the target running status of multiple task instance nodes, and multiple edges.

[0094] The multiple edges include each edge of the underlying directed acyclic graph corresponding to each complement event in the one or more complement events mentioned above.

[0095] The technical solution provided by the above embodiments can bring at least the following beneficial effects: As can be seen from S105-S106 and S1021a, the electronic device can determine whether a first task instance node exists in the first basic directed acyclic graph, and whether the first task instance node exists in other basic directed acyclic graphs; when the first task instance node exists in the first basic directed acyclic graph and the other basic directed acyclic graphs, it indicates that the first basic directed acyclic graph and the other basic directed acyclic graphs have the same task instance node. Thus, the electronic device can determine the target running state of the first task instance node based on the running state of the same task instance node (i.e., the first task instance node) in the first basic directed acyclic graph and the running state of the first task instance node in the other basic directed acyclic graphs, thereby obtaining the target directed acyclic graph. In this embodiment of the disclosure, the electronic device can determine the target running state of a task instance based on its running state in different basic directed acyclic graphs (e.g., a first basic directed acyclic graph and other basic directed acyclic graphs). It can accurately and effectively determine the target running states of multiple task instances represented by multiple task instance nodes included in the target directed acyclic graph. Furthermore, based on the target running states of these multiple task instances, a target directed acyclic graph can be accurately generated.

[0096] Combination Figure 3 ,like Figure 4 As shown, in one implementation of this disclosure, determining the target running state of the first task instance based on the running state of the first task instance in the first basic directed acyclic graph and the running state of the first task instance in other basic directed acyclic graphs may specifically include S1061.

[0097] S1061. When the running state of the first task instance in the first basic directed acyclic graph is "waiting to run", or when the running state of the first task instance in other basic directed acyclic graphs is "waiting to run", the electronic device determines that the target running state of the first task instance is "waiting to run".

[0098] It should be understood that if the running state of the first task instance in the first basic directed acyclic graph is "pending execution," or if the running state of the first task instance in other basic directed acyclic graphs is "pending execution," it means that the running state of the first task instance in one of the two basic directed acyclic graphs is "pending execution." In this case, the electronic device can determine "pending execution" as the running state of the first task instance after merging, that is, the target running state of the first task instance is "pending execution."

[0099] For example, Figure 5 In this embodiment of the disclosure, an electronic device merges two basic directed acyclic graphs (including basic directed acyclic graph 101 and basic directed acyclic graph 102) into a target directed acyclic graph (i.e., target directed acyclic graph 103). Specifically, Figure 5 In this context, a node represented by a single letter represents a task instance node. For example, a node represented by the letter A represents task instance node A.

[0100] like Figure 5 As shown, the basic directed acyclic graph 101 includes four task instance nodes, the running states of these four task instance nodes (the running state of a task instance node is the running state of the task instance represented by that node in the basic directed acyclic graph), and three edges. Specifically, the four task instance nodes are task instance node A, task instance node B, task instance node D, and task instance node E; the running states of these four task instance nodes are running successfully, running successfully, waiting to run, and running, respectively; the three edges are used to connect task instance node A with task instance node B, task instance node B with task instance node D, and task instance node B with task instance node E, respectively.

[0101] The basic directed acyclic graph 102 includes 5 task instance nodes, the running states of these 5 task instance nodes, and 4 edges. Specifically, the 5 task instance nodes are task instance node C, task instance node E, task instance node F, task instance node G, and task instance node H; the running states of these 5 task instance nodes are running, waiting to run, waiting to run, waiting to run, and waiting to run, respectively.

[0102] Assuming the first basic directed acyclic graph is 101, and the other basic directed acyclic graphs include 102, the electronic device determines the first task instance node as task instance node E. Since the first task instance (represented by task instance node E) has running and pending running states in 101 and 102 respectively, the electronic device can determine that the first task instance's running state in the target directed acyclic graph is pending running, i.e., determine the target running state of the first task instance as pending running, corresponding to the running state of task instance node E in the target directed acyclic graph 103.

[0103] The technical solution provided by the above embodiments can bring at least the following beneficial effects: As shown in S1061a, when the running state of the first task instance in the first basic directed acyclic graph is "to be run", or when the running state of the first task instance in other basic directed acyclic graphs is "to be run", it indicates that the running state of the first task instance in a certain basic directed acyclic graph is "to be run". At this time, the electronic device can determine "to be run" as the running state after merging the first task instances, that is, the target running state of the first task instance is "to be run". It can accurately and effectively determine the running state after merging each task instance in multiple task instances, improving the accuracy of data processing.

[0104] Optionally, the above-mentioned determination of the target running state of the first task instance based on the running state of the first task instance in the first basic directed acyclic graph and the running state of the first task instance in other basic directed acyclic graphs further includes S1062.

[0105] S1062. When the running state of the first task instance in the first basic directed acyclic graph is "running" and the running state of the first task instance in other basic directed acyclic graphs is not "waiting to run", the electronic device determines that the target running state of the first task instance is "running".

[0106] It should be understood that if the running state of a task instance in a basic directed acyclic graph is not "pending", it means that the running state of the task instance in the basic directed acyclic graph is "running", "running successfully", or "running failed".

[0107] Optionally, the above-mentioned determination of the target running state of the first task instance based on the running state of the first task instance in the first basic directed acyclic graph and the running state of the first task instance in other basic directed acyclic graphs also includes S1063.

[0108] S1063. When the running state of the first task instance in the first basic directed acyclic graph is the same as the running state of the first task instance in other basic directed acyclic graphs, the electronic device determines the running state of the first task instance in the first basic directed acyclic graph as the target running state of the first task instance.

[0109] In this embodiment of the present disclosure, when the running state of the first task instance in the first basic directed acyclic graph is the same as the running state of the first task instance in other basic directed acyclic graphs, the electronic device determines the running state of the first task instance in the first basic directed acyclic graph (or the running state of the first task instance in other basic directed acyclic graphs) as the target running state of the first task instance.

[0110] Optionally, the above-mentioned determination of the target running state of the first task instance based on the running state of the first task instance in the first basic directed acyclic graph and the running state of the first task instance in other basic directed acyclic graphs further includes S1064.

[0111] S1064. When the running state of the first task instance in the first basic directed acyclic graph is "running successfully" and the running state of the first task instance in other basic directed acyclic graphs is "running failed", the electronic device determines that the target running state of the first task instance is "running".

[0112] It is understandable that the running status of the first task instance is "running successfully" in the first basic directed acyclic graph, and the running status of the first task instance is "running failed" in other basic directed acyclic graphs, indicating that the state of the data generated by the first task instance may be unstable. Therefore, when merging the running status of the first task instance, the running status of the first task instance can be updated to "running" so that the first task instance can regenerate data.

[0113] Table 1 below shows an example where a first task instance node exists in both the first basic directed acyclic graph and the other basic directed acyclic graphs, and the target running state of this first task instance needs to be determined. Specifically, Table 1 includes the running state of the first task instance in the first basic directed acyclic graph, the running state of the first task instance in the other basic directed acyclic graphs, and the running state of the first task instance in the merged directed acyclic graph (i.e., the target acyclic graph).

[0114] Table 1

[0115]

[0116] Obviously, if the first task instance is in running state in the first basic directed acyclic graph, and the first task instance is in running state in other basic directed acyclic graphs, then the electronic device determines that the target running state of the first task instance is running.

[0117] Combination Figure 3 ,like Figure 6 As shown, the data processing method provided in this embodiment of the disclosure further includes: S107.

[0118] S107. When a first task instance node exists in the first basic directed acyclic graph and no first task instance node exists in other basic directed acyclic graphs, the electronic device determines the running state of the first task instance in the first basic directed acyclic graph as the target running state of the first task instance.

[0119] It should be understood that when a first task instance node exists in the first basic directed acyclic graph, and the first task instance node does not exist in any other basic directed acyclic graph, it means that the first task instance node only exists in the first basic directed acyclic graph. Thus, the electronic device can determine that the running state of the first task instance remains unchanged; that is, it can directly determine the running state of the first task instance in the first basic directed acyclic graph as the target running state of the first task instance.

[0120] For example, in conjunction with the above Figure 5 In the example above, assuming the first task instance node is task instance node B included in the basic directed acyclic graph 101, the electronic device determines the target running state of the first task instance as running successfully, corresponding to the running state of task instance node B in the target directed acyclic graph 103.

[0121] The technical solution provided by the above embodiments can bring at least the following beneficial effects: As shown in S107, when a first task instance node exists in each directed acyclic graph and the first task instance node does not exist in other directed acyclic graphs, it indicates that the first task instance node only exists in each directed acyclic graph. Thus, the electronic device can determine that the running state of the first task instance remains unchanged, that is, directly determine the running state of the first task instance in each directed acyclic graph as the target running state of the first task instance. This allows for the reasonable and accurate determination of the target running state of each task instance, improving the efficiency of data processing.

[0122] Combination Figure 2 ,like Figure 7As shown, in one implementation of this embodiment, the current task instance node is the root node in the target directed acyclic graph or a non-root node in the target directed acyclic graph. Based on the target recovery information, each task instance in the multiple task instances is controlled to generate data, specifically including S1031-S1032.

[0123] S1031. When the current task instance node is a non-root node, the electronic device determines the number of successful upstream nodes of the current task instance node.

[0124] Here, the directly upstream successful node is the node whose target running state is successful among the directly upstream nodes of the current task instance node. The directly upstream node is the upstream task instance node that has a dependency relationship with the current task instance node. The target running state corresponding to a task instance node is the target running state of the task instance represented by the task instance node.

[0125] It should be understood that when the current task instance node is not the root node, it means that there are other task instance nodes upstream of the current task instance node, and these other task instance nodes have a direct (or indirect) dependency relationship with the current task instance node. The upstream instance node that has a direct dependency relationship with the current task instance node is the direct upstream node that has an edge with the current task instance node.

[0126] Understandably, the electronic device can obtain the target running state corresponding to each of the multiple task instance nodes in the target directed acyclic graph, that is, the target running state of each task instance in the multiple task instances. When the target running state of a task instance is "running successfully," it means that the task instance has successfully generated data. The aforementioned directly upstream successful nodes are the task instance nodes that have successfully generated data among the directly upstream nodes of the current task instance node.

[0127] S1032. When the number of successful upstream nodes is equal to the number of successful upstream nodes, the electronic device controls the current task instance to start generating data and updates the running status of the current task instance to running.

[0128] The current task instance is the task instance represented by the aforementioned current task instance node.

[0129] It should be understood that when the number of successful upstream nodes equals the total number of upstream nodes, it indicates that all upstream nodes of the current task instance have successfully generated data, meaning that the target running status corresponding to all upstream nodes is "running successfully." Thus, the electronic device can control the current task instance to begin generating data. Furthermore, when the electronic device controls the current task instance to begin generating data, it can also update the running status of the current task instance to "running," indicating that the current task instance has started generating data (or is in the process of generating data).

[0130] Otherwise, if the number of successful upstream nodes is not equal to the total number of upstream nodes, it indicates that some of the upstream nodes may be in a pending, running, or failed running state. In this case, the electronic device can control these nodes to continue generating (or regenerating) data until the target running state of these nodes is successful.

[0131] Optionally, when the current task instance has successfully generated data, the electronic device can update the running status of the current task instance to "running successfully".

[0132] For example, in conjunction with the above Figure 5 In the example, assume the current task instance node is task instance node E in the target directed acyclic graph 103. When the number of successful upstream nodes of task instance node E is equal to 2 (the direct upstream nodes of task instance node E include task instance node B and task instance node C), the electronic device controls task instance node E to start generating data and updates the running status of task instance node E to running.

[0133] In one implementation of this disclosure, when the current task instance node is the root node, the electronic device can determine the target running state corresponding to the current task instance node. When the target running state corresponding to the current task instance node is successful, and there are no other upstream direct nodes among the downstream direct nodes of the current task instance node, the electronic device controls the downstream direct node to start generating data.

[0134] The technical solution provided by the above embodiments can bring at least the following beneficial effects: As shown in S1031-S1032, when the current task instance node is a non-root node, the electronic device can determine the number of successful upstream nodes of the current task instance node; when the number of successful upstream nodes is equal to the number of successful upstream nodes of the current task instance node, it indicates that all nodes in the direct upstream nodes of the current task instance node have successfully generated data. Thus, the electronic device can control the current task instance to start generating data and update the running status of the current task instance to running. It can accurately and effectively determine whether each task instance in multiple task instances meets the start conditions for data generation and accurately guarantee the target running status of each task instance.

[0135] In one alternative implementation, the data processing method provided in this disclosure embodiment further includes step X.

[0136] Step X: The electronic device stores the target recovery information into the database.

[0137] It should be understood that when an electronic device stores the target recovery information in a database, it does so by storing the identifier of each of the multiple task instances, the target running status of each task instance, and the dependencies between each task instance and other task instances in the database. In this way, during subsequent data generation, the electronic device can retrieve the target recovery information from the database.

[0138] The above update of the running status of the current task instance to running can specifically include step Y.

[0139] Step Y: Based on the identifier of the current task instance, the electronic device updates the running status of the current task instance to "running" in the database.

[0140] Combination Figure 7 ,like Figure 8 As shown, in one implementation of this disclosure, the target recovery information includes the priority of each of the plurality of task instances, and the data processing method provided in this disclosure further includes S108-S109.

[0141] S108. When the number of successful upstream nodes is equal to the number of successful upstream nodes, and the successful upstream nodes are the same as the successful upstream nodes of the second task instance, the electronic device determines whether the priority of the second task instance is higher than the priority of the current task instance.

[0142] The second task instance node is a task instance node other than the current task instance node among the above multiple task instance nodes, and the second task instance is the task instance represented by the second task instance node.

[0143] Based on the description of the above embodiments, it should be understood that the direct upstream node is an upstream task instance node that has a dependency relationship with the current task instance node, and the plurality of task instance nodes are the task instance nodes included in the aforementioned target directed acyclic graph. The fact that the direct upstream node of the current task instance node is the same as the direct upstream node of the second task instance node indicates that the current task instance node and the second task instance node have the same dependency relationship as each other.

[0144] It is understandable that different tasks can correspond to different priorities. The priority of a task can be understood as the attribute information of that task. That is, different task instances generated by the same task have the same priority. The different priorities of these different tasks can be pre-configured.

[0145] S109. When the priority of the second task instance is higher than that of the current task instance, the electronic device controls the second task instance to start generating data first.

[0146] It should be understood that during the data generation process of each of the multiple task instances, the resources that the electronic device can allocate may be limited. In this case, the electronic device can prioritize processing higher-priority task instances, that is, determine which higher-priority task instances will start generating data first.

[0147] Optionally, when the priority of the second task instance is lower than that of the current task instance, the electronic device can control the current task instance to start generating data first, that is, to process the current task instance first.

[0148] For example, in conjunction with the above Figure 5 Example from the diagram. Assume the current task instance is the task instance represented by task instance node F included in the target directed acyclic graph 103, and the second task instance is the task instance represented by task instance node G included in the target directed acyclic graph 103. Furthermore, assume the task instance represented by task instance node G has a higher priority than the task instance represented by task instance node F; therefore, the electronic device controls the task instance represented by task instance node G to start generating data first.

[0149] The technical solution provided by the above embodiments can bring at least the following beneficial effects: As shown in S108-S109, when the number of successful upstream nodes of the current task instance node is equal to the number of successful upstream nodes of the current task instance node, it indicates that all nodes in the direct upstream nodes of the current task instance node have successfully generated data; and the direct upstream node is the same as the direct upstream node of the second task instance node, indicating that the current task instance node and the second task instance node have the same direct upstream node. At this time, the electronic device can determine whether the priority of the second task instance is higher than the priority of the current task instance. When the priority of the second task instance is higher than the priority of the current task instance, it indicates that the priority of the second task instance is higher, so the electronic device can control the second task instance to start generating data first. In this embodiment of the present disclosure, the electronic device can determine the priority of the task instances represented by two task instance nodes with the same direct upstream node (i.e., the current task instance node and the second task instance node), and then prioritize the processing of the task instance with higher priority, which can reasonably control the processing order of multiple task instances and improve the effectiveness of data processing.

[0150] Combination Figure 1 ,like Figure 9 As shown, the data processing method provided in this embodiment of the disclosure further includes S110.

[0151] S110, The electronic device terminates one or more complement events.

[0152] It should be understood that each of the aforementioned one or more complement events may be being executed (i.e., the task instance corresponding to each complement event is generating data), or each complement event may be being blocked (i.e., the task instance corresponding to each complement event may have been paused from generating data). In this embodiment of the present disclosure, the electronic device terminates the one or more complement events to terminate the generation (or pause generation) of data for each task instance corresponding to the one or more complement events. This allows the electronic device to run only the aforementioned target complement event, without running the one or more complement events; thus, the data generation process of multiple task instances depends only on the execution of the target complement event, rather than running the one or more complement events to cause one of the multiple task instances to generate the corresponding data multiple times. Data generation can be achieved by using a unified operation (i.e., running the target complement event, without running one or more complement events) to make each of the multiple task instances generate data separately, which can improve the efficiency of data processing. Furthermore, controlling the same task instance to generate data multiple times based on the one or more complement events, or pausing the same task instance's data generation multiple times, consumes a large amount of resources. Thus, by using this unified operation control to generate data for each of the multiple task instances, energy consumption can be reduced and the operating efficiency of the equipment can be improved.

[0153] It should be noted that the execution order of S103 and S110 described above is not limited in this embodiment. For example, S103 can be executed first and then S110, or S110 can be executed first and then S103, or S103 and S110 can be executed simultaneously. For ease of explanation, Figure 9 The example is to execute S103 first and then S110.

[0154] It is understood that, in practical implementation, the electronic device described in the embodiments of this disclosure may include one or more hardware structures and / or software modules for implementing the aforementioned corresponding data processing methods. These hardware structures and / or software modules can constitute an electronic device. Those skilled in the art should readily recognize that, based on the algorithmic steps of the examples described in conjunction with the embodiments disclosed herein, this disclosure can be implemented in hardware or a combination of hardware and computer software. Whether a function is implemented in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.

[0155] Based on this understanding, the present disclosure also provides a data processing apparatus. Figure 10 A schematic diagram of the structure of a data processing apparatus provided in an embodiment of this disclosure is shown. Figure 10 As shown, the data processing device 20 may include a determination module 201 and a processing module 202.

[0156] The determination module 201 is configured to determine the recovery information of one or more complement events, wherein the recovery information of a complement event includes the identifiers of at least two task instances corresponding to the complement event, the running status of the at least two task instances, and the dependency relationship between the at least two task instances.

[0157] The processing module 202 is configured to perform merging processing on the recovery information of the one or more complement events to obtain target recovery information of the target complement event. The target complement event includes the one or more complement events, the target complement event corresponds to multiple task instances, the multiple task instances include each task instance corresponding to the one or more complement events, and the target recovery information includes the target running status of the multiple task instances. The target running status of the multiple task instances is determined based on the running status of the task instances corresponding to each complement event in the one or more complement events.

[0158] The processing module 202 is also configured to run the target complement event, which is used to control each of the multiple task instances to generate data based on the target recovery information.

[0159] Optionally, the data processing device 20 further includes an acquisition module 203.

[0160] The processing module 202 is also configured to generate a basic directed acyclic graph corresponding to each of the one or more complement events based on the recovery information of the one or more complement events. The basic directed acyclic graph corresponding to a complement event includes a task instance node, the running state of the task instance represented by the task instance node, and an edge, which is used to connect task instance nodes with dependencies.

[0161] The processing module 202 is specifically configured to perform a merging process on the underlying directed acyclic graph corresponding to each of the one or more complement events to generate a target directed acyclic graph corresponding to the target complement event. The target directed acyclic graph includes the task instance nodes included in the underlying directed acyclic graph corresponding to each of the one or more complement events, the edges included in the underlying directed acyclic graph, and the target running states of the multiple task instances. The multiple task instances are task instances represented by multiple task instance nodes, and the multiple task instance nodes are task instance nodes included in the target directed acyclic graph.

[0162] The acquisition module 203 is configured to acquire the target recovery information based on the target's directed acyclic graph.

[0163] Optionally, the determining module 201 is further configured to determine whether a first task instance node exists in the first basic directed acyclic graph, and whether the first task instance node exists in other basic directed acyclic graphs, wherein the first basic directed acyclic graph is the basic directed acyclic graph corresponding to the first complement event, the first complement event is one of the plurality of complement events, the other basic directed acyclic graphs are the basic directed acyclic graphs corresponding to other complement events, the other complement events are complement events other than the first complement event among the plurality of complement events, and the first task instance node is one of the plurality of task instance nodes.

[0164] The determination module 201 is further configured to determine the target running state of the first task instance when the first task instance node exists in the first basic directed acyclic graph and the first task instance node exists in other basic directed acyclic graphs, based on the running state of the first task instance in the first basic directed acyclic graph and the running state of the first task instance in the other basic directed acyclic graphs, wherein the first task instance is the task instance represented by the first task instance node.

[0165] The processing module 202 is further configured to obtain the target directed acyclic graph based on the multiple task instance nodes, the target running state of the multiple task instances, and multiple edges. The multiple edges include each edge of the underlying directed acyclic graph corresponding to each of the one or more complement events.

[0166] Optionally, the determining module 201 is specifically configured to determine the target running state of the first task instance as "waiting to run" when the running state of the first task instance in the first basic directed acyclic graph is "waiting to run" or the running state of the first task instance in another basic directed acyclic graph is "waiting to run".

[0167] Optionally, the determining module 201 is further configured to determine the target running state of the first task instance by the running state of the first task instance in the first basic directed acyclic graph when the first task instance node exists in the first basic directed acyclic graph and the first task instance node does not exist in the other basic directed acyclic graphs.

[0168] Optionally, the current task instance node is either the root node in the target directed acyclic graph or a non-root node in the target directed acyclic graph.

[0169] The determination module 201 is specifically configured to determine the number of directly successful upstream nodes of the current task instance node when the current task instance node is a non-root node. The directly successful upstream nodes are the nodes whose target running state is successful among the directly upstream nodes of the current task instance node. The directly upstream nodes are the upstream task instance nodes that have a dependency relationship with the current task instance node. The target running state corresponding to a task instance node is the target running state of the task instance represented by the task instance node.

[0170] The processing module 202 is also configured to control the current task instance to start generating data and update the running status of the current task instance to running when the number of successful upstream nodes is equal to the number of direct upstream nodes. The current task instance is the task instance represented by the current task instance node.

[0171] Optionally, the target recovery information mentioned above includes the priority of each of the multiple task instances.

[0172] The determination module 201 is further configured to determine whether the priority of the second task instance is higher than the priority of the current task instance when the number of successful upstream nodes is equal to the number of successful upstream nodes and the successful upstream node is the same as the successful upstream node of the second task instance node. The second task instance node is the task instance node other than the current task instance node among the multiple task instance nodes, and the second task instance is the task instance represented by the second task instance node.

[0173] The processing module 202 is also configured to control the second task instance to start generating data first when the priority of the second task instance is higher than the priority of the current task instance.

[0174] Optionally, the processing module 202 is also configured to terminate the plurality of complement events.

[0175] As described above, the embodiments of this disclosure can divide the data processing device into functional modules according to the above method examples. The integrated modules can be implemented in hardware or as software functional modules. Furthermore, it should be noted that the module division in these embodiments is illustrative and represents only one logical functional division; in actual implementation, other division methods may be used. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module.

[0176] The specific methods by which each module performs its operations and the beneficial effects of the data processing apparatus in the above embodiments have been described in detail in the foregoing method embodiments, and will not be repeated here.

[0177] Figure 11 This is a schematic diagram of another data processing apparatus provided in this disclosure. For example... Figure 11 The data processing apparatus 30 may include at least one processor 301 and a memory 303 for storing processor-executable instructions. The processor 301 is configured to execute the instructions in the memory 303 to implement the data processing method described in the above embodiments.

[0178] In addition, the data processing device 30 may also include a communication bus 302 and at least one communication interface 304.

[0179] Processor 301 may be a processor (central processing unit, CPU), microprocessor unit, ASIC, or one or more integrated circuits for controlling the execution of programs according to the present disclosure.

[0180] The communication bus 302 may include a path for transmitting information between the aforementioned components.

[0181] Communication interface 304 uses any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc.

[0182] Memory 303 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. Memory may exist independently and be connected to the processing unit via a bus. Memory may also be integrated with the processing unit.

[0183] The memory 303 stores instructions for executing the present invention, and the processor 301 controls the execution of these instructions. The processor 301 executes the instructions stored in the memory 303 to implement the functions of the method disclosed herein.

[0184] In a specific implementation, as one example, processor 301 may include one or more CPUs, for example... Figure 11 CPU0 and CPU1 in the CPU.

[0185] In a specific implementation, as one example, the data processing device 30 may include multiple processors, such as... Figure 11 Processors 301 and 307 are described herein. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor here may refer to one or more devices, circuits, and / or processing cores used to process data (e.g., computer program instructions).

[0186] In a specific implementation, as one embodiment, the data processing device 30 may further include an output device 305 and an input device 306. The output device 305 communicates with the processor 301 and can display information in various ways. For example, the output device 305 may be a liquid crystal display (LCD), a light-emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector, etc. The input device 306 communicates with the processor 301 and can accept user input in various ways. For example, the input device 306 may be a mouse, keyboard, touchscreen device, or sensing device, etc.

[0187] Those skilled in the art will understand that Figure 11 The structure shown does not constitute a limitation on the data processing device 30, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0188] In addition, this disclosure also provides a computer-readable storage medium including instructions that, when executed by a processor, cause the processor to perform the data processing method provided in the above embodiments.

[0189] In addition, this disclosure also provides a computer program product including instructions that, when executed by a processor, cause the processor to perform the data processing method provided in the above embodiments.

[0190] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

Claims

1. A data processing method, characterized by, The method comprises: determining recovery information of one or more complement events, wherein the recovery information of one complement event comprises identification of at least two task instances corresponding to the complement event, running states of the at least two task instances, and a dependency relationship between the at least two task instances; performing merging processing on the recovery information of the one or more complement events to obtain target recovery information of a target complement event, the target complement event comprising the one or more complement events, the target complement event corresponding to a plurality of task instances, the plurality of task instances comprising each task instance corresponding to the one or more complement events, the target recovery information comprising target running states of the plurality of task instances, the target running states of the plurality of task instances being determined based on the running states of the task instances corresponding to each complement event in the one or more complement events; running the target complement event, the target complement event being used to control each task instance in the plurality of task instances to generate data according to the target recovery information; if the running state of a first task instance in the running states of the complement events comprises to be run, the target running state of the first task instance is to be run; if the running state of the first task instance in the running states of the complement events comprises to be run and does not comprise to be run, the target running state of the first task instance is to be run; if the running state of the first task instance in the running states of the complement events is the same, the target running state of the first task instance is the running state of the first task instance in any one complement event; if the running state of the first task instance in the running states of the complement events comprises running success and running failure, the target running state of the first task instance is to be run or to be run; wherein the first task instance is any one of the task instances corresponding to the one or more complement events.

2. The data processing method according to claim 1, characterized in that, The method further comprises: generating a basic directed acyclic graph corresponding to each complement event in the one or more complement events based on the recovery information of the one or more complement events, wherein the basic directed acyclic graph corresponding to one complement event comprises task instance nodes, running states of the task instances represented by the task instance nodes, and edges, the edges being used to connect the task instance nodes having a dependency relationship; the merging processing on the recovery information of the one or more complement events to obtain the target recovery information of the target complement event comprises: performing merging processing on the basic directed acyclic graphs corresponding to each complement event in the one or more complement events to generate a target directed acyclic graph corresponding to the target complement event, the target directed acyclic graph comprising the task instance nodes included in the basic directed acyclic graphs corresponding to each complement event in the one or more complement events, the edges included in the basic directed acyclic graphs, and the target running states of the plurality of task instances, the plurality of task instances being the task instances represented by the plurality of task instance nodes, the plurality of task instance nodes being the task instance nodes included in the target directed acyclic graph; obtaining the target recovery information according to the target directed acyclic graph.

3. The data processing method according to claim 2, characterized in that, The method further comprises: determining whether the first task instance node exists in a first base directed acyclic graph and whether the first task instance node exists in other base directed acyclic graphs, the first base directed acyclic graph being a base directed acyclic graph corresponding to a first complement event, the first complement event being one of the plurality of complement events, the other base directed acyclic graphs being base directed acyclic graphs corresponding to other complement events, the other complement events being complement events other than the first complement event in the plurality of complement events, the first task instance node being one of the plurality of task instance nodes; when the first task instance node exists in the first base directed acyclic graph and the first task instance node exists in the other base directed acyclic graphs, determining a target running state of the first task instance according to a running state of the first task instance in the first base directed acyclic graph and a running state of the first task instance in the other base directed acyclic graphs, the first task instance being a task instance represented by the first task instance node; the performing the merging processing on the base directed acyclic graphs corresponding to the one or more complement events to generate the target directed acyclic graph corresponding to the target complement event comprises: obtaining the target directed acyclic graph based on the plurality of task instance nodes, the target running states of the plurality of task instances, and a plurality of edges, the plurality of edges including each edge included in the base directed acyclic graphs corresponding to the one or more complement events.

4. The data processing method according to claim 3, characterized in that, the determining the target running state of the first task instance according to the running state of the first task instance in the first base directed acyclic graph and the running state of the first task instance in the other base directed acyclic graphs comprises: when the running state of the first task instance in the first base directed acyclic graph is to be run or the running state of the first task instance in the other base directed acyclic graphs is to be run, determining that the target running state of the first task instance is to be run.

5. The data processing method according to claim 3, characterized in that, The method further comprises: when the first task instance node exists in the first base directed acyclic graph and the first task instance node does not exist in the other base directed acyclic graphs, determining the running state of the first task instance in the first base directed acyclic graph as the target running state of the first task instance.

6. The data processing method according to claim 2, characterized in that, when the current task instance node is a root node in the target directed acyclic graph or a non-root node in the target directed acyclic graph, the controlling each task instance in the plurality of task instances to generate data according to the target recovery information comprises: When the current task instance node is the non-root node, a number of direct upstream successful nodes of the current task instance node is determined, the direct upstream successful node being a node of the direct upstream nodes of the current task instance node, the direct upstream node being an upstream task instance node having a dependency relationship with the current task instance node, and a target running state corresponding to a task instance node being a target running state of a task instance represented by the task instance node; When the number of the direct upstream successful nodes is equal to the number of the direct upstream nodes, the current task instance is controlled to start generating data, and a running state of the current task instance is updated to running, the current task instance being a task instance represented by the current task instance node.

7. The data processing method according to claim 6, characterized in that, The target recovery information includes priorities of the plurality of task instances, and the method further includes: When the number of the direct upstream successful nodes is equal to the number of the direct upstream nodes, and the direct upstream nodes are the same as direct upstream nodes of a second task instance node, it is determined whether a priority of a second task instance is higher than a priority of the current task instance, the second task instance node being a task instance node other than the current task instance node in the plurality of task instance nodes, and the second task instance being a task instance represented by the second task instance node; When the priority of the second task instance is higher than the priority of the current task instance, the second task instance is controlled to start generating data preferentially.

8. The data processing method according to any one of claims 1-7, characterized in that, The method further includes: terminating the one or more complement events.

9. A data processing apparatus, characterized by: comprise: a determining module and a processing module; the determining module is configured to determine recovery information of one or more complement events, wherein the recovery information of a complement event includes identification of at least two task instances corresponding to the complement event, running states of the at least two task instances, and a dependency relationship between the at least two task instances; the processing module is configured to perform merging processing on the recovery information of the one or more complement events to obtain target recovery information of a target complement event, the target complement event including the one or more complement events, the target complement event corresponding to a plurality of task instances, the plurality of task instances including each task instance corresponding to the one or more complement events, and the target recovery information including target running states of the plurality of task instances, the target running states of the plurality of task instances being determined based on the running states of the task instances corresponding to the one or more complement events; the processing module is further configured to run the target complement event, the target complement event being used to control each task instance in the plurality of task instances to generate data according to the target recovery information; if the first task instance is in the running state of the complement event, the target running state of the first task instance is running; if the running state of the first task instance in each of the complement events includes running and does not include to-be-run, the target running state of the first task instance is running; if the running state of the first task instance in each of the complement events is the same, the target running state of the first task instance is the running state of the first task instance in any one of the complement events; if the running state of the first task instance in each of the complement events includes running success and running failure, the target running state of the first task instance is running or to-be-run; The first task instance is any one of task instances corresponding to the one or more complement events.

10. The data processing apparatus according to claim 9, characterized by The data processing apparatus further comprises an obtaining module; The processing module is further configured to generate a basic directed acyclic graph corresponding to each of the one or more complement events based on the recovery information of the one or more complement events, wherein the basic directed acyclic graph corresponding to one complement event comprises a task instance node, a running state of a task instance represented by the task instance node, and an edge for connecting task instance nodes having a dependency relationship; The processing module is specifically configured to perform merging processing on the basic directed acyclic graphs corresponding to each of the one or more complement events to generate a target directed acyclic graph corresponding to the target complement event, wherein the target directed acyclic graph comprises the task instance nodes included in the basic directed acyclic graphs corresponding to each of the one or more complement events, the edges included in the basic directed acyclic graphs, and target running states of a plurality of task instances, the plurality of task instances being task instances represented by a plurality of task instance nodes included in the target directed acyclic graph; The obtaining module is configured to obtain the target recovery information according to the target directed acyclic graph.

11. The data processing apparatus of claim 10, wherein The determining module is further configured to determine whether a first task instance node exists in a first basic directed acyclic graph and whether the first task instance node exists in other basic directed acyclic graphs, the first basic directed acyclic graph being a basic directed acyclic graph corresponding to a first complement event, the first complement event being one of the plurality of complement events, the other basic directed acyclic graphs being basic directed acyclic graphs corresponding to other complement events, the other complement events being complement events other than the first complement event among the plurality of complement events, and the first task instance node being one of the plurality of task instance nodes. The determining module is further configured to determine a target running state of the first task instance according to a running state of the first task instance in the first base directed acyclic graph and a running state of the first task instance in the other base directed acyclic graph when the first task instance node exists in the first base directed acyclic graph and the first task instance node exists in the other base directed acyclic graph, the first task instance being a task instance represented by the first task instance node. The processing module is specifically further configured to obtain the target directed acyclic graph based on the plurality of task instance nodes, the target running states of the plurality of task instances, and the plurality of edges, the plurality of edges including each edge included in a base directed acyclic graph corresponding to each of the one or more complement events.

12. The data processing apparatus of claim 11, wherein The determining module is specifically configured to determine that the target running state of the first task instance is to be running when the running state of the first task instance in the first base directed acyclic graph is to be running or the running state of the first task instance in the other base directed acyclic graph is to be running.

13. The data processing apparatus of claim 11, wherein The determining module is further configured to determine the running state of the first task instance in the first base directed acyclic graph as the target running state of the first task instance when the first task instance node exists in the first base directed acyclic graph and the first task instance node does not exist in the other base directed acyclic graph.

14. The data processing apparatus according to claim 10, wherein, The current task instance node is a root node in the target directed acyclic graph or a non-root node in the target directed acyclic graph; The determining module is specifically configured to determine a number of direct upstream successful nodes of the current task instance node when the current task instance node is the non-root node, the direct upstream successful node being a node corresponding to the target running state of running success among direct upstream nodes of the current task instance node, the direct upstream node being an upstream task instance node having a dependency relationship with the current task instance node, the target running state corresponding to a task instance node being a target running state of a task instance represented by the task instance node. The processing module is further configured to control the current task instance to start generating data and update the running state of the current task instance to running when the number of the direct upstream successful nodes is equal to the number of the direct upstream nodes, the current task instance being a task instance represented by the current task instance node.

15. The data processing apparatus according to claim 14, characterized in that, The target recovery information includes respective priorities of the plurality of task instances. The determining module is further configured to determine whether a priority of a second task instance is higher than a priority of the current task instance when the number of the direct upstream successful nodes is equal to the number of the direct upstream nodes and the direct upstream nodes are the same as direct upstream nodes of a second task instance node, the second task instance node being a task instance node of the plurality of task instance nodes other than the current task instance node, and the second task instance being a task instance represented by the second task instance node. The processing module is further configured to control the second task instance to start generating data in priority when the priority of the second task instance is higher than the priority of the current task instance.

16. The data processing apparatus of any one of claims 9-15, characterized in that, The processing module is further configured to terminate the one or more complement events.

17. An electronic device, comprising: The electronic device comprises: a processor; a memory configured to store instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the data processing method of any one of claims 1-8.

18. A computer-readable storage medium having stored thereon instructions, the instructions comprising, The computer readable storage medium, when the instructions in the computer readable storage medium are executed by an electronic device, enables the electronic device to perform the data processing method of any one of claims 1-8.

19. A computer program product, characterised in that, The computer program product comprises computer instructions, when the computer instructions run on an electronic device, enable the electronic device to perform the data processing method of any one of claims 1-8.

Citation Information

Patent Citations

  • Task processing method and device, electronic equipment and storage medium

    CN112764907A