CN114281422A - Cloud computer control method, device and medium - Google Patents

Cloud computer control method, device and medium Download PDF

Info

Publication number
CN114281422A
CN114281422A CN202111629823.7A CN202111629823A CN114281422A CN 114281422 A CN114281422 A CN 114281422A CN 202111629823 A CN202111629823 A CN 202111629823A CN 114281422 A CN114281422 A CN 114281422A
Authority
CN
China
Prior art keywords
operation instruction
shutdown
control method
execute
cleaning function
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
CN202111629823.7A
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.)
Hangzhou Wulian Technology Co ltd
Original Assignee
Hangzhou Wulian Technology Co ltd
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 Hangzhou Wulian Technology Co ltd filed Critical Hangzhou Wulian Technology Co ltd
Priority to CN202111629823.7A priority Critical patent/CN114281422A/en
Publication of CN114281422A publication Critical patent/CN114281422A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The application discloses a cloud computer control method, a cloud computer control device and a cloud computer control medium, wherein the cloud computer control method comprises the following steps: and acquiring a login process of the system, and writing a dynamic link library into the login process to acquire an operation instruction sent to the system by a user. And when the operation of the control system is detected, acquiring an operation instruction by using the dynamic link library, and controlling the hardware drive to execute the operation instruction by using the cleaning function. And directly calling a cleaning function to execute an operation instruction, and skipping the steps of saving a closing process and saving a file, thereby improving the system shutdown speed. Therefore, by adopting the system control method provided by the application, the shutdown and restart speeds of the cloud computer can be improved, and the cloud host can conveniently recover the computing resources.

Description

