CN116048480B - Method and device for automatically generating chart based on code tool - Google Patents

Method and device for automatically generating chart based on code tool Download PDF

Info

Publication number
CN116048480B
CN116048480B CN202310349039.3A CN202310349039A CN116048480B CN 116048480 B CN116048480 B CN 116048480B CN 202310349039 A CN202310349039 A CN 202310349039A CN 116048480 B CN116048480 B CN 116048480B
Authority
CN
China
Prior art keywords
program
current
chart
template
target data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310349039.3A
Other languages
Chinese (zh)
Other versions
CN116048480A (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.)
Qingdao Purisheng Pharmaceutical Technology Co ltd
Original Assignee
Qingdao Purisheng Pharmaceutical 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 Qingdao Purisheng Pharmaceutical Technology Co ltd filed Critical Qingdao Purisheng Pharmaceutical Technology Co ltd
Priority to CN202310349039.3A priority Critical patent/CN116048480B/en
Publication of CN116048480A publication Critical patent/CN116048480A/en
Application granted granted Critical
Publication of CN116048480B publication Critical patent/CN116048480B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • 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
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The invention discloses a method and a device for automatically generating a chart based on a code tool, belonging to the technical field of computers; the method is applied to a first device, and one embodiment of the method at least comprises the following steps: firstly, determining a current program template and a current chart configuration condition corresponding to target data based on a chart generation request of a user for the target data; secondly, determining a current quasi program based on the current program template and the current chart configuration conditions; then, calling a third party application to execute a flow corresponding to the chart generation request based on the current quasi program; and finally, displaying the graph result generated in the execution result. Therefore, the chart corresponding to the target data can be automatically generated by using the code tool based on the chart generation request, the time and labor consumption problem caused by the need of manually searching and modifying parameters or codes in the program code file in the prior art is reduced, and the efficiency and the accuracy of chart result generation are improved.

Description

