A system for parsing a workflow file

By automatically replacing parameters and using image recognition technology, combined with recommended templates based on historical usage frequency, workflow file parsing and compilation are simplified, solving the steep learning curve and complexity issues of existing technologies and enabling user-friendly use for both non-programming experts and users.

CN119987780BActive Publication Date: 2025-10-17UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510078210.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-10-17
Estimated Expiration
2045-01-17

AI Technical Summary

Technical Problem

The existing workflow parsing system has a steep learning curve and is complex to parse and compile workflow files, resulting in high learning costs, prone to compilation errors and parsing errors, and is not user-friendly for non-programming experts and users.

Method used

A workflow file parsing system is provided. The parsing unit automatically replaces parameters and generates running instructions based on predefined parsing tags and environment types. It combines image recognition technology and historical usage frequency to recommend templates, simplifying workflow definition and management. A compiler is used to parse incoming files into unified encoding parameters, lowering the technical threshold.

Benefits of technology

It simplifies the definition and management of workflows, reduces learning costs, enables non-programming experts and users to quickly get started, improves user experience, visualizes the parsing process, and makes operations simple and fast.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119987780B_ABST
    Figure CN119987780B_ABST
Patent Text Reader

Abstract

The present invention discloses a workflow file parsing system, which relates to the technical field of workflow development. The system comprises: a parsing unit: used for obtaining an operating instruction and obtaining a parsing result based on the operating instruction; the operating instruction is obtained in the following manner: based on a predefined parsing tag, a compiler obtains parsing parameters of a file to be parsed, replaces the predefined parameters based on the parsing parameters and the command parameters, and obtains operating parameters and operating environment data; based on the environment tag of the operating environment data, an environment type is obtained, and based on the operating parameters and the environment type, the operating instruction is obtained. The system can solve the problems of a steep learning curve of an existing workflow parsing system, complex parsing and compiling workflow files, resulting in high learning costs, and prone to compilation errors and parsing errors.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of workflow development, in particular to a parsing system of a workflow file. BACKGROUND

[0002] A workflow provides a method for automating tasks in a computing environment. Over time, software programming has evolved from writing applications in low-level languages such as assembly to writing in high-level languages like C++, C# and Visual Basic, such as Nextflow and Snakemake. Nextflow is a workflow management tool based on the Groovy language, supporting complex parallel and distributed computing, and having strong container integration capabilities (supporting Docker, Singularity, etc.); Snakemake is a workflow engine that provides a readable Python-based workflow definition language and a powerful execution environment that can be expanded from a single-core workstation to a computing cluster without modifying the workflow. Higher-level languages usually remove low-level management of memory and other machine-based restrictions, which facilitates programmers to think more from the perspective of objects representing problems to be solved.

[0003] However, Nextflow uses the Groovy language, which is not user-friendly to regular users, making the learning curve steep, and users need to spend more time mastering the language, and it takes a long time to compile and parse the workflow file. The configuration file management and output file abstraction of Nextflow make debugging and result management more complex, and users need to understand its internal working mechanism in depth to realize the parsing of the workflow file, which is not user-friendly to non-technical users. Snakemake uses the Python language, and its learning curve is still steep, especially when the workflow structure is complex, users need to have a deep understanding of the rule definition, DAG construction and file dependency relationship of Snakemake to realize the compilation and parsing of the workflow file.

[0004] Therefore, how to provide a workflow parsing system for non-programming experts and users is a problem that those skilled in the art need to solve. SUMMARY

[0005] In order to solve the problem that the existing workflow parsing system has a steep learning curve, the parsing and compiling of the workflow file are complex, resulting in high learning cost and prone to compilation and parsing errors, the present application provides a parsing system of a workflow file, the system comprises:

[0006] The parsing unit is used for obtaining a running instruction and obtaining a parsing result based on the running instruction; the running instruction is obtained in the following manner:

[0007] Based on the predefined parsing label, the compiler obtains the parsing parameters of the file to be parsed, replaces the predefined parameters based on the parsing parameters and the command parameters, obtains the running parameters and the running environment data;

[0008] Based on the environment label of the running environment data, the environment type is obtained, and the running instruction is obtained based on the running parameters and the environment type.

[0009] The present application parses the user input file and command parameters, replaces the original parameters, and does not depend on file output. It can more flexibly adapt to different types of workflow scenarios. Through a flexible parameter passing mechanism, each step in the workflow can be quickly defined and adjusted without the need for large-scale modification of the entire process. The definition and management of the workflow are simplified, the parsing and compiling of the workflow file are simpler, the development is simpler to implement, and the problem of easy parsing and compiling errors is solved. The user does not need to learn a new high-level programming language, and can parse and compile complex workflows based on familiar programming syntax, reducing the technical threshold and solving the problem of steep learning curve and high learning cost. In terms of operation, it is more friendly and quick to start for non-programming field experts and users, improving the user experience.

