CN106557457B - QT-based system for automatically generating cross-platform complex flow chart - Google Patents

QT-based system for automatically generating cross-platform complex flow chart Download PDF

Info

Publication number
CN106557457B
CN106557457B CN201611061266.2A CN201611061266A CN106557457B CN 106557457 B CN106557457 B CN 106557457B CN 201611061266 A CN201611061266 A CN 201611061266A CN 106557457 B CN106557457 B CN 106557457B
Authority
CN
China
Prior art keywords
flow chart
flow
node
information
connecting line
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.)
Active
Application number
CN201611061266.2A
Other languages
Chinese (zh)
Other versions
CN106557457A (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.)
CETC 28 Research Institute
Original Assignee
CETC 28 Research Institute
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 CETC 28 Research Institute filed Critical CETC 28 Research Institute
Priority to CN201611061266.2A priority Critical patent/CN106557457B/en
Publication of CN106557457A publication Critical patent/CN106557457A/en
Application granted granted Critical
Publication of CN106557457B publication Critical patent/CN106557457B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/174Form filling; Merging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text

Abstract

The invention discloses a QT-based system for automatically generating a cross-platform complex flow chart, which comprises a flow chart basic primitive drawing module, a flow chart structural description module, a flow monitoring function supporting module and a flow monitoring application supporting module, wherein the flow chart basic primitive drawing module is used for drawing a flow chart basic primitive; the flow chart basic primitive drawing module carries out inheritance and derivation from a base class provided by QT to form a flow chart basic primitive class; the flow chart structural description module is used for describing the whole flow chart in a structural mode, analyzing the format of the description and placing the information in a corresponding container; the flow monitoring function supporting module is used for flow chart display style setting, network transmission, database access, communication and closed loop inspection, and flow switching with different granularities; the process monitoring application support module is used for topology sequencing, task scheduling, critical path and shortest path calculation and supporting construction network diagram application.

Description

