System control method, device and medium

By acquiring and converting operation instructions, and using dynamic link libraries and cleanup functions to control the shutdown, restart, and logout of cloud hosts, the system failure problem caused by special user needs or misoperation in the existing technology is solved, thus improving the user experience.

CN114327010BActive Publication Date: 2025-01-14HANGZHOU WULIAN TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202111632286.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-28
Publication Date
2025-01-14
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

The existing cloud server scheduling system cannot meet the business needs of users in case of special requirements or accidental operation, resulting in system failure and affecting user experience.

Method used

By acquiring operation event messages and business requirements, the system parses the first operation instruction and converts it into a second operation instruction. The second operation instruction is then executed to control the shutdown, restart, or logout of the cloud host. This includes using dynamic link libraries to inject into the login process to obtain instructions and generate a fast shutdown function, using cleanup functions to control the hardware driver to execute instructions, and calling the system kernel program to force shutdown when necessary.

Benefits of technology

It enables the control of cloud server shutdown, restart, and logout based on actual needs, meeting the business requirements of different application scenarios and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114327010B_ABST
    Figure CN114327010B_ABST
Patent Text Reader

Abstract

The present application discloses a system control method, device, and medium, including: obtaining operation event messages and business requirements, and parsing the operation event messages to obtain a first operation instruction, the first operation instruction at least including: a shutdown instruction, a restart instruction, and a logout instruction, so as to understand the current user's operation on the cloud host and the actual operation required to be taken on the cloud host; according to the correspondence between the business requirements and the operation instructions, the first operation instruction is converted into a second operation instruction, and the second operation instruction is executed, wherein the second operation instruction at least includes: a shutdown instruction, a restart instruction, and a logout instruction. It can be seen that through the system control method provided by the present application, the shutdown, restart, and logout of the cloud host can be controlled according to actual needs, so that the cloud host can meet the business needs in different application scenarios and improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing, and in particular to a system control method, device, and medium. Background Art

[0002] Cloud hosting is a new type of cloud hosting that was born with the development of network technology and cloud computing technology. It provides computing resources of cloud hosting to users through the network. At present, cloud hosting computing resources are generally controlled by scheduling systems to provide services to users and allocate cloud hosting computing resources.

[0003] Currently, the scheduling system can only provide computing resources to users based on the working status of the cloud host client, such as recycling computing resources when the user shuts down, and providing computing resources when the user restarts the system. However, when the user has special needs (such as pre-starting the system) or the user makes a mistake, the scheduling system cannot operate on the cloud host client system after the user shuts down, logs out, or restarts it, resulting in the inability to meet user needs, and may even cause system failures, affecting user experience.

[0004] It can be seen that how to propose a cloud host system control method to meet business needs in different application scenarios and improve user experience is a problem that technical personnel in this field urgently need to solve. Summary of the invention

[0005] The purpose of this application is to provide a system control method, device, and medium to meet business needs in different application scenarios and improve user experience.

[0006] In order to solve the above technical problems, the present application provides a system control method, which includes:

[0007] Obtain operational event messages and business requirements;

[0008] Parsing the operation event message to obtain a first operation instruction, wherein the first operation instruction at least includes: a shutdown instruction, a restart instruction, and a logout instruction;

[0009] According to the correspondence between the business demand and the second operation instruction, the first operation instruction is converted into the second operation instruction, wherein the second operation instruction at least includes: a shutdown instruction, a restart instruction, and a logout instruction;

[0010] Execute the second operation instruction.

[0011] Preferably, the obtaining of operation event information and business requirements includes:

[0012] Obtaining a login process of the system, and writing a dynamic link library into the login process to obtain the first operation instruction;

[0013] An operation event message including the first operation instruction sent by the dynamic link library is obtained.

[0014] Preferably, the acquisition system login process includes:

[0015] The login process and the process ID of the login process are obtained by traversal.

[0016] Preferably, the obtaining the first operation instruction includes:

[0017] Obtaining an execution function for executing the operation instruction in the login process;

[0018] Using the dynamic link library to generate a fast shutdown function based on the execution function to replace the execution function;

[0019] The operation instruction is determined according to the parameters of the fast shutdown function.

[0020] Preferably, executing the second operation instruction includes:

[0021] If the second operation instruction is a shutdown instruction, controlling the hardware driver to execute the second operation instruction through a cleanup function to shut down the system;

[0022] If the second operation instruction is a logout instruction, clearing the user login information;

[0023] If the second operation instruction is a restart instruction, the system is restarted after the hardware driver is controlled to execute the second operation instruction through a cleanup function.

[0024] Preferably, after the step of controlling the hardware driver to execute the second operation instruction through the cleanup function, the method further includes:

[0025] Determine whether the hardware driver successfully executes the second operation instruction within a threshold time;

[0026] If the second operation instruction is not successfully executed, the system kernel program is called to control the hardware driver to execute the second operation instruction.

[0027] Preferably, before the step of executing the second operation instruction, the method further includes:

[0028] generating a data packet including kernel data and cache files of the system;

[0029] The data packet is sent to a server.

[0030] In order to solve the above technical problems, the present application also provides a system control device, which includes:

[0031] Acquisition module, used to obtain operation event messages and business requirements;

[0032] A parsing module, used for parsing the operation event message to obtain a first operation instruction, wherein the first operation instruction at least includes: a shutdown instruction, a restart instruction, and a logout instruction;

[0033] A conversion module, configured to convert the first operation instruction into a second operation instruction according to the correspondence between the business demand and the operation instruction, wherein the second operation instruction at least includes: a shutdown instruction, a restart instruction, and a logout instruction;

[0034] An execution module is used to execute the second operation instruction.

[0035] In order to solve the above technical problems, the present application also provides a system control device, including a memory for storing a computer program;

[0036] A processor is used to implement the steps of the system control device when executing the computer program.

[0037] In order to solve the above technical problems, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the system control device are implemented.

[0038] The present application provides a system control method, which includes: obtaining an operation event message and a business requirement, and parsing the operation event message to obtain a first operation instruction, wherein the first operation instruction at least includes: a shutdown instruction, a restart instruction, and a logout instruction, so as to understand the current user's operation on the cloud host and the actual operation that needs to be taken on the cloud host; according to the correspondence between the business requirement and the operation instruction, the first operation instruction is converted into a second operation instruction, and the second operation instruction is executed, wherein the second operation instruction at least includes: a shutdown instruction, a restart instruction, and a logout instruction. It can be seen that through the system control method provided by the present application, the shutdown, restart, and logout of the cloud host can be controlled according to actual needs, so that the cloud host can meet the business needs in different application scenarios and improve the user experience.

[0039] In addition, the present application also provides a system control device and medium, which correspond to the above method and have the same effect as above. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0041] Figure 1 A flow chart of a system control method provided in an embodiment of the present application;

[0042] Figure 2 A structural diagram of a system control device provided in an embodiment of the present application;

[0043] Figure 3 A structural diagram of another system control device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0045] The core of this application is to provide a system control method, device, and medium to meet business needs in different application scenarios and improve user experience.

[0046] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0047] It can be understood that the computer shutdown process includes three stages: soft protection, hard protection and power off. During the soft protection stage, the computer system ends the applications opened by the user, saves the user's settings and file information, and stops system services and some processes of the operating system; during the hard protection stage, the computer system controls the computer hardware reset; when the hard protection stage ends, the computer system controls the power management module to cut off the power supply to each hardware device connected to the motherboard.

[0048] In specific implementation, when the user triggers the shutdown operation, the system usually calls the ExitWindowsEx function to implement the shutdown; when Csrss obtains the ExitWindowsEx function call successfully, it sends a shutdown command to the application window belonging to the system login process (Winlogon process); and sends a shutdown command (WM_QUERYENDSESSION command or WM_ENDSESSION command) to each system process. If there are still unclosed processes after the preset time since the Csrss process sends the shutdown command, the user needs to manually close or the system process forcibly closes the unclosed process. The login process Winlogon calls the cleanup function NtShutdownSystem to shut down the driver and other subsystems, and reset the computer system's hardware, such as resetting the disk head, stopping the hardware driver, etc. Finally, disconnect the power supply of each hardware device to complete the shutdown process.

[0049] The application scenarios of the solution provided in the present application include, but are not limited to, computer devices of Window systems and Linux systems. This embodiment takes the application in the Windows system as an example to illustrate the system control method provided in the present application.

