Method and apparatus for generating a relationship graph

By generating target data structures and node location information, the problem of uneven tree diagrams caused by complex relationships between scheduling tasks is solved, achieving efficient drawing of relationship diagrams and improved user experience.

CN116170511BActive Publication Date: 2025-11-04ZHUHAI KINGSOFT ONLINE GAME TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310007464.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-04
Publication Date
2025-11-04
Estimated Expiration
2043-01-04

AI Technical Summary

Technical Problem

In the data platform, the complex relationships between scheduling tasks result in an uneven distribution of scheduling tasks in the tree diagram, affecting the user experience.

Method used

By receiving a relationship graph drawing request, the scheduling task nodes, their sizes, and relationships are determined, the target data structure is generated, the current node position is determined based on the data substructure and the initial node position information, and the relationship graph is rendered and generated.

Benefits of technology

It enables efficient and uniform drawing of the scheduling task relationship graph, improving user experience and search efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116170511B_ABST
    Figure CN116170511B_ABST
Patent Text Reader

Abstract

The application provides a relationship graph generation method and device, wherein the relationship graph generation method comprises: receiving a relationship graph drawing request for a target service, determining each scheduling task node corresponding to the target service, node size information of each scheduling task node, and a node association relationship between scheduling task nodes; generating a target data structure according to each scheduling task node and the node association relationship between scheduling task nodes, wherein the target data structure comprises data substructures and node initial position information corresponding to each scheduling task node; determining current node position information corresponding to each scheduling task node based on each data substructure, node size information, and node initial position information of scheduling task nodes in each data substructure; and rendering and generating a relationship graph corresponding to the target service according to the current node position information corresponding to each scheduling task node.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a relationship graph generation method. The present application also relates to a relationship graph generation device, a computing device and a computer readable storage medium. BACKGROUND

[0002] In the current data platform, according to the business needs, corresponding scheduling tasks are created to execute corresponding business operations. Some scheduling tasks have an association relationship. In the case of a complex association relationship between scheduling tasks, if a scheduling task fails, each scheduling task in the scheduling task list needs to be determined one by one to troubleshoot the problem scheduling task.

[0003] In order to improve the search efficiency of scheduling tasks, a tree diagram can be drawn according to the association relationship between scheduling tasks, so as to locate the scheduling tasks with the association relationship based on the tree diagram. However, the above method may result in a scheduling task corresponding to cross-level associated tasks, which causes the scheduling tasks drawn in the tree diagram to be unevenly distributed, affecting the user experience.

[0004] Therefore, how to efficiently and evenly draw the task relationship diagram of the scheduling task and improve the user experience has become a technical problem to be solved by the technical personnel in the field. SUMMARY

[0005] Therefore, the embodiments of the present application provide a relationship graph generation method. The present application also relates to a relationship graph generation device, a computing device and a computer readable storage medium to solve the above problems in the prior art.

[0006] According to a first aspect of the embodiments of the present application, a relationship graph generation method is provided, comprising:

[0007] receiving a relationship graph drawing request for a target business, determining each scheduling task node corresponding to the target business, node size information of each scheduling task node and node association relationship between scheduling task nodes;

[0008] generating a target data structure according to each scheduling task node and the node association relationship between the scheduling task nodes, wherein the target data structure includes a data substructure and node initial position information corresponding to each scheduling task node;

[0009] determining current node position information corresponding to each scheduling task node based on each data substructure, node initial position information and node size information corresponding to the scheduling task node in each data substructure;

[0010] According to the current node position information corresponding to each scheduling task node, a relationship diagram corresponding to the target service is rendered and generated.

[0011] According to a second aspect of the embodiment of the present application, a relationship diagram generation apparatus is provided, comprising:

[0012] A receiving module is configured to receive a relationship diagram drawing request for a target service, determine each scheduling task node corresponding to the target service, node size information of each scheduling task node, and a node association relationship between scheduling task nodes;

[0013] A generating module is configured to generate a target data structure according to each scheduling task node and the node association relationship between scheduling task nodes, wherein the target data structure comprises data substructures and node initial position information corresponding to each scheduling task node.

[0014] A determining module is configured to determine current node position information corresponding to each scheduling task node based on each data substructure, node initial position information corresponding to the scheduling task node in each data substructure, and node size information.

[0015] A rendering module is configured to render and generate a relationship diagram corresponding to the target service according to the current node position information corresponding to each scheduling task node.

[0016] According to a third aspect of the embodiment of the present application, a computing device is provided, comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor executes the computer instructions to implement the steps of the relationship diagram generation method.

[0017] According to a fourth aspect of the embodiment of the present application, a computer readable storage medium is provided, which stores computer instructions executable by a processor to implement the steps of the relationship diagram generation method.

[0018] The relationship diagram generation method provided by the present application receives a relationship diagram drawing request for a target service, determines each scheduling task node corresponding to the target service, node size information of each scheduling task node, and a node association relationship between scheduling task nodes; generates a target data structure according to each scheduling task node and the node association relationship between scheduling task nodes, wherein the target data structure comprises data substructures and node initial position information corresponding to each scheduling task node; determines current node position information corresponding to each scheduling task node based on each data substructure, node initial position information corresponding to the scheduling task node in each data substructure, and node size information; and renders and generates a relationship diagram corresponding to the target service according to the current node position information corresponding to each scheduling task node.

[0019] An embodiment of the present application realizes generating a target data structure based on a scheduling task node and a node association relationship, so as to draw a relationship graph based on the target data structure; determining current node position information based on node initial position information and node size information of the scheduling task node corresponding to the data substructure, thereby realizing determining a drawable area of the node in the relationship graph based on the data substructure; and drawing the relationship graph corresponding to the target service according to the current node position information, thereby improving the accuracy of the relationship graph drawing. BRIEF DESCRIPTION OF DRAWINGS

[0020] Figure 1 is a flowchart of a relationship graph generation method provided by an embodiment of the present application;

[0021] Figure 2 is a flowchart of a relationship graph generation method provided by an embodiment of the present application;

[0022] Figure 3a is a processing flowchart of a relationship graph generation method applied to a webpage service provided by an embodiment of the present application;

[0023] Figure 3b is a flowchart of a current horizontal coordinate calculation process provided by an embodiment of the present application;

[0024] Figure 4 is a structural diagram of a relationship graph generation apparatus provided by an embodiment of the present application;

[0025] Figure 5 is a structural block diagram of a computing device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0026] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. However, the present application can be practiced without the specific details. In other instances, well-known methods, procedures, components, and circuits have not been described in detail so as not to obscure the present application.

