Information generation method and apparatus, electronic device, and computer readable medium

By using a graph database to store the metadata and relationships of task nodes and determining the execution status of task nodes through count value transformation, the problems of cumbersome library and table structures and high resource consumption in task scheduling are solved, and efficient and fast task execution and query are achieved.

CN113779315BActive Publication Date: 2025-10-21BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110171707.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-08
Publication Date
2025-10-21
Estimated Expiration
2041-02-08

AI Technical Summary

Technical Problem

When using relational databases to store metadata in task scheduling, existing technologies have problems such as cumbersome database table structures, messy data, low query efficiency, poor scalability, and high resource consumption.

Method used

A graph database is used to store the metadata and task relationships of task nodes. The execution status of task nodes is determined by the transformation of count values, and information is generated to determine whether the task nodes meet the execution conditions.

Benefits of technology

It improves the efficiency and scalability of task scheduling, reduces resource consumption, and simplifies the management and query process of task relationships.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113779315B_ABST
    Figure CN113779315B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure disclose information generation methods and apparatuses, electronic devices and computer readable media. A specific implementation of the method includes: executing at least one task node meeting an execution condition in each task node stored in a graph database; in response to the execution of each task node in the at least one task node being completed, querying a task relationship between the tasks to determine whether there is a corresponding sub-task node for each task node; in response to a first target task node in the at least one task node having at least one corresponding sub-task node, changing a count value corresponding to each sub-task node in the at least one sub-task node; and generating information representing whether the sub-task node meets the execution condition according to the changed count value of each sub-task node in the at least one sub-task node. The implementation efficiently and quickly executes the tasks corresponding to each task node through the task relationship between the tasks stored in the graph database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technology, and more particularly to information generation methods, devices, electronic devices, and computer-readable media. Background Art

[0002] Currently, in some task flow scheduling, tasks are often executed in a predetermined order, with dependencies between the two tasks being executed one after the other. Currently, the typical approach for scheduling tasks is for relevant staff to create a task flow description file in the form of a directed acyclic graph (DAG). Relational data is used to store metadata.

[0003] However, when using the above method to schedule various tasks, the following technical problems often arise:

[0004] (1) Using a relational database to store metadata requires complex database table structure design. If there are many subtasks in the overall task process and the relationship chain is long and complex, the data stored in the database will be messy, increasing maintenance costs and reducing data query efficiency.

[0005] (2) After the user designs and writes the script describing the DAG task, if he needs to add or delete subtasks, he needs to rewrite it, which has poor scalability.

[0006] (3) A separate function is required to build and maintain the DAG graph of the entire task process in memory, which consumes more server resources when the system is running. Summary of the Invention

[0007] The content of this disclosure is used to briefly introduce concepts that will be described in detail in the detailed description section below. The content of this disclosure is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0008] Some embodiments of the present disclosure propose information generation methods, devices, equipment, and computer-readable media to solve one or more of the technical problems mentioned in the above background technology section.

[0009] In a first aspect, some embodiments of the present disclosure provide an information generation method, which includes: executing at least one task node that meets the execution conditions among the task nodes stored in the graph database, wherein the graph database stores the metadata of each task and the task relationship between the tasks in the form of nodes; in response to the completion of execution of each task node in the at least one task node, querying the task relationship between the tasks to determine whether each task node has a corresponding subtask node; in response to the existence of at least one subtask node corresponding to the first target task node in the at least one task node, changing the count value corresponding to each subtask node in the at least one subtask node, wherein the count value is used to determine whether the task node meets the execution conditions; and generating information representing whether the subtask node meets the execution conditions based on the changed count value of each subtask node in the at least one subtask node.

[0010] Optionally, after executing at least one task node that meets the execution conditions among the task nodes stored in the execution graph database, the above method also includes: setting the execution status of the above at least one task node to the first execution status; in response to the completion of execution of each task node among the above at least one task node, changing the first execution status of each task node to the second execution status.