[0050] Figure 1 A flow chart of a system control method provided in an embodiment of the present application is as follows: Figure 1 As shown, the system control method provided by the present application includes:

[0051] S10: Obtain operation event messages and business requirements.

[0052] In a specific implementation, the method for obtaining operation event messages includes: obtaining user operation information through a monitoring function, for example, setting a separate monitoring function to monitor whether the user clicks on the shutdown, restart, logout and other operation buttons with the mouse, and when the operation button is clicked, obtaining the corresponding operation instruction according to the clicked button; or monitoring the functions called by the shutdown, restart, logout and other operations, and when a certain function is called, it indicates that the user has performed the corresponding operation. The former solution consumes computing resources for monitoring the user's mouse operation, so the latter solution is selected in this embodiment to obtain operation event information.

[0053] At the same time, the methods of obtaining business needs include: obtaining business needs set by administrators or users themselves, for example: in order to improve the work efficiency of the cloud host, the administrator sets a cloud host to be pre-started, then only the administrator's setting information needs to be read to obtain the business needs, and the business need at this time is to restart after shutdown; you can also judge the business needs by yourself according to the preset logic, for example: the user sets a certain business to be in a long-term running state, then the business need at this time is to invalidate the shutdown command, restart command, and logout command.

[0054] S11: Parse the operation event message to obtain a first operation instruction, where the first operation instruction at least includes: a shutdown instruction, a restart instruction, and a logout instruction.

[0055] S12: Convert the first operation instruction into the second operation instruction according to the correspondence between the business demand and the second operation instruction, wherein the second operation instruction at least includes: a shutdown instruction, a restart instruction, and a logout instruction.

[0056] S13: Execute the second operation instruction.

[0057] It should be noted that the system control method provided in the present application is executed by the cloud host user terminal, and the cloud host user terminal implements the relevant steps by creating a process for the method. For the sake of ease of explanation, in this embodiment, the process for executing the system control method provided in the present application is named as a quick shutdown process.

[0058] In the specific implementation, the processes running on the current cloud host are traversed and searched by process name by using the CreateToolhelp32Snapshot function, the Process32First function, and the Process32Next function to obtain the login process Winlogon and the process ID of the login process Winlogon. The obtained process ID is sent to the OpenProcess function to open the login process Winlogon, and the VirtualAllocEx function, the WriteProcessMemory function, and the CreateRemoteThread function are used to write a dynamic link library to the login process to detect the user's control of the system shutdown or restart. It can be understood that this process is an operation performed before the user triggers the shutdown operation. This process can be implemented through a pre-generated script, or it can be implemented manually by the administrator. It is more convenient and quick to implement it by a script.

[0059] After parsing the operation event message to obtain the first operation instruction, the dynamic link library will send the first operation instruction to the scheduling system through the streaming program so that the edge scheduling system can control the cloud host to perform operations such as shutdown, restart or logout. The execution of this task by the edge scheduling system can effectively reduce the message transmission time and improve the processing speed. At the same time, the dynamic link library will also upload the first operation instruction and execution results and other information to the log system so that the scheduling system can determine the working status of the cloud host.

[0060] 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 the correspondence between the business demand and the first operation instruction. For example, when the first operation instruction is a shutdown instruction, when it is detected that there is a process in the system background that needs to be always running, or when the shutdown instruction needs to be rejected according to the correspondence between the business demand and the second operation instruction, the first operation instruction is invalidated; when the system needs to be pre-started, if the first operation instruction is a shutdown instruction, the first operation instruction is converted into a restart instruction. Similarly, this method can also realize the invalidation of the restart instruction and the logout instruction, as well as the conversion of the restart instruction into the shutdown instruction, the logout instruction into the shutdown instruction, and the logout instruction into the restart instruction.

[0061] It should be noted that since the cloud host does not have a storage device such as a disk, the above cleanup function cannot save kernel data and cache data. In order to meet the user's special needs for saving data, the kernel data, cache data, files, etc. can be packaged into a data packet, and the data packet is sent to the remote server and saved in the user's exclusive storage space. When the user uses the cloud host again, he only needs to download the data from the remote server to quickly create a cloud host suitable for him.

