CN111508562A - Visual display method, device, equipment and medium of flow descriptive language - Google Patents

Visual display method, device, equipment and medium of flow descriptive language Download PDF

Info

Publication number
CN111508562A
CN111508562A CN202010188129.5A CN202010188129A CN111508562A CN 111508562 A CN111508562 A CN 111508562A CN 202010188129 A CN202010188129 A CN 202010188129A CN 111508562 A CN111508562 A CN 111508562A
Authority
CN
China
Prior art keywords
node
node object
objects
determining
file
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.)
Pending
Application number
CN202010188129.5A
Other languages
Chinese (zh)
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.)
United Electronics Co ltd
Original Assignee
United Electronics 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 United Electronics Co ltd filed Critical United Electronics Co ltd
Priority to CN202010188129.5A priority Critical patent/CN111508562A/en
Publication of CN111508562A publication Critical patent/CN111508562A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16BBIOINFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR GENETIC OR PROTEIN-RELATED DATA PROCESSING IN COMPUTATIONAL MOLECULAR BIOLOGY
    • G16B45/00ICT specially adapted for bioinformatics-related data visualisation, e.g. displaying of maps or networks
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16BBIOINFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR GENETIC OR PROTEIN-RELATED DATA PROCESSING IN COMPUTATIONAL MOLECULAR BIOLOGY
    • G16B50/00ICT programming tools or database systems specially adapted for bioinformatics
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16BBIOINFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR GENETIC OR PROTEIN-RELATED DATA PROCESSING IN COMPUTATIONAL MOLECULAR BIOLOGY
    • G16B50/00ICT programming tools or database systems specially adapted for bioinformatics
    • G16B50/20Heterogeneous data integration

