Program online method, electronic equipment, storage medium and program product

By generating and executing program compilation scripts, and using script online programs to automatically control program data online, the problem of high difficulty in deploying programs online in the existing technology is solved, improving efficiency and reducing difficulty.

CN119917218APending Publication Date: 2025-05-02TRAVELSKY TECHNOLOGY LIMITED
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510005134.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-02
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

In the prior art, the online deployment of control programs is relatively difficult, and the compilation and deployment work is cumbersome and prone to omissions, resulting in rework and increased difficulty.

Method used

By obtaining program data and its corresponding encoding rules, generating program compilation scripts, and using preset execution components to execute scripts, obtaining script execution results. In response to the successful execution of the script, the program is used to control the program data to be launched.

Benefits of technology

It improves the efficiency of controlling program data online, reduces the difficulty of program online, and reduces the possibility of rework.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119917218A_ABST
    Figure CN119917218A_ABST
Patent Text Reader

Abstract

The invention discloses a program online method, electronic equipment, a storage medium and a program product. The method comprises the following steps: acquiring program data and a program coding rule corresponding to the program data; generating a program compiling script based on the program data and the program coding rule; executing the program compiling script based on the preset execution component to obtain a script execution result; and responding to the script execution result that the program compiling script is successfully executed, and controlling the program data to be online based on a script online program corresponding to the program compiling script. According to the method and the device, the technical problem of high difficulty in control program online deployment in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and in particular to a program online method, electronic equipment, storage medium and program product. Background Art

[0002] In the field of software development, the compilation and deployment of programs in the environment mostly relies on individuals or full-time personnel in the team. In either case, technical personnel are required to be familiar with the calling relationships between programs and learn to skillfully complete the compilation and deployment process of the system's characteristics. Since the compilation and deployment work itself is cumbersome and prone to omissions and rework, there may be great difficulties in the actual online deployment of the program.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] The embodiments of the present invention provide a program online method, an electronic device, a storage medium and a program product, so as to at least solve the technical problem of high difficulty in controlling program online deployment in the related art.

[0005] According to one aspect of an embodiment of the present invention, a method for launching a program is provided, comprising: acquiring program data and program coding rules corresponding to the program data; generating a program compilation script based on the program data and the program coding rules; executing the program compilation script based on a preset execution component to obtain a script execution result; in response to the script execution result being that the program compilation script is successfully executed, launching a program based on the script corresponding to the program compilation script to control the program data to be launched online.

[0006] Furthermore, before the script online program corresponding to the program compilation script is controlled to go online, the above method also includes: constructing an execution file list corresponding to the program compilation script based on the script execution result; reading the program number of at least one execution file contained in the execution file list; based on the program number, constructing an online command corresponding to at least one execution file; and filling the initial online program based on the online command to obtain the script online program.

[0007] Furthermore, based on the script execution result, an execution file list corresponding to the program compilation script is constructed, including: obtaining file suffix names of multiple initial files contained in the script execution result; filtering the multiple initial files based on the file suffix names to obtain multiple target files; adjusting the file names of the multiple target files according to a preset format to obtain multiple execution files; and constructing an execution file list based on the multiple execution files.

[0008] Furthermore, the program data includes: multiple initial codes that need to be compiled, and the program compilation script includes: initial scripts corresponding to different initial codes; based on the program data and the program coding rules, a program compilation script is generated, including: based on the coding positions of the multiple initial codes, selecting a target code from the multiple initial codes in turn; performing a compliance check on the target code to obtain a compliance check result corresponding to the target code; in response to the compliance check result being that the target code is compliant, compiling the target code based on the data compilation method contained in the program coding rules to obtain the initial script corresponding to the target code.

[0009] Furthermore, the program compilation script is executed based on the preset execution component to obtain the script execution result, including: in response to detecting the initial script corresponding to the target coding, executing the initial script based on the preset execution component to obtain the initial execution result corresponding to the initial script; in response to the initial execution result being successful compilation of the initial script, adding the initial execution result to a preset storage list; in response to storing the initial scripts corresponding to multiple initial codings in the preset storage list, determining that the script execution result is successful execution of the program compilation script.