[0062] It is understandable that in the process of controlling the hardware driver to shut down, or in the process of sending data packets to the remote server, the cloud host may not be able to shut down successfully due to freezing. When it is detected that the fast shutdown process has not successfully executed the operation instruction within the threshold time, the system kernel program is called to control the execution of the operation instruction to cut off the power supply to the mainboard and achieve a fast shutdown.

[0063] The present application provides a system control method, which includes: obtaining an operation event message and a business requirement, and parsing the operation event message to obtain a first operation instruction, wherein the first operation instruction at least includes: a shutdown instruction, a restart instruction, and a logout instruction, so as to understand the current user's operation on the cloud host and the actual operation that needs to be taken on the cloud host; according to the correspondence between the business requirement and the operation instruction, the first operation instruction is converted into a second operation instruction, and the second operation instruction is executed, wherein the second operation instruction at least includes: a shutdown instruction, a restart instruction, and a logout instruction. It can be seen that through the system control method provided by the present application, the shutdown, restart, and logout of the cloud host can be controlled according to actual needs, so that the cloud host can meet the business needs in different application scenarios and improve the user experience.

[0064] In a specific implementation, the method for obtaining operation event information includes: obtaining user operation information through monitoring functions, monitoring whether the user clicks the shutdown, restart, logout and other operation buttons with the mouse, and when the operation button is clicked, obtaining the corresponding operation instruction according to the clicked button; and monitoring the functions called by the shutdown, restart, logout and other operations, and when a certain function is called, it indicates that the user has performed the corresponding operation. In order to reduce the consumption of computing resources, this embodiment selects the second solution.

[0065] Based on the above embodiment, obtaining operation event information and business requirements includes:

[0066] Obtaining a login process of the system, and writing a dynamic link library into the login process to obtain a first operation instruction;

[0067] An operation event message including a first operation instruction sent by a dynamic link library is obtained.

[0068] It is understandable that the function used to search for the login process mentioned in this embodiment can use the system's own CreateToolhelp32Snapshot function, Process32First function, and Process32Next function, or the corresponding function can be written by the administrator, and it is only necessary to ensure that the function can realize the function of finding the login process in each running process. The search method can be based on the process name or the process ID, which is not limited here. Similarly, the function used to open the login process mentioned in this embodiment can be the OpenProcess function, or the function can be written by the administrator, and it is only necessary to ensure that the function can open the login process.

[0069] It should be noted that after the dynamic link library is injected into the login process, the process of obtaining the operation instructions through the dynamic link library can be to use the dynamic link library to obtain the parameters of the execution function and determine the operation instructions corresponding to the parameters; it can also be to use the dynamic link library to generate a new shutdown function based on the shutdown function in the login process (for example: TpSimpleTryPost function or ExitWindowsEx function). For the convenience of expression, the new shutdown function is named the quick shutdown function in this application. In addition to the function of performing shutdown operations of the original shutdown function, the quick shutdown function can also send the obtained operation instructions to the quick shutdown process, so that the quick shutdown process can perform corresponding operations on the cloud host terminal.

[0070] In a specific implementation, when the computer system detects an operation to shut down or restart the system, for example, when the user clicks the shutdown or restart button on the screen, or when the user issues a shutdown command through the command line, the shutdown process begins. When the system starts to execute the shutdown process, the pre-generated quick shutdown function sends the acquired parameters to the quick shutdown process, and the quick shutdown process parses the acquired parameters to obtain the operation instructions. In order to reduce the shutdown time, the step of closing the application is ignored. After the quick shutdown process obtains the operation instruction, it calls the hardware driver of the cloud host system through the cleanup function to execute the operation instruction to achieve a quick shutdown.

[0071] In this embodiment, by injecting a dynamic link library into the login process to obtain operation event messages, the waste of computing resources is reduced and the efficiency of obtaining operation instructions is improved.

[0072] As a preferred embodiment, obtaining the login process of the system includes:

[0073] Get the login process and the process ID of the login process by traversing.

[0074] In the specific implementation, the process search function (for example: CreateToolhelp32Snapshot function, Process32First function and Process32Next function) is used to traverse and search the process information of the current host. By comparing the process name, the login process Winlogon and the process ID of the login process are obtained to facilitate the injection of the dynamic link library into the login process.

[0075] As a preferred embodiment, obtaining the first operation instruction includes:

