A data processing method and device, electronic equipment and storage medium
By identifying the target task instance and pruning unnecessary task instances in the complement event, the problems of resource waste and extended production cycle in the prior art are solved, and the efficiency and timeliness of data generation are achieved.
Patent Information
- Application Number
- CN202111271183.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-29
- Publication Date
- 2026-01-20
- Estimated Expiration
- 2042-01-20
AI Technical Summary
In existing technologies, the complement device performs blocking and recovery operations on all downstream task instances of a certain task instance, which wastes resources and prolongs the production cycle of user-required data.
By obtaining the recovery information of the initial complement event and a fixed set of task instances, at least two target task instances are identified, and the target complement event is executed based on the target recovery information, so that these task instances generate data, and pruning of task instances except for those are removed to reduce resource waste.
This reduces resource waste, shortens the production cycle, and ensures timely data output when generating the data needed by users.
Smart Images

Figure CN113986596B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computer, and particularly relates to a data processing method and device, electronic equipment and storage medium. BACKGROUND
[0002] At present, when data generated by a task instance has a quality problem, a complement device can perform a blocking operation on all downstream task instances of the task instance, and when the generated data returns to normal, a recovery operation can be performed on all the downstream task instances.
[0003] However, in a case, the data required by a user can be generated based on only part of the task instances in the all downstream task instances. Thus, performing the blocking operation and / or the recovery operation on each of the downstream task instances in the all downstream task instances can waste a large amount of resources and prolong the production cycle of the data required by the user. SUMMARY
[0004] The present disclosure provides a data processing method and device, electronic equipment and storage medium, which solve the technical problem that a complement device performs a blocking operation and / or a recovery operation on all downstream task instances of a task instance, wastes a large amount of resources and prolongs the production cycle of data required by a user.
[0005] The technical solutions of the embodiments of the present disclosure are as follows:
[0006] According to a first aspect of the embodiments of the present disclosure, a data processing method is provided. The method can include: obtaining recovery information of an initial complement event and a fixed task instance set, the recovery information including the identities of a plurality of task instances and the dependency relationship between the plurality of task instances, and the fixed task instance set including at least two fixed task instances; determining at least two target task instances from the plurality of task instances based on the recovery information and the fixed task instance set, the at least two target task instances including the at least two fixed task instances; determining target recovery information based on the recovery information and at least one to-be-pruned task instance, the target recovery information including the identities of the at least two target task instances and the dependency relationship between the at least two target task instances, the target recovery information being recovery information of a target complement event, and the at least one to-be-pruned task instance being a task instance in the plurality of task instances other than the at least two target task instances; and performing the target complement event to cause each of the at least two target task instances to generate data according to the target recovery information.
[0007] Optionally, the determining the at least two target task instances from the plurality of task instances specifically comprises: when the first task instance belongs to the fixed task instance set, determining the first task instance as a target task instance, the first task instance being one of the plurality of task instances.
[0008] Optionally, the determining the at least two target task instances from the plurality of task instances specifically comprises: when the first task instance does not belong to the fixed task instance set, determining that the first task instance has a downstream task instance, the first task instance being one of the plurality of task instances; when the first task instance is not a root task instance of the plurality of task instances, and there is a fixed task instance in the downstream task instance corresponding to the first task instance, determining the first task instance as a target task instance.
[0009] Optionally, the determining the target recovery information based on the recovery information and the at least one task instance to be pruned specifically comprises: generating an initial directed acyclic graph based on the recovery information of the initial complement event, the initial directed acyclic graph being a directed acyclic graph corresponding to the initial complement event, the initial directed acyclic graph comprising task instance nodes and edges, the task instance nodes being used to represent task instances, and the edges being used to connect task instance nodes having a dependency relationship; performing a pruning operation on at least one task instance node to be pruned in the initial directed acyclic graph to obtain a target directed acyclic graph, the at least one task instance node to be pruned being a node represented by the at least one task instance to be pruned.
[0010] Optionally, 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, and the generating data by each of the at least two target task instances according to the target recovery information specifically comprises: when the current task instance node is the non-root node, determining a number of direct upstream successful nodes of the current task instance node, the direct upstream successful node being a node having a running state of running success among direct upstream nodes of the current task instance node, and the direct upstream node being an upstream task instance node having an edge between the current task instance node and the upstream task instance node; when the number of direct upstream successful nodes is equal to the number of direct upstream nodes; determining that a current task instance starts to generate data, the current task instance being a task instance represented by the current task instance node.
[0011] Optionally, the target recovery information further comprises priorities of the at least two target task instances, and the data processing method further comprises: 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 to-be-identified task instance node, determining whether a priority of the to-be-identified task instance is higher than a priority of the current task instance, wherein the to-be-identified task instance node is a task instance node other than the current task instance node among at least two task instance nodes included in the target directed acyclic graph, and the to-be-identified task instance is a task instance represented by the to-be-identified task instance node; and when the priority of the to-be-identified task instance is higher than the priority of the current task instance, determining that the to-be-identified task instance starts to generate data in priority.
[0012] Optionally, the data processing method further comprises: when the first task instance does not belong to the fixed task instance set and there is no fixed task instance in downstream task instances corresponding to the first task instance, adding a preset identifier to the first task instance and the downstream task instances corresponding to the first task instance, the preset identifier being used to represent that the first task instance and the downstream task instances corresponding to the first task instance are not target task instances, and the first task instance being one of the plurality of task instances.
[0013] According to a second aspect of the embodiments of the present disclosure, a data processing apparatus is provided. The apparatus can include an obtaining module, a determining module, and a processing module. The obtaining module is configured to obtain recovery information of an initial complement event and a fixed task instance set, the recovery information including identifiers of a plurality of task instances and a dependency relationship between the plurality of task instances, and the fixed task instance set including at least two fixed task instances. The determining module is configured to determine at least two target task instances from the plurality of task instances based on the recovery information and the fixed task instance set, the at least two target task instances including the at least two fixed task instances. The determining module is further configured to determine target recovery information based on the recovery information and at least one to-be-pruned task instance, the target recovery information including identifiers of the at least two target task instances and a dependency relationship between the at least two target task instances, the target recovery information being recovery information of a target complement event, and the at least one to-be-pruned task instance being a task instance other than the at least two target task instances among the plurality of task instances. The processing module is configured to execute the target complement event to cause each of the at least two target task instances to generate data according to the target recovery information.
[0014] Optionally, the determining module is specifically configured to determine that the first task instance is a target task instance when the first task instance belongs to the fixed task instance set, and the first task instance being one of the plurality of task instances.
[0015] Optionally, the determining module is specifically configured to determine that the first task instance has a downstream task instance when the first task instance does not belong to the fixed task instance set, the first task instance being one of the plurality of task instances; and the determining module is specifically further configured to determine the first task instance as the target task instance when the first task instance is not a root task instance of the plurality of task instances and there is a fixed task instance in the downstream task instance corresponding to the first task instance.
[0016] Optionally, the processing module is specifically configured to generate an initial directed acyclic graph based on the recovery information of the initial complement event, the initial directed acyclic graph being a directed acyclic graph corresponding to the initial complement event, the initial directed acyclic graph including task instance nodes and edges, the task instance nodes being used to represent task instances, and the edges being used to connect task instance nodes having a dependency relationship; the processing module is specifically further configured to perform a pruning operation on at least one to-be-pruned task instance node included in the initial directed acyclic graph to obtain a target directed acyclic graph, the at least one to-be-pruned task instance node being a node represented by the at least one to-be-pruned task instance; and the determining module is specifically configured to determine the target recovery information based on the target directed acyclic graph.
[0017] Optionally, 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; and the determining module is specifically further 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 having a running success state among direct upstream nodes of the current task instance node, and the direct upstream node being an upstream task instance node having an edge between the current task instance node and the upstream task instance node; and the determining module is specifically further configured to determine that a current task instance starts to generate data when the number of direct upstream successful nodes is equal to the number of direct upstream nodes, the current task instance being a task instance represented by the current task instance node.
[0018] Optionally, the target recovery information further comprises priorities of the at least two target task instances; the determination module is further configured to determine whether a priority of a to-be-identified 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 the to-be-identified task instance node, wherein the to-be-identified task instance node is a task instance node other than the current task instance node among at least two task instance nodes included in the target directed acyclic graph, and the to-be-identified task instance is a task instance represented by the to-be-identified task instance node; and the determination module is further configured to determine that the to-be-identified task instance is preferentially started to generate data when the priority of the to-be-identified task instance is higher than the priority of the current task instance.
[0019] Optionally, the processing module is further configured to add a preset identifier to the first task instance and downstream task instances corresponding to the first task instance when the first task instance does not belong to the fixed task instance set and there is no fixed task instance in the downstream task instances corresponding to the first task instance, the preset identifier being used to represent that the first task instance and the downstream task instances corresponding to the first task instance are not target task instances, and the first task instance being one of the plurality of task instances.
[0020] According to a third aspect of embodiments of the present disclosure, an electronic device can include a processor and a memory configured to store processor-executable instructions; and wherein the processor is configured to execute the instructions to implement any of the optional data processing methods of the first aspect.
[0021] According to a fourth aspect of embodiments of the present disclosure, a computer-readable storage medium is provided, and the computer-readable storage medium stores instructions, and when the instructions in the computer-readable storage medium are executed by an electronic device, the electronic device can execute any of the optional data processing methods of the first aspect.
[0022] According to a fifth aspect of embodiments of the present disclosure, a computer program product is provided, and the computer program product includes computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes any of the optional data processing methods of the first aspect.
[0023] The technical solutions provided by the embodiments of the present disclosure at least bring the following beneficial effects:
[0024] Based on any of the above aspects, in the present disclosure, the electronic device can obtain recovery information of an initial complement event and a fixed task instance set, and determine at least two target task instances from a plurality of task instances corresponding to the initial complement event based on the recovery information and the fixed task instance set. Since the at least two target task instances belong to the plurality of task instances, and the at least two target task instances include at least two fixed task instances included in the fixed task instance set, the electronic device can determine part of the plurality of task instances (i.e., the at least two target task instances), and the number of the at least two target task instances is less than the number of the plurality of task instances. Then, the electronic device can determine target recovery information based on the recovery information and at least one task instance to be pruned (i.e., a task instance other than the at least two target task instances in the plurality of task instances). Further, the electronic device performs a target complement event to cause each of the at least two target task instances to generate data according to the target recovery information, i.e., the electronic device instructs a smaller number of task instances to generate data to obtain data required by the user, which can ensure timely output of downstream data. At the same time, since the electronic device does not need to perform data generation operations on the at least one task instance to be pruned, resource waste can be reduced and the production cycle of user demand data can be shortened.
[0025] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and are not limiting to the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0026] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure and, are not to be considered as limiting the present disclosure.
[0027] Figure 1 A flowchart of a data processing method provided by an embodiment of the present disclosure is shown;
[0028] Figure 2 A flowchart of another data processing method provided by an embodiment of the present disclosure is shown;
[0029] Figure 3 A flowchart of another data processing method provided by an embodiment of the present disclosure is shown;
[0030] Figure 4 A flowchart of another data processing method provided by an embodiment of the present disclosure is shown;
[0031] Figure 5 A schematic diagram of performing a pruning operation provided by an embodiment of the present disclosure is shown;
[0032] Figure 6A flowchart of another data processing method provided by an embodiment of the present disclosure is shown;
[0033] Figure 7 A flowchart of another data processing method provided by an embodiment of the present disclosure is shown;
[0034] Figure 8 A flowchart of another data processing method provided by an embodiment of the present disclosure is shown;
[0035] Figure 9 A structural diagram of a data processing apparatus provided by an embodiment of the present disclosure is shown;
[0036] Figure 10 A structural diagram of another data processing apparatus provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0037] In order to make the ordinary person in the art better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below in conjunction with the drawings.
[0038] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The implementation described in the following exemplary embodiments does not represent all implementations consistent with the present disclosure. Rather, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0039] It should also be understood that the term "comprising" indicates the presence of the described features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, and / or components.
[0040] The data involved in the present disclosure can be data authorized by the user or sufficiently authorized by all parties.
[0041] As described in the background, since the complement device performs blocking operations and / or recovery operations on all downstream task instances of a certain task instance, a large amount of resources can be wasted, and the production cycle of user demand data is prolonged. Based on this, the embodiment of the present disclosure provides a data processing method, and the electronic device instructs a smaller number of task instances to generate data to obtain data required by the user, which can ensure the timely output of downstream data. At the same time, since the data generation operation does not need to be performed on at least one task instance to be pruned, resource waste can be reduced, and the production cycle of user demand data can be shortened.
[0042] The data processing method, device, electronic device and storage medium provided by the embodiment of the present disclosure are applied in the data generation (or data recovery) scene. When the electronic device obtains the recovery information of the initial complement event and the fixed task instance set, each of the at least two target task instances can generate data according to the method provided by the embodiment of the present disclosure.
[0043] The data processing method provided by the embodiment of the present disclosure is exemplarily described below in combination with the drawings:
[0044] It can be understood that the electronic device that executes the data processing method provided by the embodiment of the present disclosure can be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) \ virtual reality (VR) device, and the like, which can install and use a content community application. The present disclosure does not specially limit the specific form of the electronic device. It can perform human-computer interaction with the user through one or more ways such as a keyboard, a touchpad, a touch screen, a remote controller, voice interaction, or a handwriting device.
[0045] As shown in FIG. 1, Figure 1 The data processing method provided by the embodiment of the present disclosure can include S101-S104.
[0046] S101, the electronic device obtains the recovery information of the initial complement event and the fixed task instance set.
[0047] The recovery information includes the identification of the plurality of task instances and the dependency relationship between the plurality of task instances, and the fixed task instance set includes at least two fixed task instances.
[0048] It should be understood that the plurality of task instances are task instances corresponding to the initial complement event. The initial complement event can be applied in a scenario of generating historical data (or historical data recovery). Specifically, the electronic device performs the initial complement event, and can perform a data generation operation on the plurality of task instances, that is, the plurality of task instances can generate corresponding data.
[0049] In the embodiments of the present disclosure, the scenario of generating historical data can be divided into the following cases:
[0050] In one case, the current task instance can be a task instance generated in the current year (for example, 2021), and based on the task instance, data of the current year can be generated, but the electronic device can need to obtain data generated in a historical year (for example, 2019). Thus, the electronic device needs to create and trigger a complement event, and the task instance corresponding to the complement event can correspond to the task instance generated in the historical year, and then the electronic device can obtain the data generated in the historical year based on the task instance generated in the historical year, that is, generate historical data.
[0051] In one case, the historical year has originally generated relevant data, but in the subsequent data processing process, the relevant data can have been deleted. Thus, the electronic device can process (or operate) the task instance corresponding to a complement event (that is, the task instance corresponding to the historical year) based on the complement event to generate the relevant data, that is, generate historical data.
[0052] In another case, the electronic device can determine that the data generated by the current task instance has a quality problem, but the current task instance is not the source task instance of the data (hereinafter referred to as problem data) with a quality problem. Thus, the electronic device can create a complement event to generate historical data based on the task instance corresponding to the complement event, which can be traced back to the source task instance of the problem data.
[0053] It can be understood 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 generates a task instance. Different task instances produce different data partitions, which can be understood as partitions storing data generated (or obtained after operation) by the task instance.
[0054] In the embodiments of the present disclosure, the dependency relationship between the plurality of task instances is used to represent the upstream and downstream relationship between the plurality of task instances. For example, assuming that the plurality of task instances include a first task instance and a second task instance, if there is a dependency relationship between the first task instance and the second task instance, it means that the first task instance is a downstream task instance of the second task instance, or the first task instance is an upstream task instance of the second task instance.
[0055] It should be noted that the task instance corresponding to the initial complement event (i.e., the plurality of task instances) can be understood as a complement instance. That is, if the electronic device executes the initial complement event, the task instance corresponding to the initial complement event (i.e., the complement instance) will be supplemented. Further, executing the task instance corresponding to the initial complement event specifically means that the task instance corresponding to the initial complement event generates data, that is, the data of the task instance corresponding to the initial complement event is supplemented.
[0056] Optionally, the identifier of a task instance can be the primary key (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 corresponding to the task instance.
[0057] It should be understood that for at least two fixed task instances included in the fixed task instance set, the at least two fixed task instances are user input task instances. The at least two fixed task instances can include a source task instance for generating question data, that is, question data is generated from the source task instance, and the source task instance can be a root task instance (i.e., an upstream task instance) in the plurality of task instances or a non-root task instance in the plurality of task instances.
[0058] In an implementation manner of the embodiment of the present disclosure, the at least two fixed task instances can also include a terminal task instance, which can be understood as a task instance of interest to the user. Specifically, the data generated by the terminal task instance is the data of interest to the user, that is, the data required by the user.
[0059] In another implementation manner of the embodiment of the present disclosure, the at least two fixed task instances can also include at least one intermediate task instance, which can be understood as a task instance existing in a path from the source task instance to the terminal task instance. The data generated by the source task instance can reach the terminal task instance after processing operation of the intermediate task instance, and then the data required by the user is generated by the terminal task instance.
[0060] It can be understood that the at least two fixed task instances are task instances included in the plurality of task instances.
[0061] S102, the electronic device determines at least two target task instances from the plurality of task instances based on the recovery information of the initial complement event and the fixed task instance set.
[0062] Among the at least two target task instances, the at least two fixed task instances are included.
[0063] It should be understood that the at least two target task instances are all the task instances required by the user, that is, the electronic device can obtain the data required by the user based on all the task instances required by the user. Specifically, the electronic device can generate the data required by the user based on the source task instance, all the intermediate task instances between the source task instance and the end task instance, and the end task instance.
[0064] It can be understood that all the task instances required by the user can be part of the plurality of task instances. That is, the electronic device can obtain the data required by the user based on part of the plurality of task instances.
[0065] In S103, the electronic device determines target recovery information based on the recovery information of the initial complement event and at least one task instance to be pruned.
[0066] The target recovery information includes the identification of the at least two target task instances and the dependency relationship between the at least two target task instances. The target recovery information is the recovery information of the target complement event. The at least one task instance to be pruned is a task instance in the plurality of task instances other than the at least two target task instances.
[0067] In combination with the description of the above embodiments, it should be understood that the dependency relationship between the at least two target task instances is used to represent the upstream and downstream relationship between the at least two target task instances.
[0068] It can be understood that after the electronic device determines the at least two target task instances, the at least one task instance to be pruned can be determined from the plurality of task instances. Then, the electronic device can obtain the target recovery information in combination with the recovery information of the initial complement event, specifically, the identification of the at least one task instance to be pruned and the dependency relationship between the at least one task instance to be pruned and other task instances included in the recovery information.
[0069] In S104, the electronic device executes the target complement event to make each of the at least two target task instances generate data according to the target recovery information.
[0070] It should be understood that the electronic device executing the target complement event means instructing each task instance corresponding to the target complement event (that is, each target task instance) to perform a data generation operation, so that each target task instance can generate data.
[0071] It can be understood that the case where the electronic device instructs one target task instance to generate data can be divided into the following two cases:
[0072] In one case, the target task instance has not generated data before, and the electronic device instructs the target task instance to generate data, i.e., instructs the target task instance to generate data for the first time.
[0073] In another case, the target task instance has generated data before (but the generated data can have been deleted), and thus the electronic device instructs the target task instance to generate data, i.e., instructs the target task instance to regenerate data, which can also be understood as instructing the target task instance to perform a re-run recovery.
[0074] Optionally, the electronic device can also perform a blocking operation on the target complement event, so that each of the at least two target task instances suspends generating data.
[0075] Optionally, the electronic device can terminate the initial complement event.
[0076] It should be understood that the initial complement event can be being executed, i.e., each of the plurality of task instances is generating data, and the electronic device terminates the initial complement event, i.e., terminates the generation of data by each of the task instances, so that the electronic device can instruct each of the at least two target task instances to generate data.
[0077] The technical solutions provided by the above embodiments can at least bring the following beneficial effects: as can be known from S101-S104, the electronic device can obtain recovery information of an initial complement event and a fixed task instance set, and based on the recovery information and the fixed task instance set, determine at least two target task instances from a plurality of task instances corresponding to the initial complement event; since the at least two target task instances belong to the plurality of task instances, and the at least two target task instances include at least two fixed task instances included in the fixed task instance set, the electronic device can determine part of the task instances in the plurality of task instances (i.e., the at least two target task instances), and the number of the at least two target task instances is less than the number of the plurality of task instances. Then, the electronic device can determine target recovery information based on the recovery information and at least one task instance to be pruned (i.e., a task instance in the plurality of task instances other than the at least two target task instances). Further, the electronic device performs a target complement event to cause each of the at least two target task instances to generate data according to the target recovery information, i.e., the electronic device instructs a smaller number of task instances to generate data to obtain data required by a user, which can ensure timely production of downstream data. At the same time, since the electronic device does not need to perform a data generation operation on the at least one task instance to be pruned, resource waste can be reduced, and the production cycle of user required data can be shortened.
[0078] In combination Figure 1 For example,Figure 2 As shown, in one implementation of this disclosure, determining at least two target task instances from multiple task instances may specifically include S1021.
[0079] S1021. When the first task instance belongs to the fixed task instance set, the electronic device determines the first task instance as the target task instance.
[0080] The first task instance is one of the aforementioned multiple task instances.
[0081] It should be understood that when one of the multiple task instances (e.g., the first task instance) belongs to the set of fixed task instances, it means that the first task instance is one of the at least two fixed task instances mentioned above. In conjunction with the description of the above embodiments, it should be understood that the at least two fixed task instances are task instances input by the user, and the electronic device can determine the user-input task instance as the target task instance, that is, determine the first task instance as the task instance needed by the user.
[0082] The technical solution provided by the above embodiments can bring at least the following beneficial effects: As shown in S1021, when a certain task instance (e.g., the first task instance) among multiple task instances belongs to a fixed task instance set, it means that the first task instance is one of at least two fixed task instances included in the fixed task instance set. Furthermore, since the at least two fixed task instances are user-input task instances, the electronic device can determine the user-input task instance as the target task instance; specifically, it can determine the first task instance as the target task instance, thus conveniently and quickly determining the target task instance and improving the efficiency of target task instance determination.
[0083] Combination Figure 1 ,like Figure 3 As shown, in one implementation of this disclosure, determining at least two target task instances from multiple task instances may further include S1022-S1023.
[0084] S1022. When the first task instance does not belong to the fixed task instance set, the electronic device determines that the first task instance has a downstream task instance.
[0085] The first task instance is one of the aforementioned multiple task instances.
[0086] It should be understood that when a certain task instance (for example, a first task instance) in the plurality of task instances does not belong to the fixed task instance set, it is explained that the first task instance is not a task instance input by the user, and the first task instance is a task instance in the plurality of task instances except the at least two fixed task instances. When the first task instance has a downstream task instance, it is explained that the first task instance is not the most downstream task instance in the plurality of task instances, and the electronic device determines that each task instance has a downstream task instance, that is, determines that each task instance is not the most downstream task instance in the plurality of task instances.
[0087] Optionally, when the first task instance has no downstream task instance, the electronic device can further determine that the first task instance is the most downstream task instance in the plurality of task instances.
[0088] S1023, when the first task instance is not the root task instance in the plurality of task instances, and there is a fixed task instance in the downstream task instance corresponding to the first task instance, the electronic device determines the first task instance as the target task instance.
[0089] It should be understood that when the first task instance is not the root task instance in the plurality of task instances (that is, the most upstream task instance in the plurality of task instances), it is explained that the first task instance has both an upstream task instance and a downstream task instance, and the first task instance can correspond to at least one downstream task instance. When there is a fixed task instance in the downstream task instance corresponding to the first task instance, it is explained that the first task instance is the intermediate task instance. That is, the data generated by the fixed task instance (for example, the most downstream task instance) in the downstream task instance corresponding to the first task instance is the data generated based on (or through) the intermediate task instance. Therefore, the electronic device can determine the first task instance as the target task instance, that is, determine the first task instance as the task instance required by the user.
[0090] In an implementation manner of the embodiment of the present disclosure, when a certain task instance (for example, a first task instance) in the plurality of task instances does not belong to the fixed task instance set, and there is no fixed task instance in the downstream task instance corresponding to the first task instance, the electronic device can determine that the first task instance and the downstream task instance corresponding to the first task instance are not the target task instance.
[0091] In another implementation manner of the embodiment of the present disclosure, when a certain task instance (for example, a first task instance) in the plurality of task instances has no downstream task instance, and the first task instance does not belong to the fixed task instance set, the electronic device can determine that the first task instance is not the target task instance.
[0092] In another implementation of the embodiments of the present disclosure, when each of the plurality of task instances is a root task instance in the plurality of task instances, and the each of the plurality of task instances does not belong to the fixed task instance set, the electronic device determines that the each of the plurality of task instances is not the target task instance.
[0093] In the embodiments of the present disclosure, the electronic device can determine whether a certain task instance (e.g., a first task instance) in the plurality of task instances is the target task instance based on a depth-first search (or a depth-first traversal algorithm). Specifically, for the plurality of task instances, the electronic device can first determine whether a root task instance (i.e., an uppermost task instance) in the plurality of task instances is the target task instance, then determine whether a directly downstream task instance of the root task instance is the target task instance, and then determine whether a downstream task instance of the directly downstream task instance is the target task instance. After the electronic device determines the task instances in a column (or a path), the electronic device determines the task instances in the next column (e.g., a column in which another directly downstream task instance of the root task instance is located).
[0094] It should be noted that when the electronic device recursively traverses each of the plurality of task instances, the order is from top to bottom (i.e., from the uppermost task instance to the lowermost task instance), and the process of determining the result (i.e., whether the each of the plurality of task instances is the target task instance) is from bottom to top, that is, when it is determined that the lowermost task instance is the target task instance (or is not the target task instance), the determination result can be returned to the directly upstream task instance of the lowermost task instance, until the uppermost task instance is returned. In this way, the electronic device can determine whether each of the plurality of task instances is the target task instance.
[0095] The technical solutions provided by the above embodiments can bring at least the following beneficial effects: as can be known from S1022-S1023, when a certain task instance (for example, a first task instance) in a plurality of task instances does not belong to a fixed task instance set, it indicates that the first task instance is a task instance in the plurality of task instances except at least two fixed task instances included in the fixed task instance set, and the electronic device can determine that the first task instance has a downstream task instance, that is, determine that the first task instance is not a most downstream task instance; when the first task instance is not a root task instance in the plurality of task instances, it indicates that the first task instance has both an upstream task instance and a downstream task instance; and when there is a fixed task instance in the downstream task instance corresponding to the first task instance, it indicates that the electronic device needs to obtain data corresponding to the existing fixed task instance based on data generated by the first task instance. In this way, the electronic device can set the first task instance as a target task instance, that is, determine that the first task instance is a task instance required by the user. The electronic device can accurately and effectively determine whether each task instance in the plurality of task instances is a target task instance, and improve the determination efficiency of the target task instance.
[0096] In combination Figure 1 As Figure 4 indicated, in an implementation manner of the embodiments of the present disclosure, the determination of the target recovery information based on the recovery information of the initial complement event and the at least one to-be-pruned task instance can specifically include S1031-S1033.
[0097] S1031, the electronic device generates an initial directed acyclic graph based on the recovery information of the initial complement event.
[0098] The initial directed acyclic graph is a directed acyclic graph corresponding to the initial complement event, and the initial directed acyclic graph includes task instance nodes and edges, the task instance nodes are used to represent task instances, and the edges are used to connect task instance nodes having a dependency relationship.
[0099] In combination with the description of the above embodiments, it should be understood that the dependency relationship between the plurality of task instances is used to represent the upstream and downstream relationship between the plurality of task instances. For example, assuming that the initial directed acyclic graph includes a first task instance node and a second task instance node, when the first task instance node (the first task instance node is the terminal point of an edge, or the terminal point of an arrow direction on the edge) depends on the second task instance node (the second task instance node is the starting point of the edge, or the starting point of the arrow direction on the edge), it indicates that the first task instance node is a (direct) downstream task instance node of the second task instance node.
[0100] S1032. The electronic device performs a pruning operation on at least one to-be-pruned task instance node included in the initial directed acyclic graph to obtain a target directed acyclic graph.
[0101] The at least one to-be-pruned task instance node is a node represented by the at least one to-be-pruned task instance.
[0102] In combination with the above description of the embodiments, it should be understood that the at least one to-be-pruned task instance node is a task instance node included in the initial directed acyclic graph, except for at least two target task instance nodes (i.e., task instance nodes represented by the at least two target task instances).
[0103] It can be understood that the target directed acyclic graph includes target task instance nodes and target edges, the target task instance nodes are nodes represented by target task instances, and the target edges are used to connect target task instance nodes having a dependency relationship.
[0104] In the embodiments of the present disclosure, the electronic device performs a pruning operation on a certain to-be-pruned task instance node, i.e., deletes the to-be-pruned task instance node and edges corresponding to the to-be-pruned task instance node (the corresponding edges are specifically edges between the to-be-pruned task instance node and each target task instance node) in the initial directed acyclic graph. In this way, the electronic device can obtain a target directed acyclic graph, and then only needs to perform a data generation operation on a task instance represented by a target task instance node included in the target directed acyclic graph (i.e., a target task instance).
[0105] For example, Figure 5 This is an example of the electronic device performing a pruning operation on a to-be-pruned task instance node included in an initial directed acyclic graph (i.e., the directed acyclic graph 101) to obtain a target directed acyclic graph (i.e., the directed acyclic graph 102) in the embodiments of the present disclosure. It should be understood that Figure 5 The node represented by a letter in the above table represents a task instance node included in a directed acyclic graph, for example, the node represented by the letter A represents a task instance node A.
[0106] For example, Figure 5As shown, the directed acyclic graph 101 includes 11 task instance nodes and 13 edges. Specifically, the 11 task instance nodes include 3 fixed task instance nodes, i.e., task instance node B, task instance node C, and task instance node K; according to the data processing method provided in the embodiments of the present disclosure, the electronic device determines that the 11 task instance nodes also include 3 to-be-pruned task instance nodes, i.e., task instance node A, task instance node F, and task instance node J; the 11 task instance nodes further include 5 intermediate task instance nodes (i.e., nodes other than the fixed task instance nodes and the to-be-pruned task instance nodes in the plurality of task instance nodes), i.e., task instance node D, task instance node E, task instance node G, task instance node H, and task instance node I.
[0107] As shown in FIG. 10B, the electronic device can determine that the task instance nodes B, C, D, E, G, H, I, and K are target task instance nodes, and the above-mentioned 3 to-be-pruned task instance nodes are determined. Figure 5 As shown, the electronic device can determine that the task instance nodes B, C, D, E, G, H, I, and K are target task instance nodes, and the above-mentioned 3 to-be-pruned task instance nodes are determined. The electronic device performs a pruning operation (specifically, deleting the 3 to-be-pruned task instance nodes and the corresponding 4 edges) on the 3 to-be-pruned task instance nodes, and obtains a directed acyclic graph 102 including 8 task instance nodes.
[0108] It should be noted that, Figure 5 The 8 target task instance nodes shown in FIG. 10B include 3 fixed task instance nodes and 5 intermediate task instance nodes.
[0109] S1033, the electronic device determines target recovery information based on the target directed acyclic graph.
[0110] In combination with the description of the above embodiments, it should be understood that the target recovery information includes the identification of at least two target task instances and the dependency relationship between the at least two target task instances. The target directed acyclic graph includes target task instance nodes and target edges, the target task instance nodes are nodes represented by target task instances, and the target edges are used to connect target task instance nodes having a dependency relationship.
[0111] At this point, the electronic device can determine the identification of each target task instance in the at least two target task instances based on each target task instance node included in the target directed acyclic graph; and can also determine the dependency relationship between the each target task instance and other target task instances based on each target edge included in the target directed acyclic graph, i.e., determine the target recovery information.
[0112] In one implementation of this disclosure, the electronic device may also store the target recovery information in a database.
[0113] It should be understood that when an electronic device stores the target recovery information in a database, it stores the identifier of each of the at least two target task instances, as well as the dependencies between each target task instance and other target task instances. Thus, when the user needs data again, the electronic device can directly retrieve the target recovery information from the database.
[0114] The technical solution provided by the above embodiments can bring at least the following beneficial effects: As shown in S1031-S1033, the electronic device can generate an initial directed acyclic graph based on the recovery information of the initial complement event; and perform a pruning operation on at least one task instance node to be pruned included in the initial directed acyclic graph to obtain a target directed acyclic graph. Since the at least one task instance to be pruned represented by the at least one task instance node to be pruned is a task instance other than at least two target task instances among multiple task instances, the electronic device can obtain a target directed acyclic graph with fewer nodes and fewer edges, and thus can perform data generation operation on each target task instance node included in the target directed acyclic graph, i.e., each target task instance node, reducing resource waste and improving resource utilization. The electronic device can determine the target recovery information based on the target directed acyclic graph, which can improve the efficiency of determining the target recovery information, thereby improving the data generation efficiency.
[0115] Combination Figure 4 ,like Figure 6 As 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. The above-mentioned generation of data for each of the at least two target task instances based on the target recovery information specifically includes S1041-S1042.
[0116] S1041. 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.
[0117] Among them, the directly upstream successful node is the node whose running status is successful among the directly upstream nodes of the current task instance node, and the directly upstream node is the upstream task instance node that has an edge with the current task instance node.
[0118] 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 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.
[0119] It is understood that the electronic device can obtain the running status of each of the at least two target task instances mentioned above. The running status of each target task instance is the running status of the node represented by that target task instance (i.e., each target task instance node). When the running status of a target task instance is "running successfully," it means that the target task instance has successfully generated data. That is, the aforementioned directly upstream successful nodes are the target task instance nodes that have successfully generated data among the directly upstream nodes of the current task instance node.
[0120] In this embodiment of the disclosure, the running status of a task instance (including the target 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 is 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.
[0121] S1042. When the number of successful upstream nodes equals the number of successful upstream nodes, the electronic device determines that the current task instance begins to generate data.
[0122] The current task instance is the task instance represented by the aforementioned current task instance node.
[0123] 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 all nodes are in a successful running state. Thus, the electronic device can determine that the current task instance has begun generating data.
[0124] 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 state. In this case, the electronic device can instruct these nodes to continue generating (or regenerating) data until their running status is updated to successful.
[0125] Optionally, when the current task instance begins generating data, the electronic device can update the running status of the current task instance to "running".
[0126] It is understandable that the current task instance may be in a pending state before it starts generating data. When the current task instance starts generating data, the electronic device updates the running state to running, which means that the current task instance is generating data.
[0127] 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".
[0128] For example, in conjunction with the above Figure 5 In the example, assume the current task instance node is task instance node K in the directed acyclic graph 102. When the number of successful upstream nodes of task instance node K is equal to 3 (the direct upstream nodes of task instance node K include task instance node G, task instance node H, and task instance node I), the electronic device determines that task instance node K has started generating data.
[0129] In one implementation of this disclosure, when the current task instance node is the aforementioned root node, the electronic device can determine the running status of the current task instance node. When the running status of the current task instance node is successful, and there are no other direct upstream nodes directly downstream of the current task instance node, the electronic device determines that the direct downstream node has started generating data.
[0130] The technical solution provided by the above embodiments can bring at least the following beneficial effects: As shown in S1041-S1042, when the current task instance node is a non-root node, it indicates that the current task instance node has upstream task instance nodes, and the electronic device determines the number of directly upstream successful nodes of the current task instance node; when the number of directly upstream successful nodes is equal to the number of directly upstream nodes of the current task instance node, it indicates that all nodes in the directly upstream nodes of the current task instance node have successfully generated data. Thus, the electronic device can determine that the current task instance has started generating data. In this embodiment of the present disclosure, the electronic device can determine the running status of all nodes in the directly upstream nodes of the current task instance, and then determine whether the current task instance node has started generating data. This can conveniently and effectively determine whether each of the at least two target task instances meets the preconditions for data generation, thus improving the accuracy of data generation.
[0131] Combination Figure 6 ,like Figure 7 As shown, in one implementation, the target recovery information further includes the priority of the at least two target task instances, and the data processing method provided in this embodiment further includes S105-S106.
[0132] S105, 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 the direct upstream nodes of the task instance to be identified, the electronic device determines whether the priority of the task instance to be identified is higher than the priority of the current task instance.
[0133] The task instance to be identified is a task instance represented by the task instance node to be identified.
[0134] In combination with the above description of the embodiments, it should be understood that the direct upstream successful node is a node with a running success state among the direct upstream nodes of the current task instance node, and the direct upstream node is an upstream task instance node having an edge between the current task instance node. When the number of the direct upstream successful nodes is equal to the number of the direct upstream nodes, it indicates that all nodes in the direct upstream nodes of the current task instance node have successfully generated data, i.e., the running state of all nodes is running success.
[0135] It can be understood that when the direct upstream nodes of the current task instance node are the same as the direct upstream nodes of the task instance to be identified, it indicates that the current task instance node and the task instance to be identified have the same upstream task instance nodes. Specifically, the upstream task instance nodes having target edges (or dependency relationships) between the current task instance node and the task instance to be identified are the same.
[0136] S106, when the priority of the task instance to be identified is higher than the priority of the current task instance, the electronic device determines that the task instance to be identified starts to generate data in priority.
[0137] It should be understood that different tasks can correspond to different priorities, and the priority of a task can be understood as the attribute information of the task. Different priorities of different tasks can be pre-configured.
[0138] It can be understood that in the process of generating data by each of the at least two target task instances, the electronic device can allocate limited resources to the at least two target task instances. At this time, the electronic device can determine a task instance with a higher priority and process the task instance with a higher priority in priority, i.e., determine that the task instance with a higher priority starts to generate data in priority.
[0139] Optionally, when the priority of the to-be-identified task instance is lower than the priority of the current task instance, the electronic device can determine that the current task instance has priority to start data generation, that is, to determine to process the current task instance with priority.
[0140] For example, the above embodiments are combined with the examples in Figure 5 . It is assumed that the current task instance is a task instance represented by a task instance node H included in the directed acyclic graph 102, and the to-be-identified task instance is a task instance represented by a task instance node I included in the directed acyclic graph 102. It is further assumed that the priority of the task instance represented by the task instance node I is higher than the priority of the task instance represented by the task instance node H. Then, the electronic device determines that the task instance represented by the task instance node I has priority to start data generation.
[0141] The above embodiments can at least bring the following beneficial effects: As can be seen from S105-S106, when the number of direct upstream successful nodes of the current task instance is equal to the number of direct upstream nodes of the current task instance node, it indicates that all the nodes in the direct upstream nodes of the current task instance node have successfully generated data, that is, the running states of all the nodes are running successfully. When the direct upstream nodes of the current task instance node are the same as the direct upstream nodes of the to-be-identified task instance node, it indicates that the current task instance node and the to-be-identified task instance node have the same upstream task instance node. At this time, the electronic device can determine whether the priority of the to-be-identified task instance is higher than the priority of the current task instance, and when the priority of the to-be-identified task instance is higher than the priority of the current task instance, it is determined that the to-be-identified task instance has priority to start data generation. In the present embodiment, when two target task instances have the same upstream task instance, and all the upstream task instances of the two target task instances have all successfully generated data, the electronic device can determine the priority of each of the two target task instances, and process the target task instance with higher priority with priority, specifically, determine that the target task instance with higher priority has priority to start data generation. This can reasonably determine the processing order of each target task instance, and improve the effectiveness of data processing.
[0142] In combination with Figure 1 , as shown in Figure 8 , the data processing method provided by the present embodiment further includes S107.
[0143] S107, when the first task instance does not belong to the fixed task instance set, and there is no fixed task instance in the downstream task instance corresponding to the first task instance, the electronic device adds a preset identifier to the first task instance and the downstream task instance corresponding to the first task instance.
[0144] The preset identifier is used to represent that the first task instance and the downstream task instance corresponding to the first task instance are not target task instances.
[0145] In combination with the above description of the embodiments, it should be understood that when a certain task instance (for example, the first task instance) in the plurality of task instances has a downstream task instance, it is indicated that the first task instance is not the most downstream task instance. When the first task instance does not belong to the fixed task instance set, and there is no fixed task instance in the downstream task instance corresponding to the first task instance, it is indicated that the first task instance is the intermediate task instance. In this way, the electronic device can determine that the first task instance and the downstream task instance corresponding to the first task instance are not target task instances, that is, the first task instance and the downstream task instance corresponding to the first task instance are determined to be task instances to be pruned. For example, the task instance represented by the task instance node F and the task instance represented by the task instance node J shown in the above embodiment. Figure 5
[0146] It can be understood that the first task instance and / or each downstream task instance corresponding to the first task instance can exist in more than one column (or more than one path). After the electronic device determines that the first task instance and the downstream task instance corresponding to the first task instance are not target task instances, the electronic device can add a preset identifier to the first task instance and the downstream task instance corresponding to the first task instance, so that when the electronic device traverses the next column (or the next path) (the next column includes the first task instance and / or the downstream task instance corresponding to the first task instance), the electronic device can directly determine that the first task instance and the downstream task instance corresponding to the first task instance are not target task instances based on the preset identifier without repeated traversal.
[0147] In an implementation manner of the embodiments of the present disclosure, when a certain task instance (for example, the first task instance) in the plurality of task instances does not belong to the fixed task instance set, and the first task instance has no downstream task instance, the electronic device can also add the preset identifier to the first task instance.
[0148] The technical solutions provided by the above embodiments can bring at least the following beneficial effects: as can be known from S109, when a task instance (for example, a first task instance) in the plurality of task instances does not belong to the set of fixed task instances, it is indicated that the first task instance is an intermediate task instance or a task instance to be pruned; and because there is no fixed task instance in the downstream task instances corresponding to the first task instance, it is indicated that the first task instance and the downstream task instances corresponding to the first task instance are not intermediate task instances that need to be passed through by the fixed task instances. In this way, the electronic device can add a preset identifier to the first task instance and the downstream task instances corresponding to the first task instance, so that when the electronic device traverses the first task instance and / or the downstream task instances corresponding to the first task instance next time, the electronic device can directly determine that the first task instance and the downstream task instances corresponding to the first task instance are not target task instances based on the preset identifier without repeated traversal. The determination efficiency of the target task instance can be improved, and thus the generation period of data can be shortened.
[0149] It can be understood that, in actual implementation, the electronic device described in the embodiments of the present disclosure includes one or more hardware structures and / or software modules for implementing the foregoing corresponding data processing method, and these execution hardware structures and / or software modules can constitute an electronic device. Those skilled in the art should easily realize that, in combination with the algorithm steps of the examples described in the embodiments disclosed herein, the present disclosure can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driven hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present disclosure.
[0150] Based on such understanding, the embodiments of the present disclosure also correspondingly provide a data processing apparatus, Figure 9 The structure schematic diagram of the data processing apparatus provided by the embodiments of the present disclosure is shown. As Figure 9 It is shown that the data processing apparatus 20 can include an acquisition module 201, a determination module 202, and a processing module 203.
[0151] The acquisition module 201 is configured to acquire recovery information of an initial complement event and a set of fixed task instances, the recovery information including the identification of a plurality of task instances and the dependency relationship between the plurality of task instances, and the set of fixed task instances including at least two fixed task instances.
[0152] The determination module 202 is configured to determine at least two target task instances from the plurality of task instances based on the recovery information and the set of fixed task instances, the at least two target task instances including the at least two fixed task instances.
[0153] The determining module 202 is further configured to determine target recovery information based on the recovery information and at least one task instance to be pruned, the target recovery information comprising identifications of the at least two target task instances and a dependency relationship between the at least two target task instances, the target recovery information being recovery information of a target complement event, the at least one task instance to be pruned being a task instance other than the at least two target task instances in the plurality of task instances.
[0154] The processing module 203 is configured to execute the target complement event to cause each of the at least two target task instances to generate data according to the target recovery information.
[0155] Optionally, the determining module 202 is specifically configured to determine the first task instance as a target task instance when the first task instance belongs to the fixed task instance set, the first task instance being one of the plurality of task instances.
[0156] Optionally, the determining module 202 is specifically configured to determine that the first task instance has a downstream task instance when the first task instance does not belong to the fixed task instance set, the first task instance being one of the plurality of task instances.
[0157] The determining module 202 is further specifically configured to determine the first task instance as a target task instance when the first task instance is not a root task instance in the plurality of task instances and there is a fixed task instance in the downstream task instance corresponding to the first task instance.
[0158] Optionally, the processing module 203 is specifically configured to generate an initial directed acyclic graph based on the recovery information of the initial complement event, the initial directed acyclic graph being a directed acyclic graph corresponding to the initial complement event, the initial directed acyclic graph comprising task instance nodes and edges, the task instance nodes being used to represent task instances, and the edges being used to connect task instance nodes having a dependency relationship.
[0159] The processing module 203 is further specifically configured to perform a pruning operation on at least one task instance node to be pruned in the initial directed acyclic graph to obtain a target directed acyclic graph, the at least one task instance node to be pruned being a node represented by the at least one task instance to be pruned.
[0160] The determining module 202 is specifically configured to determine the target recovery information based on the target directed acyclic graph.
[0161] Optionally, 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.
[0162] The determining module 202 is further configured to determine the number of the 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 with a running success state among the direct upstream nodes of the current task instance node, and the direct upstream node being an upstream task instance node having an edge between the current task instance node and the upstream task instance node.
[0163] The determining module 202 is further configured to determine that the current task instance starts to generate data 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.
[0164] Optionally, the target recovery information further includes priorities of the at least two target task instances.
[0165] The determining module 202 is further configured to determine whether the priority of a to-be-identified task instance is higher than the 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 the direct upstream nodes of the to-be-identified task instance node, the to-be-identified task instance node being a task instance node other than the current task instance node among the at least two task instance nodes included in the target directed acyclic graph, and the to-be-identified task instance being a task instance represented by the to-be-identified task instance node.
[0166] The determining module 202 is further configured to determine that the to-be-identified task instance starts to generate data in priority when the priority of the to-be-identified task instance is higher than the priority of the current task instance.
[0167] Optionally, the processing module 203 is further configured to add a preset identifier to the first task instance and the downstream task instances corresponding to the first task instance when the first task instance does not belong to the fixed task instance set and there is no fixed task instance in the downstream task instances corresponding to the first task instance, the preset identifier being used to represent that the first task instance and the downstream task instances corresponding to the first task instance are not target task instances, and the first task instance being one of the plurality of task instances.
[0168] As described above, the embodiments of the present disclosure can divide the functional modules of the data processing apparatus according to the method examples described above. The integrated modules described above can be implemented in the form of hardware or in the form of software functional modules. In addition, it should be noted that the division of modules in the embodiments of the present disclosure is illustrative, and is only a logical functional division. Actual implementation can have another division manner. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module.
[0169] As to the data processing apparatus in the above-mentioned embodiments, the specific manner in which each module performs operations and the beneficial effects possessed have been described in detail in the foregoing method embodiments, which will not be described here again.
[0170] Figure 10 is a structural schematic diagram of another data processing apparatus provided by the present disclosure. As Figure 10 The data processing apparatus 30 can 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 in the above-mentioned embodiments.
[0171] In addition, the data processing apparatus 30 can further include a communication bus 302 and at least one communication interface 304.
[0172] The processor 301 can be a central processing unit (CPU), a micro-processing unit, an ASIC, or one or more integrated circuits for controlling program execution of the present disclosure scheme.
[0173] The communication bus 302 can include a path for transmitting information between the above-mentioned components.
[0174] The communication interface 304 uses any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc.
[0175] 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.
[0176] 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.
[0177] In a specific implementation, as one example, processor 301 may include one or more CPUs, for example... Figure 10 CPU0 and CPU1 in the CPU.
[0178] In a specific implementation, as one example, the data processing device 30 may include multiple processors, such as... Figure 10 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).
[0179] In a specific implementation, as an embodiment, the data processing apparatus 30 can further include an output device 305 and an input device 306. The output device 305 is in communication with the processor 301 and can display information in a variety of ways. For example, the output device 305 can 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 is in communication with the processor 301 and can accept user input in a variety of ways. For example, the input device 306 can be a mouse, a keyboard, a touch screen device, a sensor device, etc.
[0180] Those skilled in the art can understand that the structure shown in the above embodiments does not constitute a limitation on the data processing apparatus 30, and can include more or fewer components than shown, or combine certain components, or use different component arrangements. Figure 10
[0181] In addition, the present disclosure also provides a computer readable storage medium, including instructions, when the instructions are executed by a processor, the processor executes the data processing method provided by the above embodiments.
[0182] In addition, the present disclosure also provides a computer program product, including instructions, when the instructions are executed by a processor, the processor executes the data processing method provided by the above embodiments.
[0183] Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure following the general principles thereof and including such departures from the present disclosure that come within known, accepted, or customary practice in the art to which the present disclosure pertains. The specification and examples are to be regarded as illustrative only, and the true scope and spirit of the present disclosure are indicated by the claims.
Claims
1. A data processing method, characterized by, The method comprises: obtaining recovery information of an initial complement event and a fixed task instance set, the recovery information comprising identification of a plurality of task instances and a dependency relationship between the plurality of task instances, and the fixed task instance set comprising at least two fixed task instances; determining at least two target task instances from the plurality of task instances based on the recovery information and the fixed task instance set, the at least two target task instances comprising the at least two fixed task instances; the target task instance comprises a task instance belonging to the fixed task instance set, or a task instance not belonging to the fixed task instance set and not being a root task instance in the plurality of task instances and having a fixed task instance in corresponding downstream task instances; determining target recovery information based on the recovery information and at least one task instance to be pruned, the target recovery information comprising identification of the at least two target task instances and a dependency relationship between the at least two target task instances, the target recovery information being recovery information of a target complement event, and the at least one task instance to be pruned being a task instance other than the at least two target task instances in the plurality of task instances; executing the target complement event to cause each of the at least two target task instances to generate data according to the target recovery information.
2. The data processing method of claim 1, wherein, The determining of the target recovery information based on the recovery information and the at least one task instance to be pruned comprises: generating an initial directed acyclic graph based on the recovery information of the initial complement event, the initial directed acyclic graph being a directed acyclic graph corresponding to the initial complement event, the initial directed acyclic graph comprising task instance nodes and edges, the task instance nodes being used to represent task instances, and the edges being used to connect task instance nodes having a dependency relationship; performing a pruning operation on at least one task instance node to be pruned in the initial directed acyclic graph to obtain a target directed acyclic graph, the at least one task instance node to be pruned being a node represented by the at least one task instance to be pruned; determining the target recovery information based on the target directed acyclic graph.
3. The data processing method according to claim 2, characterized in that, 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, and the causing of each of the at least two target task instances to generate data according to the target recovery information comprises: when the current task instance node is the non-root node, determining a number of direct upstream successful nodes of the current task instance node, the direct upstream successful node being a node having a running state of running success in direct upstream nodes of the current task instance node, and the direct upstream node being an upstream task instance node having an edge with the current task instance node; when the number of direct upstream successful nodes is equal to the number of direct upstream nodes, determining that a current task instance starts to generate data, the current task instance being a task instance represented by the current task instance node.
4. The data processing method according to claim 3, characterized in that, The target recovery information further comprises priorities of the at least two target task instances, and the method further comprises: when the number of the direct upstream successful nodes is equal to the number of the direct upstream nodes, and the direct upstream node is the same as a direct upstream node of a to-be-identified task instance node, determining whether a priority of the to-be-identified task instance is higher than a priority of the current task instance, wherein the to-be-identified task instance node is a task instance node other than the current task instance node among at least two task instance nodes included in the target directed acyclic graph, and the to-be-identified task instance is a task instance represented by the to-be-identified task instance node; when the priority of the to-be-identified task instance is higher than the priority of the current task instance, determining that the to-be-identified task instance starts to generate data in priority.
5. The data processing method according to any one of claims 1-4, characterized in that, The method further comprises: when the first task instance does not belong to the fixed task instance set, and there is no fixed task instance in downstream task instances corresponding to the first task instance, adding a preset identifier to the first task instance and the downstream task instances corresponding to the first task instance, the preset identifier being used to represent that the first task instance and the downstream task instances corresponding to the first task instance are not target task instances, and the first task instance being one of the plurality of task instances.
6. A data processing apparatus, characterized by comprise: an acquisition module, a determination module, and a processing module; the acquisition module is configured to acquire recovery information of an initial complement event and a fixed task instance set, the recovery information comprising identifiers of a plurality of task instances and a dependency relationship among the plurality of task instances, and the fixed task instance set comprising at least two fixed task instances; the determination module is configured to determine at least two target task instances from the plurality of task instances based on the recovery information and the fixed task instance set, the at least two target task instances comprising the at least two fixed task instances; the target task instances comprise task instances belonging to the fixed task instance set, or task instances not belonging to the fixed task instance set and not being root task instances in the plurality of task instances and having fixed task instances in corresponding downstream task instances; the determination module is further configured to determine target recovery information based on the recovery information and at least one to-be-pruned task instance, the target recovery information comprising identifiers of the at least two target task instances and a dependency relationship among the at least two target task instances, the target recovery information being recovery information of a target complement event, and the at least one to-be-pruned task instance being a task instance other than the at least two target task instances in the plurality of task instances; the processing module is configured to execute the target complement event to cause each target task instance in the at least two target task instances to generate data according to the target recovery information.
7. The data processing apparatus according to claim 6, characterized in that, The processing module is specifically configured to generate an initial directed acyclic graph based on the recovery information of the initial complement event, the initial directed acyclic graph being a directed acyclic graph corresponding to the initial complement event, the initial directed acyclic graph comprising task instance nodes and edges, the task instance nodes being used to represent task instances, and the edges being used to connect task instance nodes having a dependency relationship; The processing module is further specifically configured to perform a pruning operation on at least one to-be-pruned task instance node included in the initial directed acyclic graph to obtain a target directed acyclic graph, the at least one to-be-pruned task instance node being a node represented by the at least one to-be-pruned task instance; The determining module is specifically configured to determine the target recovery information based on the target directed acyclic graph.
8. The data processing apparatus according to claim 7, characterized in that, 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 further specifically configured to, when the current task instance node is the non-root node, determine a number of direct upstream successful nodes of the current task instance node, the direct upstream successful nodes being nodes having a running state of running success among direct upstream nodes of the current task instance node, and the direct upstream nodes being upstream task instance nodes having edges between the direct upstream nodes and the current task instance node; The determining module is further specifically configured to, when the number of the direct upstream successful nodes is equal to the number of the direct upstream nodes, determine that a current task instance starts to generate data, the current task instance being a task instance represented by the current task instance node.
9. The data processing apparatus according to claim 8, characterized in that, The target recovery information further comprises priorities of the at least two target task instances; The determining module is further configured to, 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 to-be-identified task instance node, determine whether a priority of a to-be-identified task instance is higher than a priority of the current task instance, wherein the to-be-identified task instance node is a task instance node other than the current task instance node among at least two task instance nodes included in the target directed acyclic graph, and the to-be-identified task instance is a task instance represented by the to-be-identified task instance node; The determining module is further configured to, when the priority of the to-be-identified task instance is higher than the priority of the current task instance, determine that the to-be-identified task instance starts to generate data in priority.
10. The data processing apparatus of any one of claims 6-9, wherein The processing module is further configured to, when the first task instance does not belong to the fixed task instance set and there is no fixed task instance among downstream task instances corresponding to the first task instance, add a preset identifier to the first task instance and the downstream task instances corresponding to the first task instance, the preset identifier being used to represent that the first task instance and the downstream task instances corresponding to the first task instance are not target task instances, and the first task instance being one of the plurality of task instances.
11. An electronic device, comprising: The electronic device comprises: a processor; a memory configured to store processor-executable instructions; wherein the processor is configured to execute the instructions to implement the data processing method of any one of claims 1-5.
12. A computer-readable storage medium having stored thereon instructions, the instructions comprising, When the instructions in the computer-readable storage medium are executed by the electronic device, the electronic device is enabled to perform the data processing method of any one of claims 1-5.
13. A computer program product, characterised in that, The computer program product comprises computer instructions which, when run on an electronic device, cause the electronic device to perform the data processing method of any one of claims 1-5.
Citation Information
Patent Citations
Task processing method and device, electronic equipment and storage medium
CN112764907A
Data processing method and electronic device
US20190303368A1