[0011] Optionally, in response to the existence of at least one subtask node corresponding to the first target task node in the at least one task node, changing the count value corresponding to each subtask node in the at least one subtask node includes: in response to the existence of at least one subtask node corresponding to the first target task node in the at least one task node, subtracting a first predetermined value from the count value corresponding to each subtask node in the at least one subtask node.

[0012] Optionally, the above-mentioned generating information representing whether the above-mentioned subtask node meets the above-mentioned execution condition based on the changed count value of each subtask node in the above-mentioned at least one subtask node includes: in response to determining that the changed count value of the above-mentioned each subtask node is a second predetermined value, generating information representing that the above-mentioned subtask node meets the above-mentioned execution condition.

[0013] Optionally, the information stored in each task node in the above-mentioned graph database includes: identification information of the above-mentioned task node, task status of the above-mentioned task node, count value corresponding to the above-mentioned task node, node association relationship information corresponding to the above-mentioned task node, and task scheduling information of the above-mentioned task node.

[0014] Optionally, the above method also includes: in response to detecting that the target user performs a page operation of adding or deleting a second target task node on the target page, adjusting the task relationship between the above tasks to add or delete the above second target task node; determining whether there is a subsequent task node for the above second target task node; in response to the existence of at least one subsequent task node for the above second target task node, adjusting the count value corresponding to each subsequent task node.

[0015] Optionally, the graph database stores the task relationships between the above tasks in the form of a directed acyclic graph.

[0016] Optionally, the metadata of each task node in the above graph database is also stored in the target distributed key-value database.

[0017] In a second aspect, some embodiments of the present disclosure provide an information generating device, which includes: an execution unit, configured to execute at least one task node that meets the execution conditions among the task nodes stored in a graph database, wherein the graph database stores the metadata of each task and the task relationship between the tasks in the form of nodes; a query unit, configured to query the task relationship between the tasks in response to the completion of the execution of each task node in the at least one task node to determine whether there is a corresponding subtask node for each task node; a change unit, configured to change the count value corresponding to each subtask node in the at least one subtask node in response to the existence of at least one subtask node corresponding to the first target task node in the at least one task node, wherein the count value is used to determine whether the task node meets the execution conditions; a generation unit, configured to generate information representing whether the subtask node meets the execution conditions based on the changed count value of each subtask node in the at least one subtask node.

[0018] Optionally, the device also includes: setting the execution status of the above-mentioned at least one task node to a first execution status; in response to the completion of execution of each task node in the above-mentioned at least one task node, changing the first execution status of each task node to a second execution status.

[0019] Optionally, the changing unit is further configured to: in response to the existence of at least one subtask node corresponding to the first target task node in the at least one task node, subtract a first predetermined value from the count value corresponding to each subtask node in the at least one subtask node.

[0020] Optionally, the generating unit is further configured to: in response to determining that the count value of each subtask node after the change is a second predetermined value, generate information indicating that the subtask node meets the execution condition.

[0021] Optionally, the information stored in each task node in the above-mentioned graph database includes: identification information of the above-mentioned task node, task status of the above-mentioned task node, count value corresponding to the above-mentioned task node, node association relationship information corresponding to the above-mentioned task node, and task scheduling information of the above-mentioned task node.

[0022] Optionally, the device also includes: in response to detecting that the target user performs a page operation of adding or deleting a second target task node on the target page, adjusting the task relationship between the above-mentioned tasks to add or delete the above-mentioned second target task node; determining whether there is a subsequent task node for the above-mentioned second target task node; in response to the existence of at least one subsequent task node for the above-mentioned second target task node, adjusting the count value corresponding to each subsequent task node.

[0023] Optionally, the graph database stores the task relationships between the above tasks in the form of a directed acyclic graph.

[0024] Optionally, the metadata of each task node in the above graph database is also stored in the target distributed key-value database.

[0025] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by one or more processors, the one or more processors implement any method as described in the first aspect.

[0026] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, any method in the first aspect is implemented.