[0076] Get the execution function of the operation instruction in the login process;

[0077] Generate a quick shutdown function based on the execution function using a dynamic link library;

[0078] The operation instruction is determined according to the parameters of the fast shutdown function.

[0079] In this embodiment, a fast shutdown function is generated based on the execution function by utilizing a dynamic link library, so that the cloud host calls the fast shutdown function when executing a shutdown or restart instruction, thereby preventing the failure of obtaining the operation instruction and improving the stability and reliability of the system control method.

[0080] In a specific implementation, different execution modes are adopted for different second operation instructions. If the second operation instruction is a shutdown instruction, the hardware driver is controlled to execute the second operation instruction through a cleanup function to shut down the system.

[0081] If the second operation instruction is a logout instruction, clearing the user login information;

[0082] If the second operation instruction is a restart instruction, the system is restarted after the hardware driver is controlled to execute the second operation instruction through a cleanup function.

[0083] In this embodiment, different execution methods are adopted for different second operation instructions obtained. If the second control instruction is shutdown or restart, the hardware driver is controlled to execute the shutdown instruction or restart instruction by calling the cleanup function to achieve fast shutdown and save shutdown time; if the second control instruction is a logout instruction, the login process is controlled to clear the user login information and save files and data to facilitate subsequent use of the cloud host.

[0084] In specific implementations, since it is impossible to obtain the actual computing power of the cloud host operating terminal used by the customer, in the process of using the cleanup function to control the shutdown of the hardware driver, the system request may be stuck due to excessive workload, resulting in shutdown failure; or in the process of sending data packets to the remote server, the cloud host is disconnected from the network, resulting in data transmission failure and the cloud host cannot be successfully shut down.

[0085] To solve this problem, based on the above embodiment, after the step of controlling the hardware driver to execute the operation instruction through the cleanup function, the following steps are further included:

[0086] Determine whether the second operation instruction is successfully executed within the threshold time;

[0087] If the operation instruction is not successfully executed, the system kernel program is called to control the execution of the second operation instruction.

[0088] It is understandable that the threshold time mentioned in this embodiment may be 10s, 20s, etc., may be the system default time, or may be set by the user, and is not limited here.

[0089] In a specific implementation, if the fast shutdown process fails to successfully execute the operation instruction within the threshold time, the system kernel program HalReturnToFirmware function is called to cut off the power supply of the motherboard and other hardware devices, and force the computer to shut down.

[0090] 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 perform a power-off operation to achieve fast shutdown or restart, thereby improving the stability and reliability of the system control method.

[0091] In scenarios such as Internet cafes, there is no need to store files and user data, but with the development of cloud technology, cloud technology services are being applied in more and more scenarios, such as corporate office scenarios. In these scenarios, users store the files they use and the data generated during use to facilitate subsequent work.

[0092] In order to solve this problem, based on the above embodiment, before the step of controlling the hardware driver to execute the operation instruction through the cleanup function, the method further includes:

[0093] Generate a data package including the system's kernel data and cache files;

[0094] Send the data packet to the server.

[0095] In a specific implementation, the files and kernel data generated when the cloud host is running will be saved in the corresponding folder, and the process of collecting files and kernel data can be: copying files and kernel data every preset time period; or collecting files and kernel data before executing the shutdown or restart command. The second solution is selected in this embodiment. In addition, the user can also select the files to be saved, etc., and upload these files to the remote server.

[0096] In the process of sending files and kernel data to a remote server through a network, in order to reliably and accurately send the files and kernel data to the destination and efficiently utilize transmission resources (transmission equipment and transmission lines), the files and kernel data must be encapsulated into data packets in advance.

[0097] Common serial port encapsulation protocols include: High-level Data Link Control (HDLC), Point to Point (PPP), and Frame Relay (FR). In the OSI 7-layer network reference model, each layer of the model is mainly responsible for communicating with the peer layer on other machines. When encapsulating data, the encapsulated data is encapsulated in a set of protocol headers and tails. This process is implemented in the "protocol data unit", in which each layer of the model consists of the protocol header, protocol tail, and data encapsulation of this layer.

