CN115495518A - Method and device for generating chart - Google Patents

Method and device for generating chart Download PDF

Info

Publication number
CN115495518A
CN115495518A CN202211156490.5A CN202211156490A CN115495518A CN 115495518 A CN115495518 A CN 115495518A CN 202211156490 A CN202211156490 A CN 202211156490A CN 115495518 A CN115495518 A CN 115495518A
Authority
CN
China
Prior art keywords
node
data
layout template
identifier
generating
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
CN202211156490.5A
Other languages
Chinese (zh)
Other versions
CN115495518B (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.)
Singularity Haohan Data Technology Beijing Co ltd
Original Assignee
Singularity Haohan Data Technology Beijing Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Singularity Haohan Data Technology Beijing Co ltd filed Critical Singularity Haohan Data Technology Beijing Co ltd
Priority to CN202211156490.5A priority Critical patent/CN115495518B/en
Publication of CN115495518A publication Critical patent/CN115495518A/en
Application granted granted Critical
Publication of CN115495518B publication Critical patent/CN115495518B/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/26Visual data mining; Browsing structured data
    • 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
    • G06F16/288Entity relationship models

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and a device for generating a chart, and relates to the technical field of data visualization. One embodiment of the method comprises: acquiring basic data and relation data of each node from a configuration management database, wherein the relation data comprises at least one of partition data, longitudinal data, hierarchical data and grouped data; generating a layout template according to the relation data of each node, thereby determining the position of each node in the layout template; and generating a chart according to the position of each node in the layout template and the basic data of each node. The embodiment can solve the technical problems that recalculation is needed for each rendering and the relationship between peer nodes in a full link is difficult to distinguish.

Description

