CN117149175A - Graphical display method, device, equipment and medium for YAML construction - Google Patents

Graphical display method, device, equipment and medium for YAML construction Download PDF

Info

Publication number
CN117149175A
CN117149175A CN202311422847.4A CN202311422847A CN117149175A CN 117149175 A CN117149175 A CN 117149175A CN 202311422847 A CN202311422847 A CN 202311422847A CN 117149175 A CN117149175 A CN 117149175A
Authority
CN
China
Prior art keywords
task
information
tasks
view information
yaml
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311422847.4A
Other languages
Chinese (zh)
Other versions
CN117149175B (en
Inventor
马瑞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Ling Skylark Technology Co ltd
Original Assignee
Beijing Ling Skylark Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Ling Skylark Technology Co ltd filed Critical Beijing Ling Skylark Technology Co ltd
Priority to CN202311422847.4A priority Critical patent/CN117149175B/en
Publication of CN117149175A publication Critical patent/CN117149175A/en
Application granted granted Critical
Publication of CN117149175B publication Critical patent/CN117149175B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application provides a graphical display method, a device, equipment and a medium for YAML construction, wherein the method comprises the following steps: acquiring source data, and converting the source data to obtain data to be constructed, wherein the source data is in a YAML format, the source data comprises at least one task, and each task in the at least one task corresponds to node information; the data to be constructed is in JSON format; acquiring node information corresponding to each task from data to be constructed, and determining view information of each task according to the node information corresponding to each task; and displaying view information of each task, wherein the view information comprises a graphic identifier, and the node information is displayed through the graphic identifier. The application can more intuitively see the errors of continuous construction and arrangement, layout and dependency relationship, and can switch to yaml for advanced configuration under the condition that the graphics are not satisfied.

Description

Graphical display method, device, equipment and medium for YAML construction
Technical Field
The application relates to the technical field of data processing, in particular to a graphical display method, device, equipment and medium for YAML construction.
Background
Existing persistent constructs can only be pipelined by writing yaml. The creator cannot perform UI visualization orchestration, viewing, etc. for the entire continuous build process. The dependency relationship of each task in the arrangement can not be intuitively seen, the serial and parallel relationship is a circular dependency problem, and the dependent task is present. And may switch to yaml presentation for completing the orchestration of some advanced options if the UI is still less sophisticated.
The current industry cannot make circular dependency on the graphical solution, determine error dependency and give reasonable layout. Smooth switching cannot be performed in two modes of graphical arrangement and yaml editing.
Disclosure of Invention
In view of the above, the embodiment of the application provides a graphical display method, a device, equipment and a medium for YAML construction, which can more intuitively see errors, layouts and dependency relations of continuous construction and arrangement, and can switch to YAML for advanced configuration under the condition that the graphics are not satisfied.
The technical scheme of the embodiment of the application is realized as follows:
in a first aspect, an embodiment of the present application provides a patterned display method for YAML construction, including the following steps:
acquiring source data, and converting the source data to obtain data to be constructed, wherein the source data is in a YAML format, the source data comprises at least one task, and each task in the at least one task corresponds to node information; the data to be constructed is in a JSON format;
acquiring node information corresponding to each task from the data to be constructed, and determining view information of each task according to the node information corresponding to each task;
and displaying the view information of each task, wherein the view information comprises a graphic identifier, and the node information is displayed through the graphic identifier.
In a second aspect, embodiments of the present application further provide a patterned display device constructed by YAML, the device comprising:
the system comprises an acquisition module, a conversion module and a storage module, wherein the acquisition module is used for acquiring source data and converting the source data to obtain data to be constructed, the source data is in a YAML format and comprises at least one task, and each task in the at least one task corresponds to node information; the data to be constructed is in a JSON format;
the determining module is used for acquiring the node information corresponding to each task from the data to be constructed and determining the view information of each task according to the node information corresponding to each task;
and the display module is used for displaying the view information of each task, wherein the view information comprises a graphic identifier, and the node information is displayed through the graphic identifier.
In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor, a storage medium, and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor in communication with the storage medium via the bus when the electronic device is running, the processor executing the machine-readable instructions to perform the YAML-constructed graphical presentation method of any of the first aspects.
In a fourth aspect, embodiments of the present application further provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the graphical presentation method of YAML construction of any of the first aspects.
The embodiment of the application has the following beneficial effects:
the source data in the YAML format is obtained, then the source data is converted to obtain data to be constructed in the JSON format, so that node information corresponding to each task can be obtained from the data to be constructed based on the data to be constructed in the JSON format, view information of each task is determined according to the node information corresponding to each task, the view information of each task is displayed, the node information is displayed through a graph mark, errors, layout and dependency of continuous construction and arrangement can be more intuitively seen, and in addition, the graph and YAML can be freely switched in a graph-JSON-YAML mode, and can be switched to YAML for advanced configuration under the condition that the graph is not satisfied.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of steps S101-S103 provided in an embodiment of the present application;
FIG. 2 is a YAML interface diagram provided by an embodiment of the present application;
FIG. 3 is a graphical interface diagram provided in accordance with one embodiment of the present application;
FIG. 4 is a second graphical interface diagram provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of a sequencing scheme provided by an embodiment of the present application;
FIG. 6 is a third graphical interface diagram provided by an embodiment of the present application;
FIG. 7 is a schematic diagram of a graphical display device constructed by YAML according to an embodiment of the present application;
fig. 8 is a schematic diagram of a composition structure of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are for the purpose of illustration and description only and are not intended to limit the scope of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. A flowchart, as used in this disclosure, illustrates operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be implemented out of order and that steps without logical context may be performed in reverse order or concurrently. Moreover, one or more other operations may be added to or removed from the flow diagrams by those skilled in the art under the direction of the present disclosure.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is to be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with one another without conflict.
In addition, the described embodiments are only some, but not all, embodiments of the application. The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present application.
In the following description, the terms "first", "second", "third" and the like are merely used to distinguish similar objects and do not represent a particular ordering of the objects, it being understood that the "first", "second", "third" may be interchanged with a particular order or sequence, as permitted, to enable embodiments of the application described herein to be practiced otherwise than as illustrated or described herein.
It should be noted that the term "comprising" will be used in embodiments of the application to indicate the presence of the features stated hereafter, but not to exclude the addition of other features.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the application and is not intended to be limiting of the application.
Referring to fig. 1, fig. 1 is a schematic flow chart of steps S101 to S103 of a patterned display method for YAML construction according to an embodiment of the present application, and will be described with reference to steps S101 to S103 shown in fig. 1.
In step S101, source data is obtained, and conversion processing is performed on the source data to obtain data to be constructed, where the source data is in YAML format, the source data includes at least one task, and each task in the at least one task corresponds to node information; the data to be constructed is in a JSON format;
in step S102, node information corresponding to each task is obtained from the data to be constructed, and view information of each task is determined according to the node information corresponding to each task;
in step S103, view information of each task is displayed, where the view information includes a graphic identifier, and the node information is displayed through the graphic identifier.
By way of example, as shown in fig. 2, fig. 2 is a YAML interface diagram provided by an embodiment of the present application, where the system provides a YAML input interface, and the YAML input interface is displayed by clicking on "YAML" in a "graphical |yaml" button in the upper right corner, and a user may input source data in YAML format, where the input mode may be copy-and-paste, or may be imported through a "import" button in the interface.
After importing the source data in the YAML format, the system converts the source data in the YAML format into JSON format for generating view information.
As shown in fig. 3, fig. 3 is one of the graphical interface diagrams provided in the embodiment of the present application, because the YAML source data includes node information corresponding to each task, after the YAML source data is converted into JSON, the system may acquire the node information of each task and perform corresponding processing. For example, three tasks are included in the source data in the YAML format, the percentages are dd, da and bc, da depends on the execution result of dd, bc depends on the execution result of da (dependency relationship is recorded in YAML), and then the view information of each task can be visually displayed through the graphic identifier, that is, the graph is composed of the task dd→the task da→the task bc.
In some embodiments, determining the one-dimensional view information for the each task and the two-dimensional view information for the each task; wherein the one-dimensional view information characterizes tasks performed by each stage, and the two-dimensional view information characterizes orchestration layout information of the at least one task.
For example, referring to fig. 4, fig. 4 is a graphical interface diagram provided by the embodiment of the present application, and as shown in fig. 4, one-dimensional display is similar to navigation for fast browsing task execution information of each stage, but one-dimensional display has a problem that it is impossible to know which tasks are parallel and which tasks are serial. The two-dimensional display well displays the layout of task arrangement, such as unit-test is parallel to build-app, and no dependency relationship exists between the unit-test and the build-app, and build-image is serial and the latter depends on the task output of the former task. And meanwhile, the display of task details, execution records and the like can be added to the two-dimensional data.
For one-dimensional display and two-dimensional display, corresponding sequencing is needed, so that the arrangement is more reasonable. Specifically:
for one-dimensional presentation, in some embodiments, each task corresponds to an incorrectness information and a dependency information, the incorrectness information indicates an execution sequence of the task, the dependency information indicates that at least one dependency line exists in the task, and determining the one-dimensional view information of each task includes:
acquiring a task with the degree information of 0 in the at least one task, and taking each task with the degree information of 0 as a starting point of a task queue;
acquiring the rest tasks in each task queue according to the dependency information;
and determining the execution sequence of the tasks in each task queue according to the degree information of the remaining tasks in each task queue.
With continued reference to fig. 4, a one-dimensional display is that tasks with an entry degree of 0 need to be found among all tasks, where the tasks with an entry degree of 0 represent tasks that are executed immediately, for example, a gate-clone task, a build-app task, and a unit-test task with an entry degree of 0, then the three tasks can be used as a start point of a task queue, then dependent tasks are found through the tasks that are executed immediately, for example, a build-app task is followed by a preparation task and a nodes-build task, the entry degree of the preparation task is 1, the entry degree of the nodes-build task is 2, the entry degree of the preparation task and the nodes-build task is respectively-1, the entry degree of the preparation task is 0, the entry degree of the nodes-build task is 1, then the task that is executed later is the preparation task, then the nodes-build task with an entry degree of-1, and the third task that is the nodes-build task.
For two-dimensional presentation, in some embodiments, each task corresponds to an incorrectness information and a dependency information, where the incorrectness information characterizes an execution sequence of the task, the dependency information characterizes that at least one dependency line exists in the task, and determining the two-dimensional view information of each task includes:
acquiring a task with the degree information of 0 in the at least one task, and taking all the tasks with the degree information of 0 as current batch tasks;
according to the dependency information, obtaining a dependency task which depends on the current batch of tasks in the rest tasks, and modifying the degree information of the dependency task; wherein the modification processing includes subtracting a product of 1 and the number of dependent lines from the incorrectness information of the dependent task;
and taking the task with the degree information of 0 in the dependent tasks as a next batch of tasks, and continuing the modification processing on the degree information of the rest tasks until the rest tasks do not exist.
Here, the concept of a batch is introduced, and again, all tasks with an incore of 0 are found first, each task with an incore of 0 being a batch, but for two-dimensional presentation it is also considered that some tasks may have more than one dependency line, e.g. a→b, c→d, whereas E depends on B and D, E have two-hop dependency lines. In this case, one-dimensional presentation is not considered because E is repeatedly displayed only in two-hop dependency lines, but is not performed for two-dimensional presentation because E can be displayed only once and such dependency relationships need to be marked. Therefore, when calculating, the product of '1 and the number of the dependent lines' is subtracted in the subsequent task input degree calculation, and the two-dimensional view information can be obtained without the residual task of paper by sequentially processing.
In some embodiments, the method further comprises:
determining a first weight of each task in the current batch of tasks for the current batch of tasks, wherein the first weight is determined based on an index of each task;
based on the first weight, performing first sorting processing on each task in the current batch of tasks;
for the next batch of tasks, determining a second weight for each task in the next batch of tasks, wherein the second weight is determined based on the first weight of the parent node of the task;
and carrying out second sorting processing on each task in the next batch of tasks based on the second weight.
For two-dimensional ordering, a two-dimensional number array is obtained through machine processing, and each row in the two-dimensional data represents the batch which is zero at the same time when the degree of entry is calculated. While the rows represent dependency lines. Referring to fig. 5, fig. 5 is a schematic diagram of ordering provided by the embodiment of the present application, as shown in fig. 5, the nodes 1, 2, 3,1 executed for the first time are finally obtained, and therefore, a virtual node v,4 depends on 2,5 depends on 3. However, in the actual calculation, 4,5 are not calculated in order, in other words, in the calculation above, only in the calculation of which of the second columns is 0 (4 and 5), but when the two-dimensional array is put again, 4 and 5 are not known about the specific order, but are put at will, which results in that 2 may not be 4 and 3 may not be 5.
The purpose of putting the corresponding nodes in the corresponding positions is to know the drawing positions of the graphical interface, each grid in the array is actually at the position corresponding to each task in fig. 4, if the positions of 4 and 5 are reversed, the arrows will be staggered when drawing, the look and feel of the user is affected, after the approximate positions are known, the lines of the arrows are flatter when the arrows are connected, and the staggering is avoided.
For a specific sorting process, the first column in the array is determined by an index, the weight can be index+1 of each element in the column, the sequence of the first column is fixed, and for the later column, all father of the first column are found, and the father with the smallest index is taken; the parent weight 10 plus the weight in the current loop is set to the weight for that element; rendering the orchestration UI according to the two-dimensional data by elements in the weight row sequence uses anglarngfor rendering the two-dimensional array. Each node sets a specific node ID to generate link data between nodes by traversing the orchestration task list.
In some embodiments, the displaying the view information of each task includes:
displaying the two-dimensional view information of each task;
the displaying the two-dimensional view information of each task comprises the following steps:
according to the first sequencing result of the first sequencing process, longitudinally and sequentially displaying each task in the current batch of tasks, and according to the second sequencing result of the second sequencing process, longitudinally and sequentially displaying each task in the next batch of tasks, so that each task in the next batch of tasks is close to the task with a dependency relationship in the previous batch of tasks; wherein the tasks of the dependency relationship indicate the execution order by arrows.
Here, after the sorting, the sorted tasks can be connected, and for the connection with the arrow with the dependency relationship, as the sorting is already performed, more lines are not staggered in the process of connecting.
In some embodiments, the method further comprises:
performing first adjustment processing on the view information of each task in response to a first modification operation on the source data;
or, in response to a second modification operation for the view information, performing a second adjustment process on the task corresponding to the modified view information.
Referring to fig. 6, fig. 6 is a third graphical interface diagram provided by the embodiment of the present application, each task may display detailed information such as a task name, an execution sequence, and a parameter configuration by clicking and opening a detailed page, where, in the page, we may modify the name or modify the parameter, and after modification, the system will automatically adjust the YAML source data according to the modification.
Likewise, the present application also supports real-time modification to patterning by YAML, both of which can be mutually tuned.
In some embodiments, the method further comprises:
when an abnormal task exists in the at least one task, acquiring node information of the abnormal task, and analyzing and processing the node information of the abnormal task to obtain an abnormal reason;
and displaying the abnormality cause in view information of the abnormal task.
For example, referring to fig. 6, three tasks of build-app, build-image and image-scan have errors, the system has no connection arrow, and abnormal information appears, which suggests that there is a closed-loop dependency between build-app, build-image and image-scan, and the association relationship is updated. And, for some errors, such as name errors and parameter errors, the system can report errors and display the reasons of the abnormality.
In some embodiments, the view information includes a progress identifier, where the progress identifier characterizes a progress of the task, and the view information of each task is displayed, including:
and displaying the construction progress of YAML construction in real time through the progress mark.
Here, the progress mark may be a color change, for example, a task that has been completed may be indicated as a color a, a task that has not been completed may be displayed by a color B, and the color change may be changed according to the execution progress, for example, when execution is to 50%, half of the task frame is rendered, and when execution of the task is completed, the entire task frame is color-rendered.
In summary, the embodiment of the application has the following beneficial effects:
the source data in the YAML format is obtained, then the source data is converted to obtain data to be constructed in the JSON format, so that node information corresponding to each task can be obtained from the data to be constructed based on the data to be constructed in the JSON format, view information of each task is determined according to the node information corresponding to each task, the view information of each task is displayed, the node information is displayed through a graph mark, errors, layout and dependency of continuous construction and arrangement can be more intuitively seen, and in addition, the graph and YAML can be freely switched in a graph-JSON-YAML mode, and can be switched to YAML for advanced configuration under the condition that the graph is not satisfied.
Based on the same inventive concept, the embodiment of the application also provides a patterned display device of YAML construction corresponding to the patterned display method of YAML construction in the first embodiment, and because the principle of solving the problem of the device in the embodiment of the application is similar to that of the patterned display method of YAML construction, the implementation of the device can refer to the implementation of the method, and the repetition is omitted.
Fig. 7 is a schematic structural diagram of a YAML structured graphic display device 700 according to an embodiment of the present application. The YAML structured graphical display 700 comprises:
the obtaining module 701 is configured to obtain source data, and convert the source data to obtain data to be constructed, where the source data is in a YAML format, the source data includes at least one task, and each task in the at least one task corresponds to node information; the data to be constructed is in a JSON format;
a determining module 702, configured to obtain node information corresponding to each task from the data to be constructed, and determine view information of each task according to the node information corresponding to each task;
and the display module 703 is configured to display view information of each task, where the view information includes a graphic identifier, and the node information is displayed through the graphic identifier.
Those skilled in the art will appreciate that the implementation of the functions of the elements in the YAML structured graphical display 700 shown in FIG. 7 can be understood with reference to the preceding description of the graphical display method of the YAML structure. The functionality of the various elements in the YAML-structured graphical display 700 shown in fig. 7 may be implemented by programs running on a processor, or by specific logic circuits.
In a possible implementation manner, the view information includes one-dimensional view information and two-dimensional view information, and the determining module 702 determines the view information of each task, including:
determining the one-dimensional view information of each task and the two-dimensional view information of each task; wherein the one-dimensional view information characterizes tasks performed by each stage, and the two-dimensional view information characterizes orchestration layout information of the at least one task.
In one possible implementation manner, each task corresponds to an incidence information and a dependency information, the incidence information indicates an execution sequence of the task, the dependency information indicates that at least one dependency line exists in the task, and the determining module 702 determines the one-dimensional view information of each task includes:
acquiring a task with the degree information of 0 in the at least one task, and taking each task with the degree information of 0 as a starting point of a task queue;
acquiring the rest tasks in each task queue according to the dependency information;
and determining the execution sequence of the tasks in each task queue according to the degree information of the remaining tasks in each task queue.
In one possible implementation manner, each task corresponds to an incorrectness information and a dependency information, the incorrectness information indicates an execution sequence of the task, the dependency information indicates that at least one dependency line exists in the task, and the determining module 702 determines the two-dimensional view information of each task, and includes:
acquiring a task with the degree information of 0 in the at least one task, and taking all the tasks with the degree information of 0 as current batch tasks;
according to the dependency information, obtaining a dependency task which depends on the current batch of tasks in the rest tasks, and modifying the degree information of the dependency task; wherein the modification processing includes subtracting a product of 1 and the number of dependent lines from the incorrectness information of the dependent task;
and taking the task with the degree information of 0 in the dependent tasks as a next batch of tasks, and continuing the modification processing on the degree information of the rest tasks until the rest tasks do not exist.
In one possible implementation, the determining module 702 further includes:
determining a first weight of each task in the current batch of tasks for the current batch of tasks, wherein the first weight is determined based on an index of each task;
based on the first weight, performing first sorting processing on each task in the current batch of tasks;
for the next batch of tasks, determining a second weight for each task in the next batch of tasks, wherein the second weight is determined based on the first weight of the parent node of the task;
and carrying out second sorting processing on each task in the next batch of tasks based on the second weight.
In a possible implementation manner, the display module 703 displays view information of each task, including:
displaying the two-dimensional view information of each task;
the displaying the two-dimensional view information of each task comprises the following steps:
according to the first sequencing result of the first sequencing process, longitudinally and sequentially displaying each task in the current batch of tasks, and according to the second sequencing result of the second sequencing process, longitudinally and sequentially displaying each task in the next batch of tasks, so that each task in the next batch of tasks is close to the task with a dependency relationship in the previous batch of tasks; wherein the tasks of the dependency relationship indicate the execution order by arrows.
In one possible implementation, the display module 703 further includes:
performing first adjustment processing on the view information of each task in response to a first modification operation on the source data;
or, in response to a second modification operation for the view information, performing a second adjustment process on the task corresponding to the modified view information.
In one possible implementation, the display module 703 further includes:
when an abnormal task exists in the at least one task, acquiring node information of the abnormal task, and analyzing and processing the node information of the abnormal task to obtain an abnormal reason;
and displaying the abnormality cause in view information of the abnormal task.
In one possible implementation, the view information includes a progress identifier, where the progress identifier characterizes the execution progress of the task, and the display module 703 displays the view information of each task, including:
and displaying the construction progress of YAML construction in real time through the progress mark.
According to the graphical display device constructed by the YAML, the source data in the YAML format is obtained, and then the source data is converted to obtain the data to be constructed in the JSON format, so that node information corresponding to each task can be obtained from the data to be constructed based on the data to be constructed in the JSON format, the view information of each task is determined according to the node information corresponding to each task, the view information of each task is displayed, the node information is displayed through the graphical identification, errors, layouts and dependency relations of continuous construction and arrangement can be more intuitively seen, and the graphical and the YAML can be freely switched in a graphical-JSON-YAML mode, so that the graphical configuration can be switched to the YAML for advanced configuration under the condition that the graphical configuration is not satisfied.
As shown in fig. 8, fig. 8 is a schematic diagram of a composition structure of an electronic device 800 according to an embodiment of the present application, where the electronic device 800 includes:
the device comprises a processor 801, a storage medium 802 and a bus 803, wherein the storage medium 802 stores machine-readable instructions executable by the processor 801, when the electronic device 800 is running, the processor 801 communicates with the storage medium 802 through the bus 803, and the processor 801 executes the machine-readable instructions to execute the steps of the graphical presentation method constructed by YAML according to the embodiment of the application.
In actual use, the various components of the electronic device 800 are coupled together via the bus 803. It is understood that bus 803 is used to enable connected communications between these components. The bus 803 includes a power bus, a control bus, and a status signal bus in addition to the data bus. But for clarity of illustration the various buses are labeled as bus 803 in fig. 8.
According to the electronic equipment, the source data in the YAML format is obtained, and then the source data is converted to obtain the data to be constructed in the JSON format, so that node information corresponding to each task can be obtained from the data to be constructed based on the data to be constructed in the JSON format, view information of each task is determined according to the node information corresponding to each task, the view information of each task is displayed, the node information is displayed through the graph identification, errors, layouts and dependency relations of continuous construction and arrangement can be seen more intuitively, and the graph and the YAML can be switched freely in a graph-JSON-YAML mode, so that the graph can be switched to the YAML for advanced configuration under the condition that the graph is not satisfied.
The embodiment of the application also provides a computer readable storage medium, wherein the storage medium stores executable instructions, and when the executable instructions are executed by the at least one processor 801, the graphical presentation method of YAML construction according to the embodiment of the application is realized.
In some embodiments, the storage medium may be a magnetic random Access Memory (FRAM, ferromagneticRandom Access Memory), read Only Memory (ROM), programmable Read Only Memory (PROM, programmable Read-Only Memory), erasable programmable Read Only Memory (EPROM, erasableProgrammable Read-Only Memory), electrically erasable programmable Read Only Memory (EEPROM, electricallyErasable Programmable Read-Only Memory), flash Memory (Flash Memory), magnetic surface Memory, optical disk, or compact disk Read Only Memory (CD-ROM, compact Disc Read-Only Memory), or the like; but may be a variety of devices including one or any combination of the above memories.
In some embodiments, the executable instructions may be in the form of programs, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and they may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.
As an example, the executable instructions may, but need not, correspond to files in a file system, may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a hypertext markup Language (HTML, hyperTextMarkup Language) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code).
As an example, executable instructions may be deployed to be executed on one computing device or on multiple computing devices located at one site or, alternatively, distributed across multiple sites and interconnected by a communication network.
According to the computer readable storage medium, the source data in the YAML format is obtained, and then the source data is converted to obtain the data to be constructed in the JSON format, so that node information corresponding to each task can be obtained from the data to be constructed based on the data to be constructed in the JSON format, view information of each task is determined according to the node information corresponding to each task, view information of each task is displayed, the node information is displayed through the graph identification, errors, layouts and dependency relations of continuous construction and arrangement can be more intuitively seen, and the graph and the YAML can be freely switched in a graph-JSON-YAML mode, and can be switched to a YAML for advanced configuration under the condition that the graph is not satisfied.
In the several embodiments provided in the present application, it should be understood that the disclosed method and electronic device may be implemented in other manners. The above described device embodiments are only illustrative, e.g. the division of the units is only one logical function division, and there may be other divisions in practice, such as: multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. In addition, the various components shown or discussed may be coupled or directly coupled or communicatively coupled to each other via some interface, whether indirectly coupled or communicatively coupled to devices or units, whether electrically, mechanically, or otherwise.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a platform server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily appreciate variations or alternatives within the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (10)

