Workflow file analysis system
By providing a workflow file parsing system that automatically replaces parameters and simplifies the parsing process, the problems of steep learning curve and complex analysis in the existing technology are solved, and simpler workflow definition and management are realized, lowering the technical threshold.
Patent Information
- Application Number
- CN202510078210.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-01-17
AI Technical Summary
The learning curve of the existing workflow analysis system is steep and the analysis and compilation of workflow files is complex, resulting in high learning costs and prone to compilation errors and parsing errors.
It provides a workflow file parsing system, obtains running instructions through the parsing unit, automatically replaces original parameters, adapts to different types of workflow scenarios, simplifies the definition and management of workflows, and lowers the technical threshold.
Simplifies the parsing and compilation process of workflows, reduces learning costs, improves user experience, and is suitable for non-programming experts and users.
Smart Images

Figure CN119987780A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of workflow development, and in particular to a workflow file parsing system. Background Art
[0002] Workflows provide 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 such as C++, C#, and Visual Basic, such as Nextflow and Snakemake. Nextflow is a workflow management tool based on the Groovy language that supports complex parallel and distributed computing and has powerful container integration capabilities (supports 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 typically remove low-level management of memory and other machine-based restrictions, which helps allow programmers to think more in terms of objects that represent the problems to be solved.
[0003] However, Nextflow uses the Groovy language, which is not user-friendly. This makes its learning curve steep. Users need to spend more time mastering the language, and it takes a long time to compile and parse workflow files. Nextflow's configuration file management and output file abstraction make debugging and result management more complicated. Users need to have a deep understanding of its internal working mechanism to parse workflow files, which is not friendly to non-technical users. Snakemake uses the Python language, and its learning curve is still relatively steep. Especially when the workflow structure is complex, users need to have a deeper understanding of Snakemake's rule definition, DAG construction, and file dependencies to compile and parse workflow files.
[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 urgently. Summary of the invention
[0005] In order to solve the problems of steep learning curve of existing workflow parsing systems, complex parsing and compiling of workflow files, high learning cost, and easy occurrence of compilation errors and parsing errors, the present invention provides a workflow file parsing system, the system comprising:
[0006] Parsing unit: used to obtain an operation instruction and obtain a parsing result based on the operation instruction; the operation instruction is obtained in the following manner:
[0007] 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 the command parameters, and obtains operating parameters and operating environment data;
[0008] The environment type is obtained based on the environment tag of the operating environment data, and the operating instruction is obtained based on the operating parameter and the environment type.
[0009] The present invention parses the files and command parameters input by the user, replaces the original parameters, does not rely on file output, can adapt to different types of workflow scenarios more flexibly, and through a flexible parameter transfer mechanism, quickly defines and adjusts each step in the workflow without large-scale modification of the entire process, simplifies the definition and management of the workflow, and makes it simpler to parse and compile workflow files, simpler to implement development, and solves the problem of easy parsing and compiling errors; a compiler is used to parse the input file into a unified encoding parameter, and 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, which reduces the technical threshold and can solve the problems of steep learning curve and high learning cost. In terms of operation, it is more friendly to non-programming experts and users and quickly gets started, thereby improving the user experience.
[0010] Furthermore, the specific steps of obtaining the running instructions based on the running 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 the first script data in each of the first files, splicing the first script data based on the calling order of the first files, and obtaining the running instructions; if the environment type is an isolated type, generating second script data for an isolated environment, compiling the running parameters into third script data for the isolated environment, and obtaining the running instructions based on the second script data and the third script data; if the environment type is a normalized type, obtaining the running instructions based on the running parameters.
[0011] Furthermore, the parsing unit is also used to obtain a development workflow template, and the method for obtaining the development workflow template is: the compiler obtains several second files of the module file, obtains fourth script data of each of the second files based on predefined module parameters, splices the fourth script data based on the calling order of the module files, and obtains development instructions; and obtains the development workflow template based on the development instructions.
[0012] Furthermore, if the environment type is an isolated type, the parsing unit is also used to: obtain local file information based on the third script data and the configuration file, and obtain the running instruction based on the local file information and the third script data.
[0013] Automatically identify local container management software based on configuration files without manual selection, making operation simpler and faster.
[0014] Furthermore, if the environment type is a process-based type, the parsing unit is also used to: based on pre-run parameters, run the first script data to obtain output parameters, and based on the first file calling sequence, splice the output parameters to obtain the run instructions.
[0015] Pre-run the corresponding script data and splice the output results to ensure the independent running environment of each script data and reduce the problem of environmental conflicts.
[0016] Furthermore, the parsing unit is further used to: convert the development workflow template into an execution file, and obtain the development workflow template based on the execution file.
[0017] Convert templates to executable files for faster and easier calling.
[0018] Furthermore, the system also includes a display unit, which is used to: obtain a connection relationship between the control of the canvas and the control, obtain control information based on the control, the control information includes file information, container information, template information and parameter information, and obtain an execution order based on the connection relationship; parse the control information based on the compiler to obtain fourth script data, obtain first parsing information based on the fourth script data and the execution order, and obtain a first control parsing result based on the first parsing information.
[0019] According to the distribution diagram and connection relationship of the front-end controls, the file is automatically parsed and the file parsing process is visualized, making the process clearer, the relationship between files clearer, and easier for users to understand and operate.
[0020] Furthermore, the display unit is also used to: obtain a file image, obtain 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 obtain an image control category based on the image text information; obtain a control diagram based on the image information and the image control category; correct the control diagram to obtain a first corrected diagram; obtain input data, parse the input data based on the compiler to obtain fifth script data; obtain second parsing information based on the fifth script data and the first corrected diagram, and obtain a second control parsing result based on the second parsing information.
[0021] Considering that the workflow template is more 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 present invention adds image recognition technology to upload the existing structure diagram or flow chart, identify it, realize the automatic layout of the front-end controls and automatically associate them, and then upload the relevant files and parse them together, so as to more quickly parse the workflow files and the calling order between files.
[0022] Furthermore, the system also includes a recommendation unit, which is used to: obtain 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; obtain the predicted workflow template of the first workflow template list, obtain predicted file information of the predicted workflow template, and the predicted file information includes predicted file quantity, predicted file category, predicted file relationship, predicted container and prediction parameters; obtain a prediction graph based on the predicted file information; correct the prediction graph to obtain a second corrected graph, and obtain a third analysis result based on the second corrected graph.
[0023] By inferring the templates that users may use through historical usage frequency and converting them into visual graphs, users can understand the structure and process of templates more quickly. By simply modifying some parameters, they can parse the files and develop the target template.
[0024] Further, the display unit is also used to: obtain predicted control information of the prediction graph, the predicted control information including predicted control quantity, predicted control position, predicted control connection relationship, predicted text information and predicted control category; obtain a first similarity based on the image control position and the predicted control position, and 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; obtain a fourth parsing result based on the fourth workflow template list.
[0025] Convert the templates that users may use into visual graphs, and compare their similarity with the file images to find the most similar templates, thus reducing the time for automatically generating visual graphs corresponding to the file images. New templates can be obtained by modifying only part of the data, making the operation simpler and faster.
[0026] One or more technical solutions provided by the present invention have at least the following technical effects or advantages:
[0027] 1. The present invention parses the files and command parameters passed in by the user, and the compiler automatically replaces the original parameters without manual replacement and without relying on file output. It can adapt to different types of workflow scenarios more flexibly, and through a flexible parameter transfer mechanism, each step in the workflow can be quickly defined and adjusted without large-scale modification of the entire process, which simplifies the definition and management of workflows, makes it easier to parse and compile workflow files, and makes development easier, solving the problem of easy parsing and compilation errors. The compiler is used to parse the passed-in files into unified coding parameters, so that users do not need to learn new high-level programming languages, and can create and manage complex workflows based on familiar programming syntax, which reduces the technical threshold and can solve the problem of steep learning curves, so that non-programming experts and users can quickly get started and improve the user experience.
[0028] 2. Obtain the first parsing information based on the fourth script data and the execution order, obtain the first control parsing result based on the first parsing information, automatically parse the file according to the distribution diagram and connection relationship of the front-end control, and visualize the file parsing process, so that the process is clearer, the relationship between files is clearer, and users understand and operate it more easily.
[0029] 3. Obtain the second parsing information based on the fifth script data and the first revised diagram, obtain the second control parsing result based on the second parsing information, add image recognition technology, upload the existing structure diagram or flow chart, identify it, realize automatic layout of the front-end controls and automatically associate them, then upload related files, parse them together, and parse workflow files more quickly.
[0030] 4. Based on the second revised graph, the third analysis result is obtained. Through the historical usage frequency, the template that the user may use is inferred and converted into a visual graph. The user can understand the structure and process of the template more quickly, and only needs to modify some parameters to realize the analysis of the file and develop the target template.
[0031] 5. Based on the fourth workflow template list, the fourth analysis result is obtained, and the templates that the user may use are converted into visual graphs, and their similarities are compared with the file images to find the most similar templates, thereby reducing the time for automatically generating visual graphs corresponding to the file images. Only part of the data needs to be modified to obtain a new template, which is simpler and faster to operate. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of the present invention, and do not constitute a limitation on the embodiments of the present invention;
[0033] Figure 1 It is a flowchart of a workflow file parsing system in the present invention. DETAILED DESCRIPTION
[0034] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.
[0035] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those within the scope of this description. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0036] Embodiment 1
[0037] refer to Figure 1 This embodiment provides a workflow file parsing system, the system comprising:
[0038] Parsing unit: used to obtain an operation instruction and obtain a parsing result based on the operation instruction; the operation instruction is obtained in the following manner:
[0039] Based on the predefined parsing tags, 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, and obtains the operating parameters and operating environment data; obtains the environment type based on the environment tag of the operating environment data, and obtains the operating instructions based on the operating parameters and the environment type.
[0040] As based on <workdir>The tag obtains the path of the file to be parsed, based on <run>The tag obtains the command line, obtains the parsing parameters, and replaces the predefined parameters based on the command parameters such as IN a (input parameter a) and OUT b (output parameter b). For example, if the predefined parameter IN c is used, c is replaced with a to obtain the running parameters and running environment data; the environment type is obtained based on the environment tag, such as <flow>The tag determines that it is a process-based type.<container / apptainer / singularity / podman / docker:…> The tag determines that it is an isolated type. <local>The tag determines that it is a normalized type, and then obtains the running instructions based on the running parameters and environment type.
[0041] The specific steps of obtaining the operating instruction based on the operating parameters and the environment type include:
[0042] If the environment type is a process-based type, several first files are obtained based on the running parameters, the first script data in each of the first files is obtained, and the first script data is spliced based on the calling order of the first files to obtain the running instructions; if the file to be parsed contains multiple files, the first file is obtained through parameters such as file name or file path, and the script data in each first file is obtained with reference to the above-mentioned method of obtaining the running instructions, and they are spliced according to the calling order of the files, such as RUN:PRE, RUN and RUN:AFTER respectively represent first call, call and after call, so as to obtain the running instructions.
[0043] If the environment type is an isolated type, second script data of the isolated environment is generated, the operating parameters are compiled into third script data of the isolated environment, and the operating instructions are obtained based on the second script data and the third script data;<docker:container-name:image-name:…> The second script data of the Docker container is automatically generated for the operating environment settings, thereby realizing the automatic construction of the environment. Heredoc (a method of defining multi-line strings in PHP) is used to pass the operating parameters to be run into the docker exec container... command, and the operating parameters are recompiled into the third script data that can be run in the Docker container.
[0044] If the environment type is a normalized type, the operating instruction is obtained based on the operating parameters.
[0045] The process type means that a file contains the content or code of other files, that is, file inclusion.
[0046] Isolation type refers to the isolation between containers and between containers and host machines in terms of resource usage, file system, network, etc., ensuring that containers run in independent virtual environments, thereby ensuring the security and stability of container operation, such as Docker containers.
[0047] Normalized types refer to other environment types except process-based types and isolated types.
[0048] In this embodiment, the compiler can be written in programming languages such as Python, Java, C and C#, and is preferably written in Common Lisp, especially SBCL (Steel Bank Common Lisp) of Common Lisp.
[0049] Common Lisp is one of the many dialects of Lisp. It is a modern, multi-paradigm, high-performance and compilable standardized ANSI programming language. SBCL is a high-performance implementation of Common Lisp, known as the Ferrari 12 in Common Lisp implementation. SBCL not only provides a complete Lisp programming environment, but also has a powerful compiler and runtime system.
[0050] Writing in Common Lisp has the following advantages:
[0051] 1) Common Lisp's macro system is more powerful and flexible than almost any other programming language. It can create DSLs (domain-specific languages) or other advanced features in compilers and transport tools, and easily embed complex workflows and configurations into the code without introducing new interpretation or compilation layers. Macros can generate and transform code during the code compilation phase, thereby automatically generating complex code logic and reducing lengthy handwritten code;
[0052] 2) Common Lisp encourages modular, reusable code structures and has good support for functional programming. Through Lisp's flexible syntax and functional programming style, the core functions of compilers and transmission tools can be combined with modular design, allowing users to flexibly combine and expand functions. This is especially beneficial for workflow management systems because new functions or new modules can be added without changing the underlying code.
[0053] 3) Common Lisp has a built-in garbage collection mechanism, which provides convenience and stability for memory management. For workflow management systems that need to run for a long time and may process a large amount of data, the stability of garbage collection can avoid many memory leaks, which is very important for ensuring the robustness of the system;
[0054] 4) Common Lisp runs faster than Python and other languages, and its abstraction ability is higher than C / C++ and other languages. It can maintain high abstraction ability while ensuring running speed.
[0055] 5) Common Lisp has a situation handling system that other languages do not have. It can handle various situations and errors more robustly and interactively, which is a very important and advantageous advantage in DSL.
[0056] In this embodiment, the file to be parsed and the module file can be written in programming languages such as Python, Java, C and C#, preferably written in TAF language, and parsed into shell language by a compiler.
[0057] TAF file refers to the source code file of TAF, which is used to store TAF code in plain text form. The file contains functions, classes, variable definitions and execution logic, and is the main place for writing programs.
[0058] TAF is a DSL (Domain Specific Language) designed for terminal command line operations (Shell) to facilitate containerized work and process design and management. TAF is case-sensitive and indentation-insensitive. It is separated only by line breaks, and comments start with #. The grammatical structure of the language is a header system, with three layers of identifiers from top to bottom:
[0059] 1) Top-level identifier: located in the first line of each file and unique, used to annotate the taf file type (tool or workflow) and give a name, such as +TOOL:xxx / +FLOW:xxx;
[0060] 2) First-level identifier: such as LOAD / ARGS / RUN (RUN:PRE / RUN / RUN:AFTER), etc. LOAD is used to call TAF files, ARGS is used to set parameters, and RUN is used to set the running content. There can be only one first-level identifier in each file. If there are two, the first one takes precedence and all subsequent identifiers with the same name are ignored;
[0061] 3) Secondary identification: <xxx>, enclosed in angle brackets, the specific content and purpose depends on the first-level identifier, and the content and usage of different first-level identifiers are different. For example, the second-level identifier under LOAD is used to fill in the path or alias of the TAF file, which can be expressed as:
[0062] LOAD
[0063]
[0064] . / tools / a.taf;
[0065] The secondary identifier under ARGS is used to define the value of the variable, and the identifier supports cross-line parameters. The variable replacement uses ::xxx:: to call the parameter, and the call supports cross-file calls, such as using LOAD to call a.taf file in a taf file, and using As an alias of a.taf, you can use ::a:xxx:: to access the xxx variable in a.taf and replace the variable before running;
[0066] It also provides built-in environment variables to help developers quickly build taf workflow templates, such as ::*WORKDIR*:: indicates the current working path; ::*LOAD-DIR*:: indicates the path of the taf file being run; ::*CPUS*:: indicates the number of CPU threads on the current operating platform; ::*MAIN*:: is a variable with a built-in if command for quick tool building. If the user does not pass in parameters, then if=::else::. If there are parameters passed in and they start with -xxx, the official build method is used, if=::main::. If it does not start with -xxx, the user passes in a new command, which is passed in directly. 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] For example, the taf file mentioned above can be used in the following three ways:
[0077] (1) taf-blast: If the user does not pass in any parameters, ::else:: is called, which displays help;
[0078] (2) taf-blast—cmd blastn—in xxx—opts yyy: The user inputs parameters, and the command starts with —cmd, and runs by calling ::main::.
[0079] (3) taf-blast blastn xxx yyy…: The user inputs parameters that do not start with —xxx, and directly inputs blastnxxx yyy… to the position of ::*MAIN*::. RUN is the code of all the command parts that need to be executed in the taf file. RUN can be divided into three identifiers: RUN:PRE / RUN / RUN:AFTER, and the contents of RUN will be executed in this order. There are five main secondary identifiers of RUN:
[0080] 1) <local sh shell>: Corresponding to local shell code, you can write shell code under this mark, and this part of the shell code will be directly copied without modification during conversion;
[0081] 2)<container / apptainer / singularity / docker / podman:container-name:image-name(@...$...)> : Corresponding to the code running in containers such as apptainer, docker or podman, when the label is recognized, the available containers and images are automatically detected locally. If there are multiple containers and images 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 there is one, the corresponding container is 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 corresponding command after 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 in it, and replaces it with a shell command in pre-run, and then builds the flow process by writing a shell.
[0085] Using the TAF language, which is almost identical to Shell syntax, means that users no longer need to learn complex programming languages or master new technologies. For users, being familiar with Shell commands allows them to quickly build workflows, which can shorten the time for workflow development. This is especially true for bioinformaticians and researchers with non-programming backgrounds. Compared with Nextflow's Groovy language or Snakemake's complex rule definitions, the learning curve is greatly reduced.
[0086] Embodiment 2
[0087] On the basis of the first embodiment, in this embodiment, the parsing unit is further used to obtain a development workflow template, and the method of obtaining the development workflow template is:
[0088] The compiler obtains several second files of the 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 files to obtain development instructions; and obtains the development workflow template based on the development instructions.
[0089] If the module file includes four files: m, n, q and p, then based on <flow>Obtain the four files, refer to the method of obtaining the running instructions, and the compiler parses them to obtain the script data. According to the calling order, the script data is assembled to obtain the development instructions, and they are packaged into a module package to obtain the development workflow template.
[0090] Embodiment 3
[0091] Based on the above embodiment, in this embodiment, if the environment type is an isolated type, the parsing unit is further used to:
[0092] 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.
[0093] like<container / apptainer / singularity / docker / podman:container-name:image-name(@...$...)> For code running in containers such as apptainer, docker, or podman, when the container tag is used, the available container management software will be automatically detected on the current computer and installed in the order specified in the config configuration file or the default file. The first detected and existing container management software will be used. 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 available, the corresponding container will be used directly.
[0094] Embodiment 4
[0095] Based on the above embodiment, in this embodiment, if the environment type is a process-based type, the parsing unit is further used to:
[0096] 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.
[0097] For example, at any position in the taf file, you can use the pre-run parameter $$command$$ to wrap it, pre-run the script data in the shell, and use its output as the value corresponding to the script data. For example, you can use it in RUN- <local>Use $$taf-a–dry-run…$$, $$taf-b–dry-run…$$ to pre-call different taf files. Finally, embed the converted shell code into the current taf file, which can realize the fast construction process like writing shell and ensure that there is no environment conflict and other problems.
[0098] In a more preferred embodiment, the RUN <flow>Tags are optimized, and will automatically recognize "taf-xxx" and "taffish xxx.taf" commands, and replace them with corresponding shell texts after pre-running, without manually adding $$...$$; and provide <auto-flow>Tags, which are <flow>On the basis of , it will automatically identify and install the taf-xxx that appears, and run "taf install-n xxx" in advance, that is, automatically identify and install dependencies.
[0099] It only takes two steps to convert the original shell script into a taf script: (1) Add a taf header to the front of the original script and use <flow>or <auto-flow>Tag; (2) Add taf-xxx in front of all taf tools to adapt to the environment and build workflows with minimal time cost.
[0100] Embodiment 5
[0101] On the basis of the above embodiment, in this embodiment, the parsing unit is further used for:
[0102] The development workflow template is converted into an executable file, and the development workflow template is obtained based on the executable file. For example, PyInstaller is a popular Python code packaging tool that can package Python scripts into executable files.
[0103] You can directly install the xxx module using taf install xxx and other methods, and then directly call this module using taf-xxx, and you can also directly view the help and usage of this module using taf-xxx-h. This is more in line with the usage of the shell itself and reduces the learning cost.
[0104] Embodiment 6
[0105] On the basis of the above embodiment, in this embodiment, the system further includes a display unit, and the display unit is used for:
[0106] Acquire a connection relationship between a control of the canvas and the control, obtain control information based on the control, the control information includes file information, container information, template information and parameter information, and obtain an execution order based on the connection relationship;
[0107] The control information is parsed based on the compiler to obtain fourth script data, first parsing information is obtained based on the fourth script data and the execution order, and a first control parsing result is obtained based on the first parsing information.
[0108] For example, if the user drags controls of different categories on the front-end page and connects them with arrows, and then uploads the corresponding control information through the controls, the front-end will transmit the acquired control information and connection relationship to the back-end, refer to the way of obtaining the running instructions, the compiler will parse it, and then obtain the relationship between the files through the direction of the arrows, such as the order of calls, the inclusion relationship of the files, etc. According to the connection relationship, the parsed script data will be spliced to obtain the parsing 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 command parameters, and the control may include text boxes, buttons, check boxes, drop-down lists, file selections, pictures, labels, warning boxes, icons, search boxes, file downloads, and date selectors.
[0110] Embodiment 7
[0111] On the basis of the above embodiment, in this embodiment, the display unit is further used for:
[0112] Acquire a file image, obtain image information based on the file image, the image information including the number of image controls, the positions of image controls, the connection relationship of image controls and image text information, and obtain the category of image controls based on the image text information;
[0113] For example, based on image recognition technology and scanning technology, information such as controls and arrows on the file image can be obtained, the number of controls can be obtained based on the controls, the connection relationship can be obtained based on the arrows, the image origin can be customized, the coordinates of different spaces can be obtained, the control position can be obtained, and based on text recognition technology, the text information in the image frame can be obtained. If it is a file path, the corresponding recognition control category is a file selection control.
[0114] Based on the image information and the image control category, a control diagram is obtained; the control diagram is corrected to obtain a first corrected diagram; a control diagram is generated through the image information and the control category, and the user corrects the erroneous controls or connection relationships to obtain a corrected diagram.
[0115] Obtain input data, and parse the input data based on the compiler to obtain fifth script data; input corresponding data through controls, such as uploading a file to be parsed through a file selection control, and the compiler parses the file to obtain script data;
[0116] Based on the fifth script data and the first correction diagram, second parsing information is obtained, and based on the second parsing information, a second control parsing result is obtained. Based on the connection relationship of the correction diagram, the script data is spliced to obtain a parsing result.
[0117] Embodiment 8
[0118] On the basis of the above embodiment, in this embodiment, the system further includes a recommendation unit, and the recommendation unit is used to:
[0119] Acquire historical operation data of the user, obtain the template usage frequency based on the historical operation data, and obtain a first workflow template list based on the template usage frequency; for example, select the top ten workflow templates with the highest usage frequency within a month;
[0120] Obtain the predicted workflow template in the first workflow template list, and obtain the predicted file information of the predicted workflow template, wherein the predicted file information includes the predicted number of files, predicted file categories, predicted file relationships, predicted containers, and predicted parameters; in this embodiment, file categories include workflow files, containers, and charts, etc., predicted file relationships include execution order and file inclusion relationships, etc., and predicted parameters include command parameters, etc.
[0121] A prediction graph is obtained based on the prediction file information; the prediction graph is corrected to obtain a second corrected graph, and a third analysis result is obtained based on the second corrected graph.
[0122] Embodiment 9
[0123] On the basis of the above embodiment, in this embodiment, the display unit is further used for:
[0124] Acquire prediction control information of the prediction graph, wherein the prediction control information includes 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;
[0125] Based on the image control position and the predicted 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; if the origin is customized, the coordinates of each control are obtained, and the direction between the controls is obtained through the coordinates. For example, if the coordinates are used to determine that control A is directly below control B, the first similarity is obtained through this direction, that is, the same coordinate direction / all coordinate directions.
[0126] Based on the number of image controls and the number of predicted controls, a second similarity is obtained, such as the number of image controls / max(the number of image controls, the number of predicted controls);
[0127] Based on the image control category and the predicted control category, obtaining a third similarity, such as the number of same categories / all control categories;
[0128] Obtaining a third workflow template list based on the second similarity, the third similarity and the second workflow template list; if different weights are assigned, adding the second similarity and the third similarity, and then sorting the added values in descending order, and selecting a template within a preset range;
[0129] Based on the image control connection relationship and the prediction control connection relationship, a fourth similarity is obtained, such as the 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, templates are filtered to obtain a fourth workflow template list;
[0131] Based on the fourth workflow template list, a fourth parsing result is obtained. For example, after the user modifies the controls, connection relationships, etc. of the templates in the fourth workflow template list and uploads the relevant data, the compiler parses the data to obtain the fourth parsing result.
[0132] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0133] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations. < / 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 operation instruction and obtain a parsing result based on the operation instruction; the operation 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 the command parameters, and obtains operating parameters and operating environment data; The environment type is obtained based on the environment tag of the operating environment data, and the operating instruction is obtained based on the operating parameter and the environment type.
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 sequence of the first files to obtain the running instructions; If the environment type is an isolated type, generating second script data of an isolated environment, compiling the operating parameters into third script data of 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 used to obtain a development workflow template, and the method of obtaining the development workflow template is: 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 used for: 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 also used for: The development workflow template is converted into an execution file, and the development workflow template is obtained based on the execution file.
7. A workflow file parsing system according to claim 1, characterized in that: The system further comprises a display unit, wherein the display unit is configured to: Acquire a connection relationship between a control of the canvas and the control, obtain control information based on the control, the control information includes file information, container information, template information and parameter information, and obtain an execution order based on the connection relationship; The control information is parsed based on the compiler to obtain fourth script data, first parsing information is obtained based on the fourth script data and the execution order, and a first control parsing result is obtained based on the first parsing information.
8. A workflow file parsing system according to claim 7, characterized in that: The display unit is also used for: Acquire a file image, obtain image information based on the file image, the image information including the number of image controls, the positions of image controls, the connection relationship of image controls and image text information, and obtain the category of image controls based on the image text information; Based on the image information and the image control category, a control map is obtained; and the control map is corrected to obtain a first corrected map; Acquire input data, and parse the input data based on the compiler to obtain fifth script data; Based on the fifth script data and the first correction diagram, second parsing information is obtained, and based on the second parsing information, a second control parsing result is obtained.
9. A workflow file parsing system according to claim 8, characterized in that: The system further comprises a recommendation unit, wherein the recommendation unit is 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; Acquire the prediction workflow template of the first workflow template list, and acquire prediction file information of the prediction workflow template, wherein the prediction file information includes the prediction file quantity, prediction file category, prediction file relationship, prediction container and prediction parameters; A prediction graph is obtained based on the prediction file information; the prediction graph is corrected to obtain a second corrected graph, and a third analysis result is obtained based on the second corrected graph.
10. A workflow file parsing system according to claim 9, characterized in that: The display unit is also used for: Acquire prediction control information of the prediction graph, wherein the prediction control information includes 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; Based on the image control position and the predicted 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; Based on the number of image controls and the number of predicted controls, a second similarity is obtained; based on the image control category and the predicted control category, 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; Based on the image control connection relationship and the prediction control connection relationship, a fourth similarity is obtained, and based on the fourth similarity and the third workflow template list, a fourth workflow template list is obtained; Based on the fourth workflow template list, a fourth parsing result is obtained.
Citation Information
Patent Citations
Processing method and device of command line program
CN105373386A
Text tagging method based on artificial intelligence, electronic device and storage medium
CN111639480A
Heterogeneous system-oriented aero-engine integrated simulation workflow engine system
CN115906499A
Cross-border e-commerce client management system based on page intelligent configuration
CN117149197A
Data processing method and device
CN117707398A