[0027] The terminology used in this description is for the purpose of describing particular embodiments only and is not intended to limit one or more embodiments of the present application. As used in one or more embodiments of the present application and the accompanying claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0028] It should be understood that, although the terms first, second, etc. can be employed in describing various information in one or more embodiments of the present application, the information should not be limited to these terms. These terms are only used to differentiate one piece of information from another piece of information. For example, without departing from the scope of one or more embodiments of the present application, first can also be referred to as second, and similarly, second can also be referred to as first. Depending on the context, the word "if" as used herein can be interpreted as "when" or "upon" or "in response to determining".

[0029] Firstly, the noun terms related to one or more embodiments of the present application are explained.

[0030] Tree data structure: Tree data structure is an important class of nonlinear data structure. Tree data structure can represent the one-to-many relationship between data tables. Among them, tree and binary tree are the most commonly used, and tree is a hierarchical structure defined by branching relationship.

[0031] Parent node: a node that has at least one direct child node under it.

[0032] Child node: a node that has at least one corresponding parent node.

[0033] At present, in the big data platform, many scheduling tasks are created to perform certain operations, and some scheduling tasks are executed by other scheduling tasks, which forms a relationship. When the number of association relationships increases, it is difficult to find the association relationship between tasks through the scheduling task list. When a scheduling task in the associated task fails, it is necessary to check which task has failed one by one through the task list.

[0034] At present, the way to solve the above problem is to use the ordinary tree structure to show the association relationship between scheduling tasks; however, in actual application, not only all the nodes associated with the target node need to be displayed, but also all the nodes associated with it, and some nodes may have more than one associated node, and there may be cross-level associated nodes, so the ordinary tree structure cannot meet the current needs.

[0035] In the present application, a relationship graph generation method is provided, and the present application also relates to a relationship graph generation device, a computing device and a computer readable storage medium, which are described in detail one by one in the following embodiments.

[0036] Figure 1 The flowchart of the relationship graph generation method provided by an embodiment of the present application is shown, specifically:

[0037] The relationship diagram drawing request for the target service is received, and a node list corresponding to the target service and an association relationship list corresponding to the node list are determined. The node list includes scheduling task nodes corresponding to the target service and node content information of each scheduling task node, such as node 01, node 02, node 03, and node content information of node 01 and node content information of node 02. Based on the node content information, node size information can be determined, that is, the size of the subsequent node drawing can be determined based on the size of the location of the node display content. The association relationship list includes the association relationship between each scheduling task node, such as node 06 being the parent node of node 03.

[0038] Each scheduling task node in the node list is converted into a tree data structure based on the association relationship list, that is, a data substructure is determined based on the association relationship corresponding to each scheduling task node, and a target data structure is formed by each data substructure, as shown in the following figure. Figure 1 The tree data structure in the figure is a schematic diagram of a data storage structure, which is used to illustrate the storage logic of data, for example, node 06 is the parent node of node 03, and node 01 is the child node of node 03. After converting the node data into a tree data structure, each node data in the tree data structure is traversed. The data substructure in which the scheduling task node is located is determined, which is used to calculate the current node position information of each scheduling task node in the relationship diagram, wherein the data substructure includes the scheduling task node being a parent node type, the existence of a parent node and being a first child node corresponding to the parent node type, and the existence of multiple parent node types. Further, based on the current node position information and the node size information corresponding to the scheduling task node, the nodes in the relationship diagram are drawn, and the connection lines are drawn based on the association relationship, to obtain the relationship diagram corresponding to the target service, as shown in the following figure. Figure 1 The relationship diagram shows that node 04 is the parent node of node 03 and node 02, and node 10 is the parent node of node 08.

[0039] The relationship diagram drawing method of the present application generates a target data structure based on the scheduling task node and the node association relationship, so as to draw the relationship diagram based on the target data structure. Based on the node initial position information and the node size information of the scheduling task node corresponding to the data substructure, the current node position information is determined, so as to realize the determination of the drawable area of the node in the relationship diagram based on the data substructure. According to the current node position information, the relationship diagram corresponding to the target service is drawn, and the accuracy of the relationship diagram drawing is improved.

[0040] Figure 2 A flowchart of a relationship diagram generation method according to an embodiment of the present application is shown, which specifically includes the following steps:

[0041] Step 202: receiving a relationship drawing request for a target service, determining each scheduling task node corresponding to the target service, node size information of each scheduling task node, and node association relationship between scheduling task nodes.

[0042] The relationship drawing request refers to a request for drawing an association relationship between scheduling task nodes corresponding to a target service. The target service refers to a service with multiple scheduling tasks, and some of the scheduling tasks have an association relationship. For example, the target service can be a game service, a communication service, a drawing service, etc. That is, any service that meets the condition of containing multiple scheduling tasks and some of the scheduling tasks having an association relationship is acceptable, which is not limited in the present application.

[0043] The scheduling task node refers to a node corresponding to a scheduling task. The scheduling task refers to a task existing in the target service, for example, a game task. The node size information refers to the size information when drawing the scheduling task node. For example, if a rectangular scheduling task node is drawn, the node size information is node width information and node height information. If a circular node is drawn, the node size information is node radius information, etc. The node association relationship refers to the containment relationship between scheduling task nodes, such as node 01 being a parent node of node 02, node 03 being a child node of node 01, etc.

[0044] In a specific embodiment of the present application, a relationship drawing request for a game service is received. In response to the relationship drawing request, the scheduling task nodes corresponding to the game service, the size information of the scheduling task nodes, and the association relationship between the scheduling task nodes are determined. For example, a virtual model scheduling task node and a model face scheduling task node corresponding to the game service are determined, and it is determined that the virtual model scheduling task node is a parent node of the model face scheduling task node.

[0045] In actual application, in order to facilitate subsequent display of the content to be displayed by the scheduling task node, after determining the node content information to be displayed corresponding to the scheduling task, the drawing size information of the scheduling task node can be determined based on the node content information to be displayed.

[0046] Specifically, the method for determining each scheduling task node corresponding to the target service, the size information of each scheduling task node, and the node association relationship between the scheduling task nodes can include:

[0047] Obtaining a scheduling task node list corresponding to the target service and an association relationship list corresponding to the scheduling task node list, wherein the association relationship list stores the association relationship between the scheduling task nodes;

[0048] Determining each scheduling task node in the scheduling task node list and node content information corresponding to each scheduling task node;

[0049] According to each node content information, determine the size information corresponding to each scheduling task node.

[0050] Wherein, the scheduling task node list refers to the list composed of the scheduling task nodes corresponding to the target service, each scheduling task node has corresponding node information, such as node state information, node content information, etc.; the association relationship list refers to the list composed of the association relationship between the scheduling task nodes corresponding to the target service; the node content information refers to the node information to be displayed of the scheduling task node, for example, the node content information is node identification information, such as "01", "a1", etc., node state information, such as "execution success", "execution in progress", etc.