1. A patterned presentation method of YAML construction, the method comprising:
acquiring source data, and converting the source data to obtain data to be constructed, wherein the source data is in a YAML format, the source data comprises at least one task, and each task in the at least one task corresponds to node information; the data to be constructed is in a JSON format;
acquiring node information corresponding to each task from the data to be constructed, and determining view information of each task according to the node information corresponding to each task;
and displaying the view information of each task, wherein the view information comprises a graphic identifier, and the node information is displayed through the graphic identifier.
2. The method of claim 1, wherein the view information includes one-dimensional view information and two-dimensional view information, and wherein the determining the view information for each task includes:
determining the one-dimensional view information of each task and the two-dimensional view information of each task; wherein the one-dimensional view information characterizes tasks performed by each stage, and the two-dimensional view information characterizes orchestration layout information of the at least one task.
3. The method according to claim 2, wherein each task corresponds to an incorrectness information and a dependency information, the incorrectness information indicating an execution order of the task, the dependency information indicating that at least one dependency line exists in the task, and determining the one-dimensional view information of each task includes:
acquiring a task with the degree information of 0 in the at least one task, and taking each task with the degree information of 0 as a starting point of a task queue;
acquiring the rest tasks in each task queue according to the dependency information;
and determining the execution sequence of the tasks in each task queue according to the degree information of the remaining tasks in each task queue.
4. The method according to claim 2, wherein each task corresponds to an incorrectness information and a dependency information, the incorrectness information indicating an execution order of the task, the dependency information indicating that at least one dependency line exists in the task, and determining the two-dimensional view information of each task includes:
acquiring a task with the degree information of 0 in the at least one task, and taking all the tasks with the degree information of 0 as current batch tasks;
according to the dependency information, obtaining a dependency task which depends on the current batch of tasks in the rest tasks, and modifying the degree information of the dependency task; wherein the modification processing includes subtracting a product of 1 and the number of dependent lines from the incorrectness information of the dependent task;
and taking the task with the degree information of 0 in the dependent tasks as a next batch of tasks, and continuing the modification processing on the degree information of the rest tasks until the rest tasks do not exist.
5. The method according to claim 4, wherein the method further comprises:
determining a first weight of each task in the current batch of tasks for the current batch of tasks, wherein the first weight is determined based on an index of each task;
based on the first weight, performing first sorting processing on each task in the current batch of tasks;
for the next batch of tasks, determining a second weight for each task in the next batch of tasks, wherein the second weight is determined based on the first weight of the parent node of the task;
and carrying out second sorting processing on each task in the next batch of tasks based on the second weight.
6. The method of claim 5, wherein displaying the view information of each task comprises:
displaying the two-dimensional view information of each task;
the displaying the two-dimensional view information of each task comprises the following steps:
according to the first sequencing result of the first sequencing process, longitudinally and sequentially displaying each task in the current batch of tasks, and according to the second sequencing result of the second sequencing process, longitudinally and sequentially displaying each task in the next batch of tasks, so that each task in the next batch of tasks is close to the task with a dependency relationship in the previous batch of tasks; wherein the tasks of the dependency relationship indicate the execution order by arrows.
7. The method according to claim 1, wherein the method further comprises:
performing first adjustment processing on the view information of each task in response to a first modification operation on the source data;
or, in response to a second modification operation for the view information, performing a second adjustment process on the task corresponding to the modified view information.
8. The method according to claim 1, wherein the method further comprises:
when an abnormal task exists in the at least one task, acquiring node information of the abnormal task, and analyzing and processing the node information of the abnormal task to obtain an abnormal reason;
and displaying the abnormality cause in view information of the abnormal task.
9. The method of claim 1, wherein the view information includes a progress marker, the progress marker characterizing progress of execution of the task, displaying the view information of each task, comprising:
and displaying the construction progress of YAML construction in real time through the progress mark.
10. A YAML structured graphic display device, the device comprising:
the system comprises an acquisition module, a conversion module and a storage module, wherein the acquisition module is used for acquiring source data and converting the source data to obtain data to be constructed, the source data is in a YAML format and comprises at least one task, and each task in the at least one task corresponds to node information; the data to be constructed is in a JSON format;
the determining module is used for acquiring the node information corresponding to each task from the data to be constructed and determining the view information of each task according to the node information corresponding to each task;
and the display module is used for displaying the view information of each task, wherein the view information comprises a graphic identifier, and the node information is displayed through the graphic identifier.
CN202311422847.4A 2023-10-31 2023-10-31 Graphical display method, device, equipment and medium for YAML construction Active CN117149175B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311422847.4A CN117149175B (en) 2023-10-31 2023-10-31 Graphical display method, device, equipment and medium for YAML construction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311422847.4A CN117149175B (en) 2023-10-31 2023-10-31 Graphical display method, device, equipment and medium for YAML construction

