CN116243938A - Patch installation method and device, processor and electronic equipment - Google Patents

Patch installation method and device, processor and electronic equipment Download PDF

Info

Publication number
CN116243938A
CN116243938A CN202310333809.5A CN202310333809A CN116243938A CN 116243938 A CN116243938 A CN 116243938A CN 202310333809 A CN202310333809 A CN 202310333809A CN 116243938 A CN116243938 A CN 116243938A
Authority
CN
China
Prior art keywords
patch
script
installation
target
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310333809.5A
Other languages
Chinese (zh)
Inventor
张唯
阮良浩
施泽宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310333809.5A priority Critical patent/CN116243938A/en
Publication of CN116243938A publication Critical patent/CN116243938A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a patch installation method, a patch installation device, a processor and electronic equipment. Relates to the technical field of communication, and can be used in the field of financial science and technology or other fields. The method comprises the following steps: receiving a patch script from a control server and calling a creating task script, wherein the patch script comprises a creating task script and a patch installation script, the creating task script is used for creating a preset task on a target server, the creating of the preset task is used for disabling long connection of the target server, and the patch installation script is used for installing a target patch on the target server; and receiving a patch installation instruction from the control server, and installing the target patch based on the patch installation script. The problems that in the related art, the patch is installed through a method based on monitoring Agent software (Agent) on a server or based on a fixed server by adopting a remote protocol, the efficiency is low, the patch installation condition cannot be reflected in time, the energy consumption is high, and the timeliness is low are solved.

Description

