Remote deployment method and system for Linux system equipment software and program product
By remotely generating and transmitting instructions to the Linux system host through the client, the verification, replacement, permission change and restart of software files are automatically completed, solving the problems of complex manual operations and low security in the software deployment process of Linux system devices, and realizing efficient and reliable automated deployment.
Patent Information
- Application Number
- CN202510683469.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2025-09-26
AI Technical Summary
In the existing Linux system equipment software deployment process, manual operations are complex, insecure, time-consuming and labor-intensive, affecting development efficiency.
The client parses user data packets, generates and transmits remote commands to the Linux system host, and uses compilation tools to automatically complete software file verification, replacement, permission changes and restart operations to achieve automated deployment.
It simplifies the deployment process, avoids human errors, improves efficiency, and ensures security and reliability.
Smart Images

Figure CN120704707A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of software deployment, and in particular relates to a method, system and program product for remote deployment of Linux system device software. Background Art
[0002] In most software projects, software compilation and execution are not performed on the same device. Development and compilation are usually performed on a development and compilation server, while the software needs to be deployed to a target machine for execution. In the usual Linux system device software deployment and update process, after the software engineer compiles the target program file on the development machine, he will import the program and configuration files into the Linux system target machine for execution. In addition to importing the target program file, this process also requires file replacement and program restart. This manual operation deployment method has the following disadvantages: 1. Uploading the target program from the compiler machine to the target machine for execution requires multiple steps such as uploading files, replacing files, and restarting the program. The manual operation process is complicated and not very secure. 2. There are many steps to update the software, and each step requires manual operation, which is prone to errors. 3. During the software development and debugging process, the code needs to be frequently modified to update the software. This manual operation deployment method consumes too much time and developer energy, which affects development efficiency. Therefore, a more efficient and reliable software update deployment method is urgently needed. Summary of the Invention
[0003] The purpose of the present invention is to provide a method, system and program product for remote deployment of Linux system device software to solve the above-mentioned problems existing in the prior art.
[0004] In order to achieve the above object, the present invention adopts the following technical solutions: In a first aspect, a method for remotely deploying Linux system device software is provided, comprising: Parse the data package uploaded by the user to obtain the software file, software identifier and command set; In response to the user's execution operation instruction, a remote connection is established with the Linux system host, and a compilation identifier and a software identifier are sent to the Linux system host, so that the Linux system host determines the software deployment path of the corresponding software according to the software identifier and calls the compilation tool according to the compilation identifier; Extracting a transmission subcommand from the command set, generating a verification operation instruction for the software file according to the transmission subcommand, transmitting the software file and the verification operation instruction to a Linux system host, causing the Linux system host to compile the verification operation instruction using a compilation tool to generate a verification execution instruction, and verifying the software file according to the verification execution instruction; After receiving the verification pass information fed back by the Linux system host, extract the replacement subcommand from the command set, generate a replacement operation instruction according to the replacement subcommand, transmit the replacement operation instruction to the Linux system host, and make the Linux system host compile the replacement operation instruction using a compilation tool to generate a replacement execution instruction. Then, according to the replacement execution instruction, use the software file to replace the original file in the corresponding software deployment path; After receiving the replacement completion information fed back by the Linux system host, extract the change subcommand from the command set, generate a change operation instruction according to the change subcommand, transmit the change operation instruction to the Linux system host, and make the Linux system host compile the change operation instruction using a compilation tool to generate a change execution instruction, and then change the permissions of the software file according to the change execution instruction; After receiving the change completion information fed back by the Linux system host, extract the restart subcommand from the command set, generate a restart operation instruction according to the restart subcommand, transmit the restart operation instruction to the Linux system host, and make the Linux system host compile the restart operation instruction using a compilation tool to generate a restart execution instruction, and restart the corresponding software according to the restart execution instruction; After receiving the restart completion information fed back by the Linux system host, disconnect from the Linux system host.
[0005] In one possible design, the command set includes several sub-commands and serial numbers corresponding to each sub-command. The several sub-commands include a transfer sub-command, a replacement sub-command, a change sub-command and a restart sub-command. When extracting each sub-command from the command set, they are extracted sequentially according to the serial numbers corresponding to each sub-command.
[0006] In a possible design, the compilation tool is a compilation ring, and the compilation ring is provided with a plurality of first instruction characters and second instruction characters, and each first instruction character is arranged between each second instruction character.
[0007] In one possible design, using a compilation tool to compile the verification operation instruction to generate the verification execution instruction includes: Extract each verification operation instruction character from the verification operation instruction in sequence. Importing the corresponding verification operation instruction character into the compile loop, and determining the first instruction character matched by the corresponding verification operation instruction character; Searching clockwise along the compile loop for a first second instruction character that precedes the first instruction character matched by the corresponding verification operation instruction character, and associating the first second instruction character with the corresponding verification operation instruction character; The second instruction characters associated with each verification operation instruction character are combined in sequence to generate a verification execution instruction.
[0008] In one possible design, using a compilation tool to compile the replacement operation instruction to generate the replacement execution instruction includes: Extract each replacement operation instruction character from the replacement operation instruction in sequence, Importing the corresponding replacement operation instruction character into the compile loop, and determining the first instruction character matched by the corresponding replacement operation instruction character; Searching clockwise along the compile loop for a first second instruction character that precedes the first instruction character matched by the corresponding replacement operation instruction character, and associating the second instruction character with the corresponding replacement operation instruction character; The second instruction characters associated with each replacement operation instruction character are combined in sequence to generate a replacement execution instruction.
[0009] In one possible design, using a compilation tool to compile the modification operation instruction to generate the modification execution instruction includes: Extract each change operation instruction character from the change operation instruction in sequence, Importing the corresponding change operation instruction character into the compile loop, and determining the first instruction character that matches the corresponding change operation instruction character; Searching clockwise along the compile loop for a first second instruction character that precedes the first instruction character matched by the corresponding change operation instruction character, and associating the second instruction character with the corresponding change operation instruction character; The second instruction characters associated with each modification operation instruction character are sequentially combined to generate a modification execution instruction.
[0010] In one possible design, using a compilation tool to compile the restart operation instruction to generate the restart execution instruction includes: Extract each restart operation instruction character from the restart operation instruction in sequence. Importing the corresponding restart operation instruction character into the compile loop, and determining the first instruction character that matches the corresponding restart operation instruction character; Searching clockwise along the compile loop for a first second instruction character that precedes the first instruction character matched by the corresponding restart operation instruction character, and associating the second instruction character with the corresponding restart operation instruction character; The second instruction characters associated with each restart operation instruction character are combined in sequence to generate a restart execution instruction.
[0011] In one possible design, the verification execution instruction includes a check code of the software file, and verifying the software file according to the verification execution instruction includes: Use the MD5 information digest algorithm to calculate the software file and obtain the hash value corresponding to the software file; The hash value corresponding to the software file is compared with the verification code of the software file. If the two are consistent, the verification passes; otherwise, the verification fails.
[0012] In a second aspect, a remote deployment system for Linux system device software is provided, including a data parsing unit, a handshake docking unit, a transmission execution unit, a replacement execution unit, a change execution unit, a restart execution unit and a disconnection execution unit, wherein: A data parsing unit, used to parse the data packets uploaded by the user to obtain the software file, software identifier and command set; The handshake docking unit is used to establish a remote connection with the Linux system host in response to the user's execution operation instruction, and send a compilation identifier and a software identifier to the Linux system host, so that the Linux system host determines the software deployment path of the corresponding software according to the software identifier and calls the compilation tool according to the compilation identifier; a transmission execution unit, configured to extract a transmission subcommand from the command set, generate a verification operation instruction for the software file according to the transmission subcommand, transmit the software file and the verification operation instruction to the Linux system host, cause the Linux system host to compile the verification operation instruction using a compilation tool, generate a verification execution instruction, and verify the software file according to the verification execution instruction; The replacement execution unit is configured to, after receiving verification pass information fed back by the Linux system host, extract a replacement subcommand from the command set, generate a replacement operation instruction based on the replacement subcommand, transmit the replacement operation instruction to the Linux system host, enable the Linux system host to compile the replacement operation instruction using a compilation tool to generate a replacement execution instruction, and use the software file to replace the original file in the corresponding software deployment path according to the replacement execution instruction; The change execution unit is configured to extract a change subcommand from a command set after receiving replacement completion information fed back by the Linux system host, generate a change operation instruction according to the change subcommand, transmit the change operation instruction to the Linux system host, and cause the Linux system host to compile the change operation instruction using a compilation tool to generate a change execution instruction, and perform a permission change on the software file according to the change execution instruction; The restart execution unit is used to extract the restart subcommand from the command set after receiving the change completion information fed back by the Linux system host, generate a restart operation instruction according to the restart subcommand, transmit the restart operation instruction to the Linux system host, and enable the Linux system host to compile the restart operation instruction using a compilation tool to generate a restart execution instruction, and restart the corresponding software according to the restart execution instruction; The disconnection execution unit is used to disconnect the connection with the Linux system host after receiving the restart completion information fed back by the Linux system host.
[0013] In a third aspect, a remote deployment system for Linux system device software is provided, comprising: a memory for storing instructions; A processor is used to read the instructions stored in the memory and execute any one of the methods described in the first aspect according to the instructions.
[0014] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform any one of the methods described in the first aspect. Furthermore, a computer program product is provided that, when executed on a computer, performs any one of the methods described in the first aspect.
[0015] Beneficial effects: The present invention adopts a software remote deployment method, in which the client parses the configuration files and operation commands written by the user, responds to each deployment operation command in sequence, and remotely connects to the Linux system host to compile and execute the corresponding deployment process instructions, so as to automatically complete the reception verification of the software file, software version replacement, restart program and other operations, thereby realizing efficient and reliable software update deployment. The present invention integrates the deployment operations such as software file transmission, replacement and software restart into an automated and standardized implementation by the client responding to each sequential instruction to connect to the target host, which can avoid human errors and simplify the software deployment operation process, effectively saving developers the time spent on updating software versions and improving the efficiency of software development. At the same time, based on the compilation tool, the instructions in the deployment process are transferred and compiled, and the transmitted software files are verified, which can effectively ensure the security and reliability of the software deployment process. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 Schematic diagram of the steps of the method in Example 1 of the present invention; Figure 2 Schematic diagram of the compile ring structure in Example 1 of the present invention; Figure 3 This is a schematic diagram of the system structure in Example 3 of the present invention. DETAILED DESCRIPTION
[0018] It should be noted that the description of these embodiments is intended to help understand the present invention, but does not constitute a limitation of the present invention. The specific structural and functional details disclosed herein are merely intended to describe exemplary embodiments of the present invention. However, the present invention may be embodied in a variety of alternative forms, and should not be construed as being limited to the embodiments set forth herein.
[0019] It should be understood that, unless otherwise expressly specified or limited, the corresponding terms should be understood in a broad sense. For example, "connection" can refer to a fixed connection, a detachable connection, or an integral connection; it can refer to a direct connection, an indirect connection through an intermediate medium, or internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the embodiments based on specific circumstances.
[0020] In the following description, certain details are provided to facilitate a thorough understanding of the example embodiments. However, one skilled in the art will appreciate that the example embodiments may be practiced without these specific details. For example, devices may be shown in block diagrams to avoid obscuring the examples with unnecessary detail. In other embodiments, well-known processes, structures, and techniques may be shown without unnecessary detail to avoid obscuring the embodiments.
[0021] Example 1: This embodiment provides a method for remote deployment of Linux system device software, which can be applied to a corresponding client, and the client can establish a remote connection with the corresponding Linux system host. Figure 1 As shown, the method includes the following steps: S1. Parse the data package uploaded by the user to obtain the software file, software identifier and command set.
[0022] In a specific implementation, the user uploads an edited data package on the client. The data package contains software files, software identifiers, and a command set. The client parses the data package to obtain the software files, software identifiers, and command set. The command set contains several subcommands and serial numbers corresponding to each subcommand. The several subcommands include a transfer subcommand, a replace subcommand, a change subcommand, and a restart subcommand. When the client subsequently extracts each subcommand from the command set, it extracts them sequentially according to the serial numbers corresponding to each subcommand. For example, the serial number corresponding to the transfer subcommand is 1, the serial number corresponding to the replace subcommand is 2, the serial number corresponding to the change subcommand is 3, the serial number corresponding to the restart subcommand is 4, and so on.
[0023] S2. In response to the user's execution operation instruction, a remote connection is established with the Linux system host, and a compilation identifier and a software identifier are sent to the Linux system host, so that the Linux system host determines the software deployment path of the corresponding software according to the software identifier and calls the compilation tool according to the compilation identifier.
[0024] In specific implementation, when starting software deployment, the user first sends an execution instruction to the client. The client responds to the user's execution instruction and establishes a remote connection with the Linux system host, that is, a handshake connection with the Linux system host, and sends the software identifier and the corresponding compilation identifier to the Linux system host. The Linux system host determines the software deployment path of the corresponding software based on the software identifier and calls the compilation tool based on the compilation identifier. Figure 2 As shown, the compilation tool is a compilation ring, on which a plurality of first instruction characters (exemplarily, such as 1234567890) and second instruction characters (exemplarily, such as abcd) are arranged, and each first instruction character is arranged between each second instruction character.
[0025] S3. Extract the transmission subcommand from the command set, generate the verification operation instruction of the software file according to the transmission subcommand, transmit the software file and the verification operation instruction to the Linux system host, enable the Linux system host to use the compilation tool to compile the verification operation instruction, generate the verification execution instruction, and verify the software file according to the verification execution instruction.
[0026] In a specific implementation, the client first extracts a transmission subcommand from a command set based on a sequence number, then generates a verification operation instruction for the software file based on the transmission subcommand, and transmits the software file and the verification operation instruction to a Linux system host. After receiving the software file and the verification operation instruction, the Linux system host first sequentially extracts each verification operation instruction character from the verification operation instruction, imports the corresponding verification operation instruction character into a compilation loop, and determines the first instruction character that matches the corresponding verification operation instruction character. Then, the client searches for the first second instruction character that precedes the first instruction character that matches the corresponding verification operation instruction character in a clockwise direction along the compilation loop, and associates the first second instruction character with the corresponding verification operation instruction character (e.g., if the verification operation instruction character is 1, and the first instruction character that matches on the compilation loop is 1, and the first second instruction character that precedes the first instruction character 1 in the clockwise direction of the compilation loop is a, then the second instruction character a is associated with the corresponding verification operation instruction character 1, and so on). Finally, the second instruction characters associated with each verification operation instruction character are sequentially combined to generate a verification execution instruction.
[0027] In addition, the Linux system host also verifies the software file according to the verification execution instruction, and the verification execution instruction includes the verification code of the software file (pre-calculated on the software file using the MD5 information digest algorithm). After the Linux system host obtains the software file and the verification code, it uses the MD5 information digest algorithm to calculate the software file to obtain the hash value corresponding to the software file, and then compares the hash value corresponding to the software file with the verification code of the software file. If the two are consistent, the verification passes; otherwise, the verification fails. The verification code is used for verification to ensure the correctness and security of the received software file. When the verification passes, the Linux system host feeds back verification pass information; otherwise, the Linux system host feeds back verification fail information.
[0028] S4. After receiving the verification pass information fed back by the Linux system host, extract the replacement sub-command from the command set, generate a replacement operation instruction based on the replacement sub-command, transmit the replacement operation instruction to the Linux system host, enable the Linux system host to use the compilation tool to compile the replacement operation instruction, generate a replacement execution instruction, and use the software file to replace the original file of the corresponding software deployment path according to the replacement execution instruction.
[0029] In a specific implementation, after receiving verification pass information from a Linux system host, the client extracts a replacement subcommand from a command set based on a sequence number, generates a replacement operation instruction based on the replacement subcommand, and transmits the replacement operation instruction to the Linux system host. The Linux system host first sequentially extracts each replacement operation instruction character from the replacement operation instruction, imports the corresponding replacement operation instruction character into a compilation loop, and determines the first instruction character matched by the corresponding replacement operation instruction character. The client then searches for the first second instruction character preceding the first instruction character matched by the corresponding replacement operation instruction character in a clockwise direction along the compilation loop and associates the second instruction character with the corresponding replacement operation instruction character (e.g., if the verification operation instruction character is 4, the first instruction character matched on the compilation loop is 4, and the first second instruction character preceding the first instruction character 4 in the clockwise direction of the compilation loop is b, then the second instruction character b is associated with the corresponding verification operation instruction character 4, and so on). The client then sequentially combines the second instruction characters associated with each replacement operation instruction character to generate a replacement execution instruction. Finally, the replacement execution instruction is executed to replace the original file in the corresponding software deployment path with the software file, completing the software file update and replacement, and feedback a replacement completion message.
[0030] S5. After receiving the replacement completion information fed back by the Linux system host, extract the change sub-command from the command set, generate a change operation instruction based on the change sub-command, transmit the change operation instruction to the Linux system host, enable the Linux system host to compile the change operation instruction using a compilation tool, generate a change execution instruction, and change the permissions of the software file according to the change execution instruction.
[0031] In a specific implementation, after receiving the replacement completion information fed back by the Linux system host, the client extracts the change subcommand from the command set according to the sequence number, generates a change operation instruction based on the change subcommand, and transmits the change operation instruction to the Linux system host. The Linux system host first sequentially extracts each change operation instruction character from the change operation instruction, imports the corresponding change operation instruction character into the compilation loop, and determines the first instruction character matched by the corresponding change operation instruction character. The Linux system host then searches for the first second instruction character preceding the first instruction character matched by the corresponding change operation instruction character in a clockwise direction of the compilation loop, and associates the second instruction character with the corresponding change operation instruction character (for example, if the verification operation instruction character is 7, the first instruction character matched on the compilation loop is 7, and the first second instruction character preceding the first instruction character 7 found in the clockwise direction of the compilation loop is c, then the second instruction character c is associated with the corresponding verification operation instruction character 7, and so on). The second instruction characters associated with each change operation instruction character are then sequentially combined to generate a change execution instruction. Finally, the change execution instruction is executed to change the permissions of the software file, completing the change of the software file's execution permissions, and feedback a change completion information.
[0032] S6. After receiving the change completion information fed back by the Linux system host, extract the restart sub-command from the command set, generate a restart operation instruction based on the restart sub-command, transmit the restart operation instruction to the Linux system host, enable the Linux system host to use the compilation tool to compile the restart operation instruction, generate a restart execution instruction, and restart the corresponding software according to the restart execution instruction.
[0033] In a specific implementation, after receiving the change completion information fed back by the Linux system host, the client extracts the restart subcommand from the command set according to the sequence number, generates a restart operation instruction based on the restart subcommand, and transmits the restart operation instruction to the Linux system host. The Linux system host first sequentially extracts each restart operation instruction character from the restart operation instruction, imports the corresponding restart operation instruction character into the compilation loop, and determines the first instruction character matched by the corresponding restart operation instruction character; then, the Linux system host searches for the first second instruction character that precedes the first instruction character matched by the corresponding restart operation instruction character in a clockwise direction of the compilation loop, and associates the second instruction character with the corresponding restart operation instruction character (for example, if the verification operation instruction character is 9, the first instruction character matched on the compilation loop is 9, and the first second instruction character found in the clockwise direction of the compilation loop that precedes the first instruction character 9 is d, then the second instruction character d is associated with the corresponding verification operation instruction character 9, and so on); then, the second instruction characters associated with each restart operation instruction character are sequentially combined to generate a restart execution instruction; finally, the restart execution instruction is executed, the corresponding software is restarted, the software update and restart is completed, and a restart completion information is fed back.
[0034] S7. After receiving the restart completion information fed back by the Linux system host, disconnect the connection with the Linux system host.
[0035] In specific implementation, after receiving the restart completion information fed back by the Linux system host, the client disconnects from the Linux system host and completes the remote deployment of the software.
[0036] This method integrates deployment operations such as software file transfer, replacement, and software restart into an automated and standardized implementation through the client responding to various sequential instructions to connect to the target host, which can avoid human errors and simplify the software deployment operation process. It can effectively save developers the time spent on updating software versions and improve the efficiency of software development. At the same time, based on the compilation tool, the instructions in the deployment process are transferred and compiled, and the transmitted software files are verified, which can effectively ensure the security and reliability of the software deployment process.
[0037] Example 2: This embodiment provides a Linux system device software remote deployment system, including a data parsing unit, a handshake docking unit, a transmission execution unit, a replacement execution unit, a change execution unit, a restart execution unit and a disconnection execution unit, wherein: A data parsing unit, used to parse the data packets uploaded by the user to obtain the software file, software identifier and command set; The handshake docking unit is used to establish a remote connection with the Linux system host in response to the user's execution operation instruction, and send a compilation identifier and a software identifier to the Linux system host, so that the Linux system host determines the software deployment path of the corresponding software according to the software identifier and calls the compilation tool according to the compilation identifier; a transmission execution unit, configured to extract a transmission subcommand from the command set, generate a verification operation instruction for the software file according to the transmission subcommand, transmit the software file and the verification operation instruction to the Linux system host, cause the Linux system host to compile the verification operation instruction using a compilation tool, generate a verification execution instruction, and verify the software file according to the verification execution instruction; The replacement execution unit is configured to, after receiving verification pass information fed back by the Linux system host, extract a replacement subcommand from the command set, generate a replacement operation instruction based on the replacement subcommand, transmit the replacement operation instruction to the Linux system host, enable the Linux system host to compile the replacement operation instruction using a compilation tool to generate a replacement execution instruction, and use the software file to replace the original file in the corresponding software deployment path according to the replacement execution instruction; The change execution unit is configured to extract a change subcommand from a command set after receiving replacement completion information fed back by the Linux system host, generate a change operation instruction according to the change subcommand, transmit the change operation instruction to the Linux system host, and cause the Linux system host to compile the change operation instruction using a compilation tool to generate a change execution instruction, and perform a permission change on the software file according to the change execution instruction; The restart execution unit is used to extract the restart subcommand from the command set after receiving the change completion information fed back by the Linux system host, generate a restart operation instruction according to the restart subcommand, transmit the restart operation instruction to the Linux system host, and enable the Linux system host to compile the restart operation instruction using a compilation tool to generate a restart execution instruction, and restart the corresponding software according to the restart execution instruction; The disconnection execution unit is used to disconnect the connection with the Linux system host after receiving the restart completion information fed back by the Linux system host.
[0038] Example 3: This embodiment provides a Linux system device software remote deployment system, such as Figure 3 As shown, at the hardware level, it includes: Data interface, used to establish data connection between the processor and the target host; a memory for storing instructions; The processor is configured to read the instructions stored in the memory and execute the remote deployment method for Linux system device software in Example 1 according to the instructions.
[0039] Optionally, the system further includes an internal bus, through which the processor, memory, and data interface can be interconnected. The internal bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.
[0040] The memory may include, but is not limited to, random access memory (RAM), read-only memory (ROM), flash memory, first-in-first-out memory (FIFO) and / or first-in-last-out memory (FILO), etc. The processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0041] Example 4: This embodiment provides a computer-readable storage medium having instructions stored thereon. When the instructions are executed on a computer, the computer is caused to execute the method for remotely deploying Linux system device software in Embodiment 1. The computer-readable storage medium refers to a data storage medium, which may include, but is not limited to, a floppy disk, an optical disk, a hard disk, a flash memory, a USB flash drive, and / or a memory stick. The computer may be a general-purpose computer, a dedicated computer, a computer network, or other programmable device.
[0042] This embodiment further provides a computer program product, which, when executed on a computer, executes the remote deployment method for Linux system device software in Embodiment 1. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
[0043] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included in the scope of protection of the present invention.
Claims
1. A method for remote deployment of Linux system device software, characterized in that: include: Parse the data package uploaded by the user to obtain the software file, software identifier and command set; In response to the user's execution operation instruction, a remote connection is established with the Linux system host, and a compilation identifier and a software identifier are sent to the Linux system host, so that the Linux system host determines the software deployment path of the corresponding software according to the software identifier and calls the compilation tool according to the compilation identifier; Extracting a transmission subcommand from the command set, generating a verification operation instruction for the software file according to the transmission subcommand, transmitting the software file and the verification operation instruction to a Linux system host, causing the Linux system host to compile the verification operation instruction using a compilation tool to generate a verification execution instruction, and verifying the software file according to the verification execution instruction; After receiving the verification pass information fed back by the Linux system host, extract the replacement subcommand from the command set, generate a replacement operation instruction according to the replacement subcommand, transmit the replacement operation instruction to the Linux system host, and make the Linux system host compile the replacement operation instruction using a compilation tool to generate a replacement execution instruction. Then, according to the replacement execution instruction, use the software file to replace the original file in the corresponding software deployment path; After receiving the replacement completion information fed back by the Linux system host, extract the change subcommand from the command set, generate a change operation instruction according to the change subcommand, transmit the change operation instruction to the Linux system host, and make the Linux system host compile the change operation instruction using a compilation tool to generate a change execution instruction, and then change the permissions of the software file according to the change execution instruction; After receiving the change completion information fed back by the Linux system host, extract the restart subcommand from the command set, generate a restart operation instruction according to the restart subcommand, transmit the restart operation instruction to the Linux system host, and make the Linux system host compile the restart operation instruction using a compilation tool to generate a restart execution instruction, and restart the corresponding software according to the restart execution instruction; After receiving the restart completion information fed back by the Linux system host, disconnect from the Linux system host.
2. A Linux system device software remote deployment method according to claim 1, characterized in that: The command set includes several subcommands and serial numbers corresponding to each subcommand. The several subcommands include a transfer subcommand, a replacement subcommand, a change subcommand and a restart subcommand. When extracting each subcommand from the command set, they are extracted sequentially according to the serial numbers corresponding to each subcommand.
3. A Linux system device software remote deployment method according to claim 1, characterized in that: The compilation tool is a compilation ring. The compilation ring is provided with a plurality of first instruction characters and second instruction characters, and each first instruction character is arranged between each second instruction character.
4. A Linux system device software remote deployment method according to claim 3, characterized in that: The method of using a compilation tool to compile the verification operation instruction to generate the verification execution instruction includes: Extract each verification operation instruction character from the verification operation instruction in sequence. Importing the corresponding verification operation instruction character into the compile loop, and determining the first instruction character matched by the corresponding verification operation instruction character; Searching clockwise along the compile loop for a first second instruction character that precedes the first instruction character matched by the corresponding verification operation instruction character, and associating the first second instruction character with the corresponding verification operation instruction character; The second instruction characters associated with each verification operation instruction character are combined in sequence to generate a verification execution instruction.
5. A Linux system device software remote deployment method according to claim 3, characterized in that: The step of compiling the replacement operation instruction using a compilation tool to generate a replacement execution instruction includes: Extract each replacement operation instruction character from the replacement operation instruction in sequence, Importing the corresponding replacement operation instruction character into the compile loop, and determining the first instruction character matched by the corresponding replacement operation instruction character; Searching clockwise along the compile loop for a first second instruction character that precedes the first instruction character matched by the corresponding replacement operation instruction character, and associating the second instruction character with the corresponding replacement operation instruction character; The second instruction characters associated with each replacement operation instruction character are combined in sequence to generate a replacement execution instruction.
6. A Linux system device software remote deployment method according to claim 3, characterized in that: The step of using a compilation tool to compile the change operation instruction to generate the change execution instruction includes: Extract each change operation instruction character from the change operation instruction in sequence, Importing the corresponding change operation instruction character into the compile loop, and determining the first instruction character that matches the corresponding change operation instruction character; Searching clockwise along the compile loop for a first second instruction character that precedes the first instruction character matched by the corresponding change operation instruction character, and associating the second instruction character with the corresponding change operation instruction character; The second instruction characters associated with each modification operation instruction character are sequentially combined to generate a modification execution instruction.
7. A Linux system device software remote deployment method according to claim 3, characterized in that: The step of compiling the restart operation instruction using a compilation tool to generate a restart execution instruction includes: Extract each restart operation instruction character from the restart operation instruction in sequence. Importing the corresponding restart operation instruction character into the compile loop, and determining the first instruction character that matches the corresponding restart operation instruction character; Searching clockwise along the compile loop for a first second instruction character that precedes the first instruction character matched by the corresponding restart operation instruction character, and associating the second instruction character with the corresponding restart operation instruction character; The second instruction characters associated with each restart operation instruction character are combined in sequence to generate a restart execution instruction.
8. A Linux system device software remote deployment method according to claim 1, characterized in that: The verification execution instruction includes a check code of the software file, and verifying the software file according to the verification execution instruction includes: Use the MD5 information digest algorithm to calculate the software file and obtain the hash value corresponding to the software file; The hash value corresponding to the software file is compared with the verification code of the software file. If the two are consistent, the verification passes; otherwise, the verification fails.
9. A Linux system device software remote deployment system, characterized in that: include: a memory for storing instructions; A processor is configured to read instructions stored in the memory and execute the Linux system device software remote deployment method according to any one of claims 1 to 7 according to the instructions.
10. A computer program product, characterized in that When the computer program product is run on a computer, the Linux system device software remote deployment method according to any one of claims 1 to 7 is executed.
Citation Information
Cited By
Software deployment method and electronic equipment
CN121614150A