[0027] The above-mentioned embodiments of the present disclosure have the following beneficial effects: the information generation method of some embodiments of the present disclosure can efficiently and quickly execute the tasks corresponding to each task node through the task relationship between each task stored in the graph database. Specifically, (1) using a relational database to store metadata, the database table structure design is relatively cumbersome. If there are many subtasks in the overall task process and the relationship chain is long and complex, the data stored in the database will be relatively messy, increasing maintenance costs and reducing data query efficiency. (2) After the user designs and writes the script describing the DAG task, if it is necessary to add or delete a subtask, it needs to be rewritten, which has poor scalability. (3) A separate function is required to build and maintain the DAG graph of the entire task process in memory, which requires more server resources to be occupied when the system is running. Based on this, the information generation method of some embodiments of the present disclosure will first execute at least one task node that meets the execution conditions among the task nodes stored in the graph database. Among them, the above-mentioned graph database stores the metadata of each task and the task relationship between the above-mentioned tasks in the form of nodes. Here, using a graph database instead of the original relational database to store metadata solves the shortcomings of complex data storage and inconvenient query. For queries on task flow data with long links, relational databases may use multiple joins, resulting in low query efficiency. Graph databases, however, do not have this problem. Task flow description files are eliminated, supporting the storage of tasks and task relationships in a graph database. Thus, querying the graph database can obtain the task relationships between tasks. Then, in response to the completion of execution of each task node in the at least one task node, the task relationships between the tasks are queried to quickly and efficiently determine whether each task node has a corresponding subtask node. Furthermore, in response to the existence of at least one subtask node corresponding to the first target task node in the at least one task node, the count value corresponding to each subtask node in the at least one subtask node is modified. The count value is used to determine whether the task node meets the execution condition. By transforming the numerical value of each subtask node, the execution information of each subtask node can be intuitively and quickly understood. Finally, based on the modified count value of each subtask node in the at least one subtask node, information is generated indicating whether the subtask node meets the execution condition. Thus, this information generation method efficiently and quickly executes the tasks corresponding to each task node by utilizing the task relationships between tasks stored in the graph database. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.

[0029] Figure 1 is a schematic diagram of an application scenario diagram of the information generation method of some embodiments of the present disclosure;

[0030] Figure 2 is a flow chart of some embodiments of the information generation method according to the present disclosure;

[0031] Figure 3 is a flow chart of other embodiments of the information generating method according to the present disclosure;

[0032] Figure 4-Figure 6 It is a structural diagram of adjusting each task node in the information generation method disclosed in the present invention;

[0033] Figure 7 is a schematic structural diagram of some embodiments of the information generating device according to the present disclosure;

[0034] Figure 8 It is a structural diagram of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION

[0035] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0036] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other.

[0037] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0038] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0039] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0040] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0041] Figure 1 It is a schematic diagram of an application scenario diagram of the information generation method of some embodiments of the present disclosure.

[0042] like Figure 1 As shown, electronic device 101 may first execute at least one task node that meets the execution conditions among the task nodes stored in graph database 102. Graph database 102 stores metadata for each task and the task relationships between the tasks in the form of nodes. In this application scenario, the at least one task node may be task node 103. Task node 103 corresponds to metadata 106 and a first task. Then, in response to the completion of execution of each task node in the at least one task node, the task relationships between the tasks are queried to determine whether each task node has a corresponding subtask node. In this application scenario, in response to the completion of execution of task node 103, it is determined that task node 103 has subtask nodes. Task nodes 104 and 105 may be subtask nodes of task node 103. Task node 104 corresponds to metadata 107 and a second task. Task node 105 corresponds to metadata 108 and a third task. Furthermore, in response to the existence of at least one subtask node corresponding to the first target task node in the at least one task node, the count value corresponding to each subtask node in the at least one subtask node is modified. Among them, the above-mentioned count value is used to determine whether the above-mentioned task node meets the above-mentioned execution condition; in this application scenario, task node 104 can be the first target task node. Task node 105 can be the first target task node. The original count value 109 corresponding to task node 104 can be: "1". Change the count value 109 of task node 104 to count value 110. Count value 110 can be: "0". The original count value 112 corresponding to task node 105 can be: "1". Change the count value 112 of task node 105 to count value 113. Count value 113 can be: "0". Finally, based on the changed count value of each subtask node in the above-mentioned at least one subtask node, information representing whether the above-mentioned subtask node meets the above-mentioned execution condition is generated. In this application scenario, the information 111 corresponding to task node 104 representing whether the above-mentioned subtask node meets the above-mentioned execution condition can be: "Execute task node". The information 114 corresponding to task node 105 representing whether the above-mentioned subtask node meets the above-mentioned execution condition can be: "Execute task node".

