CN112418588B - Task flow display method and device - Google Patents

Task flow display method and device Download PDF

Info

Publication number
CN112418588B
CN112418588B CN202010917819.XA CN202010917819A CN112418588B CN 112418588 B CN112418588 B CN 112418588B CN 202010917819 A CN202010917819 A CN 202010917819A CN 112418588 B CN112418588 B CN 112418588B
Authority
CN
China
Prior art keywords
task
time
tasks
consumed
dependency relationship
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010917819.XA
Other languages
Chinese (zh)
Other versions
CN112418588A (en
Inventor
唐君行
张磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN202010917819.XA priority Critical patent/CN112418588B/en
Publication of CN112418588A publication Critical patent/CN112418588A/en
Application granted granted Critical
Publication of CN112418588B publication Critical patent/CN112418588B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06316Sequencing of tasks or work
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Tourism & Hospitality (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Educational Administration (AREA)
  • Game Theory and Decision Science (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a task flow display method and device. The method comprises the following steps: responding to a task flow display request, and acquiring a graphic component for displaying the task flow, wherein the task flow comprises N tasks, and N is an integer greater than or equal to 2; acquiring the dependency relationship among all tasks in the task stream, and acquiring the execution information of each task in the task stream; determining the proportion of a plurality of segments contained in a graphic component corresponding to each task according to the dependency relationship and the execution information of each task; and rendering the graphic components corresponding to each task in the screen according to the dependency relationship and the proportion, wherein the graphic components corresponding to each task are sequentially arranged according to the dependency relationship. The method and the device can enable the user to intuitively know the execution time of each task in the whole task flow.

Description

Task flow display method and device
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a task flow display method and apparatus.
Background
A task flow is a task group of one or more task orchestrations, expressed in DAG (directed acyclic graph), which is the basis for data analysis. During execution of tasks in the task stream, the system typically records the start time and end time of execution of each task. However, for the start time and end time of the system records, the user cannot intuitively know the execution time of each task in the entire task stream according to the start time and end time of the records.
Disclosure of Invention
In view of this, a task stream display method, apparatus, computer device, and computer readable storage medium are now provided to solve the problem in the prior art that a user cannot intuitively understand the execution time of each task in the entire task stream.
The application provides a task flow display method, which comprises the following steps:
responding to a task flow display request, and acquiring a graphic component for displaying the task flow, wherein the task flow comprises N tasks, and N is an integer greater than or equal to 2;
acquiring the dependency relationship among all tasks in the task stream, and acquiring the execution information of each task in the task stream;
determining the proportion of a plurality of segments contained in a graphic component corresponding to each task according to the dependency relationship and the execution information of each task;
and rendering the graphic components corresponding to each task in the screen according to the dependency relationship and the proportion, wherein the graphic components corresponding to each task are sequentially arranged according to the dependency relationship.
Optionally, the task flow display request includes a time window, and the acquiring the execution information of each task in the task flow includes:
And acquiring the execution information of each task in the task stream in the time window, wherein the execution information comprises execution times information and total execution time consumption information.
Optionally, the multiple segments are time segments already consumed by the task flow before the current task starts, the consumed time segments of the current task and the time segments consumed by all tasks from the end of the current task to the end of all tasks in the task flow, and determining, according to the dependency relationship and execution information of each task, the proportion of the multiple segments contained in the graphics component corresponding to each task includes:
determining the consumption time of each task according to the execution times information of each task in the time window and the total execution time information;
determining the total consumption time of all tasks according to the consumption time of each task in the task stream and the dependency relationship;
determining a first time consumed by the task flow before the current task starts and a second time consumed by the current task ending to the end of all tasks in the task flow according to the dependency relationship and the consumed time of each task;
and determining the proportion of three segments contained in the graphic component corresponding to the current task according to the consumed time of the current task, the first time, the second time and the total consumed time.
Optionally, the determining the total consumed time of all tasks according to the consumed time of each task in the task stream and the dependency relationship includes:
determining whether parallel tasks exist in the task flow according to the dependency relationship;
when parallel tasks exist in the task stream, acquiring the consumption time of each task in the parallel tasks;
taking the consumption time of the task with the largest consumption time in the parallel tasks as the consumption time of the parallel tasks;
and calculating a first sum value of the consumed time of other tasks except the parallel tasks in the task stream, and taking a second sum value of the first sum value and the consumed time of the parallel tasks as the total consumed time of all the tasks.
Optionally, when there is a parallel task in the task stream and the current task is a task that depends on the parallel task, the determining, according to the dependency relationship and the consumption time of each task, the first time that the task stream has consumed before the current task starts includes:
calculating third time consumed by other tasks except the parallel task relied by the current task in the task flow before the current task starts;
And taking the third sum value of the third time and the consumed time of the parallel task as the first time which is consumed by the task flow before the current task starts.
Optionally, the task flow display method further includes:
when the dependency relationship is monitored to change, the proportion of three segments contained in the graphic assembly corresponding to each task is redetermined according to the changed dependency relationship and the execution information of each task;
and re-rendering the graphic components corresponding to each task in the screen according to the changed dependency relationship and the re-determined proportion.
Optionally, the task flow display request includes type information of the graphic component, and the obtaining the graphic component for displaying the task flow includes:
and obtaining the graphic component matched with the type information.
The application also provides a task flow display device, which comprises:
the response module is used for responding to a task flow display request and obtaining a graphic component for displaying the task flow, wherein the task flow comprises N tasks, and N is an integer greater than or equal to 2;
the acquisition module is used for acquiring the dependency relationship among the tasks in the task stream and acquiring the execution information of each task in the task stream;
The confirming module is used for confirming the proportion of the plurality of segments contained in the graphic assembly corresponding to each task according to the dependency relationship and the execution information of each task;
and the rendering module is used for rendering the graphic components corresponding to the tasks in the screen according to the dependency relationship and the proportion, wherein the graphic components corresponding to the tasks are sequentially arranged according to the dependency relationship.
The application also provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method when executing the computer program.
The present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the above method.
The beneficial effects of the technical scheme are that:
in the embodiment of the application, a graphic component for displaying a task stream is obtained by responding to a task stream display request, wherein the task stream comprises N tasks, and N is an integer greater than or equal to 2; acquiring the dependency relationship among all tasks in the task stream, and acquiring the execution information of each task in the task stream; determining the proportion of a plurality of segments contained in a graphic component corresponding to each task according to the dependency relationship and the execution information of each task; and rendering the graphic components corresponding to each task in the screen according to the dependency relationship and the proportion, wherein the graphic components corresponding to each task are sequentially arranged according to the dependency relationship. In the embodiment of the application, when the task stream display request is received, the proportion of three segments contained in the graphic component corresponding to each task can be determined according to the dependency relationship among the tasks in the task stream and the execution information of the tasks, and then the execution time of the tasks in the whole task stream can be visually displayed on a screen by adopting the graphic component according to the determined proportion, so that a user can intuitively know the execution time of the tasks in the whole task stream.
Drawings
FIG. 1 is a task flow diagram of three tasks according to an embodiment of the present application;
FIG. 2 is a flow chart of one embodiment of a task flow display method described herein;
FIGS. 3a, 3b are schematic diagrams of the graphic assemblies of the present application;
FIG. 4 is a flowchart of the step of determining the proportion of a plurality of segments contained in a graphic assembly corresponding to each task according to the dependency relationship and the execution information of each task;
FIG. 5 is a detailed flow chart of the steps of the present application for determining the total consumed time of all tasks based on the consumed time of each task in the task stream and the dependency relationship;
FIGS. 6a, 6b are schematic diagrams of task flows in the present application;
FIG. 7 is a flowchart detailing the steps of the present application for determining the first time that the task flow has been consumed before the current task starts based on the dependency and the time consumed for each task;
FIG. 8a is a schematic diagram of a graphical component of the task stream of FIG. 6a after rendering each task;
FIG. 8b is a schematic diagram of a graphical component of the task stream of FIG. 6b after rendering of each task;
FIG. 9 is a flow chart of another embodiment of a task flow display method described herein;
FIG. 10 is a schematic diagram illustrating the comparison of the changes of graphic components corresponding to each task after task 2 and task 3 in the task flow are interchanged;
FIG. 11 is a block diagram illustrating a task flow display device according to one embodiment of the present application;
fig. 12 is a schematic hardware structure of a computer device for executing the task flow display method according to the embodiment of the present application.
Detailed Description
Advantages of the present application are further described below in conjunction with the drawings and detailed description.
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
In the description of the present application, it should be understood that the numerical references before the steps do not identify the order of performing the steps, but are only used for convenience in describing the present application and distinguishing each step, and thus should not be construed as limiting the present application.
Fig. 1 schematically shows a task flow diagram according to an embodiment of the present application. In the exemplary embodiment, the task flow is composed of task 1, task 2 and task 3, wherein task 2 depends on task 1, task 3 depends on task 2, that is, when a task in the task flow is executed, task 2 is automatically executed only when task 1 is executed, and task 3 is automatically executed when task 2 is executed.
Referring to fig. 2, a flow chart of a task flow display method according to an embodiment of the present application is shown. It will be appreciated that the flow charts in the method embodiments are not intended to limit the order in which the steps are performed. As can be seen from the following description with the computer device as the execution body, the task flow display method provided in the present embodiment includes:
and step S20, responding to a task flow display request, and acquiring a graphic component for displaying the task flow, wherein the task flow comprises N tasks, and N is an integer greater than or equal to 2.
Specifically, the task flow display request is used for requesting to display a task flow. There are many triggering manners of the task flow display request, for example, a user triggers the task flow display request by means of gestures, keys, or shaking a terminal. Specifically, when the user triggers the task flow display request in a button manner, the user can trigger the task flow display request by clicking a preset control displayed in a screen of the computer equipment; when the user triggers the task flow display request in a gesture mode, the user can trigger the task flow display request in a mode of making a preset gesture. In another embodiment, the task flow display request may also be triggered by a timed task, such as triggering a task flow display request every 1 minute.
The graphic components for displaying the task flow are preset, and in this embodiment, the graphic components for displaying the task flow may be multiple or only one. Specifically, the graphic component may be a rectangular component shown in fig. 3a, a cylindrical component shown in fig. 3b, or a component of another shape, which is not limited in this embodiment.
In one embodiment, when the graphic components are multiple, the graphic components matched with the type information can be acquired according to the type information of the graphic components carried in the task flow request.
In an exemplary embodiment, when the type information of the graphic component carried in the task flow request is rectangular, when the graphic component is acquired, the rectangular component may be selected from the graphic component library as the graphic component for displaying the task flow.
In another exemplary embodiment, when the type information of the graphic component carried in the task flow request is a column, the column component may be selected from the graphic component library as a graphic component displaying the task flow when the graphic component is acquired.
According to the method and the device, various graphic components are arranged, so that the display modes of the task flows can be diversified.
Step S21, obtaining the dependency relationship among the tasks in the task stream, and obtaining the execution information of each task in the task stream.
Specifically, the dependency relationship is data for determining the execution sequence of each task in the task stream. In this embodiment, the dependency relationship may be obtained from a configuration file of the task flow.
In the execution process of the tasks in the task flow, the computer equipment records the information such as the start time of task execution, the end time of task execution, the task name and the like in the memory. In this embodiment, when recording execution information of a task in a memory, recording may be performed in various manners, and by way of example, recording may be performed in the following manners:
in the first mode, each time a task starts to execute, the start time of the task execution and the end time of the task execution are recorded in the memory, and the length of the start time and the end time is the execution consumption time of the task, i.e. each executed task records a piece of data.
In the second mode, when the tasks in the task stream are executed, the number of times each task is executed in the current time window and the total time spent in executing each task in the time window are recorded by taking the time window as a unit. For example, the time window is a time window of 11:00-11:05 for 5 minutes, and when the execution information is recorded in the memory, the total times of executing the task 1, the task 2 and the task 3 included in the task stream in 11:00-11:05 are recorded respectively, and are assumed to be 3 times, 4 times and 5 times respectively. In addition, when the execution information is recorded in the memory, the total time consumed by executing task 1, task 2 and task 3 in 11:00-11:05 is recorded, i.e. each time window records N pieces of data, where N is the number of tasks included in the task stream.
In an exemplary embodiment, when the recording is performed in the above manner, when the execution information of each task is obtained, a preset piece of data corresponding to the task may be obtained as the execution information of the task, for example, for task 1, 50 pieces of data corresponding to task 1 may be obtained as the execution information of the task 1; for task 2, 50 pieces of data corresponding to task 2 may be acquired as execution information of task 2.
In an exemplary embodiment, when the recording is performed in the second mode, when the execution information of each task is obtained, the data of each task in one or more time windows may be obtained as the execution information of the task, for example, for task 1, the data in 3 time windows corresponding to task 1 may be obtained as the execution information of the task 1; for task 2, data in 3 time windows corresponding to task 2 may also be obtained as execution information of task 2.
In this embodiment, when the task flow display request carries a time window, when the execution information of each task in the task flow is obtained, only the execution information of each task in the task flow in the time window is obtained, where the execution information includes execution times information and total execution time consumption information. Specifically, assuming that the time window is 11:00-11:05, when the execution information is acquired, only the execution times information and the total execution time information of the task 1, the task 2 and the task 3 in the time window 11:00-11:05, which are included in the task stream, are respectively acquired, wherein the execution times information is the total times of executing the task in the time window, and the total execution time information is the total time consumed by executing the task for the times. After the execution times information and the total execution time information of each task are obtained, the time spent by each task in the time window can be calculated according to the execution times information and the total execution time information. In this embodiment, the execution time is not stored in the memory, but is calculated according to the execution times information and the execution total time consumption information when the task flow is visually displayed.
It should be noted that the consumed time is not directly stored in the memory, because before a "time window" ends, the total number of times the task in the window is executed and the total time consumed by the execution are not known.
And S22, determining the proportion of the plurality of segments contained in the graphic assembly corresponding to each task according to the dependency relationship and the execution information of each task.
Specifically, each task is displayed by a graphic assembly, and each graphic assembly is composed of a plurality of segments, and in a specific embodiment, the segments are a time segment A consumed by the task flow before the current task starts, a time segment B consumed by the current task and a time segment C consumed by the current task ending to the end of all tasks in the task flow. Wherein the first proportion occupied by the time segment a=the time that has been consumed by the task flow before the current task starts/the time that has been consumed by the end of all tasks in the task flow; the first proportion occupied by time segment B = elapsed time of the current task/time elapsed for the end of all tasks in the task stream; the first proportion occupied by time segment C = the time consumed by the end of the current task to the end of all tasks in the task stream/the time consumed by the end of all tasks in the task stream.
It will be appreciated that the proportion of time segments that have been consumed by the task stream before the start of the current task corresponding to the first executed task in the task stream must be zero, and similarly the proportion of time segments that have been consumed from the end of the current task corresponding to the last executed task in the task stream to the end of all tasks in the task stream must be zero.
The time that the task stream has consumed before the current task starts, the time that the current task consumes, the time that the entire task in the task stream has consumed, and the manner in which the time that the current task consumes from the end of the entire task in the task stream is calculated will be described in detail in the following embodiments.
In an exemplary embodiment, referring to fig. 4, the determining, according to the dependency relationship and the execution information of each task, the proportion of the plurality of segments included in the graphic assembly corresponding to each task includes:
and step S40, determining the consumption time of each task according to the execution times information and the total execution time information of each task in the time window.
Specifically, the elapsed time of each task = the total time spent executing each task within the time window/the number of executions of each task within the time window.
It will be appreciated that when the execution information includes the execution start time of a task and the execution end time of the task, then the elapsed time of the task = execution end time-execution start time.
Step S41, determining the total consumption time of all tasks according to the consumption time of each task in the task stream and the dependency relationship.
In particular, the total consumption time of all tasks in a task stream is related to the consumption time of each task in the task stream and whether parallel tasks exist in the task stream, and the dependency relationship can determine whether parallel tasks exist in the task stream, wherein the parallel tasks refer to tasks which are executed simultaneously in the task stream.
In an exemplary embodiment, referring to fig. 5, the determining the total consumption time of all tasks according to the consumption time of each task in the task stream and the dependency relationship includes:
and step S50, determining whether parallel tasks exist in the task flow according to the dependency relationship.
Specifically, since the dependency relationship is data for determining the execution sequence of each task in the task stream, after the dependency relationship is acquired, whether a plurality of tasks executed at the same time exist in the task stream can be determined, if so, the existence of parallel tasks in the task stream is indicated, and if not, the existence of parallel tasks in the task stream is indicated.
Step S51, when there is a parallel task in the task stream, acquiring a consumed time of each task in the parallel task.
Specifically, when it is determined that there are parallel tasks in the task stream, it may be further determined that there are several parallel tasks, and if there is only one parallel task, the consumed time of each of the parallel tasks may be acquired. If there are a plurality of parallel tasks, it is necessary to acquire the time consumed by each of the parallel tasks for each of the parallel tasks.
And step S52, taking the time consumption of the task with the largest time consumption in the parallel tasks as the time consumption of the parallel tasks.
Specifically, after the time consumption of each task in the parallel tasks is acquired, the time consumption of the task with the largest time consumption is taken as the time consumption of the parallel task. For example, the parallel task 2 includes a task 2-1 and a task 2-2, wherein the time consumption of the task 2-1 is 20s and the time consumption of the task 2-2 is 15s, and the time consumption 20s of the task 2-1 is taken as the time consumption T of the parallel task 2 2
Step S53, calculating a first sum of the consumed time of the tasks other than the parallel task in the task stream, and taking a second sum of the consumed time of the first sum and the consumed time of the parallel task as a total consumed time of all the tasks.
Specifically, assuming that the task stream includes task 1, parallel task 2 (including task 2-1 and task 2-2), and task 3, the elapsed time T of task 1 is set 1 Time of consumption T with task 3 3 As said first sum value, i.e. first sum value = T 1 +T 3 . Total time spent of all tasks = T 1 +T 3 +T 2
In an exemplary embodiment, when there is no parallel task in the task flow, the sum of the consumed times of task 1, parallel task 2, and task 3 included in the task flow is taken as the total consumed time of all tasks, i.e., total consumed time of all tasks=consumed time of task 1+consumed time of task 2+consumed time of task 3.
Step S42, determining the first time consumed by the task flow before the current task starts and the second time consumed by the current task ending to the end of all tasks in the task flow according to the dependency relationship and the consumed time of each task.
Specifically, the first time that the task stream has been consumed before the current task starts refers to the time that is consumed in executing other tasks that are in front of the current task in the task stream before the current task starts executing in the process of executing the task stream. For example, if the current task flow is shown in fig. 6a, the current task is task 3, and the first time that the task flow has been consumed before the current task starts is the sum of the time consumed for completing task 1 and task 2; for example, if the current task is task 3 as shown in fig. 6b, the first time that the task flow has consumed before the current task starts is the time consumed for executing task 1, task 2-1, and task 2-2, however, since task 2-1 and task 2-2 are parallel tasks, the time consumed for executing the two tasks is the maximum time consumed for executing the two tasks, so in practice, the first time that the task flow has consumed before the current task starts is the sum of the time consumed for executing task 1 and the maximum time consumed for executing the two tasks in the parallel tasks. That is, in this embodiment, the first time that the task flow has consumed before the current task starts is related to whether there are parallel tasks in the task flow, however, the dependency relationship may determine whether there are parallel tasks in the task flow. Therefore, in this embodiment, when determining the first time, whether parallel tasks exist in the task flow may be determined according to the dependency relationship, and then the first time may be determined in a corresponding manner according to the determination result.
In this embodiment, after the first time is determined, the second time may be determined according to the total consumed time of all tasks of the task flow and the first time, specifically, the second time=total consumed time of all tasks-the first time.
In an exemplary embodiment, referring to fig. 7, when there is a parallel task in the task flow and the current task is a task that depends on the parallel task, the determining, according to the dependency relationship and the consumption time of each task, the first time that has been consumed by the task flow before the current task starts includes:
step S70, calculating the third time consumed by other tasks in the task flow except the parallel task on which the current task depends before the current task starts.
Step S71, taking the third sum of the third time and the elapsed time of the parallel task as the first time that the task stream has elapsed before the current task starts.
For example, as shown in fig. 6b, if the current task is task 3, according to the task flow, it is known that only task 1 is the other tasks in the task flow except the parallel task on which the current task depends before the current task starts, and therefore, the time consumed by the task 1 is taken as the third time.
Since the parallel task on which task 3 depends includes task 2-1 and task 2-2, the consumption time of the parallel task can be determined as the maximum value of the consumption times of task 2-1 and task 2-2.
After determining the third time and the elapsed time of the parallel task, a third sum of the third time and the elapsed time of the parallel task may be taken as the first time, i.e., the first time=the third time+the elapsed time of the parallel task.
And determining the proportion of three segments contained in the graphic assembly corresponding to the current task according to the consumed time of the current task, the first time, the second time and the total consumed time.
Specifically, the time segment that the task flow has consumed before the current task starts = the first time/the total consumed time; time spent segment of current task = time spent of the current task/the total time spent; the time segment consumed from the end of the current task to the end of all tasks in the task stream = the second time/the total consumed time.
And step S23, rendering the graphic components corresponding to the tasks in the screen according to the dependency relationship and the proportion, wherein the graphic components corresponding to the tasks are sequentially arranged according to the dependency relationship.
Specifically, after the duty ratio of three segments included in the graphic component corresponding to each task is obtained, the graphic component can be rendered on the screen of the computer device, so that the user can intuitively understand the situation of time consumed in executing each task in the whole task flow. When the graphic assembly is rendered, the task flows are sequentially arranged according to the dependency relationship, so that the visual effect of 'waterfall flow' is presented.
In a specific scenario, for the task flow as shown in fig. 6a, rendering results in the graphic assembly shown in fig. 8 a; for the task flow shown in FIG. 6b, the graphic component shown in FIG. 8b is rendered.
In the embodiment of the application, a graphic component for displaying a task stream is obtained by responding to a task stream display request, wherein the task stream comprises N tasks, and N is an integer greater than or equal to 2; acquiring the dependency relationship among all tasks in the task stream, and acquiring the execution information of each task in the task stream; determining the proportion of a plurality of segments contained in a graphic component corresponding to each task according to the dependency relationship and the execution information of each task, wherein the three segments are respectively time segments consumed by the task flow before the current task starts, time segments consumed by the current task and time segments consumed by the current task from the end of all tasks in the task flow; and rendering the graphic components corresponding to each task in the screen according to the dependency relationship and the proportion, wherein the graphic components corresponding to each task are sequentially arranged according to the dependency relationship. In the embodiment of the application, when the task stream display request is received, the proportion of three segments contained in the graphic component corresponding to each task can be determined according to the dependency relationship among the tasks in the task stream and the execution information of the tasks, and then the execution time of the tasks in the whole task stream can be visually displayed on a screen by adopting the graphic component according to the determined proportion, so that a user can intuitively know the execution time of the tasks in the whole task stream.
In an exemplary embodiment, referring to fig. 9, the task flow display method further includes:
and step S90, when the dependency relationship is monitored to change, the proportion of the three segments contained in the graphic assembly corresponding to each task is redetermined according to the changed dependency relationship and the execution information of each task.
And step S91, re-rendering the graphic components corresponding to each task in the screen according to the changed dependency relationship and the re-determined proportion.
Specifically, the configurator of the task flow can modify the configuration of the task flow, when the configuration of the task flow changes, the dependency relationship among the tasks in the task flow also changes, so in this embodiment, whether the dependency relationship changes or not can be monitored in real time or at regular time, and when the dependency relationship is monitored to change, the proportion occupied by three segments contained in the graphic assembly corresponding to each task is redetermined according to the changed dependency relationship and the execution information of each task. The re-determining the proportion of the three segments included in the graphic assembly corresponding to each task is similar to the proportion of the three segments included in the graphic assembly corresponding to each task in the above embodiment, and is not described in detail in this embodiment.
In this embodiment, the graphic assemblies corresponding to the re-rendering each task in the screen are similar to the graphic assemblies corresponding to the rendering each task in the above embodiment, and will not be described in detail in this embodiment. For example, if the dependency relationship changes to the execution order of the task 2 and the task 3 in the task flow shown in fig. 6a, the rendered graphic assembly will also change accordingly, as shown in fig. 10.
Referring to fig. 11, a block diagram of a task flow display device 110 according to an embodiment of the present application is shown.
In this embodiment, the task flow display device 110 includes a series of computer program instructions stored on a memory, which when executed by a processor, can implement the task flow display functions of the embodiments of the present application. In some embodiments, the task flow display 110 can be divided into one or more modules based on the particular operations implemented by portions of the computer program instructions. For example, in fig. 11, the task flow display device 110 may be divided into a response module 111, an acquisition module 112, a determination module 113, and a rendering module 114. Wherein:
and the response module 111 is configured to obtain, in response to a task flow display request, a graphic component for displaying the task flow, where the task flow includes N tasks, and N is an integer greater than or equal to 2.
Specifically, the task flow display request is used for requesting to display a task flow. There are many triggering manners of the task flow display request, for example, a user triggers the task flow display request by means of gestures, keys, or shaking a terminal. Specifically, when the user triggers the task flow display request in a button manner, the user can trigger the task flow display request by clicking a preset control displayed in a screen of the computer equipment; when the user triggers the task flow display request in a gesture mode, the user can trigger the task flow display request in a mode of making a preset gesture. In another embodiment, the task flow display request may also be triggered by a timed task, such as triggering a task flow display request every 1 minute.
The graphic components for displaying the task flow are preset, and in this embodiment, the graphic components for displaying the task flow may be multiple or only one. Specifically, the graphic component may be a rectangular component shown in fig. 3a, a cylindrical component shown in fig. 3b, or a component of another shape, which is not limited in this embodiment.
In one embodiment, when the graphic components are multiple, the graphic components matched with the type information can be acquired according to the type information of the graphic components carried in the task flow request.
In an exemplary embodiment, when the type information of the graphic component carried in the task flow request is rectangular, when the graphic component is acquired, the rectangular component may be selected from the graphic component library as the graphic component for displaying the task flow.
In another exemplary embodiment, when the type information of the graphic component carried in the task flow request is a column, the column component may be selected from the graphic component library as a graphic component displaying the task flow when the graphic component is acquired.
According to the method and the device, various graphic components are arranged, so that the display modes of the task flows can be diversified.
The obtaining module 112 is configured to obtain a dependency relationship between each task in the task stream, and obtain execution information of each task in the task stream.
Specifically, the dependency relationship is data for determining the execution sequence of each task in the task stream. In this embodiment, the dependency relationship may be obtained from a configuration file of the task flow.
In the execution process of the tasks in the task flow, the computer equipment records the information such as the start time of task execution, the end time of task execution, the task name and the like in the memory. In this embodiment, when recording execution information of a task in a memory, recording may be performed in various manners, and by way of example, recording may be performed in the following manners:
In the first mode, each time a task starts to execute, the start time of the task execution and the end time of the task execution are recorded in the memory, and the length of the start time and the end time is the execution consumption time of the task, i.e. each executed task records a piece of data.
In the second mode, when the tasks in the task stream are executed, the number of times each task is executed in the current time window and the total time spent in executing each task in the time window are recorded by taking the time window as a unit. For example, the time window is a 5-minute time window of 11:00-11:05, and when the execution information is recorded in the memory, the total number of times task 1, task 2 and task 3 included in the task stream are executed in 11:00-11:05 is recorded, which is assumed to be 3 times, 4 times and 5 times, respectively. In addition, when the execution information is recorded in the memory, the total time consumed by executing task 1, task 2 and task 3 in 11:00-11:05 is recorded, i.e. each time window records N pieces of data, where N is the number of tasks included in the task stream.
In an exemplary embodiment, when the recording is performed in the above manner, when the execution information of each task is obtained, a preset piece of data corresponding to the task may be obtained as the execution information of the task, for example, for task 1, 50 pieces of data corresponding to task 1 may be obtained as the execution information of the task 1; for task 2, 50 pieces of data corresponding to task 2 may be acquired as execution information of task 2.
In an exemplary embodiment, when the recording is performed in the second mode, when the execution information of each task is obtained, the data of each task in one or more time windows may be obtained as the execution information of the task, for example, for task 1, the data in 3 time windows corresponding to task 1 may be obtained as the execution information of the task 1; for task 2, data in 3 time windows corresponding to task 2 may also be obtained as execution information of task 2.
In this embodiment, when the task flow display request carries a time window, when the execution information of each task in the task flow is obtained, only the execution information of each task in the task flow in the time window is obtained, where the execution information includes execution times information and total execution time consumption information. Specifically, assuming that the time window is 11:00-11:05, when the execution information is acquired, only the execution times information and the total execution time information of the task 1, the task 2 and the task 3 included in the task stream in the time window 11:00-11:05 are acquired respectively.
And the determining module 113 is configured to determine, according to the dependency relationship and execution information of each task, a proportion of a plurality of segments included in the graphic assembly corresponding to each task.
Specifically, each task is displayed by a graphic assembly, and each graphic assembly is composed of a plurality of segments, and in a specific embodiment, the segments are a time segment A consumed by the task flow before the current task starts, a time segment B consumed by the current task and a time segment C consumed by the current task ending to the end of all tasks in the task flow. Wherein the first proportion occupied by the time segment a=the time that has been consumed by the task flow before the current task starts/the time that has been consumed by the end of all tasks in the task flow; the first proportion occupied by time segment B = elapsed time of the current task/time elapsed for the end of all tasks in the task stream; the first proportion occupied by time segment C = the time consumed by the end of the current task to the end of all tasks in the task stream/the time consumed by the end of all tasks in the task stream.
It will be appreciated that the proportion of time segments that have been consumed by the task stream before the start of the current task corresponding to the first executed task in the task stream must be zero, and similarly the proportion of time segments that have been consumed from the end of the current task corresponding to the last executed task in the task stream to the end of all tasks in the task stream must be zero.
The time that the task stream has consumed before the current task starts, the time that the current task consumes, the time that the entire task in the task stream has consumed, and the manner in which the time that the current task consumes from the end of the entire task in the task stream is calculated will be described in detail in the following embodiments.
In an exemplary embodiment, the determining module 113 is further configured to determine a time consumed by each task according to the information of the number of times each task is executed in the time window and the total time consumed by executing the task.
Specifically, the elapsed time of each task = the total time spent executing each task within the time window/the number of executions of each task within the time window.
It will be appreciated that when the execution information includes the execution start time of a task and the execution end time of the task, then the elapsed time of the task = execution end time-execution start time.
The determining module 113 is further configured to determine a total consumption time of all tasks according to the consumption time of each task in the task stream and the dependency relationship.
In particular, the total consumption time of all tasks in a task stream is related to the consumption time of each task in the task stream and whether parallel tasks exist in the task stream, and the dependency relationship can determine whether parallel tasks exist in the task stream, wherein the parallel tasks refer to tasks which are executed simultaneously in the task stream.
In an exemplary embodiment, the determining module 113 is further configured to determine whether parallel tasks exist in the task stream according to the dependency relationship.
Specifically, since the dependency relationship is data for determining the execution sequence of each task in the task stream, after the dependency relationship is acquired, whether a plurality of tasks executed at the same time exist in the task stream can be determined, if so, the existence of parallel tasks in the task stream is indicated, and if not, the existence of parallel tasks in the task stream is indicated.
The determining module 113 is further configured to obtain a consumption time of each task in the parallel tasks when the parallel tasks exist in the task stream.
Specifically, when it is determined that there are parallel tasks in the task stream, it may be further determined that there are several parallel tasks, and if there is only one parallel task, the consumed time of each of the parallel tasks may be acquired. If there are a plurality of parallel tasks, it is necessary to acquire the time consumed by each of the parallel tasks for each of the parallel tasks.
The determining module 113 is further configured to take the time consumed by the task with the largest time consumed by the parallel tasks as the time consumed by the parallel tasks.
Specifically, after the time consumption of each task in the parallel tasks is acquired, the time consumption of the task with the largest time consumption is taken as the time consumption of the parallel task. For example, the parallel task 2 includes a task 2-1 and a task 2-2, wherein the time consumption of the task 2-1 is 20s and the time consumption of the task 2-2 is 15s, and the time consumption 20s of the task 2-1 is taken as the time consumption T of the parallel task 2 2
The determining module 113 is further configured to calculate a first sum of consumed time of tasks other than the parallel task in the task stream, and take a second sum of consumed time of the first sum and consumed time of the parallel task as a total consumed time of all tasks.
Specifically, assuming that the task stream includes task 1, parallel task 2 (including task 2-1 and task 2-2), and task 3, the elapsed time T of task 1 is set 1 Time of consumption T with task 3 3 As said first sum value, i.e. first sum value = T 1 +T 3 . Total time spent of all tasks = T 1 +T 3 +T 2
In an exemplary embodiment, when there is no parallel task in the task flow, the sum of the consumed times of task 1, parallel task 2, and task 3 included in the task flow is taken as the total consumed time of all tasks, i.e., total consumed time of all tasks=consumed time of task 1+consumed time of task 2+consumed time of task 3.
The determining module 113 is further configured to determine, according to the dependency relationship and the consumed time of each task, a first time that has been consumed by the task flow before the current task starts and a second time that has been consumed by the current task ending to the end of all tasks in the task flow.
Specifically, the first time that the task stream has been consumed before the current task starts refers to the time that is consumed in executing other tasks that are in front of the current task in the task stream before the current task starts executing in the process of executing the task stream. For example, if the current task flow is shown in fig. 6a, the current task is task 3, and the first time that the task flow has been consumed before the current task starts is the sum of the time consumed for completing task 1 and task 2; for example, if the current task is task 3 as shown in fig. 6b, the first time that the task flow has consumed before the current task starts is the time consumed for executing task 1, task 2-1, and task 2-2, however, since task 2-1 and task 2-2 are parallel tasks, the time consumed for executing the two tasks is the maximum time consumed for executing the two tasks, so in practice, the first time that the task flow has consumed before the current task starts is the sum of the time consumed for executing task 1 and the maximum time consumed for executing the two tasks in the parallel tasks. That is, in this embodiment, the first time that the task flow has consumed before the current task starts is related to whether there are parallel tasks in the task flow, however, the dependency relationship may determine whether there are parallel tasks in the task flow. Therefore, in this embodiment, when determining the first time, whether parallel tasks exist in the task flow may be determined according to the dependency relationship, and then the first time may be determined in a corresponding manner according to the determination result.
In this embodiment, after the first time is determined, the second time may be determined according to the total consumed time of all tasks of the task flow and the first time, specifically, the second time=total consumed time of all tasks-the first time.
In an exemplary embodiment, when there is a parallel task in the task stream and the current task is a task that depends on the parallel task, the determining module 113 is further configured to calculate a third time that has been consumed by other tasks in the task stream before the current task starts, except for the parallel task that depends on the current task.
The determining module 113 is further configured to take a third sum of the third time and the elapsed time of the parallel task as a first time that has been elapsed by the task flow before the current task starts.
For example, as shown in fig. 6b, if the current task is task 3, according to the task flow, it is known that only task 1 is the other tasks in the task flow except the parallel task on which the current task depends before the current task starts, and therefore, the time consumed by the task 1 is taken as the third time.
Since the parallel task on which task 3 depends includes task 2-1 and task 2-2, the consumption time of the parallel task can be determined as the maximum value of the consumption times of task 2-1 and task 2-2.
After determining the third time and the elapsed time of the parallel task, a third sum of the third time and the elapsed time of the parallel task may be taken as the first time, i.e., the first time=the third time+the elapsed time of the parallel task.
The determining module 113 is further configured to determine, according to the elapsed time of the current task, the first time, the second time, and the total elapsed time, a proportion of three segments included in a graphic component corresponding to the current task.
Specifically, the time segment that the task flow has consumed before the current task starts = the first time/the total consumed time; time spent segment of current task = time spent of the current task/the total time spent; the time segment consumed from the end of the current task to the end of all tasks in the task stream = the second time/the total consumed time.
And the rendering module 114 is configured to render, in the screen, graphic assemblies corresponding to the tasks according to the dependency relationships and the proportions, where the graphic assemblies corresponding to the tasks are sequentially arranged according to the dependency relationships.
Specifically, after the duty ratio of three segments included in the graphic component corresponding to each task is obtained, the graphic component can be rendered on the screen of the computer device, so that the user can intuitively understand the situation of time consumed in executing each task in the whole task flow. When the graphic assembly is rendered, the task flows are sequentially arranged according to the dependency relationship, so that the visual effect of 'waterfall flow' is presented.
In a specific scenario, for the task flow as shown in fig. 6a, rendering results in the graphic assembly shown in fig. 8 a; for the task flow shown in FIG. 6b, the graphic component shown in FIG. 8b is rendered.
In the embodiment of the application, a graphic component for displaying a task stream is obtained by responding to a task stream display request, wherein the task stream comprises N tasks, and N is an integer greater than or equal to 2; acquiring the dependency relationship among all tasks in the task stream, and acquiring the execution information of each task in the task stream; determining the proportion of a plurality of segments contained in a graphic component corresponding to each task according to the dependency relationship and the execution information of each task, wherein the three segments are respectively time segments consumed by the task flow before the current task starts, time segments consumed by the current task and time segments consumed by the current task from the end of all tasks in the task flow; and rendering the graphic components corresponding to each task in the screen according to the dependency relationship and the proportion, wherein the graphic components corresponding to each task are sequentially arranged according to the dependency relationship. In the embodiment of the application, when the task stream display request is received, the proportion of three segments contained in the graphic component corresponding to each task can be determined according to the dependency relationship among the tasks in the task stream and the execution information of the tasks, and then the execution time of the tasks in the whole task stream can be visually displayed on a screen by adopting the graphic component according to the determined proportion, so that a user can intuitively know the execution time of the tasks in the whole task stream.
In an exemplary embodiment, the task flow display 110 further includes a monitoring module.
And the monitoring module is used for redetermining the proportion of the three segments contained in the graphic assembly corresponding to each task according to the changed dependency relationship and the execution information of each task when the dependency relationship is monitored to change.
The rendering module 114 is further configured to re-render, in the screen, the graphic assemblies corresponding to the tasks according to the changed dependency relationship and the redetermined proportion.
Specifically, the configurator of the task flow can modify the configuration of the task flow, when the configuration of the task flow changes, the dependency relationship among the tasks in the task flow also changes, so in this embodiment, whether the dependency relationship changes or not can be monitored in real time or at regular time, and when the dependency relationship is monitored to change, the proportion occupied by three segments contained in the graphic assembly corresponding to each task is redetermined according to the changed dependency relationship and the execution information of each task. The re-determining the proportion of the three segments included in the graphic assembly corresponding to each task is similar to the proportion of the three segments included in the graphic assembly corresponding to each task in the above embodiment, and is not described in detail in this embodiment.
In this embodiment, the graphic assemblies corresponding to the re-rendering each task in the screen are similar to the graphic assemblies corresponding to the rendering each task in the above embodiment, and will not be described in detail in this embodiment. For example, if the dependency relationship changes to the execution order of the task 2 and the task 3 in the task flow shown in fig. 6a, the rendered graphic assembly will also change accordingly, as shown in fig. 10.
Fig. 12 schematically shows a hardware architecture diagram of a computer device 12 adapted to implement a task flow display method or to implement a task flow display method according to an embodiment of the present application. In the present embodiment, the computer device 12 is a device capable of automatically performing numerical calculation and/or information processing in accordance with instructions set or stored in advance. For example, the server may be a tablet computer, a notebook computer, a desktop computer, a rack-mounted server, a blade server, a tower server, or a rack server (including a stand-alone server or a server cluster formed by a plurality of servers), etc. As shown in fig. 12, the computer device 12 includes at least, but is not limited to: memory 120, processor 121, and network interface 122 may be communicatively linked to each other by a system bus. Wherein:
The memory 120 includes at least one type of computer-readable storage medium including flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 120 may be an internal storage module of the computer device 12, such as a hard disk or memory of the computer device 12. In other embodiments, the memory 120 may also be an external storage device of the computer device 12, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the computer device 12. Of course, the memory 120 may also include both internal memory modules of the computer device 12 and external memory devices. In this embodiment, the memory 120 is typically used to store an operating system installed on the computer device 12 and various types of application software, such as program codes of a task flow display method. In addition, the memory 120 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 121 may be a central processing unit (Central Processing Unit, simply CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 121 is typically used to control the overall operation of the computer device 12, such as performing control and processing related to data interaction or communication with the computer device 12, and the like. In this embodiment, the processor 121 is configured to execute program codes or process data stored in the memory 120.
The network interface 122 may include a wireless network interface or a wired network interface, the network interface 122 typically being used to establish a communication link between the computer device 12 and other computer devices. For example, the network interface 122 is used to connect the computer device 12 to an external terminal through a network, establish a data transmission channel and a communication link between the computer device 12 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a global system for mobile communications (Global System of Mobile communication, abbreviated as GSM), wideband code division multiple access (Wideband Code Division Multiple Access, abbreviated as WCDMA), a 4G network, a 5G network, bluetooth (Bluetooth), wi-Fi, etc.
It should be noted that fig. 12 only shows a computer device having components 120-122, but it should be understood that not all of the illustrated components are required to be implemented, and that more or fewer components may be implemented instead.
In this embodiment, the task flow display method stored in the memory 120 may be divided into one or more program modules and executed by one or more processors (the processor 121 in this embodiment) to complete the present application.
The present embodiment provides a computer-readable storage medium having a computer program stored thereon, which when executed by a processor, implements the steps of the task flow display method in the embodiment.
In this embodiment, the computer-readable storage medium includes a flash memory, a hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the computer readable storage medium may be an internal storage unit of a computer device, such as a hard disk or a memory of the computer device. In other embodiments, the computer readable storage medium may also be an external storage device of a computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card), etc. that are provided on the computer device. Of course, the computer-readable storage medium may also include both internal storage units of a computer device and external storage devices. In this embodiment, the computer-readable storage medium is typically used to store an operating system and various types of application software installed on a computer device, such as program codes of the task flow display method in the embodiment, and the like. Furthermore, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are to be output.
The apparatus embodiments described above are merely illustrative, wherein elements illustrated as separate elements may or may not be physically separate, and elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over at least two network elements. Some or all of the modules may be selected according to actual needs to achieve the purposes of the embodiments of the present application. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus a general purpose hardware platform, or may be implemented by hardware. Those skilled in the art will appreciate that all or part of the processes implementing the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and where the program may include processes implementing the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-only memory (ROM), a random access memory (RandomAccessMemory, RAM), or the like.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (7)

1. A task flow display method, comprising:
responding to a task flow display request, and acquiring a graphic component for displaying the task flow, wherein the task flow display request comprises a time window, and the task flow comprises N tasks, and N is an integer greater than or equal to 2;
acquiring the dependency relationship among all tasks in the task stream, and acquiring the execution information of each task in the task stream;
determining the proportion of a plurality of segments contained in a graphic component corresponding to each task according to the dependency relationship and the execution information of each task, wherein the segments are respectively time segments consumed by the task flow before the current task starts, time segments consumed by the current task and time segments consumed by the current task from the end of all tasks in the task flow;
Rendering graphic components corresponding to each task in a screen according to the dependency relationship and the proportion, wherein the graphic components corresponding to each task are sequentially arranged according to the dependency relationship;
the obtaining the execution information of each task in the task stream includes:
acquiring execution information of each task in the task stream in the time window, wherein the execution information comprises execution times information and execution total time consumption information;
the determining the proportion of the segments contained in the graphic assembly corresponding to each task according to the dependency relationship and the execution information of each task comprises the following steps:
determining the consumption time of each task according to the execution times information of each task in the time window and the total execution time information;
determining the total consumption time of all tasks according to the consumption time of each task in the task stream and the dependency relationship;
determining a first time consumed by the task flow before the current task starts and a second time consumed by the current task ending to the end of all tasks in the task flow according to the dependency relationship and the consumed time of each task;
determining the proportion of three segments contained in a graphic component corresponding to the current task according to the consumed time of the current task, the first time, the second time and the total consumed time;
The determining the total consumption time of all tasks according to the consumption time of each task in the task stream and the dependency relationship comprises:
determining whether parallel tasks exist in the task flow according to the dependency relationship;
when parallel tasks exist in the task stream, acquiring the consumption time of each task in the parallel tasks;
taking the consumption time of the task with the largest consumption time in the parallel tasks as the consumption time of the parallel tasks;
and calculating a first sum value of the consumed time of other tasks except the parallel tasks in the task stream, and taking a second sum value of the first sum value and the consumed time of the parallel tasks as the total consumed time of all the tasks.
2. The task flow display method according to claim 1, wherein when there is a parallel task in the task flow and a current task is a task that depends on the parallel task, the determining the first time that the task flow has consumed before the current task starts according to the dependency relationship and the consumed time of each task includes:
calculating third time consumed by other tasks except the parallel task relied by the current task in the task flow before the current task starts;
And taking the third sum value of the third time and the consumed time of the parallel task as the first time which is consumed by the task flow before the current task starts.
3. The task flow display method according to any one of claims 1 to 2, characterized in that the task flow display method further comprises:
when the dependency relationship is monitored to change, the proportion of three segments contained in the graphic assembly corresponding to each task is redetermined according to the changed dependency relationship and the execution information of each task;
and re-rendering the graphic components corresponding to each task in the screen according to the changed dependency relationship and the re-determined proportion.
4. The task flow display method according to any one of claims 1 to 2, wherein the task flow display request includes type information of the graphic component, and the obtaining the graphic component for displaying the task flow includes:
and obtaining the graphic component matched with the type information.
5. A task flow display device, comprising:
the response module is used for responding to a task flow display request and obtaining a graphic component for displaying the task flow, wherein the task flow display request comprises a time window, the task flow comprises N tasks, and N is an integer greater than or equal to 2;
The acquisition module is used for acquiring the dependency relationship among the tasks in the task stream and acquiring the execution information of each task in the task stream;
the confirming module is used for determining the proportion of a plurality of segments contained in the graphic assembly corresponding to each task according to the dependency relationship and the execution information of each task, wherein the segments are respectively time segments consumed by the task flow before the current task starts, time segments consumed by the current task and time segments consumed by the current task from the end of all tasks in the task flow;
the rendering module is used for rendering the graphic components corresponding to the tasks in the screen according to the dependency relationship and the proportion, wherein the graphic components corresponding to the tasks are sequentially arranged according to the dependency relationship;
the acquisition module is further configured to acquire execution information of each task in the task stream within the time window, where the execution information includes execution times information and total execution time consumption information
The confirmation module is further used for determining the consumed time of each task according to the execution times information and the total execution consumed time information of each task in the time window; determining the total consumption time of all tasks according to the consumption time of each task in the task stream and the dependency relationship; determining a first time consumed by the task flow before the current task starts and a second time consumed by the current task ending to the end of all tasks in the task flow according to the dependency relationship and the consumed time of each task; determining the proportion of three segments contained in a graphic component corresponding to the current task according to the consumed time of the current task, the first time, the second time and the total consumed time;
The determining module is further configured to determine whether parallel tasks exist in the task flow according to the dependency relationship; when parallel tasks exist in the task stream, acquiring the consumption time of each task in the parallel tasks; taking the consumption time of the task with the largest consumption time in the parallel tasks as the consumption time of the parallel tasks; and calculating a first sum value of the consumed time of other tasks except the parallel tasks in the task stream, and taking a second sum value of the first sum value and the consumed time of the parallel tasks as the total consumed time of all the tasks.
6. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the task flow display method of any one of claims 1 to 4 when the computer program is executed.
7. A computer-readable storage medium having stored thereon a computer program, characterized by: the computer program, when executed by a processor, implements the steps of the task flow display method of any one of claims 1 to 4.
CN202010917819.XA 2020-09-03 2020-09-03 Task flow display method and device Active CN112418588B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010917819.XA CN112418588B (en) 2020-09-03 2020-09-03 Task flow display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010917819.XA CN112418588B (en) 2020-09-03 2020-09-03 Task flow display method and device

Publications (2)

Publication Number Publication Date
CN112418588A CN112418588A (en) 2021-02-26
CN112418588B true CN112418588B (en) 2023-08-01

Family

ID=74854084

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010917819.XA Active CN112418588B (en) 2020-09-03 2020-09-03 Task flow display method and device

Country Status (1)

Country Link
CN (1) CN112418588B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112862453A (en) * 2021-03-02 2021-05-28 岭东核电有限公司 Process information display method, apparatus, computer device and storage medium

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101076783A (en) * 2004-03-08 2007-11-21 Ab开元软件公司 Controlling task execution
CN103235742A (en) * 2013-04-07 2013-08-07 山东大学 Dependency-based parallel task grouping scheduling method on multi-core cluster server
CN104156269A (en) * 2014-07-22 2014-11-19 华东师范大学 Timed automata based software and hardware optimal-partition visualizing method
CN106293928A (en) * 2015-06-05 2017-01-04 阿里巴巴集团控股有限公司 A kind of overall situation task node dependence method for visualizing, device and system
CN107798108A (en) * 2017-10-30 2018-03-13 中国联合网络通信集团有限公司 A kind of asynchronous task querying method and equipment
CN108496163A (en) * 2015-11-20 2018-09-04 慧咨环球有限公司 The system and method for production environment tool
CN108984284A (en) * 2018-06-26 2018-12-11 杭州比智科技有限公司 DAG method for scheduling task and device based on off-line calculation platform
CN109254839A (en) * 2018-08-24 2019-01-22 上海哔哩哔哩科技有限公司 It determines the method in task triggered time, construct the method and system of task timer
CN110516971A (en) * 2019-08-29 2019-11-29 杭州网易再顾科技有限公司 Method, apparatus, medium and the calculating equipment of abnormality detection
CN110737572A (en) * 2019-08-31 2020-01-31 苏州浪潮智能科技有限公司 Big data platform resource preemption test method, system, terminal and storage medium
CN110806923A (en) * 2019-10-29 2020-02-18 百度在线网络技术(北京)有限公司 Parallel processing method and device for block chain tasks, electronic equipment and medium
CN110858158A (en) * 2018-08-23 2020-03-03 北京京东金融科技控股有限公司 Distributed task scheduling method and device, electronic equipment and storage medium
CN111352686A (en) * 2020-03-04 2020-06-30 北京百分点信息科技有限公司 Method and device for displaying task flow, readable storage medium and electronic equipment

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101076783A (en) * 2004-03-08 2007-11-21 Ab开元软件公司 Controlling task execution
CN103235742A (en) * 2013-04-07 2013-08-07 山东大学 Dependency-based parallel task grouping scheduling method on multi-core cluster server
CN104156269A (en) * 2014-07-22 2014-11-19 华东师范大学 Timed automata based software and hardware optimal-partition visualizing method
CN106293928A (en) * 2015-06-05 2017-01-04 阿里巴巴集团控股有限公司 A kind of overall situation task node dependence method for visualizing, device and system
CN108496163A (en) * 2015-11-20 2018-09-04 慧咨环球有限公司 The system and method for production environment tool
CN107798108A (en) * 2017-10-30 2018-03-13 中国联合网络通信集团有限公司 A kind of asynchronous task querying method and equipment
CN108984284A (en) * 2018-06-26 2018-12-11 杭州比智科技有限公司 DAG method for scheduling task and device based on off-line calculation platform
CN110858158A (en) * 2018-08-23 2020-03-03 北京京东金融科技控股有限公司 Distributed task scheduling method and device, electronic equipment and storage medium
CN109254839A (en) * 2018-08-24 2019-01-22 上海哔哩哔哩科技有限公司 It determines the method in task triggered time, construct the method and system of task timer
CN110516971A (en) * 2019-08-29 2019-11-29 杭州网易再顾科技有限公司 Method, apparatus, medium and the calculating equipment of abnormality detection
CN110737572A (en) * 2019-08-31 2020-01-31 苏州浪潮智能科技有限公司 Big data platform resource preemption test method, system, terminal and storage medium
CN110806923A (en) * 2019-10-29 2020-02-18 百度在线网络技术(北京)有限公司 Parallel processing method and device for block chain tasks, electronic equipment and medium
CN111352686A (en) * 2020-03-04 2020-06-30 北京百分点信息科技有限公司 Method and device for displaying task flow, readable storage medium and electronic equipment

Also Published As

Publication number Publication date
CN112418588A (en) 2021-02-26

Similar Documents

Publication Publication Date Title
CN107506300B (en) User interface testing method, device, server and storage medium
CN112765023B (en) Test case generation method and device
CN110928802A (en) Test method, device, equipment and storage medium based on automatic generation of case
US11201806B2 (en) Automated analysis and recommendations for highly performant single page web applications
CN108510287B (en) Client return visit judgment method, electronic device and computer readable storage medium
CN110781067A (en) Method, device, equipment and storage medium for calculating starting time consumption
CN112199007A (en) Menu display method and device, electronic equipment and storage medium
CN112418588B (en) Task flow display method and device
CN111796824A (en) Page loading method, device, server and medium
CN110673936A (en) Breakpoint continuous operation method and device for arranging service, storage medium and electronic equipment
US20150095875A1 (en) Computer-assisted release planning
CN112613275A (en) Receipt generation method and device, computer equipment and storage medium
CN109725785A (en) Task execution situation method for tracing, device, equipment and readable storage medium storing program for executing
CN107203463B (en) Interface testing method, interface drawing method and device
CN110365682B (en) Anti-cheating method and device
US20140351708A1 (en) Customizing a dashboard responsive to usage activity
CN111597093B (en) Exception handling method, device and equipment thereof
CN115269285A (en) Test method and device, equipment and computer readable storage medium
CN110046016B (en) Method, system, device and storage medium for controlling display of user interface component
US9069562B2 (en) Mobile computing program slicing and behavior
US9477448B2 (en) Screen-oriented computing program refactoring
CN113973235A (en) Interactive information display method and device and computer equipment
CN107679143B (en) Baidu map based dynamic step-by-step loading device and method and readable storage medium
CN113761179A (en) Comment management and control method, server and readable storage medium
CN111367750A (en) Exception handling method, device and equipment

Legal Events

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