CN112148809A - Generation method, device, readable medium and equipment of node association graph - Google Patents

Generation method, device, readable medium and equipment of node association graph Download PDF

Info

Publication number
CN112148809A
CN112148809A CN202011084806.5A CN202011084806A CN112148809A CN 112148809 A CN112148809 A CN 112148809A CN 202011084806 A CN202011084806 A CN 202011084806A CN 112148809 A CN112148809 A CN 112148809A
Authority
CN
China
Prior art keywords
batch
node
nodes
queried
inquired
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011084806.5A
Other languages
Chinese (zh)
Other versions
CN112148809B (en
Inventor
耿鹏
王灿
陈文建
张涛
殷晓兰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202011084806.5A priority Critical patent/CN112148809B/en
Publication of CN112148809A publication Critical patent/CN112148809A/en
Application granted granted Critical
Publication of CN112148809B publication Critical patent/CN112148809B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Image Generation (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a method, a device, a readable medium and equipment for generating a node association graph, wherein the method comprises the steps of obtaining identification information of batch nodes to be inquired; obtaining the associated information of the batch nodes to be inquired by utilizing the identification information of the batch nodes to be inquired; calculating to obtain the depth and the width of an upstream area, the depth and the width of a downstream area by utilizing the correlation information of the batch of nodes to be inquired; calculating to obtain coordinates of each batch of nodes in the node set by using the depth and the breadth of the upstream area and the depth and the breadth of the downstream area; according to the method, the dynamic expansion size of the association graph of the batch nodes to be inquired is calculated according to the coordinates of each batch node in the node set; and then the final display size of the batch association graph to be queried can be obtained by using the dynamic expansion size, so that the generation and display of the batch node association graph to be queried, which can accommodate all batch nodes, are realized.

Description

Generation method, device, readable medium and equipment of node association graph
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a method, an apparatus, a readable medium, and a device for generating a node association graph.
Background
With the continuous increase of the business scale, the quantity of batch programs required to be run by the background is more and more, and the running logic relationship among the batch programs is more and more complex. In order to more intuitively display the association relationship between batch programs, the relationship between batch programs is usually displayed in the form of a batch node association graph.
In the existing batch node association diagram, batch nodes are used for representing batch programs, and the association relationship among the batch programs is displayed through connecting lines among the batch nodes. However, in the conventional generation method of the batch node association graph, because the size of the batch node association graph is fixed, when too many batch nodes need to be displayed in the association graph and the display space of the association graph is insufficient, a plurality of batch nodes are displayed in a stacked manner, so that the association relationship among the batch nodes displayed by the batch node association graph is not clear.
Disclosure of Invention
Based on the defects of the prior art, the application provides a method, a device, a readable medium and equipment for generating a node association graph so as to generate the association graph capable of clearly displaying the association relationship among the nodes in batches.
The first aspect of the present application discloses a method for generating a node association graph, including:
acquiring identification information of batch nodes to be inquired;
obtaining the associated information of the batch nodes to be inquired by utilizing the identification information of the batch nodes to be inquired; the associated information of the batch nodes to be queried comprises the following steps: node sets and edge sets corresponding to the batch of nodes to be queried; the node set corresponding to the batch of nodes to be queried comprises the following steps: each associated batch node having an association relation with the batch node to be inquired and the batch node to be inquired; the edge set corresponding to the batch nodes to be queried comprises the following steps: each edge used for explaining the incidence relation between two batch nodes in the node set;
calculating to obtain the upstream area depth and the upstream area width, and the downstream area depth and the downstream area width of the correlation graph of the batch nodes to be queried by utilizing the correlation information of the batch nodes to be queried; the upstream area is used for displaying the association relationship between the batch nodes to be inquired and all the associated batch nodes in the upstream area by taking the batch nodes to be inquired as end nodes; the downstream area is used for displaying the association relationship between the batch nodes to be inquired and all the associated batch nodes in the downstream area by taking the batch nodes to be inquired as starting point nodes;
calculating the coordinates of each batch of nodes in the node set by using the upstream area depth and the upstream area width, and the downstream area depth and the downstream area width;
calculating the dynamic expansion size of the batch node association graph to be inquired according to the coordinates of each batch node in the node set;
adjusting the preset display size of the batch association diagram to be queried by using the dynamic expansion size of the batch node association diagram to be queried to obtain the final display size of the batch association diagram to be queried;
and generating and displaying the batch node association graph to be inquired according to the coordinates of each batch node in the node set, each edge in the edge set and the final display size of the batch node association graph to be inquired.
Optionally, in the method for generating the node association graph, the calculating, by using the association information of the batch of nodes to be queried, to obtain the upstream area depth and the upstream area extent, and the downstream area depth and the downstream area extent of the batch of node association graph to be queried includes:
respectively recording the upstream node of each batch node in the node set according to the associated information of the batch nodes to be inquired to obtain an upstream node set corresponding to each batch node; respectively recording the downstream nodes of each batch of nodes in the node set according to the associated information of the batch of nodes to be inquired to obtain a downstream node set corresponding to each batch of nodes;
and performing stack recursive calculation by using the upstream node set corresponding to each batch node and the downstream node set corresponding to each batch node to respectively obtain the upstream area depth and the upstream area width, and the downstream area depth and the downstream area width of the batch node association diagram to be queried.
Optionally, in the method for generating the node association graph, the calculating, by using the upstream area depth and the upstream area extent, and the downstream area depth and the downstream area extent, coordinates of each batch of nodes in the node set includes:
calculating to obtain absolute coordinates of the batch nodes to be queried according to the upstream area depth, the upstream area width, the downstream area depth, the downstream area width and preset display sizes of the batch association graphs to be queried;
calculating the relative coordinates of each layer of related batch nodes in the upstream area layer by layer based on the absolute coordinates of the batch nodes to be inquired; calculating the relative coordinates of each layer of related batch nodes in the downstream area layer by layer based on the absolute coordinates of the batch nodes to be inquired;
and calculating to obtain the absolute coordinates of the batch nodes in the batch node association graph to be inquired according to the relative coordinates of the batch nodes and a first preset batch node display size aiming at each batch node in the node set.
Optionally, in the method for generating the node association graph, the calculating a dynamic expansion size of the batch node association graph to be queried according to coordinates of each batch node in the node set includes:
counting the number of batch nodes with the same transverse coordinate in the coordinates of each batch node in the node set to determine the maximum number of batch nodes with the same transverse coordinate; counting the number of batch nodes with the same longitudinal coordinate to determine the maximum number of batch nodes with the same longitudinal coordinate;
calculating the width of the dynamic expansion size of the batch node association graph to be inquired by utilizing the product of the maximum batch node number with the same transverse coordinate and the width of the first preset batch node display size; and calculating the height of the dynamic expansion size of the batch node association graph to be inquired by utilizing the product of the maximum batch node number with the same longitudinal coordinate and the height of the first preset batch node display size.
Optionally, in the method for generating a node association graph, the adjusting a preset display size of the batch node association graph to be queried by using the dynamic expansion size of the batch node association graph to be queried to obtain a final display size of the batch node association graph to be queried includes:
determining the maximum value of the width of the dynamic expansion size of the batch node association diagram to be queried and the width of the preset display size of the batch association diagram to be queried as the width of the final display size of the batch association diagram to be queried; and determining the maximum value of the height of the dynamic expansion size of the batch node association diagram to be queried and the height of the preset display size of the batch association diagram to be queried as the height of the final display size of the batch association diagram to be queried.
Optionally, in the method for generating a node association graph, after the preset display size of the batch node association graph to be queried is adjusted by using the dynamic expansion size of the batch node association graph to be queried to obtain a final display size of the batch node association graph to be queried, the method further includes:
calculating the width of the node display size of the second preset batch according to the ratio of the width of the final display size of the batch correlation diagram to be inquired to the maximum batch node number with the same transverse coordinate; calculating the height of the display size of the second preset batch of nodes according to the ratio of the height of the final display size of the batch correlation diagram to be inquired to the number of the maximum batch nodes with the same longitudinal coordinate;
wherein, the calculating the coordinates of each batch of nodes in the node set by using the upstream area depth and the upstream area extent, the downstream area depth and the downstream area extent includes:
calculating to obtain absolute coordinates of the batch nodes to be queried according to the upstream area depth, the upstream area width, the downstream area depth, the downstream area width and preset display sizes of the batch association graphs to be queried;
calculating the relative coordinates of each layer of related batch nodes in the upstream area layer by layer based on the absolute coordinates of the batch nodes to be inquired; calculating the relative coordinates of each layer of related batch nodes in the downstream area layer by layer based on the absolute coordinates of the batch nodes to be inquired;
and calculating to obtain the absolute coordinates of the associated batch nodes in the associated graph of the batch nodes to be inquired according to the relative coordinates of the associated batch nodes and the second preset batch node display size aiming at each associated batch node in the node set.
Optionally, in the method for generating the node association graph, the obtaining of the identification information of the batch nodes to be queried includes:
receiving an incidence relation query request of batch nodes to be queried; the association relation query request of the batch nodes to be queried carries identification information of the batch nodes to be queried.
The second aspect of the present application discloses a device for generating a node association graph, including:
the first acquisition unit is used for acquiring the identification information of the batch nodes to be inquired;
the second obtaining unit is used for obtaining the associated information of the batch nodes to be inquired by utilizing the identification information of the batch nodes to be inquired; the associated information of the batch nodes to be queried comprises the following steps: node sets and edge sets corresponding to the batch of nodes to be queried; the node set corresponding to the batch of nodes to be queried comprises the following steps: each associated batch node having an association relation with the batch node to be inquired and the batch node to be inquired; the edge set corresponding to the batch nodes to be queried comprises the following steps: each edge used for explaining the incidence relation between two batch nodes in the node set;
the first calculation unit is used for calculating the upstream area depth and the upstream area width, and the downstream area depth and the downstream area width of the correlation diagram of the batch nodes to be queried by using the correlation information of the batch nodes to be queried; the upstream area is used for displaying the association relationship between the batch nodes to be inquired and all the associated batch nodes in the upstream area by taking the batch nodes to be inquired as end nodes; the downstream area is used for displaying the association relationship between the batch nodes to be inquired and all the associated batch nodes in the downstream area by taking the batch nodes to be inquired as starting point nodes;
the second calculation unit is used for calculating the coordinates of each batch of nodes in the node set by utilizing the upstream area depth and the upstream area width as well as the downstream area depth and the downstream area width;
the third calculation unit is used for calculating the dynamic expansion size of the batch node association graph to be inquired according to the coordinates of each batch node in the node set;
the adjusting unit is used for adjusting the preset display size of the batch association diagram to be queried by using the dynamic expansion size of the batch node association diagram to be queried to obtain the final display size of the batch association diagram to be queried;
and the generating unit is used for generating and displaying the batch node association graph to be inquired according to the coordinates of each batch node in the node set, each edge in the edge set and the final display size of the batch node association graph to be inquired.
Optionally, in the apparatus for generating a node association map, the first calculating unit includes:
the recording subunit is configured to record, according to the association information of the batch nodes to be queried, an upstream node of each batch node in the node set respectively to obtain an upstream node set corresponding to each batch node; respectively recording the downstream nodes of each batch of nodes in the node set according to the associated information of the batch of nodes to be inquired to obtain a downstream node set corresponding to each batch of nodes;
and the first calculating subunit is used for performing stack recursive calculation by using the upstream node set corresponding to each batch node and the downstream node set corresponding to each batch node to respectively obtain the upstream area depth and the upstream area width, and the downstream area depth and the downstream area width of the batch node association diagram to be queried.
Optionally, in the apparatus for generating a node association map, the second calculating unit includes:
the second calculating subunit is configured to calculate absolute coordinates of the batch nodes to be queried by using the upstream area depth, the upstream area extent, the downstream area depth, the downstream area extent, and a preset display size of the batch association diagram to be queried;
the third calculation subunit is used for calculating layer by layer to obtain the relative coordinates of each layer of related batch nodes in the upstream area based on the absolute coordinates of the batch nodes to be inquired; calculating the relative coordinates of each layer of related batch nodes in the downstream area layer by layer based on the absolute coordinates of the batch nodes to be inquired;
and the fourth calculating subunit is configured to calculate, for each batch node in the node set, an absolute coordinate of the batch node in the batch node association graph to be queried according to the relative coordinate of the batch node and a first preset batch node display size.
Optionally, in the apparatus for generating a node association map, the third calculating unit includes:
the first determining subunit is configured to count the number of batch nodes having the same transverse coordinate in the coordinates of each batch node in the node set, and determine the maximum number of batch nodes having the same transverse coordinate; counting the number of batch nodes with the same longitudinal coordinate to determine the maximum number of batch nodes with the same longitudinal coordinate;
the fifth calculating subunit is configured to calculate, by using a product of the maximum batch node number with the same lateral coordinate and the width of the first preset batch node display size, a width of a dynamic expansion size of the batch node association graph to be queried; and calculating the height of the dynamic expansion size of the batch node association graph to be inquired by utilizing the product of the maximum batch node number with the same longitudinal coordinate and the height of the first preset batch node display size.
Optionally, in the apparatus for generating a node association map, the adjusting unit includes:
the adjusting subunit is used for determining the maximum value of the width of the dynamic expansion size of the batch node association diagram to be queried and the width of the preset display size of the batch association diagram to be queried as the width of the final display size of the batch association diagram to be queried;
and the second determining subunit is used for determining the maximum value of the height of the dynamic expansion size of the batch node association diagram to be queried and the height of the preset display size of the batch association diagram to be queried as the height of the final display size of the batch association diagram to be queried.
Optionally, the apparatus for generating the node association map further includes:
the sixth calculating subunit is configured to calculate, by using a ratio of the width of the final display size of the batch correlation diagram to be queried to the maximum batch node number with the same lateral coordinate, a width of a second preset batch node display size; calculating the height of the display size of the second preset batch of nodes according to the ratio of the height of the final display size of the batch correlation diagram to be inquired to the number of the maximum batch nodes with the same longitudinal coordinate;
wherein the second computing unit includes:
a seventh calculating subunit, configured to calculate absolute coordinates of the batch nodes to be queried by using the upstream area depth, the upstream area extent, the downstream area depth, the downstream area extent, and a preset display size of the batch dependency graph to be queried;
the eighth calculating subunit is configured to calculate, layer by layer, relative coordinates of each layer of associated batch nodes in the upstream area based on the absolute coordinates of the batch nodes to be queried; calculating the relative coordinates of each layer of related batch nodes in the downstream area layer by layer based on the absolute coordinates of the batch nodes to be inquired;
and the ninth calculating subunit is configured to calculate, for each associated batch node in the node set, an absolute coordinate of the associated batch node in the batch node association graph to be queried according to the relative coordinate of the associated batch node and the second preset batch node display size.
Optionally, in the apparatus for generating a node association map, the first obtaining unit includes:
the receiving subunit is used for receiving an incidence relation query request of the batch nodes to be queried; the association relation query request of the batch nodes to be queried carries identification information of the batch nodes to be queried.
A third aspect of the application discloses a computer readable medium having a computer program stored thereon, wherein the program when executed by a processor implements the method as described in any of the first aspects above.
The fourth aspect of the present application discloses an apparatus comprising:
one or more processors;
a storage device having one or more programs stored thereon;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method as in any one of the first aspects above.
According to the technical scheme, in the method for generating the node association graph, the identification information of the batch nodes to be inquired is obtained, and then the identification information of the batch nodes to be inquired is utilized to obtain the association information of the batch nodes to be inquired. And further, the depth and the breadth of an upstream area, the depth and the breadth of a downstream area of the correlation diagram of the batch nodes to be queried can be obtained through calculation by utilizing the correlation information of the batch nodes to be queried. And calculating to obtain the coordinates of each batch of nodes in the node set according to the depth and the width of the upstream area, and the depth and the width of the downstream area. In the embodiment of the application, the dynamic expansion size of the batch node association graph to be queried is calculated according to the coordinate of each batch node in the node set, so that the final display size of the batch node association graph to be queried of each batch node in the node set can be obtained by adjusting the preset display size of the batch node association graph to be queried by using the dynamic expansion size of the batch node association graph to be queried, and the condition of stack display of a plurality of batch nodes cannot occur in the batch node association graph to be queried generated according to the coordinate of each batch node in the node set, each edge in the edge set and the final display size of the batch node association graph to be queried.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for generating a node association graph according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a method for determining the depth and the extent of an upstream zone and the depth and the extent of a downstream zone according to an embodiment of the present application;
FIG. 3 is a prior art batch node association diagram;
fig. 4 is a schematic flowchart of a method for determining absolute coordinates of associated batch nodes according to an embodiment of the present disclosure;
fig. 5 is a schematic layout diagram of a batch of nodes according to an embodiment of the present application;
fig. 6 is a schematic flowchart of a method for determining a dynamic expansion size of batch nodes to be queried according to an embodiment of the present application;
FIG. 7 is a prior art batch node correlation diagram;
fig. 8 is a schematic flowchart of another method for determining absolute coordinates of associated batch nodes according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of a device for generating a node association graph according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, an embodiment of the present application discloses a method for generating a node association graph, which specifically includes the following steps:
s101, obtaining identification information of batch nodes to be inquired.
The batch nodes to be queried refer to batch nodes of which the association relation needs to be checked. The identification information of the batch node to be queried refers to specific information of the batch node to be queried, such as the number of the batch node to be queried, the name of the batch node to be queried, and the like.
In step S101, identification information of one batch node to be queried may be obtained, or identification information of a plurality of batch nodes to be queried may also be obtained. For example, the identification information of each batch node to be queried may be obtained from a platform memory by using all batch nodes stored in the platform as the batch nodes to be queried, or for example, an association relationship query request of the batch nodes to be queried may be received, where the association relationship query request of the batch nodes to be queried carries the identification information of the batch nodes to be queried, and the identification information is obtained from the association relationship query request of the batch nodes to be queried. The incidence relation query request of the batch nodes to be queried is used for requesting to provide the incidence relation of the batch nodes to be queried.
It should be noted that different ways of acquiring the identification information of the batch nodes to be queried do not affect implementation of the embodiment of the present application.
S102, obtaining the associated information of the batch nodes to be inquired by using the identification information of the batch nodes to be inquired.
The method for inquiring the association information of the batch nodes comprises the following steps: node sets and limit sets that waiting to inquire that batch node corresponds, the node set that waiting to inquire that batch node corresponds includes: each associated batch node having an association relation with the batch node to be inquired, and the batch node to be inquired. The edge set corresponding to the batch nodes to be queried comprises the following steps: each for specifying an edge of an association between two bulk nodes in the set of nodes.
Specifically, the identification information of each batch node, and the node set and the edge set corresponding to the batch node are stored in the memory in advance. And then subsequently, node sets and edge sets corresponding to the batch nodes to be inquired can be inquired by using the identification information of the batch nodes to be inquired. And the node set corresponding to the nodes to be queried comprises each associated batch node having an association relation with the batch nodes to be queried and the batch nodes to be queried. The related batch nodes having the association relationship with the batch nodes to be queried comprise nodes having a direct association relationship and nodes having an indirect association relationship with the batch nodes to be queried. For example, if the batch node to be queried is batch node B, which is an upstream node of batch node C, node batch a is an upstream node of batch node B, and batch node C is an upstream node of batch node D, then batch node a, batch node C, and batch node D are all associated batch nodes of batch node B. The edge set corresponding to the node to be queried includes: each for specifying an edge of an association between two bulk nodes in the set of nodes. Specifically, in the node set, an edge for explaining the direct association relationship between two batch nodes is provided between every two batch nodes having the direct association relationship, and all edges for explaining the direct association relationship between two batch nodes in the node set are stored in the edge set. For example, bulk node a and bulk node B in the node set are nodes having a direct relationship, and bulk node a is an upstream node of bulk node B, i.e., the direction of conduction between bulk node a and bulk node B is bulk node a conducted to bulk node B. Therefore, there is an edge in the edge set that indicates the conduction direction of bulk node A and bulk node B.
It should be noted that there are many storage forms of the node set and the edge set, for example, identification information of each node in the node set and information of each edge in the edge set may be made to be stored in the association table, and a difference in the specific storage forms of the node set and the edge set does not affect implementation of the embodiment of the present application.
Because the node set corresponding to the batch nodes to be queried comprises all the associated batch nodes having association with the batch nodes to be queried and the batch nodes to be queried, and the edge set comprises each edge for explaining the association between two batch nodes in the node set, the association between the batch nodes to be queried and the associated batch nodes can be determined through the node set and the edge set, and then the corresponding batch node association diagram to be queried can be generated.
S103, calculating to obtain the upstream area depth and the upstream area width, and the downstream area depth and the downstream area width of the correlation graph of the batch nodes to be queried by using the correlation information of the batch nodes to be queried.
The upstream area is used for displaying the association relation between the batch nodes to be inquired and all the associated batch nodes in the upstream area by taking the batch nodes to be inquired as the end point nodes. And the downstream area is used for displaying the association relation between the batch nodes to be inquired and all the associated batch nodes in the downstream area by taking the batch nodes to be inquired as starting nodes.
In order to clearly show the association relationship of the batch nodes to be queried, in the embodiment of the application, the batch nodes to be queried are taken as a core, and the association diagram of the batch nodes to be queried is divided into an upstream area and a downstream area. The upstream area shows the association relationship with the batch nodes to be queried as the end nodes, namely the transmission direction of the upstream area is transmitted from the batch nodes to be queried to the batch nodes to be queried. The downstream area shows the incidence relation taking the batch node to be inquired as the starting point node, namely the conduction direction of the downstream area is conducted from the batch node to be inquired to the associated batch node. For example, if the batch node to be queried is batch node B, the associated batch node includes batch node a, batch node C, and batch node D, where batch node a is an upstream node of batch node B, batch node B is an upstream node of batch node C, and batch node C is an upstream node of batch node D, and therefore, batch node B to be queried is used as a core, batch node a is located in an upstream area of the associated graph, and batch node C and batch node D are located in a downstream area of batch node.
The layout relationship between the upstream area and the downstream area in the graph may be an upper-lower layout relationship, for example, if the upstream area is above and the downstream area is below, the overall conduction direction of the batch nodes in the association graph is conducted from top to bottom. The layout relationship between the upstream area and the downstream area in the graph may also be a left-right layout relationship, for example, the upstream area is on the left, and the downstream area is on the right.
It should be noted that the conducting direction between two batch nodes may specifically represent an execution order, a scheduling logic order, or the like. For example, the bulk node a is an upstream node of the bulk node B, and the transmission direction is transmitted from the bulk node a to the bulk node B.
The upstream zone depth refers to the number of nodes in the longest batch node path in the upstream zone, and the downstream zone depth refers to the number of nodes in the longest batch node path in the downstream zone. The upstream zone extent is the maximum number of upstream nodes among the number of upstream nodes corresponding to all the bulk nodes of the upstream zone. The downstream area extent is the maximum downstream node number in the downstream node numbers corresponding to all the batch nodes in the downstream area.
Optionally, referring to fig. 2, in an embodiment of the present application, an implementation manner of executing step S103 includes:
s201, respectively recording the upstream nodes of each batch of nodes in the node set according to the associated information of the batch of nodes to be inquired to obtain an upstream node set corresponding to each batch of nodes, and respectively recording the downstream nodes of each batch of nodes in the node set according to the associated information of the batch of nodes to be inquired to obtain a downstream node set corresponding to each batch of nodes.
Wherein, the upstream node of the batch node refers to a preorder batch node which has a direct association relationship with the batch node. Specifically, for each batch node in the node set, each edge corresponding to the batch node is found from the edge set, and further, the upstream node corresponding to the batch node is found from the node set through each edge corresponding to the batch node, and each upstream node corresponding to the batch node is recorded, so that the upstream node set corresponding to the batch node can be obtained. And the nodes downstream of the batch node refer to subsequent batch nodes having a direct association with the batch node. Specifically, for each batch node in the node set, each edge corresponding to the batch node is found from the edge set, and further, a downstream node corresponding to the batch node is found from the node set through each edge corresponding to the batch node, and each downstream node corresponding to the batch node is recorded, so that the downstream node set corresponding to the batch node can be obtained. For example, for a batch node B in a node set, 3 edges corresponding to the batch node B are found from an edge set, where the 3 edges respectively indicate that a batch node a is an upstream node of the batch node B, a batch node E is an upstream node of the batch node B, and a batch node C is a downstream node of the batch node B. Further, batch node a and batch node E may be stored in the upstream node set corresponding to batch node B, while batch node C may be stored in the downstream node set of batch node B.
S202, performing stack recursive computation by using the upstream node set corresponding to each batch node and the downstream node set corresponding to each batch node to respectively obtain the upstream area depth and the upstream area width, and the downstream area depth and the downstream area width of the batch node association diagram to be queried.
The upstream zone depth refers to the number of nodes in the longest bulk node path in the upstream zone. Likewise, the downstream zone depth refers to the number of nodes in the longest bulk node path in the downstream zone. And performing stack recursive calculation by using the upstream node set corresponding to each batch node and the downstream node set corresponding to each batch node, so as to calculate the number of nodes in the longest batch node path in the upstream area and the number of nodes in the longest batch node path in the downstream area.
For example, in the process of calculating the depth of the upstream area of the batch of nodes B to be queried, two batch node paths in the upstream area of the association graph of the batch of nodes B to be queried are determined through the upstream node set corresponding to each batch node and the downstream node set corresponding to each batch node, where the batch node E is conducted to the batch node F, and the batch node F is conducted to the batch node B. The number of nodes involved in the path is 4. And the other is that bulk node X conducts to bulk pick Y, bulk node Y conducts to bulk node Z, bulk node Z conducts to bulk node a, bulk node a conducts to bulk node B, the path involves 5 number of nodes, so the upstream zone depth is 5. The process of calculating the depth of the downstream area is similar, and the description is omitted here.
The upstream area extent refers to that, for each batch node, the number of the upstream node sets of the batch node is counted to obtain the number of the upstream nodes of the batch node, and the maximum number of the upstream nodes in the number of the upstream nodes of all the batch nodes is the upstream area extent. The downstream area extent is that, for each batch node, the number of the downstream node sets of the batch node is counted to obtain the number of the downstream nodes of the batch node, and the maximum number of the downstream nodes in the number of the downstream nodes of all the batch nodes is the downstream area extent.
For example, in an upstream area of the association graph of the batch node B to be queried, there are batch node B, batch node a, batch node E, batch node G, and batch node F in total, where only batch node a is in an upstream node set of the batch node B, so the number of upstream nodes of the batch node B is 1, and there are batch node E, batch node F, and batch node G in an upstream node set of the batch node a, so the number of upstream nodes of the batch node a is 3. And the batch nodes E, F and G have no upstream node set, and finally the maximum upstream node number 3 is determined as the upstream area extent.
And S104, calculating to obtain the coordinates of each batch of nodes in the node set by using the depth and the width of the upstream area, and the depth and the width of the downstream area.
The upstream area depth and the upstream area extent, and the downstream area depth and the downstream area extent can determine coordinates of the batch nodes to be queried as the core batch nodes in the association graph. After the coordinates of the batch nodes to be queried serving as the core batch nodes are determined, the coordinates of other batch nodes can be determined according to the incidence relation between the batch nodes to be queried and other batch nodes in the node set, and then the coordinates of each batch node are obtained.
In the prior art, the node coordinates in the batch node association graph are randomly generated and randomly distributed. As shown in FIG. 3, the coordinates of the batch nodes A, B, C, D … … and Q are randomly distributed, so that it is difficult to directly distinguish the upstream node and the downstream node of each batch node in the graph from the layout of the association graph, and the association relationship between the batch nodes cannot be clearly seen.
In the embodiment of the application, the association graph of the batch nodes to be queried is divided into an upstream area and a downstream area, the nodes positioned at the upstream of the batch nodes to be queried are distributed in the upstream area, the nodes positioned at the downstream of the batch nodes to be queried are distributed in the downstream area, and the coordinates of the batch nodes are determined according to the association relationship, so that the upstream and downstream relationship among the batch nodes can be clearly seen from the coordinate layout of each batch node.
Optionally, referring to fig. 4, in an embodiment of the present application, an implementation of step S104 is performed, including:
s401, calculating to obtain absolute coordinates of the batch nodes to be inquired by using the depth of the upstream area, the width of the upstream area, the depth of the downstream area, the width of the downstream area and preset display sizes of the batch association graphs to be inquired.
The preset display size of the correlation diagram to be queried comprises the width and the height of the preset display size of the correlation diagram to be queried.
If the upstream area and the downstream area are in a left-right layout mode, the depth of the upstream area, the depth of the downstream area and the width of the preset display size of the correlation diagram to be queried can determine the absolute coordinate of the transverse X axis of the batch nodes to be queried in the correlation diagram to be queried with the preset display size. Specifically, the depth of the upstream area, the depth of the downstream area, and the width of a preset display size of the correlation diagram to be queried are substituted into a first formula:
Figure BDA0002719976280000141
and calculating to obtain the transverse X-axis absolute coordinates of the batch nodes to be inquired. And X in the first formula is the absolute coordinate of the transverse X axis of the batch nodes to be inquired. W is the width of the preset display size of the correlation diagram to be queried, DupIs the depth of the upstream zone, DdownThe downstream zone depth. And the upstream area extent, the downstream area extent and the height of the preset display size of the correlation diagram to be queried can determine the absolute coordinate of the longitudinal Y axis of the batch nodes to be queried in the correlation diagram to be queried with the preset display size. Specifically, the upstream zone is expanded and the downstream zone is expandedSubstituting the breadth and the height of the preset display size of the correlation diagram to be queried into a second formula:
Figure BDA0002719976280000142
wherein Y is the absolute coordinate of the longitudinal Y axis in the correlation diagram to be queried, H is the height of the preset display size of the correlation diagram to be queried, and W is the absolute coordinate of the longitudinal Y axis in the correlation diagram to be queriedupTo an extent of the upstream zone, WdownIs the extent of the downstream zone.
If the upstream area and the downstream area are in an up-and-down layout mode, the depth of the upstream area, the depth of the downstream area and the height of the preset display size of the correlation diagram to be queried can determine the absolute coordinate of the longitudinal Y axis of the batch nodes to be queried in the correlation diagram to be queried with the preset display size. Specifically, the depth of the upstream area, the depth of the downstream area, and the height of the preset display size of the correlation diagram to be queried are substituted into a third formula:
Figure BDA0002719976280000143
and calculating to obtain the longitudinal Y-axis absolute coordinates of the batch nodes to be inquired. And Y in the third formula is the absolute coordinate of the longitudinal Y axis of the batch nodes to be inquired. H is the height of the preset display size of the correlation diagram to be queried, DupIs the depth of the upstream zone, DdownThe downstream zone depth. And the upstream area extent, the downstream area extent and the width of the preset display size of the correlation diagram to be queried can determine the absolute coordinate of the transverse X axis of the batch nodes to be queried in the correlation diagram to be queried with the preset display size. Specifically, the upstream area extent, the downstream area extent and the width of the preset display size of the correlation diagram to be queried are substituted into a fourth formula:
Figure BDA0002719976280000151
wherein X is the absolute coordinate of the transverse X axis in the correlation diagram to be queried, W is the width of the preset display size of the correlation diagram to be queried, and W is the absolute coordinate of the transverse X axis in the correlation diagram to be queriedupTo an extent of the upstream zone, WdownIs the extent of the downstream zone.
S402, calculating layer by layer to obtain the relative coordinates of each layer of related batch nodes in the upstream area based on the absolute coordinates of the batch nodes to be inquired, and calculating layer by layer to obtain the relative coordinates of each layer of related batch nodes in the downstream area based on the absolute coordinates of the batch nodes to be inquired.
The relative coordinates of the associated batch nodes refer to the coordinates of the associated batch nodes relative to the batch nodes to be inquired. For each bulk node of the set of nodes, all upstream nodes of the bulk node belong to the same level of bulk nodes, and all downstream nodes of the bulk node belong to the same level of bulk nodes. Since the absolute coordinates of the batch nodes to be queried are known, the relative coordinates of the upstream nodes of the batch nodes to be queried relative to the batch nodes to be queried can be calculated according to the absolute coordinates of the batch nodes to be queried, and then the relative coordinates … … of the upstream nodes of the batch nodes to be queried can be calculated layer by layer sequentially, so that the relative coordinates of the associated batch nodes of all the batch nodes to be queried in the upstream area can be calculated. Similarly, since the absolute coordinates of the batch nodes to be queried are known, the relative coordinates of the downstream nodes of the batch nodes to be queried relative to the batch nodes to be queried can be calculated according to the absolute coordinates of the batch nodes to be queried, and then the relative coordinates … … of the downstream nodes of the batch nodes to be queried can be calculated layer by layer sequentially, so that the relative coordinates of the batch nodes associated with all the batch nodes to be queried in the downstream area can be calculated.
For example, assume that the coordinates of the batch of node Bs to be queried are known to be (X)B,YB) And the upstream area and the downstream area are in a left-right layout mode, the process of calculating the coordinates of all associated batch nodes in the upstream area of the batch node B to be queried may be as follows: the associated batch nodes in the upstream area are batch node A, batch node C, batch node D and batch node E. When the relative coordinates of the batch nodes in the upstream area are calculated, the coordinate of each upstream node on the X axis is reduced by 1 layer by layer, the X axis coordinates of the nodes on the same layer are the same, and the Y axis coordinates are different. Specifically, the upstream node of the batch node B to be queried has a batch node a and a batch node C, so that the batch node a and the batch node C belong to the same layer of nodes, and the batch nodeThe horizontal axis coordinates of A and the batch node C are the same, and the Y axis coordinates need to be distinguished at intervals, so that the relative coordinates of the batch node A can be (X) with reference to FIG. 5B-1,YB) The relative coordinates of the batch node C are (X)B-1,YB+1), and the upstream node of batch node C is batch node D and the upstream node of batch node A is batch node E, so the relative coordinate of batch node C is (X)B-2,YB+1), the relative coordinate of batch node E is (X)B-2,YB). Similarly, the batch nodes associated with the downstream area include batch node F, batch node G, and batch node H. Where bulk node B is an upstream node of bulk node F and bulk node G, and bulk node G is an upstream node of bulk node H, the relative coordinate of bulk node F is (X)B+1,YB) The relative coordinates of the batch node G are (X)B+1,YB+1) and the relative coordinates of the batch node H is (X)B+2,YB+2). When the relative coordinates are calculated, the coordinates of two batch nodes can be distinguished by adopting 1 as an interval, and other numerical values can also be adopted as the interval.
The relative coordinates of each layer of the associated batch nodes obtained through layer-by-layer calculation ensure that the conduction direction of the associated batch nodes can be seen from the relative coordinate layout, and the upstream nodes and the downstream nodes of each batch node can be clearly seen.
S403, calculating absolute coordinates of the associated batch nodes in the to-be-inquired batch node association graph according to the relative coordinates of the associated batch nodes and the first preset batch node display size aiming at each associated batch node in the node set.
Since the relative coordinates determined according to the association relationship are obtained by calculation in step S402, and the display size of the batch nodes when displayed in the graph is not considered, if the relative coordinate positions of the batch nodes are close and the display size of the batch nodes is larger, a stacking display phenomenon occurs. Therefore, the absolute coordinates of the batch nodes in the to-be-queried batch node association graph need to be calculated by combining the relative coordinates of the batch nodes and the first preset batch node display size.
The first preset batch node display size is a display size value of an artificially set batch node. For example, a size capable of clearly showing the batch nodes in the association graph may be artificially set as the first preset batch node showing size.
Optionally, when step S403 is executed, for each associated batch node in the node set, the relative coordinate of the associated batch node calculated in step S402 may be multiplied by a first preset batch node display size, so as to obtain the absolute coordinate of the batch node. Specifically, the width of the first preset batch node display size is multiplied by the transverse X-axis coordinate of the relative coordinate of the associated batch node to obtain the transverse X-axis coordinate of the absolute coordinate of the associated batch node. And multiplying the height of the first preset batch node display size by the longitudinal Y-axis coordinate of the relative coordinate of the associated batch node to obtain the longitudinal Y-axis coordinate of the absolute coordinate of the associated batch node.
And S105, calculating the dynamic expansion size of the batch node association graph to be inquired according to the coordinates of each batch node in the node set.
Because the coordinates of each batch node in the node set are calculated by using the upstream area depth and the upstream area extent, and the downstream area depth and the downstream area extent, and combining the incidence relation among the batch nodes explained in the above set, in the process of calculating the coordinates of the batch nodes, the preset display size of the batch association diagram to be inquired is not considered, so that the preset display size of the batch association diagram to be inquired cannot necessarily display all the finally calculated batch nodes. Therefore, the dynamic expansion size of the batch node association graph to be queried, which can show all the batch nodes in the node set, needs to be calculated by considering the coordinates of each batch node.
Specifically, according to the horizontal X-axis coordinate of each batch node in the node set, the width of the dynamic expansion size of the correlation graph of the batch nodes to be queried can be determined, and according to the vertical Y-axis coordinate of each batch node, the height of the dynamic expansion size of the batch nodes to be queried can be determined, so that the dynamic expansion size is determined.
The preset display size of the batch relevance graph to be queried can be the size of a display screen, the size of a display window or an artificially preset display size.
Optionally, referring to fig. 6, in an embodiment of the present application, an implementation of step S105 is performed, including:
s601, counting the number of batch nodes with the same transverse coordinate in the coordinates of each batch node in the node set, determining the maximum number of batch nodes with the same transverse coordinate, counting the number of batch nodes with the same longitudinal coordinate, and determining the maximum number of batch nodes with the same longitudinal coordinate.
The number of the batch nodes with the same transverse coordinate is counted, the number of the maximum batch nodes with the same transverse coordinate is determined, the size of how many batch nodes the transverse size (namely the width) of the batch node association graph to be inquired at least needs to accommodate can be known, the number of the batch nodes with the same longitudinal coordinate is counted, the number of the maximum batch nodes with the same longitudinal coordinate is determined, and the number of how many batch nodes the longitudinal size (namely the height) of the batch nodes to be inquired at least needs to accommodate can be known.
S602, calculating the width of the dynamic expansion size of the association graph of the batch nodes to be inquired by using the product of the maximum batch node number with the same transverse coordinate and the width of the first preset batch node display size, and calculating the height of the dynamic expansion size of the association graph of the batch nodes to be inquired by using the product of the maximum batch node number with the same longitudinal coordinate and the height of the first preset batch node display size.
The product of the maximum batch node number with the same transverse coordinate and the width of the first preset batch node display size represents the width of the dynamic expansion size of the batch node association diagram to be queried under the condition of not considering the spacing distance between batch nodes. In practical application, a distance exists between batch nodes, and therefore the width of the dynamic expansion size of the batch node association graph to be queried can be obtained only by multiplying a preset distance value. Optionally, the product of the maximum batch node number with the same lateral coordinate, the width of the first preset batch node display size, and the preset interval value is used as the width of the dynamic expansion size of the batch node association diagram to be queried.
Similarly, the product of the maximum batch node number with the same vertical coordinate and the height of the first preset batch node display size represents the height of the dynamic expansion size of the batch node association diagram to be queried under the condition of not considering the spacing distance between batch nodes. In practical application, a distance exists between batch nodes, and therefore the height of the dynamic expansion size of the batch node association graph to be queried can be obtained only by multiplying a preset distance value. Optionally, the product of the maximum batch node number with the same longitudinal coordinate, the height of the first preset batch node display size, and the preset distance value is used as the height of the dynamic expansion size of the batch node association diagram to be queried.
S106, adjusting the preset display size of the batch node association diagram to be queried by using the dynamic expansion size of the batch node association diagram to be queried to obtain the final display size of the batch association diagram to be queried.
Because the association diagram to be queried has a default preset display size, the preset display size is a fixed value and cannot be changed along with the number of batch nodes and the association relationship of the batch nodes. The dynamic expansion size of the batch node association diagram to be queried is calculated by considering the coordinate layout of each batch node in the association diagram, so that the dynamic expansion size of the batch node association diagram to be queried is enough to show all batch nodes in a node set corresponding to the batch node to be queried. Therefore, the dynamic expansion size of the batch node association diagram to be queried needs to be used to adjust the preset display size of the batch association diagram to be queried, so as to obtain the final display size of the batch association diagram to be queried, where all the batch nodes can be displayed completely.
Specifically, the preset display size of the batch association diagram to be queried may be directly adjusted to the dynamic expansion size of the batch node association diagram to be queried, or a maximum value of the dynamic expansion size of the batch node association diagram to be queried and the preset display size of the batch association diagram to be queried may be taken as the final display size of the batch association diagram to be queried.
Optionally, in a specific embodiment of the present application, an implementation manner of executing step S106 includes:
determining the maximum value of the width of the dynamic expansion size of the batch node association diagram to be queried and the width of the preset display size of the batch association diagram to be queried as the width of the final display size of the batch association diagram to be queried, and determining the maximum value of the height of the dynamic expansion size of the batch node association diagram to be queried and the height of the preset display size of the batch association diagram to be queried as the height of the final display size of the batch association diagram to be queried.
In the prior art, the display size in the batch node association graph is fixed, and the coordinates of batch nodes are generated randomly, so that a user cannot clearly see the association relationship among the batch nodes due to the fact that the display space is limited and the probability of batch node stack display is very high under the condition that the batch nodes are more. For example, as shown in fig. 7, in addition to the batch nodes A, B, C and … … Q, there are a plurality of batch nodes N in the association graph, and since there are too many batch nodes and the coordinates of the batch nodes are randomly generated, many batch nodes are stacked.
In the embodiment of the application, the dynamic expansion size of the correlation diagram of the batch nodes to be queried, which can successfully display all the batch nodes, is determined according to the coordinates of each batch node in the node set corresponding to the batch nodes to be queried, and then the preset display size of the correlation diagram of the batch nodes to be queried is adjusted by using the dynamic expansion size of the correlation diagram of the batch nodes to be queried, so that the final display size of the correlation diagram of the batch nodes to be queried is obtained, and each batch node can be clearly displayed in the correlation diagram without being stacked.
Optionally, in a specific embodiment of the present application, after the step S106 is executed, the method further includes:
and calculating to obtain the width of the second preset batch node display size by utilizing the ratio of the width of the final display size of the batch correlation diagram to be queried to the maximum batch node number with the same transverse coordinate, and calculating to obtain the height of the second preset batch node display size by utilizing the ratio of the height of the final display size of the batch correlation diagram to be queried to the maximum batch node number with the same longitudinal coordinate.
Specifically, the final display size of the batch correlation diagram to be queried may be adjusted and changed compared with the original preset display size of the batch correlation diagram to be queried. Therefore, a batch node display size, which is a second preset batch node display size, more suitable than the final display size can be determined according to the adjusted final display size of the batch association graph to be queried, so that the preset batch nodes do not appear to be too large or too small in the association graph with the final display size.
Optionally, substituting the width of the final display size of the batch dependency graph to be queried and the maximum batch node number with the same lateral coordinate into the fifth formula
Figure BDA0002719976280000201
And calculating to obtain the width of the display size of the second preset batch of nodes, wherein W1 in the fifth formula is the width of the display size of the second preset batch of nodes, W is the width of the final display size of the batch correlation diagram to be queried, C is a preset spacing value, and M is the maximum batch node number with the same transverse coordinate. Substituting the height of the final display size of the batch correlation diagram to be queried and the maximum batch node number with the same longitudinal coordinate into a sixth formula
Figure BDA0002719976280000202
Calculating to obtain the height of the display size of the second preset batch of nodes, wherein H1 in the sixth formula is the height of the display size of the second preset batch of nodes, and H is the final display of the batch dependency graph to be queriedThe height of the size, C is a preset spacing value, and N is the maximum batch node number with the same longitudinal coordinate.
Referring to fig. 8, after step S106 is executed, since the batch node display size is determined to be the second preset batch node display size, it is necessary to return to step S104 again, and the coordinates of each batch node are recalculated according to the second preset batch node display size, which specifically includes the following steps:
s801, calculating to obtain absolute coordinates of the batch nodes to be inquired by utilizing the depth of the upstream area, the width of the upstream area, the depth of the downstream area, the width of the downstream area and preset display sizes of the batch association graphs to be inquired.
It should be noted that the execution principle and the process of step S801 are the same as those of step S401 shown in fig. 4, and reference may be made to these steps, which are not described herein again.
S802, calculating the relative coordinates of each layer of related batch nodes in the upstream area layer by layer based on the absolute coordinates of the batch nodes to be inquired, and calculating the relative coordinates of each layer of related batch nodes in the downstream area layer by layer based on the absolute coordinates of the batch nodes to be inquired.
It should be noted that the execution principle and the process of step S802 are the same as those of step S402 shown in fig. 4, and reference is made to these steps, which are not described herein again.
And S803, calculating to obtain the absolute coordinates of the associated batch nodes in the to-be-inquired batch node association graph according to the relative coordinates of the associated batch nodes and the second preset batch node display size aiming at each associated batch node in the node set.
And calculating the absolute coordinates of each associated batch node in the node set by using the second preset batch node display size calculated according to the final size of the associated graph. Here, step S803 is similar to the execution principle and process of step S403 shown in fig. 4, and may be referred to here, which is not described here again.
And S107, generating and displaying the batch node association graph to be queried according to the coordinates of each batch node in the node set, each edge in the edge set and the final display size of the batch node association graph to be queried.
And generating a canvas with the size of the final display size of the batch node association graph to be inquired, and then generating and displaying batch nodes at corresponding positions on the canvas according to the coordinates of each batch node in the node set. And then connecting the batch nodes according to the association relationship explained by each edge in the edge set, and generating and displaying the association graph of the batch nodes to be inquired.
Optionally, if the preset display size of the batch association diagram to be queried is the size of the display screen, and the final display size of the batch association diagram to be queried is larger than the size of the display screen, displaying the batch association diagram to be queried in a dynamic expansion sliding manner.
In the method for generating the node association graph provided by the embodiment of the application, the association information of the batch nodes to be queried is obtained by acquiring the identification information of the batch nodes to be queried and then utilizing the identification information of the batch nodes to be queried. And further, the depth and the breadth of an upstream area, the depth and the breadth of a downstream area of the correlation diagram of the batch nodes to be queried can be obtained through calculation by utilizing the correlation information of the batch nodes to be queried. And calculating to obtain the coordinates of each batch of nodes in the node set according to the depth and the width of the upstream area, and the depth and the width of the downstream area. In the embodiment of the application, the dynamic expansion size of the batch node association graph to be queried is calculated according to the coordinate of each batch node in the node set, so that the final display size of the batch node association graph to be queried of each batch node in the node set can be obtained by adjusting the preset display size of the batch node association graph to be queried by using the dynamic expansion size of the batch node association graph to be queried, and the condition of stack display of a plurality of batch nodes cannot occur in the batch node association graph to be queried generated according to the coordinate of each batch node in the node set, each edge in the edge set and the final display size of the batch node association graph to be queried.
Referring to fig. 9, based on the method for generating a node association diagram provided in the embodiment of the present application, the embodiment of the present application also correspondingly discloses a device for generating a node association diagram, which specifically includes: a first acquisition unit 901, a second acquisition unit 902, a first calculation unit 903, a second calculation unit 904, a third calculation unit 905, an adjustment unit 906, and a generation unit 907.
A first obtaining unit 901, configured to obtain identification information of a batch of nodes to be queried.
Optionally, in a specific embodiment of the present application, the first obtaining unit 901 includes:
and the receiving subunit is used for receiving the association relation query request of the batch nodes to be queried. The incidence relation query request of the batch nodes to be queried carries identification information of the batch nodes to be queried.
The second obtaining unit 902 is configured to obtain the association information of the batch nodes to be queried by using the identification information of the batch nodes to be queried. The method for inquiring the association information of the batch nodes comprises the following steps: node sets and limit sets that waiting to inquire that batch node corresponds, the node set that waiting to inquire that batch node corresponds includes: each associated batch node having an association relation with the batch node to be inquired, and the batch node to be inquired. The edge set corresponding to the batch nodes to be queried comprises the following steps: each for specifying an edge of an association between two bulk nodes in the set of nodes.
The first calculating unit 903 is configured to calculate, by using the association information of the batch nodes to be queried, an upstream area depth and an upstream area extent of the association graph of the batch nodes to be queried, and a downstream area depth and a downstream area extent. The upstream area is used for displaying the association relation between the batch nodes to be inquired and all the associated batch nodes in the upstream area by taking the batch nodes to be inquired as the end point nodes. And the downstream area is used for displaying the association relation between the batch nodes to be inquired and all the associated batch nodes in the downstream area by taking the batch nodes to be inquired as starting nodes.
Optionally, in an embodiment of the present application, the first calculating unit 903 includes: a recording subunit and a first calculating subunit.
And the recording subunit is used for respectively recording the upstream node of each batch node in the node set according to the associated information of the batch nodes to be inquired to obtain an upstream node set corresponding to each batch node, and respectively recording the downstream node of each batch node in the node set according to the associated information of the batch nodes to be inquired to obtain a downstream node set corresponding to each batch node.
And the first calculating subunit is used for performing stack recursive calculation by using the upstream node set corresponding to each batch node and the downstream node set corresponding to each batch node to respectively obtain the upstream area depth and the upstream area width of the to-be-queried batch node association graph and the downstream area depth and the downstream area width of the to-be-queried batch node association graph.
And a second calculating unit 904, configured to calculate coordinates of each batch of nodes in the node set by using the upstream area depth and the upstream area extent, and the downstream area depth and the downstream area extent.
Optionally, in a specific embodiment of the present application, the second calculating unit 904 includes: the device comprises a second calculation subunit, a third calculation subunit and a fourth calculation subunit.
And the second calculating subunit is used for calculating to obtain the absolute coordinates of the batch nodes to be inquired by utilizing the depth of the upstream area, the width of the upstream area, the depth of the downstream area, the width of the downstream area and the preset display size of the batch association diagram to be inquired.
And the third calculation subunit is used for calculating layer by layer to obtain the relative coordinates of each layer of associated batch nodes in the upstream area based on the absolute coordinates of the batch nodes to be inquired, and calculating layer by layer to obtain the relative coordinates of each layer of associated batch nodes in the downstream area based on the absolute coordinates of the batch nodes to be inquired.
And the fourth calculating subunit is used for calculating to obtain the absolute coordinates of the batch nodes in the to-be-inquired batch node association graph according to the relative coordinates of the batch nodes and the first preset batch node display size aiming at each batch node in the node set.
And the third calculating unit 905 is configured to calculate a dynamic expansion size of the batch node association graph to be queried according to the coordinate of each batch node in the node set.
Optionally, in a specific embodiment of the present application, the third calculating unit 905 includes: a first determining subunit and a fifth calculating subunit.
The first determining subunit is configured to count the number of batch nodes having the same horizontal coordinate in the coordinates of each batch node in the node set, determine the maximum number of batch nodes having the same horizontal coordinate, count the number of batch nodes having the same vertical coordinate, and determine the maximum number of batch nodes having the same vertical coordinate.
And the fifth calculating subunit is used for calculating the width of the dynamic expansion size of the to-be-inquired batch node association graph by using the product of the maximum batch node number with the same transverse coordinate and the width of the first preset batch node display size, and calculating the height of the dynamic expansion size of the to-be-inquired batch node association graph by using the product of the maximum batch node number with the same longitudinal coordinate and the height of the first preset batch node display size.
The adjusting unit 906 is configured to adjust a preset display size of the batch node association diagram to be queried by using the dynamic expansion size of the batch node association diagram to be queried, so as to obtain a final display size of the batch association diagram to be queried.
Optionally, in a specific embodiment of the present application, the adjusting unit 906 includes: an adjustment subunit and a second determination subunit.
And the adjusting subunit is used for determining the maximum value of the width of the dynamic expansion size of the batch node association diagram to be queried and the width of the preset display size of the batch association diagram to be queried as the width of the final display size of the batch association diagram to be queried.
And the second determining subunit is used for determining the maximum value of the height of the dynamic expansion size of the batch node association diagram to be queried and the height of the preset display size of the batch association diagram to be queried as the height of the final display size of the batch association diagram to be queried.
The generating unit 907 is configured to generate and display the batch node association graph to be queried according to the coordinates of each batch node in the node set, each edge in the edge set, and the final display size of the batch node association graph to be queried.
Optionally, in a specific embodiment of the present application, the method further includes:
and the sixth calculating subunit is configured to calculate, by using the ratio of the width of the final display size of the batch dependency graph to be queried to the number of the maximum batch nodes having the same lateral coordinate, the width of the second preset batch node display size, and calculate, by using the ratio of the height of the final display size of the batch dependency graph to be queried to the number of the maximum batch nodes having the same longitudinal coordinate, the height of the second preset batch node display size.
Wherein, the second calculating unit 904 comprises: a seventh calculation subunit, an eighth calculation subunit, and a ninth calculation subunit.
And the seventh calculating subunit is used for calculating to obtain the absolute coordinates of the batch nodes to be inquired by utilizing the depth of the upstream area, the width of the upstream area, the depth of the downstream area, the width of the downstream area and the preset display size of the batch association diagram to be inquired.
And the eighth calculating subunit is used for calculating the relative coordinates of each layer of the associated batch nodes in the upstream area layer by layer based on the absolute coordinates of the batch nodes to be inquired, and calculating the relative coordinates of each layer of the associated batch nodes in the downstream area layer by layer based on the absolute coordinates of the batch nodes to be inquired.
And the ninth calculating subunit is used for calculating the absolute coordinates of the associated batch nodes in the to-be-inquired batch node association graph according to the relative coordinates of the associated batch nodes and the second preset batch node display size aiming at each associated batch node in the node set.
The specific principle and the implementation process in the apparatus for generating a node association graph disclosed in the embodiment of the present application are the same as the method for generating a node association graph disclosed in the embodiment of the present application, and refer to corresponding parts in the method for generating a node association graph disclosed in the embodiment of the present application, which are not described herein again.
In the apparatus for generating a node association graph provided in the embodiment of the present application, identification information of a batch of nodes to be queried is acquired through a first acquiring unit 901, and then a second acquiring unit 902 obtains association information of the batch of nodes to be queried by using the identification information of the batch of nodes to be queried. Further, the first calculating unit 903 may calculate, by using the association information of the batch nodes to be queried, an upstream area depth and an upstream area extent of the association graph of the batch nodes to be queried, and a downstream area depth and a downstream area extent of the association graph of the batch nodes to be queried. The second calculation unit 904 calculates coordinates of each batch of nodes in the node set by the upstream area depth and the upstream area extent, and the downstream area depth and the downstream area extent. In this embodiment of the application, the third calculating unit 905 calculates the dynamic extension size of the to-be-queried batch node association graph according to the coordinate of each batch node in the node set, and the adjusting unit 906 may adjust the preset display size of the to-be-queried batch association graph by using the dynamic extension size of the to-be-queried batch node association graph to obtain a final display size of the to-be-queried batch association graph of each batch node in the enough display node set, so that the generating unit 907 may generate the to-be-queried batch node association graph according to the coordinate of each batch node in the node set, each edge in the edge set, and the final display size of the to-be-queried batch node association graph, and a situation of stacked display of a plurality of batch nodes may not occur.
The embodiments of the present application further provide a computer-readable medium, on which a computer program is stored, where the program, when executed by a processor, implements a method for generating a node association graph as described in the foregoing embodiments.
An embodiment of the present application further provides an apparatus, including: one or more processors, a storage device, having one or more programs stored thereon, which, when executed by the one or more processors, cause the one or more processors to implement a method of generating a node association graph as described in the embodiments.
Those skilled in the art can make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A method for generating a node association graph is characterized by comprising the following steps:
acquiring identification information of batch nodes to be inquired;
obtaining the associated information of the batch nodes to be inquired by utilizing the identification information of the batch nodes to be inquired; the associated information of the batch nodes to be queried comprises the following steps: node sets and edge sets corresponding to the batch of nodes to be queried; the node set corresponding to the batch of nodes to be queried comprises the following steps: each associated batch node having an association relation with the batch node to be inquired and the batch node to be inquired; the edge set corresponding to the batch nodes to be queried comprises the following steps: each edge used for explaining the incidence relation between two batch nodes in the node set;
calculating to obtain the upstream area depth and the upstream area width, and the downstream area depth and the downstream area width of the correlation graph of the batch nodes to be queried by utilizing the correlation information of the batch nodes to be queried; the upstream area is used for displaying the association relationship between the batch nodes to be inquired and all the associated batch nodes in the upstream area by taking the batch nodes to be inquired as end nodes; the downstream area is used for displaying the association relationship between the batch nodes to be inquired and all the associated batch nodes in the downstream area by taking the batch nodes to be inquired as starting point nodes;
calculating the coordinates of each batch of nodes in the node set by using the upstream area depth and the upstream area width, and the downstream area depth and the downstream area width;
calculating the dynamic expansion size of the batch node association graph to be inquired according to the coordinates of each batch node in the node set;
adjusting the preset display size of the batch association diagram to be queried by using the dynamic expansion size of the batch node association diagram to be queried to obtain the final display size of the batch association diagram to be queried;
and generating and displaying the batch node association graph to be inquired according to the coordinates of each batch node in the node set, each edge in the edge set and the final display size of the batch node association graph to be inquired.
2. The method according to claim 1, wherein the calculating, by using the correlation information of the batch nodes to be queried, an upstream area depth and an upstream area extent of the correlation graph of the batch nodes to be queried and a downstream area depth and a downstream area extent of the correlation graph of the batch nodes to be queried comprises:
respectively recording the upstream node of each batch node in the node set according to the associated information of the batch nodes to be inquired to obtain an upstream node set corresponding to each batch node; respectively recording the downstream nodes of each batch of nodes in the node set according to the associated information of the batch of nodes to be inquired to obtain a downstream node set corresponding to each batch of nodes;
and performing stack recursive calculation by using the upstream node set corresponding to each batch node and the downstream node set corresponding to each batch node to respectively obtain the upstream area depth and the upstream area width, and the downstream area depth and the downstream area width of the batch node association diagram to be queried.
3. The method of claim 1, wherein the calculating coordinates of each batch of nodes in the set of nodes using the upstream zone depth and the upstream zone extent, and the downstream zone depth and the downstream zone extent comprises:
calculating to obtain absolute coordinates of the batch nodes to be queried according to the upstream area depth, the upstream area width, the downstream area depth, the downstream area width and preset display sizes of the batch association graphs to be queried;
calculating the relative coordinates of each layer of related batch nodes in the upstream area layer by layer based on the absolute coordinates of the batch nodes to be inquired; calculating the relative coordinates of each layer of related batch nodes in the downstream area layer by layer based on the absolute coordinates of the batch nodes to be inquired;
and calculating to obtain the absolute coordinates of the batch nodes in the batch node association graph to be inquired according to the relative coordinates of the batch nodes and a first preset batch node display size aiming at each batch node in the node set.
4. The method of claim 1, wherein the calculating a dynamic expansion size of the batch node association graph to be queried according to coordinates of each batch node in the node set comprises:
counting the number of batch nodes with the same transverse coordinate in the coordinates of each batch node in the node set to determine the maximum number of batch nodes with the same transverse coordinate; counting the number of batch nodes with the same longitudinal coordinate to determine the maximum number of batch nodes with the same longitudinal coordinate;
calculating the width of the dynamic expansion size of the batch node association graph to be inquired by utilizing the product of the maximum batch node number with the same transverse coordinate and the width of the first preset batch node display size; and calculating the height of the dynamic expansion size of the batch node association graph to be inquired by utilizing the product of the maximum batch node number with the same longitudinal coordinate and the height of the first preset batch node display size.
5. The method according to claim 1, wherein the adjusting the preset display size of the batch association graph to be queried by using the dynamic expansion size of the batch node association graph to be queried to obtain the final display size of the batch association graph to be queried comprises:
determining the maximum value of the width of the dynamic expansion size of the batch node association diagram to be queried and the width of the preset display size of the batch association diagram to be queried as the width of the final display size of the batch association diagram to be queried; and determining the maximum value of the height of the dynamic expansion size of the batch node association diagram to be queried and the height of the preset display size of the batch association diagram to be queried as the height of the final display size of the batch association diagram to be queried.
6. The method according to claim 4, wherein the adjusting the preset display size of the batch association graph to be queried by using the dynamic expansion size of the batch node association graph to be queried to obtain a final display size of the batch association graph to be queried further comprises:
calculating the width of the node display size of the second preset batch according to the ratio of the width of the final display size of the batch correlation diagram to be inquired to the maximum batch node number with the same transverse coordinate; calculating the height of the display size of the second preset batch of nodes according to the ratio of the height of the final display size of the batch correlation diagram to be inquired to the number of the maximum batch nodes with the same longitudinal coordinate;
wherein, the calculating the coordinates of each batch of nodes in the node set by using the upstream area depth and the upstream area extent, the downstream area depth and the downstream area extent includes:
calculating to obtain absolute coordinates of the batch nodes to be queried according to the upstream area depth, the upstream area width, the downstream area depth, the downstream area width and preset display sizes of the batch association graphs to be queried;
calculating the relative coordinates of each layer of related batch nodes in the upstream area layer by layer based on the absolute coordinates of the batch nodes to be inquired; calculating the relative coordinates of each layer of related batch nodes in the downstream area layer by layer based on the absolute coordinates of the batch nodes to be inquired;
and calculating to obtain the absolute coordinates of the associated batch nodes in the associated graph of the batch nodes to be inquired according to the relative coordinates of the associated batch nodes and the second preset batch node display size aiming at each associated batch node in the node set.
7. The method of claim 1, wherein the obtaining identification information of the batch of nodes to be queried comprises:
receiving an incidence relation query request of batch nodes to be queried; the association relation query request of the batch nodes to be queried carries identification information of the batch nodes to be queried.
8. An apparatus for generating a node association graph, comprising:
the first acquisition unit is used for acquiring the identification information of the batch nodes to be inquired;
the second obtaining unit is used for obtaining the associated information of the batch nodes to be inquired by utilizing the identification information of the batch nodes to be inquired; the associated information of the batch nodes to be queried comprises the following steps: node sets and edge sets corresponding to the batch of nodes to be queried; the node set corresponding to the batch of nodes to be queried comprises the following steps: each associated batch node having an association relation with the batch node to be inquired and the batch node to be inquired; the edge set corresponding to the batch nodes to be queried comprises the following steps: each edge used for explaining the incidence relation between two batch nodes in the node set;
the first calculation unit is used for calculating the upstream area depth and the upstream area width, and the downstream area depth and the downstream area width of the correlation diagram of the batch nodes to be queried by using the correlation information of the batch nodes to be queried; the upstream area is used for displaying the association relationship between the batch nodes to be inquired and all the associated batch nodes in the upstream area by taking the batch nodes to be inquired as end nodes; the downstream area is used for displaying the association relationship between the batch nodes to be inquired and all the associated batch nodes in the downstream area by taking the batch nodes to be inquired as starting point nodes;
the second calculation unit is used for calculating the coordinates of each batch of nodes in the node set by utilizing the upstream area depth and the upstream area width as well as the downstream area depth and the downstream area width;
the third calculation unit is used for calculating the dynamic expansion size of the batch node association graph to be inquired according to the coordinates of each batch node in the node set;
the adjusting unit is used for adjusting the preset display size of the batch association diagram to be queried by using the dynamic expansion size of the batch node association diagram to be queried to obtain the final display size of the batch association diagram to be queried;
and the generating unit is used for generating and displaying the batch node association graph to be inquired according to the coordinates of each batch node in the node set, each edge in the edge set and the final display size of the batch node association graph to be inquired.
9. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1 to 7.
10. An apparatus, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-7.
CN202011084806.5A 2020-10-12 2020-10-12 Method, device, readable medium and equipment for generating node association graph Active CN112148809B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011084806.5A CN112148809B (en) 2020-10-12 2020-10-12 Method, device, readable medium and equipment for generating node association graph

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011084806.5A CN112148809B (en) 2020-10-12 2020-10-12 Method, device, readable medium and equipment for generating node association graph