[0010] Further, the specific steps of obtaining the running instruction based on the running parameters and the environment type include: if the environment type is a process type, obtaining a plurality of first files based on the running parameters, obtaining first script data in each first file, splicing the first script data based on the calling order of the first file to obtain the running instruction; if the environment type is an isolation type, generating second script data of an isolated environment, compiling the running parameters into third script data of the isolated environment, and obtaining the running instruction based on the second script data and the third script data; if the environment type is a normal type, obtaining the running instruction based on the running parameters.

[0011] Further, the parsing unit is also used to obtain a development workflow template, and the development workflow template is obtained in the following manner: the compiler obtains a plurality of second files of a module file, obtains fourth script data of each second file based on predefined module parameters, splices the fourth script data based on the calling order of the module file to obtain a development instruction, and obtains the development workflow template based on the development instruction.

[0012] Further, if the environment type is an isolation type, the parsing unit is also used to obtain local file information based on the third script data and a configuration file, and obtain the running instruction based on the local file information and the third script data.

[0013] The local container management software is automatically identified according to the configuration file, without manual selection, and the operation is simpler and faster.

[0014] Further, if the environment type is a process type, the parsing unit is further configured to run the first script data based on pre-run parameters to obtain output parameters, splice the output parameters based on the first file calling sequence, and obtain the running instruction.

[0015] The corresponding script data is pre-run, the output results are spliced, the independent running environment of each script data is ensured, and the problem of environment conflict is reduced.

[0016] Further, the parsing unit is further configured to convert the development workflow template into an execution file and obtain the development workflow template based on the execution file.

[0017] The template is converted into an executable file, and the calling is faster and simpler.

[0018] Further, the system further comprises a display unit, the display unit is configured to obtain the controls of a canvas and the connection relationship of the controls, obtain control information based on the controls, the control information comprises file information, container information, template information and parameter information, and obtain an execution sequence based on the connection relationship; the compiler is configured to parse the control information to obtain fourth script data, obtain first parsing information based on the fourth script data and the execution sequence, and obtain a first control parsing result based on the first parsing information.

[0019] According to the distribution diagram and the connection relationship of the front-end controls, the file is automatically parsed, the file parsing process is visualized, the process is clearer, the relationship between the files is clearer, and the user is easier to understand and operate.

[0020] Further, the display unit is further configured to obtain a file image, obtain image information based on the file image, the image information comprises image control quantity, image control position, image control connection relationship and image text information, and obtain an image control category based on the image text information; based on the image information and the image control category, a control graph is obtained; the control graph is corrected to obtain a first corrected graph; input data is obtained, the input data is parsed based on the compiler to obtain fifth script data; second parsing information is obtained based on the fifth script data and the first corrected graph, and a second control parsing result is obtained based on the second parsing information.

[0021] In a scenario where a workflow template is complex and requires a large number of front-end controls, it takes a long time to realize the distribution diagram and connection relationship of the front-end controls, the application adds an image recognition technology, uploads an existing structure diagram or flowchart, recognizes it, realizes automatic layout of the front-end controls and automatic association thereof, uploads related files, and analyzes the same, to more quickly analyze a workflow file and a calling sequence between files.

[0022] Further, the system further comprises a recommendation unit, which is configured to: obtain historical operation data of a user, obtain a template usage frequency based on the historical operation data, and obtain a first workflow template list based on the template usage frequency; obtain a predicted workflow template of the first workflow template list, obtain predicted file information of the predicted workflow template, the predicted file information comprising a predicted file quantity, a predicted file category, a predicted file relationship, a predicted container and a predicted parameter; obtain a predicted graph based on the predicted file information; correct the predicted graph to obtain a second corrected graph, and obtain a third analysis result based on the second corrected graph.

[0023] Through the historical usage frequency, a template that is likely to be used by the user is speculated and converted into a visual graph, the user can more quickly understand the structure and flow of the template, and only needs to modify part of the parameters to realize analysis of the file and development of a target template.