[0051] Specifically, determine the scheduling task node list and the association relationship list corresponding to the target service; obtain the node content information corresponding to each scheduling task node in the scheduling task node list, and set the size information corresponding to each scheduling task node based on the node content information, for example, it is determined that the node content information contains 4 characters "0010", the node height can be set to 5px, and the node width is 16px.

[0052] In a specific embodiment of the present application, the scheduling task node list corresponding to the game service is obtained, containing node 01, node 02 and node 03; the association relationship list corresponding to the scheduling task node list is determined, including that node 01 is the parent node of node 02, and node 01 is the parent node of node 03; the node content information of each scheduling task node is obtained, that is, the node content information "01" corresponding to node 01, the node content information "02" corresponding to node 02 and the node content information "03" corresponding to node 03 are obtained; according to the node content information "01" is 2 characters, it is determined that the node size information of node 01 can be node height 5px and node width 8px; similarly, it can be determined that the node size information of node 02 and node 03 is node height 5px and node width 8px.

[0053] By obtaining the scheduling task nodes in the scheduling task node list and the corresponding node content information, the size information corresponding to each scheduling task node can be determined based on the node content information, and then the scheduling task nodes which can completely display the node content information can be drawn subsequently; the association relationship between the scheduling task nodes is determined based on the association relationship list, so that the relationship diagram can be drawn based on the association relationship subsequently.

[0054] Step 204: generating a target data structure according to each scheduling task node and the node association relationship between the scheduling task nodes, wherein the target data structure contains a data substructure and node initial position information corresponding to each scheduling task node.

[0055] After determining each scheduling task node corresponding to the target service and the association relationship between each scheduling task node, the scheduling task node can be converted into a target data structure based on the association relationship for storage.

[0056] The target data structure refers to a data structure obtained by storing the scheduling task node based on the association relationship of the scheduling task node. In the present application, the target data structure can be a tree data structure, such as a binary tree structure, a binary search tree structure, etc. The data substructure refers to a substructure that constitutes the target data structure. For example, if the target data structure is composed of one parent node and three child nodes, the data structure corresponding to the parent node and two child nodes is a data substructure. The parent node can be a data substructure, and any child node can be a data substructure. The node initial position information refers to the node coordinate information set in advance for the scheduling task node.

[0057] In actual application, the method for generating the target data structure according to each scheduling task node and the node association relationship between the scheduling task nodes can include:

[0058] Generating a data substructure based on the association relationship corresponding to each scheduling task node, and setting initial position information for each scheduling task node;

[0059] Generating the target data structure corresponding to the target service according to each data substructure.

[0060] Specifically, the association relationship corresponding to each scheduling task node is determined, and each scheduling task node is processed in turn based on the association relationship to obtain a data substructure, and the target data structure is generated from each data substructure. At the same time, initial position information is set for each scheduling task node, for example, the initial position coordinates of node 01 are set as (0, 0), so that (0, 0) can be used as the upper left corner of a rectangle to draw a scheduling task node conforming to the node size information.

[0061] In a specific embodiment of the present application, the scheduling task nodes 01, 02, 03, 04 and 05 corresponding to the game service are determined. The data substructure is drawn according to the association relationship corresponding to each scheduling task node. Specifically, node 01 is determined as the parent node of nodes 02 and 03, so that data substructure 1 can be obtained by storing node 01, node 02 and node 03 and their corresponding node association relationship in turn. Node 04 is determined as the parent node of node 05, so that data substructure 2 can be obtained by storing node 04, node 05 and their corresponding node association relationship in turn. The target data structure corresponding to the game service is generated from data substructure 1 and data substructure 2.

[0062] The association relationship between the scheduling task nodes and the target data structure generated by each scheduling task node are used to draw a relationship diagram with higher accuracy based on the target data structure.

[0063] In step 206, the current node position information corresponding to each scheduling task node is determined based on each data substructure and the node initial position information and node size information corresponding to each scheduling task node in each data substructure.

[0064] After the target data structure corresponding to the target service is determined, the current node position information corresponding to the node initial position information can be calculated based on the data substructure in the target data structure.

[0065] In actual applications, the method for determining the current node position information corresponding to each scheduling task node based on each data substructure and the node initial position information and node size information corresponding to each scheduling task node in each data substructure can include:

[0066] determining a target scheduling task node corresponding to a target data substructure;

[0067] determining a current longitudinal coordinate based on the node initial longitudinal coordinate information, node size information, and preset node spacing information corresponding to the target scheduling task node;

[0068] determining a current transverse coordinate based on the node initial transverse coordinate information, node size information, preset node spacing information, and substructure type corresponding to the target scheduling task node.

[0069] The target data substructure refers to any one of the data substructures in the target data structure, the target scheduling task node refers to any one of the scheduling task nodes in each scheduling task node in the target data substructure, the node initial position information includes node initial transverse coordinate information and node initial longitudinal coordinate information, the node initial transverse coordinate information refers to the initial transverse coordinate of the target scheduling task node, for example, the initial transverse coordinate is 0, the node initial longitudinal coordinate information refers to the initial longitudinal coordinate of the target scheduling task node, for example, the initial longitudinal coordinate is 0, the preset node spacing information refers to the node spacing set based on service requirements, for example, the preset node spacing can be set to 5px, the current node position information includes a current longitudinal coordinate and a current transverse coordinate, and the substructure type refers to the type of the data substructure.

[0070] Further, in actual applications, the method for determining the current longitudinal coordinate based on the node initial longitudinal coordinate information, node size information, and preset node spacing information corresponding to the target scheduling task node can include:

[0071] determining a target association relationship corresponding to the target scheduling task node and obtaining node hierarchical information in the target association relationship;

[0072] According to the node level information, the node initial longitudinal coordinate information, the node height information and the preset node spacing information, a current longitudinal coordinate of the target scheduling task node is calculated.

[0073] The target association relationship refers to an association relationship corresponding to the target scheduling task node. The association relationship can be used to determine an associated node and node level information corresponding to the scheduling task node. The node level information refers to a level of the node in the data substructure. For example, the data substructure includes a root node 01 and child nodes 02 and 03. It is determined that the root node 01 corresponds to a level 1, and the child nodes 02 and 03 correspond to a level 2.

[0074] Specifically, the node height information corresponding to each scheduling task node can be set to the same value, so that the subsequent drawing of the relationship diagram is more in line with the requirements. Based on the node level information, the node height information, the preset node spacing information and the node initial longitudinal coordinate information of the target scheduling task node, the method for calculating the current longitudinal coordinate corresponding to the target scheduling task node can be: current longitudinal coordinate = node level information * (node height information + preset node spacing information).

[0075] In a specific embodiment of the present application, the node level information of the node 01 corresponding to the game service is 2, the node height information is 5px, and the preset node spacing information is 3px. It is determined that the current longitudinal coordinate of the node 01 is 2 * (5 + 3) = 16, that is, the current longitudinal coordinate corresponding to the node 01 is 16.