Patch installation method and device, processor and electronic equipment
Technical Field
The application relates to the field of communication technology, and can be used in the field of financial science and technology or other fields. And more particularly, to a patch installation method, a patch installation device, a processor and an electronic device.
Background
With the rapid development of communication technology, patch installation technology is widely applied, and plays a very important role in the requirements of server operation and maintenance and the like. In an actual scene, a large amount of labor is consumed for operation and maintenance of a large number of servers, login and patch installation operations are required to be repeatedly executed, the patch cannot be installed at one time under normal conditions, and a new patch is found after the patch installation is restarted, so that the workload of manual login, check and installation of operation and maintenance staff is further increased. Therefore, a patch installation method for a more efficient, energy-saving approach is necessary.
At present, patch installation scripts are executed based on monitoring Agent software (Agent) on a server, but the method cannot meet the result recovery and heartbeat detection pressure under a large number of server scales, and is low in efficiency. Or pushing patch installation scripts to all target servers by adopting a remote protocol based on one fixed server, and acquiring installation results, wherein the method has the condition of fire wall blocking, cannot embody the condition of patch installation in time, and has higher energy consumption and low timeliness.
Aiming at the problems that in the related art, the patch is installed by a method based on monitoring Agent software (Agent) on a server or a fixed server by adopting a remote protocol, the efficiency is low, the patch installation condition cannot be reflected in time, the energy consumption is high and the timeliness is low, and no effective solution is proposed at present.
Disclosure of Invention
The main purpose of the application is to provide a patch installation method, a device, a processor and electronic equipment, so as to solve the problems that in the related art, the patch is installed by a method based on monitoring Agent software (Agent) on a server or a fixed server adopts a remote protocol, the efficiency is low, the patch installation condition cannot be reflected in time, the energy consumption is high, and the timeliness is low.
To achieve the above object, according to one aspect of the present application, there is provided a patch installation method. The method comprises the following steps: receiving a patch script from a control server and calling a creating task script, wherein the patch script comprises a creating task script and a patch installation script, the creating task script is used for creating a preset task on a target server, the creating of the preset task is used for disabling long connection of the target server, and the patch installation script is used for installing a target patch on the target server; and receiving a patch installation instruction from the control server, and installing the target patch based on the patch installation script.
Optionally, installing the target patch to the target server based on the patch installation script includes: inquiring the target server to obtain an inquiry result, wherein the inquiry result is used for indicating whether a target patch exists in the target server; and installing the target patch to the target server in response to the existence of the target patch in the target server, and determining patch information of the target patch, wherein the patch information is used for indicating whether the installation of the target patch needs to execute a restarting operation or not.
Optionally, the method further comprises: restarting the target server in response to the need of executing the restarting operation, and recording the first iteration times; installing a patch to the target server based on the patch installation script again in response to the first iteration number being less than or equal to the iteration threshold; and deleting the preset task and ending the patch installation in response to the first iteration number being greater than the iteration threshold.
Optionally, the method further comprises: recording a second iteration number in response to not requiring a restart operation to be performed; installing a patch to the target server based on the patch installation script again in response to the second iteration number being less than or equal to the iteration threshold; and deleting the preset task and ending the patch installation in response to the second iteration number being greater than the iteration threshold.
Optionally, the method further comprises: and deleting the preset task and ending patch installation in response to the fact that the target patch does not exist in the target server.
Optionally, the patch script further includes a progress acquisition script, where the progress acquisition script is configured to acquire an installation progress of the target patch, and further includes: and receiving a progress acquisition instruction from the control server, calling a progress acquisition script, and displaying the installation progress.
Optionally, the patch script further includes a trigger installation script, and before installing the target patch to the target server based on the patch installation script, the method further includes: and calling a trigger installation script to install a preset task, wherein the installation of the preset task is used for calling a patch installation script.
To achieve the above object, according to another aspect of the present application, there is provided a patch installation apparatus. The device comprises: the system comprises a receiving module, a receiving module and a target server, wherein the receiving module is used for receiving a patch script from the control server and calling a creating task script, the patch script comprises a creating task script and a patch installation script, the creating task script is used for creating a preset task on the target server, the creating of the preset task is used for disabling long connection of the target server, and the patch installation script is used for installing a target patch on the target server; the installation module is used for receiving a patch installation instruction from the control server and installing the target patch based on the patch installation script.
Optionally, the installation module is further configured to query the target server to obtain a query result, where the query result is used to indicate whether the target patch exists in the target server; and installing the target patch to the target server in response to the existence of the target patch in the target server, and determining patch information of the target patch, wherein the patch information is used for indicating whether the installation of the target patch needs to execute a restarting operation or not.
Optionally, the installation module is further configured to restart the target server in response to a need to perform a restart operation, and record a first iteration number; installing a patch to the target server based on the patch installation script again in response to the first iteration number being less than or equal to the iteration threshold; and deleting the preset task and ending the patch installation in response to the first iteration number being greater than the iteration threshold.
Optionally, the installation module is further configured to record a second iteration number in response to not having to perform a restart operation; installing a patch to the target server based on the patch installation script again in response to the second iteration number being less than or equal to the iteration threshold; and deleting the preset task and ending the patch installation in response to the second iteration number being greater than the iteration threshold.
Optionally, the installation module is further configured to delete the preset task and end patch installation in response to the target patch not being present in the target server.
Optionally, the installation module is further configured to receive a progress acquisition instruction from the control server, call a progress acquisition script, and display an installation progress.
Optionally, the installation module is further configured to invoke a trigger installation script to install a preset task, where installation of the preset task is used to invoke a patch installation script.
To achieve the above object, according to another aspect of the present application, there is provided a computer-readable storage medium having stored therein a computer program, wherein the computer program is configured to perform the patch installation method in any one of the above when run on a computer or a processor.
In order to achieve the above object, according to another aspect of the present application, there is also provided an electronic device including a memory in which a computer program is stored, and a processor configured to run the computer program to perform the patch installation method in any one of the above.
Through the application, the following steps are adopted: the patch script is used for creating a preset task on the target server, the creation of the preset task is used for disabling long connection of the target server, the patch installation script is used for installing a target patch on the target server, and then a patch installation instruction from the control server is received, and the target patch is installed based on the patch installation script, so that the patch installation situation can be fed back in real time on the premise of not providing server resources, timeliness is high, long connection with a client is not required to be maintained, resource waste is avoided, one-time triggering installation of the patch is realized, efficiency is high, and the problems that in the related art, the patch is installed through monitoring Agent software (Agent) on the basis of the server or a remote protocol is adopted on the basis of a fixed server, the existing efficiency is low, the patch installation situation cannot be reflected in time at the same time, and energy consumption is high and timeliness is low are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application, illustrate and explain the application and are not to be construed as limiting the application. In the drawings:
FIG. 1 is a schematic diagram of an Agent architecture executing a patch installation script;
FIG. 2 is a schematic diagram of an Agentless architecture executing a patch installation script;
FIG. 3 is a flow diagram of a process for executing a patch installation script;
FIG. 4 is a flow chart of a patch installation method provided in accordance with an embodiment of the present application;
FIG. 5 is an overall framework diagram of a patch installation application provided in accordance with an embodiment of the present application;
FIG. 6 is a flowchart of patch installation user operations provided in accordance with an embodiment of the present application;
FIG. 7 is a flow chart of a patch installation method provided in accordance with an embodiment of the present application;
FIG. 8 is a schematic diagram of a patch installation apparatus provided in accordance with an embodiment of the present application;
fig. 9 is a schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe the embodiments of the present application described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of description, the following will describe some terms or terms related to the embodiments of the present application:
traditional Agent architecture scheme: an Agent can be understood as small Agent software, namely Agent software, installed on a host where a monitored application is located, and the solution is to execute a patch installation script based on an Agent on a server, specifically, an Agent system containing a queue and a database needs to execute the patch installation script based on an Agent system of the system. However, the scheme cannot meet the result recovery and heartbeat detection pressure under a large server scale, and the efficiency is low.
Fig. 1 is a schematic diagram of an Agent architecture for executing a patch installation script, as shown in fig. 1, to comprehensively illustrate a specific implementation process of the above scheme. Fig. 1 includes a plurality of clients, a message queue module, and a server, wherein each client includes proxy software, and the client sends tasks through the server, transfers data through the message queue module, and executes patch installation scripts through the proxy software in the client.
Traditional Agentless architecture scheme: agentless can be understood as that on the host computer where the monitored application is located, proxy software is not installed to collect corresponding information, but the information is obtained through some standard protocols, the scheme can be understood as that patch installation scripts are pushed to all target servers through remote protocols based on one fixed server, and installation results are obtained, but the scheme has the condition of fire wall blocking, meanwhile, patch installation conditions cannot be reflected timely, energy consumption is high, and timeliness is low.
Fig. 2 is a schematic diagram of an Agentless architecture for executing a patch installation script, as shown in fig. 2, which comprehensively illustrates a specific implementation process of the above scheme. The method comprises the steps that in FIG. 2, a plurality of clients and servers are included, patch installation scripts are pushed to all clients through a remote protocol, and installation results are obtained.
Fig. 3 is a schematic flow chart of executing a patch installation script, and as shown in fig. 3, a specific implementation flow of the two schemes is comprehensively described. After the flow starts to run, firstly, a query patch of a query device is created, whether the patch exists or not is judged, the condition that the patch does not exist is met, and the flow is ended. The method and the device meet the requirement that the patch exists, create a downloading device to download a patch installation script, meet the requirement that the downloading device already downloads the patch installation script, and create an installer installation patch. When the downloading device does not download the patch installation script, the patch installation script is downloaded again. After the installer is established to install the patch, judging whether restarting is needed, restarting the control system when restarting is needed, ending the process, and ending the process when restarting is not needed, thereby completing the installation of the patch.
The two schemes need to be triggered repeatedly in the implementation process to confirm whether the patch is completely installed or not, and the patch cannot be installed in batches at one time, so that the problems of low efficiency, incapability of reflecting the patch installation condition in time, high energy consumption and low timeliness exist.
The invention will be described with reference to preferred implementation steps, and fig. 4 is a flowchart of a patch installation method according to an embodiment of the present application, as shown in fig. 4, and the method includes the following steps:
Step S40, receiving a patch script from a control server and calling a creation task script;
the patch script comprises a creating task script and a patch installation script, wherein the creating task script is used for creating a preset task on the target server, the creating of the preset task is used for disabling long connection of the target server, and the patch installation script is used for installing the target patch on the target server.
The control server is configured to provide a patch script, and optionally, the patch script may include a creation task script, a trigger installation script, a patch installation script, a progress acquisition script, and the like, which is not limited by the embodiment of the present invention. The creating task script is used for creating a preset task on the target server, the preset task can be understood as a starting task, alternatively, the creating task script can be called through a remote protocol, and the embodiment of the invention is not limited.
The creation of the preset task is used to deactivate the long connection of the target server and the patch installation script is used to install the target patch on the target server. It can be appreciated that the long connection of the target server is used to acquire resources from the target server, consume resources, deactivate the long connection of the target server by creating a preset task, and directly call each patch script through the control server.
By way of example, the patch installation script is directly called by the control server, so that the demands on the queues and the database can be abandoned, the problem that the remote protocol session is not released for a long time due to patch installation and restarting is avoided, and meanwhile, resource waste is avoided.
Step S41, receiving a patch installation instruction from the control server, and installing a target patch based on the patch installation script.
The patch installation instructions may be understood as instructions for controlling the installation of a patch at the target server, and the step may be understood as receiving instructions from the control server for controlling the installation of a patch at the target server, the target patch being installed based on a patch installation script in the patch script.
Optionally, the remote access target machine may invoke the trigger installation script through a remote protocol, trigger a preset task created on the target server, and invoke the patch installation script to execute the installation of the target patch.
Fig. 5 is an overall framework diagram of a patch installation application provided according to an embodiment of the present application, and as shown in fig. 5, a specific implementation procedure of the foregoing steps is comprehensively described. In fig. 5, a user is used as a foreground to control a Web page, a hypertext transfer protocol (HyperText Transfer Protocol, HTTP) is provided through an internet information service (Internet Information Services, IIS), and then an asp.net mvc framework is used to complete front-end and back-end development, and short connection is adopted between the whole asp.net mvc framework and a plurality of clients.
When the patch installation application overall framework in fig. 5 is running, a user imports a server list of patches to be installed through a web front end, a rear end establishes remote sessions for a whole host machine in a batch-by-batch concurrency mode, namely, the sessions between the rear end and the servers of the patches to be installed, and pushes patch scripts comprising creating task scripts, triggering installation scripts, patch installation scripts and obtaining script installation progress scripts to each client, so that patch installation is completed, and the framework adopts short connection to realize communication between the whole of the span.net mvc framework and a plurality of clients, so that the concurrency number of the connection between the clients and the servers is reduced.
The execution main body of the steps can be a processor or a controller, by the steps, the patch script from the control server is received, and the creation task script is called, wherein the patch script comprises the creation task script and the patch installation script, the creation task script is used for creating a preset task on the target server, the creation of the preset task is used for disabling long connection of the target server, the patch installation script is used for installing the target patch on the target server, then the patch installation instruction from the control server is received, and the target patch is installed based on the patch installation script, so that the patch installation condition can be fed back in real time on the premise of not providing server resources, timeliness is high, long connection with a client is not required to be maintained, resource waste is avoided, one-time triggering installation of the patch is realized, efficiency is high, and the problems that in the related art, the patch is installed by a method based on monitoring Agent software (Agent) on the server, or a fixed server adopts a remote protocol, the existence efficiency is low, the patch installation condition cannot be reflected timely, the energy consumption is high, and timeliness is low are solved.
Optionally, in the patch installation method provided in the embodiment of the present application, in step S41, installing the target patch to the target server based on the patch installation script may include the following execution steps:
step S410, inquiring the target server to obtain an inquiring result;
the query result is used for indicating whether the target patch exists in the target server.
The query result is used for indicating whether a target patch exists in the target server, and it can be understood that when the query result indicates that the target patch exists in the target server, the query result indicates that the vulnerability exists in the target server and needs to be repaired; and when the query result indicates that the target patch does not exist in the target server, the query result indicates that the bug does not exist in the target server and the bug needs to be repaired.
The step can be understood as that the target server is inquired, whether the target patch exists in the target server is determined, and when the inquired result indicates that the target patch exists in the target server, the vulnerability in the target server is required to be repaired; and when the query result indicates that the target patch does not exist in the target server, the query result indicates that the bug does not exist in the target server and the bug needs to be repaired.
In step S411, in response to the target patch existing in the target server, the target patch is installed on the target server, and patch information of the target patch is determined.
The patch information is used for indicating whether the installation target patch needs to execute a restarting operation.
It can be understood that installing the target patch to the target server, that is, repairing the vulnerability existing in the target server, because various types of vulnerabilities may exist in the target server, that is, various different types of target patches may exist, and the requirements of the different types of target patches for restarting operations are not the same.
For example, a target patch existing in the target server may require a restart operation for a portion of the target patch, and may not require a restart operation for a portion of the target patch, and patch information of the target patch is determined at this time, that is, it is determined whether or not the restart operation is required to be performed for installing the target patch.
This step may be understood as installing the target patch to the target server when the target patch exists in the target server, and determining whether the installation of the target patch requires a restart operation to be performed. When the patch information indicates that the target patch is installed, the target server is required to be restarted after the target patch is installed, and when the patch information indicates that the target patch is not required to be restarted, the target server is not required to be restarted after the target patch is installed.
Optionally, in the patch installation method provided in the embodiment of the present application, in step S411, the following execution steps may be included:
step S4110, in response to the need to execute the restarting operation, restarting the target server, and recording the first iteration number;
the first iteration number may be understood as the number of times the target server performs a restart operation, and is used to represent the number of times the target server performs a restart operation when installing the target patch. This step may be understood as restarting the target server when the patch information indicates that the installation of the target patch requires a restart operation, and recording a first iteration number of times the restart operation is performed by the target server.
Step S4111, in response to the first iteration number being less than or equal to the iteration threshold, installing a patch to the target server based on the patch installation script again;
the iteration threshold may be understood as the maximum number of times the target server can perform the restart operation, i.e. the target server can only perform the restart operation for the number of times within the iteration threshold, beyond which the target server cannot perform the restart operation again.
This step may be understood as indicating that the number of times the target server performs the restart operation is equal to or less than the maximum number of times the target server can perform the restart operation when the first iteration number is equal to or less than the iteration threshold, and at this time, installing the patch to the target server based on the patch installation script again may be regarded as a process of circularly installing the patch to the target server.
In step S4112, in response to the first iteration number being greater than the iteration threshold, the preset task is deleted, and the patch installation is ended.
The step can be understood as that when the first iteration number is greater than the iteration threshold, the number of times that the target server executes the restart operation is indicated to be greater than the maximum number of times that the target server can execute the restart operation, at this time, the target server cannot execute the restart operation again, remotely accesses the target machine through the remote protocol to call a task triggering the installation script, namely, deleting the preset task, and ending the patch installation.
Optionally, in the patch installation method provided in the embodiment of the present application, in step S411, the following execution steps may be further included:
step S4113, in response to not needing to execute the restarting operation, recording the second iteration times;
the second iteration number may be understood as the number of times that the target server does not perform the restart operation, that is, the number of times that the target server does not need to perform the restart operation is indicated by patch information of the target patch.
This step may be understood as recording a number of iterations in which the target server does not perform a restart operation once when the patch information indicates that the installation of the target patch does not require a restart operation.
Step S4114, in response to the second iteration number being less than or equal to the iteration threshold, installing a patch to the target server based on the patch installation script again;
This step may be understood as indicating that the number of times the target server does not perform the restart operation is equal to or less than the maximum number of times the target server can perform the restart operation when the second iteration number is equal to or less than the iteration threshold, and at this time, installing the patch to the target server based on the patch installation script again may be regarded as a process of circularly installing the patch to the target server.
In step S4115, in response to the second iteration number being greater than the iteration threshold, the preset task is deleted, and the patch installation is ended.
The step may be understood as that when the second iteration number is greater than the iteration threshold, the number of times that the target server does not perform the restart operation is greater than the maximum number of times that the target server can perform the restart operation, and at this time, the target server cannot perform the restart operation again, and cannot determine whether the restart operation needs to be performed on the target server. And calling a task triggering the installation script by remotely accessing the target machine through a remote protocol, namely deleting a preset task, and ending patch installation.
Through the steps, virtuous circle of patch installation of the target server can be realized, and the technical effect of installing patches to the target server based on the patch installation script for a plurality of times in the iteration threshold is realized.
Optionally, in the patch installation method provided in the embodiment of the present application, in step S411, the following execution steps may be further included:
in step S4116, in response to the target patch not existing in the target server, the preset task is deleted, and the patch installation is ended.
It can be understood that installing the target patch on the target server, that is, repairing the bug existing in the target server, the step can be understood as indicating that the bug needing to be repaired does not exist in the target server when the target patch does not exist in the target server, and at this time, remotely accessing the target machine through a remote protocol to call a task triggering an installation script, that is, deleting a preset task, and ending patch installation.
Optionally, in the patch installation method provided in the embodiment of the present application, in step S41, the patch script further includes a progress obtaining script, where the progress obtaining script is used to obtain an installation progress of the target patch, and the method may further include the following execution steps:
step S412, a progress acquisition instruction from the control server is received, a progress acquisition script is called, and an installation progress is displayed.
The progress acquisition instruction may be understood as an instruction for acquiring the installation progress of the patch in the target server, and the progress acquisition script may be understood as a script for acquiring the installation progress of the patch installed in the target server.
The step can be understood as receiving an instruction from a control server for obtaining the installation progress of the patch in the target server, calling a script for obtaining the installation progress of the patch in the target server, and displaying the installation progress of the patch in the target server according to the obtained progress obtaining script, so that the patch installation condition can be fed back in real time on the premise of not providing server resources, and the timeliness is high.
Alternatively, this step may be implemented by the patch installation application overall framework diagram in fig. 5, and the user in fig. 5 may click on a foreground button in the operation stage to pull the patch installation script to output to the front end to obtain the installation situation, that is, call the progress obtaining script, and return the installation progress to the Web page for display through the asp.net mvc framework.
Optionally, in the patch installation method provided in the embodiment of the present application, in step S41, the patch script further includes triggering an installation script, and before installing the target patch to the target server based on the patch installation script, the method may further include the following execution steps:
in step S413, a trigger installation script is invoked to install the preset task.
The installation of the preset task is used for calling the patch installation script.
It can be understood that the creation of the preset task is used for disabling the long connection of the target server, and the triggering installation script can be understood as an installation premise of installing the preset task, that is, disabling the long connection of the target server after the triggering installation script is called, so as to ensure that the long connection of the target server is disabled after the triggering installation script is called, and can be understood as a process of starting up the task.
The installation of the preset task is used for calling a patch installation script, long connection of the target server is not used after the installation script is triggered by the call, and then the patch installation script is called according to the installed preset task, so that the installation of the target patch in the target server is realized.
Fig. 6 is a flowchart of a user operation for installing a patch according to an embodiment of the present application, and as shown in fig. 6, a specific process of a user operation of the patch installation method in an actual application scenario is comprehensively described. In fig. 6, the patch installation of the client by the user is divided into three stages, including: a pre-check phase, a start phase and a run phase. The method comprises a pre-checking stage, a starting stage and an operating stage, wherein the pre-checking stage is used for checking network connection and script pre-pushing, detecting a server remote protocol communication state to ensure short connection communication and ensure script calling, the starting stage is used for calling a trigger installation script, triggering a task plan created in the pre-checking stage to start installation, and the operating stage is used for calling a progress acquisition script to acquire an installation progress.
In the actual operation, the user in fig. 6 detects the server remote protocol communication state in the pre-checking stage to ensure the short connection communication and ensure the call of the script, calls the trigger installation script in the starting stage, triggers the task plan created in the pre-checking stage to start the installation, and finally calls the progress acquisition script in the running stage to acquire the installation progress.
Fig. 7 is a flowchart of a patch installation method according to an embodiment of the present application, and as shown in fig. 7, a specific implementation process of the patch installation method is comprehensively described. After the flow starts to run, firstly, a query patch of a query device is created, whether the patch exists or not is judged, the condition that the patch does not exist is met, a timing task is deleted, and the flow is ended. The method and the device meet the requirement that the patch exists, create a downloading device to download a patch installation script, meet the requirement that the downloading device already downloads the patch installation script, and create an installer installation patch. When the downloading device does not download the patch installation script, the patch installation script is downloaded again. After the installer installs the patch, judging whether restarting is needed, when restarting is needed, controlling the system to restart, judging whether the system restarting frequency is larger than the iteration threshold value, meeting the condition that the system restarting frequency is larger than the iteration threshold value, and ending the flow. When the system is not required to be restarted, judging whether the system restarting times are greater than an iteration threshold, meeting the condition that the system restarting times are greater than the iteration threshold, ending the process, and completing the installation of the target patch, so that repeated restarting triggering tasks caused by abnormal installation can be avoided by setting the iteration threshold, and the technical effect of repeatedly installing patches to the target server based on the patch installation script in the iteration threshold is realized.
According to the patch installation method, the patch script from the control server is received, and the creation task script is called, wherein the patch script comprises the creation task script and the patch installation script, the creation task script is used for creating a preset task on the target server, the creation of the preset task is used for disabling long connection of the target server, the patch installation script is used for installing the target patch on the target server, the patch installation instruction from the control server is received, and the target patch is installed based on the patch installation script, so that the patch installation situation can be fed back in real time on the premise that server resources are not required to be provided, timeliness is high, long connection with a client is not required to be maintained, resource waste is avoided, one-time triggering installation of the patch is realized, efficiency is high, and the problems that in the related art, the patch installation situation cannot be reflected timely by means of monitoring Agent software (Agent) on the server or a method adopting a remote protocol on the basis of a fixed server, and the patch installation situation is low in time are solved.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
The embodiment of the application also provides a patch installation device, and the patch installation device of the embodiment of the application can be used for executing the patch installation method provided by the embodiment of the application. The following describes the Z device provided in the embodiment of the present application.
Fig. 8 is a schematic diagram of a patch installation apparatus 800 according to an embodiment of the present application. As shown in fig. 8, the apparatus includes: the receiving module 801 is configured to receive a patch script from a control server, and call a creation task script, where the patch script includes a creation task script and a patch installation script, the creation task script is configured to create a preset task on a target server, the creation of the preset task is configured to deactivate a long connection of the target server, and the patch installation script is configured to install a target patch on the target server; the installation module 802, the installation module 802 is configured to receive a patch installation instruction from the control server, and install the target patch based on the patch installation script.
Optionally, in the patch installation apparatus provided in the embodiment of the present application, the installation module 802 is further configured to query the target server to obtain a query result, where the query result is used to indicate whether the target patch exists in the target server; and installing the target patch to the target server in response to the existence of the target patch in the target server, and determining patch information of the target patch, wherein the patch information is used for indicating whether the installation of the target patch needs to execute a restarting operation or not.
Optionally, in the patch installation apparatus provided in the embodiment of the present application, the installation module 802 is further configured to restart the target server and record the first iteration number in response to a need to perform a restart operation; installing a patch to the target server based on the patch installation script again in response to the first iteration number being less than or equal to the iteration threshold; and deleting the preset task and ending the patch installation in response to the first iteration number being greater than the iteration threshold.
Optionally, in the patch installation apparatus provided in the embodiment of the present application, the installation module 802 is further configured to record the second iteration number in response to not having to perform the restart operation; installing a patch to the target server based on the patch installation script again in response to the second iteration number being less than or equal to the iteration threshold; and deleting the preset task and ending the patch installation in response to the second iteration number being greater than the iteration threshold.
Optionally, in the patch installation apparatus provided in the embodiment of the present application, the installation module 802 is further configured to delete the preset task and end patch installation in response to the target patch not existing in the target server.
Optionally, in the patch installation apparatus provided in the embodiment of the present application, the installation module 802 is further configured to receive a progress obtaining instruction from the control server, call a progress obtaining script, and display an installation progress.
Optionally, in the patch installation apparatus provided in the embodiment of the present application, the installation module 802 is further configured to invoke a trigger installation script to install a preset task, where installation of the preset task is used to invoke the patch installation script.
According to the patch installation device, the patch script from the control server is received, and the creating task script is called, wherein the patch script comprises the creating task script and the patch installation script, the creating task script is used for creating a preset task on the target server, the creating task is used for disabling long connection of the target server, the patch installation script is used for installing the target patch on the target server, then the patch installation instruction from the control server is received, and the target patch is installed based on the patch installation script, so that the patch installation situation can be fed back in real time on the premise that server resources are not required to be provided, timeliness is high, long connection with a client is not required to be maintained, resource waste is avoided, patch one-time triggering installation is realized, efficiency is high, and the problems that in the related art, the patch installation situation cannot be reflected timely by a method based on monitoring Agent software (Agent) on the server or a remote protocol is adopted on a fixed server, and the patch installation situation is low in time are solved.
The patch installation device includes a processor and a memory, where the receiving module 801 and the installation module 802 are stored as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can be provided with one or more than one kernel, and the problems that the efficiency is low, the patch installation condition cannot be reflected in time, the energy consumption is high and the timeliness is low in the related technology by adjusting kernel parameters and installing patches based on monitoring Agent software (Agent) on a server or a method of adopting a remote protocol based on a fixed server are solved.
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip.
It should be noted that, the patch installation method and device of the present application may be used in the financial science and technology field to monitor the operation and maintenance of each system server in the financial institution to repair system vulnerabilities, etc., to ensure the security of the transaction and calculation processes, etc., and may also be used in any field other than the financial science and technology field, such as computer networks, virtual games, etc., where the application field of the patch installation method and device of the present application is not limited.
An embodiment of the present invention provides a computer-readable storage medium in which a computer program is stored, where the computer program is configured to perform the patch installation method described above when run on a computer or processor.
Fig. 9 is a schematic diagram of an electronic device according to an embodiment of the present application, and as shown in fig. 9, an embodiment of the present invention provides an electronic device 90, where the electronic device includes a processor and a memory, and the memory stores a computer program, and the processor is configured to execute the computer program to perform the patch installation method described above, and when the processor executes the program, the processor implements the following steps:
receiving a patch script from a control server and calling a creating task script, wherein the patch script comprises a creating task script and a patch installation script, the creating task script is used for creating a preset task on a target server, the creating of the preset task is used for disabling long connection of the target server, and the patch installation script is used for installing a target patch on the target server; and receiving a patch installation instruction from the control server, and installing the target patch based on the patch installation script.
Optionally, installing the target patch to the target server based on the patch installation script includes: inquiring the target server to obtain an inquiry result, wherein the inquiry result is used for indicating whether a target patch exists in the target server; and installing the target patch to the target server in response to the existence of the target patch in the target server, and determining patch information of the target patch, wherein the patch information is used for indicating whether the installation of the target patch needs to execute a restarting operation or not.
Optionally, the method further comprises: restarting the target server in response to the need of executing the restarting operation, and recording the first iteration times; installing a patch to the target server based on the patch installation script again in response to the first iteration number being less than or equal to the iteration threshold; and deleting the preset task and ending the patch installation in response to the first iteration number being greater than the iteration threshold.
Optionally, the method further comprises: recording a second iteration number in response to not requiring a restart operation to be performed; installing a patch to the target server based on the patch installation script again in response to the second iteration number being less than or equal to the iteration threshold; and deleting the preset task and ending the patch installation in response to the second iteration number being greater than the iteration threshold.
Optionally, the method further comprises: and deleting the preset task and ending patch installation in response to the fact that the target patch does not exist in the target server.
Optionally, the patch script further includes a progress acquisition script, where the progress acquisition script is configured to acquire an installation progress of the target patch, and further includes: and receiving a progress acquisition instruction from the control server, calling a progress acquisition script, and displaying the installation progress.
Optionally, the patch script further includes a trigger installation script, and before installing the target patch to the target server based on the patch installation script, the method further includes: and calling a trigger installation script to install a preset task, wherein the installation of the preset task is used for calling a patch installation script.
The device herein may be a server, PC, PAD, cell phone, etc.
The present application also provides a computer program product adapted to perform, when executed on a data processing device, a program initialized with the method steps of:
receiving a patch script from a control server and calling a creating task script, wherein the patch script comprises a creating task script and a patch installation script, the creating task script is used for creating a preset task on a target server, the creating of the preset task is used for disabling long connection of the target server, and the patch installation script is used for installing a target patch on the target server; and receiving a patch installation instruction from the control server, and installing the target patch based on the patch installation script.
Optionally, installing the target patch to the target server based on the patch installation script includes: inquiring the target server to obtain an inquiry result, wherein the inquiry result is used for indicating whether a target patch exists in the target server; and installing the target patch to the target server in response to the existence of the target patch in the target server, and determining patch information of the target patch, wherein the patch information is used for indicating whether the installation of the target patch needs to execute a restarting operation or not.
Optionally, the method further comprises: restarting the target server in response to the need of executing the restarting operation, and recording the first iteration times; installing a patch to the target server based on the patch installation script again in response to the first iteration number being less than or equal to the iteration threshold; and deleting the preset task and ending the patch installation in response to the first iteration number being greater than the iteration threshold.
Optionally, the method further comprises: recording a second iteration number in response to not requiring a restart operation to be performed; installing a patch to the target server based on the patch installation script again in response to the second iteration number being less than or equal to the iteration threshold; and deleting the preset task and ending the patch installation in response to the second iteration number being greater than the iteration threshold.
Optionally, the method further comprises: and deleting the preset task and ending patch installation in response to the fact that the target patch does not exist in the target server.
Optionally, the patch script further includes a progress acquisition script, where the progress acquisition script is configured to acquire an installation progress of the target patch, and further includes: and receiving a progress acquisition instruction from the control server, calling a progress acquisition script, and displaying the installation progress.
Optionally, the patch script further includes a trigger installation script, and before installing the target patch to the target server based on the patch installation script, the method further includes: and calling a trigger installation script to install a preset task, wherein the installation of the preset task is used for calling a patch installation script.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (10)