QT-based system for automatically generating cross-platform complex flow chart
Technical Field
The invention belongs to the field of information systems, and particularly relates to a QT-based system for automatically generating a cross-platform complex flow chart.
Background
The graphical process monitoring interface has the characteristics of intuition, easy understanding, convenient interaction and convenient operation, and is the first choice of various application operators and application developers. Based on the Windows platform, software manufacturers provide many flow chart control products capable of secondary development, such as Microsoft Office Visio, hundred million Diagram experts EDraw Max, vector image drawing software Diagram Designer, and the like. Visio is the most widely used product, can perform various complex graphic designs, has powerful functions and rich interfaces, and provides a primitive customization function.
However, under the heavy tide of localization of software and hardware, various application software starts to migrate to the localization software and hardware environment typically configured by the godson CPU, the winning-bid kylin operating system and the dreaming database, and for application software developers, a set of flow chart controls based on the localization software and hardware platform, which are light in weight and easy to develop secondarily, is urgently needed.
The Diagram Designer is a powerful cross-platform application program, can quickly and simply create professional icons and illustrations in a document, provides vector drawing tools, libraries and a plurality of preset legend shapes, and has high requirements on the operating environment of software and hardware; the concept draw Office is also a cross-platform control product, but has the defects of large volume and complex interface, and is not suitable for being embedded into an application system for secondary development. At present, a set of flow chart control based on a domestic software and hardware platform, complete functions, light and convenient development, small scale and low requirement on an operating environment is not found in the market.
Disclosure of Invention
The patent aims to provide a QT-based system for automatically generating a cross-platform complex flow chart, which comprises a flow chart basic primitive drawing module, a flow chart structural description module, a flow monitoring function supporting module and a flow monitoring application supporting module.
The flow chart basic primitive drawing module carries out inheritance and derivation from basic classes such as a base class QObject (base classes of all QT classes), a QGraphicItem (two-dimensional graph base class in a QT graph view system), a QGraphicLineItem (linear graph base class in the QT graph view system), a QGraphicLayoutItem (layout object base class in the QT graph view system) and the like provided by QT to form a flow chart basic primitive class, wherein the flow chart basic primitive class comprises a connecting line class and a node class;
the flow chart structured description module is used for describing the whole flow chart in a structured mode, including the description of flow chart total information, branch flow information, node information and connecting line information, performing format analysis on the description, and placing the information in a corresponding container;
the flow monitoring function supporting module is used for flow chart display style setting, network transmission, database access, communication and closed loop inspection, and flow switching with different granularities;
the process monitoring application support module is used for topology sequencing, task scheduling, critical path and shortest path calculation and supports construction network diagram application.
In order to make the flow chart distribute evenly and display attractively, the system combines the function of a layout device provided by a QT two-dimensional graph engine, a matrix is preset according to the overall outline of the flow chart, each node of the flow chart is respectively located at the corresponding position of a designated row and a designated column in the matrix, and a flow chart control automatically calculates the central position of the node according to the preset row spacing and the preset column spacing so as to align the nodes; the connecting line only needs to connect the specified start node and the specified end node.
The connecting lines comprise direct connecting lines, parallel connecting lines and forked connecting lines;
the direct connecting line is a straight line, directly connects the two primitives, and draws a triangle arrow at the connecting point of the target primitives;
the parallel connection line type has more than two parallel connection lines between two primitives and is used for drawing indirect connection lines parallel to the direct connection lines;
and when the branch connecting lines are split into more than two flows from the main flow or are collected into the main flow from more than two flows, drawing branch lines and collecting lines.
The node classes comprise a circular graph node class and a square graph node class, and the square graph node class comprises a rectangular graph node class and a square graph node class.
The description of the flow chart total information, the branch flow information, the node information and the connecting line information is based on extensible Markup language XML (extensible Markup language), wherein the flow chart total information attribute comprises the following steps:
1) unique identification of the flow: a symbol for uniquely distinguishing the flow;
2) the unique identifier of the parent process: uniquely distinguishing a parent flow (previous layer flow) symbol of the flow, and realizing the switching from the flow to the parent flow through the attribute, namely, the switching from the flows with different granularities;
3) whether the complex pattern is: and distinguishing whether the flow chart is in a simple mode or a complex mode, wherein the simple mode flow chart is drawn around the activity main line, and the complex mode does not have the activity main line.
The branch flow information attributes include:
1) name: branch flow names (which may be understood as activities or tasks);
2) unique identification of corresponding unit: a unique distinguishing symbol of the unit bearing the flow or task;
3) whether the main process is as follows: in the simple mode flow chart, identifying whether the branch flow is a flow on an active main line;
4) the row number: the row number of the current branch flow.
The node information attributes include:
1) name: the name of the current node;
2) unique node identification: a symbol that uniquely distinguishes a node;
3) unique identification of the flow: unique identification of the flow chart to which the current node belongs;
4) unique identification of corresponding unit: unique distinguishing symbol of unit associated with current connecting line
5) The row number: the row number of the node;
6) the sequence numbers listed: the row number of the node;
7) node state: the progress of the activity or task represented by the current node can be expanded according to the requirement;
8) distance from previous node: distance from the previous node on the same row.
The connection line information attributes include:
1) description of the contents: content represented by the connecting line;
2) unique identification of connecting wire: uniquely distinguishing the symbols of the connecting lines;
3) the type of the connecting wire: distinguishing connecting line types, 0 representing direct connecting line, 1 representing parallel connecting line, 2 representing branched summary connecting line
4) Whether it is above: when the connecting line type is a parallel connecting line, the current parallel connecting line is above or below the direct connecting line;
5) distance from main process: when the type of the connecting line is a parallel connecting line, the distance between the current parallel connecting line and the parallel line of the intermediate direct connecting line is represented;
6) whether to summarize: when the type of the connecting line is a forked summary connecting line, whether the connecting line is a summary connecting line or not is indicated
7) Unique identification of corresponding unit: a unique distinguishing symbol of a unit associated with the current connecting line;
8) unique identifier of the starting node: the only distinguishing symbol of the starting node connected with the current connecting line;
9) unique identification of termination node: the starting node of the current connecting line connection uniquely distinguishes the symbol.
The flow monitoring function supporting module is used for flow chart display style setting, network transmission, database access, communication and closed loop inspection and different granularity flow switching and comprises the following steps:
based on a QT two-dimensional graph engine, the setting of the display style of the flow chart is realized, wherein the setting comprises the font color and size, the color and thickness of lines, the flow chart background, the interval size of flow chart primitives and the ground color;
based on the network transmission function provided by the QtNetWork (cross-platform network module), the network transmission and the message receiving and sending are realized with the remote terminal;
the access of a database table and a view is realized based on a QtSql (database access module), and the database reading and storing operation is realized;
analyzing the structure of the flow chart based on a database access interface in QtXML (XML file read-write module) or QtNetWork (cross-platform network module) to form the total information, the branch flow container, the node container and the connecting line container of the flow chart;
aiming at various container information, the communication inspection and the closed-loop inspection of the flow chart are realized through a directed graph correlation algorithm; the method comprises the steps of realizing the connection check of a flow chart through a directed graph correlation algorithm, such as a Tarjan algorithm, a Kruskal algorithm and a Warshall algorithm, and realizing the closed-loop check through methods of depth priority, topological sorting and the like;
switching of flows with different granularities is realized by returning the father flow unique identification information of the flow general information and the flow unique identification information of the designated node information to the previous layer of flow and entering a refined flow corresponding to the node;
and providing a function of editing and maintaining the flow chart by a user, and storing the flow chart in a warehouse or forming an XML file.
The process monitoring application support module is used for topology sequencing, task scheduling, key and shortest path calculation, and supports the application of a construction network diagram, and comprises the following steps:
aiming at the branch flow containers, the node containers and the connecting line containers, providing topological sorting and task scheduling functions of the flows based on a directed graph topological sorting method;
aiming at application requirements, based on application parameter information given by connecting lines or nodes, such as network bandwidth, processing efficiency and the like, application parameters can be converted into path length or cost, and a functional interface for solving a key path and a shortest path is externally provided by adopting a graph key path and graph shortest path algorithm;
based On application parameter information given by connecting lines or nodes, the calculation and time reminding functions of the earliest starting time, the latest starting time, the total maneuvering time and the free maneuvering time based On an AOE (Activity On edge Network) or AOV (Activity On Vertex Network) Network are provided.
The system has the functions of structure analysis, process display and process monitoring, and comprises the following steps:
analyzing the primitive information stored in a class analysis database or an XML configuration file through a flow chart, wherein the primitive information comprises node information, information of a front-back relationship between nodes and other application information of the nodes;
the flow chart display window class draws all the primitives according to the flow chart structure analysis information, and lays out all the primitives through a layout device to construct a complete flow chart;
the monitoring program receives the state information sent by the corresponding unit of the primitive through the port monitoring class, updates the primitive and the state of the network graph in real time, automatically calls a flow graph core algorithm, analyzes the current working state, prompts a user, and calls a specific function according to the requirement of the user.
The system is developed for the second time, so that a user can inherit and derive a node class and a connecting line class with new attributes on the basis of the existing fruits, and the function of flow display is expanded; meanwhile, a user can customize a topological graph analysis algorithm, superpose application functions, improve application analysis and decision-making assisting capability, and realize visible and acquired monitoring of various processes.
The system has the advantages of complete functions, light development, small scale and low requirement on the operating environment, and can well support the development and operation of the process monitoring application software of the domestic software and hardware platform.
The flow chart development control is completely based on the flow chart development of the self-contained QT language in the domestic operating system, the domestic operating systems provided by several domestic manufacturers all have self-contained QT development environments, and for example, the self-contained version of the bid-winning kylin operating system jointly released by the national defense Korea and bid-winning software companies is the development environment of 4.7.4 QT. The flow chart control does not need to additionally purchase and install a development environment, is small, exquisite, portable and cross-platform in operation, and can basically meet the secondary development requirements and application requirements of the common flow chart.
The system directly inherits and derives from QT basic two-dimensional graphics, and realizes various basic primitives required by process monitoring, including three connecting lines of direct connection, parallel connection and bifurcation connection, and two types of square and round process nodes; the monitoring process is defined and described based on a structured mode, a connectivity check and closed-loop check auxiliary algorithm is adopted to ensure the accuracy and effectiveness of the flow chart construction, development interfaces for obtaining and modifying the attributes of various primitives are provided, and a flow chart development control is formed. The application software integrates and configures the system, and can meet the process monitoring application requirements of various complex requirements by combining the functions of database access, network transmission, auxiliary decision and the like; because the system is realized based on QT, the system can be compiled across different operating system platforms, and can be compiled once and run everywhere; meanwhile, the system has lower requirements on the performance of software and hardware, and provides better technical support for graphical display of the application software flow under the current large tide of localization of the software and the hardware.
Has the advantages that: the system has the remarkable advantages that: (1) the system is compiled and operated in a cross-platform mode, is developed completely based on QT, and can be developed once and operated everywhere; (2) the requirement on the performance of the operating environment is low, and tests prove that the control smoothly operates in typical domestic software and hardware environments of a Loongson CPU, a winning-bid kylin operating system and a Daemon database without jamming and occupying a large amount of resources; (3) the method supports the display and monitoring of complex processes, and supports two process display modes of an AOE network and an AOV network; (4) closed-loop and connected checking are adopted to ensure the correctness and the availability of the flow chart construction.
Drawings
The foregoing and other advantages of the invention will become more apparent from the following detailed description of the invention when taken in conjunction with the accompanying drawings.
Fig. 1 is a system overall framework.
Fig. 2 is a schematic diagram of a system implementation method.
Fig. 3 is a class sequence diagram generated by the flowchart.
Fig. 4 is a simple schema exemplary flow diagram.
FIG. 5 is a typical flow example of a complex schema.
Fig. 6 is a schematic diagram of direct connection lines.
Fig. 7 is a schematic diagram of parallel connection lines.
Fig. 8 is a schematic view of a bifurcated connecting line.
Detailed Description
The technical content of the invention is explained in detail below with reference to the accompanying drawings:
the functional logic division of the system is shown in figure 1, and by means of QT functional modules, the functional modules of a basic diagram element layer, a functional supporting layer and an application supporting layer are realized, and the secondary development of various monitoring applications is supported based on various interfaces.
The QT layer is a main QT function module that the system needs to use, and includes QtCore (QT base module including signal and slot communication, input and output, event, object processing, multithreading, etc.), QtGui (graphical user interface module), GtXML (XML file read-write module), QtSql (database access module), and QtNetwork (cross-platform network module).
The basic element layer is a basic element for realizing the flow chart and comprises connecting lines and nodes. The connecting lines are divided into direct connecting lines, parallel connecting lines and forked collecting connecting lines; the nodes are divided into two types of square (rectangle, square) and circle.
The function support layer is used for the functions of graphic structure analysis, display style setting, network transmission access, database access storage, directed topology inspection (communication and closed loop inspection) and different-granularity flow switching of the flow chart.
The flow chart structured description module is used for describing the whole flow chart in a structured mode, including the description of flow chart total information, branch flow information, node information and connecting line information, performing format analysis on the description, and placing the information in a corresponding container; in order to enable the flow chart to be uniformly distributed and attractive in display, a matrix is preset according to the overall outline of the flow chart by combining with a layout function provided by a QT two-dimensional graph engine, each node of the flow chart is respectively located at a position corresponding to a designated row and a designated column in the matrix, and a flow chart control automatically calculates the central position of the node according to a preset row distance and a preset column distance so as to align the nodes.
The process monitoring application supporting layer is used for topology sequencing, task scheduling, critical path and shortest path calculation and supports construction network diagram application.
The basic primitive classes include two major classes, a connecting line class and a node class.
1) Connecting lines
① direct connect line class (Ctrl _ graphics Link), a straight line, directly connects two primitives, draws triangle arrows at the connection point of the target primitives, as shown in FIG. 6;
② parallel connection line class (Ctrl _ graphics Linkparallel), where there are multiple parallel connection lines between two primitives for drawing indirect connection lines parallel to the direct connection lines, as shown in FIG. 7;
③ branching connecting line class (Ctrl _ graphics LinkBranch) is used to draw branch lines and summary lines when a main flow is divided into a plurality of flows or when a plurality of flows are summarized into a main flow, as shown in FIG. 8.
2) Class of nodes
① round graph node class (Ctrl _ graphics Nodecircle)
② Square graph node class (Ctrl _ graphics NodeRectant) (including rectangle and square)
Fig. 4 is a fragment example of a typical flow of a simple model, where the flow corresponds to a line where "professional 4" is located, the main flow of the flow is a main flow, flows corresponding to professional 3 and professional 5 are both non-main flows, the node ① and the node ② are connected in series through a direct connection line and a parallel connection line, a "professional 3 ground equipment self-test" connection line represents an activity that professional 3 needs to complete, a "professional 4 ground equipment self-test" connection line represents an activity that professional 4 needs to complete, a "professional 5 ground equipment self-test" connection line represents an activity that professional 5 needs to complete, a "①" node represents "professional 3 ground equipment self-test", "professional 4 ground equipment self-test", "professional 5 ground equipment self-test" is performed in parallel from the node, and a "②" node represents that after each professional equipment self-test is completed, internal and external inspection work of each professional can be performed in parallel at the same time.
Fig. 5 is a fragmentary example of a typical flow of a complex model, wherein the flow does not have a main flow, and nodes are connected in parallel or in series through a direct connection line, a parallel connection line and a bifurcation connection line. (the contents of FIGS. 4 and 5 are for illustrative purposes only and are not intended to be protected by the present disclosure.)
The leftmost blank node in fig. 5 indicates that the subsequent work is performed by branching and parallel execution from the node, and is divided into 5 branches to be executed respectively; the blank node at the rightmost side in the figure indicates that the work behind the blank node can be performed only after 5 respective performed works are all finished.
The description is given by taking a section of flow among the intermediate nodes "①", "⑥" and "⑨" as an example, the activities represented by "activities 1 to 6 (unit 2)", "activities 6 to 9 (unit 3)", "activities 1 to 9 (unit 4)" are respectively responsible for completion by unit 2, unit 3 and unit 4, the node "①" indicates that the activities represented by "activities 1 to 6 (unit 2)" and "activities 1 to 9 (unit 4)" can be simultaneously performed after entering the branch flow, the node "⑥" indicates that the activities represented by "activities 6 to 9 (unit 3)" can be started to be executed only after the activities represented by "activities 1 to 6 (unit 2)" are completed, and the node "⑨" indicates that the branch flow is completely completed and the rightmost blank node in the graph can be entered after the activities represented by "activities 6 to 9 (unit 3)" and "activities 1 to 9 (unit 4)" are completed.
The flow chart structurally describes that:
describing the whole flow chart in a structured mode, wherein the whole flow chart comprises flow chart total information, branch flow information, connecting line information and node information, analyzing the format of the description, and placing the information in a corresponding container.
(1) Flowchart general information
Describing by using extensible markup language XML, wherein the flow chart general information attribute comprises the following steps:
1) unique identification of the flow: a symbol for uniquely distinguishing the flow;
2) the unique identifier of the parent process: uniquely distinguishing a parent flow (previous layer flow) symbol of the flow, and realizing the switching from the flow to the parent flow through the attribute, namely, the switching from the flows with different granularities;
3) whether the complex pattern is: and distinguishing whether the flow chart is in a simple mode or a complex mode, wherein the simple mode flow chart is drawn around the activity main line, and the complex mode does not have the activity main line.
(2) Branch flow information
The branch flow information attributes include:
1) name: branch flow names (which may be understood as activities or tasks);
2) unique identification of corresponding unit: a unique distinguishing symbol of the unit bearing the flow or task;
3) whether the main process is as follows: in the simple mode flow chart, identifying whether the branch flow is a flow on an active main line;
4) the row number: the row number of the current branch flow.
A branch flow set is formed by a number of branch flows.
(3) Node information
The node information attributes include:
1) name: the name of the current node;
2) unique node identification: a symbol that uniquely distinguishes a node;
3) unique identification of the flow: unique identification of the flow chart to which the current node belongs;
4) unique identification of corresponding unit: unique distinguishing symbol of unit associated with current connecting line
5) The row number: the row number of the node;
6) the sequence numbers listed: the row number of the node;
7) node state: the progress of the activity or task represented by the current node can be expanded according to the requirement;
8) distance from previous node: distance from the previous node on the same row.
A node set is formed by a number of nodes.
(4) Connection line information
The connection line information attributes include:
1) description of the contents: content represented by the connecting line;
2) unique identification of connecting wire: uniquely distinguishing the symbols of the connecting lines;
3) the type of the connecting wire: distinguishing connecting line types, 0 representing direct connecting line, 1 representing parallel connecting line, 2 representing branched summary connecting line
4) Whether it is above: when the connecting line type is a parallel connecting line, the current parallel connecting line is above or below the direct connecting line;
5) distance from main process: when the type of the connecting line is a parallel connecting line, the distance between the current parallel connecting line and the parallel line of the intermediate direct connecting line is represented;
6) whether to summarize: when the type of the connecting line is a forked summary connecting line, whether the connecting line is a summary connecting line or not is indicated
7) Unique identification of corresponding unit: a unique distinguishing symbol of a unit associated with the current connecting line;
8) unique identifier of the starting node: the only distinguishing symbol of the starting node connected with the current connecting line;
9) unique identification of termination node: the starting node of the current connecting line connection uniquely distinguishes the symbol.
A plurality of connecting lines form a connecting line set.
And (4) function support:
in order to realize the support of the application, the flow monitoring function support module realizes the following functions:
(1) based on a QT two-dimensional graph engine, the setting of the display style of the flow chart, such as the color and the size of a font, the color and the thickness of lines, the background of the flow chart, the interval size of primitives of the flow chart, the ground color and the like, is realized;
(2) based on the network transmission function provided by QtNetWork, the network transmission and message receiving and sending can be realized with the remote terminal;
(3) realizing the access of a database table and a view based on QtSql, and realizing the database reading and storing operation;
(4) analyzing the structure of the flow chart based on a database access interface in QtXML or (2) to form the contents of the total information, the branch flow container, the node container, the connecting line container and the like of the flow chart;
(5) aiming at various container information in the step (3), communicating inspection and closed-loop inspection of the flow chart are realized through a directed graph correlation algorithm;
(6) the process can be returned to the previous layer of the process chart and the detailed process chart corresponding to the entry node through the 'father process unique identifier' information of the overall information and the 'process unique identifier' information of the designated node information, so that the process is zoomed;
(7) and providing a function of editing and maintaining the flow chart by a user, and storing the flow chart in a warehouse or forming an XML file.
Application support:
in order to support various comprehensive applications, the flow monitoring application support module realizes functions based on the function support layer and has the following application support:
(1) aiming at the contents of a branch flow container, a node container, a connecting line container and the like, providing the topological sorting and task scheduling functions of the flow based on a directed graph topological sorting method;
(2) aiming at application requirements, based on parameter information given by connecting lines or nodes, a graph key path and graph shortest path algorithm can be adopted to externally provide a functional interface for solving the key path and the shortest path;
(3) in order to meet the practical application similar to a construction network diagram, the control provides calculation functions of the AOE or AOV based on the earliest starting time, the latest starting time, the total maneuvering time, the free maneuvering time and the like based on the parameter information given by the connecting lines or the nodes;
(4) and providing an application reminding function of various information aiming at the application.
The main realization process is as follows:
FIG. 2 is a diagram of the whole construction and application relationship thereof, the upper right part is a diagram of a primitive relationship, the upper left part is an information relationship diagram of the primitive, and the rest shows how to construct a flow diagram through the primitive, and the monitoring function is realized through the flow diagram. Wherein
Figure BDA0001163521790000101
Indicates inheritance,Represents a polymerization,
Figure BDA0001163521790000103
Representing dependencies, the graph contains mainly three parts:
(1) the upper left side is a graphic element information relationship and mainly comprises a Node information class FlowChart _ Node and a connecting line information class FlowChart _ Link which are inherited from a graphic information basic class Ctrl _ graphics InfoBase and used for representing graphic display information contained in the Node class and the connecting line class.
(2) The upper right side is a primitive relationship, inherits from a Qt graph base class, mainly comprises a QObject (base class of all QT classes), a QGraphicLacoutItem (layout object base class in a QT graph view system), a QGraphicItem (two-dimensional graph base class in the QT graph view system), and a QGraphiceItem (linear graph base class in the QT graph view system), and extends the QGraphiceImm, and mainly comprises a connecting line class Ctrl _ GraphicsLink and a node class Ctrl _ GraphicNodeBase. The connecting lines mainly derive a branched connecting line type Ctrl _ GraphicsLinkBranch and a parallel connecting line type Ctrl _ GraphicsLinkparallel, the nodes mainly derive a rectangle type Ctrl _ GraphicsNodeRectangle and a circle type Ctrl _ GraphicsNodeCircle, and different graphs can represent different types of information. Each graphic element comprises related graphic element information, wherein information such as the relation among lines, columns and front nodes in a node class, the starting node, the terminating node and the connecting line type in the connecting line class is used for drawing a network graph, information such as the earliest starting time, the latest starting time, the total maneuvering time in the connecting line class and whether a key path exists in the node class is used for representing the time characteristic of each node in the network graph, parent-child network graph information in the node class is used for representing the network graph level relation, and a user can inherit and derive the node class and the connecting line class with new attributes on the basis of the existing components, such as the characteristics of a custom-displayed style, colors and contained information, so that the function of the system is expanded.
(3) The system application relationship is below. When the flow chart is constructed, the flow chart analysis type CTM _ FlowChartParser is used for analyzing the primitive information stored in the database or the XML configuration file, the primitive information comprises node information, the information of the front and back continuous relation between the nodes and other application information of the nodes, connecting lines and the nodes are drawn in the flow chart display window type CTM _ FlowChartWidget, a network chart is generated, and the primitives are laid out through a layout device. Connecting lines and nodes in the network graph can be monitoring objects, state information reported by a unit corresponding to a primitive is received through a monitoring class Sjyh _ Ssjk _ server, the primitive and the state of the network graph are updated in real time, a task flow can be displayed and controlled in real time in a flow chart monitoring class Sjyh _ Ssjk _ Wlt, a core algorithm class Sjyh _ WltXg is called to check the current state of the network graph in real time and prompt information, a user is assisted in decision and control, the core algorithm comprises connectivity check, closed-loop check, key or shortest path calculation and the like, the user can customize a topological graph analysis algorithm, and application analysis and decision assisting capabilities are improved.
Fig. 3 shows a class sequence diagram created by the flowchart.
And calling an analysis class by the flow chart display window class to analyze the structure of the flow chart, wherein the flow chart display window class comprises node and connecting line information, all the structure information is put into a container of the display window class, the display window class performs flow chart layout according to the analyzed structure information, simultaneously calls a graph node class and a graph connecting line class to draw nodes and connecting lines of the flow chart on a canvas, initializes attribute information of each node and connecting line, and calls a connectivity check algorithm, a closed-loop check algorithm and the like to check the correctness of the flow chart after the flow chart is drawn.
An algorithm for drawing the connecting lines between the nodes is as follows:
step 1: connecting the centers of the two node class diagram elements to form a connecting line;
step 2: the intersection judgment is carried out on the connecting line and the borders of the node type primitives, the intersection point of the connecting line and the two node type primitives is calculated, wherein the intersection point of a circle and a straight line is directly obtained by a circular node, and the intersection judgment is carried out on the connecting line and four sides respectively by a rectangular node;
and step 3: the connecting line of the two intersection points is the flow line to be drawn.
The present invention provides a system for automatically generating a cross-platform complex flow chart based on QT, and a method and a way for implementing the technical scheme are many, the above description is only a preferred embodiment of the present invention, and it should be noted that, for a person of ordinary skill in the art, a plurality of improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be regarded as the protection scope of the present invention. All the components not specified in the present embodiment can be realized by the prior art.