Cloud computer control method, device and medium
Technical Field
The present application relates to the field of cloud computing, and in particular, to a cloud computer control method, apparatus, and medium.
Background
The cloud computer is a novel cloud host mode which is created along with the development of network technology and cloud computing technology, and computing resources of the cloud host are provided for users through a network. However, the computing resources provided by the cloud host are limited, and in order to improve the utilization rate of the computing resources, the computing resources need to be recovered after the user stops using the computing resources, and generally, the operation of shutdown or restart of the user is regarded as stop using the computing resources. In the current shutdown method, after a user triggers a shutdown operation, a system login process and a client service sub-process receive shutdown information to clear the user login information and close the user process and the system process, and if the process is failed to close, a closing dialog box is displayed and the shutdown process is suspended. And after the process is closed, calling a cleaning function to execute tail sweeping work so that the system can be closed or restarted. Therefore, a large amount of time is occupied by operations such as file storage and the like in the shutdown process, the shutdown time of the cloud computer is prolonged, and the speed of recovering computing resources by the cloud host is influenced.
Therefore, how to provide a cloud computer control method to improve the shutdown and restart speeds of a cloud computer is a problem that needs to be solved urgently by those skilled in the art.
Disclosure of Invention
The application aims to provide a cloud computer control method which is used for improving the shutdown and restart speeds of a cloud computer.
In order to solve the technical problem, the present application provides a cloud computer control method, including:
acquiring a login process of a system, and writing a dynamic link library into the login process;
when the operation for controlling the system is detected, acquiring an operation instruction by using the dynamic link library, wherein the operation comprises shutdown and restart;
and controlling a hardware driver to execute the operation instruction through a cleaning function.
Preferably, after the step of controlling the hardware driver to execute the operation instruction through the cleaning function, the method further includes:
judging whether the operation instruction is successfully executed within threshold time;
if the operation instruction is not successfully executed, calling a system kernel program to control and execute the operation instruction.
Preferably, before the step of controlling the hardware driver to execute the operation instruction through the cleaning function, the method further includes:
and granting the shutdown authority to the cleaning function.
Preferably, before the step of controlling the hardware driver to execute the operation instruction through the cleaning function, the method further includes:
generating a data package comprising kernel data and a cache file of the system;
and sending the data packet to a server.
Preferably, the obtaining the operation instruction by using the dynamic link library includes:
acquiring an execution function for executing the operation instruction in the login process;
generating a fast shutdown function on the basis of the execution function by using the dynamic link library to replace the execution function;
and determining the operation instruction according to the parameters of the rapid shutdown function.
Preferably, the login process of the acquisition system includes:
and acquiring the login process and the process ID of the login process in a traversal mode.
Preferably, if the operation is shutdown, before the step of controlling the hardware driver to execute the operation instruction by the cleaning function, the method further includes:
and sending the shutdown message to a dispatching system so as to improve the speed of the dispatching system for recovering the computing resources.
In order to solve the above technical problem, the present application further provides a cloud computer control apparatus, including:
the writing module is used for acquiring a login process of the system and writing a dynamic link library into the login process;
the acquisition module is used for acquiring an operation instruction by using the dynamic link library after the operation for controlling the system is detected;
and the first execution module is used for controlling the hardware driver to execute the operation instruction through the cleaning function.
In order to solve the above technical problem, the present application further provides a cloud computer control apparatus, including a memory for storing a computer program;
a processor for implementing the steps of the system control method when executing the computer program.
In order to solve the above technical problem, the present application further provides a computer-readable storage medium having a computer program stored thereon, where the computer program is executed by a processor to implement the steps of the system control method.
The system control method provided by the application comprises the following steps: and acquiring a login process of the system, and writing a dynamic link library into the login process to acquire an operation instruction sent to the system by a user. And when the operation of the control system is detected, acquiring an operation instruction by using the dynamic link library, and controlling the hardware drive to execute the operation instruction by using the cleaning function. And directly calling a cleaning function to execute an operation instruction, and skipping the steps of saving a closing process and saving a file, thereby improving the system shutdown speed. Therefore, by adopting the system control method provided by the application, the shutdown and restart speeds of the cloud computer can be improved, and the cloud host can conveniently recover the computing resources.
In addition, the application also provides a cloud computer control device and a medium, which correspond to the system control method and have the same effects as the system control method.
Drawings
In order to more clearly illustrate the embodiments of the present application, the drawings needed for the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flowchart of a cloud computer control method according to an embodiment of the present disclosure;
fig. 2 is a structural diagram of a cloud computer control apparatus according to an embodiment of the present disclosure;
fig. 3 is a structural diagram of another cloud computer control apparatus according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the present application.
The core of the application is to provide a cloud computer control method, a cloud computer control device and a cloud computer control medium.
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings.
In the application scene of the cloud computer such as the internet bar, the cloud computer cannot store data and files because the storage device such as the hard disk does not exist, but the process of storing the files still needs to be executed when the user control system is shut down or restarted, so that the shutdown time of the cloud computer is prolonged. In order to reduce the shutdown or restart time of the cloud computer, the application provides a cloud computer control method, which includes the steps of firstly obtaining a login process of a system, writing a dynamic link library into the login process, obtaining a shutdown operation instruction or a restart operation instruction by using the dynamic link library after detecting the operation (such as shutdown or restart) of a user control system, and controlling a hardware driver to execute the obtained operation instruction by using a cleaning function. It can be understood that, in the present application, the cloud computer is a client operated by the client using the cloud computing service, and includes, but is not limited to, smart devices such as a smart phone, a tablet computer, a notebook computer, or a desktop computer.
It can be understood that the computer shutdown process includes three stages, namely, a soft protection stage, a hard protection stage and a power-off stage, wherein in the soft protection stage, the computer system ends an application program opened by a user, saves setting information and file information of the user, and stops partial processes of system services and an operating system; in the hard protection stage, the computer system controls the computer hardware to reset; and after the hard protection stage is finished, the computer system controls the power management module to cut off the power supply of each hardware device connected with the mainboard.
In specific implementation, when a user triggers a shutdown operation, the system usually calls an ExitWindowsEx function to realize shutdown; when the Csrs acquires that the ExitWindowsEx function is successfully called, sending a shutdown instruction to an application program window belonging to a system login process (Willogon process); and sending a shutdown instruction (WM _ QUERYENDSESSION instruction or WM _ ENDSESSION instruction) to each system process, wherein if an unclosed process still exists after a preset time from the moment when the csrss process sends the shutdown instruction, the unclosed process needs to be manually closed by a user or forcibly closed by the system process. The login process winlogo calls a cleaning function NtShutdownSystem to shut down the drive and other subsystems and to reset the hardware of the computer system, e.g. to reset the head of the disk, to stop the hardware driver, etc. And finally, disconnecting the power supply of each hardware device to complete the shutdown process.
Fig. 1 is a flowchart of a cloud computer control method provided in the present application, and as shown in fig. 1, the system control method includes:
s10: and acquiring a login process of the system, and writing a dynamic link library into the login process.
It can be understood that the function for searching for a login Process mentioned in this embodiment may use a CreateToolhelp32Snapshot function, a Process32First function, and a Process32Next function of the system itself, or may be written by an administrator, and only needs to ensure that the function can implement a function of searching for a login Process in each running Process, where the searching manner may be searching according to a Process name, or searching according to a Process ID, and is not limited herein. Similarly, the function for opening the login process mentioned in this embodiment may be an OpenProcess function, or a function may be written by an administrator, and it is only necessary to ensure that the function can open the login process.
The application scenarios of the scheme provided by the present application include, but are not limited to, computer devices of a Window system and a Linux system, and the present embodiment describes the system control method provided by the present application by taking an application in a Windows system as an example.
It should be noted that, the system control method provided by the present application is executed by the cloud computer user terminal, and the cloud computer user terminal creates a process for the method to implement the relevant steps.
In specific implementation, a Process operated by a current cloud computer is subjected to traversal search according to a Process name by using a CreateToolhelp32Snapshot function, a Process32First function and a Process32Next function, so that a login Process Winlogon and a Process ID of the login Process Winlogon are obtained. And sending the acquired process ID to an OpenProcess function to open a login process Winlogon, and writing a dynamic link library into the login process to detect the operation of shutdown or restart of the user control system. It can be understood that the process is an operation performed before the user triggers the shutdown operation, and the process can be realized through a pre-generated script, or can be manually realized by a manager, and is more convenient and faster to realize through the script.
S11: and when the operation of the control system is detected, acquiring an operation instruction by using the dynamic link library, wherein the operation comprises shutdown and restart.
S12: and controlling the hardware driver to execute the operation instruction through the cleaning function.
It can be understood that, after the dynamic link library is injected into the login process, the process of obtaining the operation instruction through the dynamic link library may be to obtain a parameter of the execution function by using the dynamic link library, and determine the operation instruction corresponding to the parameter; for convenience of expression, the new shutdown function is named as a fast shutdown function in the application, and the fast shutdown function has the shutdown operation function of the original shutdown function and can also send the acquired operation instruction to the fast shutdown process, so that the fast shutdown process can perform corresponding operation on the cloud computer terminal.
In the implementation, when the computer system detects an operation of controlling the shutdown or the restart of the system, for example: and starting to execute a shutdown process after detecting that a user clicks a shutdown or restart button on a screen or detecting that the user sends a shutdown instruction through a command line. When the system starts to execute a shutdown process, the pre-generated quick shutdown function sends the acquired parameters to a quick shutdown process, and the quick shutdown process analyzes the acquired parameters to acquire an operation instruction. In order to reduce the shutdown time, the step of closing the application program is omitted, and after the rapid shutdown process obtains the operation instruction, the hardware driver of the cloud computer system is called by the cleaning function to execute the operation instruction so as to achieve rapid shutdown.
It can be understood that the cleaning function includes an NtShutdownSystem function, an ntinitiatepowermaction function, and the like, and is used for controlling the hardware drive of the cloud computer to implement fast shutdown. When the cleaning function is called, firstly, a hardware drive is informed to store kernel data, cache information of a registry and a file in a cache queue is refreshed on a disk, and unsaved application data are discarded; and then resetting the hardware drive and cutting off the power supply of the hardware equipment so as to skip the waiting stage to realize quick shutdown.
It should be noted that, since the cloud computer does not have a storage device such as a disk, the clean-up function cannot store kernel data and cache data. In order to meet the special requirement of a user for storing data, kernel data, cache data, files and the like can be packaged into a data packet form, and the data packet is sent to a remote server and stored in a special storage space of the user. When the user uses the cloud computer again, the cloud computer suitable for the user can be quickly created only by downloading data from the remote server.
It can be understood that, in the process of controlling the hardware driver to shut down or in the process of sending the data packet to the remote server, the cloud computer may not be shut down successfully due to the fact that the cloud computer is stuck, and when it is detected that the operation instruction is not successfully executed in the threshold time in the fast shutdown process, the system kernel program is called to control the execution of the operation instruction so as to cut off the power supply of the motherboard, thereby realizing the fast shutdown.
It should be noted that, in order to improve the security of the system and prevent the system from being automatically shut down due to external attack by using the fast shutdown process, the shutdown authority of the cleaning function may be cancelled, the cleaning function cannot control the hardware driver to shut down when the shutdown authority is not present, and the shutdown authority of the cleaning function is granted when the fast shutdown process is executed each time.
In order to improve the resource utilization efficiency of the cloud server, the cloud server can rapidly recover the computing resources after the cloud computer client is shut down, and the shutdown message can be sent to the scheduling system before the hardware drive is controlled to execute the operation instruction through the cleaning function, so that the speed of the scheduling system for recovering the computing resources is improved.
In this embodiment, a cloud computer control method is provided, and the method includes: and acquiring a login process of the system, and writing a dynamic link library into the login process to acquire an operation instruction sent to the system by a user. And when the operation of the control system is detected, acquiring an operation instruction by using the dynamic link library, and controlling the hardware drive to execute the operation instruction by using the cleaning function. And directly calling a cleaning function to execute an operation instruction, and skipping the steps of saving a closing process and saving a file, thereby improving the system shutdown speed. Therefore, by adopting the system control method provided by the application, the shutdown and restart speeds of the cloud computer can be improved, and the cloud host can conveniently recover the computing resources.
In specific implementation, because the actual computing capacity of the cloud computer operation end used by a client cannot be obtained, in the process of controlling hardware-driven shutdown by using a cleaning function, shutdown failure may be caused by the fact that an acquisition system request is blocked due to overlarge workload; or in the process of sending the data packet to the remote server, the cloud computer fails to be powered off due to data transmission failure caused by network disconnection of the cloud computer.
To solve this problem, on the basis of the above embodiment, after the step of controlling the hardware driver to execute the operation instruction by the cleaning function, the method further includes:
judging whether the operation instruction is successfully executed within the threshold time;
if the operation instruction is not successfully executed, calling a system kernel program to control and execute the operation instruction.
It is understood that the threshold time mentioned in this embodiment may be 10s, 20s, etc., may be a default time of the system, or may be set by the user, and is not limited herein.
In specific implementation, if the rapid shutdown process does not successfully execute the operation instruction within the threshold time, a system kernel HalReturn ToFirmware function is called, the power of a mainboard and other hardware equipment is cut off, and the computer is forced to be shut down.
In this embodiment, when the fast shutdown process fails to successfully execute the operation instruction within the threshold time, the system kernel program is called to execute the power-off operation, so as to implement fast shutdown or restart, and improve the stability and reliability of the system control method.
In order to improve the safety of the system and prevent the system from being automatically shut down due to external attack on the cleaning function, the shutdown authority of the cleaning function can be cancelled, and the shutdown authority of the cleaning function is granted when the cleaning function is called by the rapid shutdown process every time.
On the basis of the above embodiment, before the step of controlling the hardware driver to execute the operation instruction by the cleaning function, the method further includes:
and granting the cleaning function shutdown authority.
In specific implementation, the method for granting the shutdown permission to the cleaning function includes directly increasing the permission to the cleaning function so that the cleaning function can control the hardware drive to realize the shutdown task, and also granting the fast shutdown process so that the cleaning function shutdown permission is indirectly granted so that the cleaning function can control the hardware drive to realize the shutdown task when being called by the fast shutdown process.
In order to further improve the security of the system and prevent the cleaning function from being called by different processes, the latter scheme is selected in the embodiment. The system calls a ZwOpenProcessTokenEx function to open a Token handle of the rapid SHUTDOWN process, and then calls ZwAdjustprivilegeToken to grant SE _ SHUTDOWN _ PRIVILEGE authority to the handle of the current process, namely the SHUTDOWN authority. And after the fast shutdown process acquires the shutdown authority, calling a cleaning function (such as an NtShutdownSystemfunction) to control the cloud computer to be shut down or restarted.
In the embodiment, the shutdown authority of the cleaning function is temporarily granted during calling, so that the safety of the cloud computer is improved.
Files and user data do not need to be stored in scenes such as internet bars, but with the development of cloud technology, cloud technology services are applied in more and more scenes, such as: a company office scene, etc. In these scenarios, the user stores the files used by the user and the data generated during the use, so as to facilitate the subsequent work.
In order to solve this problem, on the basis of the above embodiment, before the step of controlling the hardware driver to execute the operation instruction by the cleaning function, the method further includes:
generating a data packet comprising kernel data and a cache file of the system;
and sending the data packet to a server.
In specific implementation, in the specific implementation, the file and the kernel data generated during the operation of the cloud computer are stored in corresponding folders, and the process of collecting the file and the kernel data may be as follows: copying files and kernel data at intervals of a preset time period; or collecting file and kernel data before executing shutdown or restart instructions. The second scheme is selected in this example. In addition, the user can select files to be saved and the like by himself and upload the files to the remote server.
In transmitting a file and kernel data to a remote server via a network, in order to reliably and accurately transmit the file and kernel data to a destination and efficiently utilize transmission resources (transmission devices and transmission lines), the file and kernel data are packaged in advance as a packet.
Common serial port encapsulation protocols include: high-level Data Link Control (HDLC) protocol, Point-to-Point (ppp) protocol, and frame-relay (FR) protocol. In the OSI7 layer network reference model, each layer of the model is primarily responsible for communicating with peer layers on other machines. When data encapsulation is carried out, the data with encapsulation is encapsulated in a group of protocol head and tail, the process is realized in a protocol data unit, wherein each layer of the model is composed of the protocol head, the protocol tail and the data encapsulation of the layer.
In order to ensure the transmission accuracy and enable the remote server to store the log file to a correct position, the name of a cloud computer or a user, the generation time of the file and kernel data and some bytes for error correction need to be added to the transmitted data packet, and in order to improve the safety and reliability of the data transmission process, the data packet can be encrypted.
In the embodiment, the data packet containing the kernel data and the cache file of the system is sent to the remote server, so that a user can store the required file and the kernel data, the subsequent use is convenient, and the application range of the system control method is expanded.
As a preferred embodiment, the obtaining the operation instruction by using the dynamic link library includes:
acquiring an execution function for executing an operation instruction in a login process;
generating a quick shutdown function on the basis of executing the function by utilizing the dynamic link library;
and determining an operation instruction according to the parameters of the quick shutdown function.
In the embodiment, the fast shutdown function is generated on the basis of executing the function by using the dynamic link library, so that the fast shutdown function is called when the cloud computer executes a shutdown or restart instruction, the condition that the operation instruction is failed to be acquired is prevented, and the stability and the reliability of the system control method are improved.
As a preferred embodiment, the process of obtaining the login of the system includes:
and acquiring the login process and the process ID of the login process in a traversing mode.
In a specific implementation, a Process search function (for example, a CreateToolhelp32Snapshot function, a Process32First function, and a Process32Next function) is used for performing traversal search on the Process information of the current host, and the Process name is compared to obtain the login Process winlogo and the Process ID of the login Process, so that the dynamic link library is conveniently injected into the login Process.
In a specific implementation, after the cloud computer is turned off, the cloud server needs to quickly recover the computing resources occupied by the cloud computer. In order to improve the resource utilization efficiency of the cloud server, on the basis of the foregoing embodiment, before the step of controlling the hardware driver to execute the operation instruction by the cleaning function if the operation is shutdown, the method further includes:
and sending the shutdown message to the scheduling system to improve the speed of the scheduling system for recovering the computing resources.
In this embodiment, when the shutdown operation is executed by calling the cleaning function to control the hardware driver, the shutdown message is sent to the scheduling system, so that the cloud server can rapidly recover the computing resources, the utilization efficiency of the computing resources is improved, and the operation cost of the cloud server is reduced.
In the above embodiments, the system control method is described in detail, and the present application also provides embodiments corresponding to the system control device. It should be noted that the present application describes the embodiments of the apparatus portion from two perspectives, one from the perspective of the function module and the other from the perspective of the hardware.
Since the embodiments of the apparatus portion and the method portion correspond to each other, please refer to the description of the embodiments of the method portion for the embodiments of the apparatus portion, which is not repeated here.
Fig. 2 is a cloud computer control apparatus according to an embodiment of the present disclosure, the apparatus including:
the writing module 10 is used for acquiring a login process of the system and writing a dynamic link library into the login process;
the acquisition module 11 is configured to acquire an operation instruction by using the dynamic link library after detecting an operation of the control system;
and the first execution module 12 is used for controlling the hardware driver to execute the operation instruction through the cleaning function.
In addition, the system control device provided by the embodiment of the present application further includes:
and the second execution module is used for calling a system kernel program to control and execute the operation instruction when the operation instruction is not successfully executed within the threshold time of the rapid shutdown process.
And the permission module is used for granting the shutdown permission of the cleaning function before the step of controlling the hardware driver to execute the operation instruction through the cleaning function.
And the data sending module is used for generating a data packet comprising kernel data and a cache file of the system and sending the data packet to the server before the step of controlling the hardware driver to execute the operation instruction through the cleaning function.
And the message sending module is used for sending the shutdown message to the scheduling system before the step of controlling the hardware driver to execute the operation instruction through the cleaning function so as to improve the speed of the scheduling system for recovering the computing resources.
The embodiment provides a cloud computer control device, and the device includes: and acquiring a login process of the system, and writing a dynamic link library into the login process to acquire an operation instruction sent to the system by a user. And when the operation of the control system is detected, acquiring an operation instruction by using the dynamic link library, and controlling the hardware drive to execute the operation instruction by using the cleaning function. And directly calling a cleaning function to execute an operation instruction, and skipping the steps of saving a closing process and saving a file, thereby improving the system shutdown speed. Therefore, by adopting the system control device provided by the application, the shutdown and restart speeds of the cloud computer can be improved, and the cloud host can conveniently recover the computing resources.
Fig. 3 is a structural diagram of another system control device according to an embodiment of the present application, and as shown in fig. 3, the system control device includes: a memory 20 for storing a computer program;
the processor 21 is configured to implement the steps of controlling the cloud computer to rapidly shut down and restart according to the above embodiment when executing the computer program.
The cloud computer client operation end provided by the embodiment may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, or the like.
The processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 21 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a Graphics Processing Unit (GPU) which is responsible for rendering and drawing the content required to be displayed by the display screen. In some embodiments, the processor 21 may further include an Artificial Intelligence (AI) processor for processing computational operations related to machine learning.
The memory 20 may include one or more computer-readable storage media, which may be non-transitory. Memory 20 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used for storing the following computer program 201, wherein after being loaded and executed by the processor 21, the computer program can implement the relevant steps of the system control method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202, data 203, and the like, and the storage manner may be a transient storage manner or a permanent storage manner. Operating system 202 may include, among others, Windows, Unix, Linux, and the like. The data 203 may include, but is not limited to, files and kernel data generated during use of the cloud computer, and the like.
In some embodiments, the system control device may further include a display 22, an input/output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
Those skilled in the art will appreciate that the configuration shown in FIG. 3 is not intended to be limiting of the system control and may include more or fewer components than those shown.
The system control device provided by the embodiment of the application comprises a memory and a processor, and when the processor executes a program stored in the memory, the following method can be realized:
acquiring a login process of a system, and writing a dynamic link library into the login process;
when the operation of the control system is detected, acquiring an operation instruction by using the dynamic link library;
and controlling the hardware driver to execute the operation instruction through the cleaning function.
Finally, the application also provides a corresponding embodiment of the computer readable storage medium. The computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, realizes the above-mentioned method embodiments.
It is to be understood that if the method in the above embodiments is implemented in the form of software functional units and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the methods described in the embodiments of the present application, or all or part of the technical solutions. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The system control method, apparatus, and medium provided by the present application are described in detail above. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A cloud computer control method is characterized by comprising the following steps:
acquiring a login process of a system, and writing a dynamic link library into the login process;
when the operation for controlling the system is detected, acquiring an operation instruction by using the dynamic link library, wherein the operation comprises shutdown and restart;
and controlling a hardware driver to execute the operation instruction through a cleaning function.
2. The system control method according to claim 1, further comprising, after the step of controlling the hardware driver to execute the operation instruction by the cleaning function, the step of:
judging whether the operation instruction is successfully executed within threshold time;
if the operation instruction is not successfully executed, calling a system kernel program to control and execute the operation instruction.
3. The system control method according to claim 1, further comprising, before the step of controlling the hardware driver to execute the operation instruction by the cleaning function, the step of:
and granting the shutdown authority to the cleaning function.
4. The system control method according to claim 1, further comprising, before the step of controlling the hardware driver to execute the operation instruction by the cleaning function, the step of:
generating a data package comprising kernel data and a cache file of the system;
and sending the data packet to a server.
5. The system control method according to claim 1, wherein the obtaining the operation instruction using the dynamic link library includes:
acquiring an execution function for executing the operation instruction in the login process;
generating a fast shutdown function on the basis of the execution function by using the dynamic link library to replace the execution function;
and determining the operation instruction according to the parameters of the rapid shutdown function.
6. The system control method according to claim 1, wherein the acquiring a login procedure of the system includes:
and acquiring the login process and the process ID of the login process in a traversal mode.
7. The system control method according to claim 1, wherein before the step of controlling the hardware driver to execute the operation command through the cleaning function if the operation is shutdown, the method further comprises:
and sending the shutdown message to a dispatching system so as to improve the speed of the dispatching system for recovering the computing resources.
8. A cloud computer control device, comprising:
the writing module is used for acquiring a login process of the system and writing a dynamic link library into the login process;
the acquisition module is used for acquiring an operation instruction by using the dynamic link library after the operation for controlling the system is detected;
and the first execution module is used for controlling the hardware driver to execute the operation instruction through the cleaning function.
9. A cloud computer control device is characterized by comprising a memory, a storage unit and a control unit, wherein the memory is used for storing a computer program;
a processor for implementing the steps of the system control method according to any one of claims 1 to 7 when executing said computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, carries out the steps of the system control method according to any one of claims 1 to 7.
CN202111629823.7A 2021-12-28 2021-12-28 Cloud computer control method, device and medium Pending CN114281422A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111629823.7A CN114281422A (en) 2021-12-28 2021-12-28 Cloud computer control method, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111629823.7A CN114281422A (en) 2021-12-28 2021-12-28 Cloud computer control method, device and medium