[0024] Further, the display unit is further configured to: obtain predicted control information of the predicted graph, the predicted control information comprising a predicted control quantity, a predicted control position, a predicted control connection relationship, predicted text information and a predicted control category; obtain a first similarity based on the image control position and the predicted control position, obtain a second workflow template list based on the first similarity and the first workflow template list; obtain a second similarity based on the image control quantity and the predicted control quantity, obtain a third similarity based on the image control category and the predicted control category, and obtain a third workflow template list based on the second similarity, the third similarity and the second workflow template list; obtain a fourth similarity based on the image control connection relationship and the predicted control connection relationship, and obtain a fourth workflow template list based on the fourth similarity and the third workflow template list; and obtain a fourth analysis result based on the fourth workflow template list.

[0025] The template that is likely to be used by the user is converted into a visual graph, and the similarity thereof is compared with a file image, the most similar template is found, the time for automatically generating a visual graph corresponding to the file image is reduced, and only part of data needs to be modified to obtain a new template, and the operation is simpler and faster.

[0026] The one or more technical solutions provided by the application have at least the following technical effects or advantages:

[0027] 1. The present application parses the user's incoming files and command parameters, and the compiler automatically replaces the original parameters without manual replacement, and is independent of file output, can more flexibly adapt to different types of workflow scenarios, quickly defines and adjusts each step in the workflow through a flexible parameter passing mechanism, without the need for large-scale modification of the entire process, simplifying the definition and management of the workflow, making the parsing and compiling of the workflow file simpler, making development easier, solving the problem of easy parsing and compiling errors; the incoming file is parsed into a unified coded parameter by the compiler, the user does not need to learn a new high-level programming language, and can create and manage complex workflows based on familiar programming syntax, reducing the technical threshold, solving the problem of steep learning curve, enabling non-programming experts and users to quickly get started, and improving user experience.

[0028] 2. The first parsing information is obtained based on the fourth script data and the execution order, the first control parsing result is obtained based on the first parsing information, and the file is automatically parsed according to the distribution map and connection relationship of the front-end control, the file parsing process is visualized, the process is clearer, the relationship between the files is clearer, and the user understands and operates more simply.

[0029] 3. The second parsing information is obtained based on the fifth script data and the first correction map, the second control parsing result is obtained based on the second parsing information, the image recognition technology is increased, the existing structure diagram or flowchart is uploaded and recognized, the automatic layout of the front-end control and the automatic association thereof are realized, and the related files are uploaded and parsed together, so that the workflow file is parsed more quickly.

[0030] 4. The third parsing result is obtained based on the second correction map, the template that the user is likely to use is inferred through the historical use frequency, and is converted into a visual diagram, so that the user can more quickly understand the structure and process of the template, and only needs to modify part of the parameters to realize the parsing of the file and develop the target template.

[0031] 5. The fourth parsing result is obtained based on the fourth workflow template list, the template that the user is likely to use is converted into a visual diagram, and the similarity thereof is compared with the file image, the most similar template is found, the time for automatically generating the visual diagram corresponding to the file image is reduced, and only part of the data needs to be modified to obtain a new template, so that the operation is simpler and faster. BRIEF DESCRIPTION OF DRAWINGS

[0032] The accompanying drawings described herein are used to provide further understanding of the embodiments of the present application, and form a part of the present application, and do not constitute a limitation on the embodiments of the present application;

[0033] Figure 1 is a flowchart of a workflow file parsing system in the present application. DETAILED DESCRIPTION

[0034] In order to enable a more complete understanding of the above-mentioned objects, features and advantages of the present application, the present application will be described in further detail below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other if they do not conflict with each other.

[0035] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application. However, the present application can be practiced in other manners that deviate from the specific details disclosed herein without departing from the scope of the present application, and the scope of the present application is not limited to the specific embodiments disclosed below.

[0036] Embodiment One

[0037] Reference Figure 1 The embodiment provides a parsing system of a workflow file, and the system comprises:

[0038] The parsing unit is used for obtaining a running instruction and obtaining a parsing result based on the running instruction; the running instruction is obtained in the following manner:

[0039] Based on the predefined parsing label, the compiler obtains the parsing parameters of the file to be parsed, replaces the predefined parameters based on the parsing parameters and the command parameters, obtains the running parameters and the running environment data, obtains the environment type based on the environment label of the running environment data, and obtains the running instruction based on the running parameters and the environment type.

[0040] As based on <workdir>The tag acquires the path of the file to be parsed, and based on <run>The tag obtains a command line, obtains parsed parameters, and substitutes predefined parameters based on command parameters such as IN a (input parameter a) and OUT b (output parameter b), such as substituting c for a if the predefined parameter is IN c, to obtain running parameters and running environment data; and obtains an environment type based on the environment tag, such as obtaining an environment type based on <flow>The label determines it as a process type, and the <container / apptainer / singularity / podman / docker:…> label determines it as an isolation type, <local>The label determines that it is a common type, and then obtains the running instruction based on the running parameter and the environment type.