Method and device for generating chart
Technical Field
The invention relates to the technical field of data visualization, in particular to a method and a device for generating a chart.
Background
Data visualization is scientific and technical research on visual representation of data. Wherein the visual representation of the data is defined as a kind of information extracted in a summary form, including various attributes and variables of the corresponding information unit.
A set of data sets with dependency properties is represented by a graph, as shown in FIG. 1, and their dependencies can be seen. When the content of the data set changes, the whole chart is recalculated and rendered, and the calculation is performed through mutually exclusive logic until all the nodes find the proper positions. When the content is changed again, the above operation is repeatedly performed.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
1) The uncertainty of the node position, each rendering needs to be recalculated, and certain time is consumed; 2) Only the superior and subordinate dependencies can be shown, the relationship among peer nodes in the whole link is difficult to distinguish, and the complex relationship is not visually displayed; 3) The display can not be divided into regions and columns.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for generating a graph, so as to solve the technical problems that recalculation is required and it is difficult to distinguish relationships between peer nodes in a full link in each rendering.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method of generating a chart, including:
acquiring basic data and relation data of each node from a configuration management database, wherein the relation data comprises at least one of partition data, longitudinal data, hierarchical data and grouped data;
generating a layout template according to the relation data of each node, thereby determining the position of each node in the layout template;
and generating a chart according to the position of each node in the layout template and the basic data of each node.
Optionally, generating a layout template according to the relationship data of each node, so as to determine the position of each node in the layout template, including:
generating a layout template according to the relation data of each node;
judging whether each node can be positioned in the layout template;
if yes, determining the position of each node in the layout template according to a positioning result;
if not, regenerating the layout template until all the nodes can be positioned in the layout template, and then determining the positions of all the nodes in the layout template according to the positioning result.
Optionally, regenerating the layout template comprises:
displaying the layout template to a user;
receiving a layout adjustment instruction input by a user, and regenerating a layout template according to the layout adjustment instruction; the layout adjustment instruction carries at least one of a partition area, a longitudinal area, a partition area and a grouping area, and the corresponding identification of each partition area, each longitudinal area, each partition area and each grouping area.
Optionally, the layout template includes at least one of a partition area, a vertical area, a partition area, and a grouping area, and each partition area, each vertical area, each partition area, and each grouping area has its corresponding identifier.
Optionally, the determining whether the nodes can be positioned in the layout template includes:
and judging whether at least one of the partition identifier, the longitudinal identifier, the hierarchical identifier and the grouping identifier can be matched in the layout template according to at least one of the partition identifier, the longitudinal identifier, the hierarchical identifier and the grouping identifier corresponding to each node, so that each node is positioned in the layout template.
Optionally, the partition data includes each partition identifier and a node corresponding to the partition identifier, the vertical data includes each vertical identifier and a node corresponding to the vertical identifier, the hierarchical data includes each hierarchical identifier and a node corresponding to the hierarchical identifier, and the packet data includes each group identifier and a node corresponding to the group identifier.
Optionally, after generating a graph according to the position of each node in the layout template and the basic data of each node, the method further includes:
acquiring monitoring data of each node from a stream processing platform;
converting the monitoring data of each node into a JOSON format;
and adding the monitoring data of each node into the graph.
In addition, according to another aspect of the embodiments of the present invention, there is provided an apparatus for generating a chart, including:
the system comprises an acquisition module, a configuration management database and a management module, wherein the acquisition module is used for acquiring basic data and relation data of each node from the configuration management database, and the relation data comprises at least one of partition data, longitudinal data, hierarchical data and grouped data;
the layout module is used for generating a layout template according to the relation data of each node so as to determine the position of each node in the layout template;
and the generating module is used for generating a chart according to the positions of the nodes in the layout template and the basic data of the nodes.
Optionally, the layout module is further configured to:
generating a layout template according to the relation data of each node;
judging whether each node can be positioned in the layout template;
if yes, determining the position of each node in the layout template according to a positioning result;
if not, regenerating the layout template until each node can be positioned in the layout template, and then determining the position of each node in the layout template according to the positioning result.
Optionally, the layout module is further configured to:
displaying the layout template to a user;
receiving a layout adjustment instruction input by a user, and regenerating a layout template according to the layout adjustment instruction; the layout adjustment instruction carries at least one of a partition area, a longitudinal area, a partition area and a grouping area, and a mark corresponding to each partition area, each longitudinal area, each partition area and each grouping area.
Optionally, the layout template includes at least one of a partitioned area, a vertical area, a partitioned area, and a grouped area, and each partitioned area, each vertical area, each partitioned area, and each grouped area has its corresponding identifier.
Optionally, the layout module is further configured to:
and judging whether at least one of the partition identifier, the longitudinal identifier, the hierarchical identifier and the grouping identifier can be matched in the layout template according to at least one of the partition identifier, the longitudinal identifier, the hierarchical identifier and the grouping identifier corresponding to each node, so that each node is positioned in the layout template.
Optionally, the partition data includes each partition identifier and a node corresponding to the partition identifier, the vertical data includes each vertical identifier and a node corresponding to the vertical identifier, the hierarchical data includes each hierarchical identifier and a node corresponding to the hierarchical identifier, and the packet data includes each group identifier and a node corresponding to the group identifier.
Optionally, the generating module is further configured to:
generating a chart according to the position of each node in the layout template and the basic data of each node, and then acquiring the monitoring data of each node from a stream processing platform;
converting the monitoring data of each node into a JOSON format;
and adding the monitoring data of each node into the graph.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any of the embodiments described above.
According to another aspect of the embodiments of the present invention, there is also provided a computer readable medium, on which a computer program is stored, the program, when executed by a processor, implementing the method according to any of the embodiments described above.
According to another aspect of the embodiments of the present invention, there is also provided a computer program product comprising a computer program which, when executed by a processor, implements the method of any of the above embodiments.
One embodiment of the above invention has the following advantages or benefits: because the technical means of generating the layout template according to the relationship data of each node so as to determine the position of each node in the layout template and then generating the chart according to the position of each node in the layout template and the basic data of each node is adopted, the technical problems that recalculation is needed in each rendering and the relationships among nodes at the same level in a full link are difficult to distinguish in the prior art are solved. The embodiment of the invention can determine the position of the node with unchanged relation data before generating the chart, does not need to recalculate the position of each node in each rendering, and effectively saves the calculation time and calculation resources; and each node is positioned in the layout template, so that the relationship among nodes at the same level in the whole link can be conveniently distinguished, and even if the relationship is complex, the partitioned area, the longitudinal area, the partitioned area and the grouping area can be visually displayed by means of the layout template.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
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 embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts. Wherein:
FIG. 1 is a schematic diagram of a chart generated from a data set;
FIG. 2 is a flow diagram of a method of generating a chart according to an embodiment of the invention;
FIG. 3 is a schematic diagram of a layout template according to an embodiment of the present invention;
FIG. 4 is a flow chart of a method of generating a chart in accordance with one referenced embodiment of the present invention;
FIG. 5 is a schematic diagram of an apparatus for generating a chart in accordance with an embodiment of the present invention;
FIG. 6 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 7 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
According to the technical scheme, the data acquisition, storage, use, processing and the like meet relevant regulations of national laws and regulations.
FIG. 2 is a flow chart of a method of generating a chart according to an embodiment of the invention. As an embodiment of the present invention, as shown in fig. 2, the method for generating a graph may include:
step 201, obtaining basic data and relation data of each node from a configuration management database, where the relation data includes at least one of partition data, longitudinal data, hierarchical data, and packet data.
First, basic data and relational data of each node are acquired from a Configuration Management Database (CMDB), and the basic data and the relational data of each node are cleaned. The basic data can include machine names, machine IPs, machine and other and network relationships among the machines, and the basic data defines the basic relationships of each node; the relationship data may include at least one of partition data, vertical data, hierarchical data, and packet data.
Optionally, the partition data includes each partition identifier and a node corresponding to the partition identifier, the vertical data includes each vertical identifier and a node corresponding to the vertical identifier, the hierarchical data includes each hierarchical identifier and a node corresponding to the hierarchical identifier, and the packet data includes each packet identifier and a node corresponding to the packet identifier. In an embodiment of the present invention, a plurality of partition areas may be included, each partition area may include a longitudinal area and a layered area, and each longitudinal area may also include a layered area, and the grouped area constitutes the layered area. Each partition area has a corresponding partition identifier, each longitudinal area has a corresponding longitudinal identifier, each partition area has a corresponding hierarchical identifier, and each group has a corresponding group identifier. If a certain node is located in a certain grouping area, a grouping identifier of the grouping area is distributed to the node, if the certain node is located in the certain layering area, a layering identifier of the layering area is distributed to the node, if the certain node is located in a certain longitudinal area, the longitudinal identifier of the longitudinal area is distributed to the node, and if the certain node is located in the certain partitioning area, a partitioning identifier of the partitioning area is distributed to the node.
Step 202, generating a layout template according to the relationship data of each node, thereby determining the position of each node in the layout template.
Since the relationship data of each node may include at least one of partition data, longitudinal data, hierarchical data, and grouping data, a layout template may be generated from the relationship data of each node. Similarly, the layout template comprises at least one of a partition area, a longitudinal area, a partition area and a grouping area, and each partition area, each longitudinal area, each partition area and each grouping area have corresponding identifiers. And then matching with a layout template according to at least one of the partition identifier, the longitudinal identifier, the hierarchical identifier and the grouping identifier corresponding to each node, so as to determine the position of each node in the layout template.
Optionally, step 202 may include: generating a layout template according to the relation data of each node; judging whether each node can be positioned in the layout template; if yes, determining the position of each node in the layout template according to a positioning result; if not, regenerating the layout template until each node can be positioned in the layout template, and then determining the position of each node in the layout template according to the positioning result. As shown in fig. 3, a layout template is generated according to the relationship data of each node, for each node, it is determined whether the node can be positioned in the layout template, if so, the position of the node in the layout template (for example, an X coordinate and a Y coordinate from the center of the lower left corner) is determined according to the positioning result of the node in the layout template, if not, the layout template is regenerated until each node can be positioned in the layout template, and then the position of each node in the layout template is determined according to the positioning result.
Optionally, the determining whether the nodes can be positioned in the layout template includes: and judging whether at least one of the partition identifier, the longitudinal identifier, the hierarchical identifier and the grouping identifier can be matched in the layout template according to at least one of the partition identifier, the longitudinal identifier, the hierarchical identifier and the grouping identifier corresponding to each node, so that each node is positioned in the layout template. Because the layout template comprises at least one of the subarea area, the longitudinal area, the layering area and the grouping area, and each subarea area, each longitudinal area, each layering area and each grouping area have corresponding marks, the marks can be identified and matched in the layout template one by one according to at least one of the subarea marks, the longitudinal marks, the layering marks and the grouping marks corresponding to each node, so that each node can be accurately positioned in the layout template.
Optionally, regenerating the layout template comprises: displaying the layout template to a user; receiving a layout adjustment instruction input by a user, and regenerating a layout template according to the layout adjustment instruction; the layout adjustment instruction carries at least one of a partition area, a longitudinal area, a partition area and a grouping area, and the corresponding identification of each partition area, each longitudinal area, each partition area and each grouping area. If each node cannot be positioned in the layout template, the layout template can be modified by a user, the user can adjust, add, delete at least one of the partition region, the longitudinal region, the partition region and the grouping region on the display interface, and then the layout template is regenerated according to a layout adjustment instruction input by the user, so that each node can be positioned in the regenerated layout template.
And 203, generating a chart according to the position of each node in the layout template and the basic data of each node.
After the position (such as the X coordinate and the Y coordinate away from the center of the lower left corner) of each node in the layout template is determined, a chart is generated according to the position of each node in the layout template and the basic data of each node.
Since the positions of the nodes in the layout template are determined, and then the graph is generated according to the positions of the nodes in the layout template and the basic data of the nodes, step 203 can be directly executed if the relational data of the nodes is not changed, and if the relational data of the nodes is only partially changed, the local regions of the layout template and the positions of the nodes in the layout template can be adjusted, and then step 203 is executed.
According to the various embodiments described above, it can be seen that the technical means of generating the layout template according to the relationship data of each node in the embodiments of the present invention to determine the position of each node in the layout template, and then generating the graph according to the position of each node in the layout template and the basic data of each node solves the technical problems in the prior art that recalculation is required for each rendering and the relationship between nodes at the same level in the whole link is difficult to distinguish. The embodiment of the invention can determine the position of the node with unchanged relation data before generating the chart, does not need to recalculate the position of each node in each rendering, and effectively saves the calculation time and calculation resources; and each node is positioned in the layout template, so that the relationship among nodes at the same level in the whole link can be conveniently distinguished, and even if the relationship is complex, the partitioned area, the longitudinal area, the partitioned area and the grouping area can be visually displayed by means of the layout template.
FIG. 4 is a flow chart of a method of generating a chart according to one referenced embodiment of the present invention. As still another embodiment of the present invention, as shown in fig. 4, the method of generating a graph may include:
step 401, obtaining basic data and relationship data of each node from a configuration management database, where the relationship data includes at least one of partition data, longitudinal data, hierarchical data, and packet data.
The partition data comprises each partition identifier and a node corresponding to the partition identifier, the longitudinal data comprises each longitudinal identifier and a node corresponding to the longitudinal identifier, the hierarchical data comprises each hierarchical identifier and a node corresponding to the hierarchical identifier, and the grouped data comprises each group identifier and a node corresponding to the group identifier.
And 402, generating a layout template according to the relation data of each node.
The layout template comprises at least one of a partition area, a longitudinal area, a partition area and a grouping area, and each partition area, each longitudinal area, each partition area and each grouping area have corresponding identifications.
Step 403, determining whether each node can be positioned in the layout template; if yes, go to step 404; if not, go to step 405.
Specifically, according to at least one of the partition identifier, the longitudinal identifier, the hierarchical identifier, and the group identifier corresponding to each node, it is determined whether at least one of the partition identifier, the longitudinal identifier, the hierarchical identifier, and the group identifier can be matched in the layout template, so that each node is located in the layout template.
And 404, determining the position of each node in the layout template according to the positioning result.
Step 405, displaying the layout template to a user.
Step 406, receiving a layout adjustment instruction input by a user, and regenerating a layout template according to the layout adjustment instruction; the layout adjustment instruction carries at least one of a partition area, a longitudinal area, a partition area and a grouping area, and the corresponding identification of each partition area, each longitudinal area, each partition area and each grouping area.
If each node cannot be positioned in the layout template, the step 405 is repeatedly executed until each node can be positioned in the layout template, and then the position of each node in the layout template is determined according to the positioning result.
Step 407, generating a chart according to the position of each node in the layout template and the basic data of each node.
Step 408, acquiring the monitoring data of each node from the stream processing platform, and converting the monitoring data of each node into a JOSON format.
The stream processing platform may be Kafka, the monitoring data acquired from the stream processing platform is monitoring data with a machine IP as a dimension, and then the monitoring data of each node is converted into a JOSON format, so as to perform subsequent processing on the monitoring data. The monitoring data comprises the running conditions of all the machines, including alarm information, the basic resource use conditions of the machines and the like.
And step 409, adding the monitoring data of each node to the graph.
The operation conditions of each machine, including alarm information, the basic resource use condition of the machine and the like, can be clearly known through a chart (a full link topological graph). When a user clicks a certain node in the chart, the whole associated link can be highlighted, when one node is abnormal, the condition of all the nodes in the succession can be checked, and the problem node and other nodes which are possibly influenced in the system can be quickly positioned.
In addition, in a reference embodiment of the present invention, the detailed implementation of the method for generating a diagram has been described in detail in the above-mentioned method for generating a diagram, and therefore, the repeated content will not be described again.
FIG. 5 is a schematic diagram of an apparatus for generating a graph according to an embodiment of the invention. As shown in fig. 5, the apparatus 500 for generating a chart includes an obtaining module 501, a layout module 502, and a generating module 503; the obtaining module 501 is configured to obtain basic data and relationship data of each node from a configuration management database, where the relationship data includes at least one of partition data, longitudinal data, hierarchical data, and packet data; the layout module 502 is configured to generate a layout template according to the relationship data of each node, so as to determine the position of each node in the layout template; the generating module 503 is configured to generate a chart according to the position of each node in the layout template and the basic data of each node.
Optionally, the layout module 502 is further configured to:
generating a layout template according to the relation data of each node;
judging whether each node can be positioned in the layout template;
if yes, determining the position of each node in the layout template according to a positioning result;
if not, regenerating the layout template until all the nodes can be positioned in the layout template, and then determining the positions of all the nodes in the layout template according to the positioning result.
Optionally, the layout module 502 is further configured to:
displaying the layout template to a user;
receiving a layout adjustment instruction input by a user, and regenerating a layout template according to the layout adjustment instruction; the layout adjustment instruction carries at least one of a partition area, a longitudinal area, a partition area and a grouping area, and the corresponding identification of each partition area, each longitudinal area, each partition area and each grouping area.
Optionally, the layout template includes at least one of a partitioned area, a vertical area, a partitioned area, and a grouped area, and each partitioned area, each vertical area, each partitioned area, and each grouped area has its corresponding identifier.
Optionally, the layout module 502 is further configured to:
and judging whether at least one of the partition identifier, the longitudinal identifier, the hierarchical identifier and the grouping identifier can be matched in the layout template according to at least one of the partition identifier, the longitudinal identifier, the hierarchical identifier and the grouping identifier corresponding to each node, so that each node is positioned in the layout template.
Optionally, the partition data includes each partition identifier and a node corresponding to the partition identifier, the vertical data includes each vertical identifier and a node corresponding to the vertical identifier, the hierarchical data includes each hierarchical identifier and a node corresponding to the hierarchical identifier, and the packet data includes each group identifier and a node corresponding to the group identifier.
Optionally, the generating module 503 is further configured to:
generating a chart according to the position of each node in the layout template and the basic data of each node, and then acquiring the monitoring data of each node from a stream processing platform;
converting the monitoring data of each node into a JOSON format;
and adding the monitoring data of each node into the graph.
The detailed description of the embodiment of the apparatus for generating a graph according to the present invention is already described in detail in the method for generating a graph, and therefore, the repeated description is not repeated here.
Fig. 6 illustrates an exemplary system architecture 600 to which a method of generating a chart or an apparatus for generating a chart of an embodiment of the invention may be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 605. The network 604 serves to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 605. Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 601, 602, 603 to interact with a server 605, via a network 604, to receive or send messages or the like. The terminal devices 601, 602, 603 may have installed thereon various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 601, 602, 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 605 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 601, 602, 603. The background management server can analyze and process the received data such as the article information query request and feed back the processing result to the terminal equipment.
It should be noted that the method for generating the chart provided by the embodiment of the present invention is generally executed by the server 605, and accordingly, the apparatus for generating the chart is generally disposed in the server 605.
It should be understood that the number of terminal devices, networks, and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 7, shown is a block diagram of a computer system 700 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the use range of the embodiment of the present invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including components such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that the computer program read out therefrom is mounted in the storage section 708 as necessary.
In particular, according to embodiments of the present disclosure, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer programs according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes an acquisition module, a placement module, and a generation module, where the names of the modules do not in some cases constitute a limitation on the module itself.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not assembled into the device. The computer readable medium carries one or more programs which, when executed by a device, implement the method of: acquiring basic data and relation data of each node from a configuration management database, wherein the relation data comprises at least one of longitudinal data, partition data, hierarchical data and grouped data; generating a layout template according to the relation data of each node, thereby determining the position of each node in the layout template; and generating a chart according to the position of each node in the layout template and the basic data of each node.
As another aspect, an embodiment of the present invention further provides a computer program product, which includes a computer program, and when executed by a processor, the computer program implements the method described in any of the above embodiments.
According to the technical scheme of the embodiment of the invention, because the technical means that the layout template is generated according to the relation data of each node is adopted, so that the position of each node in the layout template is determined, and then the chart is generated according to the position of each node in the layout template and the basic data of each node is adopted, the technical problems that recalculation is needed and the relation between nodes at the same level in the whole link is difficult to distinguish in each rendering in the prior art are solved. The embodiment of the invention can determine the position of the node with unchanged relation data before generating the chart, does not need to recalculate the position of each node in each rendering, and effectively saves the calculation time and calculation resources; and each node is positioned in the layout template, so that the relationship among nodes at the same level in the whole link can be conveniently distinguished, and even if the relationship is complex, the partitioned area, the longitudinal area, the partitioned area and the grouping area can be visually displayed by means of the layout template.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method of generating a chart, comprising:
acquiring basic data and relation data of each node from a configuration management database, wherein the relation data comprises at least one of partition data, longitudinal data, hierarchical data and grouped data;
generating a layout template according to the relation data of each node, thereby determining the position of each node in the layout template;
and generating a chart according to the position of each node in the layout template and the basic data of each node.
2. The method of claim 1, wherein generating a layout template from the relationship data of the respective nodes to determine the position of the respective nodes in the layout template comprises:
generating a layout template according to the relation data of each node;
judging whether each node can be positioned in the layout template;
if yes, determining the position of each node in the layout template according to a positioning result;
if not, regenerating the layout template until each node can be positioned in the layout template, and then determining the position of each node in the layout template according to the positioning result.
3. The method of claim 2, wherein regenerating a layout template comprises:
displaying the layout template to a user;
receiving a layout adjustment instruction input by a user, and regenerating a layout template according to the layout adjustment instruction; the layout adjustment instruction carries at least one of a partition area, a longitudinal area, a partition area and a grouping area, and the corresponding identification of each partition area, each longitudinal area, each partition area and each grouping area.
4. The method of any of claims 1-3, wherein the layout template comprises at least one of a partitioned region, a vertical region, a partitioned region, and a grouped region, each partitioned region, each vertical region, each partitioned region, and each grouped region having their corresponding identifications.
5. The method of claim 4, wherein determining whether the respective nodes can be positioned in the layout template comprises:
and judging whether at least one of the partition identifier, the longitudinal identifier, the hierarchical identifier and the grouping identifier can be matched in the layout template according to at least one of the partition identifier, the longitudinal identifier, the hierarchical identifier and the grouping identifier corresponding to each node, so that each node is positioned in the layout template.
6. The method of claim 1, wherein the partition data comprises each partition identifier and its corresponding node, wherein the vertical data comprises each vertical identifier and its corresponding node, wherein the hierarchical data comprises each hierarchical identifier and its corresponding node, and wherein the packet data comprises each packet identifier and its corresponding node.
7. The method of claim 1, after generating a graph according to the position of each node in the layout template and the basic data of each node, further comprising:
acquiring monitoring data of each node from a stream processing platform;
converting the monitoring data of each node into a JOSON format;
and adding the monitoring data of each node into the graph.
8. An apparatus for generating a chart, comprising:
the system comprises an acquisition module, a configuration management database and a management module, wherein the acquisition module is used for acquiring basic data and relation data of each node from the configuration management database, and the relation data comprises at least one of partition data, longitudinal data, hierarchical data and grouped data;
the layout module is used for generating a layout template according to the relation data of each node so as to determine the position of each node in the layout template;
and the generating module is used for generating a chart according to the positions of the nodes in the layout template and the basic data of the nodes.
9. An electronic device, comprising:
one or more processors;
a storage device to store one or more programs,
the one or more programs, when executed by the one or more processors, implement the method of any of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202211156490.5A 2022-09-22 2022-09-22 Method and device for generating chart Active CN115495518B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211156490.5A CN115495518B (en) 2022-09-22 2022-09-22 Method and device for generating chart

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211156490.5A CN115495518B (en) 2022-09-22 2022-09-22 Method and device for generating chart