[0043] It should be noted that the electronic device 101 can be hardware or software. When the electronic device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or it can be implemented as a single server or a single terminal device. When the electronic device is embodied as software, it can be installed in the hardware devices listed above. It can be implemented as multiple software or software modules for providing distributed services, for example, or it can be implemented as a single software or software module. No specific limitation is made here.

[0044] It should be understood that Figure 1 The number of electronic devices in the embodiment is merely illustrative. Any number of electronic devices may be provided according to implementation requirements.

[0045] Continue to refer Figure 2 , shows a process 200 of some embodiments of the information generation method according to the present disclosure. The information generation method includes the following steps:

[0046] Step 201: Execute at least one task node that meets the execution condition among the task nodes stored in the execution graph database.

[0047] In some embodiments, the execution subject of the information generation method (eg Figure 1 The electronic device 101 shown) can execute at least one task node that meets the execution conditions among the task nodes stored in the graph database through the task scheduling module. The graph database stores the metadata of each task and the task relationship between the tasks in the form of nodes. The task relationship between the tasks can be stored in the graph database through the relevant page service. The graph database can be a GraphQL database. The execution condition of the task node can be that the predecessor task nodes of the task node have all been completed. The metadata can be the data describing the task. It should be noted that the underlying task scheduling module (scheduler), task execution module (executor) and other modules can obtain the task relationship by real-time querying the graph database. The graph database can intuitively and completely store the task relationship between the tasks. To edit the task relationship between the tasks, the page management service only needs to connect to the graph database to execute GraphQL, which has higher scalability and ease of use. The underlying modules do not need to generate and maintain the task relationship between the tasks themselves, and can query it instantly, thereby improving operational efficiency.

[0048] In some optional implementations of some embodiments, the information stored in each task node in the above-mentioned graph database includes: identification information of the above-mentioned task node, task status of the above-mentioned task node, count value corresponding to the above-mentioned task node, node association relationship information corresponding to the above-mentioned task node, and task scheduling information of the above-mentioned task node.

[0049] In some optional implementations of some embodiments, after executing at least one task node that meets the execution condition among the task nodes stored in the graph database, the method further includes the following steps:

[0050] The first step is to set the execution state of the at least one task node to a first execution state, wherein the first execution state may be an execution completion state.

[0051] In the second step, in response to each of the at least one task node being completed, the first execution state of each of the task nodes is changed to a second execution state, wherein the first execution state may be an execution completed state.

[0052] In some optional implementations of some embodiments, metadata for each task node in the graph database is also stored in a target distributed key-value database. For example, the target distributed key-value database may be an Etcd database. The Etcd database is a distributed, reliable key-value storage system that can be used for storage, shared configuration, and service discovery.

[0053] Here, the target user can create and edit tasks on the page. In addition to operating the graph database, they can also create task node keys in Etcd. One key corresponds to one task, and different keys are independent of each other. The value of the node key stores the task details including the task status. The task scheduling module (scheduler) monitors the changes in the task node key in Etcd to schedule task execution. After the task is completed, the result is written to the value of the corresponding node key in Etcd. The page management service (web-server) or the task scheduling module (scheduler) monitors the status changes of the values ​​of each node key in Etcd to update the data in the graph database.

[0054] In some optional implementations of some embodiments, the graph database stores the task relationships between the above-mentioned tasks in the form of a directed acyclic graph.

[0055] Step 202 : In response to completion of execution of each task node in the at least one task node, query the task relationships between the tasks to determine whether each task node has a corresponding subtask node.