Landscapes

  • Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Biophysics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Biotechnology (AREA)
  • Evolutionary Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Bioethics (AREA)
  • Data Mining & Analysis (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

One or more embodiments of the present specification provide a method, an apparatus, a device, and a medium for visualizing a process descriptive language, where the method includes: acquiring a process file arranged by a process descriptive language, and analyzing the process file by a preset rule to obtain corresponding relational data after the process file is converted; analyzing the relational data to obtain node objects of the process file and attributes of the node objects; determining a hierarchical relationship according to the attribute of each node object, determining a path relationship of the node object according to the hierarchical relationship, and sending the node object and the path relationship to an image rendering unit to generate a flow visualization graph of each node object. The method can quickly convert the flow file into the flow visualization chart, effectively reduces the threshold of the biological information technical analyst based on the flow operation task, and quickly positions and solves the problem.

Description

Visual display method, device, equipment and medium of flow descriptive language
Technical Field
One or more embodiments of the present disclosure relate to the technical field, and in particular, to a method, an apparatus, a device, and a medium for visually displaying a flow description language.
Background
With the rapid development of gene detection bioinformatics technology, the market scale of gene detection is further expanded, the predictable annual average composite growth rate of the related market in the next five years is more than 30%, and a gene detection algorithm is an important component of the gene detection bioinformatics technology.
The bioinformatics technology analysis flow is the basis of gene detection algorithm analysis, and is complex and diversified, so that the way of arranging and analyzing the flow tends to be complex, as a mainstream flow arranging language WD L (flow descriptive language), the internal structure of the bioinformatics technology analysis flow arranged by using WD L and the path between each node of the flow are a black box for a user, and particularly, when the flow arranged by using the method runs a task, the user cannot know the node where the flow starts and the node where the flow ends, and after the task fails, the problem of fast positioning of the disassociation context cannot be intuitively solved.
No method or apparatus is currently available that addresses the above-mentioned problems.
Disclosure of Invention
In view of the above, one or more embodiments of the present disclosure are directed to a method, an apparatus, a device, and a medium for visually displaying a flow descriptive language, so as to solve the problem that the current bioinformatics analysis flow cannot be visually and transparently displayed.
In view of the above, in a first aspect, one or more embodiments of the present specification provide a method for visualizing a flow descriptive language, the method including:
acquiring a process file arranged by a process descriptive language, and analyzing the process file by a preset rule to obtain corresponding relational data after the process file is converted;
analyzing the relational data to obtain node objects of the process file and attributes of the node objects, wherein the attributes of the node objects at least comprise node identifiers and node IDs of the node objects;
determining a hierarchical relationship according to the attribute of each node object, determining a path relationship of the node object according to the hierarchical relationship, and sending the node object and the path relationship to an image rendering unit to generate a flow visualization graph of each node object.
In the above method, the parsing the process file according to the preset rule includes:
respectively extracting corresponding workflow names, variable values, method blocks and execution functions in the relational data at least according to the workflow, the variable, the function and the work task of the flow file;
and organizing the workflow, the variable, the function, the working method, the extracted workflow name, the extracted variable value, the extracted method block and the extracted execution function in a preset format to obtain corresponding relational data after the flow file is converted.
In the above method, determining a hierarchical relationship according to the attribute of each node object, and determining a path relationship of the node object according to the hierarchical relationship includes:
traversing the set of node objects according to the node identifiers of the node objects, and determining a father node object and a child node object of each node object;
determining a head node object and a tail node object in the node objects;
and determining paths among all the node objects according to the parent-child relationship by combining the first node object, the tail node object and the parent-child relationship of other node objects.
The method for determining a head node object and a tail node object in the node objects includes:
traversing the set of node objects, searching node objects without father node objects, and determining a first node object according to the attribute of the node object; and searching the node object without the child node object, and determining the tail node object according to the attribute of the node object.
In the above method, determining a hierarchical relationship according to the attribute of each node object, and determining a path relationship of the node object according to the hierarchical relationship includes:
the attribute of the node object also comprises connection information;
determining a head node object and a tail node object according to the attribute of the node object;
acquiring connection information of other node objects except the first node object and the tail node object, and determining node objects of two end points of connection information according to tail end identifiers of the connection information so as to determine hierarchy information;
determining paths between the node objects according to the hierarchy information.
In the above method, the sending the node objects and the path relationship to an image rendering unit to generate a flow visualization graph of each node object includes:
and sending the node objects and the path relation to a dagre-d3 rendering engine to draw a flow process visualization graph, wherein the dagre-d3 rendering engine is a plug-in of a Web page.
In a second aspect, one or more embodiments of the present specification provide an apparatus for visualizing a procedure descriptive language, the apparatus comprising:
the first analysis module is used for acquiring a process file arranged by a process descriptive language and analyzing the process file by a preset rule to obtain corresponding relational data after the process file is converted;
the second analysis module is used for analyzing the relational data obtained by the first analysis module to obtain a node object of the process file and the attribute of the node object, wherein the attribute of the node object at least comprises a node identifier and a node ID of the node object;
and the image rendering module is used for determining a hierarchical relationship according to the attributes of the node objects obtained by the second analysis module, determining a path relationship of the node objects according to the hierarchical relationship, and sending the node objects and the path relationship to an image rendering unit to generate a flow visualization graph of the node objects.
In the foregoing apparatus, the first parsing module includes a server parsing module, and the server parsing module is configured to:
respectively extracting corresponding workflow names, variable values, method blocks and execution functions in the relational data at least according to the workflow, the variable, the function and the work task of the flow file;
and organizing the workflow, the variable, the function, the working method, the extracted workflow name, the extracted variable value, the extracted method block and the extracted execution function in a preset format to obtain corresponding relational data after the flow file is converted.
In a third aspect, one or more embodiments of the present specification provide an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the visualization method of the flow description language when executing the program.
In a fourth aspect, one or more embodiments of the present specification provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform a method of visualization in the flow description language described above.
As can be seen from the above description, the visualization method of the process descriptive language provided in one or more embodiments of the present specification can quickly convert the process arranged based on the WD L language into a Web visualization presentation form, so that the internal structure of the arranged process is more intuitive, the threshold of the bioinformatics technical analyst for operating tasks based on the process is effectively reduced, and the problem is quickly located and solved.
Drawings
In order to more clearly illustrate one or more embodiments or prior art solutions of the present specification, the drawings that are needed in the description of the embodiments or prior art will be briefly described below, and it is obvious that the drawings in the following description are only one or more embodiments of the present specification, and that other drawings may be obtained by those skilled in the art without inventive effort from these drawings.
FIG. 1 is a flow diagram of a visualization display method in a flow description language according to one or more embodiments of the present disclosure;
FIG. 2 is a flow visualization diagram of one or more embodiments of the present specification;
FIG. 3 is a schematic view of a visual display device in a flow description language according to one or more embodiments of the present disclosure;
FIG. 4 is a diagram illustrating a particular embodiment of a visual display in a descriptive language for flow of one or more embodiments of the present disclosure;
FIG. 5 is a flowchart of a particular embodiment of a method for visually displaying in a flowchart descriptive language according to one or more embodiments of the present disclosure;
fig. 6 is a schematic diagram of an apparatus according to one or more embodiments of the present disclosure.
Detailed Description
For the purpose of promoting a better understanding of the objects, aspects and advantages of the present disclosure, reference is made to the following detailed description taken in conjunction with the accompanying drawings.
It is to be noted that unless otherwise defined, technical or scientific terms used in one or more embodiments of the present specification should have the ordinary meaning as understood by those of ordinary skill in the art to which this disclosure belongs. The use of "first," "second," and similar terms in one or more embodiments of the specification is not intended to indicate any order, quantity, or importance, but rather is used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", and the like are used merely to indicate relative positional relationships, and when the absolute position of the object being described is changed, the relative positional relationships may also be changed accordingly.
The invention relates to a visual display method, a device, equipment and a medium of a flow descriptive language, which are mainly applied to a scene needing to visualize a file generated by arranging a natural flow language, and the basic idea is as follows: the method comprises the steps of analyzing a flow file and converting the format of the flow file, analyzing converted format data to obtain node objects contained in key parameters in the flow file, determining a path relation between the node objects according to hierarchical information between the node objects, and drawing a flow visualization graph in an image rendering plug-in of a webpage by combining the path relation, so that the defect that the flow file cannot be transparently and visually displayed in the prior art is overcome, the threshold of a biological information technology analyst for running tasks based on the flow is effectively reduced, and the problem is quickly positioned and solved.
The present embodiment is applicable to a case where an intelligent terminal with a parsing conversion module is used for visually displaying a process description language, the method may be executed by a parsing conversion apparatus, where the apparatus may be implemented by software and/or hardware, and may be generally integrated in an intelligent terminal, or may be controlled by a central control module in the terminal, as shown in fig. 1, which is a basic flow diagram of the visual display method of a process description language according to the present invention, and the method specifically includes the following steps:
in step 110, acquiring a process file arranged in a process descriptive language, and analyzing the process file according to a preset rule to obtain corresponding relationship type data after the process file is converted;
in the embodiment of the present invention, the flow descriptive language is a WD L (flow descriptive language), the layout includes writing and typesetting, specifically, the writing and typesetting of codes, and a flow file formed by the writing and typesetting in a WD L language is a WD L file.
The WD L file is a file with the suffix of. wdl, which generally includes at least task and workflow, and definitions of the syntax, variables and functions of WD L, specifically, a WD L file such as pipeline wdl in the embodiment of the present invention includes the following:
Figure BDA0002414889910000051
Figure BDA0002414889910000061
Figure BDA0002414889910000071
Figure BDA0002414889910000081
analyzing the process file such as pipeline wdl file according to a preset rule to obtain corresponding relationship type data after the process file is converted, where the preset rule may be a rule for converting the WD L file into a conventional data format, and in an embodiment of the present invention, the conversion rule may be:
respectively extracting corresponding workflow names, variable values, method blocks and execution functions in the relational data at least according to the workflow, the variable, the function and the work task of the flow file;
and organizing the workflow, the variable, the function, the working method, the extracted workflow name, the extracted variable value, the extracted method block and the extracted execution function in a preset format to obtain corresponding relational data after the flow file is converted.
The workflow, the variable, the function and the work task of the flow file are parameters of the flow file, the workflow name, the variable value, the method block, the execution function and the like corresponding to each parameter can be operation variables, the parameters and the operation variables of different flow files are different, and the parameters and the operation variables of the flow files can be stored in different data tables of a corresponding database, so that the subsequent operation separation between the front end and the background is facilitated.
Specifically, for the pipeline.wdl file, the WD L grammar of the pipeline.wdl file is obtained by reading the pipeline.wdl file, the WD L grammar is used as a premise, workflow is used as a basis, a subsequent value (pipeline) is extracted as a workflow name, the types of a file variable, a String variable and the like are used as a basis, a corresponding variable value fq1, a region _ type and the like are respectively extracted, different method blocks newcfg, otu and output definitions are respectively extracted according to call of a call function and a standard output function, different method blocks beta _ diversity, beta _ sup, newcfg and the like are respectively extracted according to a task (working method) method, and finally the organization of the method blocks is converted into relationship type data of types such as json format and the like.
The json format data (json character string) obtained by converting the pipeline wdl file by using the preset rule is as follows:
{"nodes":{"MY16S241.alpha_diversity":{"ItemInfo":{"Name":"MY16S241.alpha_diversity"},"ItemId":"","NodeId":"MY16S241.alpha_diversity","ItemLevel":0},"MY16S241.beta_diversity":{"ItemInfo":{"Name":"MY16S241.beta_diversity"},"ItemId":"","NodeId":"MY16S241.beta_diversity","ItemLevel":0},"MY16S241.beta_sup":{"ItemInfo":{"Name":"MY16S241.beta_sup"},"ItemId":"","NodeId":"MY16S241.beta_sup","ItemLevel":0},"MY16S241.data_filter":{"ItemInfo":{"Name":"MY16S241.data_filter"},"ItemId":"","NodeId":"MY16S241.data_filter","ItemLevel":0},"MY16S241.newcfg":{"ItemInfo":{"Name":"MY16S241.newcfg"},"ItemId":"","NodeId":"MY16S241.newcfg","ItemLevel":0},"MY16S241.otu":{"ItemInfo":{"Name":"MY16S241.otu"},"ItemId":"","NodeId":"MY16S241.otu","ItemLevel":0},"MY16S241.otu_sup":{"ItemInfo":{"Name":"MY16S241.otu_sup"},"ItemId":"","NodeId":"MY16S241.otu_sup","ItemLevel":0},"MY16S241.qc_clean":{"ItemInfo":{"Name":"MY16S241.qc_clean"},"ItemId":"","NodeId":"MY16S241.qc_clean","ItemLevel":0},"MY16S241.qc_merge":{"ItemInfo":{"Name":"MY16S241.qc_merge"},"ItemId":"","NodeId":"MY16S241.qc_merge","ItemLevel":0},"MY16S241.result":{"ItemInfo":{"Name":"MY16S241.result"},"ItemId":"","NodeId":"MY16S241.result","ItemLevel":0}},"paths":[{"end":"MY16S241.data_filter","start":"MY16S241.newcfg"},{"end":"MY16S241.qc_clean","start":"MY16S241.data_filter"},{"end":"MY16S241.qc_clean","start":"MY16S241.newcfg"},{"end":"MY16S241.qc_merge","start":"MY16S241.qc_clean"},{"end":"MY16S241.qc_merge","start":"MY16S241.data_filter"},{"end":"MY16S241.otu","start":"MY16S241.qc_merge"},{"end":"MY16S241.otu","start":"MY16S241.newcfg"},{"end":"MY16S241.otu_sup","start":"MY16S241.otu"},{"end":"MY16S241.alpha_diversity","start":"MY16S241.otu"},{"end":"MY16S241.alpha_diversity","start":"MY16S241.newcfg"},{"end":"MY16S241.beta_sup","start":"MY16S241.newcfg"},{"end":"MY16S241.beta_sup","start":"MY16S241.alpha_diversity"},{"end":"MY16S241.beta_diversity","start":"MY16S241.newcfg"},{"end":"MY16S241.beta_diversity","start":"MY16S241.otu"},{"end":"MY16S241.beta_diversity","start":"MY16S241.alpha_diversity"},{"end":"MY16S241.beta_diversity","start":"MY16S241.beta_sup"},{"end":"MY16S241.result","start":"MY16S241.qc_merge"},{"end":"MY16S241.result","start":"MY16S241.data_filter"},{"end":"MY16S241.result","start":"MY16S241.otu_sup"},{"end":"MY16S241.result","start":"MY16S241.alpha_diversity"},{"end":"MY16S241.result","start":"MY16S241.beta_diversity"}],"pipeline_id":28}
in step 120, analyzing the relational data to obtain a node object and an attribute of the node object of the process file, where the attribute of the node object at least includes a node identifier and a node ID of the node object;
in the embodiment of the present invention, the relationship data, that is, the json-format data is analyzed, the json-format data may be first converted into an object required by a visual language, where the required object is a data storage structure in JavaScript (js), and the analysis method in the present invention is not limited to js, and in a feasible implementation scenario in the embodiment of the present invention, the method for analyzing the json-format data may also be java.
The data storage structure that converts json formatted data to js may be stored in a relational database, such as a mysql or sql database.
The json data is called from a database, and node objects are obtained through analysis, wherein the node objects are data of a type of 'node(s)' in the json data, the node objects correspond to task method block structure information in a WD L (pipeline.wdl) file, namely, each node object corresponds to a task method in a WD L file, and similarly, each node object also corresponds to a group of js statements which realize a specific function in the json character string.
The node identifier is a node name of the node object, and as shown in fig. 2, it may be, for example, data _ filter, newcfg, qc _ clean, otu, or the like.
The node ID is the identity of the node object and corresponds to the 'nodeID' in the json character string, so that the node object can be distinguished conveniently.
In step 130, a hierarchical relationship is determined according to the attribute of each node object, a path relationship of the node object is determined according to the hierarchical relationship, and the node object and the path relationship are sent to an image rendering unit to generate a flow visualization graph of each node object.
As shown in fig. 2, the node objects determined in the json string include: data _ filter, newcfg, qc _ clean, otu, alpha _ diversity, beta _ sup, out _ sup, beta _ diversity, result, and qc _ merge.
Determining a hierarchical relationship according to the attribute of each node object can be performed by the following method:
traversing the set of node objects according to the node identifiers of the node objects, and determining a father node object and a child node object of each node object;
referring to fig. 2, taking the node object qc _ merge as an example, the parent node object and the child node object both include two objects, the parent node object includes data _ filter and qc _ clean, and the child node object includes otu and result.
Taking node object alpha _ diversity as an example, its parent node object includes newcfg and otu, and its child node objects include beta _ diversity, beta _ sup and result.
Determining a head node object and a tail node object in the node objects; this process includes:
and when judging that the parent node object does not exist in a certain node object, determining the node object as a head node object, and when judging that the child node object does not exist in the certain node object, determining the node object as a tail node object.
And determining paths among all the node objects according to the parent-child relationship by combining the first node object, the tail node object and the parent-child relationship of other node objects.
After determining the head node object and the tail node object, first determining a node object of a second level, for example, as shown in fig. 2, if child node objects of the head node object newcfg include data _ filter, qc _ clear, beta _ diversity, otu, and beta _ sup, then data _ filter, qc _ clear, beta _ diversity, otu, and beta _ sup are all temporarily defined as the second level, detecting whether each node object of the second level has other parent node objects besides the head node object newcfg, and if so, drawing a path from the corresponding parent node object to the node object of the second level; and repeating the steps until the last level result.
In another feasible implementation manner of the embodiment of the present invention, the determining a hierarchical relationship according to the attribute of each node object and the determining a path relationship of the node object according to the hierarchical relationship may also be performed in the following manner:
analyzing each node object through a JavaScript language to obtain relevant attributes of the node object, including a node ID, a child node ID, L abel (a node identifier, namely the name of the node object) and edges (an edge associated with the current node, a connecting line).
After acquiring a plurality of attributes of each node object, determining a head node object and a tail node object according to the attributes of the node objects, wherein the process comprises the following steps:
analyzing the attribute child node ID of the node object, wherein when the child node ID does not exist in a certain node object, the node object is a tail node object, and when the father node ID does not exist in the certain node object, the node object is a head node object.
Acquiring connection information of other node objects except the first node object and the tail node object, and determining node objects of two end points of connection information according to tail end identifiers of the connection information so as to determine hierarchy information;
in the embodiment of the present invention, the connection object information between each node object and the context internal association relationship between each node object may be directly obtained from the json data structure corresponding to the mysql or sql database WD L file.
Obtaining connection information from a first Node object from top to bottom, generating a connection array through the connection information, obtaining a Node ID at the tail end of each connection by adopting a For cycle mode after obtaining the connection array, performing hash search in a Node Map in a Node object set according to the obtained Node ID to obtain a connecting end, completing connection analysis through recursive call to obtain level information among all Node objects, and further determining a path among the Node objects according to the level information.
And connecting the line of each node object from top to bottom according to the hierarchy of the node objects according to the path, and sending the node objects and the path relation to an image rendering unit to generate a flow visualization graph of each node object.
The method provided by the embodiment of the invention analyzes the opaque flow files generated by arranging the flow languages to realize format conversion, so that the flow files are converted into the computer languages easy to process, analyzes the converted common format data to obtain the node objects contained in the key parameters in the flow files, determines the path relation between the node objects from the hierarchical information between the node objects, and draws the flow visualization graph in the image rendering plug-in of the webpage by combining the path relation, thereby solving the defects that the flow files cannot be transparent and cannot be visually displayed, effectively reducing the threshold of a biological information technology analyst based on the flow operation task, and quickly positioning and solving the problems.
In a feasible implementation manner of the embodiment of the present invention, the sending the node objects and the path relationship to an image rendering unit to generate a flow visualization graph of each node object includes:
and sending the node objects and the path relation to a dagre-d3 rendering engine to draw a flow process visualization graph, wherein the dagre-d3 rendering engine is a plug-in of a Web page.
In order to realize automatic layout and drawing of an open source JavaScript library of the flow chart, the dagre-d3 sends the node objects and the path relation to the dagre-d3, so that the effect of generating and automatically rendering the flow chart on the node objects can be realized, and after one node object is clicked, the associated parent node object and/or child node object can be set to be highlighted or flash on a display interface.
Fig. 3 is a schematic structural diagram of a visualization apparatus of a flow description language according to an embodiment of the present invention, where the apparatus may be implemented by software and/or hardware, and is generally integrated in an intelligent terminal, and may be implemented by a visualization method of the flow description language. As shown in the figure, the present embodiment may provide a visualization apparatus of a flow descriptive language based on the above embodiments, which mainly includes a first parsing module 310, a second parsing module 320, and an image rendering module 330.
The first parsing module 310 is configured to acquire a flow file arranged in a flow descriptive language, and parse the flow file according to a preset rule to obtain corresponding relationship data after the flow file is converted;
the second parsing module 320 is configured to analyze the relational data obtained by the first parsing module to obtain a node object of the process file and an attribute of the node object, where the attribute of the node object at least includes a node identifier and a node ID of the node object;
the image rendering module 330 is configured to determine a hierarchical relationship according to the attribute of each node object obtained by the second parsing module, determine a path relationship of the node object according to the hierarchical relationship, and send the node object and the path relationship to an image rendering unit to generate a flow visualization graph of each node object.
In a feasible implementation manner of the embodiment of the present invention, the first parsing module includes a server parsing module, and the server parsing module is configured to:
respectively extracting corresponding workflow names, variable values, method blocks and execution functions in the relational data at least according to the workflow, the variable, the function and the work task of the flow file;
and organizing the workflow, the variable, the function, the working method, the extracted workflow name, the extracted variable value, the extracted method block and the extracted execution function in a preset format to obtain corresponding relational data after the flow file is converted.
In a feasible implementation manner of the embodiment of the present invention, the image rendering module 330 is further configured to:
traversing the set of node objects according to the node identifiers of the node objects, and determining a father node object and a child node object of each node object;
determining a head node object and a tail node object in the node objects;
and determining paths among all the node objects according to the parent-child relationship by combining the first node object, the tail node object and the parent-child relationship of other node objects.
In a feasible implementation manner of the embodiment of the present invention, the determining a head node object and a tail node object in the node objects includes:
traversing the set of node objects, searching node objects without father node objects, and determining a first node object according to the attribute of the node object; and searching the node object without the child node object, and determining the tail node object according to the attribute of the node object.
In a feasible implementation manner of the embodiment of the present invention, the image rendering module 330 is further configured to:
the attribute of the node object also comprises connection information;
determining a head node object and a tail node object according to the attribute of the node object;
acquiring connection information of other node objects except the first node object and the tail node object, and determining node objects of two end points of connection information according to tail end identifiers of the connection information so as to determine hierarchy information;
determining paths between the node objects according to the hierarchy information.
In a feasible implementation manner of the embodiment of the present invention, the image rendering module 330 includes:
and sending the node objects and the path relation to a dagre-d3 rendering engine to draw a flow process visualization graph, wherein the dagre-d3 rendering engine is a plug-in of a Web page.
The visualization device of the process descriptive language provided in the above embodiment may execute the visualization method of the process descriptive language provided in any embodiment of the present invention, and has a corresponding functional module and beneficial effects for executing the method.
In a feasible implementation manner of the embodiment of the present invention, as shown in fig. 4, which is a specific implementation structure diagram of the present invention, when the visualization method of the flow description language is executed, the following method may be performed:
the method comprises the steps of setting a server-side resolver, an object resolver, a node resolver, a connecting line resolver and a visual assembly generator, wherein the server-side resolver is used for resolving an acquired WD L file to generate a Json file, the object resolver is used for converting the Json file into an object required by a visual end language, the node resolver is used for resolving nodes generated in the object and extracting each node to be independently stored as an internal method, the connecting line resolver is used for resolving a connecting line generated in the object and extracting the logical relation of contexts at two ends of the connecting line, and the visual assembly generator is responsible for presenting results generated by the node resolver and the connecting line resolver on a visual interface in a visual mode.
The analysis rule for analyzing the WD L file by the server-side analyzer is that the server-side analyzer reads the pipeline wdl file, uses WD L grammar as a premise, uses keyword workflow as a basis, extracts a subsequent value (pipeline) as a workflow name, uses variable types of keyword file, String and the like as a basis, respectively extracts a subsequent corresponding variable value fq1, region _ type and the like, respectively extracts different method blocks newcfg, otu and output definitions according to a keyword call function and a keyword output standard output function call, respectively extracts different execution functions such as a _ diversity, a _ beta _ sup and a newcfg according to a keyword task in WD L language, and stores all extracted data in a database (mysql) in a json format.
Wherein, call, output and task are all keywords (reserved words) in WD L grammar;
task: the function execution block represents a specific execution process of the function task;
call: calling a function keyword, namely calling Task in the script;
outPut: the function returns a value key.
Analysis rules of the object parser: and receiving JSON format data after format conversion of the server side through an asynchronous request, checking the validity of the data by using a Json.
The analysis rule of the node analyzer is as follows: after the object analysis is completed, extracting corresponding node object information, extracting a first node and a last node as a head (first node object) and a foot (tail node object), assembling the rest nodes into a Map by using a Foreach cycle to form a node set, forming a Key Value pair by using a node ID as a Key and a node object as a Value, and storing the node objects (the node ID and the node objects in the attributes thereof) into a relational database in a Key Value pair mode.
The analysis rule of the connection line analyzer is as follows: and acquiring connection information from the head node from top to bottom, acquiring the connection array, then acquiring the ID of each connection tail end by adopting a For cycle mode, then performing hash search in the NodeMap according to the acquired node ID to obtain a connecting end, and completing connection analysis through recursive calling.
The server-side resolver, the object resolver, the node resolver, the connecting line resolver and the visual assembly generator are interacted and communicated through an Application Programming Interface (API) with a uniform specification, and data can be encrypted by using a T L S protocol in the communication process so as to transmit data or files reliably and safely.
In a more specific implementation manner of the embodiment of the present invention, as shown in fig. 5, a schematic flow chart of a visualization processing performed on a WD L file according to the embodiment of the present invention is shown, where the flow chart may include the following steps:
uploading the arranged flow files to the system through a visual interface by a user;
the server-side parser parses a script file uploaded to a system by a user, and finally a Json file is generated; the server-side parser can select to parse by using Java language or Go language (both Java language and Go language are open source programming languages);
the object analyzer analyzes the Json file to analyze the node and context relation contained in the Json structure, respectively converts the node and context relation into an object, and stores the related information into a database.
The node analyzer acquires node object information from the object library, analyzes the node object information and stores node related attributes;
the connection resolver acquires connection object information between each node and context internal association relation thereof from an object database; in this step, the link analyzer analyzes the link relationship between the node objects, and can extract the attribute values of the two ends of the link, where the attribute values refer to the node objects of the link and the connected end, that is, the link analyzer analyzes the node object of the connected end, and the corresponding attribute values include the node identifiers of the node objects connected to the two ends of the link;
the visual assembly generator finally generates Web visual data by summarizing and analyzing results generated by the node analyzer and the connecting line analyzer, and the Web visual data is presented through a Web interface; the visual assembly generator performs visual assembly and rendering on the attribute values generated in the object parser and the connection line parser according to the rules of the visual assembly generator; the attribute value generated by the object resolver is a key-value (key value) in JavaScript; after the node and link data are parsed by the corresponding parser, the Head node object is taken first, and a dagre-d3 rendering engine is called to draw a view, and the process includes: and drawing the nodes by using the g.setnode function in the dagre-d3 library, traversing child nodes by taking a connecting line object corresponding to the nodes after the nodes are drawn, and calling the setEdge () function in the dagre-d3 library to transfer the child node object to recursively call to finish drawing.
According to the embodiment of the invention, the Web is presented in a visual manner, so that a user can clearly see the starting node and the ending node of the process and the correlation among the nodes; when a certain node is selected, the associated node is highlighted, and the upper-level and lower-level front-back logical relationship of each node object is clearly shown.
It will be appreciated that the above-described method may be performed by any apparatus, device, platform, cluster of devices having computing, processing capabilities.
It should be noted that the method of one or more embodiments of the present disclosure may be performed by a single device, such as a computer or server. The method of the embodiment can also be applied to a distributed scene and completed by the mutual cooperation of a plurality of devices. In such a distributed scenario, one of the devices may perform only one or more steps of the method of one or more embodiments of the present disclosure, and the devices may interact with each other to complete the method.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. Of course, the functionality of the modules may be implemented in the same one or more software and/or hardware implementations in implementing one or more embodiments of the present description.
The apparatus of the foregoing embodiment is used to implement the corresponding method in the foregoing embodiment, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
Fig. 6 is a schematic diagram illustrating a more specific hardware structure of an electronic device according to this embodiment, where the electronic device may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein the processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 are communicatively coupled to each other within the device via bus 1050.
The processor 1010 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random access Memory), a static storage device, a dynamic storage device, or the like. The memory 1020 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 1020 and called to be executed by the processor 1010.
The input/output interface 1030 is used for connecting an input/output module to input and output information. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 1040 is used for connecting a communication module (not shown in the drawings) to implement communication interaction between the present apparatus and other apparatuses. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
Bus 1050 includes a path that transfers information between various components of the device, such as processor 1010, memory 1020, input/output interface 1030, and communication interface 1040.
It should be noted that although the above-mentioned device only shows the processor 1010, the memory 1020, the input/output interface 1030, the communication interface 1040 and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
Computer-readable media of the present embodiments, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, is limited to these examples; within the spirit of the present disclosure, features from the above embodiments or from different embodiments may also be combined, steps may be implemented in any order, and there are many other variations of different aspects of one or more embodiments of the present description as described above, which are not provided in detail for the sake of brevity.
In addition, well-known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown in the provided figures, for simplicity of illustration and discussion, and so as not to obscure one or more embodiments of the disclosure. Furthermore, devices may be shown in block diagram form in order to avoid obscuring the understanding of one or more embodiments of the present description, and this also takes into account the fact that specifics with respect to implementation of such block diagram devices are highly dependent upon the platform within which the one or more embodiments of the present description are to be implemented (i.e., specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the disclosure, it should be apparent to one skilled in the art that one or more embodiments of the disclosure can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative instead of restrictive.
While the present disclosure has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic ram (dram)) may use the discussed embodiments.
It is intended that the one or more embodiments of the present specification embrace all such alternatives, modifications and variations as fall within the broad scope of the appended claims. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of one or more embodiments of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (10)

