CN117215791A - Task grade determining method, device, equipment and medium - Google Patents

Task grade determining method, device, equipment and medium Download PDF

Info

Publication number
CN117215791A
CN117215791A CN202311226444.2A CN202311226444A CN117215791A CN 117215791 A CN117215791 A CN 117215791A CN 202311226444 A CN202311226444 A CN 202311226444A CN 117215791 A CN117215791 A CN 117215791A
Authority
CN
China
Prior art keywords
task
level
relation
node
service
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.)
Pending
Application number
CN202311226444.2A
Other languages
Chinese (zh)
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.)
Hangzhou Netease Zaigu Technology Co Ltd
Original Assignee
Hangzhou Netease Zaigu 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 Hangzhou Netease Zaigu Technology Co Ltd filed Critical Hangzhou Netease Zaigu Technology Co Ltd
Priority to CN202311226444.2A priority Critical patent/CN117215791A/en
Publication of CN117215791A publication Critical patent/CN117215791A/en
Pending legal-status Critical Current

Links

Abstract

The embodiment of the application provides a task grade determining method, device, equipment and medium, and relates to the technical field of computers. According to the method, the link relation can be acquired firstly, and the relation among the data table, the tasks and the application services is represented by the link relation, so that for the detected target application service, a first task at the upstream of the link relation can be determined, the first task level is updated based on the target application service, and a second task level at the upstream of the target application service is updated based on the first task level, so that the task level of each task in the link relation is determined on the basis of the target application service, the task level is not required to be marked and modified manually, task level self-adaption can be realized, and the task level determining efficiency is improved.

Description