Publications (2)

Publication Number Publication Date
CN115495518A true CN115495518A (en) 2022-12-20
CN115495518B CN115495518B (en) 2023-10-24

Family

ID=84469471

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211156490.5A Active CN115495518B (en) 2022-09-22 2022-09-22 Method and device for generating chart

Country Status (1)

Country Link
CN (1) CN115495518B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102281154A (en) * 2011-07-12 2011-12-14 广东宜通世纪科技股份有限公司 Display method and system of network topology graphing
CN104380277A (en) * 2012-06-29 2015-02-25 英特尔公司 Method, system, and device for managing server hardware resources in a cloud scheduling environment
CN109284152A (en) * 2017-07-21 2019-01-29 中兴通讯股份有限公司 A kind of menu visual configuration method, equipment and computer readable storage medium
CN109783568A (en) * 2018-12-29 2019-05-21 咪咕文化科技有限公司 A kind of generation method of network topological diagram, device and storage medium
CN109783550A (en) * 2018-12-29 2019-05-21 北京奇安信科技有限公司 Data processing method, device, system, computer readable storage medium
US20190332693A1 (en) * 2018-04-27 2019-10-31 Microsoft Technology Licensing, Llc Methods and systems for generating property keys corresponding to physical spaces, devices, and/or users
CN110557393A (en) * 2019-09-05 2019-12-10 腾讯科技(深圳)有限公司 network risk assessment method and device, electronic equipment and storage medium
CN111061921A (en) * 2019-12-04 2020-04-24 智器云南京信息科技有限公司 Image layout implementation method, system, terminal equipment and storage medium
CN112035667A (en) * 2020-09-02 2020-12-04 河南中原消费金融股份有限公司 Knowledge graph display method and device and terminal equipment
CN112632136A (en) * 2020-12-11 2021-04-09 北京国电通网络技术有限公司 Data statistical analysis method and device, electronic equipment and storage medium
CN113887182A (en) * 2021-09-29 2022-01-04 平安普惠企业管理有限公司 Table generation method, device, equipment and storage medium
CN113987053A (en) * 2021-10-20 2022-01-28 上海淇玥信息技术有限公司 Model analysis method and device and electronic equipment
WO2022135057A1 (en) * 2020-12-23 2022-06-30 深圳市道通科技股份有限公司 Vehicle bus topological graph generation method and apparatus, and computing device
CN114996503A (en) * 2022-05-20 2022-09-02 京东城市(北京)数字科技有限公司 Node positioning method and device

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102281154A (en) * 2011-07-12 2011-12-14 广东宜通世纪科技股份有限公司 Display method and system of network topology graphing
CN104380277A (en) * 2012-06-29 2015-02-25 英特尔公司 Method, system, and device for managing server hardware resources in a cloud scheduling environment
CN109284152A (en) * 2017-07-21 2019-01-29 中兴通讯股份有限公司 A kind of menu visual configuration method, equipment and computer readable storage medium
US20190332693A1 (en) * 2018-04-27 2019-10-31 Microsoft Technology Licensing, Llc Methods and systems for generating property keys corresponding to physical spaces, devices, and/or users
CN109783568A (en) * 2018-12-29 2019-05-21 咪咕文化科技有限公司 A kind of generation method of network topological diagram, device and storage medium
CN109783550A (en) * 2018-12-29 2019-05-21 北京奇安信科技有限公司 Data processing method, device, system, computer readable storage medium
CN110557393A (en) * 2019-09-05 2019-12-10 腾讯科技(深圳)有限公司 network risk assessment method and device, electronic equipment and storage medium
CN111061921A (en) * 2019-12-04 2020-04-24 智器云南京信息科技有限公司 Image layout implementation method, system, terminal equipment and storage medium
CN112035667A (en) * 2020-09-02 2020-12-04 河南中原消费金融股份有限公司 Knowledge graph display method and device and terminal equipment
CN112632136A (en) * 2020-12-11 2021-04-09 北京国电通网络技术有限公司 Data statistical analysis method and device, electronic equipment and storage medium
WO2022135057A1 (en) * 2020-12-23 2022-06-30 深圳市道通科技股份有限公司 Vehicle bus topological graph generation method and apparatus, and computing device
CN113887182A (en) * 2021-09-29 2022-01-04 平安普惠企业管理有限公司 Table generation method, device, equipment and storage medium
CN113987053A (en) * 2021-10-20 2022-01-28 上海淇玥信息技术有限公司 Model analysis method and device and electronic equipment
CN114996503A (en) * 2022-05-20 2022-09-02 京东城市(北京)数字科技有限公司 Node positioning method and device