Publications (2)

Publication Number Publication Date
CN112148809A true CN112148809A (en) 2020-12-29
CN112148809B CN112148809B (en) 2023-10-20

Family

ID=73951482

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011084806.5A Active CN112148809B (en) 2020-10-12 2020-10-12 Method, device, readable medium and equipment for generating node association graph

Country Status (1)

Country Link
CN (1) CN112148809B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905688A (en) * 2021-02-09 2021-06-04 上海德拓信息技术股份有限公司 Data table relation visualization method, system and device and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106445931A (en) * 2015-08-04 2017-02-22 阿里巴巴集团控股有限公司 Database node association relationship display method and apparatus
CN107766474A (en) * 2017-10-09 2018-03-06 平安科技(深圳)有限公司 Dynamic Display relation expands drawing method and application server
CN110377667A (en) * 2019-06-17 2019-10-25 深圳壹账通智能科技有限公司 It is associated with map methods of exhibiting, device, computer equipment and storage medium
CN110674359A (en) * 2019-09-03 2020-01-10 中国建设银行股份有限公司 Method and system for displaying relation map in multiple scenes

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106445931A (en) * 2015-08-04 2017-02-22 阿里巴巴集团控股有限公司 Database node association relationship display method and apparatus
CN107766474A (en) * 2017-10-09 2018-03-06 平安科技(深圳)有限公司 Dynamic Display relation expands drawing method and application server
CN110377667A (en) * 2019-06-17 2019-10-25 深圳壹账通智能科技有限公司 It is associated with map methods of exhibiting, device, computer equipment and storage medium
CN110674359A (en) * 2019-09-03 2020-01-10 中国建设银行股份有限公司 Method and system for displaying relation map in multiple scenes

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905688A (en) * 2021-02-09 2021-06-04 上海德拓信息技术股份有限公司 Data table relation visualization method, system and device and readable storage medium
CN112905688B (en) * 2021-02-09 2023-12-15 上海德拓信息技术股份有限公司 Data table relationship visualization method, system and device and readable storage medium