Publications (2)

Publication Number Publication Date
CN117149175A true CN117149175A (en) 2023-12-01
CN117149175B CN117149175B (en) 2024-01-19

Family

ID=88906572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311422847.4A Active CN117149175B (en) 2023-10-31 2023-10-31 Graphical display method, device, equipment and medium for YAML construction

Country Status (1)

Country Link
CN (1) CN117149175B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109240679A (en) * 2018-07-24 2019-01-18 阿里巴巴集团控股有限公司 The graphic method and device of script file
CN111522543A (en) * 2020-04-16 2020-08-11 科大国创云网科技有限公司 Visual application component arrangement method and system
US20230117114A1 (en) * 2021-10-19 2023-04-20 Foundation Of Soongsil University Industry Cooperation Method and apparatus for managing a yaml file for kubernetes
CN116956825A (en) * 2023-06-21 2023-10-27 超聚变数字技术有限公司 Form conversion method and server

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109240679A (en) * 2018-07-24 2019-01-18 阿里巴巴集团控股有限公司 The graphic method and device of script file
CN111522543A (en) * 2020-04-16 2020-08-11 科大国创云网科技有限公司 Visual application component arrangement method and system
US20230117114A1 (en) * 2021-10-19 2023-04-20 Foundation Of Soongsil University Industry Cooperation Method and apparatus for managing a yaml file for kubernetes
CN116956825A (en) * 2023-06-21 2023-10-27 超聚变数字技术有限公司 Form conversion method and server