1. A method for visualization in a process description language, the method comprising:
acquiring a process file arranged by a process descriptive language, and analyzing the process file by a preset rule to obtain corresponding relational data after the process file is converted;
analyzing the relational data to obtain node objects of the process file and attributes of the node objects, wherein the attributes of the node objects at least comprise node identifiers and node IDs of the node objects;
determining a hierarchical relationship according to the attribute of each node object, determining a path relationship of the node object according to the hierarchical relationship, and sending the node object and the path relationship to an image rendering unit to generate a flow visualization graph of each node object.
2. The method according to claim 1, wherein the parsing the flow file according to the preset rule includes:
respectively extracting corresponding workflow names, variable values, method blocks and execution functions in the relational data at least according to the workflow, the variable, the function and the work task of the flow file;
and organizing the workflow, the variable, the function, the working method, the extracted workflow name, the extracted variable value, the extracted method block and the extracted execution function in a preset format to obtain corresponding relational data after the flow file is converted.
3. The method of claim 1, wherein determining a hierarchical relationship based on the attributes of each node object and determining a path relationship for the node object based on the hierarchical relationship comprises:
traversing the set of node objects according to the node identifiers of the node objects, and determining a father node object and a child node object of each node object;
determining a head node object and a tail node object in the node objects;
and determining paths among all the node objects according to the parent-child relationship by combining the first node object, the tail node object and the parent-child relationship of other node objects.
4. The method of claim 3, wherein determining a head node object and a tail node object of the node objects comprises:
traversing the set of node objects, searching node objects without father node objects, and determining a first node object according to the attribute of the node object; and searching the node object without the child node object, and determining the tail node object according to the attribute of the node object.
5. The method of claim 1, wherein determining a hierarchical relationship based on the attributes of each node object and determining a path relationship for the node object based on the hierarchical relationship comprises:
the attribute of the node object also comprises connection information;
determining a head node object and a tail node object according to the attribute of the node object;
acquiring connection information of other node objects except the first node object and the tail node object, and determining node objects of two end points of connection information according to tail end identifiers of the connection information so as to determine hierarchy information;
determining paths between the node objects according to the hierarchy information.
6. The method of claim 1, wherein sending the node objects and the path relationships to an image rendering unit to generate a flow visualization of each node object comprises:
and sending the node objects and the path relation to a dagre-d3 rendering engine to draw a flow process visualization graph, wherein the dagre-d3 rendering engine is a plug-in of a Web page.
7. An apparatus for visualization in a process descriptive language, the apparatus comprising:
the first analysis module is used for acquiring a process file arranged by a process descriptive language and analyzing the process file by a preset rule to obtain corresponding relational data after the process file is converted;
the second analysis module is used for analyzing the relational data obtained by the first analysis module to obtain a node object of the process file and the attribute of the node object, wherein the attribute of the node object at least comprises a node identifier and a node ID of the node object;
and the image rendering module is used for determining a hierarchical relationship according to the attributes of the node objects obtained by the second analysis module, determining a path relationship of the node objects according to the hierarchical relationship, and sending the node objects and the path relationship to an image rendering unit to generate a flow visualization graph of the node objects.
8. The apparatus of claim 7, wherein the first parsing module comprises a server parsing module configured to:
respectively extracting corresponding workflow names, variable values, method blocks and execution functions in the relational data at least according to the workflow, the variable, the function and the work task of the flow file;
and organizing the workflow, the variable, the function, the working method, the extracted workflow name, the extracted variable value, the extracted method block and the extracted execution function in a preset format to obtain corresponding relational data after the flow file is converted.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 6 when executing the program.
10. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1 to 6.
CN202010188129.5A 2020-03-17 2020-03-17 Visual display method, device, equipment and medium of flow descriptive language Pending CN111508562A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010188129.5A CN111508562A (en) 2020-03-17 2020-03-17 Visual display method, device, equipment and medium of flow descriptive language

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010188129.5A CN111508562A (en) 2020-03-17 2020-03-17 Visual display method, device, equipment and medium of flow descriptive language