[0056] In some embodiments, in response to the completion of execution of each task node in the at least one task node, the execution entity may query the task relationship between the tasks to determine whether each task node has a corresponding subtask node. Wherein, the subtask node may be a node at the next level of the task node. The execution of the at least one task node may be performed in parallel. Parallel execution of the at least one task node may greatly shorten the task scheduling time, making the execution of each task more efficient.

[0057] Step 203 : In response to the existence of at least one subtask node corresponding to the first target task node in the at least one task node, a count value corresponding to each subtask node in the at least one subtask node is changed.

[0058] In some embodiments, in response to the presence of at least one subtask node corresponding to the first target task node in the at least one task node, the execution entity changes a count value corresponding to each subtask node in the at least one subtask node. The count value is used to determine whether the task node satisfies the execution condition. The count value corresponding to each subtask node may be counted by a counter of each subtask node.

[0059] In some optional implementations of some embodiments, in response to the existence of at least one subtask node corresponding to the first target task node in the at least one task node, a first predetermined value is subtracted from a count value corresponding to each subtask node in the at least one subtask node. The first predetermined value may be "1."

[0060] Step 204 : Generate information indicating whether the subtask node satisfies the execution condition according to the modified count value of each subtask node in the at least one subtask node.

[0061] In some embodiments, the execution entity generates information indicating whether the subtask node satisfies the execution condition in various ways according to the changed count value of each subtask node in the at least one subtask node.

[0062] In some optional implementations of some embodiments, in response to determining that the modified count value of each subtask node is a second predetermined value, information indicating that the subtask node meets the execution condition is generated. As an example, the second predetermined value may be the value "0".

[0063] The above-mentioned embodiments of the present disclosure have the following beneficial effects: the information generation method of some embodiments of the present disclosure can efficiently and quickly execute the tasks corresponding to each task node through the task relationship between each task stored in the graph database. Specifically, (1) using a relational database to store metadata, the database table structure design is relatively cumbersome. If there are many subtasks in the overall task process and the relationship chain is long and complex, the data stored in the database will be relatively messy, increasing maintenance costs and reducing data query efficiency. (2) After the user designs and writes the script describing the DAG task, if it is necessary to add or delete a subtask, it needs to be rewritten, which has poor scalability. (3) A separate function is required to build and maintain the DAG graph of the entire task process in memory, which requires more server resources to be occupied when the system is running. Based on this, the information generation method of some embodiments of the present disclosure will first execute at least one task node that meets the execution conditions among the task nodes stored in the graph database. Among them, the above-mentioned graph database stores the metadata of each task and the task relationship between the above-mentioned tasks in the form of nodes. Here, using a graph database instead of the original relational database to store metadata solves the shortcomings of complex data storage and inconvenient query. For queries on task flow data with long links, relational databases may use multiple joins, resulting in low query efficiency. Graph databases, however, do not have this problem. Task flow description files are eliminated, supporting the storage of tasks and task relationships in a graph database. Thus, querying the graph database can obtain the task relationships between tasks. Then, in response to the completion of execution of each task node in the at least one task node, the task relationships between the tasks are queried to quickly and efficiently determine whether each task node has a corresponding subtask node. Furthermore, in response to the existence of at least one subtask node corresponding to the first target task node in the at least one task node, the count value corresponding to each subtask node in the at least one subtask node is modified. The count value is used to determine whether the task node meets the execution condition. By transforming the numerical value of each subtask node, the execution information of each subtask node can be intuitively and quickly understood. Finally, based on the modified count value of each subtask node in the at least one subtask node, information is generated indicating whether the subtask node meets the execution condition. Thus, this information generation method efficiently and quickly executes the tasks corresponding to each task node by utilizing the task relationships between tasks stored in the graph database.

[0064] Continue to refer Figure 3 , shows a process 300 of another embodiment of the information generation method according to the present disclosure. The information generation method includes the following steps:

[0065] Step 301: Execute at least one task node that meets the execution conditions among the task nodes stored in the execution graph database.

[0066] Step 302 : In response to completion of execution of each task node in the at least one task node, query the task relationships between the tasks to determine whether each task node has a corresponding subtask node.

