Data warehouse-based task display method and device, terminal device and medium
By configuring API calls in the data warehouse to collect task parameter information, determine task status, and display task relationships, the problem of unclear task dependencies in big data platforms is solved, and rapid data repair is achieved.
Patent Information
- Application Number
- CN202310281260.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-14
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2043-03-14
AI Technical Summary
In the database of a big data platform, the dependencies between tasks cannot be seen at the upstream and downstream levels, making it difficult to quickly find the core problem points when anomalies occur, resulting in low data repair efficiency.
Configure the API in the data warehouse to collect task parameter information, including the current task name, upstream task name, and current task status. Based on this information, determine the target task status and display the task according to the status, and connect the task relationships.
By accurately locating the abnormal task, data in the task can be quickly repaired, improving data repair efficiency.
Smart Images

Figure CN116467346B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data storage technology, and in particular to a task display method, apparatus, terminal equipment and medium based on a data warehouse. Background Technology
[0002] With the rise of the big data era, data warehouses have transformed from primitive monolithic relational databases to databases based on big data platforms. Many companies run over 1,000 programs on their big data warehouses. While there are many scheduling tools available for big data platforms, they generally share a fatal flaw: when task dependencies only show the online and offline status of the task itself, they cannot identify the upstream and downstream tasks. When a task encounters an anomaly, it's impossible to quickly and comprehensively pinpoint the core problem, ultimately leading to low data repair efficiency in the big data platform database. Therefore, improving data repair efficiency in big data platform databases has become a pressing issue. Summary of the Invention
[0003] In view of this, embodiments of this application provide a task display method, apparatus, terminal device and medium based on a data warehouse to solve the problem of low data repair efficiency in the database of a big data platform.
[0004] In a first aspect, embodiments of this application provide a task display method based on a data warehouse, wherein a calling interface is configured at the beginning and end of each task in the data warehouse, and the task display method includes:
[0005] When all tasks are executed, two call interfaces of all tasks are called to collect data and obtain the first parameter information and the second parameter information. Each parameter information includes the current task name, the upstream task name and the current task status.
[0006] For any task, if the current task name is the same in the first parameter information and the second parameter information of the task, and the upstream task name is the same, then the target task state of the task is determined according to the current task state in the first parameter information and the second parameter information of the task.
[0007] Based on the target task status of each task, the corresponding task is displayed. The display results will be different for different target task statuses.
[0008] For any displayed task, based on the upstream task name corresponding to the displayed task, determine the corresponding target task among all displayed tasks, and connect the displayed task to the backend of the target task.
[0009] In a second aspect, the embodiments of the present application provide a task display device based on a data warehouse, wherein a calling interface is configured at a start part and an end part of any task in the data warehouse, and the task display device comprises:
[0010] an information collection module, configured to collect the two calling interfaces of all the tasks when the tasks are executed, to obtain first parameter information and second parameter information, each of which comprises a current task name, an upstream task name and a current task state;
[0011] a state determination module, configured to, for any task, if the current task name and the upstream task name in the first parameter information and the second parameter information of the task are the same, determine a target task state of the task according to the current task state in the first parameter information and the second parameter information of the task;
[0012] a task display module, configured to display the corresponding task according to the target task state of each task, wherein different target task states correspond to different display results;
[0013] a task relationship display module, configured to, for any displayed task, determine a target task in all the displayed tasks according to the upstream task name corresponding to the displayed task, and connect the displayed task at the back end of the target task.
[0014] In a third aspect, the embodiments of the present application provide a terminal device, which comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor implements the task display method based on the data warehouse when executing the computer program.
[0015] In a fourth aspect, the embodiments of the present application provide a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the task display method based on the data warehouse.
[0016] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0017] The application calls two calling interfaces of all tasks to collect first parameter information and second parameter information when all tasks are executed, each parameter information includes a current task name, an upstream task name and a current task state, for any task, if the current task name and the upstream task name are same in the first parameter information and the second parameter information of the task, the target task state of the task is determined according to the current task state in the first parameter information and the second parameter information of the task, and the corresponding task is displayed according to the target task state of each task, wherein the display result of different target task states is different, for any displayed task, the corresponding target task is determined in all displayed tasks according to the upstream task name of the displayed task, and the displayed task is connected behind the target task. In the application, the execution state of the task is determined according to the display result of different tasks, the position of the task with an exception can be accurately positioned, the data in the task is quickly repaired, and the data repair efficiency is improved. BRIEF DESCRIPTION OF DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0019] Figure 1 is an application environment schematic diagram of a task display method based on a data warehouse provided by an embodiment of the present application;
[0020] Figure 2 is a flow schematic diagram of a task display method based on a data warehouse provided by an embodiment of the present application;
[0021] Figure 3 is a structure schematic diagram of a task display device based on a data warehouse provided by an embodiment of the present application;
[0022] Figure 4 is a structure schematic diagram of a terminal device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0023] In the following description, specific details such as specific system structures, techniques, etc. are presented in order to thoroughly understand the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits and methods are omitted to avoid unnecessary details that hinder the description of the present application.
[0024] It should be understood that the word “comprise” or variations such as “comprises” or “comprising”, when used in this specification and in the accompanying claims, specify the presence of stated features, integers, steps, operations, elements, components and / or groups of features, integers, steps, operations, elements, components but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0025] It should also be understood that the term “and / or” when used in this specification and in the following claims is to be interpreted as “one or the other or both” and / or “any combination of the items in the list.
[0026] As used in this specification and in the claims, the terms “if’ and “when” can be interpreted to mean “upon” or “in response to a determination” or “in response to a detection” depending on the context. Similarly, the phrase “if it is determined” or “if [a described condition or event] is detected” can be interpreted to mean “upon a determination” or “in response to a determination” or “upon detecting [a described condition or event]” or “in response to detecting [a described condition or event]”, depending on the context.
[0027] In addition, the terms “first”, “second”, “third”, etc. as used in the description of the specification and the appended claims are merely used for distinguishing between similar underlying features and do not imply or suggest any relative importance.
[0028] Reference throughout this specification to “one embodiment” or “an embodiment” or “some embodiments” means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the application. Thus, the appearances of the phrases “in one embodiment”, “in some embodiments”, “in other embodiments”, “in additional embodiments”, and so on, in various places throughout this specification are not necessarily all referring to the same embodiment, unless otherwise specifically stated. The terms “comprise”, “comprises”, “comprising”, “include”, “includes”, “including” and “contain”, “contains”, “containing” and variations thereof, are meant to be construed as “including but not limited to”, unless otherwise specifically stated.
[0029] It should be understood that the size of the serial number of each step in the following embodiments does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the application.
[0030] In order to illustrate the technical solutions of the application, the following specific embodiments are described.
[0031] The task display method based on a data warehouse provided by the embodiment of the application can be applied to a system such as a data warehouse system. Figure 1In this application environment, the client and server communicate with each other. Clients include, but are not limited to, smart TVs, PDAs, desktop computers, laptops, ultra-mobile personal computers (UMPCs), netbooks, cloud terminal devices, and personal digital assistants (PDAs). The server can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0032] See Figure 2 This is a flowchart illustrating a task display method based on a data warehouse, provided in Embodiment 2 of this application. The task display method is applied to the server. Users upload task data to the server via the client. The server retrieves the corresponding task data, displays the corresponding task status, and stores the task data in a database connected to it. There can be one or more databases. Figure 2 As shown, the task demonstration method may include the following steps:
[0033] Step S201: When all tasks are executed, call the two calling interfaces of all tasks to collect the first parameter information and the second parameter information.
[0034] In step S201, a call interface is configured at the beginning and end of any task in the data warehouse. The two call interfaces of all tasks are called to collect data and obtain the first parameter information and the second parameter information. Each parameter information includes the current task name, the upstream task name, and the current task status.
[0035] In this embodiment, when a call interface is configured for both the beginning and end of any task, the configuration can be tailored to each task in the data warehouse. Parameters are configured for the call interfaces. After the call interfaces for different tasks are parameterized, they are encapsulated and stored in the database. Before being stored, the call interfaces undergo data cleaning and format standardization. The aggregated call interfaces are then stored. Based on the data storage address corresponding to each call interface in the database, the corresponding call interface is retrieved from the database to execute the task. After configuration, the call interfaces for each task and their calling order are determined.
[0036] It is necessary to configure the input and output parameters of each calling interface to ensure that different calling interfaces have a set calling order and achieve the corresponding calling tasks. Similarly, the input and output parameters of all calling interfaces in the data warehouse task need to be configured.
[0037] It should be noted that when the parameter configuration of the calling interface is performed, the description documents of the tasks in the data warehouse can be configured. The description documents of the tasks are used to record the task names, task contents, task processes and other data of different tasks. The core semantics of the description documents are extracted. Since each description document can contain a large number of sentences, and the length of each sentence can be relatively long, if the description document is directly analyzed, a large amount of computing resources will be occupied. Therefore, the description document can be subjected to word segmentation processing, and the description document is divided into document segmentation to improve the efficiency of subsequent analysis of the description document.
[0038] Specifically, the description document can be searched in the preset dictionary according to different data lengths, and the same words retrieved from the dictionary as the description document are collected as the document segmentation of the description document. The dictionary is a dictionary containing a plurality of standard segmentations constructed in advance. The description document can be searched in the dictionary according to different data lengths. When the same words as the description document are retrieved, the retrieved words are confirmed as the document segmentation of the description document. In this embodiment, the word2vec algorithm, the bert algorithm and the one-hot algorithm can be used to convert each segmentation in the document segmentation into a segmentation vector. Since the document segmentation includes a plurality of segmentations, and the length of the segmentation vector obtained by converting each segmentation is not necessarily the same, in order to facilitate subsequent analysis of the segmentations, the vector length of each vector in the segmentation vector can be extended to a uniform length by using a preset parameter.
[0039] According to the extracted core semantics of the description document, the corresponding calling parameters are configured for the calling interface.
[0040] When the start part and the end part of any task in the data warehouse are configured with a calling interface, the corresponding task is executed, the corresponding calling interface is called, and the first parameter information and the second parameter information of the corresponding task are collected. Each parameter information includes the current task name, the upstream task name and the current task state.
[0041] It should be noted that when the corresponding task is executed, the corresponding calling request is sent to the corresponding calling interface, the corresponding calling interface is called according to the calling request, and the parameter information of the task corresponding to the calling interface is collected through the calling interface. The task name, task class name, time, state, upstream task name and upstream class task name parameters of the start part and the end part of each task corresponding to the calling interface are recorded respectively, and the recorded task name, task class name, time, state, upstream task name and upstream class task name parameters are stored in the data warehouse.
[0042] For example, in any task, the task name can be the recording time length of the opening viewing, the task class name can be urationOfOpeningViewing, the time can be 2023-01-01 02:00:00, the state can be start, the upstream task name can be the recording of the opening viewing, and the upstream class name can be OpenBroadcastViewingRecord. In another task, the task name can be the recording time length of the opening viewing, the task class name can be urationOfOpeningViewing, the time can be 2023-01-01 02:00:00, the state can be end, the upstream task name can be the recording of the opening viewing, and the upstream class name can be OpenBroadcastViewingRecord. In another task, the task name can be the start broadcast report, the task class name can be Startbroadcastreport, the time can be 2023-01-01 02:00:00, the state can be end, the upstream task name can be the recording time length of the opening viewing, and the upstream class name can be OpenBroadcastViewingRecord.
[0043] It should be noted that the corresponding relationship between the upstream task and the downstream task is one-to-many, that is, one downstream task corresponds to one upstream task, and one upstream task can correspond to multiple downstream tasks. For example, when the upstream task is the recording time length of the opening viewing, it can correspond to the downstream task of the opening broadcast report and the downstream task of the opening index. The upstream task of the recording time length of the opening viewing corresponds to multiple downstream tasks, but the downstream task of the opening broadcast report or the downstream task of the opening index only corresponds to one upstream task, which is the recording time length of the opening viewing.
[0044] In step S202, for any task, if the current task name in the first parameter information and the second parameter information of the task is the same, and the upstream task name is the same, the target task state of the task is determined according to the current task state in the first parameter information and the second parameter information of the task.
[0045] In step S202, the task name in the first parameter information and the second parameter information, and the upstream task name are used to determine whether the corresponding tasks are the same task. When the current task name in the first parameter information and the second parameter information of the task is the same, and the upstream task name is the same, when the first parameter information and the second parameter information are information parameters in the same task, when it is determined that the first parameter information and the second parameter information correspond to the same task, the target task state of the task is determined according to the current task state in the first parameter information and the second parameter information of the task.
[0046] In the embodiment, for any task, it is determined whether the task names of the tasks are equal, when the task names of the tasks are equal, it is determined whether the upstream task names of the tasks are equal, when the upstream task names corresponding to the tasks are also equal, then according to the current task states in the first parameter information and the second parameter information of the tasks, the target task state of the tasks is determined.
[0047] For example, when the current task name in the first parameter information of the task is a start playing indicator, the current task name in the second parameter information is also a start playing indicator, when the upstream task name in the first parameter information is a start playing recording time length, the upstream task name in the second parameter information is also a start playing recording time length, it can be determined that the tasks in execution are the same task, and the calling interfaces called are the calling interface of the start part and the calling interface of the end part in the same task.
[0048] When the current tasks corresponding to the first parameter information and the second parameter information are the same task, then according to the current task states in the first parameter information and the second parameter information of the tasks, the target task state of the tasks is determined.
[0049] Optionally, each parameter information further includes a collection time, and before the target task state of the task is determined according to the current task states in the first parameter information and the second parameter information of the task, the method further includes:
[0050] It is detected whether the difference between the sampling times in the first parameter information and the second parameter information of the task is less than a time threshold value;
[0051] If it is detected that the difference between the sampling times in the first parameter information and the second parameter information of the task is less than the time threshold value, it is determined that the first parameter information and the second parameter information of the task are true, and the step of determining the target task state of the task according to the current task states in the first parameter information and the second parameter information of the task is executed.
[0052] In the embodiment, the time interval between the sampling time in the first parameter information at the start of the current task and the sampling time in the second parameter information at the end of the current task is detected, and according to the detection result, it is determined whether the first parameter and the second parameter are real parameters. When it is detected that the difference between the sampling times in the first parameter information and the second parameter information of the current task is less than a time threshold value, it is determined that the first parameter information and the second parameter information of the task are true, and the step of determining the target task state of the task according to the real data first parameter information and the second parameter information, the accuracy of determining the target task state of the task is improved, wherein the time threshold value can be determined according to the specific situation, when the execution task needs a longer time, the time threshold value can be set to a larger value, when the execution task needs a shorter time, the time threshold value can be set to a smaller value.
[0053] For example, a time threshold k is set, when the task name is the start of the recording time length, the corresponding sampling time of the first parameter information sampled is 2023-01-01 02:00:00, the sampling time in the second parameter information is 2023-01-01 02:03:00, the time difference between the sampling time in the first parameter information and the sampling time in the second parameter information is 3 minutes, when k is greater than 3, it is considered that the first parameter information and the second parameter information sampled are true, otherwise, it is considered that the first parameter and the second parameter sampled are false, and the first parameter information and the second parameter information cannot be used to determine the target task state of the corresponding task.
[0054] In another embodiment, when determining whether the first parameter information and the second parameter information in the corresponding task are true, the sampling state in the first parameter information and the second parameter information can also be determined, the sampling state includes start and end, the first parameter information is the parameter collected by the calling interface in the start part of the task, the sampling state in the first parameter information is start, the second parameter information is the parameter collected by the calling interface in the end part of the task, the sampling state in the second parameter information is end, and whether the sampling state in the first parameter information and the sampling state in the second parameter information are corresponding start state and end state is detected, when the sampling state in the first parameter information is start state and the sampling state in the second parameter information is end state, it is considered that the first parameter information and the second parameter information are true. When the sampling state in the first parameter information and the sampling state in the second parameter information are other sampling states, it is considered that the first parameter information and the second parameter information are false. For example, when the sampling state in the first parameter information is start state and the sampling state in the second parameter information is also start state, it is considered that the first parameter information and the second parameter information are false. When the sampling state in the first parameter information is end state and the sampling state in the second parameter information is also end state, it is considered that the first parameter information and the second parameter information are false. When the sampling state in the first parameter information is end state and the sampling state in the second parameter information is also start state, it is considered that the first parameter information and the second parameter information are false.
[0055] After determining that the first parameter information and the second parameter information of the task are true, the step of determining the target task state of the task according to the current task state in the first parameter information and the second parameter information of the task is executed.
[0056] Optionally, determining the target task state of the task according to the current task state in the first parameter information and the second parameter information of the task includes:
[0057] If the current task state in the first parameter information and the second parameter information of the task is complete, it is determined that the execution success state is the target task state of the task.
[0058] In the embodiment, the target task state of the task is determined according to the current task state in the first parameter information and the second parameter information. The current task state includes a completed state, an uncompleted state, and a failed execution state. If the current task state in the first parameter information and the second parameter information of the task is completed, the successful execution state is determined as the target task state of the task.
[0059] For example, when the task of starting a playback recording time length is the current task, the current task state in the first parameter information is completed, and the current task state in the second parameter information is also completed. It is considered that the task of starting a playback recording time length is successfully executed. The target task state is the successful execution state. When the task execution failure state exists in the database warehouse, the detection and positioning of the data in the task of starting a playback recording time length can be omitted when the data in the task execution failure state is repaired, and the repair efficiency of the to-be-repaired data is improved.
[0060] It should be noted that the target task state includes a successful execution state, an unexecuted state, and a failed execution state.
[0061] Optionally, determining the target task state of the task according to the current task state in the first parameter information and the second parameter information of the task includes:
[0062] If the current task state in the first parameter information and the second parameter information of the task includes at least one uncompleted state, the unexecuted state is determined as the target task state of the task.
[0063] In the embodiment, the target task state of the task is determined according to the current task state in the first parameter information and the second parameter information. The current task state includes a completed state, an uncompleted state, and a failed execution state. If the current task state in the first parameter information and the second parameter information of the task includes at least one uncompleted state, the unexecuted state is determined as the target task state of the task.
[0064] For example, when the task of starting a playback recording time length is the current task, the current task state in the first parameter information is completed, and the current task state in the second parameter information is uncompleted. The task of starting a playback recording time length is an unexecuted task, and the target task state is the unexecuted state. When the task execution failure state exists in the data warehouse, the detection and positioning of the data in the task of starting a playback recording time length can be omitted when the data in the task execution failure state is repaired, and the repair efficiency of the to-be-repaired data is improved.
[0065] Optionally, determining the target task state of the task according to the current task state in the first parameter information and the second parameter information of the task includes:
[0066] If the current task state in the first parameter information and the second parameter information of the task includes at least one execution failure, the execution failure state is determined as the target task state of the task.
[0067] In this embodiment, the target task state of the corresponding task is determined according to the current task state in the first parameter information and the second parameter information, the current task state including a completion state, an uncompleted state and an execution failure state, and if the current task state in the first parameter information and the second parameter information of the task includes at least one execution failure, the execution failure state is determined as the target task state of the task.
[0068] For example, when the task of starting a playback record time length is the current task, the current task state in the first parameter information is completion, the current task state in the second parameter information is uncompleted, the task of starting a playback record time length is an unexecuted task, and the target task state is an unexecuted state. When there is a task execution failure state in the data warehouse, the data of the task execution failure state is repaired, the task can be quickly located, the positioning efficiency of the data to be repaired is improved, and the repair efficiency of the data to be repaired is improved.
[0069] Step S203: Display the corresponding task according to the target task state of each task.
[0070] In step S203, the display results corresponding to different target task states are different, and the display results corresponding to different target task states can be reflected in the display mode, that is, the corresponding display results are distinguished by different display modes.
[0071] In this embodiment, the corresponding task is displayed according to the target task state of each task, and the display results corresponding to different target task states are different, so as to determine the corresponding target task state according to different display results.
[0072] Optionally, displaying the corresponding task according to the target task state of each task includes:
[0073] For any task, if the target task state of the task is an execution failure state, the task is displayed in a first display mode, if the target task state of the task is an execution success state, the task is displayed in a second display mode, and if the target task state of the task is an unexecuted state, the task is displayed in a third display mode.
[0074] In this embodiment, according to the target task state of each task, the corresponding task is displayed, and the display mode is different when the target task state is different. The target task state includes a corresponding execution failure state, an execution success state and an unexecuted state. If the target task state of the task is the execution failure state, the task is displayed in the first display mode. If the target task state of the task is the execution success state, the task is displayed in the second display mode. If the target task state of the task is the unexecuted state, the task is displayed in the third display mode.
[0075] For example, different display modes can be reflected in different rendering colors when the task is displayed. For example, if the target task state of the task is the execution failure state, the task is displayed in the first display mode, wherein the first display mode is to render the corresponding task as red. If the target task state of the task is the execution success state, the task is displayed in the second display mode, wherein the second display mode is to render the corresponding task as green. If the target task state of the task is the unexecuted state, the task is displayed in the third display mode, wherein the third display mode is to render the corresponding task as gray. Different rendering colors represent different target task states, so that the execution state of the corresponding task can be determined intuitively.
[0076] For example, the target task state of the start-to-play recording duration task is the execution failure state, so when the start-to-play recording task is displayed, the start-to-play recording task node is rendered as the corresponding red color. The target task state of the start-to-play report task is the execution success state, so when the start-to-play report task is displayed, the start-to-play indicator task node is rendered as the corresponding green color. The target task state of the start-to-play indicator task is the unexecuted state, so when the start-to-play indicator task is displayed, the start-to-play indicator task node is rendered as the corresponding gray color.
[0077] In another embodiment, different display modes can be reflected in different identifiers when the task is displayed. For example, if the target task state of the task is the execution failure state, the task is displayed in the first display mode, wherein the first display mode is to add identifier symbol 1 to the corresponding task. If the target task state of the task is the execution success state, the task is displayed in the second display mode, wherein the second display mode is to add identifier symbol 2 to the corresponding task. If the target task state of the task is the unexecuted state, the task is displayed in the third display mode, wherein the third display mode is to add identifier symbol 3 to the corresponding task.
[0078] Step S204: For any displayed task, according to the upstream task name corresponding to the displayed task, a corresponding target task is determined in all displayed tasks, and the displayed task is connected at the rear end of the target task.
[0079] In step S204, when the task is displayed, the node of the upstream task name associated with the current task is displayed, so that the most upstream task of the corresponding task can be found in the displayed task.
[0080] In this embodiment, according to the upstream task name associated with the current task, the corresponding target task is determined in all displayed tasks, and the positioning in the current task is determined according to the position of the target task, so that the current task can be displayed in the correct task position. For example, the upstream task name of the play start recording time length task is play start recording, the corresponding target task is play start recording, the display chain of the play start recording task is found, and then the play start recording time length task is displayed behind the play start recording task. The upstream task name of the play start report and the play start index task is the play start recording time length task, and the play start recording time length task is displayed behind the play start recording time length task.
[0081] Optionally, each parameter information further includes a task class name and an upstream class name, and after the corresponding task is displayed according to the target task state of each task, the following is further included:
[0082] Each displayed task is associated with the corresponding task class name and the upstream class name;
[0083] The displayed tasks belonging to the same upstream class name are determined as a class;
[0084] For any displayed task, according to the upstream task name corresponding to the displayed task, the corresponding target task is determined in all displayed tasks, and the displayed task is connected behind the target task.
[0085] For any displayed task in any class, according to the upstream task name corresponding to the displayed task, the corresponding target task is determined in all displayed tasks, and the displayed task is connected behind the target task.
[0086] In the embodiment, when the tasks are displayed, the nodes of the upstream tasks associated with the current task are displayed, so that the uppermost task of the corresponding task can be found in the displayed tasks. First, each displayed task is associated with the corresponding task class name and the upstream class name, for example, the upstream class name in the OpenBroadcastViewingRecord task is OpenBroadcastViewingRecord, the upstream class name in the OpenBroadcastViewingReport task is OpenBroadcastViewingRecord, the upstream class name in the OpenBroadcastViewingIndex task is OpenBroadcastViewingRecord, and the upstream class names in the OpenBroadcastViewingRecord, OpenBroadcastViewingReport and OpenBroadcastViewingIndex tasks are all OpenBroadcastViewingRecord. The OpenBroadcastViewingRecord, OpenBroadcastViewingReport and OpenBroadcastViewingIndex tasks have a corresponding association relationship, and the OpenBroadcastViewingRecord, OpenBroadcastViewingReport and OpenBroadcastViewingIndex tasks can be determined as a class of tasks. The tasks can be displayed according to the upstream and downstream relationship of the tasks and displayed in a task chain. For example, the upstream task of the OpenBroadcastViewingRecord is the OpenBroadcastViewingRecord, and the upstream tasks of the OpenBroadcastViewingReport and OpenBroadcastViewingIndex tasks are the OpenBroadcastViewingRecord task. When displayed, they are sequentially connected in series as OpenBroadcastViewingRecord, OpenBroadcastViewingRecord and the parallel OpenBroadcastViewingReport and OpenBroadcastViewingIndex, wherein the OpenBroadcastViewingReport and OpenBroadcastViewingIndex are in parallel, the OpenBroadcastViewingRecord task is connected to the rear end of the OpenBroadcastViewingRecord, and the OpenBroadcastViewingReport and OpenBroadcastViewingIndex are connected to the rear end of the OpenBroadcastViewingRecord task.
[0087] In the application, when all tasks are executed, two calling interfaces of all tasks are called to collect first parameter information and second parameter information. Each parameter information includes a current task name, an upstream task name and a current task state. For any task, if the current task name and the upstream task name in the first parameter information and the second parameter information of the task are the same, the target task state of the task is determined according to the current task state in the first parameter information and the second parameter information of the task. The corresponding task is displayed according to the target task state of each task. Different target task states correspond to different display results. For any displayed task, the corresponding target task is determined in all displayed tasks according to the upstream task name of the displayed task, and the displayed task is connected to the rear end of the target task. In the application, the execution state of the task is determined according to the display result of the different tasks, the position of the task with an exception can be accurately located, the data in the task can be quickly repaired, and the data repair efficiency is improved.
[0088] The task display method based on the data warehouse corresponding to the above embodiment, Figure 3A structural block diagram of a task display device based on a data warehouse provided by an embodiment of the present application is shown. The task display device based on a data warehouse is applied to the server. A user uploads task data to the server through a client, the server displays a corresponding task state according to corresponding task data, and stores the task data in a database connected to the server. The database can be one or more. For ease of illustration, only parts related to the embodiments of the present application are shown.
[0089] Referring to Figure 3 The task display device 30 includes:
[0090] An information collection module 31 is configured to collect two calling interfaces of all tasks to obtain first parameter information and second parameter information when all tasks are executed. Each parameter information includes a current task name, an upstream task name, and a current task state.
[0091] A state determination module 32 is configured to determine a target task state of a task according to a current task state in the first parameter information and the second parameter information of the task if the current task name and the upstream task name in the first parameter information and the second parameter information of the task are the same.
[0092] A task display module 33 is configured to display a corresponding task according to the target task state of each task. Different target task states correspond to different display results.
[0093] A task relationship display module 34 is configured to determine a corresponding target task among all displayed tasks according to the upstream task name of the displayed task, and connect the displayed task at the back end of the target task.
[0094] Optionally, the task display device 30 further includes:
[0095] A detection module is configured to detect whether a difference between sampling times in the first parameter information and the second parameter information of the task is less than a time threshold.
[0096] An execution module is configured to determine that the first parameter information and the second parameter information of the task are true if the detection module detects that the difference between the sampling times in the first parameter information and the second parameter information of the task is less than the time threshold, and execute a step of determining the target task state of the task according to the current task state in the first parameter information and the second parameter information of the task.
[0097] Optionally, the task display device 30 further includes:
[0098] An association module is configured to form an association relationship between each displayed task and a corresponding task class name and an upstream class name.
[0099] The determining module is configured to determine that the displayed tasks belonging to the same upstream class name are a class.
[0100] Optionally, the state determining module 32 comprises:
[0101] The connecting unit is configured to, for any displayed task in any class, determine a target task corresponding to the displayed task among all displayed tasks according to the upstream task name corresponding to the displayed task, and connect the displayed task at the back end of the target task.
[0102] Optionally, the state determining module 32 comprises:
[0103] The first judging unit is configured to, if the current task state in the first parameter information and the second parameter information of the task is complete, determine that the execution success state is the target task state of the task.
[0104] Optionally, the state determining module 32 comprises:
[0105] The second judging unit is configured to, if the current task state in the first parameter information and the second parameter information of the task includes at least one uncompleted, determine that the unexecution state is the target task state of the task.
[0106] Optionally, the state determining module 32 comprises:
[0107] The third judging unit is configured to, if the current task state in the first parameter information and the second parameter information of the task includes at least one execution failure, determine that the execution failure state is the target task state of the task.
[0108] Optionally, the task displaying module 33 comprises:
[0109] The displaying unit is configured to, for any task, if the target task state of the task is the execution failure state, display the task in a first display manner, if the target task state of the task is the execution success state, display the task in a second display manner, and if the target task state of the task is the unexecution state, display the task in a third display manner.
[0110] It should be noted that the information interaction, execution process and the like between the above modules are based on the same concept as the method embodiments of the present application, and the specific functions and the technical effects brought by the same can be referred to the method embodiments part, which will not be described here.
[0111] Figure 4 A structural schematic diagram of a terminal device provided in Embodiment Four of the present application is shown in FIG. 4. Figure 4 As shown in FIG. 4, the terminal device of this embodiment comprises at least one processor (CPU) 41, a memory 42, a communication interface 43, and a power supply 44. Figure 4The terminal device can include, but is not limited to, a processor, a memory, and a computer program stored in the memory and executable on the at least one processor, the processor implementing the steps of any of the above-mentioned various embodiments of the method for displaying a data warehouse-based task when executing the computer program.
[0112] The terminal device can include, but is not limited to, a processor, a memory, and a computer program stored in the memory and executable on the at least one processor, the processor implementing the steps of any of the above-mentioned various embodiments of the method for displaying a data warehouse-based task when executing the computer program. Figure 4 The terminal device is merely an example and does not constitute a limitation on the terminal device, and the terminal device can include more or fewer components than shown, or combine certain components, or include different components, for example, can also include a network interface, a display screen, an input device, and the like.
[0113] The processor can be a CPU, and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic components, discrete hardware components, etc. The general-purpose processor can be a microprocessor or can also be any conventional processor.
[0114] The memory includes a readable storage medium, an internal memory, etc., wherein the internal memory can be the memory of the terminal device, and the internal memory provides an environment for the operation of the operating system and the computer readable instructions in the readable storage medium. The readable storage medium can be the hard disk of the terminal device, and in other embodiments can also be the external storage device of the terminal device, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the memory can include both the internal storage unit of the terminal device and the external storage device. The memory is used to store the operating system, application programs, a boot loader, data, and other programs, such as program codes of computer programs, etc. The memory can also be used to temporarily store data that has been output or will be output.
[0115] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of software functional unit. In addition, the specific names of each functional unit and module are only for easy distinction, and do not limit the protection scope of the present application. The specific working process of the units and modules in the device can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here. If the integrated unit is realized in the form of software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware. The computer program can be stored in a computer readable storage medium. When the processor executes the computer program, the steps of the above-mentioned method embodiments can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable file or some intermediate form. The computer readable medium at least includes any entity or device capable of carrying computer program code, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium. For example, U disk, mobile hard disk, magnetic disk or optical disk, etc. In some jurisdictions, according to legislation and patent practice, computer readable medium cannot be electrical carrier signal and telecommunication signal.
[0116] The above-mentioned embodiment methods can also be completed by a computer program product, which, when running on a terminal device, enables the terminal device to execute the steps of the above-mentioned method embodiments.
[0117] In the above-mentioned embodiments, the description of each embodiment has its own emphasis, and the parts not described or recorded in detail in a certain embodiment can be referred to the relevant description of other embodiments.
[0118] Those skilled in the art can understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0119] In the embodiments provided in the present application, it should be understood that the disclosed apparatus / terminal device and method can be implemented by other ways. For example, the apparatus / terminal device embodiments described above are only schematic, and the division of the modules or units is only a logical function division, and there can be another division in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between the units can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or in other forms.
[0120] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e. can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.
[0121] The above embodiments are only used to illustrate the technical solutions of the present application, but not limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A method for task presentation based on a data warehouse, characterized in that, The data warehouse is configured with a calling interface at the beginning and the end of each task, and the task display method comprises: During the execution of all tasks, the two calling interfaces of all tasks are called to collect first parameter information and second parameter information, each of which comprises a current task name, an upstream task name and a current task state; For any task, if the current task name and the upstream task name in the first parameter information and the second parameter information of the task are the same, the target task state of the task is determined according to the current task state in the first parameter information and the second parameter information of the task; According to the target task state of each task, the corresponding task is displayed, wherein different target task states correspond to different display results; For any displayed task, the corresponding target task is determined among all displayed tasks according to the upstream task name corresponding to the displayed task, and the displayed task is connected at the back end of the target task.
2. The task presentation method according to claim 1, characterized by, Each parameter information further comprises a collection time, and before the target task state of the task is determined according to the current task state in the first parameter information and the second parameter information of the task, the following steps are further included: Detecting whether the difference between the sampling times in the first parameter information and the second parameter information of the task is less than a time threshold value; If it is detected that the difference between the sampling times in the first parameter information and the second parameter information of the task is less than the time threshold value, it is determined that the first parameter information and the second parameter information of the task are true, and the step of determining the target task state of the task according to the current task state in the first parameter information and the second parameter information of the task is executed.
3. The task presentation method according to claim 1, wherein Each parameter information further comprises a task class name and an upstream class name, and after the corresponding task is displayed according to the target task state of each task, the following steps are further included: An association relationship is formed between each displayed task and the corresponding task class name and upstream class name; The displayed tasks belonging to the same upstream class name are determined as a class; For any displayed task, the corresponding target task is determined among all displayed tasks according to the upstream task name corresponding to the displayed task, and the displayed task is connected at the back end of the target task, which comprises: For any displayed task in any class, the corresponding target task is determined among all displayed tasks according to the upstream task name corresponding to the displayed task, and the displayed task is connected at the back end of the target task.
4. The task presentation method according to claim 1, wherein Determining the target task state of the task according to the current task state in the first parameter information and the second parameter information of the task comprises: If the current task state in the first parameter information and the second parameter information of the task is complete, the execution success state is determined as the target task state of the task.
5. The task presentation method according to claim 1, wherein Determining the target task state of the task according to the current task state in the first parameter information and the second parameter information of the task comprises: If the current task state in the first parameter information and the second parameter information of the task comprises at least one uncompleted, the unexecution state is determined as the target task state of the task.
6. The task presentation method according to claim 1, wherein According to the current task state in the first parameter information and the second parameter information of the task, determining the target task state of the task comprises: If the current task state in the first parameter information and the second parameter information of the task comprises at least one execution failure, determining the execution failure state as the target task state of the task.
7. The task presentation method according to any one of claims 4 to 6, wherein, According to the target task state of each task, displaying the corresponding task comprises: For any task, if the target task state of the task is the execution failure state, displaying the task in a first display mode, if the target task state of the task is the execution success state, displaying the task in a second display mode, and if the target task state of the task is the unexecuted state, displaying the task in a third display mode.
8. A data warehouse based task presentation apparatus, characterized by, In the starting part and the ending part of any task in the data warehouse, a calling interface is configured, and the task display device comprises: An information collection module is configured to collect the two calling interfaces of all tasks when all tasks are executed to obtain the first parameter information and the second parameter information, each parameter information comprising a current task name, an upstream task name and a current task state; A state determination module is configured to, for any task, if the current task name and the upstream task name in the first parameter information and the second parameter information of the task are the same, determine the target task state of the task according to the current task state in the first parameter information and the second parameter information of the task; A task display module is configured to display the corresponding task according to the target task state of each task, wherein different target task states correspond to different display results; A task relationship display module is configured to, for any displayed task, determine the corresponding target task in all displayed tasks according to the upstream task name corresponding to the displayed task, and connect the displayed task at the back end of the target task.
9. A terminal device, comprising: The terminal device comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor implements the task display method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 9. The computer program is executed by the processor to implement the task display method of any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for parallel computing
CN104035747A
Test method and device
CN105786696A