[0010] Furthermore, the above method also includes: in response to the initial execution result being the failure of initial script compilation, stopping the compilation of other codes and outputting a first prompt message, wherein the other codes are used to represent the program codes that have not been compiled in multiple initial codes, and the first prompt message is used to represent that the script execution result is that the program compilation script has not been successfully executed.

[0011] Furthermore, after the program is launched based on the script corresponding to the program compilation script and the control program data is launched, the above method also includes: in response to receiving a program rollback instruction, obtaining the first program data that currently needs to be rolled back, and the second program data in the program data that matches the program rollback instruction; based on the first program data and program coding rules, generating a compilation script corresponding to the first program data; executing the compilation script based on a preset execution component to obtain an execution result; in response to the execution result being successful execution of the compilation script, replacing the second program data based on the first program data.

[0012] According to another aspect of an embodiment of the present invention, a program online device is also provided, including: a data acquisition module, used to acquire program data and program coding rules corresponding to the program data; a script generation module, used to generate a program compilation script based on the program data and the program coding rules; a script execution module, used to execute the program compilation script based on a preset execution component to obtain a script execution result; a program online module, used to control the program data to go online based on the script online program corresponding to the program compilation script in response to the script execution result being successful execution of the program compilation script.

[0013] Furthermore, the above-mentioned device also includes: a list construction module, which is used to construct an execution file list corresponding to the program compilation script based on the script execution result; a number reading module, which is used to read the program number of at least one execution file contained in the execution file list; a command construction module, which is used to construct an online command corresponding to at least one execution file based on the program number; and a program filling module, which is used to fill the initial online program based on the online command to obtain the script online program.

[0014] Furthermore, the list construction module is also used to: obtain file suffix names of multiple initial files contained in the script execution results; filter the multiple initial files based on the file suffix names to obtain multiple target files; adjust the file names of the multiple target files according to a preset format to obtain multiple execution files; and construct an execution file list based on the multiple execution files.

[0015] Furthermore, the program data includes: multiple initial codes that need to be compiled, and the program compilation script includes: initial scripts corresponding to different initial codes; the script generation module is also used to: based on the coding positions of the multiple initial codes, select the target code from the multiple initial codes in turn; perform compliance verification on the target code to obtain a compliance verification result corresponding to the target code; in response to the compliance verification result that the target code is compliant, compile the target code based on the data compilation method contained in the program coding rules to obtain the initial script corresponding to the target code.

[0016] Furthermore, the script execution module is also used to: in response to detecting an initial script corresponding to the target code, execute the initial script based on a preset execution component to obtain an initial execution result corresponding to the initial script; in response to the initial execution result being successful compilation of the initial script, add the initial execution result to a preset storage list; in response to storing the initial scripts corresponding to multiple initial codes in the preset storage list, determine that the script execution result is successful execution of the program compilation script.

[0017] Furthermore, the above-mentioned device also includes: an information output module, which is used to stop compiling other codes in response to the initial execution result being the failure of initial script compilation, and output a first prompt information, wherein the other codes are used to represent the program codes that have not been compiled in multiple initial codes, and the first prompt information is used to represent that the script execution result is that the program compilation script has not been successfully executed.

[0018] Furthermore, the above-mentioned device also includes: a data acquisition module, which is used to obtain the first program data that currently needs to be rolled back in response to receiving a program rollback instruction, and the second program data in the program data that matches the program rollback instruction; a script generation module, which is used to generate a compilation script corresponding to the first program data based on the first program data and program coding rules; a script execution module, which is used to execute the compilation script based on a preset execution component to obtain an execution result; a data replacement module, which is used to replace the second program data based on the first program data in response to the execution result being successful execution of the compilation script.

[0019] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the method in each embodiment of the present invention is executed when the program is running.

[0020] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in various embodiments of the present invention.

[0021] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.

[0022] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.

[0023] According to another aspect of the embodiments of the present invention, a computer program is further provided. When the computer program is executed by a processor, the methods in the embodiments of the present invention are implemented.