[0067] Step 303 : In response to the existence of at least one subtask node corresponding to the first target task node in the at least one task node, a count value corresponding to each subtask node in the at least one subtask node is changed.

[0068] Step 304 : Generate information indicating whether the subtask node satisfies the execution condition according to the modified count value of each subtask node in the at least one subtask node.

[0069] In some embodiments, the specific implementation of steps 301-304 and the resulting technical effects can be referred to Figure 2 The corresponding steps 201-204 in the embodiments are not described in detail here.

[0070] Step 305 , in response to detecting that the target user performs a page operation of adding or deleting a second target task node on the target page, the task relationship between the above-mentioned tasks is adjusted to add or delete the above-mentioned second target task node.

[0071] In some embodiments, in response to detecting that the target user performs a page operation of adding or deleting a second target task node on the target page, the execution body (eg Figure 1 The electronic device 101 shown in FIG. 1 may adjust the task relationship between the above tasks to add or delete the above second target task node.

[0072] Step 306: Determine whether there is a subsequent task node for the second target task node.

[0073] In some embodiments, the execution entity may determine whether there is a subsequent task node of the second target task node, wherein the subsequent task node may be an associated task node of a task executed after the task corresponding to the second target task node.

[0074] Step 307 : In response to the second target task node having at least one subsequent task node, adjust the count value corresponding to each subsequent task node.

[0075] In some embodiments, in response to the existence of at least one subsequent task node of the second target task node, the count value corresponding to each subsequent task node may be dynamically adjusted through a related page service.

[0076] As an example, in response to the existence of at least one subsequent task node for the second target task node and the target user performing a page operation of adding the second target task node on the target page, the count value corresponding to each subsequent task node is increased by 1. In response to the existence of at least one subsequent task node for the second target task node and the target user performing a page operation of deleting the second target task node on the target page, the count value corresponding to each subsequent task node is decreased by 1.

[0077] As an example, Figure 4-Figure 6 As shown, the task nodes stored in the graph database include: task node 401, task node 404, task node 407, and task node 410. Task node 401 is the parent node of task nodes 404 and 407; that is, task nodes 404 and 407 are child task nodes of task node 401. Task node 401 corresponds to first task 402. The count value 403 of task node 401 can be "0." Similarly, the parent nodes of task node 410 can be task nodes 404 and 407; that is, task node 410 can be a child task node of task nodes 404 and 407. Task node 404 corresponds to second task 406. The count value 405 of task node 404 can be "0." Task node 407 corresponds to third task 409. The count value 408 of task node 407 can be "1." The task node 410 corresponds to the fourth task 411. The count value 412 of the task node 410 may be a value "3".

[0078] In response to the above-mentioned target user performing a page operation of adding task node 513 on the target page, wherein task node 501 corresponds to task node 401. Task node 504 corresponds to task node 404. Task node 507 corresponds to task node 407. Task node 510 corresponds to task node 410. Task node 513 is determined as the upper-level node of task node 510, that is, task node 513 is determined as the subtask node of task node 504 and task node 507. Task node 513 corresponds to the fifth task 514. The count value 515 of task node 513 can be the value "3". In addition, the value of the count value 512 of task node 510 is changed from the value "3" to the value "4".

[0079] In response to the target user performing a page operation of deleting task node 407 on the target page, task node 601 corresponds to task node 401. Task node 604 corresponds to task node 404. Task node 610 corresponds to task node 410. Task node 407 is deleted and the value of count value 612 of task node 610 is changed from "3" to "2".

[0080] from Figure 3 It can be seen that Figure 2 Compared with the description of some corresponding embodiments, Figure 3 The information generation method process 300 in some corresponding embodiments embodies the step of dynamically adjusting the relationships between tasks in a graph database. Thus, the solutions described in these embodiments can efficiently dynamically adjust the task relationships between task nodes based on the page operations performed by the target user, thereby improving operational efficiency and significantly enhancing the user experience.

[0081] Continue to refer Figure 7 As an implementation of the above methods in the above figures, the present disclosure provides some embodiments of an information generating device, which are similar to Figure 2 Corresponding to the above method embodiments, the device can be specifically applied to various electronic devices.

[0082] like Figure 7 As shown, the information generation device 700 of some embodiments includes: an execution unit 701, a query unit 702, a modification unit 703, and a generation unit 704. The execution unit 701 is configured to execute at least one task node that meets the execution conditions among the task nodes stored in a graph database, wherein the graph database stores metadata of each task and the task relationships between the tasks in the form of nodes. The query unit 702 is configured to, in response to the completion of execution of each task node in the at least one task node, query the task relationships between the tasks to determine whether each task node has a corresponding subtask node. The modification unit 703 is configured to, in response to the existence of at least one subtask node corresponding to the first target task node in the at least one task node, modify the count value corresponding to each subtask node in the at least one subtask node, wherein the count value is used to determine whether the task node meets the execution conditions. The generation unit 704 is configured to generate information indicating whether the subtask node meets the execution conditions based on the modified count value of each subtask node in the at least one subtask node.

[0083] In some optional implementations of some embodiments, the apparatus further comprises: a setting unit and an execution state changing unit (not shown). The setting unit may be configured to set the execution state of the at least one task node to a first execution state. The execution state changing unit may be configured to change the first execution state of each task node to a second execution state in response to completion of execution of each task node in the at least one task node.

[0084] In some optional implementations of some embodiments, the changing unit 703 of the information generating device 700 can be further configured to: in response to the existence of at least one subtask node corresponding to the first target task node in the above-mentioned at least one task node, subtract a first predetermined value from the count value corresponding to each subtask node in the above-mentioned at least one subtask node.

[0085] In some optional implementations of some embodiments, the generation unit 704 of the information generation device 700 can be further configured to: in response to determining that the changed count value of each of the above subtask nodes is a second predetermined value, generate information indicating that the above subtask node meets the above execution condition.

[0086] In some optional implementations of some embodiments, the above-mentioned device further includes: a task node adjustment unit, a node determination unit and a count value adjustment unit (not shown in the figure). Among them, the task node adjustment unit can be configured to: in response to detecting that the target user performs a page operation of adding or deleting a second target task node on the target page, adjust the task relationship between the above-mentioned tasks to add or delete the above-mentioned second target task node. The node determination unit can be configured to: determine whether there is a post-task node for the above-mentioned second target task node. The count value adjustment unit can be configured to: in response to the existence of at least one post-task node for the above-mentioned second target task node, adjust the count value corresponding to each post-task node.

[0087] It is understood that the units described in the device 700 are similar to those in the reference Figure 2 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 700 and the units included therein, and will not be repeated here.

[0088] Reference below Figure 8 , which shows a structural diagram of an electronic device 800 suitable for implementing some embodiments of the present disclosure. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0089] like Figure 8As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. Various programs and data required for the operation of the electronic device 800 are also stored in the RAM 803. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0090] Typically, the following devices may be connected to the I / O interface 805: an input device 806 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 808 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 800 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead. Figure 8 Each block shown in the figure may represent one device, or may represent multiple devices as needed.