1. A patch installation method, comprising:
receiving a patch script from a control server, and calling a creation task script, wherein the patch script comprises the creation task script and a patch installation script, the creation task script is used for creating a preset task on a target server, the creation of the preset task is used for disabling a long connection of the target server, and the patch installation script is used for installing a target patch on the target server;
and receiving a patch installation instruction from the control server, and installing the target patch based on the patch installation script.
2. The method of claim 1, wherein installing the target patch to the target server based on the patch installation script comprises:
inquiring the target server to obtain an inquiry result, wherein the inquiry result is used for indicating whether the target patch exists in the target server;
and installing the target patch to the target server in response to the existence of the target patch in the target server, and determining patch information of the target patch, wherein the patch information is used for indicating whether the installation of the target patch needs to execute a restarting operation or not.
3. The method as recited in claim 2, further comprising:
restarting the target server in response to the need of executing the restarting operation, and recording the first iteration times;
installing a patch to the target server based on the patch installation script again in response to the first iteration number being less than or equal to an iteration threshold;
and deleting the preset task and ending patch installation in response to the first iteration times being greater than the iteration threshold.
4. The method as recited in claim 2, further comprising:
recording a second iteration number in response to not requiring a restart operation to be performed;
installing a patch to the target server based on the patch installation script again in response to the second iteration number being less than or equal to an iteration threshold;
and deleting the preset task and ending patch installation in response to the second iteration times being greater than the iteration threshold.
5. The method as recited in claim 2, further comprising:
and deleting the preset task and ending patch installation in response to the target patch not existing in the target server.
6. The method of any of claims 1-5, wherein the patch script further comprises a progress acquisition script for acquiring an installation progress of the target patch, further comprising:
And receiving a progress acquisition instruction from the control server, calling the progress acquisition script, and displaying the installation progress.
7. The method of any of claims 1-5, wherein the patch script further comprises a trigger installation script, the method further comprising, prior to installing the target patch to the target server based on the patch installation script:
and invoking the trigger installation script to install the preset task, wherein the installation of the preset task is used for invoking the patch installation script.
8. A patch installation device, comprising:
the system comprises a receiving module, a control server and a patch installation module, wherein the receiving module is used for receiving a patch script from the control server and calling a creation task script, the patch script comprises the creation task script and the patch installation script, the creation task script is used for creating a preset task on a target server, the creation of the preset task is used for disabling long connection of the target server, and the patch installation script is used for installing a target patch on the target server;
and the installation module is used for receiving a patch installation instruction from the control server and installing the target patch based on the patch installation script.
9. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program, wherein the computer program is arranged to perform the patch installation method as claimed in any of the preceding claims 1 to 7 when run on a computer or processor.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the patch installation method as claimed in any of the preceding claims 1 to 7.
CN202310333809.5A 2023-03-30 2023-03-30 Patch installation method and device, processor and electronic equipment Pending CN116243938A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310333809.5A CN116243938A (en) 2023-03-30 2023-03-30 Patch installation method and device, processor and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310333809.5A CN116243938A (en) 2023-03-30 2023-03-30 Patch installation method and device, processor and electronic equipment

