CN114327010A - System control method, device and medium - Google Patents

System control method, device and medium Download PDF

Info

Publication number
CN114327010A
CN114327010A CN202111632286.1A CN202111632286A CN114327010A CN 114327010 A CN114327010 A CN 114327010A CN 202111632286 A CN202111632286 A CN 202111632286A CN 114327010 A CN114327010 A CN 114327010A
Authority
CN
China
Prior art keywords
operation instruction
instruction
shutdown
instructions
system control
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
CN202111632286.1A
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 CN202111632286.1A priority Critical patent/CN114327010A/en
Publication of CN114327010A publication Critical patent/CN114327010A/en
Pending legal-status Critical Current

Links

Images

Abstract

The application discloses a system control method, a device and a medium, comprising the following steps: acquiring an operation event message and a service requirement, and analyzing the operation event message to acquire a first operation instruction, wherein the first operation instruction at least comprises: the cloud host computer control method comprises the steps of shutdown instructions, restart instructions and logout instructions so as to know the operation of a current user on the cloud host computer and the operation actually required to be taken on the cloud host computer; converting the first operation instruction into a second operation instruction according to the corresponding relation between the service requirement and the operation instruction, and executing the second operation instruction, wherein the second operation instruction at least comprises: shutdown instruction, restart instruction, and logout instruction. Therefore, the system control method provided by the application can control the shutdown, the restart and the logout of the cloud host according to the actual requirements, so that the cloud host can meet the service requirements in different application scenes, and the use experience of a user is improved.

Description