[0091] In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from a network via the communication device 809, or installed from the storage device 808, or installed from the ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of some embodiments of the present disclosure are performed.

[0092] It should be noted that in some embodiments of the present disclosure, the computer-readable medium mentioned above may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0093] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0094] The computer-readable medium may be included in the device; or it may exist independently and not be installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: executes at least one task node that meets the execution conditions among the task nodes stored in the graph database, wherein the graph database stores metadata of each task and the task relationships between the tasks in the form of nodes; in response to the completion of the execution of each task node in the at least one task node, queries the task relationships between the tasks to determine whether each task node has a corresponding subtask node; in response to the existence of at least one subtask node corresponding to the first target task node in the at least one task node, changes the count value corresponding to each subtask node in the at least one subtask node, wherein the count value is used to determine whether the task node meets the execution conditions; and generates information representing whether the subtask node meets the execution conditions based on the changed count value of each subtask node in the at least one subtask node.

[0095] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0096] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0097] The units described in some embodiments of the present disclosure may be implemented in software or in hardware. The described units may also be provided in a processor, for example, they may be described as: a processor comprising an execution unit, a query unit, a change unit, and a generation unit. The names of these units do not, in some cases, constitute a limitation on the unit itself, for example, the execution unit may also be described as "a unit that executes at least one task node that meets the execution conditions among the task nodes stored in the execution graph database."