[0024] In an embodiment of the present invention, program data and program coding rules corresponding to the program data are obtained; a program compilation script is generated based on the program data and the program coding rules; the program compilation script is executed based on a preset execution component to obtain a script execution result; in response to the script execution result being successful execution of the program compilation script, a script online program corresponding to the program compilation script is used to control the way in which the program data is put online. By executing the program compilation script constructed according to the program coding rules of the program data, and when the program compilation scripts are all executed successfully, the script online program is used to automatically put the program data online according to the executable file corresponding to the script execution result, the efficiency of controlling the program data to be put online can be improved, and the difficulty of the program online process can be reduced, thereby solving the technical problem of high difficulty in controlling the online deployment of the program in the related art. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0026] Figure 1 is a flow chart of a program online method according to an embodiment of the present invention;

[0027] Figure 2 It is a schematic diagram of a simplified process of program online according to an embodiment of the present application;

[0028] Figure 3 It is a schematic diagram showing a detailed process of launching a program according to an embodiment of the present application;

[0029] Figure 4 It is a structural block diagram of a program online device according to an embodiment of the present application. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0032] According to an embodiment of the present invention, a method embodiment of a program online is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0033] Figure 1 is a flow chart of a program online method according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0034] Step S102, obtaining program data and program coding rules corresponding to the program data.

[0035] The above-mentioned program data may refer to the data contained in the program that needs to be launched, and may include but is not limited to: source code, configuration files, dependency libraries, resource files and other files. The above-mentioned program coding rules may refer to the rules for constructing a compilation RUN (a program compilation script), wherein the compilation RUN may include instructions for compiling program data. The program launch system may compile the acquired program data through the compilation RUN to obtain an executable file that can be launched.

[0036] In an optional scheme of this embodiment, in order to quickly launch the specified program, the launch system can first obtain the data contained in the program to be launched, and the program coding rules for building the compilation RUN. For example, when obtaining the program data and program coding rules, the environment in which the program to be launched needs to be compiled and deployed, and the storage path in which the program data of the program to be launched are stored can be specified by the user first, and the corresponding program launch system can obtain the above-mentioned program data and program coding rules according to the storage path specified by the user, as well as the environment in which the program to be launched needs to be compiled and deployed, thereby realizing the operation of personalized compilation and deployment of the program, or the program launch system can use the pre-configured iterative compilation and deployment function, such as the periodic task scheduling function of the Cellery library (a database) in Python (a program compilation language), automatically query the database for storing the program to be launched through Python Django Model l (a data query component), and obtain the data contained in the program currently needed to be launched from the database, as well as the corresponding compilation and deployment environment and program coding rules, thereby improving the efficiency of program launch and realizing the operation of automatic compilation and deployment of the program. It should be noted that the Cellery library, Python Django Model, etc. mentioned here are only exemplary displays. The specific selection can be determined by the user according to the actual situation and is not limited here.

[0037] Step S104, generating a program compilation script based on the program data and program coding rules.

[0038] In an optional solution of this embodiment, after obtaining the program design and program coding rules, the online system can construct a corresponding compilation RUN, that is, the above-mentioned program compilation script, according to the program data and the corresponding program coding rules.

[0039] For example, assuming that the environment for compiling and deploying program data is the Unisys host system, and considering that the executable file of the Unisys host system is in Fortran language, the program compilation script constructed above can be a Fortran language program compilation script constructed through Python's open, write, read and other read and write functions and methods, that is, compile RUN. At the same time, since there are multiple applications (modules) in the Unisys host system, different modules usually correspond to different program data, and different modules are usually configured with execution order and reference relationship, so when generating compilation RUN of different modules, the program online system can first determine the introduction relationship and execution order between different program data, and then use the pre-configured program coding rules, combined with the obtained introduction relationship and execution order, to construct the compilation RUN corresponding to different program data in different modules.

[0040] Step S106, executing the program compilation script based on the preset execution component to obtain the script execution result.