Also Published As

Publication number Publication date
CN117149175B (en) 2024-01-19

Similar Documents

Publication Publication Date Title
CN110232162B (en) HTML 5-based flow definition method and system
US20150095811A1 (en) Context aware user interface parts
CN112416339A (en) Page development method and device and computer equipment
CN104823158B (en) Method and system for simplified knowledge engineering
JP2012508934A5 (en)
US8656358B2 (en) Plant control system and interlock factor specifying method
CN112632936A (en) Electronic form generation method, system and related device
Zhang et al. Analyzing data flow diagrams by combination of formal methods and visualization techniques
JP6310527B1 (en) Object analysis apparatus, object analysis method, and program
JP5508078B2 (en) Program creation support apparatus and method, and program
WO2013112388A1 (en) Graphical representation of an order of operations
CN117149175B (en) Graphical display method, device, equipment and medium for YAML construction
CN111079933B (en) Quantum circuit graphical display method, system, storage medium and electronic device
US10282398B1 (en) Editing tool for domain-specific objects with reference variables corresponding to preceding pages
KR101498877B1 (en) Program-producing device and image control system
JP2012168900A (en) Programming device and program
JP4629183B2 (en) Requirement specification description support apparatus and method, and recording medium
CN109710369B (en) full-graphical user interface display method and device
CN113849257A (en) Page processing method, device, medium and electronic equipment
JP2018055389A (en) Program creation support method
Zheng et al. Visualization linter
JP2003108405A (en) Device and program for supporting preparation of test specification
CN115587269A (en) Method and device for generating H5 page of client
CN110637522B (en) Control law gain model automatic generation method and system
CN116579740A (en) Data processing method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant