Data processing methods, devices, equipment, media and products
By generating a directed graph of target tasks in the business system of the Actor model, displaying task identification, information, results and duration, the problem of low efficiency in complex task log analysis is solved, and the effect of quickly positioning problems and improving user experience is achieved.
Patent Information
- Application Number
- CN202411710033.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-04-01
AI Technical Summary
In the business system of the Actor model, when handling complex tasks, due to the large and confusing log content, it is inefficient to determine the location of the problem through manual analysis of the task log, which affects the user experience.
By obtaining the processing status of each subtask in the target task, obtaining the task identification, task information, processing results and processing duration, and generating a directed graph of the target task through the processing order of the subtasks, writing this information into the directed graph, making the processing process of each subtask clearer and the task-related information more comprehensive.
Improve the user experience, and users can quickly locate the problems in the task processing process, improving efficiency.
Smart Images

Figure CN119739600A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and in particular, relates to a data processing method, device, equipment, medium and product. Background Art
[0002] Actor is a concurrency primitive. Simply put, an Actor can handle tasks just like a process (or thread). An Actor communicates with the outside world through message passing, which is asynchronous. Each Actor has a mailbox that receives and caches messages sent by other Actors. An Actor can only synchronously process a subtask corresponding to a message at a time. During the processing, an Actor cannot perform any other operations except receiving messages.
[0003] Based on the advantages of actors, actors are often used for task processing in business systems, and there may be thousands of actor instances in business systems to process target tasks. They communicate with each other through messages. Each actor can send messages to other actors and receive messages from other actors, and the whole process is asynchronous. Although the response efficiency is high, if there is a problem in the middle, the location of the problem can only be determined by manually analyzing the task log. When the number of actors involved is large, that is, when the processing process of the target task is complex, the log content of the target task is also large and chaotic. Manually analyzing the log content to determine the location of the problem affects the user experience and is also inefficient. Summary of the invention
[0004] The embodiments of the present application provide a data processing method, apparatus, device, medium and product, which obtains the task identifier of the subtask, as well as the task information, processing result and processing duration through the processing status of each subtask in the target task, and generates a directed graph corresponding to the target task through the processing sequence of the subtasks, and then writes the obtained task identifier, task information, processing result and processing duration into the directed graph, so that the processing process of each subtask is clearer and the task-related information is more comprehensive, thereby improving the user experience. Once a problem occurs in the task processing process, the user can quickly locate the problem through the target directed graph, thereby improving efficiency.
[0005] In a first aspect, an embodiment of the present application provides a data processing method, including:
[0006] In the case of processing a target task, obtaining a task identifier of a target subtask in the target task whose processing state is a target state, where the target state includes a first state and a second state;
[0007] Obtain task information, processing results, and processing duration of the target subtask whose processing status is the first status in the target task;
[0008] Record the processing order of each target subtask;
[0009] Create a node corresponding to each target subtask, and draw a directed graph corresponding to the node in the processing order, where the node includes the task identifier of the corresponding target subtask;
[0010] In the directed graph, for a target node whose processing state is the first state, task information, processing result and processing duration of a target subtask corresponding to the target node are written to obtain a target directed graph.
[0011] In a possible implementation, in the directed graph, for a target node whose processing state is the first state, the task information, processing result and processing duration of the target subtask corresponding to the target node are written, and after the target directed graph is obtained, the method further includes:
[0012] Display the target directed graph.
[0013] In a possible implementation, when processing a target task, obtaining a task identifier of a target subtask in the target task whose processing status is a target status includes:
[0014] In the case of processing the target task, detecting the processing status of each subtask in the target task;
[0015] Gets the task ID of the target subtask whose processing status is the target status.
[0016] In one possible implementation, the node also includes a processing status of the corresponding target subtask.
[0017] In a possible implementation, after obtaining task information, processing results, and processing duration of a target subtask whose processing status is the first status in the target task, the method further includes:
[0018] The memory module stores the task identification and processing status of each target subtask, as well as the task information, processing results and processing duration of the target subtask whose processing status is the first status in the target task;
[0019] Create a node corresponding to each target subtask and draw a directed graph corresponding to the node in the processing order, including:
[0020] Obtaining from the memory module the task identifier and processing status of each target subtask, as well as the task information, processing result, and processing duration of the target subtask whose processing status is the first status in the target task;
[0021] Create a node corresponding to each target subtask and draw a directed graph corresponding to the node in the processing order.
[0022] In a possible implementation, when processing a target task, before obtaining a task identifier of a target subtask in the target task whose processing status is a target status, the method further includes:
[0023] Receive input of task information for each subtask in the target task.
[0024] In a second aspect, an embodiment of the present application provides a data processing device, including:
[0025] An acquisition module is used to acquire, when processing a target task, a task identifier of a target subtask whose processing status is a target status in the target task, where the target status includes a first status and a second status;
[0026] The acquisition module is further used to acquire task information, processing results and processing duration of the target subtask whose processing status is the first status in the target task;
[0027] The recording module is used to record the processing order of each target subtask;
[0028] A creation module, used to create a node corresponding to each target subtask, and draw a directed graph corresponding to the node in a processing order, wherein the node includes a task identifier of the corresponding target subtask;
[0029] The writing module is used to write the task information, processing result and processing time of the target subtask corresponding to the target node in the directed graph for the target node whose processing state is the first state, so as to obtain the target directed graph.
[0030] In a third aspect, an embodiment of the present application provides an electronic device, the device comprising:
[0031] a processor and a memory storing computer program instructions;
[0032] The processor implements any of the above data processing methods when executing computer program instructions.
[0033] In a fourth aspect, an embodiment of the present application provides a computer storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, any of the above-mentioned data processing methods is implemented.
[0034] In a fifth aspect, an embodiment of the present application provides a computer program product, characterized in that when the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute any of the above-mentioned data processing methods.
[0035] The data processing method, device, equipment, medium and product of the embodiments of the present application include: when processing a target task, obtaining the task identifier of a target subtask in the target task whose processing status is the target status, wherein the target status includes a first status and a second status; obtaining the task information, processing result and processing duration of the target subtask in the target task whose processing status is the first status; recording the processing order of each target subtask; creating a node corresponding to each target subtask, and drawing a directed graph corresponding to the node in accordance with the processing order, wherein the node includes the task identifier of the corresponding target subtask; in the directed graph, for the target node whose processing status is the first status, writing the task information, processing result and processing duration of the target subtask corresponding to the target node to obtain the target directed graph.
[0036] In this way, the task identifier, task information, processing results and processing time of the subtask are obtained through the processing status of each subtask in the target task, and the directed graph corresponding to the target task is generated through the processing order of the subtasks. Then, the obtained task identifier, task information, processing results and processing time are written into the directed graph to make the processing process of each subtask clearer and the task information more comprehensive, thereby improving the user experience. Once a problem occurs in the task processing process, the user can quickly locate the problem through the target directed graph, thereby improving efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0038] Figure 1 It is a schematic diagram of an Actor receiving and storing messages provided by an embodiment of the present application;
[0039] Figure 2 is a flowchart of a data processing method provided by another embodiment of the present application;
[0040] Figure 3 is a target directed graph provided by yet another embodiment of the present application;
[0041] Figure 4 is a flowchart of a data processing method provided in yet another embodiment of the present application;
[0042] Figure 5 is a flowchart of a data processing method provided in yet another embodiment of the present application;
[0043] Figure 6 is a structural schematic diagram of a data processing device provided in yet another embodiment of the present application;
[0044] Figure 7 It is a structural diagram of an electronic device provided in yet another embodiment of the present application. DETAILED DESCRIPTION
[0045] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0046] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0047] It should be noted that the acquisition, storage, use and processing of data in the embodiments of the present application are in compliance with the relevant provisions of national laws and regulations.
[0048] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0049] Actor is a concurrency primitive. Simply put, an Actor can handle tasks just like a process (or thread). An Actor communicates with the outside world through message passing, which is asynchronous. Each Actor has a mailbox that receives and caches messages sent by other Actors. An Actor can only synchronously process a subtask corresponding to a message at a time. During the processing, an Actor cannot perform any other operations except receiving messages.
[0050] Based on the advantages of actors, actors are often used for task processing in business systems, and there may be thousands of actor instances in business systems to process target tasks. They communicate with each other through messages. Each actor can send messages to other actors and receive messages from other actors, and the whole process is asynchronous. Although the response efficiency is high, if there is a problem in the middle, the location of the problem can only be determined by manually analyzing the task log. When the number of actors involved is large, that is, when the processing process of the target task is complex, the log content of the target task is also large and chaotic. Manually analyzing the log content to determine the location of the problem affects the user experience and is also inefficient.
[0051] It should be noted that Actor is a general concurrent programming model, not a language or framework. It can be used in almost any programming language. For example, Erlang supports the Actor model at the language level, Akka is the implementation of the Java version, and Spark's underlying communication model is the Actor model implemented using Akka. The basis of the Actor model is message passing. An Actor can be considered as a basic computing unit. It can receive messages and perform operations based on messages to process target tasks. It can also send messages to other Actors. Each Actor is isolated from each other and does not share memory. The Actor itself encapsulates state and behavior. When performing concurrent programming, the Actor only needs to focus on the received messages and itself. Since the message is an immutable object, the Actor does not need to pay attention to a series of common multi-threading issues such as locks and memory atomicity. The Actor consists of three parts: state, behavior, and mailbox (MailBox, which can be considered a message queue), as follows:
[0052] 1. Status
[0053] The state in the Actor model refers to the variable information of the Actor, which is the attribute information of the Actor itself. The state is managed by the Actor model itself and cannot be shared or operated by other Actors. This avoids problems such as locks and memory atomicity in concurrent environments.
[0054] 2. Behavior
[0055] The processing logic in the Actor model, the Actor model changes its state through the received messages, that is, the task processing process.
[0056] 3. Email
[0057] like Figure 1As shown in the figure, the mailbox is the communication bridge between actors. The mailbox stores the messages of the sender actor through the FIFO (first in first out) message queue. The receiver actor then gets the message from the mailbox queue. The message includes the parameters required for the task processing process. The actor model is divided into sender and receiver. An actor model can be both a sender and a receiver. In addition, the actor model processes messages serially, and the messages in the actor are immutable.
[0058] In other words, we can think of it as an object instance in an object-oriented programming language. In object-oriented programming (OOP), an object can access or modify the properties of another object, or directly call the methods of another object. However, the properties in the object can be modified. When there are multiple threads, it is easy to be tampered with and cause data inconsistency. However, the state of the Actor cannot be directly read or modified, and the methods of the Actor cannot be directly called. The Actor can only communicate with the outside world through message passing. Each object has a this pointer, which represents the address of the object, and methods can be called or states can be accessed through this address. Similarly, the Actor also has an address representing itself, but messages can only be sent to this address. Another advantage of the Actor is that it can eliminate shared states, because it can only process tasks corresponding to one message at a time, so the state can be safely changed within the Actor without considering the lock mechanism. In other words, if it is an ordinary object, it is asynchronous inside, and the properties obtained may have been modified, so the thread is not safe. However, in the Akka model, the properties and status of each Actor cannot be modified directly. It can only receive messages. There is a mailbox specifically for storing and receiving messages. Messages can be received asynchronously and stored, but these messages can only be processed one by one, which is safer.
[0059] Therefore, for services with an Actor model architecture, a clear auxiliary system is needed to accurately locate the message transmission path and the task processing process corresponding to the message. The underlying principle is to dynamically parse the Actor's task log. Through the log, the transmission relationship between Actors is graphically displayed, similar to a directed Figure 1 Including some metadata of the Actor, the task-related information in the Actor can be visualized. In this way, it will be clear and convenient for users to use the Actor model.
[0060] Currently, to extract data from actors, it is necessary to place data points at each location that needs to be counted, collect the data from these data points, and then analyze the required information. However, when there is a lot of information, it is still very confusing.
[0061] In order to solve the problems of the prior art, the embodiments of the present application provide a data processing method, device, equipment, medium and product. The data processing method provided in the embodiments of the present application obtains the task identification of the subtask, as well as the task information, processing result and processing time through the processing status of each subtask in the target task, and generates a directed graph corresponding to the target task through the processing order of the subtask, and then writes the obtained task identification, task information, processing result and processing time into the directed graph, so that the processing process of each subtask is clearer and the task-related information is more comprehensive, thereby improving the user experience. Once a problem occurs in the task processing process, the user can quickly locate the problem through the target directed graph, thereby improving efficiency.
[0062] The following first introduces the data processing method provided in the embodiment of the present application. Figure 2 As shown, the data processing method provided in the embodiment of the present application includes the following steps.
[0063] S110 . In the case of processing a target task, obtaining a task identifier of a target subtask in the target task whose processing status is a target status. The target status includes a first status and a second status.
[0064] Here, the target task is implemented by the Actor model. In fact, the embodiment of the Actor model in the program is a piece of code. The target task includes at least one subtask, and the at least one subtask includes the target subtask. The first state indicates that the processing has been completed, and the second state indicates that it is being processed.
[0065] In some embodiments, during the process of processing the target task, the task identifier of the target subtask whose processing status of each subtask is the target status is obtained in real time, and there is at least one target subtask. Here, the task identifier is set in advance and is used to uniquely identify the subtask.
[0066] It should be noted that the task ID is also the ID of the Actor.
[0067] As an example, the task identifier includes a task name and an address of an Actor, and the task name may be represented by a business name.
[0068] It is understandable that when an Actor is created, it will inherit the subclass of Actor, such as AbstractActor, which provides some common functions of Actor, such as lifecycle management, message processing, etc. The Actor method contains some information and logic processing methods, such as parameters, parameter types, processing logic code, the processing status of the current Actor, and the identification of the next Actor, the time when this Actor sends the message, and the time when the next Actor receives the message. Therefore, when locating an Actor, the relevant status data and behavior data can be obtained. In addition, each Actor has a unique name and network address so that other Actors can find it, and also has parameters and return values, which facilitates data transmission and logic processing.
[0069] S120: Obtain task information, processing results, and processing duration of a target subtask whose processing status is the first status in the target task.
[0070] Specifically, all Actors are monitored, and when the processing state of the subtask corresponding to the Actor is the first state, a series of attributes and data of the Actor are obtained, including task information, processing results, and processing time.
[0071] In some embodiments, for the target subtask that has been processed, task information, processing results and processing time are obtained. Task information includes parameters of the Actor model, parameter types, processing logic code, etc. The processing result includes the return success / failure status of the current Actor, the identifier of the next Actor, etc. The processing time includes the time when the current Actor sends a message and the time when the next Actor receives the message.
[0072] In some embodiments, the task identifier of the target subtask is used as the key, and the task information, processing result and processing duration of the target subtask are assembled into JSON format as the value. The entire Actor is assembled into a key-value format.
[0073] S130: Record the processing order of each target subtask.
[0074] In some embodiments, the function of each actor is to process data. After an actor processes the data, the processing state of the actor will become the first state. Then, the current actor finds the target actor to be transmitted according to the unique task name and address of the next actor, and transmits the required parameters to the target actor. The target actor then processes the data and executes the next subtask. At this time, the processing order of each target subtask is recorded.
[0075] It should be noted that the processing status of an Actor is the processing status of the subtask corresponding to the Actor.
[0076] S140: Create a node corresponding to each target subtask, and draw a directed graph corresponding to the node in a processing order, where the node includes a task identifier of the corresponding target subtask.
[0077] Here, a node represents a target subtask.
[0078] In some embodiments, corresponding nodes are created according to the processing order of the target subtasks, and the nodes are connected according to the processing order of the target subtasks to obtain a directed graph. In the directed graph, for the connection between the node corresponding to the target subtask processed previously and the node corresponding to the target subtask processed later, the direction of the connection is to point to the node corresponding to the target subtask processed later, that is, from the node corresponding to the target subtask processed previously to the node corresponding to the target subtask processed later.
[0079] In some embodiments, the node is marked with a task identifier of the corresponding target subtask.
[0080] S150. In the directed graph, for a target node whose processing state is the first state, write the task information, processing result and processing duration of the target subtask corresponding to the target node to obtain a target directed graph.
[0081] Specifically, for a target node whose processing state of a target subtask is the first state, task information, processing result, and processing duration of the corresponding target subtask are marked on the target node to obtain a target directed graph.
[0082] In this way, the task identifier, task information, processing results and processing time of the subtask are obtained through the processing status of each subtask in the target task, and the directed graph corresponding to the target task is generated through the processing order of the subtasks. Then the obtained task identifier, task information, processing results and processing time are written into the directed graph to make the processing process of each subtask clearer and the task-related information more comprehensive, thereby improving the user experience. Once a problem occurs in the task processing process, the user can quickly locate the problem through the target directed graph, thereby improving efficiency.
[0083] Based on this, in some embodiments, after the above S150, the method may further include:
[0084] Display the target directed graph.
[0085] Here, the target directed graph includes the task identifier of each target subtask, as well as the task information, processing results, and processing duration of the target subtask whose processing status is the first state in the target task. In the target directed graph, one node corresponds to one target subtask, in other words, one node corresponds to one Actor model.
[0086] In some embodiments, the target directed graph is provided to the front-end page through an interface, and the information of all Actors can be displayed through the language of the front-end framework, including the task identifier of each target subtask, and the task information, processing results and processing time of the target subtask with the first processing status in the target task.
[0087] In some embodiments, the target directed graph will only display the task identifier in its initial state. When a click input on the task identifier is received, the task information, processing results and processing time of the target subtask in the target task whose processing state is the first state are displayed.
[0088] In some embodiments, the target directed graph will initially display the task identifier of each target subtask, as well as the task information, processing results, and processing duration of the target subtasks whose processing status is the first status in the target task.
[0089] As an example, Figure 3 As shown, only task identifiers are displayed in the target directed graph, including task identifier 1 (corresponding to the identifier of Actor 1), task identifier 2 (corresponding to the identifier of Actor 2), and task identifier 3 (corresponding to the identifier of Actor 3).
[0090] It can be understood that the target directed graph shows the processing order of the target subtasks.
[0091] In this way, based on the target directed graph, according to the number of lines on each Actor, you can know how many messages the Actor has received and how many messages it has sent and transmitted. You can also know the average processing time of each Actor, the success / failure status, the order of message reception and sending, etc., which improves the user experience.
[0092] Based on this, in some embodiments, such as Figure 4 As shown, the above S110 may specifically include:
[0093] S111. When processing a target task, detecting a processing status of each subtask in the target task;
[0094] S112: Obtain a task identifier of a target subtask whose processing status is a target status.
[0095] Here, the processing state may include, but is not limited to, a first state, a second state, and a third state. The first state indicates that the processing has been completed, the second state indicates that the processing is in progress, and the third state indicates that the processing has not been completed.
[0096] In some embodiments, during the processing of the target task, the processing status of each subtask in the target task is detected in real time, and if the processing status of the target subtask is the target status, its task identifier is obtained.
[0097] In some embodiments, when the Actor corresponding to the target subtask receives the message, the processing state of the target subtask changes and is updated to the second state. When the processing result is obtained, the processing state of the target subtask changes and is updated to the first state.
[0098] In this way, by detecting the processing status of each subtask in the target task in real time, the task identifier of the target subtask in the target state can be obtained in time, and the target directed graph can be updated in real time, so that the user can determine the problem in time.
[0099] Based on this, in some embodiments, the node also includes the processing status of the corresponding target subtask.
[0100] Here, the processing state of the target subtask includes a first state and a second state.
[0101] In this way, through the marking of the processing status, the user can more clearly understand the processing status of each subtask, and can more accurately locate the subtask in the second state, so as to understand the task progress, thereby improving the user experience.
[0102] Based on this, in some embodiments, such as Figure 5 As shown, after the above S120, the method may further include:
[0103] S121, saving the task identification and processing status of each target subtask, as well as the task information, processing result and processing duration of the target subtask whose processing status is the first status in the target task, in the memory module;
[0104] The above S140 may specifically include:
[0105] S141, acquiring from the memory module the task identifier and processing status of each target subtask, as well as the task information, processing result, and processing duration of the target subtask whose processing status is the first status in the target task;
[0106] S142: Create a node corresponding to each target subtask, and draw a directed graph corresponding to the node in a processing order.
[0107] Here, the memory module may include but is not limited to database, memory and local files.
[0108] In some embodiments, for each target subtask, the task identification and processing status, as well as the task information, processing results, and processing duration of the target subtask whose processing status is the first state in the target task are first saved to the memory module, and then the task identification and processing status, as well as the task information, processing results, and processing duration of the target subtask whose processing status is the first state in the target task are pulled from the memory module to create a node corresponding to each target subtask, and a directed graph corresponding to the node is drawn in the processing order.
[0109] In this way, by reading the task identification and processing status of each target subtask, as well as the task information, processing results and processing duration of the target subtask whose processing status is the first state in the target task from the memory module, the target directed graph is created, thereby improving the stability of the target directed graph. Moreover, the task identification and processing status of each target subtask, as well as the task information, processing results and processing duration of the target subtask whose processing status is the first state in the target task are written into the memory module, so that once a problem occurs, the data on the target directed graph can be relied upon.
[0110] Based on this, in some embodiments, before the above S110, the method may further include:
[0111] Receive input of task information for each subtask in the target task.
[0112] In some embodiments, after receiving the input of task information of each subtask in the target task, annotate each subtask. When the processing state of the subtask is the first state, locate the subtask, scan the task information annotated by the subtask, obtain the processing result and processing time, and generate the target directed graph.
[0113] In this way, based on the task information of each subtask, the user can understand the task processing process more clearly, thereby improving the user experience.
[0114] In the embodiment provided by the present application, the task logs corresponding to the Actor are dynamically collected to monitor the Actor and collect data, that is, the task information is recorded in each Actor by annotation, and a directed cyclic graph transmitted by the Actor is drawn and displayed to the user. Since the Actor has a unique distinguishing path, the process of the Actor sending and receiving messages can be obtained, which reduces the development cost.
[0115] Based on the characteristics of actors, a target directed graph is drawn and a visual interface is created for easy and intuitive viewing. This allows users to understand how many messages an actor has received, how many messages it has sent, the average processing time, processing status, processing order, message content, whether there is room for optimization, etc. This reduces the cost required for users to monitor the execution process of tasks corresponding to actors, accurately counts the message transmission paths of actors, and monitors actor data.
[0116] In the embodiment provided by the present application, after obtaining the task identification and processing status of the target subtask, as well as the task information, processing results and processing duration of the target subtask whose processing status is the first state in the target task, they are displayed according to the needs, including the calling sequence of each actor, for example, actor A calls actor B, actor B calls actor C and actor D, and the processing status of each actor. In this way, the order of the actor program running and the processing status can be clearly seen through the directed vector diagram, which is convenient for analyzing and locating problems.
[0117] Based on the data processing method provided in the above embodiment, the present application also provides a specific implementation of a data processing device. Please refer to the following embodiment.
[0118] See also Figure 6 , the data processing device 300 provided in the embodiment of the present application includes:
[0119] An acquisition module 310 is used to acquire, when processing a target task, a task identifier of a target subtask in the target task whose processing state is a target state, where the target state includes a first state and a second state;
[0120] The acquisition module 310 is further used to acquire task information, processing results and processing duration of a target subtask whose processing status is the first status in the target task;
[0121] A recording module 320, used to record the processing order of each target subtask;
[0122] A creation module 330 is used to create a node corresponding to each target subtask and draw a directed graph corresponding to the node in a processing order, wherein the node includes a task identifier of the corresponding target subtask;
[0123] The writing module 340 is used to write the task information, processing result and processing duration of the target subtask corresponding to the target node in the directed graph, for the target node whose processing state is the first state, to obtain the target directed graph.
[0124] Based on this, in some embodiments, the apparatus 300 may further include:
[0125] The display module is used to write the task information, processing result and processing time of the target subtask corresponding to the target node in the directed graph for the target node whose processing state is the first state, and display the target directed graph after obtaining the target directed graph.
[0126] Based on this, in some embodiments, the acquisition module 310 may be specifically used for:
[0127] In the case of processing the target task, detecting the processing status of each subtask in the target task;
[0128] Gets the task ID of the target subtask whose processing status is the target status.
[0129] Based on this, in some embodiments, the node also includes the processing status of the corresponding target subtask.
[0130] Based on this, in some embodiments, the apparatus 300 may further include:
[0131] A saving module, configured to save, in a memory module, the task identifier and processing status of each target subtask, and the task information, processing result, and processing duration of the target subtask whose processing status is the first state in the target task, after acquiring the task information, processing result, and processing duration of the target subtask whose processing status is the first state in the target task;
[0132] The creation module 330 can be specifically used for:
[0133] Obtaining from the memory module the task identifier and processing status of each target subtask, as well as the task information, processing result, and processing duration of the target subtask whose processing status is the first status in the target task;
[0134] Create a node corresponding to each target subtask and draw a directed graph corresponding to the node in the processing order.
[0135] Based on this, in some embodiments, the apparatus 300 may further include:
[0136] The receiving module is used to receive input of task information of each subtask in the target task before obtaining the task identifier of the target subtask whose processing status is the target status in the target task when processing the target task.
[0137] The various modules of the data processing device provided in the embodiment of the present application can realize the functions of the various steps of the data processing method provided above and achieve the corresponding technical effects, which will not be described in detail here for the sake of brevity.
[0138] Based on the same inventive concept, an embodiment of the present application also provides an electronic device.
[0139] Figure 7A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0140] The electronic device may include a processor 401 and a memory 402 storing computer program instructions.
[0141] Specifically, the processor 401 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0142] Memory 402 may include a large capacity memory for data or instructions. By way of example and not limitation, memory 402 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, memory 402 may include a removable or non-removable (or fixed) medium. In appropriate cases, memory 402 may be inside or outside of an integrated gateway disaster recovery device. In a specific embodiment, memory 402 is a non-volatile solid-state memory.
[0143] The memory may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of the present disclosure.
[0144] The processor 401 implements any one of the data processing methods in the above embodiments by reading and executing computer program instructions stored in the memory 402 .
[0145] In one example, the electronic device may further include a communication interface 403 and a bus 410. Figure 7 As shown, the processor 401, the memory 402, and the communication interface 403 are connected via a bus 410 and communicate with each other.
[0146] The communication interface 403 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0147] The bus 410 includes hardware, software or both, coupling the components of the electronic device to each other. For example, but not limitation, the bus may include an accelerated graphics port (Accelerated Graphics Port, AGP) or other graphics bus, an enhanced industry standard architecture (Extended Industry Standard Architecture, EISA) bus, a front side bus (Front Side Bus, FSB), a hypertransport (Hyper Transport, HT) interconnection, an industry standard architecture (Industry Standard Architecture, ISA) bus, an infinite bandwidth interconnection, a low pin count (Linear Predictive Coding, LPC) bus, a memory bus, a micro channel architecture (MicroChannel Architecture, MCA) bus, a peripheral component interconnect (Peripheral Component Interconnect, PCI) bus, a PCI-Express (Peripheral Component Interconnect-X, PCI-X) bus, a serial advanced technology attachment (Serial Advanced Technology Attachment, SATA) bus, a video electronics standard association local (VESA Local Bus, VLB) bus or other suitable buses or a combination of two or more of these. Where appropriate, the bus 410 may include one or more buses. Although the embodiments of the present application describe and illustrate a specific bus, the present application considers any suitable bus or interconnection. The electronic device can execute the data processing method in the embodiments of the present invention, thereby realizing the above-mentioned data processing method.
[0148] In addition, in combination with the data processing method in the above embodiments, the present application embodiment can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the data processing methods in the above embodiments is implemented.
[0149] The present application also provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes each process of implementing any one of the above-mentioned data processing method embodiments.
[0150] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0151] The functional blocks shown in the structural block diagram described above can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), appropriate firmware, plug-in, function card, etc. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or communication link by a data signal carried in a carrier. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, read-only memory (Read-Only Memory, ROM), flash memory, erasable read-only memory (Erasable ReadOnly Memory, EROM), floppy disks, compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical discs, hard disks, optical fiber media, radio frequency (Radio Frequency, RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0152] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0153] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0154] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A data processing method, characterized in that: include: In the case of processing a target task, obtaining a task identifier of a target subtask in the target task whose processing state is a target state, wherein the target state includes a first state and a second state; Obtaining task information, processing results, and processing duration of the target subtask in the target task whose processing status is the first status; Recording the processing order of each of the target subtasks; Creating a node corresponding to each of the target subtasks, and drawing a directed graph corresponding to the node according to the processing order, wherein the node includes a task identifier of the corresponding target subtask; In the directed graph, for the target node whose processing state is the first state, the task information, processing result and processing duration of the target subtask corresponding to the target node are written to obtain a target directed graph.
2. The data processing method according to claim 1, characterized in that: In the directed graph, for the target node whose processing state is the first state, writing the task information, processing result and processing duration of the target subtask corresponding to the target node, and obtaining the target directed graph, the method further includes: The target directed graph is displayed.
3. The data processing method according to claim 1, characterized in that: In the case of processing the target task, obtaining the task identifier of the target subtask whose processing status is the target status in the target task includes: In the case of processing a target task, detecting a processing status of each subtask in the target task; Obtain a task identifier of the target subtask whose processing status is the target status.
4. The data processing method according to claim 1, characterized in that: The node also includes the processing status of the corresponding target subtask.
5. The data processing method according to claim 4, characterized in that: After acquiring the task information, processing result and processing duration of the target subtask in the target task whose processing status is the first status, the method further includes: Saving in the memory module the task identifier and processing status of each of the target subtasks, as well as the task information, processing results and processing duration of the target subtasks whose processing status is the first status in the target task; The creating a node corresponding to each of the target subtasks and drawing a directed graph corresponding to the node according to the processing order includes: Acquire, from the memory module, a task identifier and a processing status of each of the target subtasks, and task information, a processing result, and a processing duration of the target subtasks whose processing status is the first status in the target task; A node corresponding to each of the target subtasks is created, and a directed graph corresponding to the node is drawn according to the processing order.
6. The data processing method according to claim 1, characterized in that: In the case of processing the target task, before obtaining the task identifier of the target subtask in the target task whose processing status is the target status, the method further includes: Receive input of task information of each subtask in the target task.
7. A data processing device, characterized in that: include: An acquisition module is used to acquire, when processing a target task, a task identifier of a target subtask in the target task whose processing status is a target status, wherein the target status includes a first status and a second status; The acquisition module is further used to acquire task information, processing results and processing duration of the target subtask in the target task whose processing status is the first status; A recording module, used for recording the processing order of each target subtask; A creation module, used to create a node corresponding to each of the target subtasks, and draw a directed graph corresponding to the node according to the processing order, wherein the node includes a task identifier of the corresponding target subtask; A writing module is used to write the task information, processing result and processing time of the target subtask corresponding to the target node in the directed graph, for the target node whose processing state is the first state, to obtain a target directed graph.
8. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the data processing method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the data processing method according to any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute the data processing method as described in any one of claims 1 to 6.