[0076] Further, in actual application, the calculation method of the current longitudinal coordinate is different under different substructure types. Specifically, in the case where the substructure type is the first type, the method for determining the current longitudinal coordinate according to the node initial longitudinal coordinate information, the node size information, the preset node spacing information and the substructure type corresponding to the target scheduling task node includes:

[0077] In the case where the substructure type corresponding to the target scheduling task node is the first type, the associated child nodes and the associated parent node are determined based on the association relationship corresponding to the target scheduling task node.

[0078] The node horizontal coordinate, the node width information corresponding to the associated parent node and the node width information corresponding to each associated child node are obtained.

[0079] The current horizontal coordinate of the target scheduling task node is calculated based on the node horizontal coordinate, the node width information corresponding to the associated parent node and the node width information corresponding to each associated child node.

[0080] The first type refers to a scheduling task node having a corresponding parent node and being the first child node of the parent node, the associated child node refers to a child node having an association relationship with the target scheduling task node, the associated parent node refers to a parent node having an association relationship with the target scheduling task node, for example, it is determined that node 02 has a parent node 01 and child nodes 02 and 04, and the corresponding substructure type of node 02 is the first type, the node abscissa refers to the abscissa of the associated parent node, and the node width information refers to the width information of the associated parent node, for example, the width information 16px of the parent node 01.

[0081] Specifically, the current abscissa of the target scheduling task node is calculated based on the node abscissa, the node width information of the associated parent node and the node width information of each associated child node, specifically, the current abscissa is calculated according to the sum of the node abscissa, the node width information of the associated parent node and the node width information of each associated child node, and the specific calculation formula is: current abscissa = node abscissa of associated parent node = (node width information - sum of node width information) / 2.

[0082] In a specific embodiment of the present application, the parent node 02 and the child nodes 03 and 04 of the node 01 corresponding to the game service are determined, the abscissa 20 and the node width information 10px of the parent node 01 are determined, the width information 4 of the child node 03 and the width information 4 of the child node 04 are determined, the sum of the node width is 8, and the current abscissa of the node 01 = 20 - (10-8) / 2 = 19.

[0083] Further, in the case where the substructure type is the first type, after the current abscissa is calculated, it is judged whether the current abscissa is greater than the abscissa of the node already occupied in the same level, if yes, the calculated abscissa is directly taken as the current abscissa, if not, the abscissa of the node already occupied is added with the preset node spacing information to be taken as the current abscissa.

[0084] The above is the determination of the case where the substructure type is the first type, if the target scheduling task node does not conform to the first type, the abscissa of the node already occupied is added with the preset node spacing information to be taken as the current abscissa, and then the next step of judgment is performed to determine whether the substructure corresponding to the target scheduling task node is the second type.

[0085] In the case where the substructure type is the second type, the current abscissa is determined according to the node initial abscissa information, the node size information, the preset node spacing information and the substructure type of the target scheduling task node, including:

[0086] In a case where the substructure type corresponding to the target scheduling task node is the second type, an associated subnode is determined based on the association relationship corresponding to the target scheduling task node;

[0087] A node horizontal coordinate corresponding to each associated subnode is calculated to obtain a node horizontal coordinate set;

[0088] A current horizontal coordinate of the target scheduling task node is calculated according to a first horizontal coordinate and a second horizontal coordinate in the node horizontal coordinate set, node width information corresponding to the second horizontal coordinate, and width information of the target scheduling task node.

[0089] The second type refers to a type in which the scheduling task node is a parent node; the node horizontal coordinate set is composed of node horizontal coordinates of associated subnodes corresponding to the target scheduling task node; the first horizontal coordinate refers to a horizontal coordinate of an associated subnode located at a head, and the second horizontal coordinate refers to a horizontal coordinate of an associated subnode located at a tail.

[0090] Specifically, in a case where it is determined that the target scheduling task node is a parent node, an associated node set corresponding to the target scheduling task node is determined, and a node horizontal coordinate corresponding to each associated node is determined. The specific calculation method of the node horizontal coordinate can refer to the calculation method when the substructure corresponding to the target scheduling task is the first type, which is not repeated here. The horizontal coordinate of the first node corresponding to the target scheduling task node and the horizontal coordinate of the last node in the node horizontal coordinate set, i.e., the first horizontal coordinate and the second horizontal coordinate, are determined. The formula for calculating the current horizontal coordinate based on the first horizontal coordinate, the second horizontal coordinate, the node width information corresponding to the second horizontal coordinate, and the node width information corresponding to the target scheduling task node is: current horizontal coordinate = first horizontal coordinate-(second horizontal coordinate+node width corresponding to the second horizontal coordinate-first horizontal coordinate) / 2-node width of the target scheduling task node / 2.

[0091] In a specific embodiment of the present application, it is determined that the node 01 corresponding to the game service is a parent node, then each subnode corresponding to the node 01 is traversed, the node horizontal coordinate is calculated to obtain a node horizontal coordinate set, the first horizontal coordinate of the first subnode corresponding to the node 01, the second horizontal coordinate of the last subnode corresponding to the node 01, the node width information of the last subnode, and the width information of the node 01 are determined, and the current horizontal coordinate of the node 01 = first horizontal coordinate-(second horizontal coordinate+node width of the last subnode-first horizontal coordinate) / 2-width of the node 01 / 2.

[0092] Specifically, in a case where it is further determined that the substructure corresponding to the target scheduling task is neither the first type nor the second type, it is determined whether the substructure is a third type.

[0093] In a case where the substructure type is the third type, the current horizontal coordinate is determined according to the node initial horizontal coordinate information, the node size information, the preset node spacing information and the substructure type corresponding to the target scheduling task node, and the current horizontal coordinate is determined according to the node initial horizontal coordinate information, the node size information, the preset node spacing information and the substructure type corresponding to the target scheduling task node.

[0094] In a case where the substructure type corresponding to the target scheduling task node is the third type, each associated parent node is determined based on the association relationship corresponding to the target scheduling task node.

[0095] The current horizontal coordinate of the target scheduling task node is calculated according to the node horizontal coordinate corresponding to each associated parent node.

[0096] The third type refers to a type in which a scheduling task node has at least two parent nodes and is the only child node of any one parent node.

[0097] Specifically, each associated parent node corresponding to the target scheduling task node is determined, and the horizontal coordinate of each associated parent node is determined. The middle value of the horizontal coordinate of each associated parent node is taken as the current horizontal coordinate, that is, the calculation formula is: current horizontal coordinate = (horizontal coordinate of first child node + horizontal coordinate of second child node) / 2, wherein the first child node is the leftmost associated parent node, and the second child node is the rightmost child node.

[0098] For example, the parent nodes 01 and 03 of node 02 are determined, the horizontal coordinate of node 01 is 10, and the horizontal coordinate of node 03 is 8. Then the current horizontal coordinate of node 02 is (10+8) / 2 = 9.

