Industrial application software automatic publishing method and system based on CI / CD
By adopting automated release methods and systems based on CI/CD in industrial applications, the problems of manual compilation are solved, and the versions are time-consuming and inaccurate, and efficient and accurate industrial application software release and version management are achieved, ensuring the safety and efficiency of the production environment.
Patent Information
- Application Number
- CN202510049914.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-05-13
AI Technical Summary
In the prior art, manual compilation of industrial applications is prone to errors, the compilation process cannot be visually displayed, and the version is time-consuming and inaccurate, resulting in inefficient and insecure operation in an intelligent workshop multi-equipment environment.
Using CI/CD-based automated publishing methods and systems, we trigger automated compilation scripts by listening to Gerrit code warehouse actions, generate project packages and perform multi-field comparison to determine version numbers, realize continuous integration and continuous deployment, and combine visual presentation and message push to ensure that the compilation process is transparent and accurate.
It improves the accuracy and efficiency of release of industrial application software, reduces human operation errors, ensures information security in the production environment, prevents code leakage, and significantly shortens the construction time, and improves the efficiency of compilation and testing.
Smart Images

Figure CN119987830A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial application software, and in particular to a CI / CD-based industrial application software automatic publishing method and system. Background Art
[0002] In an industrial production environment, compiling, generating and deploying equipment control applications is an important step to ensure the normal operation of various production equipment. Continuous integration (CI) and continuous delivery (CD) are more efficient industry practices in modern software development. The use of automated processes can effectively accelerate the delivery speed and quality of industrial applications.
[0003] The current problems in industrial applications are:
[0004] 1. At present, industrial applications need to be deployed in a local area network production environment, and the main method used is manual compilation. After compiling and generating a project package, it is copied to the hard disk or sent to the production equipment through the FTP protocol. This method is time-consuming and labor-intensive, complex and inefficient, and prone to errors, which is not conducive to operations in the current intelligent workshop multi-device environment.
[0005] 2. During the regular compilation process, the command line compilation process on the server can only view the console output. The console prints a lot of data during the compilation process and the information refreshes quickly. The compilation generation process cannot be displayed intuitively and the progress is not easy to perceive.
[0006] 3. In order to determine the current code version, the conventional operation is to compare the code package tag content. If the information does not match, the version is considered outdated; if it is consistent, the version code data is randomly checked to see if it is consistent. If it is found to be different, the version is considered outdated. This method is time-consuming and inaccurate, which is not conducive to the version update operation of the entire batch of project packages of various types of equipment in the production environment. Summary of the invention
[0007] The purpose of the present invention is to provide a CI / CD-based industrial application software automated publishing method and system to solve the problems in the prior art that manual compilation of industrial applications is prone to errors, the compilation process cannot be displayed intuitively, and the version is time-consuming and inaccurate.
[0008] The present invention solves the above problems through the following technical solutions:
[0009] An automated release method for industrial application software based on CI / CD, comprising:
[0010] Step S1: monitor the Gerrit code repository action and trigger the automatic compilation script;
[0011] Step S2: determine whether the continuous integration process is completed. If it is completed, generate a project package to the specified directory, add the project package information to the project package release strategy option, and proceed to the next step; otherwise, visualize the continuous integration process and push it to each project member through email or other means at key nodes;
[0012] Step S3, generating a project package strategy task;
[0013] Step S4, determine whether there is a project package strategy task that needs to be executed currently, if yes, proceed to the next step, otherwise update the project package strategy task queue regularly;
[0014] Step S5, executing the project package strategy task continuous deployment;
[0015] Step S6, determine whether the project package version update of the current device has been completed. If completed, output the process information to the console to visualize the process information and proceed to the next step; otherwise, return to step S5;
[0016] Step S7: If the project package strategy tasks are executed correctly, the application software will be successfully released and displayed visually.
[0017] Furthermore, the project package information includes a project package name, a project package storage address, a project package file size, a project package unique code, an internal version number, a display version number and a description.
[0018] Furthermore, the project package release strategy includes a strategy release mode, a coverage type, a strategy description, a strategy start date, a strategy end date, a strategy start time, a strategy end time, a strategy actual start time, and a strategy actual end time.
[0019] Furthermore, the policy issuance method includes a method for determining a unique device.
[0020] Furthermore, the method of determining the unique device is SN or MAC address.
[0021] Furthermore, the coverage type includes two methods: SN / MAC address interval determination and SN / MAC address precise determination.
[0022] Furthermore, the step S3 also includes using the project package file size and project package file data as encryption coefficients, setting a buffer to read the project package file in blocks and calculate the MD5 hash, and after completing the splicing of all the block MD5 values, using it as the file unique code, comparing the unique codes and internal version numbers of all files in the specified directory, if there is no duplication, storing it in the database, otherwise, clearing the generated project package.
[0023] An industrial application software automatic release system based on CI / CD, including:
[0024] The compilation module is used to trigger the automatic compilation script after monitoring the Gerrit code repository actions;
[0025] The judgment module is used to judge whether the continuous integration process is completed; to judge whether there is a project package strategy task that needs to be executed; and to judge whether the project package version update of the current device has been completed; and to judge whether the execution of the project package strategy task has been completed and all are correct;
[0026] The project package generation module is used to generate the project package to the specified directory when the continuous integration process is completed;
[0027] A release strategy configuration module is used to add project package information to the project package release strategy options and generate project package strategy tasks;
[0028] The project package strategy task module is used to regularly update the project package strategy task queue and execute the continuous deployment of project package strategy tasks;
[0029] The visualization display module is used to visualize the continuous integration process, successful application software release, and output process information when the project package version update of the current device is completed.
[0030] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0031] (1) The present invention determines the published version number through multi-field comparison rather than a single code tag, which is beneficial to improving the accuracy of the published project package; the automated application compilation, process visualization and process message push based on CI / CD effectively determine the operating status of each production equipment in the industrial LAN environment; reduce human operation errors, ensure the information security of closed production, and prevent code leakage.
[0032] (2) The present invention builds the entire framework based on Jenkins, a continuous integration CI / CD tool, designs and implements an efficient continuous integration system that complies with current business processes, and realizes the automation of the entire process from code monitoring, system construction, compilation and release, significantly shortening the construction time and improving the efficiency of compilation and testing. At the same time, the concept of release strategy is introduced in the process of continuous deployment, and a specific version judgment method is used to accurately and multi-batch complete the compilation and release of project packages for industrial production equipment. Team members can complete the entire process through simple commands, greatly improving the business collaboration of the team. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0034] The present invention is further described in detail below in conjunction with examples, but the embodiments of the present invention are not limited thereto.
[0035] Embodiment 1:
[0036] Combined with Figure 1 As shown, a CI / CD-based industrial application software automatic release method includes:
[0037] Step S1, monitor the Gerrit code repository action and trigger the automatic compilation script; write the automatic compilation script, use the stage as the script execution node, and separate each execution process;
[0038] Step S2: determine whether the continuous integration process is completed. If it is completed, generate a project package to the specified directory, add the project package information to the project package release strategy option, and proceed to the next step; otherwise, visualize the continuous integration process and push it to each project member through email or other means at key nodes;
[0039] Step S3, generating a project package strategy task;
[0040] Step S4, determine whether there is a project package strategy task that needs to be executed currently, if yes, proceed to the next step, otherwise update the project package strategy task queue regularly;
[0041] Step S5, executing the project package strategy task continuous deployment;
[0042] Step S6, determine whether the project package version update of the current device has been completed. If completed, output the process information to the console to visualize the process information and proceed to the next step; otherwise, return to step S5;
[0043] Step S7: If the project package strategy tasks are executed correctly, the application software will be successfully released and displayed visually.
[0044] Furthermore, the project package information includes a project package name, a project package storage address, a project package file size, a project package unique code, an internal version number, a display version number and a description.
[0045] Furthermore, the project package release strategy includes a strategy release mode, a coverage type, a strategy description, a strategy start date, a strategy end date, a strategy start time, a strategy end time, a strategy actual start time, and a strategy actual end time.
[0046] Furthermore, the policy issuance method includes a method for determining a unique device.
[0047] Furthermore, the method of determining the unique device is SN or MAC address.
[0048] Furthermore, the coverage type includes two methods: SN / MAC address interval determination and SN / MAC address precise determination, which are used to select batch operations or for a certain device.
[0049] Furthermore, the step S3 also includes using the project package file size and project package file data as encryption coefficients, setting a buffer to read the project package file in blocks and calculate the MD5 hash, and after completing the splicing of all the block MD5 values, using it as the file unique code, comparing the unique codes and internal version numbers of all files in the specified directory, if there is no duplication, storing it in the database, otherwise, clearing the generated project package.
[0050] The present invention determines the published version number through multi-field comparison rather than a single code tag, which is beneficial to improving the accuracy of the published project package; the automated application compilation, process visualization and process message push based on CI / CD effectively determine the operating status of each production equipment in the industrial LAN environment; reduce human operation errors, ensure the information security of closed production, and prevent code leakage.
[0051] Embodiment 2:
[0052] An industrial application software automatic release system based on CI / CD, including:
[0053] The compilation module is used to trigger the automatic compilation script after monitoring the Gerrit code repository actions;
[0054] The judgment module is used to judge whether the continuous integration process is completed; to judge whether there is a project package strategy task that needs to be executed; and to judge whether the project package version update of the current device has been completed; and to judge whether the execution of the project package strategy task has been completed and all are correct;
[0055] The project package generation module is used to generate the project package to the specified directory when the continuous integration process is completed;
[0056] A release strategy configuration module is used to add project package information to the project package release strategy options and generate project package strategy tasks;
[0057] The project package strategy task module is used to regularly update the project package strategy task queue and execute the continuous deployment of project package strategy tasks;
[0058] The visualization display module is used to visualize the continuous integration process, successful application software release, and output process information when the project package version update of the current device is completed.
[0059] Although the present invention is described herein with reference to the illustrative embodiments of the present invention, the above embodiments are only preferred embodiments of the present invention, and the embodiments of the present invention are not limited to the above embodiments. It should be understood that those skilled in the art can design many other modifications and embodiments, which will fall within the scope and spirit of the principles disclosed in this application.
Claims
1. A CI / CD-based industrial application software automated release method, characterized in that: include: Step S1: monitor the Gerrit code repository action and trigger the automatic compilation script; Step S2: determine whether the continuous integration process is completed. If completed, generate a project package to a specified directory, add the project package information to the project package release strategy option, and proceed to the next step; Otherwise, visualize the continuous integration process; Step S3, generating a project package strategy task; Step S4, determine whether there is a project package strategy task that needs to be executed currently, if yes, proceed to the next step, otherwise update the project package strategy task queue regularly; Step S5, executing the project package strategy task continuous deployment; Step S6: determine whether the project package version update of the current device has been completed. If completed, output the process information to the console to visualize the process information and proceed to the next step; Otherwise, return to step S5; Step S7: If the project package strategy tasks are executed correctly, the application software will be successfully released and displayed visually.
2. According to claim 1, a CI / CD-based industrial application software automatic release method is characterized in that: The project package information includes the project package name, the project package storage address, the project package file size, the project package unique code, the internal version number, the display version number and the description.
3. The method for automatically publishing industrial application software based on CI / CD according to claim 2, characterized in that: The project package release strategy includes a strategy release method, a coverage type, a strategy description, a strategy start date, a strategy end date, a strategy start time, a strategy end time, a strategy actual start time, and a strategy actual end time.
4. The method for automatically publishing industrial application software based on CI / CD according to claim 3, characterized in that: The policy issuance method includes a method for determining a unique device.
5. The method for automatically publishing industrial application software based on CI / CD according to claim 4, characterized in that: The method of determining a unique device is SN or MAC address.
6. The method for automated release of industrial application software based on CI / CD according to claim 5, characterized in that: The coverage type includes two methods: SN / MAC address interval determination and SN / MAC address accurate determination.
7. The method for automatically publishing industrial application software based on CI / CD according to claim 2, characterized in that: The step S3 also includes using the project package file size and project package file data as encryption coefficients, setting a buffer to read the project package file in blocks and calculate the MD5 hash, and after completing the splicing of all the block MD5 values, using it as the file unique code, comparing the unique code and internal version number of all files in the specified directory, if there is no duplication, storing it in the database, otherwise, clearing the generated project package.
8. An industrial application software automation release system based on CI / CD, characterized in that: include: The compilation module is used to trigger the automatic compilation script after monitoring the Gerrit code repository actions; The judgment module is used to judge whether the continuous integration process is completed; to judge whether there is a project package strategy task that needs to be executed; and to judge whether the project package version update of the current device has been completed; and to judge whether the execution of the project package strategy task has been completed and all are correct; The project package generation module is used to generate the project package to the specified directory when the continuous integration process is completed; A release strategy configuration module is used to add project package information to the project package release strategy options and generate project package strategy tasks; The project package strategy task module is used to regularly update the project package strategy task queue and execute the continuous deployment of project package strategy tasks; The visualization display module is used to visualize the continuous integration process, successful application software release, and output process information when the project package version update of the current device is completed.