Publications (1)

Publication Number Publication Date
CN111508562A true CN111508562A (en) 2020-08-07

Family

ID=71869292

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010188129.5A Pending CN111508562A (en) 2020-03-17 2020-03-17 Visual display method, device, equipment and medium of flow descriptive language

Country Status (1)

Country Link
CN (1) CN111508562A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112784133A (en) * 2021-01-22 2021-05-11 中信银行股份有限公司 Link visualization method, device, equipment and storage medium
CN117369820A (en) * 2023-09-22 2024-01-09 北京渲光科技有限公司 Rendering flow chart generation method, device and equipment
CN117391202A (en) * 2023-12-13 2024-01-12 海乂知信息科技(南京)有限公司 Method and system for obtaining analysis decision result based on central control knowledge graph

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102163237A (en) * 2011-04-29 2011-08-24 北京空间飞行器总体设计部 Implementation method of loosely coupled flow
CN110874367A (en) * 2018-09-03 2020-03-10 阿里巴巴集团控股有限公司 Visualization method and device for structured query language statement

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102163237A (en) * 2011-04-29 2011-08-24 北京空间飞行器总体设计部 Implementation method of loosely coupled flow
CN110874367A (en) * 2018-09-03 2020-03-10 阿里巴巴集团控股有限公司 Visualization method and device for structured query language statement

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112784133A (en) * 2021-01-22 2021-05-11 中信银行股份有限公司 Link visualization method, device, equipment and storage medium
CN112784133B (en) * 2021-01-22 2024-05-17 中信银行股份有限公司 Link visualization method, device, equipment and storage medium
CN117369820A (en) * 2023-09-22 2024-01-09 北京渲光科技有限公司 Rendering flow chart generation method, device and equipment
CN117369820B (en) * 2023-09-22 2024-04-02 北京渲光科技有限公司 Rendering flow chart generation method, device and equipment
CN117391202A (en) * 2023-12-13 2024-01-12 海乂知信息科技(南京)有限公司 Method and system for obtaining analysis decision result based on central control knowledge graph
CN117391202B (en) * 2023-12-13 2024-03-26 海乂知信息科技(南京)有限公司 Method and system for obtaining analysis decision result based on central control knowledge graph