[0099] In an embodiment of the present application, it is determined that the node 01 corresponding to the game service has three parent nodes, namely, the node 02, the node 03 and the node 04. The horizontal coordinate of the node 02 is 6, the horizontal coordinate of the node 03 is 12, and the horizontal coordinate of the node 04 is 18. Then the middle value of the parent node horizontal coordinate is calculated as (6+18) / 2 = 12.

[0100] By determining the calculation method of the vertical coordinate based on the data substructure, the current horizontal coordinate corresponding to each scheduling task node is obtained, so that the subsequent relationship diagram based on the current horizontal coordinate has higher accuracy and the spacing between nodes is more uniform.

[0101] Step 208: according to the current node position information corresponding to each scheduling task node, a relationship diagram corresponding to the target service is rendered and generated.

[0102] The relationship diagram refers to a schematic diagram composed of scheduling task nodes and connection lines between the scheduling task nodes.

[0103] In actual application, the method of rendering and generating a relationship diagram corresponding to the target service according to the current node position information corresponding to each scheduling task node can include:

[0104] determine a current horizontal coordinate, a current vertical coordinate and node size information corresponding to each scheduling task node;

[0105] determine current node position information based on each current horizontal coordinate and current vertical coordinate, and draw each scheduling task node according to the current node position information and node size information;

[0106] draw node connection lines between each scheduling task node according to the association relationship corresponding to each scheduling task node, and obtain a relationship diagram corresponding to the target service.

[0107] The node connection line refers to a connection line between scheduling task nodes, which can be a directed line or an undirected line. In the case of a directed line, it can be pointed from a parent node to a child node or from a child node to a parent node.

[0108] Specifically, after determining the current horizontal coordinate, the current vertical coordinate and the node size information corresponding to each scheduling task node, the scheduling task node is drawn based on the current horizontal coordinate and the current vertical coordinate as reference points. According to different drawing methods, the reference point can be determined based on the current horizontal coordinate and the current vertical coordinate. If a rectangular node is drawn, the reference point can be the center point of the rectangle, the midpoint of the left edge of the rectangle, the top-left corner point, the top-right corner point, etc., which can be set based on the drawing requirements. If a circular node is drawn, the reference point can be the center point of the circle, etc.

[0109] In a specific embodiment of the present application, the current horizontal coordinate of the node 01 corresponding to the game service is determined to be 12, and the current vertical coordinate is determined to be 6. The node size information of the node 01 is determined to be: the node height information is 6, and the node width information is 6. Since the current horizontal coordinate and the current vertical coordinate of the node 01 are the midpoints of the left edge of the rectangle, it can be determined that the coordinates of the top-left corner of the node rectangle are (12, 9), the coordinates of the top-right corner are (18, 9), the coordinates of the bottom-left corner are (12, 3), and the coordinates of the bottom-right corner are (18, 3). The determined coordinate points are connected to obtain a node rectangle, and the node content "01" is added in the node rectangle, thereby completing the drawing of the node 01.

[0110] In actual application, each scheduling task node contains node state information, which can also be displayed in the node of the relationship diagram.

[0111] Specifically, the method of drawing each scheduling task node according to the current node position information and node size information can include:

[0112] drawing each scheduling task node according to the current node position information, node state information and node size information.

[0113] Among them, node status information refers to the task processing status information of the scheduled task, such as task execution success, task completion, task failure, etc.

[0114] In a specific embodiment of this application, the current node position information, node status information "execution completed" and node size information of node 01 corresponding to the game service are determined; after drawing a node rectangle based on the current node position information and node size information, the node status information is added to the node rectangle to complete the drawing of node 01.

[0115] After the relationship diagram is drawn, it can be displayed based on a display request. Specific methods may include:

[0116] Receive a link display request, and determine the scheduling task node to be displayed based on the link display request;

[0117] In the relationship graph, determine the associated nodes corresponding to the scheduling task node to be displayed, and obtain the link to be displayed;

[0118] The link to be displayed is marked and shown.

[0119] Among them, a link display request refers to a request to display a portion of the content in the relationship diagram; a node to be displayed is a node used to determine the link to be displayed, which can be a user-inputted or triggered node; a link to be displayed refers to a link consisting of the node to be displayed and nodes that are expected to have a relationship.

[0120] Specifically, the task nodes to be displayed are determined based on the link display request; further, the associated nodes corresponding to the task nodes to be displayed are determined according to the relationship in the relationship graph, forming the links to be displayed; the links to be displayed are marked, for example, by setting the display attribute of the links to be displayed to be displayable, setting the background of the links to be displayed to a background color that is different from other nodes, etc., so that the links to be displayed corresponding to the request can be highlighted.

[0121] When the scheduling task nodes in the relationship graph contain node status information, scheduling task nodes in the same node status can also be displayed in the relationship graph based on the display request. This makes it easier for users to find the scheduling task node with the corresponding node status based on their needs, thereby avoiding the need for users to check each scheduling task node one by one when looking for nodes in the task failure state, thus improving the efficiency of task checking.

[0122] The relationship graph generation method of the present application receives a relationship graph drawing request for a target service, determines each scheduling task node corresponding to the target service, node size information of each scheduling task node, and node association relationship between scheduling task nodes; generates a target data structure according to each scheduling task node and the node association relationship between scheduling task nodes, wherein the target data structure contains data substructures and node initial position information corresponding to each scheduling task node; determines current node position information corresponding to each scheduling task node based on each data substructure and the node initial position information and node size information of the scheduling task nodes corresponding to each data substructure; and renders and generates a relationship graph corresponding to the target service according to the current node position information corresponding to each scheduling task node.

[0123] An embodiment of the present application generates a target data structure based on scheduling task nodes and node association relationships, so as to draw a relationship graph based on the target data structure; determines current node position information based on node initial position information and node size information of the scheduling task nodes corresponding to a data substructure, so as to determine a drawable area of a node in a relationship graph based on the data substructure; and draws a relationship graph corresponding to a target service according to current node position information, thereby improving the accuracy of relationship graph drawing.

[0124] The following describes the relationship graph generation method of the present application with reference to the accompanying drawings. Figure 3a The relationship graph generation method provided by the present application is described in further detail below with reference to the application of the relationship graph generation method to a web service. Wherein, Figure 3a FIG. 1 shows a processing flowchart of a relationship graph generation method applied to a web service according to an embodiment of the present application, which specifically includes the following steps:

[0125] Step 302: Receive a relationship graph drawing request for a web service, and determine a scheduling task list and an association relationship list corresponding to the web service.

[0126] Step 304: Determine node content information corresponding to each scheduling task node in the scheduling task list, and determine node size information corresponding to each scheduling task node based on each node content information.

[0127] Step 306: Generate a data substructure based on the association relationship corresponding to each scheduling task node, and set initial position information for each scheduling task node.