[0098] In order to ensure the accuracy of transmission and enable the remote server to store the log file in the correct location, it is necessary to attach the name of the cloud host or user, the generation time of the file and kernel data, and some bytes for error correction to the sent data packet. In order to improve the security and reliability of the data transmission process, the data packet can also be encrypted.

[0099] In this embodiment, by sending a data packet containing the system's kernel data and cache files to a remote server, the user can store the required files and kernel data for subsequent use, thereby increasing the application scope of the system control method.

[0100] 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 device part from two perspectives, one is based on the functional module perspective, and the other is based on the hardware perspective.

[0101] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, which will not be repeated here.

[0102] Figure 2 A system control device provided in an embodiment of the present application, such as Figure 2 As shown, the device comprises:

[0103] An acquisition module 10 is used to acquire operation event messages and business requirements;

[0104] The parsing module 11 is used to parse the operation event message to obtain a first operation instruction, wherein the first operation instruction at least includes: a shutdown instruction, a restart instruction, and a logout instruction;

[0105] The conversion module 12 is used to convert the first operation instruction into a second operation instruction according to the correspondence between the business demand and the operation instruction, wherein the second operation instruction at least includes: a shutdown instruction, a restart instruction, and a logout instruction;

[0106] The execution module 13 is used to execute the second operation instruction.

[0107] This embodiment provides a system control method, which includes: obtaining an operation event message and a business requirement, and parsing the operation event message to obtain a first operation instruction, the first operation instruction at least including: a shutdown instruction, a restart instruction, and a logout instruction, so as to understand the current user's operation on the cloud host and the actual operation that needs to be taken on the cloud host; according to the correspondence between the business requirement and the operation instruction, the first operation instruction is converted into a second operation instruction, and the second operation instruction is executed, wherein the second operation instruction at least includes: a shutdown instruction, a restart instruction, and a logout instruction. It can be seen that through the system control device provided by this application, the shutdown, restart and logout of the cloud host can be controlled according to actual needs, so that the cloud host can meet the business needs in different application scenarios and improve the user experience.

[0108] Figure 3 A structural diagram of a system control device provided in another embodiment of the present application, such as Figure 3 As shown, the system control device includes: a memory 20 for storing computer programs;

[0109] The processor 21 is configured to implement the steps of the method for obtaining an operation event message in the above embodiment when executing a computer program.

[0110] The cloud host control terminal provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer or a desktop computer.

[0111] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can 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. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the 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 to be displayed on the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0112] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used to store the following computer program 201, wherein, after the computer program is loaded and executed by the processor 21, it can implement the relevant steps of the system control method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. Data 203 may include, but is not limited to, operation event messages, etc.

[0113] In some embodiments, the system control device may further include a display screen 22 , an input / output interface 23 , a communication interface 24 , a power supply 25 , and a communication bus 26 .

[0114] Those skilled in the art will understand that Figure 3 The structure shown in the figure does not constitute a limitation on the system control device, and may include more or fewer components than shown in the figure.

[0115] The system control device provided in the embodiment of the present application includes a memory and a processor. When the processor executes a program stored in the memory, it can implement the following method:

[0116] Obtain operational event messages and business requirements;

[0117] Parsing the operation event message to obtain a first operation instruction, wherein the first operation instruction at least includes: a shutdown instruction, a restart instruction, and a logout instruction;

[0118] According to the correspondence between the business demand and the operation instruction, the first operation instruction is converted into a second operation instruction, wherein the second operation instruction at least includes: a shutdown instruction, a restart instruction, and a logout instruction;

[0119] Execute the second operation instruction.

[0120] Finally, the present application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps recorded in the above method embodiment are implemented.

[0121] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0122] The system control method, device, and medium provided by the present application are introduced in detail above. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

[0123] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

Claims