[0041] The specific step of obtaining the running instruction based on the running parameter and the environment type comprises:

[0042] If the environment type is a flow type, a plurality of first files are obtained based on the running parameter, first script data in each first file is obtained, the first script data is spliced based on the calling order of the first files, and the running instruction is obtained; if the to-be-analyzed file contains a plurality of files, the first files are obtained through file names or file paths and the like, the script data in each first file is obtained by referring to the above-mentioned obtaining mode of the running instruction, and the script data is spliced according to the calling order of the files, such as RUN:PRE, RUN and RUN:AFTER representing calling in sequence, calling and calling after, so as to obtain the running instruction.

[0043] If the environment type is an isolation type, second script data of an isolated environment is generated, the running parameter is compiled into third script data of the isolated environment, and the running instruction is obtained based on the second script data and the third script data; for example, according to the setting of the running environment in <docker:container-name:image-name:…>, the second script data of the Docker container is automatically generated, so as to automatically build the environment, the heredoc (a method for defining a multi-line string in PHP) is used to pass the running parameter to be run into the docker exec container… command, and the running parameter is recompiled into the third script data that can be run in the Docker container.

[0044] If the environment type is a common type, the running instruction is obtained based on the running parameter.

[0045] The flow type refers to that a file contains the content or code of other files, that is, file inclusion.

[0046] The isolation type refers to that containers and the host are isolated in terms of resource use, file system and network, so as to ensure that the containers run in an independent virtual environment, thereby ensuring the security and stability of the containers, such as the Docker container.

[0047] The common type refers to other environment types except the flow type and the isolation type.

[0048] In this embodiment, the compiler can be written in programming languages such as Python, Java, C, and C#, preferably in Common Lisp, and more preferably in SBCL (Steel Bank Common Lisp) of Common Lisp.

[0049] Common Lisp is one of the many dialects of Lisp, a modern, multi-paradigm, high-performance and compiled standardized ANSI programming language. SBCL is a high-performance implementation of Common Lisp, known as the Ferrari 12 in the implementation of Common Lisp. SBCL not only provides a complete Lisp programming environment, but also has a powerful compiler and running system.

[0050] Using Common Lisp has the following advantages:

[0051] 1) The macro system of Common Lisp is more powerful and flexible than almost all other programming languages, and can create DSLs (Domain Specific Languages) or other high-level functions in compilers and transmission tools, easily embedding complex workflows and configurations into code without introducing new interpretation or compilation layers. Through macros, complex code logic can be automatically generated and converted during code compilation, reducing the amount of lengthy handwritten code;

[0052] 2) Common Lisp encourages modular and reusable code structures and has good support for functional programming. The flexible syntax and functional programming style of Lisp can be used to combine the core functions and modular design of compilers and transmission tools, allowing users to flexibly combine and extend functions, which is particularly advantageous for workflow management systems, as new functions or modules can be added without modifying the underlying code;

[0053] 3) Common Lisp has a built-in garbage collection mechanism, providing convenience and stability for memory management. For workflow management systems that need to run for a long time and may handle large amounts of data, the stability of garbage collection can avoid many memory leak problems, which is very important for ensuring the robustness of the system;

[0054] 4) Common Lisp runs faster than languages such as Python, while its abstraction ability is higher than languages such as C / C++, allowing for high-speed operation while maintaining high-level abstraction;

[0055] 5) Common Lisp has a status handling system that other languages do not have, allowing for more stable and interactive handling of various conditions and errors, which is a very important and advantageous advantage in DSLs.

[0056] In the embodiment, the file to be parsed and the module file can be written by programming languages such as Python, Java, C and C#, and preferably written by TAF language and parsed into shell language by a compiler.

[0057] The taf file refers to a source code file of TAF, used for storing TAF code in pure text form, the file containing function, class, variable definition and execution logic, and being a main place for writing programs.

[0058] The TAF language is a DSL (Domain Specific Language), designed for terminal command line operation (Shell) and developed for containerization work and process design and management. The TAF language is case sensitive, does not distinguish indentation, only uses line feed as a separator, and uses # at the beginning of a comment. The syntax structure of the language is a head title system, and from top to bottom, there are mainly three levels of identification:

[0059] 1) Top-level identification: located in the first line of each file and unique, used for annotating the type of taf file (tool or workflow) and giving the name, such as +TOOL: xxx / +FLOW: xxx;