Claims (1)

1. A system for automatically generating a cross-platform complex flow chart based on QT is characterized by comprising a flow chart basic primitive drawing module, a flow chart structural description module, a flow monitoring function supporting module and a flow monitoring application supporting module;
the flow chart basic primitive drawing module carries out inheritance and derivation from a base class QObject provided by QT and a two-dimensional graph base class QGraphicsItem, a linear graph base class QGraphicsLineItem and a layout object base class QGraphicsLayoutItem in a graph view system to form a basic primitive class of the flow chart, wherein the basic primitive class comprises a connecting line class and a node class;
the flow chart structured description module is used for describing the whole flow chart in a structured mode, including the description of flow chart total information, branch flow information, node information and connecting line information, performing format analysis on the description, and placing the information in a corresponding container;
the flow monitoring function supporting module is used for flow chart display style setting, network transmission, database access, communication and closed loop inspection, and flow switching with different granularities;
the flow monitoring application support module is used for topology sequencing, task scheduling, critical path and shortest path calculation and supporting construction network diagram application;
the system presets a matrix according to the overall outline of the flow chart, each node of the flow chart respectively falls at the corresponding position of the designated row and column in the matrix, and the flow chart control automatically calculates the central position of the node according to the preset row spacing and column spacing to align the nodes;
the connecting lines comprise direct connecting lines, parallel connecting lines and forked connecting lines;
the direct connecting line is a straight line, directly connects the two primitives, and draws a triangle arrow at the connecting point of the target primitives;
the parallel connection line type has more than two parallel connection lines between two primitives and is used for drawing indirect connection lines parallel to the direct connection lines;
the branch connecting lines are split into more than two flows from the main flow, or branch lines and gathering lines are drawn when the more than two flows are gathered into the main flow;
the node classes comprise a circular graph node class and a square graph node class, and the square graph node class comprises a rectangular graph node class and a square graph node class;
the description of the flow chart total information, the branch flow information, the node information and the connecting line information respectively comprises the following steps:
unique identification of the flow: a symbol for uniquely distinguishing the flow;
the unique identifier of the parent process: uniquely distinguishing a parent flow of the flow, namely a symbol of the previous layer flow, and realizing the switching from the flow to the parent flow through the attribute, namely the unique identifier of the parent flow;
whether the complex pattern is: distinguishing whether the flow chart is in a simple mode or a complex mode, wherein the simple mode flow chart is drawn around an activity main line, and the complex mode does not have the activity main line;
the branch flow information attributes include:
name: a branch flow name;
unique identification of corresponding unit: a unique distinguishing symbol of the unit bearing the flow or task;
whether the main process is as follows: in the simple mode flow chart, identifying whether the branch flow is a flow on an active main line;
the row number: the row number of the current branch flow;
the node information attributes include:
name: the name of the current node;
unique node identification: a symbol that uniquely distinguishes a node;
unique identification of the flow: unique identification of the flow chart to which the current node belongs;
unique identification of corresponding unit: unique distinguishing symbol of unit associated with current connecting line
The row number: the row number of the node;
the sequence numbers listed: the row number of the node;
node state: the progress of the activity or task represented by the current node;
distance from previous node: distance to the previous node on the same row;
the connection line information attributes include:
description of the contents: content represented by the connecting line;
unique identification of connecting wire: uniquely distinguishing the symbols of the connecting lines;
the type of the connecting wire: distinguishing the types of the connecting lines, wherein 0 represents a direct connecting line, 1 represents a parallel connecting line, and 2 represents a branched summary connecting line;
whether it is above: when the connecting line type is a parallel connecting line, the current parallel connecting line is above or below the direct connecting line;
distance from main process: when the type of the connecting line is a parallel connecting line, the distance between the current parallel connecting line and the parallel line of the intermediate direct connecting line is represented;
whether to summarize: when the type of the connecting line is a forked summary connecting line, whether the connecting line is a summary connecting line or not is indicated
Unique identification of corresponding unit: a unique distinguishing symbol of a unit associated with the current connecting line;
unique identifier of the starting node: the only distinguishing symbol of the starting node connected with the current connecting line;
unique identification of termination node: the only distinguishing symbol of the starting node connected with the current connecting line;
the process monitoring function supporting module is used for setting the display style of the flow chart, network transmission, database access, communication and closed-loop inspection and switching the processes with different granularities, and comprises the following steps:
based on a QT two-dimensional graph engine, the setting of the display style of the flow chart is realized, wherein the setting comprises the font color and size, the color and thickness of lines, the flow chart background, the interval size of flow chart primitives and the ground color;
based on the network transmission function provided by the cross-platform network module QtNetWork, the network transmission and the message receiving and sending are realized with the remote terminal;
the access of a database table and a view is realized based on a database access module QtSql, and the database reading and storing operation is realized;
analyzing the structure of the flow chart based on a database access interface in an XML file read-write module QtXML or a cross-platform network module QtNetWork to form the total information, a branch flow container, a node container and a connecting line container of the flow chart;
aiming at various container information, the communication inspection and the closed-loop inspection of the flow chart are realized through related algorithms;
switching of flows with different granularities is realized by returning the father flow unique identification information of the flow general information and the flow unique identification information of the designated node information to the previous layer of flow and entering a refined flow corresponding to the node;
providing a function of editing and maintaining the flow chart by a user, and storing the flow chart in a warehouse or forming an XML file;
the process monitoring application support module is used for topology sequencing, task scheduling, key and shortest path calculation, and supports the application of a construction network diagram, and comprises the following steps:
aiming at the branch flow containers, the node containers and the connecting line containers, providing topological sorting and task scheduling functions of the flows based on a directed graph topological sorting method;
aiming at application requirements, based on application parameter information given by connecting lines or nodes, a functional interface for solving a key path and a shortest path is externally provided by adopting a graph key path and graph shortest path algorithm;
based on application parameter information given by the connecting lines or the nodes, the calculation and time reminding functions based on the earliest starting time, the latest starting time, the total maneuvering time and the free maneuvering time of the AOE network or the AOV network are provided;
the system has the functions of structure analysis, process display and process monitoring, and comprises the following steps:
analyzing the primitive information stored in a class analysis database or an XML configuration file through a flow chart, wherein the primitive information comprises node information, information of a front-back relationship between nodes and other application information of the nodes;
the flow chart display window class draws all the primitives according to the flow chart structure analysis information, and lays out all the primitives through a layout device to construct a complete flow chart;
the monitoring program receives the state information sent by the corresponding unit of the primitive through the port monitoring class, updates the primitive and the state of the network graph in real time, automatically calls a flow graph core algorithm, analyzes the current working state, prompts a user, and calls a specific function according to the requirement of the user.
CN201611061266.2A 2016-11-28 2016-11-28 QT-based system for automatically generating cross-platform complex flow chart Active CN106557457B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611061266.2A CN106557457B (en) 2016-11-28 2016-11-28 QT-based system for automatically generating cross-platform complex flow chart

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611061266.2A CN106557457B (en) 2016-11-28 2016-11-28 QT-based system for automatically generating cross-platform complex flow chart

