Power computing task re-running method, device, computer equipment, computer readable storage medium and computer program product
By detecting the rerun command in the command list and storing it in the message queue, the problem that power calculation tasks in the power system is difficult to rerun again, and the effective rerun and calculation rules for rerun power calculation tasks are realized.
Patent Information
- Application Number
- CN202411123174.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-08-15
AI Technical Summary
It is difficult for the prior art to perform backtracking and rerunning of power calculation tasks in power systems, especially in Flink calculation tasks. The data progress of all power calculation tasks is consistent, making it difficult to perform rerunning for power calculation tasks to be rerunned to a certain moment in the past.
It provides a method of rerunning the power calculation task. By detecting the rerun command in the command list, it determines the power calculation task to be rerun and its rerun time point, obtains the task data flow, and stores the rerun command and task data flow in the message queue, thereby realizing the rerunning the power calculation task to be rerun.
The data progress of different power calculation tasks to be re-run is realized, so that the re-running power calculation tasks to be re-runned to a certain moment in the past is able to verify the correctness of the calculation rules.
Smart Images

Figure CN118885279B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electric power technology, and in particular to a method, device, computer equipment, computer-readable storage medium and computer program product for rerunning an electric power computing task. Background Art
[0002] In practical applications, the analysis of the power system is often achieved through the execution of power calculation tasks. There is a huge amount of time series data in the power system. Therefore, when a new power calculation task is released or the calculation rules of the power calculation task configuration are changed, it is often necessary to go back to a certain moment in the past to rerun the power calculation task in order to observe the execution effect of the power calculation task under historical data, and then verify the correctness of the calculation rules of the power calculation task.
[0003] In the related technology, streaming computing frameworks such as Flink (a big data streaming computing framework) are usually used to perform power computing tasks. In a Flink computing task, multiple power computing tasks will be executed, and the time series data of the power system will be pulled during the execution of the Flink computing task; however, this method will cause the data progress of all power computing tasks in a Flink computing task to remain consistent, so it is difficult to trace back to a certain moment in the past and rerun the power computing task to be rerun. Summary of the invention
[0004] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product that can realize the re-running of power calculation tasks in order to address the above-mentioned technical problem that it is difficult to realize the re-running of power calculation tasks.
[0005] In a first aspect, the present application provides a method for rerunning a power computing task, which is applied to a power computing platform, wherein the power computing platform includes a plurality of nodes, each of which is used to perform corresponding processing during the execution of the power computing task, including:
[0006] In the case where a rerun command is detected in the command list, determining the power calculation task to be rerun for the rerun command and the rerun time point corresponding to the power calculation task to be rerun; the rerun command is at least one, and each rerun command corresponds to a power calculation task to be rerun;
[0007] Obtaining the task data stream of the power calculation task to be re-run after the re-run time point;
[0008] The re-run command and the task data stream are stored in a message queue corresponding to a power computing task set to which the power computing task to be re-run belongs; the power computing task set includes a plurality of power computing tasks with the same task type;
[0009] The rerun command and the task data stream of the power computing task to be rerun are taken out from the message queue, the rerun command is used as the command stream of the power computing task to be rerun, and the task data stream is used as the data stream of the power computing task to be rerun, and the power computing task to be rerun is rerun based on the command stream and the data stream; each node is used to perform processing corresponding to the command stream on the command stream when the command stream flows through the node, and each node is used to perform processing corresponding to the data stream on the data stream when the data stream flows through the node.
[0010] In one of the embodiments, the task data stream carries task description information of the power computing task to be re-run;
[0011] The re-running the power computing task to be re-run based on the command stream and the data stream comprises:
[0012] Based on the rerun command in the command stream, clear the calculation results of the power calculation task to be rerun after the rerun time point stored in the database, and clear the data value of the task data stream corresponding to the power calculation task to be rerun during the historical execution process stored in the state memory;
[0013] Based on the task description information of the power calculation task to be re-run, the task data flow in the data stream is calculated to re-run the power calculation task to be re-run, and the re-run calculation result of the power calculation task to be re-run after the re-run time point is obtained, and the re-run calculation result is stored in the database.
[0014] In one of the embodiments, the power calculation task to be re-run corresponds to at least one associated measurement point;
[0015] The step of obtaining the task data flow of the power calculation task to be re-run after the re-run time point includes:
[0016] Acquire the time series data of each associated measuring point of the power calculation task to be re-run after the re-run time point;
[0017] The time series data of each associated measuring point after the re-run time point are determined as the task data flow of the power calculation task to be re-run after the re-run time point.
[0018] In one embodiment, each task data stream also carries a measurement point identifier of the associated measurement point and a task identifier of the power calculation task to be re-run;
[0019] The calculating the task data flow in the data flow based on the task description information of the power calculation task to be re-run includes:
[0020] Determine the data identifier of each task data stream according to the measurement point identifier and the task identifier carried by each task data stream;
[0021] Based on the data identifier of each task data stream, the data value of each task data stream is acquired from the state memory; the data value of each task data stream stored in the state memory is the current data value in each task data stream;
[0022] Based on the task description information of the power calculation task to be re-run, the data value of each task data stream is calculated.
[0023] In one embodiment, taking out the rerun command and the task data stream of the power computing task to be rerun from the message queue, using the rerun command as the command stream of the power computing task to be rerun, using the task data stream as the data stream of the power computing task to be rerun, and rerunning the power computing task to be rerun based on the command stream and the data stream, comprises:
[0024] Read each rerun name and each task data stream in the message queue;
[0025] According to the task identifier carried by each re-run command and the task identifier carried by each task data stream, the re-run command and the task data stream corresponding to each power calculation task to be re-run are obtained;
[0026] For each power calculation task to be re-run, the re-run command of the power calculation task to be re-run is used as the command stream of the power calculation task to be re-run, and the task data stream of the power calculation task to be re-run is used as the data stream of the power calculation task to be re-run;
[0027] According to the command stream and the data stream corresponding to each power calculation task to be re-run, each power calculation task to be re-run is executed respectively.
[0028] In one embodiment, the method further comprises:
[0029] Receive a task identifier of the power calculation task to be re-run and a re-run time point corresponding to the power calculation task to be re-run;
[0030] Based on the task identifier and the re-run time point, generating a re-run command for the power calculation task to be re-run;
[0031] Storing the rerun command in the command list;
[0032] Before determining the power calculation task to be re-run for the re-run command and the re-run time point corresponding to the power calculation task to be re-run, the method further includes:
[0033] The rerun command is taken from the command list.
[0034] In a second aspect, the present application further provides a power computing task rerunning device, the device being equipped with a power computing platform, the power computing platform comprising a plurality of nodes, each node being used to perform corresponding processing during the execution of the power computing task, including:
[0035] An information determination module is used to determine, when a rerun command is detected in a command list, the power calculation task to be rerun that the rerun command targets and the rerun time point corresponding to the power calculation task to be rerun; the rerun command is at least one, and each rerun command corresponds to a power calculation task to be rerun;
[0036] A data acquisition module, used for acquiring the task data stream of the power calculation task to be re-run after the re-run time point;
[0037] An information storage module, used for storing the re-run command and the task data stream in a message queue corresponding to a power computing task set to which the power computing task to be re-run belongs; the power computing task set includes a plurality of power computing tasks with the same task type;
[0038] A task rerun module is used to take out the rerun command and the task data stream of the power computing task to be rerun from the message queue, use the rerun command as the command stream of the power computing task to be rerun, use the task data stream as the data stream of the power computing task to be rerun, and rerun the power computing task to be rerun based on the command stream and the data stream; each node is used to perform processing corresponding to the command stream on the command stream when the command stream flows through the node, and each node is used to perform processing corresponding to the data stream when the data stream flows through the node.
[0039] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0040] In the case where a rerun command is detected in the command list, determining the power calculation task to be rerun for the rerun command and the rerun time point corresponding to the power calculation task to be rerun; the rerun command is at least one, and each rerun command corresponds to a power calculation task to be rerun;
[0041] Obtaining the task data stream of the power calculation task to be re-run after the re-run time point;
[0042] The re-run command and the task data stream are stored in a message queue corresponding to a power computing task set to which the power computing task to be re-run belongs; the power computing task set includes a plurality of power computing tasks with the same task type;
[0043] The rerun command and the task data stream of the power computing task to be rerun are taken out from the message queue, the rerun command is used as the command stream of the power computing task to be rerun, and the task data stream is used as the data stream of the power computing task to be rerun, and the power computing task to be rerun is rerun based on the command stream and the data stream; each node of the power computing platform is used to perform processing corresponding to the command stream on the command stream when the command stream flows through the node, and each node is used to perform processing corresponding to the data stream on the data stream when the data stream flows through the node.
[0044] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0045] In the case where a rerun command is detected in the command list, determining the power calculation task to be rerun for the rerun command and the rerun time point corresponding to the power calculation task to be rerun; the rerun command is at least one, and each rerun command corresponds to a power calculation task to be rerun;
[0046] Obtaining the task data stream of the power calculation task to be re-run after the re-run time point;
[0047] The re-run command and the task data stream are stored in a message queue corresponding to a power computing task set to which the power computing task to be re-run belongs; the power computing task set includes a plurality of power computing tasks with the same task type;
[0048] The rerun command and the task data stream of the power computing task to be rerun are taken out from the message queue, the rerun command is used as the command stream of the power computing task to be rerun, and the task data stream is used as the data stream of the power computing task to be rerun, and the power computing task to be rerun is rerun based on the command stream and the data stream; each node of the power computing platform is used to perform processing corresponding to the command stream on the command stream when the command stream flows through the node, and each node is used to perform processing corresponding to the data stream on the data stream when the data stream flows through the node.
[0049] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0050] In the case where a rerun command is detected in the command list, determining the power calculation task to be rerun for the rerun command and the rerun time point corresponding to the power calculation task to be rerun; the rerun command is at least one, and each rerun command corresponds to a power calculation task to be rerun;
[0051] Obtaining the task data stream of the power calculation task to be re-run after the re-run time point;
[0052] The re-run command and the task data stream are stored in a message queue corresponding to a power computing task set to which the power computing task to be re-run belongs; the power computing task set includes a plurality of power computing tasks with the same task type;
[0053] The rerun command and the task data stream of the power computing task to be rerun are taken out from the message queue, the rerun command is used as the command stream of the power computing task to be rerun, and the task data stream is used as the data stream of the power computing task to be rerun, and the power computing task to be rerun is rerun based on the command stream and the data stream; each node of the power computing platform is used to perform processing corresponding to the command stream on the command stream when the command stream flows through the node, and each node is used to perform processing corresponding to the data stream on the data stream when the data stream flows through the node.
[0054] The above-mentioned power calculation task rerun method, device, computer equipment, computer-readable storage medium and computer program product first determine the power calculation task to be rerun for the rerun command and the rerun time point corresponding to the power calculation task to be rerun when a rerun command is detected in the command list; there is at least one rerun command, and each rerun command corresponds to a power calculation task to be rerun; then, the task data stream of the power calculation task to be rerun after the rerun time point is obtained; then, the rerun command and the task data stream are stored in the power calculation task set to which the power calculation task to be rerun belongs. The power computing task set includes multiple power computing tasks with the same task type; finally, the rerun command and task data stream of the power computing task to be rerun are taken out from the message queue, the rerun command is used as the command stream of the power computing task to be rerun, and the task data stream is used as the data stream of the power computing task to be rerun, and the power computing task to be rerun is rerun based on the command stream and the data stream; each node is used to process the command stream corresponding to the command stream when the command stream flows through the node, and each node is used to process the data stream corresponding to the data stream when the data stream flows through the node. In this way, based on the rerun command, the rerun time point corresponding to the power calculation task to be rerun targeted by the rerun command can be determined, so that the task data stream of the power calculation task to be rerun after the rerun time point can be obtained, and based on the task data stream of the power calculation task to be rerun after the rerun time point, the power calculation task to be rerun can be rerun; the power calculation task rerun method based on the above process can realize the decoupling of the data progress of different power calculation tasks to be rerun, so that it can trace back to a certain moment in the past to rerun the power calculation task to be rerun. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0056] Figure 1 It is a flowchart of a method for re-running a power calculation task in one embodiment;
[0057] Figure 2 A flowchart of steps for re-running a power calculation task to be re-run based on a command stream and a data stream in one embodiment;
[0058] Figure 3 A flowchart of the steps of obtaining the task data flow of the power calculation task to be re-run after the re-run time point in one embodiment;
[0059] Figure 4 It is a flowchart of the steps of calculating the task data flow in the data flow based on the task description information of the power calculation task to be re-run in one embodiment;
[0060] Figure 5 A flowchart of the steps of taking out a rerun command and a task data stream of a power calculation task to be rerun from a message queue in one embodiment, using the rerun command as the command stream of the power calculation task to be rerun, using the task data stream as the data stream of the power calculation task to be rerun, and rerunning the power calculation task to be rerun based on the command stream and the data stream;
[0061] Figure 6 It is a flowchart of a Flink-based power time series data rule calculation re-running method in one embodiment;
[0062] Figure 7 It is a flowchart of a Flink-based power time series data rule calculation re-running method in another embodiment;
[0063] Figure 8 is a schematic diagram of a partitioner, a classifier, a data pipeline, a command pipeline, and a state memory in one embodiment;
[0064] Fig. 9 It is a structural block diagram of a device for re-running a power computing task in one embodiment;
[0065] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0066] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0067] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0068] In one embodiment, a method for rerunning a power computing task is provided. This embodiment illustrates the method by applying it to a server equipped with a power computing platform. It is understandable that the method can also be applied to a terminal equipped with a power computing platform, and can also be applied to a system including a server and a terminal, and is implemented through the interaction between the server and the terminal; wherein the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services; the terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, etc.
[0069] The power computing platform uses Flink as the underlying computing engine, including the Flink architecture, task configuration module, data storage module, data pull module and command list. In this application, by encapsulating each node (operator) in the Flink architecture, the partitioner, classifier, state memory, data pipeline and command pipeline in any of the following embodiments can be implemented, and each node is used to perform corresponding processing during the execution of the power computing task.
[0070] like Figure 1 As shown, in this embodiment, the method includes the following steps:
[0071] Step S102, when it is detected that there is a rerun command in the command list, determine the power calculation task to be rerun that is targeted by the rerun command and the rerun time point corresponding to the power calculation task to be rerun.
[0072] There are one or more rerun commands in the command list, and each rerun command corresponds to a power calculation task to be rerun.
[0073] In actual applications, the rerun command has a specific format, such as a specific function or expression, so that the power computing platform can recognize it as a rerun command.
[0074] The rerun command carries the task identifier of the corresponding power calculation task to be rerun and the rerun time point corresponding to the power calculation task to be rerun.
[0075] The rerun time point is the time starting point of the time series data used to participate in the rerun process of the power calculation task to be rerun set by the user. The rerun time point is usually any time point before the current moment.
[0076] Each power calculation task to be re-run has a corresponding calculation rule, and the execution process of the power calculation task to be re-run is the process of performing calculation according to the corresponding calculation rule.
[0077] Specifically, the power calculation platform accesses the command list at preset time intervals, and when a rerun command appears in the command list, takes out the rerun command (i.e. removes the rerun command from the command list); and for each rerun command taken out, based on the task identifier and rerun time point carried by the rerun command, determines the power calculation task to be rerun that the rerun command targets, and the rerun time point corresponding to the power calculation task to be rerun.
[0078] Step S104, obtaining the task data stream of the power calculation task to be re-run after the re-run time point.
[0079] The task data flow of the power calculation task to be re-run refers to the time series data corresponding to the associated measurement points of the power calculation task to be re-run.
[0080] There are one or more associated measuring points for each power calculation task to be re-run. The associated measuring points refer to the measuring points involved in the power calculation task to be re-run.
[0081] Among them, the measurement point is the way to organize the time series data in the power system in the power field. One measurement point corresponds to a set of time series data. For example, the current of the high-voltage side winding of the transformer is a measurement point, and another example is the state of a switch. The time series data of the measurement point is the time series measurement value or time series state value of the measurement point.
[0082] Specifically, the timing data of each measuring point of the power system is stored in the data storage module; the data pulling module pulls the timing data of each associated measuring point corresponding to each power calculation task to be re-run after the corresponding re-run time point from the data storage module for each power calculation task to be re-run, and uses the timing data corresponding to each associated measuring point as the task data stream to be re-run for the power calculation task to be re-run.
[0083] Step S106, storing the rerun command and the task data stream in the message queue corresponding to the power computing task set to which the power computing task to be rerun belongs.
[0084] The power computing platform has a plurality of preset power computing task sets, and the task types of the power computing tasks in each power computing task set are the same; each task type defines a mode or paradigm.
[0085] Specifically, the power computing platform will store the rerun commands of each power computing task to be rerun and each task data stream of each power computing task to be rerun in the message queue corresponding to the power computing task set to which the corresponding power computing task to be rerun belongs.
[0086] In actual applications, the message queue is the Kafka topic in the Flink architecture (a high-throughput distributed publish-subscribe messaging system).
[0087] Step S108, take out the rerun command and task data stream of the power computing task to be rerun from the message queue, use the rerun command as the command stream of the power computing task to be rerun, use the task data stream as the data stream of the power computing task to be rerun, and rerun the power computing task to be rerun based on the command stream and the data stream.
[0088] Each node is used to process the command stream corresponding to the command stream when the command stream flows through the node, and each node is used to process the data stream corresponding to the data stream when the data stream flows through the node, that is, each node processes the command stream and the data stream differently.
[0089] Specifically, the Flink computing tasks in the Flink architecture pull rerun commands and task data streams from each Kafka topic, and classify the retrieved data based on the classifier to determine whether it is command data (rerun commands) or business data (task data stream), and send the rerun commands belonging to the command data as the command stream into the command pipeline, and send the task data stream belonging to the business data as the data stream into the data pipeline.
[0090] For each power computing task to be rerun, the Flink computing task reruns the power computing task to be rerun according to the command stream and data stream corresponding to the power computing task to be rerun. The rerun process for each power computing task to be rerun is as follows: in response to the rerun command in the command stream for the power computing task to be rerun, the power computing task to be rerun is rerun based on the task data stream in the data stream of the power computing task to be rerun.
[0091] In actual applications, the power computing platform reruns the power computing tasks to be rerun based on the latest data values in the task data stream.
[0092] In actual applications, Flink computing tasks rerun various power computing tasks to be rerun in parallel.
[0093] In actual applications, step S106 and step S108 are performed simultaneously, that is, as the time section of the acquired task data stream (time series data) advances, the power computing platform continuously stores the task data stream under the current time section into the message queue, and at the same time continuously takes out the task data stream under the current time section, and re-runs the power computing tasks to be re-run based on the task data stream.
[0094] In the above-mentioned method for rerunning electric power computing tasks, first, when the electric power computing platform detects that there is a rerun command in the command list, it determines the electric power computing task to be rerun that the rerun command targets, and the rerun time point corresponding to the electric power computing task to be rerun; there is at least one rerun command, and each rerun command corresponds to an electric power computing task to be rerun; then, the task data stream of the electric power computing task to be rerun after the rerun time point is obtained; then, the rerun command and the task data stream are stored in the message queue corresponding to the electric power computing task set to which the electric power computing task to be rerun belongs; the electric power computing task set includes multiple electric power computing tasks with the same task type; finally, the rerun command and the task data stream of the electric power computing task to be rerun are taken out from the message queue, the rerun command is used as the command stream of the electric power computing task to be rerun, and the task data stream is used as the data stream of the electric power computing task to be rerun, and the electric power computing task to be rerun is rerun based on the command stream and the data stream; each node is used to process the command stream corresponding to the command stream when the command stream flows through the node, and each node is used to process the data stream corresponding to the data stream when the data stream flows through the node. In this way, the power computing platform can determine the rerun time point corresponding to the power computing task to be rerun targeted by the rerun command based on the rerun command, thereby obtaining the task data stream of the power computing task to be rerun after the rerun time point, and rerun the power computing task to be rerun based on the task data stream of the power computing task to be rerun after the rerun time point; the power computing task rerun method based on the above process can decouple the data progress of different power computing tasks to be rerun, thereby being able to trace back to a certain moment in the past to rerun the power computing task to be rerun.
[0095] In an exemplary embodiment, the task data stream carries task description information of the power computing task to be re-run.
[0096] like Figure 2 As shown, in the above step S108, re-running the power calculation task to be re-run based on the command stream and the data stream specifically includes the following steps:
[0097] Step S202, based on the rerun command in the command stream, clear the calculation results of the power calculation task to be rerun stored in the database after the rerun time point, and clear the data value of the task data stream corresponding to the power calculation task to be rerun stored in the state memory during the historical execution process.
[0098] Step S204, based on the task description information of the power calculation task to be rerun, calculate the task data flow in the data flow to rerun the power calculation task to be rerun, obtain the rerun calculation result of the power calculation task to be rerun after the rerun time point, and store the rerun calculation result in the database.
[0099] Among them, the database is used to store the calculation results of the power calculation task to be re-run; the state memory is used to store the data values of the task data stream corresponding to the power calculation task to be re-run.
[0100] The task description information is used to describe the calculation rule corresponding to the power calculation task to be re-run, and may be an expression of the calculation rule, such as a calculation rule represented by an execution statement.
[0101] Specifically, after extracting the rerun command and task data stream from the Kafka topic, the power computing platform classifies the data extracted based on the classifier to determine whether it is command data (rerun command) or business data (task data stream), and sends the rerun command belonging to the command data as a command stream into the command pipeline, and sends the task data stream belonging to the business data as a data stream into the data pipeline.
[0102] After receiving the rerun command, the command pipeline responds to the rerun command and clears the calculation results of the power calculation task to be rerun targeted by the rerun command and stored in the database after the corresponding rerun time point.
[0103] After receiving the task data stream, the data pipeline responds to the task data stream and calculates the task data stream based on the task description information carried by the task data stream to rerun the power calculation task to be rerun, obtains the rerun calculation result of the power calculation task to be rerun after the rerun time point, and stores the obtained rerun calculation result in the database.
[0104] In this embodiment, the power computing platform classifies the data retrieved from the Kafka topic through a classifier, can distinguish the re-run command from the task data stream, and clears the data in response to the re-run command through the command pipeline, thereby avoiding the interference of old data on the task re-run. In addition, the data pipeline responds to the calculation of the task data stream, thereby realizing the re-run of the power computing task to be re-run.
[0105] In an exemplary embodiment, each power calculation task to be re-run corresponds to at least one associated measurement point.
[0106] like Figure 3 As shown, the above step S104, obtaining the task data flow of the power calculation task to be re-run after the re-run time point, specifically includes the following steps:
[0107] Step S302, obtaining time series data of each associated measuring point of the power calculation task to be re-run after the re-run time point.
[0108] Step S304: determine the time series data of each associated measuring point after the re-run time point as the task data flow of the power calculation task to be re-run after the re-run time point.
[0109] Specifically, the timing data of each measuring point of the power system is stored in the data storage module; the data pulling module pulls the timing data of each associated measuring point corresponding to each power calculation task to be re-run after the corresponding re-run time point from the data storage module for each power calculation task to be re-run, and uses the timing data corresponding to each associated measuring point as the task data stream to be re-run for the power calculation task to be re-run.
[0110] In an exemplary embodiment, each task data stream also carries a measurement point identifier of the associated measurement point to which it belongs and a task identifier of the power calculation task to be re-run.
[0111] like Figure 4 As shown, in the above step S204, based on the task description information of the power calculation task to be re-run, the task data flow in the data flow is calculated, which specifically includes the following steps:
[0112] Step S402: determining the data identifier of each task data stream according to the measurement point identifier and the task identifier carried by each task data stream.
[0113] Step S404: based on the data identifier of each task data stream, obtain the data value of each task data stream from the state memory.
[0114] Step S406, calculating the data value of each task data stream based on the task description information of the power calculation task to be re-run.
[0115] The data value of each task data stream stored in the state memory is the current data value in each task data stream.
[0116] Specifically, for each power calculation task to be rerun, the Flink computing task first determines the data identifier corresponding to each task data stream in the state memory according to the task identifier and measurement point identifier carried by each task data stream corresponding to the power calculation task to be rerun; then, the Flink computing task obtains the current data value in each task data stream from the state memory according to the data identifier corresponding to each task data stream, and calculates the current data value in each task data stream based on the task description information of the power calculation task to be rerun, so as to rerun the power calculation task to be rerun.
[0117] In practical applications, the task description information of the power calculation task to be re-run is the execution statement of the power calculation task to be re-run. Therefore, according to the task data flow of the power calculation task to be re-run, the process of re-running the power calculation task to be re-run can also be:
[0118] For each power calculation task to be re-run, the execution statement corresponding to the power calculation task to be re-run is executed again; in response to the re-execution of the execution statement, the data identifier of each task data stream is determined according to the task identifier and the measurement point identifier carried by each task data stream corresponding to the power calculation task to be re-run; based on the data identifier of each task data stream, the current data value in each task data stream is obtained from the state memory; according to the calculation logic of the execution statement, the current data value in each task data stream is calculated to re-run the power calculation task to be re-run.
[0119] Taking the power calculation task to be re-run as an example, in which the generator is in the power generation condition and the export switch is in the closed state, the generator condition and the export switch state are two corresponding associated measurement points; assuming that the task identifier corresponding to the power calculation task to be re-run is "r_12", the measurement point identifier of the generator condition is "us_123", and the measurement point identifier of the export switch state is "ss_121", then the Flink calculation task obtains the current data value in the task data stream of the power generation condition and the current data value in the task data stream of the export switch from the state memory according to the data identifiers "r_12.us_123" and "r_12.ss_121".
[0120] In actual applications, the task description information of the power calculation task to be re-run is an Aviator (a scripting language) expression, and the state memory name is "mp_states", the expected data value corresponding to the power generation condition is 5, and the expected data value corresponding to the closing state is 1. Then, the task description information of the above power calculation task to be re-run is "states.getMapState(mp_states, 'r_12.us_123')==5&&states.getMapState(mp_states, 'r_12.ss_121')==1".
[0121] In actual applications, Flink computing tasks rerun various power computing tasks to be rerun through the Map nodes in the Flink architecture.
[0122] In this embodiment, the power computing platform can obtain the current data value in each task data stream participating in the re-run from the status register based on the task identifier and measurement point identifier carried by each task data stream through the Flink computing task, and realize the re-running of the power computing task to be re-run based on the task description information of the power computing task to be re-run and the current data values in each task data stream.
[0123] In an exemplary embodiment, in the above step S108, after taking out the re-run command and task data stream of the power calculation task to be re-run from the message queue, the following contents are specifically included: for each task data stream, determining the current data value in the task data stream; using the task identifier and measurement point identifier carried by the task data stream as the data identifier of the task data stream, storing the current data value in the task data stream in the state memory.
[0124] In practical applications, the state memory is obtained by encapsulating the operators in the Flink architecture.
[0125] In this embodiment, based on the above process, as the time section of the task data stream advances, the state memory always stores the latest data values in the task data stream.
[0126] In an exemplary embodiment, there is at least one rerun command in the command list, each rerun command corresponds to a power calculation task to be rerun, and each rerun command carries a task identifier of the corresponding power calculation task to be rerun.
[0127] like Figure 5 As shown, the above step S108, taking out the re-run command and task data stream of the power calculation task to be re-run from the message queue, taking the re-run command as the command stream of the power calculation task to be re-run, taking the task data stream as the data stream of the power calculation task to be re-run, and re-running the power calculation task to be re-run based on the command stream and the data stream, specifically includes the following steps:
[0128] Step S502, reading each rerun name and each task data stream in the message queue.
[0129] Step S504, obtaining the rerun command and task data stream corresponding to each power calculation task to be rerun according to the task identifier carried by each rerun command and the task identifier carried by each task data stream.
[0130] Step S506, for each power calculation task to be re-run, the re-run command of the power calculation task to be re-run is used as the command stream of the power calculation task to be re-run, and the task data stream of the power calculation task to be re-run is used as the data stream of the power calculation task to be re-run.
[0131] Step S508, executing each power calculation task to be re-run respectively according to the command stream and data stream corresponding to each power calculation task to be re-run.
[0132] Specifically, the Flink computing task reads each rerun command and each task data stream in the message queue, and partitions each rerun command and each task data stream based on the task identifier carried by each rerun command and the task identifier carried by each task data stream, and divides the rerun commands and task data streams carrying the same task identifier into the same partition, thereby obtaining the rerun command and task data stream corresponding to each power computing task to be rerun; then, the Flink computing task uses the rerun command of the power computing task to be rerun as the command stream of the power computing task to be rerun, and the task data stream of the power computing task to be rerun as the data stream of the power computing task to be rerun, for each power computing task to be rerun, and executes each power computing task to be rerun according to the command stream and data stream corresponding to each power computing task to be rerun.
[0133] In actual applications, Flink computing tasks pull data from Kafka topics through the Kafka source node in the Flink architecture.
[0134] In actual applications, the KeyBy node in the Flink architecture is encapsulated as a partitioner to partition each rerun command and each task data stream.
[0135] In actual applications, after reading the rerun command and task data stream from the message queue, they are first partitioned based on the partitioner and then classified based on the classifier.
[0136] In this embodiment, the power computing platform can realize partition processing of rerun commands and task data streams through Flink computing tasks based on the task identifiers carried by the rerun commands and task data streams, thereby realizing parallel execution of each power computing task to be rerun.
[0137] In an exemplary embodiment, in the above step S102, when it is detected that there is a rerun command in the command list, the power calculation task to be rerun targeted by the rerun command and the rerun time point corresponding to the power calculation task to be rerun are determined, and specifically the following contents are also included: receiving the task identifier of the power calculation task to be rerun and the rerun time point corresponding to the power calculation task to be rerun; generating a rerun command for the power calculation task to be rerun based on the task identifier and the rerun time point; and storing the rerun command in the command list.
[0138] Specifically, when the user needs to rerun a power calculation task to be rerun, the user sends the task identifier of the power calculation task to be rerun and the specified rerun time point to the power calculation platform. The power calculation platform generates a rerun command corresponding to the power calculation task to be rerun based on the received task identifier and rerun time point, and stores the rerun command in the command list.
[0139] Before determining the power calculation task to be re-run for which the re-run command is directed and the re-run time point corresponding to the power calculation task to be re-run in the above step S102, the following contents are specifically included: taking out the re-run command from the command list.
[0140] Specifically, the power computing platform accesses the command list at preset time intervals, and when a rerun command appears in the command list, takes out the rerun command, i.e. removes the rerun command from the command list, and then determines the power computing task to be rerun that the rerun command targets and the rerun time point corresponding to the power computing task to be rerun based on the taken out rerun command.
[0141] In this embodiment, the power calculation platform allows the user to initiate a rerun for a power calculation task to be rerun, and decouples the data progress of different power calculation tasks to be rerun based on the rerun time point set by the user, so that the power calculation task to be rerun can be rerun back to a certain moment in the past.
[0142] In order to more clearly illustrate the power calculation task re-running method provided by the embodiment of the present application, the power calculation task re-running method is specifically described below with a specific embodiment, but it should be understood that the embodiment of the present application is not limited thereto. Figure 6 As shown, in one of the exemplary embodiments, the present application also provides a Flink-based power time series data rule calculation rerun method. In this embodiment, one rule corresponds to one power calculation task, which specifically includes the following steps:
[0143] Step S602, receiving the task identifier of the power calculation task to be rerun and the rerun time point corresponding to the power calculation task to be rerun, generating a rerun command for the power calculation task to be rerun based on the task identifier and the rerun time point, and storing the rerun command in a command list.
[0144] Specifically, the user can initiate a rerun for a certain power calculation task to be rerun through the interface of the power calculation platform, and require that the power calculation task to be rerun be rerun from a specified time. The task identifier and rerun time point sent by the user mark the beginning of the entire rerun process; the power calculation platform generates a rerun command based on the task identifier and rerun time point, and stores the rerun command in a command list.
[0145] Step S604, when it is detected that there is a rerun command in the command list, the rerun command is taken out, and based on the rerun command, the power calculation task to be rerun targeted by the rerun command and the rerun time point corresponding to the power calculation task to be rerun are determined.
[0146] Step S606, obtaining the time series data of each associated measuring point of the power calculation task to be re-run after the re-run time point.
[0147] Step S608: determine the time series data of each associated measuring point after the re-run time point as the task data flow of the power calculation task to be re-run after the re-run time point.
[0148] Step S610: store the rerun command and the task data stream in the message queue corresponding to the rerun power computing task set to which the power computing task to be rerun belongs.
[0149] Specifically, after discovering the rerun command, the power computing platform uses the data pulling module to pull the time series data corresponding to the associated measurement points involved in the power computing task to be rerun from the specified rerun time point as the task data stream of the power computing task to be rerun, and sends the rerun command and the task data stream to the Kafka topic.
[0150] Step S612, reading each rerun name and each task data stream in the message queue.
[0151] Step S614, obtaining the rerun command and task data stream corresponding to each power calculation task to be rerun according to the task identifier carried by each rerun command and the task identifier carried by each task data stream.
[0152] Specifically, the Flink computing task pulls data from the Kafka topic. After the partitioner partitions the data by task identifier, the task data stream and rerun command of the same task will be in the same partition. The classifier then classifies the task data stream and rerun command to distinguish the rerun command from the task data stream. The rerun command will enter the command pipeline to execute the command operation; the task data stream will enter the data pipeline for routine processing.
[0153] Step S616, for each power calculation task to be re-run, for the re-run command based on the power calculation task to be re-run, clear the calculation results of the power calculation task to be re-run after the re-run time point stored in the database, and clear the data value of the task data stream corresponding to the power calculation task to be re-run during the historical execution process stored in the state memory.
[0154] Specifically, after the rerun command enters the command pipeline, the command pipeline will execute the command as required, clear all state memory data of the current partition, and execute the SQL (Structured Query Language) instruction to delete the data to delete all calculation results of the power calculation task to be rerun after the rerun time point.
[0155] Step S618, for each power calculation task to be re-run, determine the data identifier of each task data stream according to the measurement point identifier and the task identifier carried by each task data stream of the power calculation task to be re-run.
[0156] Step S620: for each power calculation task to be re-run, based on the data identifier of each task data stream of the power calculation task to be re-run, obtain the current data value in each task data stream from the state memory.
[0157] Step S622, for each power calculation task to be re-run, based on the task description information of the power calculation task to be re-run, calculate the current data value in each task data stream of the power calculation task to be re-run, so as to re-run the power calculation task to be re-run, obtain the re-run calculation result of the power calculation task to be re-run after the re-run time point, and store the re-run calculation result in the database.
[0158] Specifically, after the task data stream enters the data pipeline, the data pipeline will perform regular calculations according to the calculation logic of the power calculation task to be re-run to which the task data stream belongs, and output the calculation results.
[0159] like Figure 7 FIG. 2 is another schematic diagram of this embodiment.
[0160] like Figure 8 The figure shows a schematic diagram of a partitioner, a classifier, a data pipeline, a command pipeline, and a state memory in this embodiment. The partitioner is implemented using the KeyBy operator in the Flink architecture, and the classifier, data pipeline, command pipeline, and state memory are implemented by encapsulating one or more operators in the Flink architecture.
[0161] In this embodiment, firstly, through the encapsulation and connection of Flink operators, an efficient, flexible and accurate power calculation platform is constructed, so that the processing of time series data is more efficient and accurate. When processing time series data, the advantages of Flink's high performance and high throughput can be fully utilized to ensure the real-time and accuracy of data. Secondly, the function of lightweight re-running a single power calculation task is also realized; in a complex power calculation process, when a specific power calculation task needs to be recalculated, the traditional re-running method may need to reprocess the entire data set, which is both time-consuming and resource-consuming. However, this embodiment can accurately locate the power calculation task that needs to be re-run, and only re-run the power calculation task, which greatly reduces the time and resource consumption of re-running. This lightweight re-running method not only improves the efficiency of calculation, but also reduces the cost of calculation. Thirdly, when re-running, this embodiment can clear all state memory data corresponding to the re-run power calculation task, ensure that the new power calculation task is carried out in a clean data environment, and at the same time, can accurately delete all calculation results of the power calculation task after the re-running moment, avoiding the interference of old data on the new calculation results. In summary, this embodiment not only improves the efficiency and accuracy of calculations, but also reduces the cost and resource consumption of calculations by realizing lightweight re-running of a single power calculation task, thereby providing an efficient and flexible solution for the field of data processing.
[0162] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0163] Based on the same inventive concept, the embodiment of the present application also provides a power calculation task rerunning device for implementing the power calculation task rerunning method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more power calculation task rerunning device embodiments provided below can refer to the limitations of the power calculation task rerunning method above, and will not be repeated here.
[0164] In an exemplary embodiment, Fig. 9As shown, a power computing task re-running device is provided, on which the power computing platform is mounted, and the device includes: an information determination module 902, a data acquisition module 904, an information storage module 906 and a task re-running module 908, wherein:
[0165] The information determination module 902 is used to determine the power calculation task to be rerun targeted by the rerun command and the rerun time point corresponding to the power calculation task to be rerun when a rerun command is detected in the command list; there is at least one rerun command, and each rerun command corresponds to a power calculation task to be rerun.
[0166] The data acquisition module 904 is used to acquire the task data stream of the power calculation task to be re-run after the re-run time point.
[0167] The information storage module 906 is used to store the re-run command and task data stream in the message queue corresponding to the power computing task set to which the power computing task to be re-run belongs; the power computing task set includes multiple power computing tasks with the same task type.
[0168] The task rerun module 908 is used to take out the rerun command and task data stream of the power computing task to be rerun from the message queue, use the rerun command as the command stream of the power computing task to be rerun, use the task data stream as the data stream of the power computing task to be rerun, and rerun the power computing task to be rerun based on the command stream and the data stream; each node is used to process the command stream corresponding to the command stream when the command stream flows through the node, and each node is used to process the data stream corresponding to the data stream when the data stream flows through the node.
[0169] In an exemplary embodiment, the task data stream carries task description information of the power computing task to be re-run.
[0170] The task rerun module 908 is also used to clear the calculation results of the power calculation task to be rerun stored in the database after the rerun time point based on the rerun command in the command stream, and to clear the data value of the task data stream corresponding to the power calculation task to be rerun stored in the state memory during the historical execution process; based on the task description information of the power calculation task to be rerun, calculate the task data stream in the data stream to rerun the power calculation task to be rerun, obtain the rerun calculation result of the power calculation task to be rerun after the rerun time point, and store the rerun calculation result in the database.
[0171] In an exemplary embodiment, the power calculation task to be re-run corresponds to at least one associated measurement point.
[0172] The data acquisition module 904 is used to obtain the time series data of each associated measurement point of the power calculation task to be rerun after the rerun time point; the time series data of each associated measurement point after the rerun time point is determined as the task data flow of the power calculation task to be rerun after the rerun time point.
[0173] In an exemplary embodiment, each task data stream also carries a measurement point identifier of the associated measurement point to which it belongs and a task identifier of the power calculation task to which it belongs.
[0174] The task rerun module 908 is used to determine the data identifier of each task data stream according to the measurement point identifier and task identifier carried by each task data stream; based on the data identifier of each task data stream, obtain the data value of each task data stream from the state memory; the data value of each task data stream stored in the state memory is the current data value in each task data stream; based on the task description information of the power calculation task to be rerun, the data value of each task data stream is calculated.
[0175] In an exemplary embodiment, each rerun command carries a task identifier of a corresponding power computing task.
[0176] The task rerun module 908 is also used to read each rerun name and each task data stream in the message queue; according to the task identifier carried by each rerun command and the task identifier carried by each task data stream, the rerun command and task data stream corresponding to each power calculation task to be rerun are obtained; for each power calculation task to be rerun, the rerun command of the power calculation task to be rerun is used as the command stream of the power calculation task to be rerun, and the task data stream of the power calculation task to be rerun is used as the data stream of the power calculation task to be rerun; according to the command stream and data stream corresponding to each power calculation task to be rerun, each power calculation task to be rerun is executed respectively.
[0177] In an exemplary embodiment, the power calculation task rerunning device also includes a command generation module, which is used to receive the task identifier of the power calculation task to be rerun and the rerun time point corresponding to the power calculation task to be rerun; based on the task identifier and the rerun time point, generate a rerun command for the power calculation task to be rerun; and store the rerun command in a command list.
[0178] The information determination module 902 is further used to retrieve a re-run command from the command list.
[0179] Each module in the above-mentioned power calculation task re-running device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0180] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.10 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the time series data of each measuring point of the power system and the calculation results corresponding to each power calculation task. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for rerunning a power calculation task is implemented.
[0181] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0182] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0183] In an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0184] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0185] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0186] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0187] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for re-running a power computing task, characterized in that: Applied to a power computing platform, the power computing platform includes a plurality of nodes, each node is used to perform corresponding processing during the execution of a power computing task, the method includes: In the case where a rerun command is detected in the command list, determining the power calculation task to be rerun for the rerun command and the rerun time point corresponding to the power calculation task to be rerun; the rerun command is at least one, and each rerun command corresponds to a power calculation task to be rerun; Obtaining the task data stream of the power calculation task to be re-run after the re-run time point; The re-run command and the task data stream are stored in a message queue corresponding to a power computing task set to which the power computing task to be re-run belongs; the power computing task set includes a plurality of power computing tasks with the same task type; The rerun command and the task data stream of the power computing task to be rerun are taken out from the message queue, the rerun command is used as the command stream of the power computing task to be rerun, and the task data stream is used as the data stream of the power computing task to be rerun, and the power computing task to be rerun is rerun based on the command stream and the data stream; each node is used to perform processing corresponding to the command stream on the command stream when the command stream flows through the node, and each node is used to perform processing corresponding to the data stream on the data stream when the data stream flows through the node.
2. The method according to claim 1, characterized in that The task data stream carries the task description information of the power calculation task to be re-run; The re-running the power computing task to be re-run based on the command stream and the data stream comprises: Based on the rerun command in the command stream, clear the calculation results of the power calculation task to be rerun after the rerun time point stored in the database, and clear the data value of the task data stream corresponding to the power calculation task to be rerun during the historical execution process stored in the state memory; Based on the task description information of the power calculation task to be re-run, the task data flow in the data stream is calculated to re-run the power calculation task to be re-run, and the re-run calculation result of the power calculation task to be re-run after the re-run time point is obtained, and the re-run calculation result is stored in the database.
3. The method according to claim 2, characterized in that The power calculation task to be re-run corresponds to at least one associated measuring point; The step of obtaining the task data flow of the power calculation task to be re-run after the re-run time point includes: Acquire the time series data of each associated measuring point of the power calculation task to be re-run after the re-run time point; The time series data of each associated measuring point after the re-run time point are determined as the task data flow of the power calculation task to be re-run after the re-run time point.
4. The method according to claim 3, characterized in that Each task data stream also carries the measurement point identifier of the associated measurement point and the task identifier of the power calculation task to be re-run; The calculating the task data flow in the data flow based on the task description information of the power calculation task to be re-run includes: Determine the data identifier of each task data stream according to the measurement point identifier and the task identifier carried by each task data stream; Based on the data identifier of each task data stream, the data value of each task data stream is acquired from the state memory; the data value of each task data stream stored in the state memory is the current data value in each task data stream; Based on the task description information of the power calculation task to be re-run, the data value of each task data stream is calculated.
5. The method according to claim 4, characterized in that Each re-run command carries the task identifier of the corresponding power calculation task to be re-run; The method of taking out the rerun command and the task data stream of the power calculation task to be rerun from the message queue, using the rerun command as the command stream of the power calculation task to be rerun, using the task data stream as the data stream of the power calculation task to be rerun, and rerunning the power calculation task to be rerun based on the command stream and the data stream comprises: Read each rerun name and each task data stream in the message queue; According to the task identifier carried by each re-run command and the task identifier carried by each task data stream, the re-run command and the task data stream corresponding to each power calculation task to be re-run are obtained; For each power calculation task to be re-run, the re-run command of the power calculation task to be re-run is used as the command stream of the power calculation task to be re-run, and the task data stream of the power calculation task to be re-run is used as the data stream of the power calculation task to be re-run; According to the command stream and the data stream corresponding to each power calculation task to be re-run, each power calculation task to be re-run is executed respectively.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Receive a task identifier of the power calculation task to be re-run and a re-run time point corresponding to the power calculation task to be re-run; Based on the task identifier and the re-run time point, generating a re-run command for the power calculation task to be re-run; Storing the rerun command in the command list; Before determining the power calculation task to be re-run for the re-run command and the re-run time point corresponding to the power calculation task to be re-run, the method further includes: The rerun command is taken from the command list.
7. A device for re-running power computing tasks, characterized in that: The device is equipped with a power calculation platform, which includes a plurality of nodes, each of which is used to perform corresponding processing during the execution of the power calculation task. The device includes: An information determination module is used to determine, when a rerun command is detected in a command list, the power calculation task to be rerun that the rerun command targets and the rerun time point corresponding to the power calculation task to be rerun; the rerun command is at least one, and each rerun command corresponds to a power calculation task to be rerun; A data acquisition module, used for acquiring the task data stream of the power calculation task to be re-run after the re-run time point; An information storage module, used for storing the re-run command and the task data stream in a message queue corresponding to a power computing task set to which the power computing task to be re-run belongs; the power computing task set includes a plurality of power computing tasks with the same task type; A task rerun module is used to take out the rerun command and the task data stream of the power computing task to be rerun from the message queue, use the rerun command as the command stream of the power computing task to be rerun, use the task data stream as the data stream of the power computing task to be rerun, and rerun the power computing task to be rerun based on the command stream and the data stream; each node is used to perform processing corresponding to the command stream on the command stream when the command stream flows through the node, and each node is used to perform processing corresponding to the data stream when the data stream flows through the node.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method and device for processing mysql data rewriting task
CN115576672A
Task re-running processing method and device, equipment and storage medium
CN116149824A