[0060] 2) First-level identification: such as LOAD / ARGS / RUN (RUN: PRE / RUN / RUN:AFTER), LOAD is used to call the TAF file, ARGS is used to set parameters, and RUN is used to set the running content. There can be only one first-level identification in each file, if there are two, the first one is preferred, and all subsequent identifications of the same name are ignored;

[0061] 3) Second-level identification: <xxx>The contents and usage depend on the primary identification, and the contents and usage are different under different primary identifications. For example, the secondary identification under LOAD is used to fill in the path or alias of the TAF file, and can be represented as:

[0062] LOAD

[0063]

[0064] . / tools / a.taf;

[0065] The secondary identification under ARGS is used to define the value of a variable, and the identification under supports cross-line parameters. The replacement of the variable uses ::xxx:: to call the parameter, and the call supports cross-file calls, such as the taf file uses LOAD to call the a.taf file, and uses As an alias of a.taf, you can use ::a:xxx:: to access xxx variable in a.taf and do variable replacement before running;

[0066] And built-in environment variables are provided to help developers quickly build taf workflow templates, such as ::*WORKDIR*:: representing the current working path; ::*LOAD-DIR*:: representing the path of the taf file being run; ::*CPUS*:: representing the number of cpu threads of the current operating platform; ::*MAIN*:: is a kind of built-in if command variable for quickly building tools, if the user does not pass in the parameter, if = ::else::, if there is a parameter and it starts with —xxx, then use the official build way, if = ::main::, if it does not start with —xxx, then the user's input is the new command, which is directly passed in. If there is a taf file:

[0067] +TOOL:blast

[0068] ARGS

[0069] <mian>

[0070] ::cmd::::opts::::in::

[0071] <else>

[0072] cat: *LOAD-DIR*::.. / blast.info .txt

[0073] RUN

[0074] <container:taf-blast: docker.io / ncbi / blast:latest >

[0075] ::*MAIN*::

[0076] As the above taf file, the user can use the following three ways:

[0077] (1) taf-blast: the user does not pass in parameters, call::else::, that is, show help;

[0078] (2) taf-blast—cmd blastn—in xxx—opts yyy: the user passes in parameters, and starts with—cmd, call::main:: in the way to run;

[0079] (3) taf-blast blastn xxx yyy…: the user passes in parameters, and does not start with—xxx, directly pass blastn xxx yyy… into the position of::*MAIN*::. RUN is the code of all command parts that the taf file needs to execute. RUN can be divided into RUN:PRE / RUN / RUN:AFTER three marks, and the contents of RUN will be executed in this order finally. The secondary marks of RUN mainly have five kinds:

[0080] 1) <local sh shell>: Corresponding to local shell code, you can write shell code under this tag. The shell code in this part will be copied directly without modification during conversion;

[0081] 2)<container / apptainer / singularity / docker / podman:container-name:image-name(@...$...)> : For code running in containers such as apptainer, docker, or podman, when this tag is recognized, the available containers and images are automatically detected locally. If multiple containers and images exist locally, the order of installation can be specified in the configuration file, such as the congif configuration file, or the first detected container or image can be installed. If the corresponding image and container do not exist locally, the compiler will automatically generate code to obtain the image and generate the container to automatically configure the environment. If the corresponding container exists, the corresponding container will be used directly.

[0082] 3)<python / R / …> : Write the code in the corresponding language, pass it to the corresponding compiler, and then output the running results;

[0083] 4)<sh:…> : This flag can use the command after the corresponding sh as the shell command header, and then pass the code below sh into the command through heredoc;

[0084] 5) <flow>The core identifier of the workflow automatically identifies the TAF command therein and pre-runs the replacement shell command, and then constructs the flow process in the form of writing a shell.

[0085] Using the TAF language which is almost consistent with the Shell syntax, the user no longer needs to learn a complex programming language or master new techniques. For the user, being familiar with the Shell command can quickly build a workflow, which can shorten the development time of the workflow. Especially for bioinformaticians and researchers without programming background, compared with the complex rule definition of the Groovy language of Nextflow or Snakemake, the learning curve is greatly reduced.

[0086] Embodiment Two

[0087] On the basis of the first embodiment, in the embodiment, the analysis unit is further used to obtain a development workflow template, and the way to obtain the development workflow template is:

[0088] The compiler obtains a plurality of second files of the module file, obtains fourth script data of each second file based on a predefined module parameter, splices the fourth script data based on the calling sequence of the module file to obtain a development instruction, and obtains the development workflow template based on the development instruction.