Also Published As

Publication number Publication date
CN112148809B (en) 2023-10-20

Similar Documents

Publication Publication Date Title
US10650559B2 (en) Methods and systems for simplified graphical depictions of bipartite graphs
CN104182962A (en) Picture definition evaluation method and device
CN107291874B (en) Map point location aggregation method and device
CN104766291A (en) Method and system for calibrating multiple cameras
JP6303231B2 (en) Resource combination processing method, apparatus, device, and program
CN106708896A (en) ECharts map displaying method and device
CN109886956B (en) Method and device for detecting defect point aggregations
CN112148809B (en) Method, device, readable medium and equipment for generating node association graph
CN104537059B (en) object ranking method and device
WO2015182654A1 (en) Interference check system
CN112328880A (en) Geographical region clustering method and device, storage medium and electronic equipment
US20120026168A1 (en) System and method for interactive live-mesh segmentation
CN102301400B (en) Browse the method and system of the vision content shown in virtual three-dimensional space
CN112346868B (en) Mass remote sensing image publishing and dynamic slicing method, device and equipment
CN111625679B (en) Video story line generation method and device
CN113239136B (en) Data processing method, device, equipment and medium
CN108280135B (en) Method and device for realizing visualization of data structure and electronic equipment
CN110068826A (en) A kind of method and device of ranging
CN106131533A (en) A kind of method for displaying image and terminal
CN109427237A (en) A kind of Road letterings labeling position determines method and device
WO2024037007A1 (en) Parameter estimation two-dimensional search method, chip, device, and storage medium
CN111338629A (en) Data processing method and device for building tree diagram
CN109697264A (en) The method for arranging of page elements, calculates equipment and storage medium at device
CN103092818B (en) Thumbnail generation system and the reduced graph generating method of form
CN109410304B (en) Projection determination method, device and equipment

Legal Events

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