System control method, device and medium
Technical Field
The present application relates to the field of cloud computing, and in particular, to a method, an apparatus, and a medium for system control.
Background
The cloud host is a novel cloud host mode which is produced 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. Currently, a scheduling system generally controls cloud host computing resources to provide services for users, and allocates the cloud host computing resources.
At present, a scheduling system can only provide computing resources for a user according to the working state of a cloud host client, for example, the computing resources are recovered when the user is powered off, the computing resources are provided when the user is restarted, and the like, but when the user has special requirements (for example, the system is powered on in advance) or the user is in misoperation, and the like, the cloud host client system cannot be operated by the scheduling system after being powered off, logged off or restarted, so that the user requirements cannot be met, even system faults can be caused, and the user experience is influenced.
Therefore, how to provide a cloud host system control method to meet business requirements in different application scenarios and improve user experience is a problem that needs to be solved urgently by those skilled in the art.
Disclosure of Invention
The application aims to provide a system control method, a device and a medium, so as to meet business requirements in different application scenes and improve user experience.
In order to solve the above technical problem, the present application provides a system control method, including:
acquiring operation event information and service requirements;
analyzing the operation event message to obtain a first operation instruction, wherein the first operation instruction at least comprises: shutdown instructions, restart instructions and logout instructions;
converting the first operation instruction into a second operation instruction according to the corresponding relation between the service requirement and the second operation instruction, wherein the second operation instruction at least comprises: shutdown instructions, restart instructions and logout instructions;
and executing the second operation instruction.
Preferably, the acquiring the operation event information and the service requirement includes:
acquiring a login process of a system, and writing a dynamic link library into the login process to acquire the first operation instruction;
and acquiring an operation event message which is sent by the dynamic link library and contains the first operation instruction.
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, the acquiring the first operation instruction 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 executing the second operation instruction includes:
if the second operation instruction is a shutdown instruction, controlling a hardware drive to execute the second operation instruction through a cleaning function so as to close the system;
if the second operation instruction is a logout instruction, user login information is cleared;
and if the second operation instruction is a restart instruction, controlling a hardware driver to execute the second operation instruction through a cleaning function, and restarting the system.
Preferably, after the step of controlling the hardware driver to execute the second operation instruction by the cleaning function, the method further includes:
judging whether the hardware drive successfully executes the second operation instruction within threshold time;
if the second operation instruction is not successfully executed, calling a system kernel program to control the hardware driver to execute the second operation instruction.
Preferably, before the step of executing the second operation instruction, 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.
In order to solve the above technical problem, the present application further provides a system control apparatus, including:
the acquisition module is used for acquiring the operation event message and the service requirement;
the analysis module is configured to analyze the operation event message to obtain a first operation instruction, where the first operation instruction at least includes: shutdown instructions, restart instructions and logout instructions;
a conversion module, configured to convert the first operation instruction into a second operation instruction according to a corresponding relationship between the service requirement and the operation instruction, where the second operation instruction at least includes: shutdown instructions, restart instructions and logout instructions;
and the execution module is used for executing the second operation instruction.
In order to solve the above technical problem, the present application further provides a system control apparatus, including a memory for storing a computer program;
a processor for implementing the steps of the system control apparatus when executing the computer program.
In order to solve the above technical problem, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program realizes the steps of the system control apparatus when being executed by a processor.
The application provides a system control method, which comprises the following steps: acquiring an operation event message and a service requirement, and analyzing the operation event message to acquire a first operation instruction, wherein the first operation instruction at least comprises: the cloud host computer control method comprises the steps of shutdown instructions, restart instructions and logout instructions so as to know the operation of a current user on the cloud host computer and the operation actually required to be taken on the cloud host computer; converting the first operation instruction into a second operation instruction according to the corresponding relation between the service requirement and the operation instruction, and executing the second operation instruction, wherein the second operation instruction at least comprises: shutdown instruction, restart instruction, and logout instruction. Therefore, the system control method provided by the application can control the shutdown, the restart and the logout of the cloud host according to the actual requirements, so that the cloud host can meet the service requirements in different application scenes, and the use experience of a user is improved.
In addition, the application also provides a system control device and a medium, which correspond to the method and have the same effects.
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 system control method according to an embodiment of the present application;
fig. 2 is a block diagram of a system control device according to an embodiment of the present disclosure;
fig. 3 is a block diagram of another system control device according to an embodiment of the present application.
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 system control method, device and medium to meet business requirements in different application scenes and improve user experience.
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.
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 Cssrs 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.
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.
Fig. 1 is a flowchart of a system control method according to an embodiment of the present application, and as shown in fig. 1, the system control method according to the present application includes:
s10: and acquiring the operation event message and the service requirement.
In a specific implementation, the method for acquiring the operation event message includes: acquiring user operation information through a monitoring function, for example, setting an individual monitoring function for monitoring whether a mouse of a user clicks an operation button such as shutdown, restart, logout, and the like, and acquiring a corresponding operation instruction according to the clicked button after the operation button is clicked; the functions called by shutdown, restart, log-off and other operations can also be monitored, and when a certain function is called, the user is indicated to execute the corresponding operation. The former scheme needs to consume computing resources for monitoring the mouse operation of the user, so the latter scheme is selected in the embodiment to acquire the operation event information.
Meanwhile, the method for acquiring the service requirement comprises the following steps: acquiring service requirements set by a manager or a user, for example: in order to improve the working efficiency of the cloud host, a manager sets that a certain cloud host needs to be pre-started, only needs to read the setting information of the manager, and can obtain the service requirement, wherein the service requirement is to be restarted after shutdown; the service requirement can also be judged by self according to the preset logic, for example: if a user sets a certain service to be in a long-term running state, the service requirements at the moment are that a shutdown instruction, a restart instruction and a logout instruction are invalidated.
S11: analyzing the operation event message to obtain a first operation instruction, wherein the first operation instruction at least comprises: shutdown instruction, restart instruction, and logout instruction.
S12: converting the first operation instruction into a second operation instruction according to the corresponding relation between the service requirement and the second operation instruction, wherein the second operation instruction at least comprises: shutdown instruction, restart instruction, and logout instruction.
S13: and executing the second operation instruction.
It should be noted that, the system control method provided by the present application is executed by the cloud host user terminal, and the cloud host user terminal creates a process for the method to implement the relevant steps.
In specific implementation, a Process operated by a current cloud host 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. Sending the acquired process ID to an OpenProcessFunction to open a login process Winlogon, and writing a dynamic link library into the login process by using a VirtualAllocEx function, a WriteProcessMemory function and a CreateRemoteThread function to detect the operation of controlling the shutdown or restart of the system by a user. 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.
After the operation event message is analyzed to obtain the first operation instruction, the dynamic link library sends the first operation instruction to the scheduling system through the streaming program so that the edge scheduling system can control the cloud host to execute operations such as shutdown, restart or log-off, and the like. Meanwhile, the dynamic link library uploads information such as the first operation instruction and the execution result to the log system, so that the scheduling system can judge the working state of the cloud host.
In a specific implementation, after the edge scheduling system obtains the first operation instruction, the first operation instruction is converted into the second operation instruction according to a corresponding relationship between a service requirement and the first operation instruction, for example, when the first operation instruction is a shutdown instruction, when a process which needs to be always run is detected in a system background, or when the shutdown instruction needs to be rejected according to a corresponding relationship between the service requirement and the second operation instruction, the first operation instruction is invalidated; when the system is required to be pre-started, if the first operation instruction is a shutdown instruction, the first operation instruction is converted into a restart instruction. Similarly, the method can also realize the invalidation of the restart instruction and the logout instruction, and the operations of converting the restart instruction into the shutdown instruction, converting the logout instruction into the restart instruction and the like.
It should be noted that the clean-up function cannot store kernel data and cache data because the cloud host does not have a storage device such as a disk. 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 host again, the cloud host 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 host may be blocked to cause the shutdown to be unsuccessful, 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, and implement the fast shutdown.
The application provides a system control method, which comprises the following steps: acquiring an operation event message and a service requirement, and analyzing the operation event message to acquire a first operation instruction, wherein the first operation instruction at least comprises: the cloud host computer control method comprises the steps of shutdown instructions, restart instructions and logout instructions so as to know the operation of a current user on the cloud host computer and the operation actually required to be taken on the cloud host computer; converting the first operation instruction into a second operation instruction according to the corresponding relation between the service requirement and the operation instruction, and executing the second operation instruction, wherein the second operation instruction at least comprises: shutdown instruction, restart instruction, and logout instruction. Therefore, the system control method provided by the application can control the shutdown, the restart and the logout of the cloud host according to the actual requirements, so that the cloud host can meet the service requirements in different application scenes, and the use experience of a user is improved.
In a specific implementation, the method for acquiring the operation event information includes: acquiring user operation information through a monitoring function, monitoring whether a user mouse clicks operation buttons such as shutdown, restart and logout, and acquiring a corresponding operation instruction according to the clicked button after clicking the operation button; the functions called by shutdown, restart, log-off and other operations can also be monitored, and when a certain function is called, the user is indicated to execute the corresponding operation. In order to reduce the consumption of computing resources, the present embodiment selects the second scheme.
On the basis of the above embodiment, acquiring the operation event information and the service requirement includes:
acquiring a login process of a system, and writing a dynamic link library into the login process to acquire a first operation instruction;
and acquiring an operation event message which is sent by the dynamic link library and contains a first operation instruction.
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.
It should be noted 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 host 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 drive of the cloud host system is called by the cleaning function to execute the operation instruction so as to achieve rapid shutdown.
In the embodiment, the dynamic link library is injected into the login process to acquire the operation event message, so that the waste of computing resources is reduced, and the acquisition efficiency of the operation instruction is 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.
As a preferred embodiment, the acquiring the first operation instruction 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 host executes the 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.
In specific implementation, different execution modes are adopted for different second operation instructions, and if the second operation instructions are shutdown instructions, the second operation instructions are executed through a cleaning function control hardware drive so as to close the system;
if the second operation instruction is a logout instruction, user login information is cleared;
and if the second operation instruction is a restart instruction, controlling a hardware driver to execute the second operation instruction through a cleaning function, and restarting the system.
In this embodiment, different execution modes are adopted for different obtained second operation instructions, and if the second control instruction is shutdown or restart, the shutdown instruction or the restart instruction is executed by calling a cleaning function control hardware drive, so as to realize rapid shutdown and save shutdown time; and if the second control instruction is a logout instruction, controlling the login process to remove the user login information and store files and data so as to facilitate the subsequent use of the cloud host.
In specific implementation, because the actual computing capacity of the cloud host operation end used by the client cannot be obtained, in the process of controlling hardware-driven shutdown by using a cleaning function, shutdown failure may be caused by a system request being blocked due to overlarge workload; or in the process of sending the data packet to the remote server, the cloud host fails to be powered off due to data transmission failure caused by network disconnection of the cloud host.
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 second 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 a second 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.
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 kernel data generated by the cloud host during operation are stored in corresponding folders, and the process of collecting the file and 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 host or a user, the generation time of the file and kernel data and some bytes for error correction need to be added to the sent data packet, and in order to improve the safety and reliability of the data sending 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.
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 system control device according to an embodiment of the present application, and as shown in fig. 2, the system control device includes:
an obtaining module 10, configured to obtain an operation event message and a service requirement;
a parsing module 11, configured to parse the operation event message to obtain a first operation instruction, where the first operation instruction at least includes: shutdown instructions, restart instructions and logout instructions;
a conversion module 12, configured to convert the first operation instruction into a second operation instruction according to a corresponding relationship between the service requirement and the operation instruction, where the second operation instruction at least includes: shutdown instructions, restart instructions and logout instructions;
and the execution module 13 is configured to execute the second operation instruction.
The embodiment provides a system control method, which comprises the following steps: acquiring an operation event message and a service requirement, and analyzing the operation event message to acquire a first operation instruction, wherein the first operation instruction at least comprises: the cloud host computer control method comprises the steps of shutdown instructions, restart instructions and logout instructions so as to know the operation of a current user on the cloud host computer and the operation actually required to be taken on the cloud host computer; converting the first operation instruction into a second operation instruction according to the corresponding relation between the service requirement and the operation instruction, and executing the second operation instruction, wherein the second operation instruction at least comprises: shutdown instruction, restart instruction, and logout instruction. Therefore, the system control device provided by the application can control the shutdown, the restart and the logout of the cloud host according to actual requirements, so that the cloud host can meet service requirements in different application scenes, and the use experience of users is improved.
Fig. 3 is a structural diagram of a system control device according to another embodiment of the present application, and as shown in fig. 3, the system control device includes: a memory 20 for storing a computer program;
a processor 21 for implementing the steps of the method for obtaining an operational event message as described in the above embodiments when executing the computer program.
The cloud host control end provided by this embodiment may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, or a desktop computer.
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. Data 203 may include, but is not limited to, operational event messages 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 operation event information and service requirements;
analyzing the operation event message to obtain a first operation instruction, wherein the first operation instruction at least comprises: shutdown instructions, restart instructions and logout instructions;
converting the first operation instruction into a second operation instruction according to the corresponding relation between the service requirement and the operation instruction, wherein the second operation instruction at least comprises: shutdown instructions, restart instructions and logout instructions;
and executing the second operation instruction.
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, carries out the steps as set forth in 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 system control method, comprising:
acquiring operation event information and service requirements;
analyzing the operation event message to obtain a first operation instruction, wherein the first operation instruction at least comprises: shutdown instructions, restart instructions and logout instructions;
converting the first operation instruction into a second operation instruction according to the corresponding relation between the service requirement and the second operation instruction, wherein the second operation instruction at least comprises: shutdown instructions, restart instructions and logout instructions;
and executing the second operation instruction.
2. The system control method according to claim 1, wherein the obtaining operation event information and service requirements comprises:
acquiring a login process of a system, and writing a dynamic link library into the login process to acquire the first operation instruction;
and acquiring an operation event message which is sent by the dynamic link library and contains the first operation instruction.
3. The system control method according to claim 2, 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.
4. The system control method according to claim 2, wherein the acquiring the first operation instruction 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.
5. The system control method according to claim 1, wherein the executing the second operation instruction comprises:
if the second operation instruction is a shutdown instruction, controlling a hardware drive to execute the second operation instruction through a cleaning function so as to close the system;
if the second operation instruction is a logout instruction, user login information is cleared;
and if the second operation instruction is a restart instruction, controlling a hardware driver to execute the second operation instruction through a cleaning function, and restarting the system.
6. The system control method according to claim 5, wherein after the step of controlling the hardware driver to execute the second operation command through the cleaning function, the method further comprises:
judging whether the hardware drive successfully executes the second operation instruction within threshold time;
if the second operation instruction is not successfully executed, calling a system kernel program to control the hardware driver to execute the second operation instruction.
7. The system control method according to claim 1, further comprising, before the step of executing the second operation instruction:
generating a data package comprising kernel data and a cache file of the system;
and sending the data packet to a server.
8. A system control apparatus, comprising:
the acquisition module is used for acquiring the operation event message and the service requirement;
the analysis module is configured to analyze the operation event message to obtain a first operation instruction, where the first operation instruction at least includes: shutdown instructions, restart instructions and logout instructions;
a conversion module, configured to convert the first operation instruction into a second operation instruction according to a corresponding relationship between the service requirement and the operation instruction, where the second operation instruction at least includes: shutdown instructions, restart instructions and logout instructions;
and the execution module is used for executing the second operation instruction.
9. A system control apparatus, comprising a memory for storing a computer program;
a processor for implementing the steps of the system control apparatus as claimed in any one of claims 1 to 7 when executing the 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 device according to any one of claims 1 to 7.
CN202111632286.1A 2021-12-28 2021-12-28 System control method, device and medium Pending CN114327010A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111632286.1A CN114327010A (en) 2021-12-28 2021-12-28 System control method, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111632286.1A CN114327010A (en) 2021-12-28 2021-12-28 System control method, device and medium

Publications (1)

Publication Number Publication Date
CN114327010A true CN114327010A (en) 2022-04-12

Family

ID=81015986

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111632286.1A Pending CN114327010A (en) 2021-12-28 2021-12-28 System control method, device and medium

Country Status (1)

Country Link
CN (1) CN114327010A (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1369778A (en) * 2001-02-15 2002-09-18 英业达股份有限公司 High-safety shtdown method for protecting Window 9X system
US20090265535A1 (en) * 2008-04-17 2009-10-22 Steve Best Method and apparatus for setting computer-working-hours-based shutdown options
US20100153951A1 (en) * 2008-12-17 2010-06-17 Computer Parenting, Llc Operating system shutdown reversal and remote web monitoring
CN105740677A (en) * 2016-02-29 2016-07-06 宇龙计算机通信科技(深圳)有限公司 Startup and shutdown method, system and intelligent mobile terminal
CN105844148A (en) * 2016-03-16 2016-08-10 北京金山安全软件有限公司 Method and device for protecting operating system and electronic equipment
CN106203092A (en) * 2016-06-30 2016-12-07 北京金山安全软件有限公司 Method and device for intercepting shutdown of malicious program and electronic equipment
CN106325457A (en) * 2016-08-25 2017-01-11 广州御银科技股份有限公司 Shutdown monitoring system
CN107277263A (en) * 2017-07-10 2017-10-20 中国联合网络通信集团有限公司 terminal control method and device
CN108804147A (en) * 2018-05-28 2018-11-13 新华三云计算技术有限公司 Link closedown method, device and client
CN109032676A (en) * 2018-07-02 2018-12-18 北京爱国小男孩科技有限公司 A method of control computer and mobile phone shutdown mode
CN112463234A (en) * 2020-11-27 2021-03-09 努比亚技术有限公司 Shutdown management method and device, intelligent terminal and readable storage medium
CN114281422A (en) * 2021-12-28 2022-04-05 杭州雾联科技有限公司 Cloud computer control method, device and medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1369778A (en) * 2001-02-15 2002-09-18 英业达股份有限公司 High-safety shtdown method for protecting Window 9X system
US20090265535A1 (en) * 2008-04-17 2009-10-22 Steve Best Method and apparatus for setting computer-working-hours-based shutdown options
US20100153951A1 (en) * 2008-12-17 2010-06-17 Computer Parenting, Llc Operating system shutdown reversal and remote web monitoring
CN105740677A (en) * 2016-02-29 2016-07-06 宇龙计算机通信科技(深圳)有限公司 Startup and shutdown method, system and intelligent mobile terminal
CN105844148A (en) * 2016-03-16 2016-08-10 北京金山安全软件有限公司 Method and device for protecting operating system and electronic equipment
CN106203092A (en) * 2016-06-30 2016-12-07 北京金山安全软件有限公司 Method and device for intercepting shutdown of malicious program and electronic equipment
CN106325457A (en) * 2016-08-25 2017-01-11 广州御银科技股份有限公司 Shutdown monitoring system
CN107277263A (en) * 2017-07-10 2017-10-20 中国联合网络通信集团有限公司 terminal control method and device
CN108804147A (en) * 2018-05-28 2018-11-13 新华三云计算技术有限公司 Link closedown method, device and client
CN109032676A (en) * 2018-07-02 2018-12-18 北京爱国小男孩科技有限公司 A method of control computer and mobile phone shutdown mode
CN112463234A (en) * 2020-11-27 2021-03-09 努比亚技术有限公司 Shutdown management method and device, intelligent terminal and readable storage medium
CN114281422A (en) * 2021-12-28 2022-04-05 杭州雾联科技有限公司 Cloud computer control method, device and medium

Similar Documents

Publication Publication Date Title
KR102493449B1 (en) Edge computing test methods, devices, electronic devices and computer-readable media
WO2019051948A1 (en) Method, apparatus, server, and storage medium for processing monitoring data
US9311598B1 (en) Automatic capture of detailed analysis information for web application outliers with very low overhead
CN113760652B (en) Method, system, device and storage medium for full link monitoring based on application
CN111966465B (en) Method, system, equipment and medium for modifying host configuration parameters in real time
US9727394B2 (en) Establishing causality order of computer trace records
US20230214229A1 (en) Multi-tenant java agent instrumentation system
CN112799925A (en) Data acquisition method and device, electronic equipment and readable storage medium
CN113407383A (en) Main/standby system switching method and device, server and main/standby system
CN111954240A (en) Network fault processing method and device and electronic equipment
CN111124761B (en) Equipment restarting method, device, equipment and medium
CN114281422A (en) Cloud computer control method, device and medium
CN114327010A (en) System control method, device and medium
CN115454673A (en) Data collection method, device and medium for baseboard management controller
CN116361106A (en) Log processing method and device, electronic equipment and storage medium
CN115314361A (en) Server cluster management method and related components thereof
CN113656378A (en) Server management method, device and medium
CN114928566A (en) Client function testing method and device, storage medium and electronic equipment
CN113806331A (en) Data processing method and device
CN112131097A (en) Debugging information dynamic acquisition method and system
CN111752736A (en) Remote collection method and system for Linux system downtime information
RU2802373C1 (en) Systems and methods for obtaining radio access network information
CN114826886B (en) Disaster recovery method and device for application software and electronic equipment
CN113297158B (en) Cloud security product management method, device, equipment and storage medium
CN115499332B (en) Method, device, equipment and medium for monitoring network message

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