[0089] If the module file includes four files m, n, q and p, then based on <flow>The four files are obtained, the compiler parses them according to the obtaining manner of the running instruction, obtains script data, assembles the script data according to the calling order, obtains the development instruction, and encapsulates the development instruction as a module package, so as to obtain the development workflow template.

[0090] Embodiment three

[0091] On the basis of the above-mentioned embodiments, in this embodiment, if the environment type is the isolation type, the parsing unit is further used for:

[0092] Based on the third script data and the configuration file, local file information is obtained, and based on the local file information and the third script data, the running instruction is obtained.

[0093] As <container / apptainer / singularity / docker / podman:container-name:image-name(@...$...)> corresponds to the code running in the apptainer, docker or podman container, when the container label is used, the container management software available on the current computer is automatically detected and the container management software in the order of the config configuration file or the default file is installed. If the corresponding image and container do not exist locally, the compiler will automatically generate the code to obtain the image and generate the container to automatically configure the environment, and if they exist, the corresponding container is directly used.

[0094] Embodiment four

[0095] On the basis of the above-mentioned embodiments, in this embodiment, if the environment type is the flow type, the parsing unit is further used for:

[0096] Based on the pre-running parameters, the first script data is run to obtain output parameters, and based on the first file calling order, the output parameters are spliced to obtain the running instruction.

[0097] As in any position in the taf file, the pre-running script data can be pre-run in the shell by using the pre-running parameter $$command$$ wrapping method, and the output is taken as the value corresponding to the script data, for example, the RUN- <local>The different taf files are pre-invoked in the way of using $$taf-a-dry-run...$$, $$taf-b-dry-run...$$. The shell code that will finally be converted is embedded in the current taf file, so that the flow can be built as fast as writing shell and there is no environment confliction and so on.

[0098] In a more preferred embodiment, the RUN under <flow>The tag is optimized, it can automatically identify "taf-xxx" and "taffish xxx.taf" command, and replace it with corresponding shell text after pre-run, without manually adding $$...$$; and provides <auto-flow>a tag which is in <flow>On the basis of the above, the taf-xxx that appears is automatically identified and installed, and "taf install-n xxx" is run in advance, that is, dependencies are automatically identified and installed.

[0099] Only two steps are needed to convert the original shell script into a taf script: (1) add a taf table header in front of the original script, and use <flow>or <auto-flow>Tag; (2) Add taf-xxx before all taf tools to adapt to the environment and realize the construction of the workflow with minimum time cost.

[0100] Embodiment five

[0101] On the basis of the above-mentioned embodiments, in this embodiment, the analysis unit is further used for:

[0102] The development workflow template is converted into an execution file, and the development workflow template is obtained based on the execution file. For example, PyInstaller is a popular Python code packaging tool that can package Python scripts into executable files.

[0103] Then you can directly install the xxx module using taf install xxx, and then directly use taf-xxx to call this module, and use taf-xxx-h to directly view the help and usage of this module. It is more suitable for the usage of shell itself, and reduces the learning cost.

[0104] Embodiment six

[0105] On the basis of the above-mentioned embodiments, in this embodiment, the system further comprises a display unit, and the display unit is used for:

[0106] Obtaining the controls of the canvas and the connection relationship of the controls, obtaining control information based on the controls, the control information including file information, container information, template information and parameter information, and obtaining the execution order based on the connection relationship;

[0107] Based on the compiler, the control information is analyzed to obtain fourth script data, the first analysis information is obtained based on the fourth script data and the execution order, and the first control analysis result is obtained based on the first analysis information.

[0108] For example, the user drags different types of controls on the front-end page, connects them through arrows, and uploads the corresponding control information through the controls. The front-end transmits the obtained control information and connection relationship to the back-end, refers to the obtaining method of the running instruction, analyzes it by the compiler, and obtains the relationship between files such as the calling sequence, the containing relationship of the files, etc. According to the connection relationship, the parsed script data is spliced to obtain the analysis result.

[0109] In this embodiment, the file information includes the path and file name of the file, the container information includes the path and name of the container or image, the template information includes the name or identifier of the workflow template, the parameter information includes the command parameters, and the control can include a text box, a button, a check box, a drop-down list, a file selection, a picture, a label, a warning box, an icon, a search box, a file download, and a date selector.

[0110] Embodiment seven

[0111] On the basis of the above-mentioned embodiments, in this embodiment, the display unit is further used for:

[0112] Obtaining a file image, obtaining image information based on the file image, the image information including the number of image controls, the position of image controls, the connection relationship of image controls, and image text information, and obtaining the category of image controls based on the image text information;

[0113] For example, based on image recognition technology and scanning technology, the controls and arrows on the file image are obtained, the number of controls is obtained based on the controls, the connection relationship is obtained based on the arrows, the origin of the image is customized, the coordinates of different spaces are obtained, the position of the controls is obtained, the text information in the image frame is obtained based on the text recognition technology, and if the text information is a file path, the category of the corresponding recognized control is a file selection control.

[0114] Based on the image information and the category of the image controls, a control graph is obtained; the control graph is corrected to obtain a first corrected graph; the control graph is generated through the image information and the category of the controls, the user corrects the controls or the connection relationship that exist errors, and a corrected graph is obtained.

[0115] Obtaining input data, analyzing the input data based on the compiler to obtain fifth script data; inputting corresponding data through controls, such as uploading a file to be analyzed through a file selection control, and the compiler analyzes the file to obtain script data;

[0116] Based on the fifth script data and the first corrected graph, second analysis information is obtained, and based on the second analysis information, a second control analysis result is obtained. Based on the connection relationship of the corrected graph, the script data is spliced to obtain an analysis result.

[0117] Embodiment eight

[0118] On the basis of the above-mentioned embodiments, in this embodiment, the system further includes a recommendation unit, and the recommendation unit is used for:

[0119] Obtaining historical operation data of a user, obtaining a template usage frequency based on the historical operation data, and obtaining a first workflow template list based on the template usage frequency; for example, selecting the top ten workflow templates in terms of usage frequency within one month;

[0120] Obtain a prediction workflow template of the first workflow template list, obtain prediction file information of the prediction workflow template, and the prediction file information includes a prediction file number, a prediction file category, a prediction file relationship, a prediction container, and a prediction parameter; in this embodiment, the file category includes a workflow file, a container, a chart, and the like, the prediction file relationship includes an execution order and a file containing relationship, and the like, and the prediction parameter includes a command parameter and the like.

[0121] Obtain a prediction graph based on the prediction file information, correct the prediction graph to obtain a second correction graph, and obtain a third analysis result based on the second correction graph.

[0122] Embodiment Nine

[0123] On the basis of the above-mentioned embodiments, in this embodiment, the display unit is further used to:

[0124] Obtain prediction control information of the prediction graph, and the prediction control information includes a prediction control number, a prediction control position, a prediction control connection relationship, prediction text information, and a prediction control category;

[0125] Based on the image control position and the prediction control position, a first similarity is obtained, and based on the first similarity and the first workflow template list, a second workflow template list is obtained; for example, a coordinate of each control is obtained from a custom origin, a direction between controls is obtained through the coordinate, for example, it is judged that control A is directly below control B through the coordinate, and the first similarity is obtained through the direction, that is, the same coordinate direction / all coordinate directions.

[0126] Based on the image control number and the prediction control number, a second similarity is obtained, for example, image control number / max(image control number, prediction control number);

[0127] Based on the image control category and the prediction control category, a third similarity is obtained, for example, same category number / all control categories;

[0128] Based on the second similarity, the third similarity, and the second workflow template list, a third workflow template list is obtained; for example, different weights are assigned, the second similarity and the third similarity are added, and then the added value is sorted in descending order, and a template within a preset range is selected;

[0129] Based on the image control connection relationship and the prediction control connection relationship, a fourth similarity is obtained, for example, same connection relationship / all connection relationships;

[0130] Based on the fourth similarity and the third workflow template list, a fourth workflow template list is obtained; based on the fourth similarity, the templates are screened to obtain the fourth workflow template list;

[0131] Based on the fourth workflow template list, a fourth analysis result is obtained. If the user uploads relevant data after modifying the control and connection relationship of the template in the fourth workflow template list, the compiler analyzes the data to obtain the fourth analysis result.

[0132] Although preferred embodiments of the application have been described herein, changes and modifications can be suggested to one skilled in the art, and it is intended that the application encompass such changes and modifications as fall within the scope of the appended claims.

[0133] Obviously, various modifications and changes can be made to the present application by those of ordinary skill in the art without departing from the spirit and scope of the application. Accordingly, it is intended that the application embrace all such modifications and changes as fall within the scope of the appended claims and their equivalents. < / flow> < / flow> < / flow> < / local> < / flow> < / flow> < / local> < / else> < / mian> < / xxx> < / local> < / flow> < / run> < / workdir>

Claims