Method and device for automatically generating chart based on code tool
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a method and a device for automatically generating a chart based on a code tool.
Background
When the programming is counted, the programs are found to have universality, and the universality accounts for a relatively high proportion of the counted programs, even tens to thousands. When the same general-purpose program is applied in different application scenarios, some parameter values or codes in the general-purpose program are usually required to be modified.
For example: when the application is performed on the universal program, the universal program is usually copied into a program file corresponding to the project, then the program file is opened, and then the code or the parameter value of the related parameter in the program file is manually modified. The process is time-consuming and labor-consuming, and errors can occur, so that the progress of projects is affected, and the working efficiency of developers is reduced.
Disclosure of Invention
Aiming at the problems in the prior art, the embodiment of the invention provides a method and a device for automatically generating a chart based on a code tool, which can automatically generate a chart corresponding to target data based on the code tool, reduce the time and labor consumption problem caused by the need of manually searching and modifying parameters in program codes in the prior art, and improve the efficiency and accuracy of chart generation.
According to a first aspect of the embodiment of the present invention, there is provided a method for automatically generating a chart based on a code tool, where the method is applied to a first device and at least includes: determining a current program template corresponding to target data and a current chart configuration condition based on a chart generation request of a user for the target data; determining a current quasi program based on the current program template and the current chart configuration conditions; invoking a third party application to execute a flow corresponding to the chart generation request based on the current quasi program; and displaying the graph result generated in the execution result.
Optionally, the current program template and the current chart configuration condition corresponding to the target data are determined based on the chart generation request of the user for the target data; comprising the following steps: acquiring a chart generation request of a user for target data, and generating a chart generation interface; wherein the chart generation interface at least comprises an addition option; acquiring a template number of the target data based on the triggering of the adding option in the chart generation interface, and inquiring a preset program template corresponding to the template number from a template library; performing an adding operation on the target data and the preset program template to generate a first adding list; wherein the first add list includes at least chart configuration condition options; determining a current chart configuration condition corresponding to target data based on the selection of the chart configuration condition options in the first adding list; and taking the preset program template as a current program template corresponding to the target data.
Optionally, the first addition list further includes a program template option; acquiring an update request of the preset program template based on the selection of the program template option in the first addition list by a user; querying a target program template corresponding to the program template option from a template library based on the update request; and updating the preset program template by using the target program template, and taking the target program template as a current program template corresponding to the target data.
Optionally, the first adding list further includes an execution option; the determining a current quasi program based on the current program template and the current chart configuration condition comprises the following steps: judging whether an original program corresponding to the target data exists in a first storage area or not based on triggering of a user on the execution options in the first addition list; the first storage area is used for indicating an area for storing the original program corresponding to the target data; if so, updating the original quasi program based on the current program template and the current chart configuration condition to obtain a current quasi program; if not, creating a current quasi program based on the current program template and the chart configuration condition.
Optionally, the original quasi program is updated based on the current program template and the current chart configuration condition to obtain a current quasi program; comprising the following steps: acquiring a program template and a chart configuration condition corresponding to the original standard program; replacing the program template in the original quasi program by using the current program template to obtain a replaced quasi program; and updating the chart configuration conditions in the replaced quasi program by using the current chart configuration conditions to obtain the current quasi program.
Optionally, the chart configuration condition includes at least one configuration parameter and a current assignment corresponding to the configuration parameter; the updating the graph configuration conditions in the replaced quasi-program by using the current graph configuration conditions to obtain a current quasi-program comprises the following steps: for any of the configuration parameters: inquiring a preset parameter value corresponding to the configuration parameter from the replaced quasi-program; comparing whether the preset parameter value is the same as the current assignment; if the comparison result represents that the preset parameter value is different from the current assignment, verifying the current user identity information; if the verification is passed, replacing the preset parameter value in the replacement quasi-program with the current assignment to obtain an updating result; and obtaining the current quasi program based on the updating result corresponding to each configuration parameter in all the configuration parameters.
Optionally, the updating the graph configuration condition in the replaced quasi-program by using the current graph configuration condition to obtain a current quasi-program further includes: if the verification is not passed, sending a modification request of the configuration parameters to a corresponding manager so that the manager can examine and approve the modification request; if the approval result indicates that the modification request passes, replacing the preset parameter value in the replaced quasi-program with the current assignment to obtain an updating result; and if the approval result indicates that the modification request does not pass, taking the preset parameter value in the replaced quasi-program as a current assignment to obtain an updating result.
Optionally, the determining the current quasi program based on the current program template and the current chart configuration condition further includes: storing the current quasi program as a basic quasi program in the first storage area; generating an operation record based on the updating operation of the original quasi program; and storing the operational record in a database.
According to a second aspect of the embodiment of the present invention, there is also provided an apparatus for automatically generating a chart based on a code tool, where the apparatus is applied to a first device, and at least includes: the first determining module is used for determining a current program template and a current chart configuration condition corresponding to target data based on a chart generation request of a user for the target data; the second determining module is used for determining a current quasi program based on the current program template and the current chart configuration conditions; the calling module is used for calling a third party application to execute a flow corresponding to the chart generation request based on the current quasi program; and the display module is used for displaying the graph results generated in the execution results.
According to a third aspect of embodiments of the present invention, there is also provided a computer readable medium having stored thereon a computer program which, when executed by a processor, implements the method according to the first aspect.
The embodiment of the invention provides a method and a device for automatically generating a chart based on a code tool, wherein the method is applied to first equipment and at least comprises the following steps: firstly, determining a current program template and a current chart configuration condition corresponding to target data based on a chart generation request of a user for the target data; secondly, determining a current quasi program based on the current program template and the current chart configuration conditions; then, calling a third party application to execute a flow corresponding to the chart generation request based on the current quasi program; and finally, displaying the graph result generated in the execution result. Therefore, the chart corresponding to the target data can be automatically generated by using the code tool based on the chart generation request, the time and labor consumption problem caused by the need of manually searching and modifying parameters or codes in the program code file in the prior art is reduced, and the generation efficiency and accuracy of the chart result are improved.
Drawings
Some specific embodiments of the invention will be described in detail hereinafter by way of example and not by way of limitation with reference to the accompanying drawings. The same reference numbers will be used throughout the drawings to refer to the same or like parts or portions. It will be appreciated by those skilled in the art that the drawings are not necessarily drawn to scale. In the accompanying drawings:
FIG. 1 is a flow chart of a method for automatically generating a chart based on a code tool according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a process for determining a current program template and a current chart configuration condition corresponding to target data according to an embodiment of the present invention;
FIG. 3 is a flow chart illustrating a process for determining a current quasi-program based on a current program template and a current chart configuration condition according to an embodiment of the present invention;
FIG. 4 is a flowchart of a method for automatically generating a chart based on a code tool according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus for automatically generating a chart based on a code tool according to an embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more comprehensible, the technical solutions according to the embodiments of the present invention will be clearly described in the following with reference to the accompanying drawings, and it is obvious that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 is a flowchart of a method for automatically generating a chart based on a code tool according to an embodiment of the invention.
A method for automatically generating a chart based on a code tool, the method being applied to a first device and comprising at least the steps of:
s101, determining a current program template and a current chart configuration condition corresponding to target data based on a chart generation request of a user for the target data;
s102, determining a current quasi program based on a current program template and current chart configuration conditions;
s103, calling a third party application to execute a flow corresponding to the chart generation request based on the current quasi program;
s104, displaying the graph result generated in the execution result.
In S101, first, a chart generation request of a user for target data is acquired, and a chart generation interface is generated; secondly, based on a human-computer interaction mode in the chart generation interface, acquiring a current program template corresponding to target data and a current chart configuration condition; or analyzing the chart generation request, and obtaining a current program template and a current chart configuration condition corresponding to the target data based on the analysis result.
It should be noted that the target data may be table data, graphic data, or list data, and the target data may also be data imported through Excel.
Here, the current program template is used to indicate a code program capable of generating a corresponding chart based on the target data; the current chart configuration conditions are used for indicating chart title parameters and/or current program template operation parameters and the like; for example: when the target data is a clinical adverse event, the current chart configuration condition is selected from one or more of crowd information description, crowd information data set, screening data set, macro parameters and the like.
In S102 and S103, first, a current quasi-program is automatically synthesized based on a current program template and a current chart configuration condition; secondly, the current quasi program is sent to a third party application; the third party application then generates a chart result corresponding to the chart generation request based on the current quasi-program.
Here, the current quasi program includes at least the current chart configuration condition, the current program template, and the target data. Third party applications such as: the sas system.
The powerful data management capability, calculation capability and analysis capability of the sas system depend on the sas language which is a special data management and analysis language.
In S104, a graph result sent by the third party application is received, and the graph result is displayed.
The method comprises the steps of firstly automatically generating a current quasi program based on a chart generation request of target data, and then calling a third party application to execute a flow corresponding to the chart generation request based on the current quasi program so as to generate a chart result corresponding to the target data; therefore, the method can replace manual operation to automatically create the current quasi-program and generate the chart result based on the current quasi-program, thereby improving the accuracy and instantaneity of the chart result corresponding to the target data and further improving the generation efficiency of the chart result.
In a preferred implementation manner of the present embodiment, as shown in fig. 2, a flow chart of determining a current program template and a current chart configuration condition corresponding to target data in an embodiment of the present invention is shown.
Determining a current program template and a current chart configuration condition corresponding to target data, wherein the method at least comprises the following steps:
s201, obtaining a chart generation request of a user for target data, and generating a chart generation interface; wherein the chart generation interface at least comprises an addition option;
s202, based on the triggering of adding options in a chart generation interface, acquiring a template number of target data, and inquiring a preset program template corresponding to the template number from a template library; performing adding operation on the target data and a preset program template to generate a first adding list; wherein the first add list includes at least chart configuration condition options;
S203, determining the current chart configuration condition corresponding to the target data based on the selection of the chart configuration condition options in the first adding list;
s204, taking the preset program template as a current program template corresponding to the target data.
Specifically, the target data is typically target data carrying a template number; and each program template in the template library has a corresponding template number. Firstly, analyzing a template number corresponding to target data from the target data; secondly, after the template number of the target data is obtained, the system queries a preset program template corresponding to the template number from a template library; and then, respectively executing adding operation on a first link corresponding to the preset program template and a second link corresponding to the target data to generate a first adding list. At this time, a first link corresponding to the preset program template and a second link corresponding to the target data can be seen in the first added list. And finally, based on selection of the chart configuration condition options in the first adding list, acquiring the current chart configuration conditions required by the operation target data.
The program template is preset as a current program template of the operation target data.
According to the method, firstly, a proper preset program template can be automatically selected based on the template number so as to accord with a project program, and secondly, a current chart configuration condition corresponding to target data is selected based on a human-computer interaction mode; therefore, errors caused by manual code or related parameters modification in the program file are avoided, and the accuracy of generating the chart result corresponding to the target data is improved.
In a preferred further implementation of the present embodiment, the first add list further includes a program template option; determining a current program template and a current chart configuration condition corresponding to the target data, and further comprising: acquiring an update request of a preset program template based on the selection of a user for a program template option in a first addition list; inquiring a target program template corresponding to the program template option from a template library based on the update request; and updating a preset program template by using the target program template, and taking the target program template as a current program template corresponding to the target data.
Because the first adding list is provided with the program template options, the user can trigger the program template options to select the current program template, or can not trigger the program template options to take the preset program template as the current program template.
Therefore, according to the method and the device, by setting the program template options in the first adding list, different program templates can be conveniently called by a user according to requirements, the problem of low working efficiency caused by manual program template query of the user in the prior art is solved, and the user experience is improved.
In a preferred implementation of the present embodiment, as shown in fig. 3, a schematic flow chart of determining a current quasi-procedure based on a current procedure template and a current chart configuration condition in an embodiment of the present invention is shown.
Determining a current quasi program based on the current program template and the current chart configuration conditions, wherein the method at least comprises the following steps:
s301, judging whether an original program corresponding to target data exists in a first storage area or not based on triggering of a user for executing options in a first addition list; the first storage area is used for indicating an area for storing the original program corresponding to the target data; if yes, executing S302; if not, executing S303;
s302, updating the original quasi program based on the current program template and the current chart configuration conditions to obtain a current quasi program;
s303, creating a current quasi program based on the current program template and the current chart configuration conditions.
Specifically, based on the triggering of the user for executing the option in the first add list, querying the sas file corresponding to the target data from the item folder corresponding to the target data, for example: the sas file is the original standard program; if yes, updating the original quasi program by using the current program template and the current chart configuration condition to obtain the current quasi program; if not, the current quasi program is created by using the current program template and the current chart configuration conditions.
There is typically only one sas file under the project folder corresponding to the target data. Based on the triggering of the user for executing the option in the first adding list, querying a sal file corresponding to the target data from the project folder corresponding to the target data, for example: the sas file is the original standard program; if the sas file is inquired in the project folder corresponding to the target data, the original standard program corresponding to the target data is created; at this time, the current program template and the current chart configuration conditions are utilized to update the original quasi program, and the current quasi program is obtained. If the sas file is not inquired in the project folder corresponding to the target data, the current quasi program corresponding to the target data is not created; it is necessary to create a current quasi program based on the current program template and the current chart configuration conditions. Therefore, a user can directly modify the program file on the webpage without opening the current program file, and the working efficiency and the accuracy of chart result generation are greatly improved.
Updating the original quasi program based on the current program template and the current chart configuration condition to obtain a current quasi program; comprising the following steps: acquiring a program template and a chart configuration condition corresponding to the original standard program; replacing a program template in the original quasi program by using the current program template to obtain a replaced quasi program; and updating the chart configuration conditions in the replaced quasi program by using the current chart configuration conditions to obtain the current quasi program.
According to the method and the device, the original standard program is automatically updated based on the current program template and the current chart configuration conditions, so that the influence caused by manual operation is avoided, the generation efficiency and the accuracy of the current standard program are improved, and the accuracy of chart results corresponding to target data is improved.
In a preferred further implementation of this embodiment, the chart configuration condition includes at least one configuration parameter and a current assignment corresponding to the configuration parameter; updating the graph configuration conditions in the replacement post-quasi-program by using the current graph configuration conditions to obtain a current quasi-program, wherein the method comprises the following steps:
for any configuration parameter: inquiring a preset parameter value corresponding to the configuration parameter from the replaced quasi-program; comparing whether the preset parameter value is the same as the current assignment; if the comparison result represents that the preset parameter value is different from the current assignment, verifying the identity information of the current user; if the verification is passed, replacing the preset parameter value in the replaced quasi-program with the current assignment to obtain an updating result; if the verification is not passed, sending a modification request of the configuration parameters to a corresponding manager so that the manager can examine and approve the modification request; if the approval result represents that the modification request passes, replacing a preset parameter value in the replaced quasi-program with a current assignment to obtain an updating result; if the approval result indicates that the modification request does not pass, taking the preset parameter value in the replaced quasi-program as the current assignment, and obtaining an updating result.
And obtaining the current quasi program based on the updating result corresponding to each configuration parameter in all the configuration parameters.
Specifically, for any configuration parameter in the current chart configuration conditions, the modification authority of the configuration parameter needs to be determined, the system can only modify the configuration parameter without authority management in the quasi-program after updating and replacing, and the configuration parameter with authority management cannot be directly modified and can be modified after approval by an administrator, so that the accuracy of the chart result corresponding to the target data is improved.
In a preferred further implementation of the present embodiment, a method for automatically generating a chart based on a code tool further includes: storing the current quasi program as the original quasi program in a first storage area; generating an operation record based on the updating operation of the original program; and store the operational record in a database.
When the original quasi program is updated each time, the original quasi program needs to be recorded and updated into the modification record of the current quasi program, so that the tracing of a chart result by a user is facilitated, and the data confusion is avoided; the experience of the user is improved.
Fig. 4 is a flowchart of a method for automatically generating a chart based on a code tool according to another embodiment of the present invention.
A method for automatically generating a chart based on a code tool, comprising at least the steps of:
s401, acquiring a chart generation request of a user for target data, and generating a chart generation interface; wherein the chart generation interface at least comprises an addition option;
s402, based on triggering of adding options in a chart generation interface, executing adding operation on target data to generate a first adding list; the first adding list at least comprises a chart configuration condition option and a program template option;
s403, determining a current chart configuration condition corresponding to the target data based on selection of a chart configuration condition option in the first adding list by a user;
s404, inquiring a current program template corresponding to the program template option from a template library based on the selection of the program template option in the first adding list by a user;
s405, judging whether an original program corresponding to the target data exists in the first storage area or not based on the triggering of the user for executing options in the first addition list; the first storage area is used for indicating an area for storing the original program corresponding to the target data;
s406, if the current program template and the current chart configuration conditions exist, updating the original quasi program to obtain the current quasi program;
S407, if not, creating a current quasi program based on the current program template and the current chart configuration conditions.
S408, calling a third party application to execute a flow corresponding to the chart generation request based on the current quasi program;
s409, displaying the graph results generated in the execution results.
The above method of the present application will be described in detail with reference to specific applications.
A method of automatically generating a chart based on a code tool, the method comprising:
acquiring a chart generation request of a user for target data, and generating a chart generation interface; wherein the chart generation interface at least comprises an addition option;
based on the trigger of adding options in the chart generation interface, acquiring the template number of the target data, and inquiring a preset program template corresponding to the template number from a template library; performing adding operation on the target data and a preset program template to generate a first adding list; the first adding list at least comprises a chart configuration condition option, a program template option and an execution option;
determining a current chart configuration condition corresponding to the target data based on selection of a chart configuration condition option in the first adding list by a user; acquiring an update request of a preset program template based on the selection of a user for a program template option in a first addition list; inquiring a target program template corresponding to the program template option from a template library based on the update request; updating a preset program template by using a target program template, and taking the target program template as a current program template corresponding to target data; judging whether an original standard program corresponding to target data exists in a first storage area or not based on triggering of a user for executing options in a first adding list; the first storage area is used for indicating an area for storing the original program corresponding to the target data;
If yes, a program template and a chart configuration condition corresponding to the original standard program are obtained; the chart configuration conditions comprise at least one configuration parameter and a current assignment corresponding to the configuration parameter; replacing a program template in the original quasi program by using the current program template to obtain a replaced quasi program; for any configuration parameter: inquiring a preset parameter value corresponding to the configuration parameter from the replaced quasi-program; comparing whether the preset parameter value is the same as the current assignment; if the comparison result represents that the preset parameter value is different from the current assignment, verifying the identity information of the current user; if the verification is passed, replacing the preset parameter value in the replaced quasi-program with the current assignment to obtain an updating result; if the verification is not passed, sending a modification request of the configuration parameters to a corresponding manager so that the manager can examine and approve the modification request; if the approval result represents that the modification request passes, replacing a preset parameter value in the replaced quasi-program with a current assignment to obtain an updating result; if the approval result indicates that the modification request is not passed, taking a preset parameter value in the quasi-program after replacement as a current assignment; and obtaining the current quasi program based on the updating result corresponding to each configuration parameter in all the configuration parameters. If not, a current quasi program is created based on the current program template and the current chart configuration conditions. The current quasi program is stored in the first storage area as the original quasi program. Meanwhile, generating an operation record based on the updating operation of the original standard program; and store the operational record in a database.
Invoking a third party application to execute a flow corresponding to the chart generation request based on the current quasi program; and displaying the graph result generated in the execution result.
Fig. 5 is a schematic structural diagram of an apparatus for automatically generating a chart based on a code tool according to an embodiment of the present invention.
An apparatus for automatically generating a chart based on a code tool, the apparatus 500 comprising at least: the first determining module 501 determines a current program template and a current chart configuration condition corresponding to target data based on a chart generation request of a user for the target data; a second determining module 502, configured to determine a current quasi-program based on the current program template and the current chart configuration condition; a calling module 503, configured to call a third party application to execute a procedure corresponding to the chart generation request based on the current quasi program; and the display module 504 is configured to display a graph result generated in the execution result.
In an alternative embodiment, the first determining module includes: the first generation unit is used for acquiring a chart generation request of a user for target data and generating a chart generation interface; wherein the chart generation interface at least comprises an addition option; the second generation unit is used for acquiring the template number of the target data based on the triggering of the adding option in the chart generation interface, and inquiring a preset program template corresponding to the template number from a template library; performing an adding operation on the target data and the preset program template to generate a first adding list; wherein the first add list includes at least chart configuration condition options; a first determining unit, configured to determine a current chart configuration condition corresponding to the target data based on selection of the chart configuration condition option in the first addition list; and the second determining unit is used for taking the preset program template as the current program template corresponding to the target data.
In an alternative embodiment, the first add list further includes a program template option; the first determination module further includes: the acquisition unit is used for acquiring an update request of the preset program template based on the selection of the program template options in the first addition list by a user; a query unit, configured to query, based on the update request, a template library for a target program template corresponding to the program template option; and the updating unit is used for updating the preset program template by using the target program template and taking the target program template as the current program template corresponding to the target data.
In an alternative embodiment, the first add list further includes an execution option; the second determination module includes: the judging unit is used for judging whether the original program corresponding to the target data exists in the first storage area or not based on the trigger of the user on the execution options in the first addition list; the first storage area is used for indicating an area for storing the original program corresponding to the target data; the updating unit is used for updating the original quasi program based on the current program template and the current chart configuration condition if the original quasi program exists, so as to obtain a current quasi program; and the creating unit is used for creating a current quasi program based on the current program template and the chart configuration condition if the current quasi program does not exist.
In an alternative embodiment, the updating unit comprises: the acquisition subunit is used for acquiring the program template and the chart configuration condition corresponding to the original standard program; a replacing subunit, configured to replace a program template in the original quasi program with the current program template, so as to obtain a replaced quasi program; and the updating subunit is used for updating the chart configuration conditions in the replaced quasi program by using the current chart configuration conditions to obtain the current quasi program.
In an alternative embodiment, the chart configuration condition includes at least one configuration parameter and a current assignment corresponding to the configuration parameter; the update subunit includes: a first updating unit, configured to, for any of the configuration parameters: inquiring a preset parameter value corresponding to the configuration parameter from the replaced quasi-program; comparing whether the preset parameter value is the same as the current assignment; if the comparison result represents that the preset parameter value is different from the current assignment, verifying the current user identity information; if the verification is passed, replacing the preset parameter value in the replacement quasi-program with the current assignment to obtain an updating result; and the determining unit is used for obtaining the current quasi program based on the updating result corresponding to each configuration parameter in all the configuration parameters.
In an alternative embodiment, the update subunit further comprises: the second updating unit is used for sending the modification request of the configuration parameters to a corresponding manager if the verification is not passed, so that the manager can examine and approve the modification request; if the approval result indicates that the modification request passes, replacing the preset parameter value in the replaced quasi-program with the current assignment to obtain an updating result; and if the approval result indicates that the modification request does not pass, taking the preset parameter value in the replaced quasi-program as a current assignment to obtain an updating result.
In an alternative embodiment, the apparatus for automatically generating a chart based on a code tool further includes: the first storage module is used for storing the current quasi program as an original quasi program in the first storage area; the second storage module is used for generating an operation record based on the updating operation of the original program; and storing the operational record in a database.
The device can execute the method for automatically generating the chart based on the code tool provided by the other embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the method for automatically generating the chart based on the code tool. For technical details that are not described in detail in this embodiment, reference may be made to a method for automatically generating a chart based on a code tool according to another embodiment of the present invention.
The present invention also provides an electronic device including: a processor; a memory for storing the processor-executable instructions; the processor is used for reading the executable instructions from the memory and executing the instructions to realize the method for automatically generating the chart based on the code tool.
In addition to the methods and apparatus described above, embodiments of the present application may also be a computer program product comprising computer program instructions which, when executed by a processor, cause the processor to perform steps in a method according to various embodiments of the present application described in the "exemplary methods" section of the present specification.
The computer program product may write program code for performing the operations of embodiments of the present application in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present application may also be a computer-readable storage medium, having stored thereon computer program instructions, which when executed by a processor, cause the processor to perform steps in a method according to embodiments of the present application described in the above-mentioned "exemplary method" section of the present application.
The computer readable storage medium may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The basic principles of the present application have been described above in connection with specific embodiments, however, it should be noted that the advantages, benefits, effects, etc. mentioned in the present application are merely examples and not limiting, and these advantages, benefits, effects, etc. are not to be considered as necessarily possessed by the various embodiments of the present application. Furthermore, the specific details disclosed herein are for purposes of illustration and understanding only, and are not intended to be limiting, as the application is not intended to be limited to the details disclosed herein as such.
The block diagrams of the devices, apparatuses, devices, systems referred to in this application are only illustrative examples and are not intended to require or imply that the connections, arrangements, configurations must be made in the manner shown in the block diagrams. As will be appreciated by one of skill in the art, the devices, apparatuses, devices, systems may be connected, arranged, configured in any manner. Words such as "including," "comprising," "having," and the like are words of openness and mean "including but not limited to," and are used interchangeably therewith. The terms "or" and "as used herein refer to and are used interchangeably with the term" and/or "unless the context clearly indicates otherwise. The term "such as" as used herein refers to, and is used interchangeably with, the phrase "such as, but not limited to.
It is also noted that in the apparatus, devices and methods of the present application, the components or steps may be disassembled and/or assembled. Such decomposition and/or recombination should be considered as equivalent to the present application.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the application. Thus, the present application is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the application to the form disclosed herein. Although a number of example aspects and embodiments have been discussed above, a person of ordinary skill in the art will recognize certain variations, modifications, alterations, additions, and subcombinations thereof.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present invention, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. A method for automatically generating a chart based on a code tool, the method being applied to a first device, comprising:
determining a current program template corresponding to target data and a current chart configuration condition based on a chart generation request of a user for the target data;
judging whether an original program corresponding to the target data exists in a first storage area or not based on triggering of a user on the execution option in a first addition list; the first storage area is used for indicating an area for storing the original program corresponding to the target data; if yes, a program template and a chart configuration condition corresponding to the original standard program are obtained; wherein the chart configuration conditions comprise at least one configuration parameter and a current assignment corresponding to the configuration parameter; replacing the program template in the original quasi program by using the current program template to obtain a replaced quasi program; for any of the configuration parameters: inquiring a preset parameter value corresponding to the configuration parameter from the replaced quasi-program; comparing whether the preset parameter value is the same as the current assignment; if the comparison result represents that the preset parameter value is different from the current assignment, verifying the current user identity information; if the verification is passed, replacing the preset parameter value in the replacement quasi-program with the current assignment to obtain an updating result; obtaining a current quasi program based on the updating result corresponding to each configuration parameter in all the configuration parameters; the first adding list is obtained through the following method: acquiring a chart generation request of a user for target data, and generating a chart generation interface; wherein the chart generation interface at least comprises an addition option; acquiring a template number of the target data based on the triggering of the adding option in the chart generation interface, and inquiring a preset program template corresponding to the template number from a template library; performing an adding operation on the target data and the preset program template to generate a first adding list; wherein the first add list includes an execution option;
Invoking a third party application to execute a flow corresponding to the chart generation request based on the current quasi program;
and displaying the graph result generated in the execution result.
2. The method according to claim 1, wherein the determining the current program template and the current chart configuration condition corresponding to the target data is based on a chart generation request of the user for the target data; comprising the following steps:
acquiring a chart generation request of a user for target data, and generating a chart generation interface; wherein the chart generation interface at least comprises an addition option;
acquiring a template number of the target data based on the triggering of the adding option in the chart generation interface, and inquiring a preset program template corresponding to the template number from a template library; performing an adding operation on the target data and the preset program template to generate a first adding list; wherein the first add list includes at least chart configuration condition options;
determining a current chart configuration condition corresponding to target data based on the selection of the chart configuration condition options in the first adding list;
and taking the preset program template as a current program template corresponding to the target data.
3. The method of claim 2, wherein the first add list further comprises program template options;
acquiring an update request of the preset program template based on the selection of the program template option in the first addition list by a user;
querying a target program template corresponding to the program template option from a template library based on the update request;
and updating the preset program template by using the target program template, and taking the target program template as a current program template corresponding to the target data.
4. The method as recited in claim 1, further comprising:
if not, creating a current quasi program based on the current program template and the chart configuration condition.
5. The method as recited in claim 1, further comprising:
if the verification is not passed, sending a modification request of the configuration parameters to a corresponding manager so that the manager can examine and approve the modification request; if the approval result indicates that the modification request passes, replacing the preset parameter value in the replaced quasi-program with the current assignment to obtain an updating result; and if the approval result indicates that the modification request does not pass, taking the preset parameter value in the replaced quasi-program as a current assignment to obtain an updating result.
6. The method as recited in claim 1, further comprising:
storing the current quasi program as a basic quasi program in the first storage area;
generating an operation record based on the updating operation of the original quasi program; and storing the operational record in a database.
7. An apparatus for automatically generating a chart based on a code tool, the apparatus being applied to a first device, comprising:
the first determining module is used for determining a current program template and a current chart configuration condition corresponding to target data based on a chart generation request of a user for the target data;
the second determining module is used for judging whether the original program corresponding to the target data exists in the first storage area or not based on the triggering of the user on the execution options in the first adding list; the first storage area is used for indicating an area for storing the original program corresponding to the target data; if yes, a program template and a chart configuration condition corresponding to the original standard program are obtained; wherein the chart configuration conditions comprise at least one configuration parameter and a current assignment corresponding to the configuration parameter; replacing the program template in the original quasi program by using the current program template to obtain a replaced quasi program; for any of the configuration parameters: inquiring a preset parameter value corresponding to the configuration parameter from the replaced quasi-program; comparing whether the preset parameter value is the same as the current assignment; if the comparison result represents that the preset parameter value is different from the current assignment, verifying the current user identity information; if the verification is passed, replacing the preset parameter value in the replacement quasi-program with the current assignment to obtain an updating result; obtaining a current quasi program based on the updating result corresponding to each configuration parameter in all the configuration parameters; the first adding list is obtained through the following method: acquiring a chart generation request of a user for target data, and generating a chart generation interface; wherein the chart generation interface at least comprises an addition option; acquiring a template number of the target data based on the triggering of the adding option in the chart generation interface, and inquiring a preset program template corresponding to the template number from a template library; performing an adding operation on the target data and the preset program template to generate a first adding list; wherein the first add list includes an execution option;
The calling module is used for calling a third party application to execute a flow corresponding to the chart generation request based on the current quasi program;
and the display module is used for displaying the graph results generated in the execution results.
8. A computer readable medium having stored thereon a computer program which, when executed by a processor, implements the method of any of claims 1-6.
CN202310349039.3A 2023-04-04 2023-04-04 Method and device for automatically generating chart based on code tool Active CN116048480B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310349039.3A CN116048480B (en) 2023-04-04 2023-04-04 Method and device for automatically generating chart based on code tool

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310349039.3A CN116048480B (en) 2023-04-04 2023-04-04 Method and device for automatically generating chart based on code tool