Similar Documents

Publication Publication Date Title
US11023500B2 (en) Systems and methods for code parsing and lineage detection
US7908594B2 (en) External programmatic interface for IOS CLI compliant routers
CN111508562A (en) Visual display method, device, equipment and medium of flow descriptive language
CN110162408B (en) Data processing method, device, equipment and machine-readable medium
US20070006179A1 (en) Methods and systems for transforming a parse graph into an and/or command tree
CN112949276A (en) Report generation method and device, electronic equipment and storage medium
CN110727417B (en) Data processing method and device
JP6440895B2 (en) Software analysis apparatus and software analysis method
CN110688118A (en) Webpage optimization method and device
CN108664546B (en) XML data structure conversion method and device
CN110334302B (en) Complex Web application front-end runtime analysis method
US10223086B2 (en) Systems and methods for code parsing and lineage detection
CN105867886B (en) Method and device for writing table
CN115618363B (en) Vulnerability path mining method and related equipment
CN106991144B (en) Method and system for customizing data crawling workflow
CN113901022B (en) Method, device, equipment and storage medium for establishing business and data relationship model
CN115481025A (en) Script recording method and device for automatic test, computer equipment and medium
CN106648925B (en) Mobile terminal and method for acquiring character string information thereof
CN114064601A (en) Storage process conversion method, device, equipment and storage medium
CN106484759B (en) Method and device for analyzing storage file of interactive electronic whiteboard
CN110516174A (en) The method, apparatus and storage medium of text are obtained based on Simple Syndication
CN106021287B (en) Information collection method and device for operating system and database
CN116680444B (en) Data processing method, device, equipment and storage medium
CA2983510A1 (en) Systems and methods for code parsing and lineage detection
CN114090428A (en) Information processing method, information processing device, computer-readable storage medium and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 1002-1, 10th floor, No.56, Beisihuan West Road, Haidian District, Beijing 100080

Applicant after: Ronglian Technology Group Co., Ltd

Address before: 100080, Beijing, Haidian District, No. 56 West Fourth Ring Road, glorious Times Building, 10, 1002-1

Applicant before: UNITED ELECTRONICS Co.,Ltd.

CB02 Change of applicant information