[0041] In an optional scheme of the present embodiment, after constructing the program compilation script corresponding to the program data, the program online system can execute the constructed program compilation script through the preset execution component to obtain the corresponding script execution result. The script execution result may include the execution status of the program compilation script, such as whether the execution is successful. If the execution is successful, the script execution result may also include the executable file corresponding to the program data, so as to facilitate the subsequent long-term operation of the program; if the execution fails, the script execution result may also include the relevant parameters of the failure of the program compilation script execution, such as the script identifier of the failed program compilation script, the error type and position of the program compilation script during the execution process, and other parameters, so that the user can view the reason for the failure of the script execution.

[0042] Step S108, in response to the script execution result being that the program compilation script is successfully executed, launching the program based on the script corresponding to the program compilation script, and controlling the program data to go online.

[0043] The script online program may refer to a program for updating the compiled executable file to the compilation deployment environment, and may be an ONLINE_RUN script.

[0044] In an optional scheme of the present embodiment, when the script execution result shows that the program compilation script is executed successfully, that is, no errors occur during the execution process, the program online system can use the pre-built script online program to update the executable files included in the script execution result to the specified environment, so as to realize the operation of compiling and deploying the program to be launched in the specified environment.

[0045] In an embodiment of the present invention, program data and program coding rules corresponding to the program data are obtained; a program compilation script is generated based on the program data and the program coding rules; the program compilation script is executed based on a preset execution component to obtain a script execution result; in response to the script execution result being successful execution of the program compilation script, a script online program corresponding to the program compilation script is used to control the way in which the program data is put online. By executing the program compilation script constructed according to the program coding rules of the program data, and when the program compilation scripts are all executed successfully, the script online program is used to automatically put the program data online according to the executable file corresponding to the script execution result, thereby improving the efficiency of controlling the program data to be put online, thereby solving the technical problem of high difficulty in controlling the online deployment of the program in the related art.

[0046] Furthermore, before the script online program corresponding to the program compilation script is controlled to go online, the above method also includes: constructing an execution file list corresponding to the program compilation script based on the script execution result; reading the program number of at least one execution file contained in the execution file list; based on the program number, constructing an online command corresponding to at least one execution file; and filling the initial online program based on the online command to obtain the script online program.

[0047] In an optional solution of this embodiment, in order to stably launch the above-mentioned program data, before the control program data is launched, the program launch system can first build an execution file list corresponding to the program compilation script according to the script execution result of the program compilation script, and the execution file list can include the executable file corresponding to the program data. After building the execution file list, the program launch system can further read the program number of at least one execution file included in the execution file list, and build an online command for updating at least one execution file to the specified environment according to the program number, and finally use the constructed online command to the pre-built initial online program, such as the initial ONLINE_RUN file, to obtain the corresponding script online program.

[0048] For example, after the compilation RUN is completed and executed successfully, the program online system can store the ABS file (Executab le Fi le) generated by the compilation RUN in the specified path to build the corresponding execution file list. After building the execution file list, considering that different ABS files usually correspond to different program numbers, which are usually stored in the progpsb file, the program online system can use Python's ftp lib module to obtain the program number that matches the ABS file in the execution list from the progpsb file through regular expressions, and write on line statements for launching different ABS files, that is, online commands, through string concatenation. Finally, fill the written on line statements into the pre-built ONLINE_RUN file to build a script online program for launching different ABS files.

[0049] Furthermore, based on the script execution result, an execution file list corresponding to the program compilation script is constructed, including: obtaining file suffix names of multiple initial files contained in the script execution result; filtering the multiple initial files based on the file suffix names to obtain multiple target files; adjusting the file names of the multiple target files according to a preset format to obtain multiple execution files; and constructing an execution file list based on the multiple execution files.

[0050] In an optional solution of the present embodiment, when constructing the execution file list, considering that the script execution result may contain other types of files, these files may be stored in the same path as the ABS file, and correspondingly, when constructing the execution file list, the constructed execution file list may be wrong. Therefore, in order to accurately construct the execution file list, the program online system can first obtain the file suffix names of the multiple initial files contained in the script execution result, and use the determined file suffix names to filter the above multiple initial files to obtain multiple target files, which can refer to ABS files. In order to facilitate the construction of the corresponding script online program using the execution file list, after filtering out the multiple target files, the program online system can further adjust the file names of the multiple target files according to a preset format, for example, using a regular expression to remove the suffix names of the multiple target files to obtain the above multiple execution files. Finally, the program online system can construct the above execution file list based on the adjusted multiple execution files.

[0051] Furthermore, the program data includes: multiple initial codes that need to be compiled, and the program compilation script includes: initial scripts corresponding to different initial codes; based on the program data and the program coding rules, a program compilation script is generated, including: based on the coding positions of the multiple initial codes, selecting a target code from the multiple initial codes in turn; performing a compliance check on the target code to obtain a compliance check result corresponding to the target code; in response to the compliance check result being that the target code is compliant, compiling the target code based on the data compilation method contained in the program coding rules to obtain the initial script corresponding to the target code.

[0052] In an optional scheme of the present embodiment, the program data that needs to be put online may include at least multiple initial codes that need to be compiled, and the constructed program compilation script may include initial scripts corresponding to different initial codes. Correspondingly, when generating the program compilation script, the program online system can first determine the coding positions of different initial codes in the program data, and determine the target coding that currently needs to be compiled from multiple initial codes in turn according to the coding positions, and then perform a compliance check on the target coding to obtain a corresponding compliance check result to determine whether the target coding is compliant. If it is not compliant, the program online system can directly stop compiling and deploying, and prompt the user that there is an error in the program data; if it is compliant, the program online system can compile the target coding according to the data compilation method contained in the corresponding program coding rule to obtain the initial script corresponding to the target coding.

[0053] Furthermore, the program compilation script is executed based on the preset execution component to obtain the script execution result, including: in response to detecting the initial script corresponding to the target coding, executing the initial script based on the preset execution component to obtain the initial execution result corresponding to the initial script; in response to the initial execution result being successful compilation of the initial script, adding the initial execution result to a preset storage list; in response to storing the initial scripts corresponding to multiple initial codings in the preset storage list, determining that the script execution result is successful execution of the program compilation script.

[0054] In an optional scheme of the present embodiment, when a preset execution component is used to execute a program compilation script, if an initial script corresponding to the target code is detected, that is, the corresponding initial script is obtained by compiling the target code, the above-mentioned preset execution component can be used to execute the initial script in a timely manner to obtain an initial execution result corresponding to the initial script. If the initial execution result shows that the initial script compilation is successful, the program online system can add the initial execution result to a preset storage list, such as a preset storage path. After all the initial script storage values ​​of the initial codes are preset in the storage list, it can be determined that the script execution result is that the program compilation script is executed successfully.

[0055] Furthermore, the above method also includes: in response to the initial execution result being the failure of initial script compilation, stopping the compilation of other codes and outputting a first prompt message, wherein the other codes are used to represent the program codes that have not been compiled in multiple initial codes, and the first prompt message is used to represent that the script execution result is that the program compilation script has not been successfully executed.

[0056] In an optional scheme of the present embodiment, if the initial execution result shows that the initial script compilation failed, it means that there is an error in the currently constructed initial script or target data. At this time, the program online system can stop compiling other codes, for example, no longer compile the program codes that have not been compiled in the program data, and at the same time output the corresponding first prompt information to the user in the operation interface to prompt the user that the current program compilation script has not been executed successfully.

[0057] Furthermore, after the program is launched based on the script corresponding to the program compilation script and the control program data is launched, the above method also includes: in response to receiving a program rollback instruction, obtaining the first program data that currently needs to be rolled back, and the second program data in the program data that matches the program rollback instruction; based on the first program data and program coding rules, generating a compilation script corresponding to the first program data; executing the compilation script based on a preset execution component to obtain an execution result; in response to the execution result being successful execution of the compilation script, replacing the second program data based on the first program data.

[0058] In an optional scheme of the present embodiment, after the control program data is online, the program online system can also provide the user with a program rollback function. Correspondingly, when a program rollback instruction is received, the program online system can obtain the first program data that currently needs to be rolled back, and the second program data that matches the program rollback instruction in the currently online program data, and then generate a compilation script corresponding to the first program data according to the aforementioned content, the program coding rules and the first program data, and execute the compilation script using a preset execution component to obtain a corresponding execution result. If the execution result shows that the compilation script is executed successfully, the program online system can replace the second program data with the first program data to implement the rollback operation; if the execution result shows that the compilation script fails to execute, it means that the acquired first program data may have errors, and the rollback operation can be stopped accordingly.

[0059] Among them, the corresponding script online program, such as LIST_RUN script, ROLLBACK_RUN script and other programs, can also be used when performing the rollback operation. The construction process of these programs can refer to the construction process of the aforementioned ONLINE_RUN script, which will not be repeated here.

[0060] In an optional scheme of the present embodiment, regardless of whether the program data is successfully launched online, the program launch system can store the results generated during the launch process in the database, such as storing the compilation results in the automatic compilation result table, and writing the ERRORs encountered during the compilation process or the programs that do not meet the compilation requirements into the specified log file. When the automatic compilation deployment ends normally or the abnormal error ends, the front end will display the compilation result status and the contents of the log file for user viewing and processing.

[0061] For ease of understanding, Figure 2 is a schematic diagram of a simplified process of program online according to an embodiment of the present application, such as Figure 2 As shown, the whole process can be divided into five steps.

[0062] The first step may be to collect compilation requirements: in this step, in the operation interface, the user can specify the environment that needs to be compiled and deployed, and provide the path of the program that needs to be compiled to realize the information collection of personalized compilation operations, or the user can register the program modified based on project requirements to the program collection interface, so that the program online system can realize the information collection of automatic incremental compilation and deployment through the program operation interface.

[0063] The second step can be the preparation for automatic compilation implementation: in this step, corresponding to the two collection methods in the first step, for personalized compilation deployment, after the user manually triggers the compilation operation requirement, the program online system can collect personalized compilation requirement information such as program data and program coding rules according to the path given by the user, and automatically generate compilation RUN based on this information; for automatic full compilation deployment: the program online system can automatically obtain the compilation requirement information added by the user in the program collection interface according to the pre-configured automatic job, and automatically generate compilation RUN based on this information.

[0064] The third step can be automatic compilation, deployment and echo. In this step, the program online system can push the written compilation RUN to the FTP (File Transfer Protocol) of the target system required for compilation, and then automatically execute the compilation RUN in the target system and judge the compilation RUN execution result. If the execution fails, the system prompt information of the compilation failure is directly echoed in the operation interface; if the execution is successful, the program automatically writes ONLINE_RUN, pushes ONLINE_RUN to the target system and executes it. After the online is successful, the information of successful compilation and deployment is echoed to the operation interface.

[0065] The fourth step may be a compilation status query. In this step, the user can perform a compilation query operation in the operation interface. Correspondingly, after receiving the compilation query operation requirement in the program online system, the program notifies the target system to perform an ONLINE query RUN to query the compilation result required by the user, and after parsing the query result, the required ONLINE information, such as the list of ONLINE programs, the compilation time of the program, the source folder of the program, etc., is echoed in the operation interface for the user to view.

[0066] The fifth step can be a program rollback operation. In this step, based on the compilation status query page, the user can manually select one or more programs that need to be rolled back to the system version. The corresponding program online system can automatically splice the rollback RUN according to the program data that needs to be rolled back, and push the rollback RUN to the target system for execution, and finally echo the execution result to the operation interface.

[0067] Figure 3 is a schematic diagram showing a detailed process of launching a program according to an embodiment of the present application, such as Figure 3 As shown, the program online system can include three parts: user side, operation interface side and operation background. When the program data is online, the user can first select the information that needs to be compiled in the operation interface, such as program data, program coding rules and other information. The operation interface can send the compilation information selected by the user to the operation background. The corresponding operation can first check the correctness of the compilation statement, and then complete the compilation RUN writing according to the compilation statement and the corresponding compilation rules, and upload the compiled RUN to the compilation deployment environment, that is, compile in the host system. If the compilation fails, the errors that occurred during the compilation process can be checked, and the compilation operation of the current system is terminated to enter the compilation operation of the next system; if the compilation is successful, the corresponding executable file list can be generated according to the compilation result, and the corresponding script online program can be constructed according to the executable file list. At the same time, the script online program is used to update the executable file to the specified environment to realize the operation of program online. After the online completion, the operation background can return the online result to the operation interface for user viewing.

[0068] In an optional solution of this embodiment, the program online system can also manage the compiled program and the compiled result. The management steps may include:

[0069] Work order management table design: The work order management table is used to manage the detailed information of the program that needs to be compiled for the work order corresponding to this round of keys. It mainly includes the work order's primary key, name, CCFS (Change Control File Set, a file set or form set used to record the modification history of the program and version control), creation time, creator and other information. Other fields can be added according to actual conditions, such as whether to delete, modification time, etc.

[0070] Design of personalized compilation result table: The personalized compilation result table manages the basic information of each program of personalized compilation, mainly including primary key, environment, system, type, CCFS and other information. Fields can be added according to actual needs.

[0071] Automatic compilation result table design: The automatic compilation result table manages the execution results of automatic compilation deployment, mainly including primary key, start time, end time, status, result and other information. Fields can be added according to actual needs.

[0072] Interface design: The work order management table is designed with add, delete, modify and query interfaces, which are provided to the Web (website) front end of data management, that is, the operation interface to manage data. In addition, an interface needs to be designed to compare the number of work orders. Its function is to import all work order data, and then compare it with the existing data in the database to return the work orders that are missing compilation. Other interfaces are added according to actual conditions.

[0073] According to an embodiment of the present invention, a device embodiment for launching a program online is provided. It should be noted that the device can be used to execute the above-mentioned method for launching a program online. Figure 4 is a structural block diagram of a program online device according to an embodiment of the present application, such as Figure 4 As shown, the device may include: a data acquisition module 402 , a script generation module 404 , a script execution module 406 and a program online module 408 .

[0074] Among them, the data acquisition module 402 is used to acquire program data and program coding rules corresponding to the program data; the script generation module 404 is used to generate a program compilation script based on the program data and program coding rules; the script execution module 406 is used to execute the program compilation script based on a preset execution component to obtain a script execution result; the program online module 408 is used to respond to the script execution result that the program compilation script is successfully executed, and control the program data to go online based on the script online program corresponding to the program compilation script.

[0075] Furthermore, the above-mentioned device also includes: a list construction module, which is used to construct an execution file list corresponding to the program compilation script based on the script execution result; a number reading module, which is used to read the program number of at least one execution file contained in the execution file list; a command construction module, which is used to construct an online command corresponding to at least one execution file based on the program number; and a program filling module, which is used to fill the initial online program based on the online command to obtain the script online program.

[0076] Furthermore, the list construction module is also used to: obtain file suffix names of multiple initial files contained in the script execution results; filter the multiple initial files based on the file suffix names to obtain multiple target files; adjust the file names of the multiple target files according to a preset format to obtain multiple execution files; and construct an execution file list based on the multiple execution files.

[0077] Furthermore, the program data includes: multiple initial codes that need to be compiled, and the program compilation script includes: initial scripts corresponding to different initial codes; the script generation module is also used to: based on the coding positions of the multiple initial codes, select the target code from the multiple initial codes in turn; perform compliance verification on the target code to obtain a compliance verification result corresponding to the target code; in response to the compliance verification result that the target code is compliant, compile the target code based on the data compilation method contained in the program coding rules to obtain the initial script corresponding to the target code.

[0078] Furthermore, the script execution module is also used to: in response to detecting an initial script corresponding to the target code, execute the initial script based on a preset execution component to obtain an initial execution result corresponding to the initial script; in response to the initial execution result being successful compilation of the initial script, add the initial execution result to a preset storage list; in response to storing the initial scripts corresponding to multiple initial codes in the preset storage list, determine that the script execution result is successful execution of the program compilation script.

[0079] Furthermore, the above-mentioned device also includes: an information output module, which is used to stop compiling other codes in response to the initial execution result being the failure of initial script compilation, and output a first prompt information, wherein the other codes are used to represent the program codes that have not been compiled in multiple initial codes, and the first prompt information is used to represent that the script execution result is that the program compilation script has not been successfully executed.

