Automated deployment method and system for platform software
By automatically deploying methods and systems, and generating and executing deployment scripts, the cumbersome and time-consuming problem of traditional software deployment is solved, rapid deployment and high efficiency are achieved, and the needs of different environments are adapted.
Patent Information
- Application Number
- CN202411089644.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-08-09
AI Technical Summary
Traditional software deployment methods are cumbersome and time-consuming, and cannot meet the needs of rapid iteration and deployment, reducing the market response speed and deployment efficiency of the software system.
Provides an automated deployment method and system for platform software. By obtaining a collection of files of the platform software to be deployed, detecting the target system environment, generating deployment scripts, including file decompression, service registration and self-test scripts, it realizes automated deployment, and uses pre-training. The software deployment model dynamically generates scripts to adapt to different environments.
It achieves rapid iteration and deployment, shortens deployment time, improves market response speed and deployment efficiency, and provides flexibility to adapt to specific needs of different customers and environments.
Smart Images

Figure CN118642720B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method and system for automatically deploying platform software. Background Art
[0002] With the rapid development of information technology, software systems are being updated and iterated more frequently. In order to adapt to market changes and user needs, the frequency of software deployment has also increased. Software systems are usually composed of multiple different components, each of which has its own specific configuration requirements and dependencies.
[0003] In the related art, traditional deployment methods usually involve manual configuration of multiple components. The process of manually configuring each component is not only cumbersome but also time-consuming. From downloading the installation package, decompressing the files, setting the configuration file to registering the service, the implementation personnel need to invest a lot of time and energy, which cannot meet the needs of rapid iteration and deployment, thus reducing the market response speed and deployment efficiency of the software system. Summary of the invention
[0004] The embodiments of the present application provide a method and system for automated deployment of platform software. In order to have a basic understanding of some aspects of the disclosed embodiments, a simple summary is given below. This summary is not a general review, nor is it intended to identify key / important components or describe the scope of protection of these embodiments. Its only purpose is to present some concepts in a simple form as a preface to the detailed description that follows.
[0005] In a first aspect, an embodiment of the present application provides a method for automated deployment of platform software, the method comprising:
[0006] Obtaining a file set of the platform software to be deployed, the file set including an executable file, and the executable file is used to provide a user with a visual icon for generating a deployment instruction;
[0007] Upon receiving the deployment instruction generated by the trigger of the executable file, the deployment environment of the target system is detected to obtain the environment detection result, where the target system is a computer or server where the platform software to be deployed is deployed;
[0008] Generate a deployment script for the platform software to be deployed based on the environment detection results. The deployment script includes a file decompression script, a service registration script, and a self-test script. The file decompression script is used to decompress the file to the specified file directory, the service registration script is used to register the service as a Windows system service, and the self-test script is used to verify whether all services are running normally.
[0009] Based on the deployment script, the file collection is automatically deployed.
[0010] Optionally, the file set of the platform software to be deployed also includes a Java service jar package, a front-end service file, an Nginx installation package, a relational database installation package, and a time series database installation package;
[0011] Based on the deployment script, the file collection is automatically deployed, including:
[0012] Obtain the operating environment parameters of the platform software to be deployed;
[0013] Create a target folder for the target system operating environment based on the operating environment parameters of the platform software to be deployed;
[0014] Configure the identification information of the target folder and the identification information of the Java service jar package, the front-end service file, the Nginx installation package, the relational database installation package, and the time series database installation package into the file decompression script, the service registration script, and the self-check script to obtain the target file decompression script, the target service registration script, and the target self-check script;
[0015] According to the target file decompression script, target service registration script and target self-check script, the Java service jar package, front-end service file, Nginx installation package, relational database installation package and time series database installation package are automatically deployed.
[0016] Optionally, according to the target file decompression script, target service registration script, and target self-check script, automatically deploy the Java service jar package, front-end service file, Nginx installation package, relational database installation package, and time series database installation package, including:
[0017] Execute the target file decompression script to decompress the front-end service files, Nginx installation package, relational database installation package, and time series database installation package into the specified directory of the target folder;
[0018] Execute the target service registration script to register the services corresponding to the Nginx installation package, relational database installation package, time series database installation package, and Java service jar package as Windows system services;
[0019] Run Windows system services to start the platform software to be deployed;
[0020] During the operation of the platform software to be deployed, execute the target self-check script to perform a self-check on the platform software to be deployed and verify whether all services are running normally.
[0021] Optionally, based on the environment detection results, generate a deployment script for the platform software to be deployed, including:
[0022] Inputting the environmental detection results into a pre-trained software deployment model, the pre-trained software deployment model is used to predict a sequence of deployment steps of the platform software to be deployed in the target system based on the environmental detection results;
[0023] Output the target deployment step sequence corresponding to the platform software to be deployed in the target system;
[0024] Generate a deployment script for the platform software to be deployed based on the target deployment step sequence.
[0025] Optionally, follow these steps to generate a pre-trained software deployment model, including:
[0026] Collect historical environment test results of computers or servers where the platform software to be deployed has been deployed. The historical environment test results include operating system type and version, CPU model, number of cores and main frequency, memory size and type, storage space capacity and type, and network configuration;
[0027] The historical environment detection results are converted into feature vectors to obtain multiple feature vectors;
[0028] Collect historical deployment cases of the platform software to be deployed in computers or servers, including successful and failed configuration records;
[0029] Standardize the data format and label the data of historical deployment cases to obtain the sequence of manual deployment steps;
[0030] The manual deployment step sequence is used as the actual step sequence. The manual deployment step sequence is converted in the order of configuration time.
[0031] Using actual step sequences to label multiple feature vectors to obtain model training data;
[0032] Generate a pre-trained software deployment model based on model training data.
[0033] Optionally, generate a pre-trained software deployment model based on the model training data, including:
[0034] A sequence prediction neural network is used to create an initial neural network. The sequence prediction neural network is an LSTM neural network or a Transformer neural network.
[0035] The loss function in the initial neural network is replaced with a preset sequence loss function to obtain a software deployment model; the preset sequence loss function is used to predict the difference between the deployment step sequence and the actual step sequence;
[0036] Input the model training data into the software deployment model and output the model loss value;
[0037] When the model loss value reaches a minimum, a pre-trained software deployment model is generated; or, when the model loss value does not reach a minimum, the step of inputting the model training data into the software deployment model is continued until the model loss value reaches a minimum.
[0038] Optionally, the preset sequence loss function is:
[0039]
[0040] in, is the model loss value, To predict the sequence length of a sequence of deployment steps, is the number of categories of the actual step sequence, is at the time step The one-hot encoding of the true label, is the model at time step Predicted as class probability.
[0041] Optionally, input the model training data into the software deployment model and output the model loss value, including:
[0042] The model training data is processed through multiple layers included in the software deployment model to obtain the forward propagation result; each layer includes a weight matrix, a bias vector and an activation function;
[0043] According to the result of forward propagation, a prediction sequence is generated through the softmax layer included in the software deployment model;
[0044] The preset sequence loss function is used to calculate the loss between the predicted sequence and the true label sequence of the model training data to obtain the model loss value;
[0045] Output the model loss value.
[0046] Optionally, generate a deployment script for the platform software to be deployed according to the target deployment step sequence, including:
[0047] Get the basic template for creating scripts;
[0048] Use CI / CD tools to convert each target deployment step in the target deployment step sequence into functions and commands in the basic template;
[0049] Integrate the converted functions and commands according to the preset script type to obtain the file decompression script, service registration script and self-check script;
[0050] Use the file decompression script, service registration script, and self-check script as the deployment script for the platform software to be deployed.
[0051] In a second aspect, an embodiment of the present application provides an automated deployment system for platform software, the system comprising:
[0052] A file collection acquisition module, used to acquire a file collection of the platform software to be deployed, the file collection includes an executable file, and the executable file is used to provide a user with a visual icon for generating a deployment instruction;
[0053] A deployment environment detection module is used to detect the deployment environment of the target system when receiving the deployment instruction generated by the trigger of the executable file, and obtain the environment detection result. The target system is a computer or server where the platform software to be deployed is deployed;
[0054] The deployment script generation module is used to generate the deployment script of the platform software to be deployed according to the environment detection results. The deployment script includes a file decompression script, a service registration script and a self-test script. The file decompression script is used to decompress the file to the specified file directory, the service registration script is used to register the service as a Windows system service, and the self-test script is used to verify whether all services are running normally.
[0055] The automated deployment module is used to automatically deploy a collection of files based on deployment scripts.
[0056] The technical solution provided by the embodiments of the present application may have the following beneficial effects:
[0057] In the embodiments of the present application, on the one hand, the present application sets an executable file in the file collection of the platform software to be deployed, and the executable file is used to provide the user with a visual icon for generating deployment instructions, so that the user can complete the system deployment with one click by clicking the visual icon, which can meet the needs of rapid iteration and deployment; on the other hand, the present application can automatically generate a deployment script for the platform software to be deployed, and the script specifically includes a file decompression script, a service registration script and a self-check script, so that the automatic processing of file decompression, service registration and self-check can be realized, which speeds up the deployment speed, shortens the deployment time, and thus improves the market response speed and deployment efficiency of the software system. At the same time, the deployment script of the platform software to be deployed can be dynamically generated based on different target systems, and the dynamically generated script provides a high degree of flexibility, so that the same software can adapt to the specific needs of different customers or different environments.
[0058] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0060] Figure 1 It is a flowchart of an automated deployment method of platform software provided in an embodiment of the present application;
[0061] Figure 2 It is a schematic diagram of an implementation scenario of a platform software to be deployed provided by this application;
[0062] Figure 3 It is a flowchart of a software deployment model training method provided by this application;
[0063] Figure 4 It is a structural diagram of an automated deployment system for platform software provided by this application;
[0064] Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0065] The following description and the accompanying drawings sufficiently illustrate specific embodiments of the present application to enable those skilled in the art to practice them.
[0066] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0067] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of systems and methods consistent with some aspects of the present application as detailed in the attached claims.
[0068] In the description of the present application, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.
[0069] The present application provides an automated deployment method and system for platform software to solve the problems existing in the above-mentioned related technical problems. In the embodiments of the present application, on the one hand, the present application sets an executable file in the file collection of the platform software to be deployed, and the executable file is used to provide the user with a visual icon for generating deployment instructions, so that the user can complete the system deployment with one-click operation by clicking the visual icon, which can meet the needs of rapid iteration and deployment; on the other hand, the present application can automatically generate the deployment script of the platform software to be deployed, and the script specifically includes a file decompression script, a service registration script and a self-check script, so that the automatic processing of file decompression, service registration and self-check can be realized, which speeds up the deployment speed and shortens the deployment time, thereby improving the market response speed and deployment efficiency of the software system. At the same time, the deployment script of the platform software to be deployed can be dynamically generated based on different target systems. The dynamically generated script provides a high degree of flexibility, so that the same software can adapt to the specific needs of different customers or different environments. The following exemplary embodiments are used for detailed description.
[0070] The following will be combined with the attached Figure 1 -Attached Figure 3 , the automated deployment method of platform software provided in the embodiment of the present application is introduced in detail. The method can be implemented by a computer program and can be run on an automated deployment system of platform software based on the von Neumann system. The computer program can be integrated into an application or run as an independent tool application.
[0071] See also Figure 1 , which is a flow chart of an automated deployment method of platform software provided in the present application embodiment. Figure 1 As shown, the method of the embodiment of the present application may include the following steps:
[0072] S101, obtaining a file set of the platform software to be deployed, the file set including an executable file, and the executable file is used to provide a user with a visual icon for generating a deployment instruction;
[0073] The platform software to be deployed refers to the software to be installed on the target system, which may include applications, services, tools, etc. A file collection refers to a group of files related to the platform software to be deployed, which are all the resources required for software deployment. An executable file is a program file that, when a user runs it, can start a software program or perform a series of predefined operations. A visual icon that generates deployment instructions refers to a graphical element in the user interface, such as a button or icon, which a user can click to trigger the software deployment process. This icon is visual, meaning that it is visible on the user interface and provides an interactive way to start the deployment.
[0074] In some embodiments of the present application, the implementation personnel first upload the file collection of the platform software to be deployed to the deployment environment, and the deployment environment can obtain the file collection of the platform software to be deployed. The implementation personnel can generate the deployment instructions generated by the executable file trigger by triggering the file collection including the executable file.
[0075] For example, the platform software to be deployed may be a boiler combustion optimization system, which is an intelligent system used to improve boiler combustion efficiency and reduce pollutant emissions. The system collects boiler operation data and uses advanced algorithms for analysis and optimization, thereby achieving intelligent regulation of the combustion process. After the system is developed, implementation personnel will enter the customer site for private deployment. The boiler combustion optimization system includes executable files and installation packages.
[0076] Specifically, the platform software to be deployed is SuperApp, an application that implements multiple functions of boiler combustion optimization. The executable file is, for example, install_superapp.exe, and the file collection is the installation package of SuperApp, namely, Java service jar package, front-end service file, Nginx installation package, relational database installation package, and time series database installation package. On the installation wizard interface of SuperApp, there is an obvious "Start Installation" button. When the user clicks this button, the install_superapp.exe file will be executed, thereby starting the software deployment process.
[0077] In some embodiments, the implementer first downloads the installation package of the SuperApp, which contains all the necessary file sets. The user clicks to trigger the installation of the install_superapp.exe file in the installation package, and the client sends a command to the system to deploy the SuperApp, starting the automated deployment process of the platform software to be deployed.
[0078] S102, upon receiving the deployment instruction generated by triggering the executable file, detecting the deployment environment of the target system to obtain an environment detection result, where the target system is a computer or server on which the platform software to be deployed is deployed;
[0079] The deployment instructions refer to commands or signals that trigger the software deployment process, and these instructions can be issued by users by clicking on visual icons. The computer or server where the platform software to be deployed is deployed is the environment where the software will be installed and run.
[0080] In an embodiment of the present application, when a deployment instruction generated by a trigger for an executable file is received, the server's operating system version, memory, disk space, network connection, etc. can be tested. After the test is completed, the environmental test results of the computer or server can be obtained.
[0081] S103, generating a deployment script for the platform software to be deployed according to the environment detection result, the deployment script including a file decompression script, a service registration script and a self-check script, the file decompression script is used to decompress the file to a specified file directory, the service registration script is used to register the service as a Windows system service, and the self-check script is used to verify whether all services are running normally;
[0082] In some embodiments of the present application, the specific process of generating a deployment script for the platform software to be deployed based on the environmental detection results includes: inputting the environmental detection results into a pre-trained software deployment model, the pre-trained software deployment model is used to predict the deployment step sequence of the platform software to be deployed in the target system based on the environmental detection results; outputting the target deployment step sequence corresponding to the platform software to be deployed in the target system; and generating a deployment script for the platform software to be deployed based on the target deployment step sequence.
[0083] Specifically, the specific process of generating a deployment script for the platform software to be deployed according to the target deployment step sequence includes: obtaining a basic template for creating a script; using a CI / CD tool to convert each target deployment step in the target deployment step sequence into functions and commands in the basic template; integrating the converted functions and commands according to preset script types to obtain a file decompression script, a service registration script, and a self-test script; and using the file decompression script, the service registration script, and the self-test script as the deployment script for the platform software to be deployed.
[0084] The pre-trained software deployment model is a model trained using machine learning or artificial intelligence technology, which can predict the best steps for software deployment based on the results of environmental detection. The model predicts a series of deployment steps based on the input environmental detection results. These steps are the deployment sequence that the model determines is most suitable for the target system. The prediction result of the model is a specific sequence of deployment steps, which will be used as a guide during the deployment process. The deployment script of the platform software to be deployed contains all the necessary commands and operations for installing and configuring the software in the target system.
[0085] For example, the environmental detection results include information such as the operating system type, CPU model, memory size, storage space, installed dependent software, etc. The operating system type, CPU model, memory size, storage space, installed dependent software, etc. are input into the pre-trained software deployment model. The model analyzes this information and predicts and outputs the deployment steps of the platform software to be deployed on the target system, such as installing the database first, configuring the network, and finally starting the service. A deployment script is generated based on the output deployment steps of the platform software to be deployed on the target system.
[0086] In an embodiment of the present application, a pre-trained software deployment model can be generated according to the following steps, specifically including: collecting historical environmental detection results of computers or servers on which the platform software to be deployed has been historically deployed, the historical environmental detection results including the operating system type and version, CPU model, number of cores and main frequency, memory size and type, storage space capacity and type, and network configuration; converting the historical environmental detection results into feature vectors to obtain multiple feature vectors; collecting historical deployment cases for deploying the platform software to be deployed in computers or servers, the historical deployment cases including successful and failed configuration records; standardizing the data format and labeling the data for the historical deployment cases to obtain a manual deployment step sequence; using the manual deployment step sequence as the actual step sequence, the manual deployment step sequence is converted in chronological order of configuration; using the actual step sequence to label multiple feature vectors to obtain model training data; and generating a pre-trained software deployment model based on the model training data.
[0087] S104, based on the deployment script, automatically deploy the file set.
[0088] In some embodiments of the present application, the specific process of automatically deploying a file collection based on a deployment script includes: obtaining the operating environment parameters of the platform software to be deployed; creating a target folder for the target system operating environment based on the operating environment parameters of the platform software to be deployed; configuring the identification information of the target folder and the identification information of the Java service jar package, front-end service file, Nginx installation package, relational database installation package, and time series database installation package into the file decompression script, service registration script, and self-test script to obtain the target file decompression script, target service registration script, and target self-test script; according to the target file decompression script, target service registration script, and target self-test script, the Java service jar package, front-end service file, Nginx installation package, relational database installation package, and time series database installation package are automatically deployed.
[0089] Specifically, according to the target file decompression script, the target service registration script and the target self-check script, the specific process of automatically deploying the Java service jar package, the front-end service file, the Nginx installation package, the relational database installation package, and the time series database installation package includes: executing the target file decompression script to decompress the front-end service file, the Nginx installation package, the relational database installation package, and the time series database installation package to the specified directory of the target folder; executing the target service registration script to register the services corresponding to the Nginx installation package, the relational database installation package, the time series database installation package and the Java service jar package as Windows system services; running the Windows system service to start the platform software to be deployed for operation; during the operation of the platform software to be deployed, executing the target self-check script to perform a self-check on the platform software to be deployed to verify whether all services are running normally.
[0090] For example Figure 2 As shown, the file set of the platform software to be deployed includes an executable file .exe. By triggering the executable file .exe by the implementer, the target system can decompress the file set of the platform software to be deployed including the front-end service files, Nginx installation package, relational database installation package, and time series database installation package to the specified directory of the target folder, and at the same time register the services corresponding to the Nginx installation package, relational database installation package, time series database installation package and Java service jar package in the specified directory as Windows system services.
[0091] In the embodiments of the present application, on the one hand, the present application sets an executable file in the file collection of the platform software to be deployed, and the executable file is used to provide the user with a visual icon for generating deployment instructions, so that the user can complete the system deployment with one click by clicking the visual icon, which can meet the needs of rapid iteration and deployment; on the other hand, the present application can automatically generate a deployment script for the platform software to be deployed, and the script specifically includes a file decompression script, a service registration script and a self-check script, so that the automatic processing of file decompression, service registration and self-check can be realized, which speeds up the deployment speed, shortens the deployment time, and thus improves the market response speed and deployment efficiency of the software system. At the same time, the deployment script of the platform software to be deployed can be dynamically generated based on different target systems, and the dynamically generated script provides a high degree of flexibility, so that the same software can adapt to the specific needs of different customers or different environments.
[0092] See also Figure 3 , is a flowchart of a software deployment model training method provided by an embodiment of the present application. Figure 3 As shown, the method of the embodiment of the present application may include the following steps:
[0093] S201, collecting historical environment detection results of computers or servers on which the platform software to be deployed has been historically deployed, the historical environment detection results including operating system type and version, CPU model, number of cores and main frequency, memory size and type, storage space capacity and type, and network configuration;
[0094] Among them, historical deployment refers to software deployment activities carried out on computers or servers in the past, historical environment detection results refer to data about the target system environment collected during the previous deployment process, and operating system type and version refer to the type of operating system installed on the target computer or server (such as Windows, Linux, etc.) and its specific version number. CPU model, number of cores and main frequency refer to the model of the central processing unit, the number of cores it has, and the clock frequency of each core. Memory size and type refers to the memory capacity installed in the computer or server and the type of memory (such as DDR3, DDR4, etc.). Storage space capacity and type refers to the total capacity of the hard disk or solid-state drive of the computer or server and the type of storage media. Network configuration refers to the network settings of the computer or server, including information such as IP address, subnet mask, gateway, DNS server, etc.
[0095] In an embodiment of the present application, when model training is required, it is necessary to collect historical environment detection results of computers or servers on which the platform software to be deployed has been historically deployed.
[0096] S202, converting the historical environment detection result into a feature vector to obtain a plurality of feature vectors;
[0097] In machine learning and data analysis, a feature vector is a list of values that represents the attributes of an instance (in this scenario, the system environment for each deployment). Each value is called a feature or attribute value. It converts raw data (such as text descriptions, category labels, etc.) into numerical form so that it can be processed by machine learning algorithms.
[0098] In an embodiment of the present application, the conversion of historical environmental detection results into a feature vector involves the following steps: Data cleaning: remove invalid or erroneous data to ensure data quality. Feature selection: determine which environmental detection results are important and use them as features. Feature encoding: convert non-numeric data (such as operating system type) into numerical data, which may involve One-Hot Encoding, Label Encoding and other technologies. Feature standardization or normalization: adjust the numerical range of the feature to make its impact on the model more balanced. Feature vector construction: combine the numerical attributes of each environmental detection result into a vector.
[0099] For example, the following environment detection results are collected: operating system type (Windows or Linux), number of CPU cores (4 cores or 8 cores), memory size (8GB or 16GB). The process of converting to feature vectors may be: Convert the operating system type to a numerical value: Windows=0, Linux=1. Directly express the number of CPU cores as a numerical value: 4 cores=4, 8 cores=8. Convert the memory size to a numerical value: 8GB=8, 16GB=16. If the system environment of a certain deployment is Linux, 8-core CPU and 16GB memory, its feature vector may be: [1, 8, 16].
[0100] S203, collecting historical deployment cases of deploying the platform software to be deployed in the computer or server, the historical deployment cases including successful and failed configuration records;
[0101] Among them, historical deployment cases refer to the details of the software deployment or configuration process recorded in the past, including all relevant environmental parameters and deployment steps.
[0102] S204, standardizing the data format and labeling the data of the historical deployment cases to obtain a manual deployment step sequence;
[0103] Among them, data format standardization is to convert data into a unified format for further analysis and processing. This may include unified timestamp format, numerical units, text encoding, etc. Manual deployment step sequence is a series of deployment steps performed manually without the assistance of automated tools. These steps may include installing software, configuring the system, starting services, etc.
[0104] For example, collect all relevant data of historical deployment cases, remove invalid or incomplete data records, ensure data accuracy, convert data into a unified format, such as converting all timestamps into ISO 8601 format, converting all text data into a unified character encoding, and converting them into labels to obtain a manual deployment step sequence.
[0105] S205, taking the manual deployment step sequence as the actual step sequence, the manual deployment step sequence is converted according to the configuration time sequence;
[0106] S206, labeling multiple feature vectors using an actual step sequence to obtain model training data;
[0107] S207: Generate a pre-trained software deployment model based on the model training data.
[0108] In some embodiments, the specific process of generating a pre-trained software deployment model based on model training data includes: using a sequence prediction neural network to create an initial neural network, the sequence prediction neural network is an LSTM neural network or a Transformer neural network; replacing the loss function in the initial neural network with a preset sequence loss function to obtain a software deployment model; the preset sequence loss function is used to predict the difference between the deployment step sequence and the actual step sequence; inputting the model training data into the software deployment model and outputting the model loss value; when the model loss value reaches the minimum, generating a pre-trained software deployment model; or, when the model loss value has not reached the minimum, continuing to execute the step of inputting the model training data into the software deployment model until the model loss value reaches the minimum.
[0109] Specifically, the preset sequence loss function is:
[0110]
[0111] in, is the model loss value, To predict the sequence length of a sequence of deployment steps, is the number of categories of the actual step sequence, is at the time step The one-hot encoding of the true label, is the model at time step Predicted as class probability.
[0112] Specifically, the model training data is input into the software deployment model, and the specific process of outputting the model loss value includes: processing the model training data through multiple layers included in the software deployment model to obtain the result of forward propagation; each layer includes a weight matrix, a bias vector and an activation function; according to the result of forward propagation, a prediction sequence is generated through the softmax layer included in the software deployment model; a preset sequence loss function is used to calculate the loss between the prediction sequence and the real label sequence of the model training data to obtain the model loss value; and the model loss value is output.
[0113] In the embodiments of the present application, on the one hand, the present application sets an executable file in the file collection of the platform software to be deployed, and the executable file is used to provide the user with a visual icon for generating deployment instructions, so that the user can complete the system deployment with one click by clicking the visual icon, which can meet the needs of rapid iteration and deployment; on the other hand, the present application can automatically generate a deployment script for the platform software to be deployed, and the script specifically includes a file decompression script, a service registration script and a self-check script, so that the automatic processing of file decompression, service registration and self-check can be realized, which speeds up the deployment speed, shortens the deployment time, and thus improves the market response speed and deployment efficiency of the software system. At the same time, the deployment script of the platform software to be deployed can be dynamically generated based on different target systems, and the dynamically generated script provides a high degree of flexibility, so that the same software can adapt to the specific needs of different customers or different environments.
[0114] The following is a system embodiment of the present application, which can be used to execute the method embodiment of the present application. For details not disclosed in the system embodiment of the present application, please refer to the method embodiment of the present application.
[0115] See also Figure 4 , which shows a schematic diagram of the structure of an automated deployment system for platform software provided by an exemplary embodiment of the present application. The automated deployment system for platform software can be implemented as all or part of an electronic device through software, hardware, or a combination of both. The system 1 includes a file collection acquisition module 10, a deployment environment detection module 20, a deployment script generation module 30, and an automated deployment module 40.
[0116] A file collection acquisition module 10 is used to acquire a file collection of the platform software to be deployed, the file collection includes an executable file, and the executable file is used to provide a user with a visual icon for generating a deployment instruction;
[0117] The deployment environment detection module 20 is used to detect the deployment environment of the target system when receiving the deployment instruction generated by the trigger of the executable file, and obtain the environment detection result. The target system is a computer or server where the platform software to be deployed is deployed;
[0118] A deployment script generation module 30 is used to generate a deployment script for the platform software to be deployed according to the environment detection result. The deployment script includes a file decompression script, a service registration script, and a self-check script. The file decompression script is used to decompress the file to a specified file directory. The service registration script is used to register the service as a Windows system service. The self-check script is used to verify whether all services are running normally.
[0119] The automated deployment module 40 is used to automatically deploy the file set based on the deployment script.
[0120] It should be noted that the automated deployment system for platform software provided in the above embodiment only uses the division of the above functional modules as an example when executing the automated deployment method for platform software. In actual applications, the above functional distribution can be completed by different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the automated deployment system for platform software provided in the above embodiment and the automated deployment method for platform software embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.
[0121] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0122] In the embodiments of the present application, on the one hand, the present application sets an executable file in the file collection of the platform software to be deployed, and the executable file is used to provide the user with a visual icon for generating deployment instructions, so that the user can complete the system deployment with one click by clicking the visual icon, which can meet the needs of rapid iteration and deployment; on the other hand, the present application can automatically generate a deployment script for the platform software to be deployed, and the script specifically includes a file decompression script, a service registration script and a self-check script, so that the automatic processing of file decompression, service registration and self-check can be realized, which speeds up the deployment speed, shortens the deployment time, and thus improves the market response speed and deployment efficiency of the software system. At the same time, the deployment script of the platform software to be deployed can be dynamically generated based on different target systems, and the dynamically generated script provides a high degree of flexibility, so that the same software can adapt to the specific needs of different customers or different environments.
[0123] The present application also provides a computer-readable medium having program instructions stored thereon, which, when executed by a processor, implement the automated deployment method of the platform software provided by the above-mentioned various method embodiments.
[0124] The present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the automated deployment method of the platform software of each of the above-mentioned method embodiments.
[0125] See also Figure 5 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 5 As shown, the electronic device 1000 may include: at least one processor 1001 , at least one network interface 1004 , a user interface 1003 , a memory 1005 , and at least one communication bus 1002 .
[0126] The communication bus 1002 is used to realize the connection and communication between these components.
[0127] The user interface 1003 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 1003 may also include a standard wired interface and a wireless interface.
[0128] The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0129] Among them, the processor 1001 may include one or more processing cores. The processor 1001 uses various interfaces and lines to connect various parts of the entire electronic device 1000, and executes various functions and processes data of the electronic device 1000 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1005, and calling data stored in the memory 1005. Optionally, the processor 1001 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 1001 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 1001, and it can be implemented separately through a chip.
[0130] Among them, the memory 1005 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer-readable storage medium. The memory 1005 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 1005 may also be optionally at least one storage system located away from the aforementioned processor 1001. As Figure 5 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an automated deployment application of the platform software.
[0131] exist Figure 5 In the electronic device 1000 shown, the user interface 1003 is mainly used to provide an input interface for the user and obtain data input by the user; and the processor 1001 can be used to call the automatic deployment application of the platform software stored in the memory 1005, and specifically perform the following operations:
[0132] Obtaining a file set of the platform software to be deployed, the file set including an executable file, and the executable file is used to provide a user with a visual icon for generating a deployment instruction;
[0133] Upon receiving the deployment instruction generated by the trigger of the executable file, the deployment environment of the target system is detected to obtain the environment detection result, where the target system is a computer or server where the platform software to be deployed is deployed;
[0134] Generate a deployment script for the platform software to be deployed based on the environment detection results. The deployment script includes a file decompression script, a service registration script, and a self-test script. The file decompression script is used to decompress the file to the specified file directory, the service registration script is used to register the service as a Windows system service, and the self-test script is used to verify whether all services are running normally.
[0135] Based on the deployment script, the file collection is automatically deployed.
[0136] In one embodiment, when the processor 1001 automatically deploys the file set based on the deployment script, the processor 1001 specifically performs the following operations:
[0137] Obtain the operating environment parameters of the platform software to be deployed;
[0138] Create a target folder for the target system operating environment based on the operating environment parameters of the platform software to be deployed;
[0139] Configure the identification information of the target folder and the identification information of the Java service jar package, the front-end service file, the Nginx installation package, the relational database installation package, and the time series database installation package into the file decompression script, the service registration script, and the self-check script to obtain the target file decompression script, the target service registration script, and the target self-check script;
[0140] According to the target file decompression script, target service registration script and target self-check script, the Java service jar package, front-end service file, Nginx installation package, relational database installation package and time series database installation package are automatically deployed.
[0141] In one embodiment, when the processor 1001 executes the target file decompression script, the target service registration script, and the target self-check script to automatically deploy the Java service jar package, the front-end service file, the Nginx installation package, the relational database installation package, and the time series database installation package, the following operations are specifically performed:
[0142] Execute the target file decompression script to decompress the front-end service files, Nginx installation package, relational database installation package, and time series database installation package into the specified directory of the target folder;
[0143] Execute the target service registration script to register the services corresponding to the Nginx installation package, relational database installation package, time series database installation package, and Java service jar package as Windows system services;
[0144] Run Windows system services to start the platform software to be deployed;
[0145] During the operation of the platform software to be deployed, execute the target self-check script to perform a self-check on the platform software to be deployed and verify whether all services are running normally.
[0146] In one embodiment, when the processor 1001 generates a deployment script for the platform software to be deployed according to the environment detection result, the processor 1001 specifically performs the following operations:
[0147] Inputting the environmental detection results into a pre-trained software deployment model, the pre-trained software deployment model is used to predict a sequence of deployment steps of the platform software to be deployed in the target system based on the environmental detection results;
[0148] Output the target deployment step sequence corresponding to the platform software to be deployed in the target system;
[0149] Generate a deployment script for the platform software to be deployed based on the target deployment step sequence.
[0150] In one embodiment, when executing to generate a pre-trained software deployment model, the processor 1001 specifically performs the following operations:
[0151] Collect historical environment test results of computers or servers where the platform software to be deployed has been deployed. The historical environment test results include operating system type and version, CPU model, number of cores and main frequency, memory size and type, storage space capacity and type, and network configuration;
[0152] The historical environment detection results are converted into feature vectors to obtain multiple feature vectors;
[0153] Collect historical deployment cases of the platform software to be deployed in computers or servers, including successful and failed configuration records;
[0154] Standardize the data format and label the data of historical deployment cases to obtain the sequence of manual deployment steps;
[0155] The manual deployment step sequence is used as the actual step sequence. The manual deployment step sequence is converted in the order of configuration time.
[0156] Using actual step sequences to label multiple feature vectors to obtain model training data;
[0157] Generate a pre-trained software deployment model based on model training data.
[0158] In one embodiment, when the processor 1001 generates a pre-trained software deployment model based on model training data, the processor 1001 specifically performs the following operations:
[0159] A sequence prediction neural network is used to create an initial neural network. The sequence prediction neural network is an LSTM neural network or a Transformer neural network.
[0160] The loss function in the initial neural network is replaced with a preset sequence loss function to obtain a software deployment model; the preset sequence loss function is used to predict the difference between the deployment step sequence and the actual step sequence;
[0161] Input the model training data into the software deployment model and output the model loss value;
[0162] When the model loss value reaches a minimum, a pre-trained software deployment model is generated; or, when the model loss value does not reach a minimum, the step of inputting the model training data into the software deployment model is continued until the model loss value reaches a minimum.
[0163] In one embodiment, when the processor 1001 inputs the model training data into the software deployment model and outputs the model loss value, the processor 1001 specifically performs the following operations:
[0164] The model training data is processed through multiple layers included in the software deployment model to obtain the forward propagation result; each layer includes a weight matrix, a bias vector and an activation function;
[0165] According to the result of forward propagation, a prediction sequence is generated through the softmax layer included in the software deployment model;
[0166] The preset sequence loss function is used to calculate the loss between the predicted sequence and the true label sequence of the model training data to obtain the model loss value;
[0167] Output the model loss value.
[0168] In one embodiment, when the processor 1001 generates a deployment script for the platform software to be deployed according to the target deployment step sequence, the processor 1001 specifically performs the following operations:
[0169] Get the basic template for creating scripts;
[0170] Use CI / CD tools to convert each target deployment step in the target deployment step sequence into functions and commands in the basic template;
[0171] Integrate the converted functions and commands according to the preset script type to obtain the file decompression script, service registration script and self-check script;
[0172] Use the file decompression script, service registration script, and self-check script as the deployment script for the platform software to be deployed.
[0173] In the embodiments of the present application, on the one hand, the present application sets an executable file in the file collection of the platform software to be deployed, and the executable file is used to provide the user with a visual icon for generating deployment instructions, so that the user can complete the system deployment with one click by clicking the visual icon, which can meet the needs of rapid iteration and deployment; on the other hand, the present application can automatically generate a deployment script for the platform software to be deployed, and the script specifically includes a file decompression script, a service registration script and a self-check script, so that the automatic processing of file decompression, service registration and self-check can be realized, which speeds up the deployment speed, shortens the deployment time, and thus improves the market response speed and deployment efficiency of the software system. At the same time, the deployment script of the platform software to be deployed can be dynamically generated based on different target systems, and the dynamically generated script provides a high degree of flexibility, so that the same software can adapt to the specific needs of different customers or different environments.
[0174] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program for automatic deployment of platform software can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium of the program for automatic deployment of platform software can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0175] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A method for automated deployment of platform software, characterized in that: The method comprises: Acquire a file set of the platform software to be deployed, the file set including an executable file, and the executable file is used to provide a user with a visual icon for generating a deployment instruction; Upon receiving the deployment instruction generated by triggering the executable file, detecting the deployment environment of the target system to obtain an environment detection result, wherein the target system is a computer or server on which the platform software to be deployed is deployed; According to the environmental detection result, a deployment script of the platform software to be deployed is generated, wherein the deployment script includes a file decompression script, a service registration script and a self-check script, wherein the file decompression script is used to decompress the file to a specified file directory, the service registration script is used to register the service as a Windows system service, and the self-check script is used to verify whether all services are running normally; wherein, Generating a deployment script for the platform software to be deployed according to the environment detection result includes: Inputting the environmental detection result into a pre-trained software deployment model, wherein the pre-trained software deployment model is used to predict a deployment step sequence of the to-be-deployed platform software in the target system based on the environmental detection result; Outputting a target deployment step sequence corresponding to the platform software to be deployed in the target system; According to the target deployment step sequence, a deployment script of the platform software to be deployed is generated; wherein, Follow these steps to generate a pre-trained model for software deployment, including: Collect historical environment detection results of computers or servers that have historically deployed the platform software to be deployed, the historical environment detection results including operating system type and version, CPU model, number of cores and main frequency, memory size and type, storage space capacity and type, and network configuration; Converting the historical environment detection result into a feature vector to obtain a plurality of feature vectors; Collecting historical deployment cases of deploying the platform software to be deployed in the computer or server, wherein the historical deployment cases include successful and failed configuration records; Standardizing the data format and labeling the data of the historical deployment cases to obtain a manual deployment step sequence; The manual deployment step sequence is used as the actual step sequence, and the manual deployment step sequence is converted according to the configured time sequence; Using the actual step sequence to label the multiple feature vectors to obtain model training data; Based on the model training data, a pre-trained software deployment model is generated; wherein, The generating a pre-trained software deployment model based on the model training data includes: An initial neural network is created using a sequence prediction neural network, where the sequence prediction neural network is an LSTM neural network or a Transformer neural network; Replacing the loss function in the initial neural network with a preset sequence loss function to obtain a software deployment model; the preset sequence loss function is used to predict the difference between the deployment step sequence and the actual step sequence; Inputting the model training data into the software deployment model and outputting the model loss value; When the model loss value reaches the minimum, a pre-trained software deployment model is generated; or, when the model loss value does not reach the minimum, the step of inputting the model training data into the software deployment model is continued until the model loss value reaches the minimum; wherein, The preset sequence loss function is: in, is the model loss value, To predict the sequence length of a sequence of deployment steps, is the number of categories of the actual step sequence, is at the time step The one-hot encoding of the true label, is the model at time step Predicted as class The probability of Based on the deployment script, the file set is automatically deployed.
2. The method according to claim 1, characterized in that The file set of the platform software to be deployed also includes a Java service jar package, a front-end service file, an Nginx installation package, a relational database installation package, and a time series database installation package; The step of automatically deploying the file set based on the deployment script includes: Obtaining operating environment parameters of the platform software to be deployed; Based on the operating environment parameters of the platform software to be deployed, create a target folder of the target system operating environment; The identification information of the target folder and the identification information of the Java service jar package, the front-end service file, the Nginx installation package, the relational database installation package, and the time series database installation package are configured into the file decompression script, the service registration script, and the self-check script to obtain the target file decompression script, the target service registration script, and the target self-check script; According to the target file decompression script, target service registration script and target self-check script, the Java service jar package, front-end service file, Nginx installation package, relational database installation package and time series database installation package are automatically deployed.
3. The method according to claim 2, characterized in that The Java service jar package, the front-end service file, the Nginx installation package, the relational database installation package, and the time series database installation package are automatically deployed according to the target file decompression script, the target service registration script, and the target self-check script, including: Execute the target file decompression script to decompress the front-end service file, Nginx installation package, relational database installation package, and time series database installation package into a specified directory of the target folder; Execute the target service registration script to register the services corresponding to the Nginx installation package, the relational database installation package, the time series database installation package and the Java service jar package as Windows system services; Running the Windows system service to start the platform software to be deployed for operation; During the operation of the platform software to be deployed, the target self-check script is executed to perform a self-check on the platform software to be deployed to verify whether all services are running normally.
4. The method according to claim 1, characterized in that: The step of inputting the model training data into the software deployment model and outputting a model loss value comprises: Processing the model training data through multiple layers included in the software deployment model to obtain forward propagation results; each layer includes a weight matrix, a bias vector and an activation function; According to the result of the forward propagation, a prediction sequence is generated through a softmax layer included in the software deployment model; Using a preset sequence loss function to calculate the loss between the predicted sequence and the real label sequence of the model training data, to obtain a model loss value; Output the model loss value.
5. The method according to claim 1, characterized in that The step of generating a deployment script for the platform software to be deployed according to the target deployment step sequence includes: Get the basic template for creating scripts; Using a CI / CD tool to convert each target deployment step in the target deployment step sequence into a function and a command in the basic template; The functions and commands converted by integrating the preset script type are obtained to obtain a file decompression script, a service registration script and a self-check script; The file decompression script, service registration script and self-check script are used as deployment scripts of the platform software to be deployed.
6. An automated deployment system for platform software, characterized in that: The system comprises: A file collection acquisition module, used to acquire a file collection of the platform software to be deployed, wherein the file collection includes an executable file, and the executable file is used to provide a user with a visual icon for generating a deployment instruction; A deployment environment detection module, configured to detect the deployment environment of a target system upon receiving a deployment instruction generated by triggering the executable file, and obtain an environment detection result, wherein the target system is a computer or server on which the platform software to be deployed is deployed; A deployment script generation module is used to generate a deployment script for the platform software to be deployed according to the environmental detection result. The deployment script includes a file decompression script, a service registration script and a self-check script. The file decompression script is used to decompress the file to a specified file directory. The service registration script is used to register the service as a Windows system service. The self-check script is used to verify whether all services are running normally. Generating a deployment script for the platform software to be deployed according to the environment detection result includes: Inputting the environmental detection result into a pre-trained software deployment model, wherein the pre-trained software deployment model is used to predict a deployment step sequence of the to-be-deployed platform software in the target system based on the environmental detection result; Outputting a target deployment step sequence corresponding to the platform software to be deployed in the target system; According to the target deployment step sequence, a deployment script of the platform software to be deployed is generated; wherein, Follow these steps to generate a pre-trained model for software deployment, including: Collect historical environment detection results of computers or servers that have historically deployed the platform software to be deployed, the historical environment detection results including operating system type and version, CPU model, number of cores and main frequency, memory size and type, storage space capacity and type, and network configuration; Converting the historical environment detection result into a feature vector to obtain a plurality of feature vectors; Collecting historical deployment cases of deploying the platform software to be deployed in the computer or server, wherein the historical deployment cases include successful and failed configuration records; Standardizing the data format and labeling the data of the historical deployment cases to obtain a manual deployment step sequence; The manual deployment step sequence is used as the actual step sequence, and the manual deployment step sequence is converted according to the configured time sequence; Using the actual step sequence to label the multiple feature vectors to obtain model training data; Based on the model training data, a pre-trained software deployment model is generated; wherein, The generating a pre-trained software deployment model based on the model training data includes: An initial neural network is created using a sequence prediction neural network, where the sequence prediction neural network is an LSTM neural network or a Transformer neural network; Replacing the loss function in the initial neural network with a preset sequence loss function to obtain a software deployment model; the preset sequence loss function is used to predict the difference between the deployment step sequence and the actual step sequence; Inputting the model training data into the software deployment model and outputting the model loss value; When the model loss value reaches the minimum, a pre-trained software deployment model is generated; or, when the model loss value does not reach the minimum, the step of inputting the model training data into the software deployment model is continued until the model loss value reaches the minimum; wherein, The preset sequence loss function is: in, is the model loss value, To predict the sequence length of a sequence of deployment steps, is the number of categories of the actual step sequence, is at the time step The one-hot encoding of the true label, is the model at time step Predicted as class probability; The automated deployment module is used to automatically deploy the file set based on the deployment script.