[0128] Step 308: Generate a target data structure corresponding to the web service according to each data substructure.

[0129] Step 310: Determine a target scheduling task node corresponding to the target data substructure, and determine a current vertical coordinate according to node initial vertical coordinate information, node size information, and preset node spacing information corresponding to the target scheduling task node.

[0130] Specifically, the node height information is determined based on the node size information, the current longitudinal coordinate = node level information * (node height information + preset node spacing information), and the node initial longitudinal coordinate information is replaced with the current longitudinal coordinate.

[0131] Step 312: determining the current horizontal coordinate according to the node initial horizontal coordinate information of the target scheduling task node, the node size information, the preset node spacing information and the substructure type.

[0132] Specifically, under different substructure types, the calculation method of the current horizontal coordinate is different, and the calculation process of the current horizontal coordinate is as shown in Figure 3b , and specifically includes the following steps:

[0133] Step 31202: determining that the target scheduling task node is node 01 in the target data structure.

[0134] Step 31204: judging whether the node 01 has a parent node and is the first child node; if yes, executing step 31206; if not, executing step 31210.

[0135] Step 31206: determining the associated parent node and the associated child node of the node 01, and calculating the current horizontal coordinate of the node 01 according to the horizontal coordinate of the parent node, the width of the parent node and the width of the associated child node.

[0136] Step 31208: judging whether the current horizontal coordinate of the node 01 is greater than the horizontal coordinate of the occupied node in the same level; if yes, executing step 31212, if not, executing step 31210.

[0137] Step 31210: the current coordinate of the node 01 is equal to the sum of the horizontal coordinate of the occupied node in the same level and the preset node gap.

[0138] Step 31212: judging whether the node 01 is a parent node; if yes, executing step 31214, if not, executing step 31216.

[0139] Step 31214: determining the value of the variable i and the number of child nodes corresponding to the node 01.

[0140] Step 31216: judging whether the node 01 has multiple parent nodes and the parent node has only one child node; if yes, executing step 31218; if not, executing step 31220.

[0141] Step 31218: determining the node horizontal coordinate of each parent node corresponding to the node 01, and calculating the middle value of the node horizontal coordinate as the current horizontal coordinate of the node 01.

[0142] Step 31220: end the calculation of the current horizontal coordinate of this round.

[0143] Step 31222: determine whether each child node of the node 01 is traversed, that is, determine whether i is less than the number of child nodes; if yes, execute step 31224, and if no, execute step 31226.

[0144] Step 31224: determine each associated child node corresponding to the node 01, and calculate the current horizontal coordinate according to the horizontal coordinate of each first child node, the horizontal coordinate of the last child node, the width of the last child node, the horizontal coordinate of the first child node and the node width of the node 01.

[0145] Step 31226: take the associated child node corresponding to the node 01 as a target scheduling task node, and continue to execute step 31202.

[0146] Step 314: draw each scheduling task node according to the current node position information and the node size information.

[0147] Step 316: draw node connection lines between each scheduling task node according to the association relationship corresponding to each scheduling task node, and obtain a relationship diagram corresponding to a webpage business.

[0148] The relationship diagram generation method provided in the application receives a relationship diagram drawing request for a target business, determines each scheduling task node corresponding to the target business, node size information of each scheduling task node and node association relationship between scheduling task nodes, generates a target data structure according to each scheduling task node and the node association relationship between scheduling task nodes, wherein the target data structure contains a data substructure and node initial position information corresponding to each scheduling task node, determines current node position information corresponding to each scheduling task node based on each data substructure and the node initial position information and the node size information of the scheduling task node corresponding to each data substructure, and renders and generates a relationship diagram corresponding to the target business according to the current node position information corresponding to each scheduling task node.

[0149] An embodiment of the application realizes generating a target data structure based on scheduling task nodes and node association relationships, so as to draw a relationship diagram based on the target data structure, determines current node position information based on node initial position information and node size information of the scheduling task node corresponding to a data substructure, thereby realizing determining a drawable area of a node in a relationship diagram based on the data substructure, and draws a relationship diagram corresponding to a target business according to the current node position information, thereby improving the accuracy of relationship diagram drawing.

[0150] Corresponding to the method embodiments described above, the application also provides relationship diagram generation device embodiments, Figure 4A structural schematic diagram of a relationship graph generation apparatus is shown. As shown in Figure 4 The apparatus comprises:

[0151] A receiving module 402 is configured to receive a relationship graph drawing request for a target service, determine each scheduling task node corresponding to the target service, node size information of each scheduling task node, and node association relationship between scheduling task nodes;

[0152] A generating module 404 is configured to generate a target data structure according to each scheduling task node and the node association relationship between scheduling task nodes, wherein the target data structure comprises data substructures and node initial position information corresponding to each scheduling task node;

[0153] A determining module 406 is configured to determine current node position information corresponding to each scheduling task node based on each data substructure, node initial position information corresponding to scheduling task nodes in each data substructure, and node size information;

[0154] A rendering module 408 is configured to render a relationship graph corresponding to the target service according to current node position information corresponding to each scheduling task node.

[0155] Optionally, the receiving module 402 is further configured to:

[0156] Obtain a scheduling task node list corresponding to the target service and an association relationship list corresponding to the scheduling task node list, wherein the association relationship list stores association relationships between scheduling task nodes;

[0157] Determine each scheduling task node and node content information corresponding to each scheduling task node in the scheduling task node list;

[0158] Determine size information corresponding to each scheduling task node according to each node content information.

[0159] Optionally, the generating module 404 is further configured to generate a target data structure according to each scheduling task node and the node association relationship between scheduling task nodes, comprising:

[0160] Generate a data substructure based on the association relationship corresponding to each scheduling task node, and set initial position information for each scheduling task node;

[0161] Generate a target data structure corresponding to the target service according to each data substructure.

[0162] Optionally, the determining module 406 is further configured to:

[0163] determine a target scheduling task node corresponding to the target data substructure;

[0164] determine a current longitudinal coordinate according to node initial longitudinal coordinate information, node size information and preset node spacing information corresponding to the target scheduling task node;

[0165] determine a current transverse coordinate according to node initial transverse coordinate information, node size information, preset node spacing information and substructure type corresponding to the target scheduling task node.

[0166] Optionally, the determining module 406 is further configured to:

[0167] determine a target association relationship corresponding to the target scheduling task node, and obtain node level information in the target association relationship;

[0168] calculate a current longitudinal coordinate of the target scheduling task node according to the node level information, node initial longitudinal coordinate information, node height information and preset node spacing information.

[0169] Optionally, the determining module 406 is further configured to:

[0170] in a case where a substructure type corresponding to the target scheduling task node is a first type, determine an associated child node and an associated parent node based on an association relationship corresponding to the target scheduling task node;