Publications (1)

Publication Number Publication Date
CN114281422A true CN114281422A (en) 2022-04-05

Family

ID=80877289

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111629823.7A Pending CN114281422A (en) 2021-12-28 2021-12-28 Cloud computer control method, device and medium

Country Status (1)

Country Link
CN (1) CN114281422A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114327010A (en) * 2021-12-28 2022-04-12 杭州雾联科技有限公司 System control method, device and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114327010A (en) * 2021-12-28 2022-04-12 杭州雾联科技有限公司 System control method, device and medium

Similar Documents

Publication Publication Date Title
WO2019237584A1 (en) Container management method, device, computer apparatus, and storage medium
CN109634718B (en) Method and system for creating mirror image by cloud platform
CN113626133B (en) Virtual machine control method, device, equipment and computer readable storage medium
CN105786547A (en) Operation system restarting method and apparatus
CN111124761B (en) Equipment restarting method, device, equipment and medium
CN108256332A (en) A kind of method of the BIOS startup passwords setting based on IPMI orders
CN111367722B (en) Virtual machine backup method, device and equipment and readable storage medium
EP3499373B1 (en) Method and apparatus for processing process
CN114281422A (en) Cloud computer control method, device and medium
WO2020000947A1 (en) Method, apparatus, and device for refreshing encapsulated bios data
CN107453937B (en) Management method of network connection pool, network access method and related equipment
CN110134546B (en) Batch restarting windows system method, electronic device and storage medium
CN110928630A (en) Activation control method, device and equipment for application program window and storage medium
CN115454673A (en) Data collection method, device and medium for baseboard management controller
CN115951949A (en) Recovery method and device for configuration parameters of BIOS (basic input output System) and computing equipment
CN114327010A (en) System control method, device and medium
EP3396553A1 (en) Method and device for processing data after restart of node
CN114721876A (en) Data backup method, device and medium
CN113656378A (en) Server management method, device and medium
WO2017096889A1 (en) Method and device for upgrading and downgrading system
CN110837433A (en) Performance optimization method and device and electronic equipment
CN114826886B (en) Disaster recovery method and device for application software and electronic equipment
US11740918B2 (en) Method for accessing application logs within virtual machines based on operator-defined criteria
CN117032881A (en) Method, device and storage medium for detecting and recovering abnormality of virtual machine
CN116048642A (en) LLDP (LLDP) enabled state control method, LLDP enabled state control device and LLDP enabled state control 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