Publications (2)

Publication Number Publication Date
CN116048480A CN116048480A (en) 2023-05-02
CN116048480B true CN116048480B (en) 2023-06-09

Family

ID=86125924

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310349039.3A Active CN116048480B (en) 2023-04-04 2023-04-04 Method and device for automatically generating chart based on code tool

Country Status (1)

Country Link
CN (1) CN116048480B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116841506B (en) * 2023-06-30 2024-05-03 北京百度网讯科技有限公司 Program code generation method and device, and model training method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101617292A (en) * 2006-12-01 2009-12-30 莫雷克斯公司 Programming and execution towards producer graph
CN107729003A (en) * 2017-11-20 2018-02-23 江苏神州信源系统工程有限公司 Automatic generation method, device and the electronic equipment of code

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10545730B2 (en) * 2018-05-07 2020-01-28 Red Hat, Inc. Automatically generating code for application programming interfaces
CN112732246A (en) * 2021-01-13 2021-04-30 臧主峰 Data visualization method and device based on HTML template and electronic equipment
CN113239068A (en) * 2021-05-10 2021-08-10 深圳前海微众银行股份有限公司 Chart custom generation method, device, equipment, medium and program product
CN113515271B (en) * 2021-05-17 2024-02-23 中国工商银行股份有限公司 Service code generation method and device, electronic equipment and readable storage medium
CN115409008A (en) * 2021-05-26 2022-11-29 平安证券股份有限公司 Chart generation method and device, electronic equipment and readable storage medium
CN113656041A (en) * 2021-08-16 2021-11-16 工银科技有限公司 Data processing method, device, equipment and storage medium
CN113760266B (en) * 2021-11-09 2022-02-25 北京明略昭辉科技有限公司 Method and device for creating function module file and electronic equipment
CN113805864A (en) * 2021-11-19 2021-12-17 北京明略昭辉科技有限公司 Project engineering generation method and device, electronic equipment and storage medium
CN114239530A (en) * 2021-12-17 2022-03-25 中国建设银行股份有限公司 Method and device for generating chart
CN114741070A (en) * 2022-04-12 2022-07-12 中国联合网络通信集团有限公司 Code generation method and device, electronic equipment and storage medium
CN115495067A (en) * 2022-09-29 2022-12-20 济南浪潮数据技术有限公司 Method and device for visually generating topological graph editor codes and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101617292A (en) * 2006-12-01 2009-12-30 莫雷克斯公司 Programming and execution towards producer graph
CN107729003A (en) * 2017-11-20 2018-02-23 江苏神州信源系统工程有限公司 Automatic generation method, device and the electronic equipment of code