Publications (2)

Publication Number Publication Date
CN106557457A CN106557457A (en) 2017-04-05
CN106557457B true CN106557457B (en) 2020-01-17

Family

ID=58445074

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611061266.2A Active CN106557457B (en) 2016-11-28 2016-11-28 QT-based system for automatically generating cross-platform complex flow chart

Country Status (1)

Country Link
CN (1) CN106557457B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112181511A (en) * 2020-08-26 2021-01-05 北京大学 Executable information analysis flow interaction configuration generation method

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107329842B (en) * 2017-06-29 2020-11-10 福建新和兴信息技术有限公司 Method and terminal for acquiring data based on Qt signal slot mechanism
CN109582299B (en) * 2018-11-27 2021-12-10 西北工业大学 Automatic layout method of serial-parallel nested subtask flowchart
CN111026393A (en) * 2019-11-19 2020-04-17 中冶南方(武汉)自动化有限公司 QT-based SCADA system HMI development method
CN111695880B (en) * 2020-06-17 2024-01-12 苏州知云创宇信息科技有限公司 Production flow monitoring method and system
CN111814438A (en) * 2020-07-08 2020-10-23 中国人民解放军战略支援部队航天工程大学 System and method for drawing network diagram
CN112288228A (en) * 2020-09-27 2021-01-29 北京航空航天大学 Rule-based multi-stage parallel research and development design flow visualization modeling method
CN113569184A (en) * 2021-07-16 2021-10-29 众安在线财产保险股份有限公司 Configurable data calculation method, device, equipment and computer readable medium
CN114723851B (en) * 2022-06-07 2022-09-20 山东捷瑞数字科技股份有限公司 PERT graph drawing method and device based on three-dimensional engine

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102196000A (en) * 2010-03-11 2011-09-21 新奥特(北京)视频技术有限公司 Browser/server (B/S)-structure-based service flow visualization method and system
CN105786526A (en) * 2016-03-24 2016-07-20 江苏大学 Web-based efficient flow chart drawing system and method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6871162B2 (en) * 2002-10-02 2005-03-22 The Goodyear Tire & Rubber Company Non-iterative method for a fully-coupled thermomechanical analysis of a tire and estimating effects of compound changes on tire temperature distribution using the deformation index
US7593764B2 (en) * 2006-10-03 2009-09-22 General Electric Company System and method of serial comparison for detection of long QT syndrome (LQTS)

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102196000A (en) * 2010-03-11 2011-09-21 新奥特(北京)视频技术有限公司 Browser/server (B/S)-structure-based service flow visualization method and system
CN105786526A (en) * 2016-03-24 2016-07-20 江苏大学 Web-based efficient flow chart drawing system and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
流程图的自动生成系统;才忠胜 等;《计算机系统应用》;20131231;第22卷(第12期);第43-46,65页 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112181511A (en) * 2020-08-26 2021-01-05 北京大学 Executable information analysis flow interaction configuration generation method
CN112181511B (en) * 2020-08-26 2021-09-14 北京大学 Executable information analysis flow interaction configuration generation method