1. A system control method, characterized in that: include: Obtain operational event messages and business requirements; Parsing the operation event message to obtain a first operation instruction, wherein the first operation instruction at least includes: a shutdown instruction, a restart instruction, and a logout instruction; According to the correspondence between the business demand and the second operation instruction, the first operation instruction is converted into the second operation instruction, wherein the second operation instruction at least includes: a shutdown instruction, a restart instruction, and a logout instruction; executing the second operation instruction; Get operation event messages, including: Set a separate monitoring function, which is used to monitor whether the user clicks the shutdown, restart, or logout operation button with the mouse, and obtain corresponding operation information according to the clicked button when the operation button is clicked; Or monitor the functions called by shutdown, restart, and logout operations. When a function is called, it indicates that the user has performed the corresponding operation; Converting the first operation instruction into the second operation instruction according to the correspondence between the business requirement and the second operation instruction includes: When the first operation instruction is a shutdown instruction, when it is detected that there is a process in the system background that needs to be always running, or when the shutdown instruction needs to be rejected according to the corresponding relationship between the business demand and the second operation instruction, the first operation instruction is invalidated; When system pre-start is required, if the first operation instruction is a shutdown instruction, the first operation instruction is converted into a restart instruction; The acquisition of operation event messages and business requirements includes: Obtaining a login process of the system, and writing a dynamic link library into the login process to obtain the first operation instruction; Acquire an operation event message including the first operation instruction sent by the dynamic link library; The acquiring the first operation instruction comprises: Obtaining an execution function for executing the operation instruction in the login process; Using the dynamic link library to generate a fast shutdown function based on the execution function to replace the execution function; The operation instruction is determined according to the parameters of the fast shutdown function.

2. The system control method according to claim 1, characterized in that: The login process of the acquisition system includes: The login process and the process ID of the login process are obtained by traversal.

3. The system control method according to claim 1, characterized in that: The executing the second operation instruction comprises: If the second operation instruction is a shutdown instruction, controlling the hardware driver to execute the second operation instruction through a cleanup function to shut down the system; If the second operation instruction is a logout instruction, clearing the user login information; If the second operation instruction is a restart instruction, the system is restarted after the hardware driver is controlled to execute the second operation instruction through a cleanup function.

4. The system control method according to claim 3, characterized in that: After the step of controlling the hardware driver to execute the second operation instruction through the cleanup function, the method further includes: Determine whether the hardware driver successfully executes the second operation instruction within a threshold time; If the second operation instruction is not successfully executed, the system kernel program is called to control the hardware driver to execute the second operation instruction.

5. The system control method according to claim 1, characterized in that: Before the step of executing the second operation instruction, the method further includes: generating a data packet including kernel data and cache files of the system; The data packet is sent to a server.

6. A system control device, characterized in that: include: Acquisition module, used to obtain operation event messages and business requirements; A parsing module, used for parsing the operation event message to obtain a first operation instruction, wherein the first operation instruction at least includes: a shutdown instruction, a restart instruction, and a logout instruction; A conversion module, configured to convert the first operation instruction into a second operation instruction according to the correspondence between the business demand and the operation instruction, wherein the second operation instruction at least includes: a shutdown instruction, a restart instruction, and a logout instruction; An execution module, configured to execute the second operation instruction; Get operation event messages, including: Set a separate monitoring function, which is used to monitor whether the user clicks the shutdown, restart, or logout operation button with the mouse, and obtain corresponding operation information according to the clicked button when the operation button is clicked; Or monitor the functions called by shutdown, restart, and logout operations. When a function is called, it indicates that the user has performed the corresponding operation; The conversion module is specifically used to invalidate the first operation instruction when the first operation instruction is a shutdown instruction, when it is detected that there is a process in the system background that needs to be always running, or when the shutdown instruction needs to be rejected according to the corresponding relationship between the business demand and the second operation instruction; When system pre-start is required, if the first operation instruction is a shutdown instruction, the first operation instruction is converted into a restart instruction; An acquisition module, specifically used to acquire a login process of the system, and write a dynamic link library into the login process to acquire the first operation instruction; Acquire an operation event message including the first operation instruction sent by the dynamic link library; The process of obtaining the first operation instruction includes: Obtaining an execution function for executing the operation instruction in the login process; Using the dynamic link library to generate a fast shutdown function based on the execution function to replace the execution function; The operation instruction is determined according to the parameters of the fast shutdown function.

7. A system control device, characterized in that: comprising a memory for storing a computer program; A processor, configured to implement the steps of the system control method according to any one of claims 1 to 5 when executing the computer program.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the system control method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Shutdown monitoring system

    CN106325457A

  • Method and device of linkage shutdown and client

    CN108804147A

  • Shutdown management method and device, intelligent terminal and readable storage medium

    CN112463234A

  • Cloud computer control method and device and medium

    CN114281422A