[0098] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0099] The above description is only an illustration of some preferred embodiments of the present disclosure and the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure.

Claims

1. A method for generating information, comprising: Execute at least one task node that meets an execution condition among the task nodes stored in a graph database, wherein the graph database stores metadata of each task and task relationships between the tasks in the form of nodes, and the task relationships between the tasks are stored in the graph database via a related page service, and the execution condition is that all predecessor task nodes of the task node have completed execution; In response to completion of execution of each task node in the at least one task node, querying the task relationships between the tasks to determine whether each task node has a corresponding subtask node; In response to the existence of at least one subtask node corresponding to the first target task node in the at least one task node, changing a count value corresponding to each subtask node in the at least one subtask node, wherein the count value is used to determine whether the task node meets the execution condition; According to the changed count value of each subtask node in the at least one subtask node, information indicating whether the subtask node meets the execution condition is generated.

2. The method according to claim 1, wherein After at least one task node that meets the execution condition among the task nodes stored in the execution graph database is executed, the method further includes: Setting the execution state of the at least one task node to a first execution state; In response to completion of execution of each task node in the at least one task node, the first execution state of each task node is changed to a second execution state.

3. The method according to claim 1, wherein In response to the existence of at least one subtask node corresponding to the first target task node in the at least one task node, changing the count value corresponding to each subtask node in the at least one subtask node includes: In response to the existence of at least one subtask node corresponding to the first target task node in the at least one task node, a first predetermined value is subtracted from a count value corresponding to each subtask node in the at least one subtask node.

4. The method according to claim 1, wherein The generating, according to the changed count value of each subtask node in the at least one subtask node, information indicating whether the subtask node satisfies the execution condition includes: In response to determining that the changed count value of each subtask node is a second predetermined value, information indicating that the subtask node meets the execution condition is generated.

5. The method according to claim 1, wherein The information stored in each task node in the graph database includes: identification information of the task node, task status of the task node, count value corresponding to the task node, node association relationship information corresponding to the task node, and task scheduling information of the task node.

6. The method according to claim 1, wherein The method further comprises: In response to detecting that the target user performs a page operation of adding or deleting a second target task node on the target page, adjusting the task relationship between the tasks to add or delete the second target task node; Determine whether there is a subsequent task node for the second target task node; In response to the second target task node having at least one subsequent task node, a count value corresponding to each subsequent task node is adjusted.

7. The method according to claim 1, wherein The graph database stores the task relationships between the tasks in the form of a directed acyclic graph.

8. The method according to claim 1, wherein The metadata of each task node in the graph database is also stored in the target distributed key-value database.

9. An information generating device comprising: an execution unit configured to execute at least one task node that meets an execution condition among task nodes stored in a graph database, wherein the graph database stores metadata of each task and task relationships between the tasks in the form of nodes, the task relationships between the tasks being stored in the graph database via a related page service, and the execution condition being that all predecessor task nodes of the task node have completed execution; a query unit configured to query the task relationships between the tasks to determine whether each task node has a corresponding subtask node in response to completion of execution of each task node in the at least one task node; a changing unit configured to, in response to the existence of at least one subtask node corresponding to the first target task node in the at least one task node, change a count value corresponding to each subtask node in the at least one subtask node, wherein the count value is used to determine whether the task node meets the execution condition; The generating unit is configured to generate information indicating whether the subtask node satisfies the execution condition according to the changed count value of each subtask node in the at least one subtask node.

10. An electronic device comprising: one or more processors; a storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the method according to any one of claims 1 to 8.

11. A computer-readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • DAG task scheduling method and device based on offline computing platform

    CN108984284A