Also Published As

Publication number Publication date
CN106557457A (en) 2017-04-05

Similar Documents

Publication Publication Date Title
CN106557457B (en) QT-based system for automatically generating cross-platform complex flow chart
CN106775632B (en) High-performance geographic information processing method and system with flexibly-expandable business process
CN110610240B (en) Virtual automation assistance based on artificial intelligence
CN104778241B (en) A kind of report form generation method and system
CN109446281B (en) ArcGIS-based online intelligent mapping system construction method, system and mapping method
US9411482B2 (en) Visualizing user interfaces
CN109597954A (en) Data item methods of exhibiting, calculates equipment and medium at device
CN109840205A (en) Applied program testing method, device, readable storage medium storing program for executing and terminal device
US9304746B2 (en) Creating a user model using component based approach
CN111881224A (en) Multidimensional data analysis method and system
CN113157947A (en) Knowledge graph construction method, tool, device and server
CN110708214B (en) Service data display method, device, equipment and computer readable storage medium
CN106951254B (en) Method and device for multiplexing similar service function modules in payment system
CN111858608A (en) Data management method, device, server and storage medium
CN113377486A (en) Data visualization display method, device, equipment and storage medium
CN108427709B (en) Multi-source mass data processing system and method
CN113947468B (en) Data management method and platform
CN109426597B (en) Application performance monitoring method, device, equipment, system and storage medium
US10627984B2 (en) Systems, devices, and methods for dynamic virtual data analysis
CN106779404B (en) Flow early warning method and device
CN114385437A (en) Data quality analysis system and method
CN104133680A (en) Fast building method of ERP form module
US10198150B2 (en) Cross database data selection and correlation interface
CN112764637B (en) Intelligent agriculture Internet of things equipment description file generation method
CN114048110A (en) Method for realizing customized visual topological graph based on Antv

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