[0171] obtain node transverse coordinate information of the associated parent node, node width information and node width information of each associated child node;

[0172] calculate a current transverse coordinate of the target scheduling task node based on the node transverse coordinate information of the associated parent node, the node width information and the node width information of each associated child node.

[0173] Optionally, the determining module 406 is further configured to:

[0174] in a case where a substructure type corresponding to the target scheduling task node is a second type, determine an associated child node based on an association relationship corresponding to the target scheduling task node;

[0175] calculate node transverse coordinate information corresponding to each associated child node, and obtain a node transverse coordinate set;

[0176] calculate a current transverse coordinate of the target scheduling task node according to a first transverse coordinate and a second transverse coordinate in the node transverse coordinate set, and node width information corresponding to the second transverse coordinate and width information of the target scheduling task node.

[0177] Optionally, the determining module 406 is further configured to:

[0178] In a case where the substructure type corresponding to the target scheduling task node is the third type, each associated parent node is determined based on the association relationship corresponding to the target scheduling task node;

[0179] A current horizontal coordinate of the target scheduling task node is calculated according to the node horizontal coordinate corresponding to each associated parent node.

[0180] Optionally, the rendering module 408 is further configured to:

[0181] The current horizontal coordinate, the current vertical coordinate and the node size information corresponding to each scheduling task node are determined;

[0182] The current node position information is determined based on each current horizontal coordinate and current vertical coordinate, and each scheduling task node is drawn according to the current node position information and the node size information.

[0183] The node connection lines are drawn between each scheduling task node according to the association relationship corresponding to each scheduling task node, and the relationship diagram corresponding to the target business is obtained.

[0184] Optionally, each scheduling task node contains node state information, and the rendering module 408 is further configured to:

[0185] Each scheduling task node is drawn according to the current node position information, the node state information and the node size information.

[0186] Optionally, the apparatus further comprises a display module configured to:

[0187] A link display request is received, and a to-be-displayed scheduling task node is determined based on the link display request;

[0188] The associated nodes corresponding to the to-be-displayed scheduling task node are determined in the relationship diagram, and a to-be-displayed link is obtained;

[0189] The to-be-displayed link is marked and displayed.

[0190] The relationship graph generation apparatus of the present application receives a relationship graph drawing request for a target service, determines each scheduling task node corresponding to the target service, node size information of each scheduling task node, and node association relationship between scheduling task nodes; a generation module generates a target data structure according to each scheduling task node and the node association relationship between scheduling task nodes, wherein the target data structure contains data substructures and node initial position information corresponding to each scheduling task node; a determination module determines current node position information corresponding to each scheduling task node based on each data substructure, node initial position information of the scheduling task node corresponding to each data substructure, and node size information; and a rendering module renders a relationship graph corresponding to the target service according to the current node position information corresponding to each scheduling task node.

[0191] An embodiment of the present application generates a target data structure based on scheduling task nodes and node association relationship, so as to draw a relationship graph based on the target data structure; determines current node position information based on node initial position information and node size information of the scheduling task node corresponding to each data substructure, so as to determine a drawable area of a node in a relationship graph based on a data substructure; and draws a relationship graph corresponding to a target service according to current node position information, thereby improving the accuracy of relationship graph drawing.

[0192] The above is a schematic scheme of a relationship graph generation apparatus of the present embodiment. It should be noted that the technical scheme of the relationship graph generation apparatus belongs to the same concept as the technical scheme of the relationship graph generation method described above, and the details of the technical scheme of the relationship graph generation apparatus that are not described in detail can be referred to the description of the technical scheme of the relationship graph generation method.

[0193] Figure 5 A structural block diagram of a computing device 500 according to an embodiment of the present application is shown. The components of the computing device 500 include but are not limited to a memory 510 and a processor 520. The processor 520 is connected to the memory 510 through a bus 530, and a database 550 is used to save data.

[0194] The computing device 500 also includes an access device 540 that enables the computing device 500 to communicate via one or more networks 560. Examples of such networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or combinations of such networks, such as the Internet. The access device 540 can include one or more of any type of network interface (for example, a network interface card (NIC)), such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, or the like.

[0195] In one embodiment of the present application, the above-described components of the computing device 500, as well as other components not shown in FIG. 5, can be connected to one another through the bus. As will be appreciated by one skilled in the art, the bus is configured to permit communication between the components and can be implemented using any suitable protocol, architecture or arrangement. Figure 5 In one embodiment of the present application, the above-described components of the computing device 500, as well as other components not shown in FIG. 5, can be connected to one another through the bus. As will be appreciated by one skilled in the art, the bus is configured to permit communication between the components and can be implemented using any suitable protocol, architecture or arrangement. Figure 5 The computing device structure diagram shown is merely for the purpose of example, and is not a limitation on the scope of the present application. One skilled in the art can add or replace other components as needed.

[0196] The computing device 500 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (for example, a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, or the like), a mobile phone (for example, a smartphone), a wearable computing device (for example, a smart watch, smart glasses, or the like), or other type of mobile device, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 500 can also be a mobile or stationary server.

[0197] In which the processor 520 implements the steps of the relationship graph generation method when executing the computer instructions.

[0198] The above is a schematic scheme of the computing device of the embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the relationship graph generation method described above belong to the same concept, and the details of the technical scheme of the computing device that are not described in detail can be referred to the description of the technical scheme of the relationship graph generation method.

[0199] An embodiment of the present application further provides a computer readable storage medium storing computer instructions, which, when executed by a processor, implement the steps of the relationship graph generation method described above.

[0200] The above is a schematic scheme of the computer readable storage medium of the embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the relationship graph generation method described above belong to the same concept, and the details of the technical scheme of the storage medium that are not described in detail can be referred to the description of the technical scheme of the relationship graph generation method.

[0201] The specific embodiments of the present application are described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order and still achieve desirable results. Additionally, the process depicted in the figures can not necessarily require the particular order shown or sequential order to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous.

[0202] The computer instructions include computer program code, which can be in the form of source code, object code, executable code, or some intermediate form. The computer readable medium can include any entity or apparatus capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.

[0203] It should be noted that, for the aforementioned method embodiments, the sequences of the described actions are not the only ones that can be performed to implement the present application. In some embodiments, the sequences of actions can be performed in different order or simultaneously. In some embodiments, other sequences of actions can be performed, which should be apparent to a person of ordinary skill in the art in light of the teachings of the present application.

[0204] In the above embodiments, the description of each embodiment focuses on different aspects, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.

[0205] The preferred embodiments of the present application disclosed above are only used to illustrate the present application. The alternative embodiments do not describe all the details and limit the present application to the specific embodiments described. Obviously, many modifications and changes can be made according to the content of the present application. The present application selects and describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can well understand and utilize the present application. The present application is limited by the claims and their full scope and equivalents.

Claims