[0080] Furthermore, the above-mentioned device also includes: a data acquisition module, which is used to obtain the first program data that currently needs to be rolled back in response to receiving a program rollback instruction, and the second program data in the program data that matches the program rollback instruction; a script generation module, which is used to generate a compilation script corresponding to the first program data based on the first program data and program coding rules; a script execution module, which is used to execute the compilation script based on a preset execution component to obtain an execution result; a data replacement module, which is used to replace the second program data based on the first program data in response to the execution result being successful execution of the compilation script.

[0081] An embodiment of the present application further provides an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods in various embodiments of the present invention when running.

[0082] An embodiment of the present application further provides a computer-readable storage medium, which includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in various embodiments of the present invention.

[0083] An embodiment of the present application further provides a computer program product, including a computer program, which implements the methods in various embodiments of the present invention when executed by a processor.

[0084] An embodiment of the present application further provides a computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.

[0085] The embodiments of the present application further provide a computer program, which implements the methods in the above-mentioned embodiments of the present invention when executed by a processor.

[0086] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0087] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0088] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0089] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0090] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0091] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A program online method, characterized in that: include: Acquire program data and program coding rules corresponding to the program data; Generate a program compilation script based on the program data and the program coding rules; Execute the program compilation script based on the preset execution component to obtain the script execution result; In response to the script execution result being that the program compilation script is successfully executed, a script online program corresponding to the program compilation script is launched to control the program data to go online.

2. The method according to claim 1, characterized in that Before launching the program based on the script corresponding to the program compilation script and controlling the program data to go online, the method further includes: Based on the script execution result, construct an execution file list corresponding to the program compilation script; Reading a program number of at least one execution file included in the execution file list; Based on the program number, construct an online command corresponding to the at least one execution file; The initial online program is filled based on the online command to obtain the script online program.

3. The method according to claim 2, characterized in that Based on the script execution result, construct an execution file list corresponding to the program compilation script, including: Obtaining file suffixes of multiple initial files included in the script execution result; Filtering the multiple initial files based on the file suffixes to obtain multiple target files; Adjust the file names of the multiple target files according to a preset format to obtain multiple executable files; The execution file list is constructed based on the plurality of execution files.

4. The method according to any one of claims 1 to 3, characterized in that: The program data includes: a plurality of initial codes to be compiled, and the program compilation script includes: initial scripts corresponding to different initial codes; generating a program compilation script based on the program data and the program coding rule, including: Selecting target codes from the multiple initial codes in sequence based on code positions of the multiple initial codes; Performing compliance verification on the target code to obtain a compliance verification result corresponding to the target code; In response to the compliance check result that the target code is compliant, the target code is compiled based on the data compilation method included in the program coding rule to obtain an initial script corresponding to the target code.

5. The method according to claim 4, characterized in that Execute the program compilation script based on the preset execution component to obtain the script execution result, including: In response to detecting an initial script corresponding to the target code, executing the initial script based on the preset execution component to obtain an initial execution result corresponding to the initial script; In response to the initial execution result being that the initial script is successfully compiled, adding the initial execution result to a preset storage list; In response to storing all the initial scripts corresponding to the multiple initial codes in the preset storage list, it is determined that the script execution result is that the program compilation script is successfully executed.

6. The method according to claim 5, characterized in that The method further comprises: In response to the initial execution result being the failure of the initial script compilation, the compilation of other codes is stopped, and a first prompt message is output, wherein the other codes are used to represent the program codes that have not been compiled in the multiple initial codes, and the first prompt message is used to represent that the script execution result is that the program compilation script has not been successfully executed.

7. The method according to claim 1, characterized in that After the program is launched based on the script corresponding to the program compilation script and the program data is controlled to be launched, the method further includes: In response to receiving a program rollback instruction, acquiring first program data that currently needs to be rolled back, and second program data in the program data that matches the program rollback instruction; Based on the first program data and the program coding rule, generating a compilation script corresponding to the first program data; Execute the compiled script based on the preset execution component to obtain an execution result; In response to the execution result being that the compiled script is successfully executed, the second program data is replaced based on the first program data.

8. An electronic device, characterized in that: include: A memory storing an executable program; A processor, configured to run the program, wherein the program executes the method according to any one of claims 1 to 7 when running.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is run, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 7.

10. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 7.