Method and device for automatically generating file, storage medium and electronic equipment
By inputting configuration parameter values in the graphical user interface, standardized configuration files and source code files are automatically generated, solving the problems of complex configuration file maintenance and time-consuming source code modification in existing technologies, and achieving efficient configuration management and code generation.
Patent Information
- Application Number
- CN202411250069.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2026-03-10
AI Technical Summary
In existing technologies, maintaining configuration files is complex, time-consuming, and labor-intensive, and manually writing configuration information makes it difficult to modify the source code.
By receiving configuration parameter values input by users in the graphical user interface, generating an initial configuration file, converting it into a standardized configuration file according to a standardized configuration structure, automatically generating source code files, and combining preset validation rules and code templates, the system achieves automated management of configuration parameters.
It improves the efficiency of configuration file generation, reduces labor costs, lowers the difficulty of code maintenance, simplifies the process of modifying configuration information, and reduces the maintenance difficulty by using source code files that are independent of business code.
Smart Images

Figure CN121635870A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent driving, in particular to a method and device for automatically generating a file, a storage medium and an electronic device. BACKGROUND
[0002] Many existing software maintenance local configurations adopt a text type configuration file mode, and users need to manually maintain the configuration file. In addition, when the configuration is too complex, the text type configuration file is difficult for people to understand, which further increases the complexity of configuration maintenance. In addition, the existing software also has a scheme of encoding configuration information in the project code. At this time, once the configuration item needs to be modified, the source code needs to be modified and recompiled, which is very time-consuming and laborious. SUMMARY
[0003] The present application provides a method and device for automatically generating a file, a storage medium and an electronic device, which aims to solve the problems of manual writing of configuration files, which not only requires labor costs, but also is difficult to maintain, and manual writing of configuration information in target code, which will lead to the need to modify the source code when modifying the configuration item, which is time-consuming and laborious.
[0004] The specific technical solutions are as follows:
[0005] In a first aspect, the present application provides a method for automatically generating a file, which comprises:
[0006] Receiving a configuration parameter value input by a user in a graphical user interface according to a preset configuration parameter name, and generating an initial configuration file comprising the preset configuration parameter name and the corresponding configuration parameter value, wherein the graphical user interface comprises at least one preset configuration parameter name;
[0007] Converting the initial configuration file into a standardized configuration file according to a standardized configuration structure;
[0008] In the case of generating a source code, generating a source code file comprising configuration information in the standardized configuration file according to a preset code template.
[0009] According to the above scheme, the embodiment of the present application only needs the user to input the configuration parameter value according to the preset configuration parameter name in the graphical user interface, and then the electronic device can automatically generate the standardized configuration file according to the standardized configuration structure, including the initial configuration file of the preset configuration parameter name and the corresponding configuration parameter value. When the user needs to modify the configuration parameter value, it is only necessary to modify in the graphical user interface, without the need to recompile the standardized configuration file. Therefore, not only the generation efficiency of the standardized configuration file is improved, but also the problem that some technical personnel are difficult to maintain due to the complexity of manual writing is avoided. Moreover, in the case of generating source code, the electronic device can also automatically generate a source code file including the configuration information in the standardized configuration file according to the preset code template. Therefore, when the user wants to modify the configuration parameter value, it is only necessary to modify in the graphical user interface, without the need to manually modify the source code, thereby improving the efficiency of generating and modifying the source code on the basis of saving labor. In addition, since the source code file including the configuration information is directly automatically generated each time the configuration parameter value is modified, the source code file is independent of the user's business code, thereby reducing the difficulty of code maintenance.
[0010] In a possible implementation, before converting the initial configuration file into the standardized configuration file according to the standardized configuration structure, the method further includes:
[0011] According to a preset verification rule, the configuration parameter value is verified for rationality and / or correctness;
[0012] When any of the configuration parameter values fails the verification, a configuration modification prompt information is output in the graphical user interface, the configuration modification prompt information is used to indicate the modification of the configuration parameter value that fails the verification, and until all the configuration parameter values pass the verification, the step of converting the initial configuration file into the standardized configuration file according to the standardized configuration structure is performed.
[0013] According to the above scheme, the embodiment of the present application verifies the configuration parameter value for rationality and / or correctness according to the preset verification rule before converting the initial configuration file into the standardized configuration file, and outputs the configuration modification prompt information in the graphical user interface when the verification fails, for the user to modify, so as to ensure that the finally generated standardized configuration file is correct and reasonable, thereby avoiding the problem that the configuration error is found after the software runs, and a series of subsequent operations need to be modified from the beginning and re-executed.
[0014] In a possible implementation, the preset configuration parameter name includes an execution subject, a current task name, and a pre-task name.
[0015] In a possible implementation, the performing the rationality check on the configuration parameter value according to the preset check rule comprises:
[0016] For the same execution subject, determining whether there is a closed loop relationship formed by at least three task names according to the dependency relationship between the current task name and the preceding task name;
[0017] In the case where a closed loop relationship is formed among at least three task names, it is determined that the task name corresponding to the execution subject being judged is not reasonable;
[0018] In the case where a closed loop relationship is not formed among at least three task names, it is determined that the task name corresponding to the execution subject being judged is reasonable.
[0019] It can be known from the above solution that, by simply judging whether a closed loop relationship is formed by at least three task names, the embodiments of the present application can determine whether the calling among the tasks is smooth and reasonable, without waiting for the software to run into errors to expose the problem.
[0020] In a possible implementation, after the source code file including the configuration information in the standardized configuration file is generated according to the preset code template, the method further comprises:
[0021] compiling the source code in the source code file to generate a first dynamic library, and updating the first dynamic library to a running environment; or,
[0022] merging and compiling the source code in the source code file and the business framework code to generate a second dynamic library or an executable program, and updating the second dynamic library or the executable program to the running environment.
[0023] In a second aspect, the embodiments of the present application provide a device for automatically generating a file, and the device comprises:
[0024] a receiving unit configured to receive a configuration parameter value input by a user in a graphical user interface according to a preset configuration parameter name, wherein the graphical user interface comprises at least one preset configuration parameter name;
[0025] a first generating unit configured to generate an initial configuration file including the preset configuration parameter name and the configuration parameter value corresponding to the preset configuration parameter name;
[0026] a converting unit configured to convert the initial configuration file into a standardized configuration file according to a standardized configuration structure;
[0027] a second generating unit configured to, in the case where a source code needs to be generated, generate a source code file including configuration information in the standardized configuration file according to a preset code template.
[0028] In a possible implementation, the apparatus further includes:
[0029] a checking unit, configured to perform rationality and / or correctness checking on the configuration parameter values according to a preset checking rule before converting the initial configuration file into the standardized configuration file according to the standardized configuration structure;
[0030] an output unit, configured to output a configuration modification prompt information on the graphical user interface when any of the configuration parameter values fails the checking, the configuration modification prompt information being used to instruct to modify the configuration parameter value that fails the checking;
[0031] the conversion unit is configured to convert the initial configuration file into the standardized configuration file according to the standardized configuration structure until all the configuration parameter values pass the checking.
[0032] In a possible implementation, the preset configuration parameter names include an execution subject, a current task name, and a preceding task name.
[0033] In a possible implementation, the checking unit includes:
[0034] a judging module, configured to judge, for the same execution subject, whether there is a closed loop relationship formed by at least three task names according to a dependency relationship between the current task name and the preceding task name;
[0035] a determining module, configured to determine that the task name corresponding to the execution subject under judgment is irrational in a case where a closed loop relationship is formed among at least three task names, and determine that the task name corresponding to the execution subject under judgment is rational in a case where a closed loop relationship is not formed among at least three task names.
[0036] In a possible implementation, the apparatus further includes:
[0037] a first compiling and updating unit, configured to, after generating a source code file including configuration information in the standardized configuration file according to a preset code template, compile source code in the source code file to generate a first dynamic library, and update the first dynamic library into a running environment; or
[0038] a second compiling and updating unit, configured to merge and compile the source code in the source code file and a business framework code to generate a second dynamic library or an executable program, and update the second dynamic library or the executable program into the running environment.
[0039] As can be seen from the above solution, this embodiment only requires the user to input the configuration parameter values in the graphical user interface according to the preset configuration parameter names. The electronic device can then automatically generate a standardized configuration file from the initial configuration file containing the preset configuration parameter names and their corresponding configuration parameter values based on the standardized configuration structure. When the user needs to modify the configuration parameter values, they only need to modify them in the graphical user interface, without having to rewrite the standardized configuration file. This not only improves the generation efficiency of the standardized configuration file but also avoids the problem of some technicians struggling to maintain it due to the complexity of manual writing. Furthermore, when source code needs to be generated, the electronic device can also automatically generate a source code file containing the configuration information in the standardized configuration file based on a preset code template. Thus, when the user wants to modify the configuration parameter values, they only need to modify them in the graphical user interface, without manually modifying the source code, thereby saving manpower and improving the efficiency of generating and modifying source code. In addition, since each modification of the configuration parameter values automatically generates a source code file containing configuration information, this source code file is independent of the user's business code, thereby reducing the difficulty of code maintenance.
[0040] Thirdly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the method as described in any possible implementation of the first aspect.
[0041] Fourthly, embodiments of this application provide an electronic device, which includes:
[0042] One or more processors;
[0043] The processor is coupled to a storage device for storing one or more programs;
[0044] When one or more programs are executed by one or more processors, the electronic device performs the method as described in any possible implementation of the first aspect.
[0045] Fifthly, embodiments of this application provide a computer program product containing instructions that, when executed on a computer or processor, cause the computer or processor to perform the method described in any possible implementation of the first aspect. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0047] Figure 1 A flowchart illustrating a method for automatically generating files provided in an embodiment of this application;
[0048] Figure 2 An example diagram of an Excel template in a graphical user interface provided in this application embodiment;
[0049] Figure 3 An example diagram illustrating the input of configuration parameter information based on an Excel template in a graphical user interface, provided as an embodiment of this application;
[0050] Figure 4 Another example diagram provided for embodiments of this application, showing the input of configuration parameter information based on an Excel template in a graphical user interface;
[0051] Figure 5 A flowchart illustrating another method for automatically generating files provided in an embodiment of this application;
[0052] Figure 6 A block diagram illustrating the composition of an apparatus for automatically generating documents, as provided in this application embodiment;
[0053] Figure 7 This is a schematic diagram of the structure of an electronic device or computer device provided in an embodiment of this application. Detailed Implementation
[0054] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0055] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The terms "comprising" and "having," and any variations thereof, in the embodiments and drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0056] Figure 1 This is a flowchart illustrating a method for automatically generating files, which can be applied to electronic devices or computer devices. The method includes:
[0057] S110: Receive the configuration parameter values entered by the user in the graphical user interface according to the preset configuration parameter names, and generate an initial configuration file including the preset configuration parameter names and their corresponding configuration parameter values.
[0058] The graphical user interface (GUI) includes at least one preset configuration parameter name. This preset configuration parameter name includes the execution entity, the current task name, and the preceding task name. The execution entity identifies the logical entity or component to which the configuration item belongs; the current task name is the name of the currently executed task, used to identify the specific operation or process being performed; the preceding task name is the name of other tasks that the task corresponding to the current task name depends on, used to define the execution order of the tasks. The tasks of each execution entity can be used to form a directed graph according to their dependencies.
[0059] like Figure 2 As shown, taking visual configuration via an Excel template as an example, the template has preset configuration parameter names. Users can freely add or modify the configuration parameter values corresponding to each preset parameter name without changing the preset parameter names. Users edit these parameters in Excel, complete the configuration, and save the file for later processing. In the diagram, the task name refers to the current task name, and the preceding task name refers to the name of the previous task.
[0060] S120: Convert the initial configuration file into a standardized configuration file according to the standardized configuration structure.
[0061] After the initial configuration file is generated via the graphical user interface, the standardized configuration generation tool can parse the initial configuration file, extract the user-configured data entries, and convert them into a standardized configuration file in formats such as JSON or YAML according to a preset standardized configuration structure. A data entry typically refers to a configuration parameter value corresponding to all preset configuration parameter names, for example, a set of values for {execution subject, current task name, and predecessor task name}.
[0062] S130: When it is necessary to generate source code, generate source code files including configuration information in standardized configuration files according to preset code templates.
[0063] When a user selects the need to generate source code in the graphical user interface, the electronic device can determine that source code is required. At this point, the code generation tool can read the standardized configuration file generated by the standardized configuration generation tool and combine it with the user-defined code template to generate source code files containing configuration information. These source code files can be directly used by the compiler without requiring the user to manually write configuration-related code.
[0064] The automatic file generation method provided in this application embodiment only requires the user to input configuration parameter values in the graphical user interface according to preset configuration parameter names. The electronic device then automatically generates a standardized configuration file from the initial configuration file, including the preset configuration parameter names and their corresponding configuration parameter values, based on a standardized configuration structure. When the user needs to modify the configuration parameter values, they only need to modify them in the graphical user interface, without having to rewrite the standardized configuration file. This not only improves the generation efficiency of standardized configuration files but also avoids the problem of some technicians struggling to maintain the file due to the complexity of manual writing. Furthermore, when source code needs to be generated, the electronic device can also automatically generate source code files including the configuration information in the standardized configuration file based on preset code templates. Thus, when the user wants to modify the configuration parameter values, they only need to modify them in the graphical user interface, without manually modifying the source code, thereby saving manpower and improving the efficiency of generating and modifying source code. In addition, since each modification of configuration parameter values automatically generates a source code file including configuration information, this source code file is independent of the user's business code, thereby reducing the difficulty of code maintenance.
[0065] In one possible implementation, before converting the initial configuration file into a standardized configuration file according to the standardized configuration structure, this application embodiment may also perform rationality and / or correctness verification on the configuration parameter values according to preset verification rules; when any configuration parameter value fails verification, a configuration modification prompt message is output on the graphical user interface, which is used to indicate the modification of the configuration parameter value that failed verification, until all configuration parameter values are successfully verified, and then a standardized configuration file is generated.
[0066] Reasonableness verification includes logical reasonableness verification, and correctness verification includes grammatical description correctness verification. Therefore, verification rules can be set in advance based on reasonable logic, such as whether the dependency relationship between task names is reasonable. Verification rules can be set according to correct syntax, such as whether there are problems with inconsistent wording due to typos, whether parentheses are missing or added, etc. Once the corresponding rules are not met, the verification can be determined to have failed.
[0067] When the validation logic can accurately locate the erroneous configuration item (i.e., configuration parameter value), it can be displayed differently from other configuration items in the graphical user interface, allowing users to quickly correct the erroneous configuration item. Distinguishing methods include, but are not limited to, font style, font color, font size, and whether it blinks. For example, erroneous configuration items are displayed in red, and correct code is displayed in black.
[0068] This application embodiment verifies the rationality and / or correctness of configuration parameter values according to preset verification rules before converting the initial configuration file into a standardized configuration file. If the verification fails, a configuration modification prompt message is output on the graphical user interface for the user to modify. This ensures that the final generated standardized configuration file is correct and reasonable, thereby avoiding the problem of discovering configuration errors after the software is running, requiring modification from scratch and re-execution of a series of subsequent operations.
[0069] In one possible implementation, the specific method for performing a reasonableness check on the configuration parameter value according to a preset verification rule may include: for the same execution subject, determining whether there are at least three task names forming a closed loop relationship based on the dependency relationship between the current task name and the preceding task name; if there are at least three task names forming a closed loop relationship, determining that the task name corresponding to the execution subject being judged is unreasonable; if there are no at least three task names forming a closed loop relationship, determining that the task name corresponding to the execution subject being judged is reasonable.
[0070] Since, in theory, the tasks of each executing entity can form a directed graph according to their dependencies, if at least three of the task names corresponding to a certain executing entity form a closed loop relationship, it can be determined that the task names corresponding to that executing entity are unreasonable.
[0071] Accept Figure 2 The Excel template shown is as follows: Figure 3 As shown, if the user edits parameters in Excel, adding 2 execution entities and 6 tasks, the standardized configuration generation tool attempts to generate a standardized configuration file. However, it fails during the rationality check because task1, task2, and task3 of thread1 form a cycle, meaning that thread1 cannot start a new task after completing task0. In this case, a configuration modification prompt message is output in the graphical user interface, allowing the user to modify the configuration and remove the dependency of task1 on task3 (see...). Figure 4 After that, the verification was repeated, and the standardized configuration file was successfully generated.
[0072] In one possible implementation, such as Figure 5 As shown, after generating a source code file containing configuration information from a standardized configuration file based on a preset code template, the source code in the source code file can be compiled to generate a first dynamic library and updated to the runtime environment; or, the source code and business framework code in the source code file can be merged and compiled to generate a second dynamic library or executable program and updated to the runtime environment.
[0073] Among them, a dynamic library, also known as a dynamic link library (DLL), is a library containing code and data that can be used by multiple programs simultaneously. The runtime environment refers to the environment in which semi-compiled runtime code runs on the target machine.
[0074] In practical applications, the graphical user interface can display options such as "compile source code separately" and "compile source code and business framework code together" for users to choose from. After the system generates the source code, it can determine the compilation strategy based on the user's pre-selection and complete the automated compilation, thereby further improving the degree of automation of compilation.
[0075] Based on the above method embodiments, another embodiment of this application provides an apparatus for automatically generating files, such as... Figure 6 As shown, the device includes:
[0076] The receiving unit 210 is used to receive configuration parameter values input by the user in the graphical user interface according to the preset configuration parameter name, wherein the graphical user interface includes at least one preset configuration parameter name.
[0077] The first generation unit 220 is used to generate an initial configuration file including the preset configuration parameter name and its corresponding configuration parameter value;
[0078] The conversion unit 230 is used to convert the initial configuration file into a standardized configuration file according to the standardized configuration structure.
[0079] The second generation unit 240 is used to generate a source code file including the configuration information in the standardized configuration file according to a preset code template when source code needs to be generated.
[0080] In one possible implementation, the device further includes:
[0081] The verification unit is used to verify the rationality and / or correctness of the configuration parameter values according to preset verification rules during the process of converting the initial configuration file into a standardized configuration file according to the standardized configuration structure.
[0082] An output unit is configured to output a configuration modification prompt message to the graphical user interface when any of the configuration parameter values fails to be verified. The configuration modification prompt message is used to indicate that the configuration parameter value that failed to be verified should be modified.
[0083] The conversion unit 230 is used to convert the initial configuration file into the standardized configuration file according to the standardized configuration structure until all configuration parameter values are successfully verified.
[0084] In one possible implementation, the preset configuration parameter name includes the execution subject, the current task name, and the preceding task name.
[0085] In one possible implementation, the verification unit includes:
[0086] The judgment module is used to determine, for the same execution subject, whether there are at least three task names forming a closed loop relationship based on the dependency relationship between the current task name and the preceding task name;
[0087] The determination module is used to determine whether the task name corresponding to the judged execution entity is unreasonable when there is a closed loop relationship between at least three task names; and to determine whether the task name corresponding to the judged execution entity is reasonable when there is no closed loop relationship between at least three task names.
[0088] In one possible implementation, the device further includes:
[0089] The first compilation and update unit is configured to, after generating a source code file including configuration information from the standardized configuration file according to a preset code template, compile the source code in the source code file to generate a first dynamic library, and update the first dynamic library to the runtime environment; or...
[0090] The second compilation and update unit is used to merge and compile the source code and business framework code in the source code file, generate a second dynamic library or executable program, and update the second dynamic library or executable program to the runtime environment.
[0091] The automatic file generation device provided in this application embodiment only requires the user to input configuration parameter values in the graphical user interface according to preset configuration parameter names. The electronic device then automatically generates a standardized configuration file from the initial configuration file, including the preset configuration parameter names and their corresponding configuration parameter values, based on a standardized configuration structure. When the user needs to modify the configuration parameter values, they only need to modify them in the graphical user interface, without having to rewrite the standardized configuration file. This not only improves the generation efficiency of standardized configuration files but also avoids the problem of some technicians struggling to maintain the file due to the complexity of manual writing. Furthermore, when source code needs to be generated, the electronic device can also automatically generate source code files including the configuration information in the standardized configuration file according to a preset code template. Thus, when the user wants to modify the configuration parameter values, they only need to modify them in the graphical user interface, without manually modifying the source code, thereby saving manpower and improving the efficiency of generating and modifying source code. In addition, since each modification of configuration parameter values automatically generates a source code file including configuration information, this source code file is independent of the user's business code, thereby reducing the difficulty of code maintenance.
[0092] Based on the above method embodiments, another embodiment of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any of the above embodiments.
[0093] Based on the above method embodiments, another embodiment of this application provides an electronic device or computer device, such as... Figure 7 As shown, it includes:
[0094] One or more processors 310;
[0095] The processor 310 is coupled to a storage device 320, the storage device 320 being used to store one or more programs;
[0096] When the one or more programs are executed by the one or more processors 310, the electronic device or computer device performs the method as described in any of the above embodiments.
[0097] Based on the above embodiments, another embodiment of this application provides a computer program product, which includes instructions that, when executed on a computer or processor, cause the computer or processor to perform the method described in any of the above embodiments.
[0098] The above-described device and system embodiments correspond to the method embodiments and have the same technical effects. For detailed descriptions, please refer to the method embodiments. The device embodiments are derived from the method embodiments; detailed descriptions can be found in the method embodiments section, and will not be repeated here. Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of one embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application.
[0099] Those skilled in the art will understand that the modules in the apparatus of the embodiments can be distributed in the apparatus of the embodiments as described in the embodiments, or they can be located in one or more devices different from this embodiment with corresponding changes. The modules of the above embodiments can be combined into one module, or they can be further divided into multiple sub-modules.
[0100] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method of automatically generating a file, characterized by, The method comprises: receiving configuration parameter values input by a user in a graphical user interface according to preset configuration parameter names, and generating an initial configuration file comprising the preset configuration parameter names and corresponding configuration parameter values, wherein the graphical user interface comprises at least one preset configuration parameter name; converting the initial configuration file into a standardized configuration file according to a standardized configuration structure; in the case of generating source code, generating a source code file comprising configuration information in the standardized configuration file according to a preset code template.
2. The method of claim 1, wherein, Before converting the initial configuration file into a standardized configuration file according to a standardized configuration structure, the method further comprises: performing rationality and / or correctness verification on the configuration parameter values according to a preset verification rule; when any of the configuration parameter values fails the verification, outputting a configuration modification prompt in the graphical user interface, the configuration modification prompt being used to indicate modification of the configuration parameter value that fails the verification, and until all configuration parameter values pass the verification, performing the step of converting the initial configuration file into a standardized configuration file according to a standardized configuration structure.
3. The method of claim 2, wherein, The preset configuration parameter names comprise an execution subject, a current task name, and a pre-task name.
4. The method of claim 3, wherein, Performing rationality verification on the configuration parameter values according to a preset verification rule comprises: for the same execution subject, judging whether there is a closed loop relationship formed by at least three task names according to a dependency relationship between the current task name and the pre-task name; in the case of a closed loop relationship formed by at least three task names, determining that the task name corresponding to the judged execution subject is irrational; in the case of no closed loop relationship formed by at least three task names, determining that the task name corresponding to the judged execution subject is rational.
5. The method according to any one of claims 1-4, characterized in that, After generating a source code file comprising configuration information in the standardized configuration file according to a preset code template, the method further comprises: compiling the source code in the source code file to generate a first dynamic library, and updating the first dynamic library to a running environment; or merging and compiling the source code in the source code file and business framework code to generate a second dynamic library or an executable program, and updating the second dynamic library or the executable program to the running environment.
6. An apparatus for automatically generating a file, characterized by The device comprises: a receiving unit configured to receive configuration parameter values input by a user in a graphical user interface according to preset configuration parameter names, wherein the graphical user interface comprises at least one preset configuration parameter name; a first generating unit configured to generate an initial configuration file comprising the preset configuration parameter names and corresponding configuration parameter values; a converting unit configured to convert the initial configuration file into a standardized configuration file according to a standardized configuration structure; a second generating unit configured to, in the case of generating source code, generate a source code file comprising configuration information in the standardized configuration file according to a preset code template.
7. The apparatus of claim 6, wherein, The device further comprises: The checking unit is configured to perform rationality and / or correctness checking on the configuration parameter values according to preset checking rules before converting the initial configuration file into a standardized configuration file according to a standardized configuration structure; The output unit is configured to output a configuration modification prompt information on the graphical user interface when any of the configuration parameter values fails the checking, the configuration modification prompt information being used to indicate modification of the configuration parameter value that fails the checking; The conversion unit is configured to convert the initial configuration file into the standardized configuration file according to the standardized configuration structure until all the configuration parameter values pass the checking.
8. The apparatus of claim 6 or 7, wherein, The preset configuration parameter names include an execution subject, a current task name, and a preceding task name.
9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program, when executed by a processor, implements the method of any one of claims 1-5.
10. An electronic device, comprising: The electronic device includes: one or more processors; The processor is coupled with a storage device, and the storage device is configured to store one or more programs; When the one or more programs are executed by the one or more processors, the electronic device implements the method of any one of claims 1-5.