1. A workflow file parsing system, characterized in that: The system comprises: Parsing unit: used to obtain an operating instruction and obtain a parsing result based on the operating instruction; the operating instruction is obtained in the following manner: Based on the predefined parsing tags, the compiler obtains parsing parameters of the file to be parsed, replaces the predefined parameters based on the parsing parameters and command parameters, and obtains operating parameters and operating environment data; Obtaining an environment type based on the environment tag of the operating environment data, and obtaining the operating instruction based on the operating parameters and the environment type; The system further comprises a display unit, wherein the display unit is configured to: Acquire a connection relationship between a control on the canvas and the control, obtain control information based on the control, the control information including file information, container information, template information, and parameter information, and obtain an execution order based on the connection relationship; Parsing the control information based on the compiler to obtain fourth script data, obtaining first parsing information based on the fourth script data and the execution order, and obtaining a first control parsing result based on the first parsing information; The display unit is further configured to: Acquire a document image, obtain image information based on the document image, the image information including the number of image controls, positions of image controls, connection relationships between image controls, and image text information, and obtain a category of the image control based on the image text information; Based on the image information and the image control category, a control diagram is obtained; the control diagram is modified to obtain a first modified diagram; input data is obtained, and the input data is parsed based on the compiler to obtain fifth script data; Obtaining second parsing information based on the fifth script data and the first correction map, and obtaining a second control parsing result based on the second parsing information; The system further includes a recommendation unit, configured to: Acquire historical operation data of the user, obtain template usage frequency based on the historical operation data, and obtain a first workflow template list based on the template usage frequency; Obtaining a prediction workflow template from the first workflow template list, obtaining predicted file information for the prediction workflow template, the predicted file information including a predicted file quantity, a predicted file category, a predicted file relationship, a predicted container, and prediction parameters; obtaining a prediction graph based on the predicted file information; revising the prediction graph to obtain a second revised graph, and obtaining a third parsing result based on the second revised graph; The display unit is further configured to: Acquire prediction control information of the prediction graph, the prediction control information including the number of prediction controls, the location of prediction controls, the connection relationship of prediction controls, prediction text information, and the category of prediction controls; Obtaining a first similarity based on the image control position and the predicted control position, and obtaining a second workflow template list based on the first similarity and the first workflow template list; Based on the number of image controls and the number of predicted controls, a second similarity is obtained; based on the category of the image controls and the category of the predicted controls, a third similarity is obtained; and based on the second similarity, the third similarity, and the second workflow template list, a third workflow template list is obtained; Obtaining a fourth similarity based on the image control connection relationship and the prediction control connection relationship, and obtaining a fourth workflow template list based on the fourth similarity and the third workflow template list; A fourth parsing result is obtained based on the fourth workflow template list.

2. A workflow file parsing system according to claim 1, characterized in that: The specific steps of obtaining the operating instruction based on the operating parameters and the environment type include: If the environment type is a process-based type, obtaining a plurality of first files based on the running parameters, obtaining first script data in each of the first files, and splicing the first script data based on the calling order of the first files to obtain the running instructions; If the environment type is an isolated type, generating second script data for the isolated environment, compiling the operating parameters into third script data for the isolated environment, and obtaining the operating instructions based on the second script data and the third script data; If the environment type is a normalized type, the operating instruction is obtained based on the operating parameters.

3. A workflow file parsing system according to claim 1, characterized in that: The parsing unit is further configured to obtain a development workflow template, and the method for obtaining the development workflow template is as follows: The compiler obtains a plurality of second files of the module file, obtains fourth script data of each of the second files based on predefined module parameters, and splices the fourth script data based on the calling order of the module files to obtain development instructions; The development workflow template is obtained based on the development instruction.

4. A workflow file parsing system according to claim 2, characterized in that: If the environment type is an isolated type, the parsing unit is further configured to: Local file information is obtained based on the third script data and the configuration file, and the running instruction is obtained based on the local file information and the third script data.

5. A workflow file parsing system according to claim 2, characterized in that: If the environment type is a process-based type, the parsing unit is further configured to: Based on the pre-run parameters, the first script data is run to obtain output parameters, and based on the first file calling sequence, the output parameters are spliced ​​to obtain the run instruction.

6. A workflow file parsing system according to claim 3, characterized in that: The parsing unit is further configured to: The development workflow template is converted into an execution file, and the development workflow template is obtained based on the execution file.

Citation Information

Patent Citations

  • Text tagging method based on artificial intelligence, electronic device and storage medium

    CN111639480A

  • Heterogeneous system-oriented aero-engine integrated simulation workflow engine system

    CN115906499A