Also Published As

Publication number Publication date
CN115495518B (en) 2023-10-24

Similar Documents

Publication Publication Date Title
CN110019350B (en) Data query method and device based on configuration information
CN111460129B (en) Method, device, electronic equipment and storage medium for generating identification
CN111190888A (en) Method and device for managing graph database cluster
CN109903105B (en) Method and device for perfecting target commodity attributes
WO2021023149A1 (en) Method and apparatus for dynamically returning message
CN111427701A (en) Workflow engine system and business processing method
CN114116065B (en) Method and device for acquiring topological graph data object and electronic equipment
CN110795315A (en) Method and device for monitoring service
CN110795147A (en) Interface protocol file management method and device
CN110689268A (en) Method and device for extracting indexes
CN115686499A (en) Method, device, storage medium and electronic equipment for generating request message
CN113190517B (en) Data integration method and device, electronic equipment and computer readable medium
CN110928594A (en) Service development method and platform
CN110866001A (en) Method and device for determining order to be processed
CN111382953A (en) Dynamic process generation method and device
CN114995719B (en) List rendering method, device, equipment and storage medium
CN108810130B (en) Method and device for planning distribution request
CN112948138A (en) Method and device for processing message
CN115495518B (en) Method and device for generating chart
CN111026629A (en) Method and device for automatically generating test script
CN113468342A (en) Data model construction method, device, equipment and medium based on knowledge graph
CN113762910A (en) Document monitoring method and device
CN112988857A (en) Service data processing method and device
CN113742321A (en) Data updating method and device
CN113760343A (en) Method and device for processing service request

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