1. A method of generating a relationship graph, the method comprising: The method comprises the following steps: receiving a relationship drawing request for a target service, determining each scheduling task node corresponding to the target service, node size information of each scheduling task node, and node association relationship between scheduling task nodes; generating a target data structure according to each scheduling task node and the node association relationship between scheduling task nodes, wherein the target data structure is a data structure obtained by storing the scheduling task nodes based on the association relationship of the scheduling task nodes, the target data structure contains data substructures and node initial position information corresponding to each scheduling task node, the data substructures include a first type that a scheduling task node has a parent node and is the first child node of the parent node, a second type that a scheduling task node is a parent node, and a third type that a scheduling task node has at least two parent nodes and is the only child node of any parent node; determining current node position information corresponding to each scheduling task node based on each data substructure, node initial position information corresponding to the scheduling task node in each data substructure, and node size information; generating a relationship diagram corresponding to the target service according to the current node position information corresponding to each scheduling task node.

2. The method of claim 1, wherein, determining each scheduling task node corresponding to the target service, size information of each scheduling task node, and node association relationship between scheduling task nodes, comprising: obtaining a scheduling task node list corresponding to the target service and an association relationship list corresponding to the scheduling task node list, wherein the association relationship list saves the association relationship between the scheduling task nodes; determining each scheduling task node and node content information corresponding to each scheduling task node in the scheduling task node list; determining size information corresponding to each scheduling task node according to each node content information.

3. The method of claim 1, wherein, generating a target data structure according to each scheduling task node and the node association relationship between scheduling task nodes, comprising: generating data substructures based on the association relationship corresponding to each scheduling task node, and setting initial position information for each scheduling task node; generating a target data structure corresponding to the target service according to each data substructure.

4. The method of claim 1, wherein, determining current node position information corresponding to each scheduling task node based on each data substructure, node initial position information corresponding to the scheduling task node in each data substructure, and node size information, comprising: determining a target scheduling task node corresponding to a target data substructure; determining a current vertical coordinate according to node initial vertical coordinate information, node size information, and preset node spacing information corresponding to the target scheduling task node; determining a current horizontal coordinate according to node initial horizontal coordinate information, node size information, preset node spacing information, and substructure type corresponding to the target scheduling task node.

5. The method of claim 4, wherein, determining a current vertical coordinate according to node initial vertical coordinate information, node size information, and preset node spacing information corresponding to the target scheduling task node, comprising: determining a target association relationship corresponding to the target scheduling task node, and obtaining node level information in the target association relationship; The current longitudinal coordinate of the target scheduling task node is calculated according to the node level information, the node initial longitudinal coordinate information, the node height information and the preset node spacing information.

6. The method of claim 4, wherein, The current longitudinal coordinate of the target scheduling task node is calculated according to the node level information, the node initial longitudinal coordinate information, the node height information and the preset node spacing information. In a case where the substructure type corresponding to the target scheduling task node is the first type, associated child nodes and associated parent nodes are determined based on the association relationship corresponding to the target scheduling task node. The node longitudinal coordinate corresponding to the associated parent node, the node width information and the node width information corresponding to each associated child node are obtained. The current longitudinal coordinate of the target scheduling task node is calculated based on the node longitudinal coordinate corresponding to the associated parent node, the node width information and the node width information corresponding to each associated child node.

7. The method of claim 4, wherein, The current longitudinal coordinate of the target scheduling task node is calculated according to the node level information, the node initial longitudinal coordinate information, the node height information and the preset node spacing information. In a case where the substructure type corresponding to the target scheduling task node is the second type, associated child nodes are determined based on the association relationship corresponding to the target scheduling task node. The node longitudinal coordinate corresponding to each associated child node is calculated to obtain a node longitudinal coordinate set. The current longitudinal coordinate of the target scheduling task node is calculated according to the first longitudinal coordinate and the second longitudinal coordinate in the node longitudinal coordinate set, the node width information corresponding to the second longitudinal coordinate and the width information of the target scheduling task node.

8. The method of claim 4, wherein, The current longitudinal coordinate of the target scheduling task node is calculated according to the node level information, the node initial longitudinal coordinate information, the node height information and the preset node spacing information. In a case where the substructure type corresponding to the target scheduling task node is the third type, each associated parent node is determined based on the association relationship corresponding to the target scheduling task node. The current longitudinal coordinate of the target scheduling task node is calculated according to the node longitudinal coordinate corresponding to each associated parent node.

9. The method of claim 4, wherein, The relationship diagram corresponding to the target business is rendered according to the current node position information corresponding to each scheduling task node, including: The current longitudinal coordinate, the current longitudinal coordinate and the node size information corresponding to each scheduling task node are determined. The current node position information is determined based on each current longitudinal coordinate and current longitudinal coordinate, and each scheduling task node is drawn according to the current node position information and the node size information. The node connection line is drawn between each scheduling task node according to the association relationship corresponding to each scheduling task node to obtain the relationship diagram corresponding to the target business.

10. The method of claim 9, wherein, Each scheduling task node contains node state information. Each scheduling task node is drawn according to the current node position information, the node state information and the node size information. The method further includes:

11. The method of claim 1, wherein, A link display request is received, and a to-be-displayed scheduling task node is determined based on the link display request; The associated nodes corresponding to the to-be-displayed scheduling task node in the relationship diagram are determined to obtain a to-be-displayed link. ​ The link to be displayed is marked and displayed.

12. A relationship graph generation apparatus characterized by comprising: Comprise: The receiving module is configured to receive a relationship drawing request for a target service, determine each scheduling task node corresponding to the target service, node size information of each scheduling task node, and node association relationship between scheduling task nodes; The generating module is configured to generate a target data structure according to each scheduling task node and the node association relationship between scheduling task nodes, wherein the target data structure is a data structure obtained by storing the scheduling task nodes based on the association relationship between the scheduling task nodes, the target data structure contains data substructures and node initial position information corresponding to each scheduling task node, the data substructures include a first type that a scheduling task node has a parent node and is the first child node of the parent node, a second type that a scheduling task node is a parent node, and a third type that a scheduling task node has at least two parent nodes and is the unique child node of any parent node; The determining module is configured to determine current node position information corresponding to each scheduling task node based on each data substructure, node initial position information corresponding to the scheduling task node in each data substructure, and node size information. The rendering module is configured to render a relationship diagram corresponding to the target service according to the current node position information corresponding to each scheduling task node.

13. A computing device comprising a memory, a processor, and computer instructions stored on the memory and executable on the processor, wherein, The processor executes the computer instructions to implement the steps of the method of any one of claims 1-11.

14. A computer-readable storage medium storing computer instructions, wherein, The computer instructions are executed by the processor to implement the steps of the method of any one of claims 1-11.

Citation Information

Patent Citations

  • Image generation method and device, equipment and storage medium

    CN115423898A