Task grade determining method, device, equipment and medium
Technical Field
Embodiments of the present application relate to the field of computer technology, and more particularly, to a task level determination method, a task level determination device, an electronic apparatus, and a computer-readable storage medium.
Background
With the continuous development of computer technology, the number and variety of online application services facing users have also exponentially increased, and in order to process (e.g., read, synchronize, rewrite, etc.) data related to online application services, related technologies create a variety of tasks (e.g., synchronization tasks, real-time tasks, offline tasks, etc.), and trigger a computer to execute these tasks.
In order to more efficiently meet the demands of users, different tasks are usually marked with priorities manually and the priorities of the tasks are adaptively modified according to the change of actual demands, so that a computer processes emergency tasks firstly and processes common tasks afterwards based on the marked priorities.
However, this way of determining the task level has a problem of low efficiency.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the application and therefore does not constitute information in the form of prior art that is already known to those of ordinary skill in the art.
Disclosure of Invention
Based on the above problems, the present application provides a task level determining method, a task level determining device, an electronic device, and a computer readable storage medium, where a link relationship may be obtained first, and since the link relationship characterizes a relationship among a data table, a task, and an application service, a first task upstream of the link relationship may be determined from the link relationship for a detected target application service, and the first task level may be updated based on the target application service, and a second task level upstream may be updated based on the first task level, so that task levels of tasks in the link relationship may be determined based on the target application service, without manually marking and modifying task levels, task level adaptation may be implemented, and efficiency of determining task levels may be improved.
According to a first aspect of an embodiment of the present application, a task level determination method is disclosed, including:
acquiring a link relation used for representing the relation among a data table, tasks and application services;
determining a first task at the upstream of the target application service according to the link relation, and updating the first task level of the first task based on the target service level corresponding to the target application service;
and determining a second task upstream of the first task according to the link relation, and updating the second task level of the second task based on the first task level until each task in the link relation is traversed to obtain a first level updating result.
In one embodiment, based on the foregoing scheme, further comprising:
constructing a node association model comprising node types and node relations; the node types comprise a production service node, a file node, a task node, a user node, a data table node, a query platform node and an application service node; the node relation comprises an input relation, an output relation, a subordinate relation, a process dependency relation, a data set dependency relation and a query relation;
based on the node association model, link relations for representing relations among the data table, the tasks and the application services are constructed.
In one embodiment, based on the foregoing scheme, the link relationships include a production link relationship and an application link relationship, and based on the node association model, constructing the link relationships for characterizing the relationships among the data table, the task, and the application service includes:
constructing a production link relation according to the production service node, the file node, the task node, the user node, the data table node, the input relation, the output relation, the subordinate relation, the process dependency relation and the data set dependency relation;
and constructing an application link relation according to the data table node, the query platform node, the application service node, the input relation and the query relation.
In one embodiment, based on the foregoing scheme, determining the first task upstream of the target application service according to the link relationship includes:
determining a first task of the upstream of the target application service according to the production link relation and the application link relation;
and determining a second task upstream of the first task according to the link relationship, comprising:
a second task upstream of the first task is determined from the production link relationship.
In one embodiment, based on the foregoing scheme, determining the first task upstream of the target application service according to the link relationship includes:
Determining a target data table directly accessed by the target application service according to the link relation;
a first task for generating a target data table and serving upstream for a target application is determined from the link relationship.
In one embodiment, based on the foregoing solution, updating the first task level of the first task based on the target service level corresponding to the target application service includes:
determining a target service level corresponding to the target application service from a preset service level table;
and assigning the identifier of the target service level to the first task level of the first task to realize updating of the first task level.
In one embodiment, based on the foregoing scheme, updating the second task level of the second task based on the first task level includes:
determining each downstream task adjacent to and downstream from the second task; wherein each downstream task comprises a first task;
and updating the second task level of the second task based on the first task level and the task levels corresponding to other tasks except the first task in each downstream task.
In one embodiment, based on the foregoing solution, updating the second task level of the second task based on the first task level and task levels corresponding to other tasks in each downstream task than the first task, respectively, includes:
Determining the highest grade in the downstream task grade set corresponding to the second task; the downstream task level set comprises a first task level and task levels corresponding to other tasks except the first task in each downstream task respectively;
the highest-level identifier is assigned to a second task level of the second task to effect an update to the second task level.
In one embodiment, based on the foregoing scheme, further comprising:
according to the task traversing sequence of the previous round of updating process, updating each task again to obtain a second level updating result;
if the second-level updating result is consistent with the first-level updating result, ending the updating process, otherwise, entering a new round of updating process.
In one embodiment, based on the foregoing scheme, further comprising:
storing the first level update results in a database;
and in response to the historical update result review operation, reading the first-level update result from the database.
In one embodiment, based on the foregoing scheme, further comprising:
and updating the link relation according to the target application service, wherein the updated link relation contains the target application service.
According to a second aspect of an embodiment of the present application, there is disclosed a task class determination device including:
The link relation acquisition unit is used for acquiring a link relation used for representing the relation among the data table, the task and the application service;
the first level updating unit is used for determining a first task at the upstream of the target application service according to the link relation and updating the first task level of the first task based on the target service level corresponding to the target application service;
and the second level updating unit is used for determining a second task at the upstream of the first task according to the link relation, and updating the second task level of the second task based on the first task level until each task in the link relation is traversed so as to obtain a first level updating result.
In one embodiment, based on the foregoing scheme, further comprising:
the model construction subunit is used for constructing a node association model containing node types and node relations; the node types comprise a production service node, a file node, a task node, a user node, a data table node, a query platform node and an application service node; the node relation comprises an input relation, an output relation, a subordinate relation, a process dependency relation, a data set dependency relation and a query relation;
and the link relation construction subunit is used for constructing a link relation for representing the relation among the data table, the task and the application service based on the node association model.
In one embodiment, based on the foregoing solution, the link relationship includes a production link relationship and an application link relationship, and the link relationship construction subunit constructs, based on the node association model, a link relationship for characterizing a relationship among the data table, the task, and the application service, including:
the link relation construction subunit is used for constructing a production link relation according to the production service node, the file node, the task node, the user node, the data table node, the input relation, the output relation, the subordinate relation, the process dependency relation and the data set dependency relation;
and the link relation construction subunit is used for constructing the application link relation according to the data table node, the query platform node, the application service node, the input relation and the query relation.
In one embodiment, based on the foregoing solution, the first level updating unit determines a first task upstream of the target application service according to the link relation, including:
the first level updating unit determines a first task upstream of the target application service according to the production link relation and the application link relation;
and the second level updating unit determines a second task upstream of the first task according to the link relation, and comprises the following steps:
The second level updating unit determines a second task upstream of the first task according to the production link relation.
In one embodiment, based on the foregoing solution, the first level updating unit determines a first task upstream of the target application service according to the link relation, including:
a data table determining subunit, configured to determine a target data table directly accessed by the target application service according to the link relationship;
and the first task determination subunit is used for determining a first task which is used for generating the target data table and serves the upstream for the target application according to the link relation.
In one embodiment, based on the foregoing solution, the first level updating unit updates the first task level of the first task based on a target service level corresponding to the target application service, including:
the service level inquiry subunit is used for determining a target service level corresponding to the target application service from a preset service level table;
and the first level updating subunit is used for assigning the identifier of the target service level to the first task level of the first task so as to realize updating of the first task level.
In one embodiment, based on the foregoing scheme, the second level updating unit updates the second task level of the second task based on the first task level, including:
A second task determination subunit configured to determine each downstream task adjacent to and downstream from the second task; wherein each downstream task comprises a first task;
and the second level updating subunit is used for updating the second task level of the second task based on the first task level and the task levels corresponding to other tasks except the first task in each downstream task.
In one embodiment, based on the foregoing solution, the second level updating subunit updates the second task level of the second task based on the first task level and task levels corresponding to other tasks in each downstream task, except for the first task, respectively, including:
determining the highest grade in the downstream task grade set corresponding to the second task; the downstream task level set comprises a first task level and task levels corresponding to other tasks except the first task in each downstream task respectively;
the highest-level identifier is assigned to a second task level of the second task to effect an update to the second task level.
In one embodiment, based on the foregoing scheme, further comprising:
the third-level updating unit is used for updating each task again according to the task traversing sequence of the previous updating process to obtain a second-level updating result; if the second-level updating result is consistent with the first-level updating result, ending the updating process, otherwise, entering a new round of updating process.
In one embodiment, based on the foregoing scheme, further comprising:
an update result storage unit for storing the first-level update result in a database;
and the back check operation response unit is used for responding to the history update result back check operation and reading the first-level update result from the database.
In one embodiment, based on the foregoing scheme, further comprising:
and the link relation updating unit is used for updating the link relation according to the target application service, wherein the updated link relation contains the target application service.
According to a third aspect of an embodiment of the present application, there is disclosed an electronic apparatus including: a processor; and a memory having stored thereon computer readable instructions which, when executed by the processor, implement the task level determination method as disclosed in the first aspect.
According to a fourth aspect of an embodiment of the present application, there is disclosed a computer program medium having computer readable instructions stored thereon, which when executed by a processor of a computer, cause the computer to perform the task level determination method disclosed according to the first aspect of the present application.
According to the embodiment of the application, the link relation can be acquired firstly, and the link relation characterizes the relation among the data table, the tasks and the application services, so that the first task at the upstream of the link relation can be determined from the detected target application service, the first task grade is updated based on the target application service, and the second task grade at the upstream is updated based on the first task grade, so that the task grade of each task in the link relation is determined based on the target application service, the task grade is not required to be marked and modified manually, the task grade self-adaption can be realized, and the efficiency of determining the task grade is improved. In addition, the task grade can be automatically determined, so that the problems of low accuracy, low updating efficiency, missed marking and the like of manual marking can be avoided.
Other features and advantages of the application will be apparent from the following detailed description, or may be learned by the practice of the application.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present application will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. Several embodiments of the present application are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
FIG. 1 is a flow chart diagram illustrating a task level determination method according to an example embodiment of the application;
FIG. 2 is a schematic diagram illustrating the structure of a node association model according to an example embodiment of the application;
FIG. 3 is a diagram illustrating a link relationship according to an example embodiment of the present application;
FIG. 4 is a schematic diagram of a production link relationship and an application link relationship according to an example embodiment of the application;
FIG. 5 is a schematic diagram of a link relationship according to another example embodiment of the application;
FIG. 6 is a schematic diagram of a link relationship according to yet another example embodiment of the present application;
FIG. 7 is a flow chart diagram illustrating a task level determination method according to another example embodiment of the application;
FIG. 8 is a block diagram illustrating a task level determination device according to an example embodiment of the present application;
fig. 9 is a block diagram showing a construction of a task level determination device according to another alternative exemplary embodiment of the present application.
In the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
Detailed Description
The principles and spirit of the present application will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are presented merely to enable those skilled in the art to better understand and practice the application and are not intended to limit the scope of the application in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the application to those skilled in the art.
It will be appreciated by those skilled in the art that embodiments of the present application may be implemented as an apparatus, device, method or computer program product. Thus, the application may be embodied in the form of: complete hardware, complete software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
According to an embodiment of the present application, a task level determination method, a task level determination device, an electronic apparatus, and a computer-readable storage medium are provided.
Any number of elements in the figures are for illustration and not limitation, and any naming is used for distinction only and not for any limiting sense.
The principles and spirit of the present application are explained in detail below with reference to several representative embodiments thereof.
Summary of The Invention
In the related art, it is often necessary to manually mark the level of a task to be performed by a computer. However, the number of tasks to be executed by the computer is large, and the problems of low accuracy, low updating efficiency, missed labeling and the like exist through manually labeling the task level.
In order to solve the problem, the application provides a task level self-adapting mode, which can acquire the link relation firstly, and because the link relation characterizes the relation among the data table, the tasks and the application service, the application can determine the first task at the upstream of the link relation from the detected target application service, update the first task level based on the target application service and update the second task level at the upstream based on the first task level, thereby determining the task level of each task in the link relation based on the target application service without manually marking and modifying the task level, realizing task level self-adapting and improving the efficiency of determining the task level. In addition, the task grade can be automatically determined, so that the problems of low accuracy, low updating efficiency, missed marking and the like of manual marking can be avoided.
Application scene overview
It should be noted that the following application scenarios are only shown for facilitating understanding of the spirit and principles of the present application, and embodiments of the present application are not limited in this respect. Rather, embodiments of the application may be applied to any scenario where applicable.
The method is used in platforms requiring multi-stage task calculation, such as a data report platform, an algorithm characteristic platform, a data gateway platform and the like. It is often desirable to rank tasks so that a computer can prioritize different tasks so that the computer tasks can be efficiently performed, making full use of computing resources. The application considers that although the variety of the tasks has diversified characteristics, the execution sequence relationship exists among the tasks, so that a link relationship can be constructed to represent the relationship among the data table, the tasks and the application services, when a target application service is detected, the first task (the first task is an upstream node relative to the target application service) at the most downstream related to the target application service can be determined based on the existing link relationship, and then the grade of the first task is updated based on the grade of the target application service, and then the grade of each task is updated step by step upwards according to the task sequence defined by the link relationship, thereby realizing the self-adaption of the grade of the tasks, and avoiding the problems of low accuracy, low updating efficiency, missed marking and the like existing in manual marking.
Exemplary method
A task level determination method according to an exemplary embodiment of the present application will be described below with reference to fig. 1 to 7 in conjunction with the above application scenario.
Referring to fig. 1, fig. 1 is a flowchart illustrating a task level determination method according to an exemplary embodiment of the present application, where the task level determination method may be implemented by a server or a terminal device.
As shown in fig. 1, a task level determination method according to an embodiment of the present application includes: step S110 to step S130.
Step S110: a link relationship is obtained that characterizes the relationship between the data table, the task, and the application service.
Step S120: and determining a first task at the upstream of the target application service according to the link relation, and updating the first task level of the first task based on the target service level corresponding to the target application service.
Step S130: and determining a second task upstream of the first task according to the link relation, and updating the second task level of the second task based on the first task level until each task in the link relation is traversed to obtain a first level updating result.
By implementing the task level determining method shown in fig. 1, a link relation can be obtained first, and because the link relation characterizes the relation among a data table, tasks and application services, for a detected target application service, a first task at the upstream of the link relation can be determined, the first task level is updated based on the target application service, and a second task level at the upstream is updated based on the first task level, so that the task level of each task in the link relation is determined based on the target application service, task level adaptation can be realized without manually marking and modifying the task level, and the task level determining efficiency is improved. In addition, the task grade can be automatically determined, so that the problems of low accuracy, low updating efficiency, missed marking and the like of manual marking can be avoided.
These steps are described in detail below.
In order to automatically determine the level of a massive task and avoid the defect of manually marking the task level, the application can execute an alternative embodiment, which comprises:
constructing a node association model comprising node types and node relations; the node types comprise a production service node, a file node, a task node, a user node, a data table node, a query platform node and an application service node; the node relation comprises an input relation, an output relation, a subordinate relation, a process dependency relation, a data set dependency relation and a query relation; based on the node association model, link relations for representing relations among the data table, the tasks and the application services are constructed.
In particular, the storage objects can be abstracted into nodes, node relationships are abstracted into edges, the nodes and the edges form a node association model, and the node association model describes the relationships among the storage objects from the abstract level. Wherein the storage object may include, but is not limited to: production services, files, tasks, users, data sheets, queries, and application services.
After the node association model is built, the node association model may be stored in a graph database for ready recall. Wherein the graph database refers to a type of non-relational (e.g., neo4j, orientDB, arangoDB, etc.) that stores relationships between entities and supports semantic queries based on graph structures.
In addition, the node association model includes a plurality of nodes, different nodes may correspond to different node types or may correspond to the same node type, and node relationships may or may not exist between different nodes.
Furthermore, based on the node association model of the abstract level, the link relation can be constructed for the data table, the task and the application service in actual production. The link relationship and node association model differ in: the link relation describes the relation among concrete data table, concrete task and concrete application service, and the node association model describes the relation among abstract data table, abstract task and abstract application service. The abstract task refers to an abstract storage object of the task, and the specific task refers to a task with practical significance such as a log acquisition task, a log synchronization task, an offline scheduling task and the like.
Referring to fig. 2, fig. 2 is a schematic diagram illustrating a node association model according to an exemplary embodiment of the present application. As shown in fig. 2, the node association model may include, but is not limited to: a parent Node (Node) 210, a User Node 220, a data set abstraction (Dataset) 230, a Task abstraction (Process) 240, a data Table (Table) Node 250, a File (File) Node 260, a Task (Task) Node 270, a production Service (Service) Node 280, a Query platform (Query) Node 290, and an application Service (Query) Node 200.
Illustratively, a parent Node (Node) 210 is used to characterize the Node association model in its entirety, the parent Node (Node) 210 containing common attributes for all nodes in the Node association model. The fields of the common attributes include: "+id: string "," +released: string "," +labes: set "," +properties: map ", etc. Among these, a User Node 220, an abstract (Dataset) 230 of a data set, and an abstract (Process) 240 of a task are child nodes subordinate to a parent Node (Node) 210.
Among other things, user nodes 220 are abstractions of manager identification for abstractions (datasets) 230 of data sets and/or abstractions (processes) 240 of tasks, for example. Both the abstraction (Dataset) 230 of the data set and the abstraction (Process) 240 of the task are subordinate TO the User node 220 (BELONG_TO). The fields corresponding to the User node 220 are: "+name: string "," +email: string).
Among these, the abstract (Dataset) 230 of a data set is illustratively an abstract integration concept for a Table (Table) node 250, a File (File) node 260. The abstract (Dataset) 230 corresponding fields of the Dataset are: "+inputby", "+outputby", "+dependnon", "+dependbyb", "+belong To". There is an INPUT relationship (INPUT) between the abstraction of data set (Dataset) 230 and the abstraction of task (Process) 240, and the output of the abstraction of data set (Dataset) 230 is the INPUT of the abstraction of task (Process) 240. In addition, the abstraction of data sets (Dataset) 230 characterizes the existence of data set dependencies (dataset_DEPEND_ON) between different data sets.
Among these, the abstract (Process) 240 of a Task is illustratively an abstract integrated concept for Task (Task) node 270, production Service (Service) node 280, query platform (Query) node 290, application Service (Query) node 20. The abstract (Process) 240 of the task corresponds to the fields: "+inputby", "+outputby", "+dependnon", "+dependbyb", "+belong To". There is an OUTPUT relation (OUTPUT) between the abstraction of data set (Dataset) 230 and the abstraction of task (Process) 240, the OUTPUT of the abstraction of task (Process) 240 being the input of the abstraction of data set (Dataset) 230. In addition, the abstraction of tasks (Process) 240 characterizes the existence of Process dependencies (process_DEPEND_ON) between different tasks.
The data Table (Table) node 25 may be understood as a data set (Dataset), for example. The fields corresponding to the Table node 250 are: "+name: string "," +comment: string "," +columnrel: set).
The File node 260 may be understood as a data set (Dataset), for example. The fields corresponding to the File node 260 are: "+name: string "," +path: string).
The Task node 270 may be understood as a Process, for example. The fields corresponding to Task (Task) node 270 are: "+ application name: string "," +taskname: string "," +taskId: string "," +task Belong To "," +innertask ".
The production Service (Service) node 280 may also be understood as a Process, for example. The fields corresponding to the production Service (Service) node 280 are: "+name: string "," +tcode: string "," +product code: string).
Illustratively, a Query platform (Query) node 290 may also be understood as a Process. The fields corresponding to Query platform (Query) node 290 are: "+name: string "," +code: string "," +tablename: string "," +tabletype: string). Among them, a Query relationship (query_by) is between the Query platform (Query) node 290 and the application service (Query service) node 200, and the Query platform (Query) node 290 is configured to respond to a request of the application service (Query service) node 200 described below.
The application service (query) node 200 may be understood as a Process, for example. The fields corresponding to the application service (query service) node 200 are: "+name: string "," +tcode: string "," +product code: string).
It can be seen that, by implementing the alternative embodiment, a node association model for representing the node abstract relationship can be constructed, and the link relationship can be constructed more efficiently and accurately based on the node association model.
In step S110, a link relationship for characterizing a relationship among a data table, a task, and an application service is acquired.
In particular, a link relationship may be understood as a data blood relationship, specifically describing the following process: after the original data is generated from the service system, the original data is stored in a storage medium through processes of platform synchronous task extraction, conversion, cleaning and the like, an operation data layer is formed through loading, merging and the like, the operation data layer is processed and arranged through data development to form subsequent data warehouse layers, and finally the data is used by application services through query services such as a data gateway, data analysis, a data report and the like. When the target application service is detected, the data generation process can be reversely deduced from the target application service through the link relation.
The link relationships stored in the database may be one or more, and embodiments of the present application are not limited. Also, each link relationship may correspond to one or more branches, i.e., the link relationship may be represented as a branch link result, or as a single link structure or other structure. In addition, the data table is used for recording multi-dimensional data, the task is used for instructing the computer to trigger the execution of a specific instance, and the application service can be a terminal service provided for a user. At least one data table exists in the link relationships and is related to the target application service, it may be understood that the data table related to the target application service may exist in multiple link relationships at the same time or may exist in only one link relationship, and thus, the number of the link relationships mentioned in step S110 may be one or more, which is not limited by the embodiment of the present application.
For example, referring to fig. 3, fig. 3 shows a schematic diagram of a link relationship according to an exemplary embodiment of the present application. As shown in fig. 3, one possible link relation representation generated based on the node association model may specifically include: an application Service (Query Service 1) 300, a Query platform (Query) 310, a Hive table (Tb 3) 321, an offline scheduling task (Tk 3) 322, a user (user 3) 323, a Hive source library table (Tb 2) 331, a log synchronization task (Tk 2) 332, a user (user 2) 333, a Kafka table (Tb 1) 341, a log collection task (Tk 1) 342, a user (user 1) 343, a log File (File 1) 350, and a production Service (Service 1) 360. Where Hive refers to a data table type, a data structure also created on a distributed file system for storing and managing structured data. Kafka refers to a data table type as well as a distributed data storage mode for extracting and processing stream data in real time.
In addition, user (user 3) 323, user (user 2) 333, user (user 1) 343 are nodes for managing their respective tasks and data tables.
Wherein, a Query relationship (query_by) is between the application service (Query service 1) 300 and the Query platform (Query) 310; an INPUT relationship (INPUT) is between the Query platform (Query) 310 and the Hive table (Tb 3) 321; an OUTPUT relation (OUTPUT) is formed between the Hive table (Tb 3) 321 and the offline scheduling task (Tk 3) 322; the user (user 3) 323 is in a subordinate relationship (BELONG_TO) with the Hive table (Tb 3) 321 and the offline scheduling task (Tk 3) 322; between Hive table (Tb 3) 321 and Hive source library table (Tb 2) 331 is a DATASET dependency (DATASET_DEPEND_ON); a PROCESS dependency relationship (process_delete_on) is defined between the offline scheduling task (Tk 3) 322 and the log synchronization task (Tk 2) 332; OUTPUT relation (OUTPUT) is between Hive source library table (Tb 2) 331 and log sync task (Tk 2) 332; the user (user 2) 333 and the Hive source library table (Tb 2) 331, the log sync task (Tk 2) 332 are affiliations (BELONG_TO); an INPUT relationship (INPUT) is between Kafka table (Tb 1) 341 and log sync task (Tk 2) 332; between Hive source library table (Tb 2) 331 and Kafka table (Tb 1) 341 is a DATASET dependency (DATASET_DEPEND_ON); a PROCESS dependency relationship (process_device_on) is formed between the log synchronization task (Tk 2) 332 and the log collection task (Tk 1) 342; the user (user 1) 343, the Kafka table (Tb 1) 341, and the log collection task (Tk 1) 342 are the affiliations (belong_to); an OUTPUT relationship (OUTPUT) is between the Kafka table (Tb 1) 341 and the log collection task (Tk 1) 342; between Kafka table (Tb 1) 341 and log File (File 1) 350 is a data set dependency (dataset_depend_on); an INPUT relationship (INPUT) is between the log File (File 1) 350 and the log acquisition task (Tk 1) 342; the log File (File 1) 350 and the production Service (Service 1) 360 are OUTPUT relationships (OUTPUT).
Wherein the PROCESS dependency (process_DEPEND_ON) characterizes that the execution of one task needs to DEPEND ON another task; the DATASET dependency (dataset_depend_on) characterizes the requirement to generate one DATASET as another DATASET.
Further, as an alternative embodiment, the link relationships include a production link relationship and an application link relationship, and constructing the link relationships for characterizing the relationships among the data table, the task and the application service based on the node association model includes: constructing a production link relation according to the production service node, the file node, the task node, the user node, the data table node, the input relation, the output relation, the subordinate relation, the process dependency relation and the data set dependency relation; and constructing an application link relation according to the data table node, the query platform node, the application service node, the input relation and the query relation.
In particular, referring to fig. 4 on the basis of fig. 3, fig. 4 shows a schematic diagram of a production link relationship and an application link relationship according to an exemplary embodiment of the present application.
As shown in fig. 4, the production link relationships constructed according to the production service node, the file node, the task node, the user node, the data table node, and the input relationship, the output relationship, the subordinate relationship, the process dependency relationship, and the data set dependency relationship may include: an application Service (Query Service 1) 400, a Query platform (Query) 410, a Hive table (Tb 3) 421, an offline scheduling task (Tk 3) 422, a user (user 3) 423, a Hive source library table (Tb 2) 431, a log synchronization task (Tk 2) 432, a user (user 2) 433, a Kafka table (Tb 1) 441, a log collection task (Tk 1) 442, a user (user 1) 443, a log File (File 1) 450, and a production Service (Service 1) 460.
As shown in fig. 4, according to the data table node, the query platform node, the application service node, and the input relationship, the query relationship, the constructed application link relationship may include: an application service (Query service 1) 400, a Query platform (Query) 410, a Hive table (Tb 3) 421.
It can be understood that the node included in the production link relationship and the application link relationship is Hive table (Tb 3) 421, so that the short-chain application link relationship is based on determining Hive table (Tb 3) 421 first, and then determining the production link relationship including Hive table (Tb 3) 421, thereby improving the link relationship acquisition efficiency. In addition, with respect to the relationships between the nodes in the production link relationship and the application link relationship, please refer to fig. 3, which is not described herein.
It can be seen that by implementing this alternative embodiment, the link relationship may be refined into the production link relationship and the application link relationship, and in the subsequent step, the data table is determined based on the refined application link relationship, and then the production link relationship including the data table is determined, so that it is beneficial to more efficiently implement the determination of the task level.
In step S120, a first task upstream of the target application service is determined according to the link relationship, and a first task level of the first task is updated based on the target service level corresponding to the target application service.
Specifically, the target application service may be a service provided for a user, for example, an ordering service, an inventory center service, an ordering lottery service, a tag management service, a check-in service, a new drawing service, a database alarm service, a quality management platform, and the like, which is not limited in the embodiment of the present application.
And, the target service level corresponding to the target application service may be preset, and the target service level may be used to identify the importance of the target application service, for example, the service level may be classified into 4 classes: the service level P0, which is most important for indicating that the core link is not degradable, the service level P1, which is second important for indicating that the core link is degradable, the service level P2, which is third important, and the service level P3, which is fourth important for indicating that the core link is not degradable, are sequentially reduced in importance from P0 to P3, where importance can also be understood as priority; the target service level corresponding to the target application service is stored in a metadata management platform or other similar platforms for being called at any time.
In addition, the representation manner (such as a character string, a numerical value, a letter, etc.) of the first task level of the first task may be the same as or different from the target service level corresponding to the target application service, which is not limited by the embodiment of the present application. The first task level before updating may be an unfractionated state or a classified state, the present application is not limited to the current task level updating procedure, the first task level updating may be an nth task level updating, and N is a positive integer.
As an alternative embodiment of step S120, determining the first task upstream of the target application service according to the link relation includes:
step S1201: determining a target data table directly accessed by the target application service according to the link relation;
step S1202: a first task for generating a target data table and serving upstream for a target application is determined from the link relationship.
In particular, referring to fig. 5, fig. 5 shows a schematic diagram of a link relationship according to another exemplary embodiment of the present application. As shown in fig. 5, one possible link relation representation generated based on the node association model may specifically include: application Service (QueryService 1) 501, application Service (QueryService 2) 502, application Service (QueryService 3) 503, query platform (Query) 510, hive table (Tb 3) 521, offline scheduling task (Tk 3) 522, user (user 3) 523, hive source library table (Tb 2) 531, log synchronization task (Tk 2) 532, user (user 2) 533, kafka table (Tb 1) 541, log collection task (Tk 1) 542, user (user 1) 543, log File (File 1) 550, production Service (Service 1) 560.
If the target application service is application service (QUERY service 1) 501/application service (QUERY service 2) 502/application service (QUERY service 3) 503, according to the link relationship shown in fig. 5, it may be determined that the target data table directly accessed BY the application service (QUERY service 1) 501 through the QUERY platform (QUERY) 510 is a Hive table (Tb 3) 521, and the first task for generating the target data table and upstream of the target application service is an offline scheduling task (Tk 3) 522 according to the QUERY relationship (query_by).
Therefore, by implementing the alternative embodiment, the target data table directly accessed by the target application service can be determined first, and then the first task at the upstream of the target application service is determined reversely according to the link sequence, so that the subsequent updating of the first task level based on the target service level is facilitated, and the automatic determination of the task level flow is realized.
As an alternative embodiment of step S120, updating the first task level of the first task based on the target service level corresponding to the target application service includes:
step S1203: determining a target service level corresponding to the target application service from a preset service level table;
step S1204: and assigning the identifier of the target service level to the first task level of the first task to realize updating of the first task level.
Based on fig. 5, if the target application service is an application service (query service 1) 501, the identifier of the target service level corresponding to the target application service determined from the preset service level table is P0. Further, the identifier P0 of the target service level may be assigned to the first task level of the first task such that the first task level=p0 to enable updating of the first task level.
If the target application service is the application service (query service 2) 502, the identifier of the target service class corresponding to the target application service determined from the preset service class table is P1. Further, the identifier P1 of the target service level may be assigned to the first task level of the first task such that the first task level=p1 to enable updating of the first task level.
If the target application service is the application service (query service 3) 503, the identifier of the target service class corresponding to the target application service determined from the preset service class table is P2. Further, the identifier P2 of the target service level may be assigned to the first task level of the first task such that the first task level=p2 to enable updating of the first task level.
Specifically, the preset service level table may be used to store service levels corresponding to respective application services, where the target application service is any application service of the respective application services. The application can be applied to various scenes, so that the number of the preset service level tables can be also multiple, and different preset service level tables correspond to different application scenes.
For example, the preset service level table a corresponding to the e-commerce scenario includes: an order placing service corresponding to the service level P0, an inventory center service corresponding to the service level P0, an order lottery service corresponding to the service level P1, a tag management service corresponding to the service level P1, a check-in service corresponding to the service level P2, a pull-up service corresponding to the service level P2, a database alarm service corresponding to the service level P3, a quality management platform corresponding to the service level P3, and the like. And, the preset service level table a corresponding to the transaction scenario includes: a deposit and withdrawal service corresponding to the service level P0, a general ledger service corresponding to the service level P0, a loan service corresponding to the service level P1, a resource management service corresponding to the service level P1, an image service corresponding to the service level P2, a micro-loan service corresponding to the service level P2, a report service corresponding to the service level P3, a credit improvement service corresponding to the service level P3, and the like. And, the preset service level table a corresponding to the scenic spot management scene includes: ticket service corresponding to service level P0, gate service corresponding to service level P0, reservation service corresponding to service level P1, early warning management service corresponding to service level P1, parking service corresponding to service level P2, tour service corresponding to service level P2, marketing service corresponding to service level P3, public opinion service corresponding to service level P3, and the like.
It can be seen that, by implementing this alternative embodiment, the identifier of the target service level may be assigned to the first task level, so as to implement task level update based on the target application service, which may save labor cost and improve efficiency of task level determination and update.
In step S130, a second task upstream of the first task is determined according to the link relationship, and a second task level of the second task is updated based on the first task level until each task in the link relationship is traversed to obtain a first level update result.
Specifically, continuing to participate in fig. 5, taking as an example that the target application service is an application service (query service 1) 501. A second task (log sync task (Tk 2) 532) upstream of the first task (offline scheduled task (Tk 3) 522) can be determined from the link relationship and an identifier P0 of the first task level is assigned to the second task level of the second task such that the second task level = P0. Further, a third task (log collecting task (Tk 1) 542) upstream of the second task (log synchronizing task (Tk 2) 532) is determined based on the link relation, and the identifier P0 of the second task class is assigned to the third task class of the third task such that the third task class=p0. In the link relationship shown in fig. 5, the third task is the last task, i.e., there is no upstream task corresponding to the third task. It can be determined that the traversal of the link relationship is completed, thereby obtaining a first level update result: first task level=p0, second task level=p0, third task level=p0.
The traversal mode (such as breadth first traversal mode (BFS)) adopted by each task in the traversal link relationship is arbitrarily set based on the actual requirement, which is not limited by the embodiment of the present application. The BFS is used for starting from a node which is not traversed in the link relation, traversing the adjacent node of the node, and traversing the next adjacent node of each adjacent node in turn.
As an alternative embodiment of step S120, determining the first task upstream of the target application service according to the link relation includes:
determining a first task of the upstream of the target application service according to the production link relation and the application link relation;
and, as an alternative embodiment of step S130, determining a second task upstream of the first task according to the link relationship, including:
a second task upstream of the first task is determined from the production link relationship.
The plurality of upstream tasks such as a third task upstream of the second task, a fourth task upstream of the third task and the like can be determined by the production link relation.
It can be seen that implementing the alternative embodiment, the first task may be determined by the production link relationship and the application link relationship, and then the second task may be determined by the production link relationship, which may be beneficial to improving the efficiency of determining the task level subsequently.
As an alternative embodiment of step S130, updating the second task level of the second task based on the first task level includes:
step S1301: determining each downstream task adjacent to and downstream from the second task; wherein each downstream task comprises a first task;
step S1302: and updating the second task level of the second task based on the first task level and the task levels corresponding to other tasks except the first task in each downstream task.
In particular, referring to fig. 6, fig. 6 shows a schematic diagram of a link relationship according to a further example embodiment of the application. Fig. 6 is a simplified diagram for a link relationship in which the drawing of a portion of the data table, file, user, production service, etc. nodes is omitted. The link relationships shown in fig. 6 include: application service (Query service 1) 611, application service (Query service 2) 612, query platform 1 (Query 1) 621, query platform 2 (Query 2) 622, tb1 (data table) 631, tb2 (data table) 632, tk5 (task) 640, tk6 (task) 650, tk4 (task) 660, tk3 (task) 670, tk2 (task) 680, tk1 (task) 690. Here, the service level=p0 corresponding to the application service (query service 1) 611, the service level=p1 corresponding to the application service (query service 2) 612, and the priority/importance of the application service (query service 1) 611 is higher than that of the application service (query service 2) 612.
At this time, tk5 (task) 640=ungraded; tk6 (task) 650 = ungraded; tk4 (task) 660 = ungraded; tk3 (task) 670 = ungraded; tk2 (task) 680 = ungraded; tk1 (task) 690 = ungraded.
If the application service (QUERY service 1) 611 is the target application service, based on the QUERY relationship (query_by) and the INPUT relationship (INPUT), the Tb1 (data table) 631 directly accessed BY the application service (QUERY service 1) 611 can be determined BY the QUERY platform 1 (QUERY 1) 621, and the Tk5 (task) 640 upstream of the Tb1 (data table) 631 is determined as the first task of the application service (QUERY service 1) 611 based on the OUTPUT relationship (OUTPUT); and, tk5 (task) 640=ungraded is updated based on application service (query service 1) 611=p0, and Tk5 (task) 640=p0 after the update. Meanwhile, the application service (QUERY service 2) 612 is taken as another target application service and participates in the level update process, and then, based on the QUERY relationship (query_by) and the INPUT relationship (INPUT), the Tb2 (data table) 632 directly accessed BY the application service (QUERY service 1) 612 can be determined BY the QUERY platform 2 (QUERY 1) 622, and the Tk6 (task) 650 upstream of the Tb2 (data table) 632 is determined as the first task of the application service (QUERY service 2) 612 based on the OUTPUT relationship (OUTPUT); and, tk6 (task) 650=ungraded is updated based on application service (query service 2) 612=p1, and Tk6 (task) 650=p1 after the update.
After updating, tk5 (task) 640=p0; tk6 (task) 650=p1; tk4 (task) 660 = ungraded; tk3 (task) 670 = ungraded; tk2 (task) 680 = ungraded; tk1 (task) 690 = ungraded.
Further, a second task of the application service (query service 1) 611 upstream of Tk5 (task) 640, namely Tk4 (task) 660, is determined based ON the process_DEPEND_ON. Further, it is possible to determine a downstream task adjacent to the Tk4 (task) 660 and downstream of the Tk4 (task) 660, and in this case, the downstream task downstream of the Tk4 (task) 660 includes only: tk5 (task) 640=p0. The task level of Tk4 (task) 660 can be updated based on Tk5 (task) 640=p0. At the same time, a second task of the application service (query service 2) 612 upstream of Tk6 (task) 650, tk2 (task) 680, is determined based ON the process_DEPEND_ON. Further, a downstream task adjacent to Tk2 (task) 680 and downstream of Tk2 (task) 680 may be determined, and at this time, the downstream task downstream of Tk2 (task) 680 includes: tk3 (task) 670 = ungraded, tk6 (task) 650 = P1. The task level of Tk2 (task) 680 may thus be updated based on Tk3 (task) 670=ungraded, tk6 (task) 650=p1, and specifically, the highest-level identifier of { Tk3 (task) 670=ungraded, tk6 (task) 650=p1 } may be assigned to Tk2 (task) 680.
After updating, tk5 (task) 640=p0; tk6 (task) 650=p1; tk4 (task) 660=p0; tk3 (task) 670 = ungraded; tk2 (task) 680=p1; tk1 (task) 690 = ungraded.
Further, a third task of the application service (query service 1) 611 upstream of Tk4 (task) 660, namely Tk3 (task) 670, is determined based ON the process_DEPEND_ON. Further, it is possible to determine a downstream task adjacent to Tk3 (task) 670 and downstream of Tk3 (task) 670, and in this case, the downstream task downstream of Tk3 (task) 670 includes only: tk4 (task) 660=p0. The task level of Tk3 (task) 670 may be updated based on Tk4 (task) 660=p0. At the same time, a third task of the application service (query service 2) 612 upstream of Tk2 (task) 680, namely Tk1 (task) 690, is determined based ON the PROCESS dependency (process_DEPEND_ON). Further, a downstream task adjacent to Tk1 (task) 690 and downstream of Tk1 (task) 690 may be determined, and in this case, the downstream task downstream of Tk1 (task) 690 includes: tk2 (task) 680=p1. The task level of Tk1 (task) 690 may be updated based on Tk2 (task) 680=p1.
After updating, tk5 (task) 640=p0; tk6 (task) 650=p1; tk4 (task) 660=p0; tk3 (task) 670=p0; tk2 (task) 680=p1; tk1 (task) 690=p1.
Further, a fourth task of the application service (query service 1) 611 upstream of Tk3 (task) 670, namely Tk2 (task) 680, is determined based ON the process_DEPEND_ON. Further, a downstream task adjacent to Tk2 (task) 680 and downstream of Tk2 (task) 680 may be determined, and at this time, the downstream task downstream of Tk2 (task) 680 includes: tk3 (task) 670=p0, tk6 (task) 650=p1. Since P0 is greater than P1, tk2 (task) 680=p1 can be updated to Tk2 (task) 680=p0.
After updating, tk5 (task) 640=p0; tk6 (task) 650=p1; tk4 (task) 660=p0; tk3 (task) 670=p0; tk2 (task) 680=p0; tk1 (task) 690=p1.
Further, a fifth task of the application service (query service 1) 611 upstream of Tk2 (task) 680, namely Tk1 (task) 690, is determined based ON the process_depetjon_on. Further, a downstream task adjacent to Tk1 (task) 690 and downstream of Tk1 (task) 690 may be determined, and in this case, the downstream task downstream of Tk1 (task) 690 includes: tk2 (task) 680=p0. The task level of Tk1 (task) 690 may be updated based on Tk2 (task) 680=p0.
After updating, tk5 (task) 640=p0; tk6 (task) 650=p1; tk4 (task) 660=p0; tk3 (task) 670=p0; tk2 (task) 680=p0; tk1 (task) 690=p0.
It can be seen that implementing this alternative embodiment, the level of the upstream task may be updated based on all of its downstream tasks to ensure accuracy of the level update for the upstream task.
As an alternative embodiment of step S1302, updating the second task level of the second task based on the first task level and the task levels corresponding to the other tasks in each downstream task except the first task, includes:
step S13021: determining the highest grade in the downstream task grade set corresponding to the second task; the downstream task level set comprises a first task level and task levels corresponding to other tasks except the first task in each downstream task respectively;
step S13022: the highest-level identifier is assigned to a second task level of the second task to effect an update to the second task level.
Specifically, referring to the foregoing description of fig. 6, for example, if the downstream task level set corresponding to the second task is { Tk3 (task) 670=p0, tk6 (task) 650=p1 }, and P0 is greater than P1, then the highest level in the downstream task level set is the task level of Tk3 (task) 670. Further, an identifier P0 of the task level of Tk3 (task) 670 may be assigned to the second task level of the second task to realize the update of the second task level, the updated second task level=p0.
It will be seen that implementing this alternative embodiment may allow the highest level in the downstream tasks to be the second task level of the upstream second task to ensure that the higher level tasks downstream are given a higher processing priority.
As an alternative embodiment, further comprising: according to the task traversing sequence of the previous round of updating process, updating each task again to obtain a second level updating result; if the second-level updating result is consistent with the first-level updating result, ending the updating process, otherwise, entering a new round of updating process.
Specifically, referring to the foregoing description of fig. 6, if the first level update result= { Tk5 (task) 640=p0; tk6 (task) 650=p1; tk4 (task) 660=p0; tk3 (task) 670=p0; tk2 (task) 680=p0; tk1 (task) 690=p0, and the generated second level update result is identical to the first level update result, the completion of the update can be determined, and if not, the steps shown in fig. 1 and embodiments thereof are cyclically performed until the second level update result is identical to the first level update result.
It can be seen that, by implementing this alternative embodiment, the level accuracy of each task in the link relationship can be ensured until the level update result is unchanged.
As an alternative embodiment, further comprising: storing the first level update results in a database; and in response to the historical update result review operation, reading the first-level update result from the database.
Specifically, the history update result review operation is used to invoke the level update result specified in the database. Optionally, the history update result rechecking operation may be used to call the level update results corresponding to different history moments at one time, or may call only a single level update result, which is not limited by the embodiment of the present application.
In addition, after the second-level update result is generated, the second-level update result may also be stored in the database, and the second-level update result may be read from the database in response to the history update result review operation. In addition, optionally, a comparison result of the first-level updating result and the second-level updating result can be generated in response to the data comparison request, and the comparison result is output for reference of a user.
Therefore, by implementing the alternative embodiment, related personnel can conveniently call the grade updating result generated by the history at any time, and the problem of the task grade updating process is rechecked.
As an alternative embodiment, further comprising: and updating the link relation according to the target application service, wherein the updated link relation contains the target application service.
Specifically, if the target service level corresponding to the target application service changes, the target application service included in the updated link relationship corresponds to the latest target service level.
In addition, the new application service can be detected according to the preset unit time, and the link relation related to the new application service is updated according to the new application service, so that the periodic update of the link relation is realized.
It can be seen that implementing this alternative embodiment, the link relationship can be maintained with a strong timeliness.
Further, referring to fig. 7, fig. 7 is a flow chart illustrating a task level determination method according to another exemplary embodiment of the present application. As shown in fig. 7, the task level determination method includes:
step S710: constructing a node association model comprising node types and node relations; the node types comprise a production service node, a file node, a task node, a user node, a data table node, a query platform node and an application service node; the node relationships include input relationships, output relationships, dependency relationships, process dependencies, dataset dependencies, query relationships.
Step S712: and constructing a production link relation according to the production service node, the file node, the task node, the user node, the data table node, the input relation, the output relation, the subordinate relation, the process dependency relation and the data set dependency relation. And constructing an application link relation according to the data table node, the query platform node, the application service node, the input relation and the query relation.
Step S714: and determining a target data table directly accessed by the target application service according to the application link relation.
Step S716: a first task for generating a target data table and serving upstream for a target application is determined from the production link relationship.
Step S718: and determining the target service grade corresponding to the target application service from the preset service grade table.
Step S720: and assigning the identifier of the target service level to the first task level of the first task to realize updating of the first task level.
Step S722: a second task upstream of the first task is determined from the production link relationship.
Step S724: determining each downstream task adjacent to and downstream from the second task; wherein each downstream task includes a first task.
Step S726: determining the highest grade in the downstream task grade set corresponding to the second task; the downstream task class set comprises a first task class and task classes corresponding to other tasks except the first task in each downstream task.
Step S728: the highest-level identifier is assigned to a second task level of the second task to effect an update to the second task level.
Step S730: and continuously updating the task level of each task in the link relation until each task in the link relation is traversed to obtain a first level updating result.
Step S732: and updating the link relation according to the target application service, wherein the updated link relation contains the target application service.
Step S734: the first level update results are stored in a database.
Step S736: and in response to the historical update result review operation, reading the first-level update result from the database.
Step S738: and updating each task in the link relation again according to the task traversing sequence of the previous updating process to obtain a second-level updating result.
Step S740: if the second-level updating result is consistent with the first-level updating result, ending the updating process, otherwise, entering a new round of updating process.
It should be noted that, the steps S700 to S740 correspond to the steps and embodiments shown in fig. 1, and for the specific implementation of the steps S700 to S740, please refer to the steps and embodiments shown in fig. 1, and the description thereof is omitted here.
Therefore, when the method shown in fig. 7 is implemented, the link relationship can be obtained first, and because the link relationship characterizes the relationships among the data table, the tasks and the application services, for the detected target application service, the first task at the upstream of the link relationship can be determined, the first task level is updated based on the target application service, and the second task level at the upstream is updated based on the first task level, so that the task level of each task in the link relationship is determined based on the target application service, the task level adaptation can be realized without manually marking and modifying the task levels, and the efficiency of determining the task level is improved. In addition, the task grade can be automatically determined, so that the problems of low accuracy, low updating efficiency, missed marking and the like of manual marking can be avoided.
Exemplary Medium
Having described the method of the exemplary embodiments of the present application, next, a description will be given of the medium of the exemplary embodiments of the present application.
In some possible embodiments, the aspects of the present application may also be implemented as a medium having stored thereon a program code for implementing the steps in the task level determination method according to various exemplary embodiments of the present application described in the above "exemplary method" section of the present specification when the program code is executed by a processor of a device.
Specifically, the processor of the device is configured to implement the following steps when executing the program code: acquiring a link relation used for representing the relation among a data table, tasks and application services; determining a first task at the upstream of the target application service according to the link relation, and updating the first task level of the first task based on the target service level corresponding to the target application service; and determining a second task upstream of the first task according to the link relation, and updating the second task level of the second task based on the first task level until each task in the link relation is traversed to obtain a first level updating result.
In some embodiments of the application, the processor of the device, when executing the program code, is further configured to implement the following steps: constructing a node association model comprising node types and node relations; the node types comprise a production service node, a file node, a task node, a user node, a data table node, a query platform node and an application service node; the node relation comprises an input relation, an output relation, a subordinate relation, a process dependency relation, a data set dependency relation and a query relation; based on the node association model, link relations for representing relations among the data table, the tasks and the application services are constructed.
In some embodiments of the application, the processor of the device, when executing the program code, is further configured to implement the following steps: constructing a production link relation according to the production service node, the file node, the task node, the user node, the data table node, the input relation, the output relation, the subordinate relation, the process dependency relation and the data set dependency relation; and constructing an application link relation according to the data table node, the query platform node, the application service node, the input relation and the query relation.
In some embodiments of the application, the processor of the device, when executing the program code, is further configured to implement the following steps: determining a first task of the upstream of the target application service according to the production link relation and the application link relation; a second task upstream of the first task is determined from the production link relationship.
In some embodiments of the application, the processor of the device, when executing the program code, is further configured to implement the following steps: determining a target data table directly accessed by the target application service according to the link relation; a first task for generating a target data table and serving upstream for a target application is determined from the link relationship.
In some embodiments of the application, the processor of the device, when executing the program code, is further configured to implement the following steps: determining a target service level corresponding to the target application service from a preset service level table; and assigning the identifier of the target service level to the first task level of the first task to realize updating of the first task level.
In some embodiments of the application, the processor of the device, when executing the program code, is further configured to implement the following steps: determining each downstream task adjacent to and downstream from the second task; wherein each downstream task comprises a first task; and updating the second task level of the second task based on the first task level and the task levels corresponding to other tasks except the first task in each downstream task.
In some embodiments of the application, the processor of the device, when executing the program code, is further configured to implement the following steps: determining the highest grade in the downstream task grade set corresponding to the second task; the downstream task level set comprises a first task level and task levels corresponding to other tasks except the first task in each downstream task respectively; the highest-level identifier is assigned to a second task level of the second task to effect an update to the second task level.
In some embodiments of the application, the processor of the device, when executing the program code, is further configured to implement the following steps: according to the task traversing sequence of the previous round of updating process, updating each task again to obtain a second level updating result; if the second-level updating result is consistent with the first-level updating result, ending the updating process, otherwise, entering a new round of updating process.
In some embodiments of the application, the processor of the device, when executing the program code, is further configured to implement the following steps: storing the first level update results in a database; and in response to the historical update result review operation, reading the first-level update result from the database.
In some embodiments of the application, the processor of the device, when executing the program code, is further configured to implement the following steps: and updating the link relation according to the target application service, wherein the updated link relation contains the target application service.
It should be noted that: the medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take many forms, including, but not limited to: electromagnetic signals, optical signals, or any suitable combination of the preceding. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Exemplary apparatus
Having described the medium of the exemplary embodiment of the present application, next, a task class determination device of the exemplary embodiment of the present application will be described with reference to fig. 8.
Referring to fig. 8, fig. 8 is a block diagram showing a task class determination device according to an exemplary embodiment of the present application. As shown in fig. 8, a task level determination device 800 according to an exemplary embodiment of the present application includes:
a link relation obtaining unit 801, configured to obtain a link relation for characterizing a relation among a data table, a task, and an application service;
a first level updating unit 802, configured to determine a first task upstream of the target application service according to the link relationship, and update a first task level of the first task based on a target service level corresponding to the target application service;
and a second level updating unit 803, configured to determine a second task upstream of the first task according to the link relationship, and update a second task level of the second task based on the first task level until each task in the link relationship is traversed, so as to obtain a first level updating result.
Therefore, for the detected target application service, the first task at the upstream of the link relation can be determined, the first task level is updated based on the target application service, and the second task level at the upstream is updated based on the first task level, so that the task level of each task in the link relation is determined based on the target application service, and task level adaptation can be realized without manually marking and modifying the task levels, thereby improving the efficiency of determining the task level. In addition, the task grade can be automatically determined, so that the problems of low accuracy, low updating efficiency, missed marking and the like of manual marking can be avoided.
In one embodiment, based on the foregoing scheme, further comprising:
the model building unit is used for building a node association model comprising node types and node relations; the node types comprise a production service node, a file node, a task node, a user node, a data table node, a query platform node and an application service node; the node relation comprises an input relation, an output relation, a subordinate relation, a process dependency relation, a data set dependency relation and a query relation;
and the link relation construction unit is used for constructing a link relation for representing the relation among the data table, the task and the application service based on the node association model.
It can be seen that, by implementing the alternative embodiment, a node association model for representing the node abstract relationship can be constructed, and the link relationship can be constructed more efficiently and accurately based on the node association model.
In one embodiment, based on the foregoing scheme, the link relationship includes a production link relationship and an application link relationship, and the link relationship construction unit constructs a link relationship for characterizing a relationship among the data table, the task, and the application service based on the node association model, including:
the link relation construction subunit is used for constructing a production link relation according to the production service node, the file node, the task node, the user node, the data table node, the input relation, the output relation, the subordinate relation, the process dependency relation and the data set dependency relation;
And the link relation construction subunit is used for constructing the application link relation according to the data table node, the query platform node, the application service node, the input relation and the query relation.
It can be seen that by implementing this alternative embodiment, the link relationship may be refined into the production link relationship and the application link relationship, and in the subsequent step, the data table is determined based on the refined application link relationship, and then the production link relationship including the data table is determined, so that it is beneficial to more efficiently implement the determination of the task level.
In one embodiment, based on the foregoing scheme, the first level updating unit 802 determines a first task upstream of the target application service according to the link relationship, including:
the first level updating unit 802 determines a first task upstream of the target application service according to the production link relationship and the application link relationship;
and, the second level updating unit 803 determines a second task upstream of the first task according to the link relation, including:
the second level updating unit 803 determines a second task upstream of the first task from the production link relation.
It can be seen that implementing the alternative embodiment, the first task may be determined by the production link relationship and the application link relationship, and then the second task may be determined by the production link relationship, which may be beneficial to improving the efficiency of determining the task level subsequently.
In one embodiment, based on the foregoing scheme, the first level updating unit 802 determines a first task upstream of the target application service according to the link relationship, including:
a data table determining subunit, configured to determine a target data table directly accessed by the target application service according to the link relationship;
and the first task determination subunit is used for determining a first task which is used for generating the target data table and serves the upstream for the target application according to the link relation.
Therefore, by implementing the alternative embodiment, the target data table directly accessed by the target application service can be determined first, and then the first task at the upstream of the target application service is determined reversely according to the link sequence, so that the subsequent updating of the first task level based on the target service level is facilitated, and the automatic determination of the task level flow is realized.
In one embodiment, based on the foregoing solution, the first level updating unit 802 updates the first task level of the first task based on the target service level corresponding to the target application service, including:
the service level inquiry subunit is used for determining a target service level corresponding to the target application service from a preset service level table;
and the first level updating subunit is used for assigning the identifier of the target service level to the first task level of the first task so as to realize updating of the first task level.
It can be seen that, by implementing this alternative embodiment, the identifier of the target service level may be assigned to the first task level, so as to implement task level update based on the target application service, which may save labor cost and improve efficiency of task level determination and update.
In one embodiment, based on the foregoing scheme, the second level updating unit 803 updates the second task level of the second task based on the first task level, including:
a second task determination subunit configured to determine each downstream task adjacent to and downstream from the second task; wherein each downstream task comprises a first task;
and the second level updating subunit is used for updating the second task level of the second task based on the first task level and the task levels corresponding to other tasks except the first task in each downstream task.
It can be seen that implementing this alternative embodiment, the level of the upstream task may be updated based on all of its downstream tasks to ensure accuracy of the level update for the upstream task.
In one embodiment, based on the foregoing solution, the second level updating subunit updates the second task level of the second task based on the first task level and task levels corresponding to other tasks in each downstream task, except for the first task, respectively, including:
Determining the highest grade in the downstream task grade set corresponding to the second task; the downstream task level set comprises a first task level and task levels corresponding to other tasks except the first task in each downstream task respectively;
the highest-level identifier is assigned to a second task level of the second task to effect an update to the second task level.
It will be seen that implementing this alternative embodiment may allow the highest level in the downstream tasks to be the second task level of the upstream second task to ensure that the higher level tasks downstream are given a higher processing priority.
In one embodiment, based on the foregoing scheme, further comprising:
the third-level updating unit is used for updating each task again according to the task traversing sequence of the previous updating process to obtain a second-level updating result; if the second-level updating result is consistent with the first-level updating result, ending the updating process, otherwise, entering a new round of updating process.
It can be seen that, by implementing this alternative embodiment, the level accuracy of each task in the link relationship can be ensured until the level update result is unchanged.
In one embodiment, based on the foregoing scheme, further comprising:
An update result storage unit for storing the first-level update result in a database;
and the back check operation response unit is used for responding to the history update result back check operation and reading the first-level update result from the database.
Therefore, by implementing the alternative embodiment, related personnel can conveniently call the grade updating result generated by the history at any time, and the problem of the task grade updating process is rechecked.
In one embodiment, based on the foregoing scheme, further comprising:
and the link relation updating unit is used for updating the link relation according to the target application service, wherein the updated link relation contains the target application service.
It can be seen that implementing this alternative embodiment, the link relationship can be maintained with a strong timeliness.
It should be noted that although several modules or units of the task level determination device are mentioned in the above detailed description, this division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Exemplary electronic device
Having described the method, medium, and apparatus of exemplary embodiments of the present application, next, an electronic device according to another exemplary embodiment of the present application is described.
Those skilled in the art will appreciate that the various aspects of the application may be implemented as a system, method, or program product. Accordingly, aspects of the application may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
A task level determination device 900 according to still another alternative exemplary embodiment of the present application is described below with reference to fig. 9. The task level determination device 900 shown in fig. 9 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present application.
As shown in fig. 9, the task class determination device 900 is embodied in the form of an electronic device. The components of the task level determination device 900 may include, but are not limited to: the at least one processing unit 910, the at least one storage unit 920, and a bus 930 connecting the different system components (including the storage unit 920 and the processing unit 910).
Wherein the storage unit stores program code that is executable by the processing unit 910 such that the processing unit 910 performs steps according to various exemplary embodiments of the present application described in the description section of the exemplary method described above in the present specification. For example, the processing unit 910 may perform the various steps as shown in fig. 1 and 7.
The storage unit 920 may include readable media in the form of volatile storage units, such as Random Access Memory (RAM) 9201 and/or cache memory 9202, and may further include Read Only Memory (ROM) 9203.
The storage unit 920 may also include a program/utility 9204 having a set (at least one) of program modules 9205, such program modules 9205 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
The bus 930 may be one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The task tier determination 900 may also be in communication with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the task tier determination 900, and/or any device (e.g., router, modem, etc.) that enables the task tier determination 900 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 950. Further, the task level determination device 900 can also communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the internet via a network adapter 990. As shown in fig. 9, the network adapter 990 communicates with other modules of the task level determination device 900 via the bus 930. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with the task level determination device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present application.
While the spirit and principles of the present application have been described with reference to several particular embodiments, it is to be understood that the application is not limited to the particular embodiments of the application nor does it imply that features in the various aspects are not useful in combination, nor are they intended to be useful in any way, such as for convenience of description. The application is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (10)

1. A task level determination method, comprising:
acquiring a link relation used for representing the relation among a data table, tasks and application services;
determining a first task at the upstream of a target application service according to the link relation, and updating the first task level of the first task based on a target service level corresponding to the target application service;
and determining a second task upstream of the first task according to the link relation, and updating a second task level of the second task based on the first task level until each task in the link relation is traversed to obtain a first level updating result.
2. The method as recited in claim 1, further comprising:
constructing a node association model comprising node types and node relations; the node types comprise a production service node, a file node, a task node, a user node, a data table node, a query platform node and an application service node; the node relation comprises an input relation, an output relation, a subordinate relation, a process dependency relation, a data set dependency relation and a query relation;
And constructing a link relation for representing the relation among the data table, the task and the application service based on the node association model.
3. The method of claim 2, wherein the link relationships include a production link relationship and an application link relationship, wherein constructing a link relationship for characterizing relationships between data tables, tasks, and application services based on the node association model includes:
constructing the production link relation according to the production service node, the file node, the task node, the user node, the data table node, the input relation, the output relation, the subordinate relation, the process dependency relation and the data set dependency relation;
and constructing the application link relation according to the data table node, the query platform node, the application service node, the input relation and the query relation.
4. A method according to claim 3, wherein determining a first task upstream of a target application service from the link relationship comprises:
determining a first task upstream of a target application service according to the production link relation and the application link relation;
And determining a second task upstream of the first task according to the link relation, including:
and determining a second task upstream of the first task according to the production link relation.
5. The method of claim 1, wherein determining a first task upstream of a target application service based on the link relationship comprises:
determining a target data table directly accessed by the target application service according to the link relation;
and determining a first task which is used for generating the target data table and serving the upstream of the target application according to the link relation.
6. The method of claim 1, wherein updating the first task level of the first task based on the target service level corresponding to the target application service comprises:
determining a target service level corresponding to the target application service from a preset service level table;
and assigning the identifier of the target service level to a first task level of the first task to realize updating of the first task level.
7. The method of claim 1, wherein updating the second task level of the second task based on the first task level comprises:
Determining each downstream task adjacent to and downstream from the second task; wherein each downstream task comprises the first task;
and updating the second task level of the second task based on the first task level and the task levels respectively corresponding to other tasks except the first task in the downstream tasks.
8. A task class determination device, comprising:
the link relation acquisition unit is used for acquiring a link relation used for representing the relation among the data table, the task and the application service;
the first level updating unit is used for determining a first task at the upstream of the target application service according to the link relation and updating the first task level of the first task based on the target service level corresponding to the target application service;
and the second level updating unit is used for determining a second task upstream of the first task according to the link relation, updating the second task level of the second task based on the first task level until each task in the link relation is traversed, and obtaining a first level updating result.
9. An electronic device, comprising:
A processor; and
a memory having stored thereon computer readable instructions which, when executed by the processor, implement the task level determination method of any one of claims 1 to 7.
10. A computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the task level determination method according to any one of claims 1 to 7.
CN202311226444.2A 2023-09-21 2023-09-21 Task grade determining method, device, equipment and medium Pending CN117215791A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311226444.2A CN117215791A (en) 2023-09-21 2023-09-21 Task grade determining method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311226444.2A CN117215791A (en) 2023-09-21 2023-09-21 Task grade determining method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN117215791A true CN117215791A (en) 2023-12-12

Family

ID=89040374

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311226444.2A Pending CN117215791A (en) 2023-09-21 2023-09-21 Task grade determining method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN117215791A (en)

Similar Documents

Publication Publication Date Title
JP2023162238A (en) Correlation for stack segment intensity in appearing relation
CN106104533A (en) Process the data set in large data storage vault
US20130166602A1 (en) Cloud-enabled business object modeling
US20180365614A1 (en) Dynamic directed graph workflows
US10394805B2 (en) Database management for mobile devices
CN107870949B (en) Data analysis job dependency relationship generation method and system
US9569722B2 (en) Optimal persistence of a business process
CN109213752A (en) A kind of data cleansing conversion method based on CIM
CN112906206B (en) Digital twin model construction method and device
CN112818048A (en) Hierarchical construction method and device of data warehouse, electronic equipment and storage medium
CN113656407A (en) Data topology generation method and device, electronic equipment and storage medium
CN110807028B (en) Method, apparatus and computer program product for managing a storage system
US11157267B1 (en) Evaluation of dynamic relationships between application components
CN115329011A (en) Data model construction method, data query method, data model construction device and data query device, and storage medium
CN101968747B (en) Cluster application management system and application management method thereof
CN114997414B (en) Data processing method, device, electronic equipment and storage medium
CN117215791A (en) Task grade determining method, device, equipment and medium
CN115543428A (en) Simulated data generation method and device based on strategy template
US8200613B1 (en) Approach for performing metadata reconciliation
US7840452B2 (en) Application, method and process for managing part exchangeability across functional boundaries
CN112988278A (en) Meta file modification method and device of resource file, electronic equipment and storage medium
Leida et al. Facing big data variety in a model driven approach
Zhang et al. RETRACTED ARTICLE: Research on smart city service system based on adaptive algorithm
US11275716B2 (en) Cognitive disparate log association
US11651030B2 (en) Delta-based conflict-free replicated data type arrays using dot stores that map dots to dot stores

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