Also Published As

Publication number Publication date
CN116048480A (en) 2023-05-02

Similar Documents

Publication Publication Date Title
CN109446068B (en) Interface test method, device, computer equipment and storage medium
CN111722839B (en) Code generation method and device, electronic equipment and storage medium
US20190005111A1 (en) Relational log entry instituting system
CN113127347B (en) Interface testing method, device, equipment and readable storage medium
CN108319575B (en) Page component checking method, device, server and storage medium
CN116048480B (en) Method and device for automatically generating chart based on code tool
US10152405B2 (en) Application testing system and method
CN110851539A (en) Metadata verification method and device, readable storage medium and electronic equipment
CN111026670B (en) Test case generation method, test case generation device and storage medium
CN108255967B (en) Method and device for calling storage process, storage medium and terminal
US9367307B2 (en) Staged points-to analysis for large code bases
CN114610286A (en) Development document generation method and device, computer equipment and storage medium
CN112613275A (en) Receipt generation method and device, computer equipment and storage medium
CN112068874A (en) Software project continuous integration method and device, terminal equipment and storage medium
CN115357598A (en) Data modification method and device, computer equipment and storage medium
CN114840251A (en) Script processing method, terminal, storage medium and program product
CN110286894B (en) Script generation method, script generation device, computer equipment and storage medium
CN114371866A (en) Version reconfiguration test method, device and equipment of service system
CN113052463B (en) Workflow verification method, workflow verification device, computer equipment and storage medium
CN115221146B (en) Method and device for deleting key value in Redis
US20230305817A1 (en) Dynamic importation of external dependency information to support autocompletion in an interactive development environment
CN100517223C (en) System and method for confirming experimental design information
CN115291914A (en) Data processing method, device, equipment and medium
CN116955311A (en) Data processing method, device, electronic equipment and storage medium
CN116166162A (en) Visual operation method and device of database and computer readable 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