Publications (1)

Publication Number Publication Date
CN116243938A true CN116243938A (en) 2023-06-09

Family

ID=86624405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310333809.5A Pending CN116243938A (en) 2023-03-30 2023-03-30 Patch installation method and device, processor and electronic equipment

Country Status (1)

Country Link
CN (1) CN116243938A (en)

Similar Documents

Publication Publication Date Title
US10642599B1 (en) Preemptive deployment in software deployment pipelines
US8782215B2 (en) Performance testing in a cloud environment
US10956191B2 (en) Systems and methods for customizing and programming a cloud-based management server
US10613853B2 (en) Updating software components through online stores
US9904585B1 (en) Error handling in executing workflow state machines
US20170161059A1 (en) Management of multiple application programming interface versions for development environments
US9766927B1 (en) Data flow management in processing workflows
CN107045475B (en) Test method and device
US11176244B2 (en) Cloud application detection method and cloud application detection apparatus
US9092287B2 (en) Product deployment system
US20210311780A1 (en) Method and system for arranging business process, computing device, and non-transitory computer readable storage medium
US10404568B2 (en) Agent manager for distributed transaction monitoring system
US11934287B2 (en) Method, electronic device and computer program product for processing data
US20170373957A1 (en) Minimized installation of point of presence software agents by use of pre-installed browser
EP3625684A1 (en) Enhanced component latency tracking
CN110569140A (en) operation and maintenance method and device
CN116243938A (en) Patch installation method and device, processor and electronic equipment
US20230066698A1 (en) Compute instance warmup operations
CN112764837B (en) Data reporting method, device, storage medium and terminal
CN110995813B (en) Method and equipment for detecting page performance
CN109254782B (en) Operating system installation method and device
CN111324386A (en) Method and device for starting personal application program, electronic equipment and storage medium
CN113704016B (en) Cloud function component diagnosis method, device, equipment and storage medium
CN112416698B (en) Expansion method and device of monitoring system, storage medium and electronic equipment
CN116089002A (en) Data simulation method, device, system, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination