CN112711476A - Computer running state management method, computing device and storage medium - Google Patents

Computer running state management method, computing device and storage medium Download PDF

Info

Publication number
CN112711476A
CN112711476A CN202110329993.7A CN202110329993A CN112711476A CN 112711476 A CN112711476 A CN 112711476A CN 202110329993 A CN202110329993 A CN 202110329993A CN 112711476 A CN112711476 A CN 112711476A
Authority
CN
China
Prior art keywords
state
computer
instruction
running
machine
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
CN202110329993.7A
Other languages
Chinese (zh)
Inventor
程波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Uniontech Software Technology Co Ltd
Original Assignee
Uniontech Software 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 Uniontech Software Technology Co Ltd filed Critical Uniontech Software Technology Co Ltd
Priority to CN202110329993.7A priority Critical patent/CN112711476A/en
Publication of CN112711476A publication Critical patent/CN112711476A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • G06F9/4856Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration

Abstract

The invention discloses a computer running state management method, which is suitable for being executed in computing equipment and comprises the following steps: constructing a state machine of the computer, wherein the running state of the computer corresponds to the state attribute of the state machine; determining the current running state of the computer according to the state attribute of the state machine; receiving a migration instruction which is triggered by a user and enables the running state of the computer to migrate; judging whether to execute a migration instruction according to a state transformation rule of a state machine; and if the migration instruction is determined to be executed, migrating the running state of the computer to a target running state. The invention also discloses a computing device and a computer readable storage medium.

Description

Computer running state management method, computing device and storage medium
Technical Field
The present invention relates to the field of operating systems, and in particular, to a method for managing a computer running state, a computing device, and a storage medium.
Background
With the development of computer technology, computers can be set in various operating states to meet the requirements in various operating environments. And the operating state of these computers is managed through the configuration and power interface of the computers, i.e., ACPI. When the ACPI is used to manage the running state of the computer, the migration of the running state of the computer is usually completed by using a preset configuration file, so that the software and hardware of the computer execute corresponding operations to reach a target running state.
However, when the ACPI is used to manage the system running state, the ACPI has a fixed management specification, and the requirement expansion of the user cannot be realized. Moreover, when the ACPI migrates the computer operating state, it is not possible to provide appropriate security protection for the computer.
For this reason, a new method of managing the operating state of the computer is required.
Disclosure of Invention
To this end, the present invention provides a computer operating state management method in an attempt to solve or at least alleviate the above-identified problems.
According to one aspect of the present invention, there is provided a computer operating state management method, adapted to be executed in a computing device, the method comprising the steps of: constructing a state machine of the computer, wherein the running state of the computer corresponds to the state attribute of the state machine; determining the current running state of the computer according to the state attribute of the state machine; receiving a migration instruction which is triggered by a user and enables the running state of the computer to migrate; judging whether to execute a migration instruction according to a state transformation rule of a state machine; and if the migration instruction is determined to be executed, migrating the running state of the computer to a target running state.
Optionally, in the method according to the present invention, the operating state of the computer includes an operating state and a standby state, and constructing the state machine of the computer includes the steps of: setting the working state and the standby state of the computer to respectively correspond to the first state and the second state of the state machine; setting a first transformation instruction for transforming the first state of the state machine to the second state; setting a second transformation instruction for transforming the second state of the state machine to the first state; setting state transition rules of the state machine.
Optionally, in the method according to the present invention, the state transition rule includes: the state machine is switched to a second state from a first state only when receiving a first switching instruction in the first state; the state machine changes from the second state to the first state only when receiving a second change instruction in the second state.
Optionally, in the method according to the present invention, determining whether to execute the migration instruction according to the state transformation rule of the state machine includes: when the current running state of the computer is a working state, judging whether the migration instruction accords with a first transformation instruction of the state machine; and if the first conversion instruction is met, judging to execute the migration instruction.
Optionally, in the method according to the present invention, further comprising the step of: when the current running state of the computer is a standby state, judging whether the migration instruction accords with a second transformation instruction of the state machine; and if the second conversion instruction is met, judging to execute the migration instruction.
Optionally, in the method according to the present invention, migrating the operating state of the computer to the target operating state includes the steps of: distributing a thread for migrating the running state for the computer; locking the thread; the application thread migrates the running state of the computer; and after the running state of the computer is switched and transferred to the target running state, unlocking the thread.
Optionally, in the method according to the present invention, the switching the running state of the computer by the application thread includes the steps of: and when receiving an operation instruction triggered by a user, intercepting the operation instruction and not executing the operation instruction.
Optionally, in the method according to the present invention, the screen locking application is loaded when the running state of the computer is migrated from the operating state to the standby state.
According to another aspect of the present invention, there is provided a computing device comprising: one or more processors; a memory; an image display system; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for performing any of the methods of computer operating state management according to the present invention.
According to yet another aspect of the present invention, there is provided a computer readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a computing device, cause the computing device to perform any of a computer operating state management method according to the present invention.
The computer running state management method is suitable for being executed in computing equipment, firstly, a state machine of a computer is constructed, and the running state of the computer corresponds to state attributes of the state machine. The current running state of the computer is determined through the state attribute of the state machine, whether a migration instruction of the running state of the computer of a user is executed or not is judged according to a pre-constructed state transformation rule, and the running state of the operating system is migrated only if the corresponding state transformation rule is met, so that the migration mode of the running state of the computer is locked, the migration instruction which is not in line with the state machine transformation rule is prevented, and the running safety of the computer is improved.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
FIG. 1 illustrates a block diagram of a computing device 100, according to an exemplary embodiment of the invention;
FIG. 2 illustrates a flowchart of a computer operating state management method 200 according to an exemplary embodiment of the present invention;
FIG. 3 illustrates a computer receiving a migration instruction according to an exemplary embodiment of the present invention; and
FIG. 4 illustrates a computer executing a migration instruction according to an exemplary embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art. Like reference numerals generally refer to like parts or elements.
FIG. 1 shows a block diagram of a computing device 100, according to an example embodiment of the present invention. As shown in FIG. 1, in a basic configuration 102, a computing device 100 typically includes a system memory 106 and one or more processors 104. A memory bus 108 may be used for communication between the processor 104 and the system memory 106.
Depending on the desired configuration, the processor 104 may be any type of processing, including but not limited to: a microprocessor (μ P), a microcontroller (μ C), a digital information processor (DSP), or any combination thereof. The processor 104 may include one or more levels of cache, such as a level one cache 110 and a level two cache 112, a processor core 114, and registers 116. The example processor core 114 may include an Arithmetic Logic Unit (ALU), a Floating Point Unit (FPU), a digital signal processing core (DSP core), or any combination thereof. The example memory controller 118 may be used with the processor 104, or in some implementations the memory controller 118 may be an internal part of the processor 104.
Depending on the desired configuration, system memory 106 may be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. System memory 106 may include an operating system 120, one or more programs 122, and program data 124. In some embodiments, the program 122 may be arranged to execute the instructions 123 of the method 200 according to the invention on an operating system by one or more processors 104 using the program data 124.
The computing device 100 may include a storage interface bus 134. The storage interface bus 134 enables communication from the storage devices 132 (e.g., removable storage 136 and non-removable storage 138) to the basic configuration 102 via the bus/interface controller 130. At least a portion of the operating system 120, applications 122, and data 124 may be stored on removable storage 136 and/or non-removable storage 138, and loaded into system memory 106 via storage interface bus 134 and executed by the one or more processors 104 when the computing device 100 is powered on or the applications 122 are to be executed.
Computing device 100 may also include an interface bus 140 that facilitates communication from various interface devices (e.g., output devices 142, peripheral interfaces 144, and communication devices 146) to the basic configuration 102 via the bus/interface controller 130. The example output device 142 includes a graphics processing unit 148 and an audio processing unit 150. They may be configured to facilitate communication with various external devices, such as a display or speakers, via one or more a/V ports 152. Example peripheral interfaces 144 may include a serial interface controller 154 and a parallel interface controller 156, which may be configured to facilitate communication with external devices such as input devices (e.g., keyboard, mouse, pen, voice input device, touch input device) or other peripherals (e.g., printer, scanner, etc.) via one or more I/O ports 158. An example communication device 146 may include a network controller 160, which may be arranged to facilitate communications with one or more other computing devices 162 over a network communication link via one or more communication ports 164.
A network communication link may be one example of a communication medium. Communication media may typically be embodied by computer readable instructions, data structures, program modules, and may include any information delivery media, such as carrier waves or other transport mechanisms, in a modulated data signal. A "modulated data signal" may be a signal that has one or more of its data set or its changes made in such a manner as to encode information in the signal. By way of non-limiting example, communication media may include wired media such as a wired network or private-wired network, and various wireless media such as acoustic, Radio Frequency (RF), microwave, Infrared (IR), or other wireless media. The term computer readable media as used herein may include both storage media and communication media.
In a computing device 100 according to the present invention, the application 122 includes program instructions for performing a computer operating state management method 200, which may instruct the processor 104 to perform some of the steps of a computer operating state management method 200 operating in a computing device 100 according to the present invention, such that some of the components of the computing device 100 implement the management of the computer operating state by performing a computer operating state management method 200 according to the present invention.
Computing device 100 may be implemented as a server, e.g., file server 140, database 150, a server, an application server, etc., which may be a device such as a Personal Digital Assistant (PDA), a wireless web-browsing device, an application-specific device, or a hybrid device that include any of the above functions. May be implemented as a personal computer including both desktop and notebook computer configurations, and in some embodiments computing device 100 is configured to perform a computer operating state management method 200.
Fig. 2 shows a flow diagram of a computer operating state management method 200 according to an exemplary embodiment of the invention. The method 200 is suitable for execution in the computing device 100. As shown in FIG. 2, a computer operating state management method 200 begins with step S210 of building a state machine for a computer, the operating state of the computer corresponding to state attributes of the state machine.
The Operating System (OS) and Basic Input Output System (BIOS) running in the computing device 100 work in conjunction with computer hardware devices, such as a Central Processing Unit (CPU), according to the advanced configuration and power interface protocol (ACPI). ACPI defines six operating states for a computer: states 0 to 5 (S0 to S5). Wherein, the state 0 is a working state, and all hardware and software in the computer run normally. When the computer is in the state 1, the CPU clock controller closes the CPU, and other hardware still works normally. When the computer is in the state 2, the CPU and the clock are both closed, but other hardware still works normally. The state 3 is a standby state, before the system enters the standby state, the system stores the working data in a memory (STR), a power supply supplies power to the most necessary devices such as the memory of the computer and the like, so that the data storage safety is ensured, and other hardware devices are all in a closed state. When the computer is in the state 4, the working data of the computer is stored in the hard disk (STD), the main power supply of the computer is turned off, the equipment such as the hard disk and the like still works, and other hardware equipment is in the off state. When the computer is in the state 5, all hardware devices are in the off state.
A state machine is a model abstracted from real-world business operating rules. According to one embodiment of the present invention, the state machine constructed for the computer is a Moore type state machine, and the present invention does not limit the type of the state machine constructed for the computer. The state attributes of the constructed state machine include a first state and a second state. The operating state of the computer corresponds to a first state of the state machine and the standby state of the computer corresponds to a second state of the state machine. When the state machine is changed from the first state to the second state, a first change instruction needs to be input to the state machine in the first state. When the state machine is changed from the second state to the first state, a second change instruction needs to be input to the state machine in the second state.
Accordingly, the state machine receives a specific instruction, and transforms to a specific state to form a state transformation rule of the state machine. The state transition rules of the state machine include that the state machine transitions from the first state to the second state only upon receiving a first transition command in the first state, and the state machine transitions from the second state to the first state only upon receiving a second transition command in the second state. The running state of the computer corresponds to the state attribute of the state machine, and when the computer is transferred from the current running state to the target running state, the state attribute of the corresponding state machine is transformed. The invention can also set more state attributes for the state machine to correspond to a plurality of different running states of the computer, and set the conversion instructions and conversion modes among the state attributes at the same time to standardize and determine the transition modes among the different running states of the computer, thereby expanding the management of the running states of the computer.
Subsequently, step S220 is executed to determine the current operating state of the computer according to the state attribute of the state machine. The state attribute of the state machine established in step S210 is associated with the current operating state of the computer, and the computer writes the operating state into the state machine each time the operating state switching is completed. When the running state of the computer is transferred to the working state, a first state, namely state 0, is written in the state machine. Similarly, when the state of the state machine is the second state, the state from which the computer can be read is the standby state when step S220 is executed.
According to one embodiment of the present invention, when the computer starts to boot into the working state, i.e., the S0 state, the state machine attribute written by the computer in the built state machine is the first state. When the computer enters a working state, the computer executes a migration instruction monitoring event and monitors a migration instruction which is sent by a user and enables the computer to migrate in a running state. The migration instruction snoop event listens for a wake-up signal (idle on) to cause the computer to migrate to an active state and a sleep signal (idle off) to cause the computer to migrate to a standby state. The computer also initializes a state transition function to process the received wake-up signal and sleep signal.
When the computer is in a standby state, the user can trigger the idle on signal by moving the mouse, using the keyboard and pressing the power switch, so that the computer is awakened from the standby state, and the running state is transferred to the working state. The user can set a standby time for the computer, and when the computer does not receive any operation instruction of the user in the standby time, a signal for making the computer standby is triggered. If the standby time is 10 minutes, when the computer is in the working state, and any operation instruction sent by the user is not received within 10 minutes, the user is considered to trigger idle off signals, and the computer is made to transition from the working state to the standby state.
According to another embodiment of the invention, the loading of the user-defined configuration is triggered when the computer enters an operating state. And if the user-defined configuration is not stored in the computer, loading the default configuration of the computer. The configuration items of the user-defined configuration comprise screen brightness, a system body, wallpaper, a network connection switch, a Bluetooth connection switch and the like which are set by the user, and the user can personalize the configuration items so that the computer can enter a working state, namely the user-defined configuration is used for subsequent user operation instruction processing.
Subsequently, step S230 is executed to receive a migration instruction triggered by the user to migrate the running state of the computer. In step S220, the computer executes a listen shift command listen event, an idle on signal to shift the computer to an active state and an idle off signal to shift the computer to a standby state. When the user triggers the idle on signal and the idle off signal, the computer screens and processes the idle on signal and the idle off signal.
FIG. 3 illustrates a computer receiving a migration instruction according to an exemplary embodiment of the present invention. As shown in fig. 3, when the computer receives the idle on and idle off signals, it first determines whether the computer is performing a state transition, and if the computer is performing an operation state transition, the computer does not process the idle on signal and the idle off signal. According to one embodiment of the invention, when the current state of the computer is a standby state, a user uses a mouse, an idle on signal is triggered for the first time, and the computer starts to process the idle on signal and performs system state transition work; and then, the user uses the keyboard, the idle on signal is triggered for the second time, the computer screens the idle on signal received for the second time, and the idle on signal for the second time is ignored according to the current running state of the computer, so that the awakening signal is prevented from being processed repeatedly.
Secondly, the computer judges whether to process idle on and idle off signals according to the currently running application program and the screen display state. According to an embodiment of the invention, if the computer is currently using the video player to play the video in full screen, the computer ignores the idle off instruction even if receiving the idle off instruction when not receiving any operation instruction of the user within the preset standby time, so as to avoid performing state transition on the computer in normal use and entering the standby state by mistake.
After the screened idle on and idle off signals, the computer processes the idle on and idle off signals using the state transition function initialized in step S220, and the idle on and idle off signals are used as transition commands through the state transition function. At this time, the computer completes receiving a migration instruction which is triggered by a user and causes the running state of the computer to migrate. The migration instruction is a migration instruction specifically instructing the computer to migrate from the current state to the target state, and includes causing hardware and software of the computer to perform corresponding operations. The state transition function converts an idle on signal into a transition instruction to transition from a standby state to an operating state, and converts an idle off signal into a transition instruction to transition from an operating state to a standby state.
Subsequently, step S240 is executed to determine whether to execute the migration instruction according to the state transition rule of the state machine. The state transition rules of a state machine specify that a particular transition command is received at a particular state attribute and the transition is made to a particular target state attribute. When the current running state of the computer is a working state, the corresponding state machine attribute is a first state. The state machine in the first state changes to the second state only when receiving the first change instruction. The first transformation instruction is a transformation instruction that transforms from a first state to a second state. The computer judges whether the migration instruction accords with a first conversion instruction of the state machine, and if the migration instruction accords with the first conversion instruction, the computer judges to execute the migration instruction. According to one embodiment of the invention, when the migration instruction is a transition from the running state to the standby state, the migration instruction is judged to be in accordance with the first conversion instruction of the state machine, and the migration instruction is executed.
And when the current running state of the computer is the standby state, the corresponding state machine attribute is the second state. The state machine in the second state changes to the first state only when receiving a second change instruction. The second transformation instruction is a transformation instruction that transforms from the second state to the first state. And the computer judges whether the migration instruction accords with a second conversion instruction of the state machine or not, and if so, judges to execute the migration instruction. According to one embodiment of the invention, when the migration instruction is in a transition from the standby state to the running state, the migration instruction is judged to be in accordance with the second conversion instruction of the state machine, and the migration instruction is executed.
The state machine is built for the computer, the running state of the computer corresponds to the state attribute of the state machine, so that the state attribute transformation rule of the state machine acts on the running state transition of the computer, and the running state transition direction and transition conditions of the computer are normalized, thereby better managing the running state of the computer and improving the running safety of the computer.
Finally, step S250 is executed, and if it is determined that the migration instruction is executed, the operating state of the computer is migrated to the target operating state. Firstly, distributing threads for migrating the running state for the computer, calling CPU resources by the computer, and selecting one thread to migrate the running state. Subsequently, the selected thread is locked. And locking the thread. According to one embodiment of the invention, a mutual exclusion lock is added to a thread, that is, the thread can only process one migration instruction at the same time, and after the processing of the migration instruction is completed, the thread can continue to process the next different migration instruction. And then the computer uses the thread to transfer the running state, and unlocks the thread after the running state of the computer is switched and transferred to the target running state. When the thread processes the migration instruction, a mutual exclusion lock is added to the thread, so that the thread is ensured to process only one migration instruction at the same time, and the situations that the safety is reduced in the process, the file is lost and the like due to the fact that the thread processing logic is disordered and the migration of the running state of the computer cannot be normally completed are avoided.
According to one embodiment of the invention, when the current running state of the computer is the working state, a transition instruction for transitioning from the running state to the standby state is processed. FIG. 4 illustrates a computer executing a migration instruction according to an exemplary embodiment of the present invention. As shown in FIG. 4, an assigned thread is first obtained from the CPU and then locked. When the thread processes the transition instruction from the running state to the standby state and receives the transition instruction from the standby state to the running state, the transition instruction from the standby state to the running state is ignored, and only the transition instruction from the running state to the standby state is processed. After the running state of the computer is transferred from the working state to the standby state, the thread is unlocked, and a transfer instruction for transferring from the standby state to the running state is processed.
And when the application thread switches the running state of the computer and receives an operation instruction triggered by a user, intercepting the operation instruction and not executing the operation instruction. According to another embodiment of the invention, when the thread is processing a transition instruction from the standby state to the working state, the user continuously presses the computer power-on/power-off button to trigger a computer power-off operation instruction. The thread intercepts the computer shutdown operation instruction, and does not execute the shutdown operation instruction, so that the computer can be ensured to be normally transferred from a standby state to a working state, the running data stored in the memory is protected, and the data loss is avoided.
According to an embodiment of the invention, in order to further improve the content security of the computer when the running state is switched, the screen locking application is loaded when the running state of the computer is transferred from the working state to the standby state. When the computer is transferred from the working state to the standby state, the screen brightness is gradually reduced, the sound server in the computer is closed, the screen is paused to display, and the audio and video which are playing are paused. Meanwhile, a screen locking application is loaded, the screen display is locked by the screen locking application, and a normal computer operation interface can be accessed only after a user unlocks the screen display in a specific mode. The unlocking mode comprises fingerprint, face recognition, password and the like, and the unlocking mode applied to the screen locking is not limited by the invention.
And when the computer is to be awakened again, namely the computer is shifted to the running state from the standby state, the screen locking application is loaded when the display brightness of the screen of the computer is improved and the interface before standby is displayed. When the computer enters a standby state, all the running data are temporarily stored in the memory, so that the screen locking application needs to be reloaded, a screen locking interface is displayed, and a user is prompted to unlock the computer. By loading the screen locking application before the computer enters a standby state and when the computer enters a working state, the protection on the privacy of the user and the file safety is further improved.
The computer running state management method is suitable for being executed in computing equipment, firstly, a state machine of a computer is constructed, and the running state of the computer corresponds to state attributes of the state machine. The current running state of the computer is determined through the state attribute of the state machine, whether a migration instruction of the running state of the computer of a user is executed or not is judged according to a pre-constructed state transformation rule, and the running state of the operating system is migrated only if the corresponding state transformation rule is met, so that the migration mode of the running state of the computer is locked, the migration instruction which is not in line with the state machine transformation rule is prevented, and the running safety of the computer is improved.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules or units or groups of devices in the examples disclosed herein may be arranged in a device as described in this embodiment, or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. Modules or units or groups in embodiments may be combined into one module or unit or group and may furthermore be divided into sub-modules or sub-units or sub-groups. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as floppy diskettes, CD-ROMs, hard drives, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to execute the method for determining the apparatus shutdown state of the present invention according to instructions in the program code stored in the memory.
By way of example, and not limitation, computer readable media may comprise computer storage media and communication media. Computer-readable media includes both computer storage media and communication media. Computer storage media store information such as computer readable instructions, data structures, program modules or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of computer readable media.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The present invention has been disclosed in an illustrative rather than a restrictive sense, and the scope of the present invention is defined by the appended claims.

Claims (10)

1. A computer operating state management method adapted to be executed in a computing device, the method comprising the steps of:
constructing a state machine of a computer, wherein the running state of the computer corresponds to the state attribute of the state machine;
determining the current running state of the computer according to the state attribute of the state machine;
receiving a migration instruction which is triggered by a user and enables the running state of the computer to migrate;
judging whether to execute the migration instruction according to a state transformation rule of the state machine;
and if the migration instruction is determined to be executed, migrating the running state of the computer to a target running state.
2. The method of claim 1, wherein the operating state of the computer includes an operating state and a standby state, and the building the state machine of the computer includes the steps of:
setting the working state and the standby state of the computer to respectively correspond to the first state and the second state of the state machine;
setting a first transformation instruction for transforming the first state of the state machine to the second state;
setting a second transformation instruction for transforming the second state of the state machine to the first state;
and setting a state transformation rule of the state machine.
3. The method of claim 2, wherein the state transition rule comprises:
the state machine is switched from the first state to the second state only when receiving a first switching instruction in the first state;
and the state machine is switched from the second state to the first state only when receiving a second switching instruction in the second state.
4. The method of claim 3, wherein said determining whether to execute the migration instruction according to state transition rules of the state machine comprises the steps of:
when the current running state of the computer is a working state, judging whether the migration instruction conforms to a first transformation instruction of the state machine;
and if the first conversion instruction is met, judging to execute the migration instruction.
5. The method of claim 4, further comprising the steps of:
when the current running state of the computer is a standby state, judging whether the migration instruction accords with a second transformation instruction of the state machine;
and if the second conversion instruction is met, judging to execute the migration instruction.
6. The method of claim 5, wherein said migrating the operating state of the computer to a target operating state comprises the steps of:
distributing a thread for migrating the running state to the computer;
locking the thread;
applying the thread to migrate the running state of the computer;
and after the running state of the computer is switched and migrated to the target running state, unlocking the thread.
7. The method of claim 6, wherein switching the operating state of the computer using the thread comprises:
and when receiving an operation instruction triggered by a user, intercepting the operation instruction and not executing the operation instruction.
8. The method of claim 7, wherein the screen lock application is loaded when the operating state of the computer transitions from the operating state to the standby state.
9. A computing device, comprising:
one or more processors;
a memory; and
one or more apparatuses comprising instructions for performing any of the methods of claims 1-8.
10. A computer readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a computing device, cause the computing device to perform any of the methods of claims 1-8.
CN202110329993.7A 2021-03-29 2021-03-29 Computer running state management method, computing device and storage medium Pending CN112711476A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110329993.7A CN112711476A (en) 2021-03-29 2021-03-29 Computer running state management method, computing device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110329993.7A CN112711476A (en) 2021-03-29 2021-03-29 Computer running state management method, computing device and storage medium

Publications (1)

Publication Number Publication Date
CN112711476A true CN112711476A (en) 2021-04-27

Family

ID=75550394

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110329993.7A Pending CN112711476A (en) 2021-03-29 2021-03-29 Computer running state management method, computing device and storage medium

Country Status (1)

Country Link
CN (1) CN112711476A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113835927A (en) * 2021-09-23 2021-12-24 武汉深之度科技有限公司 Instruction execution method, computing device and storage medium
CN114895967A (en) * 2022-04-15 2022-08-12 北京兆维智能装备有限公司 Control method based on state machine and computer equipment
CN115225633A (en) * 2022-06-24 2022-10-21 浪潮软件集团有限公司 State machine state conversion method and system based on opposite terminal network signal

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101553769A (en) * 2005-10-11 2009-10-07 努雅公司 Method and system for tracking and monitoring computer applications
CN102467414A (en) * 2010-11-19 2012-05-23 阿里巴巴集团控股有限公司 State machine control method, device and state machine system
CN102486743A (en) * 2010-12-01 2012-06-06 阿里巴巴集团控股有限公司 Cooperative control method for state machine, device and state machine system
CN102866873A (en) * 2012-08-29 2013-01-09 华南理工大学 Method for detecting state of seat with computer
US20140317625A1 (en) * 2011-12-08 2014-10-23 Hitachi, Ltd. Control method of virtual machine and virtual machine system
CN110442402A (en) * 2019-08-08 2019-11-12 中国建设银行股份有限公司 Data processing method, device, equipment and storage medium
CN111273969A (en) * 2020-01-20 2020-06-12 腾讯科技(深圳)有限公司 State switching method, device, equipment and storage medium
CN111880850A (en) * 2020-07-24 2020-11-03 北京浪潮数据技术有限公司 Method, device, equipment and storage medium for assisting computer equipment to shut down

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101553769A (en) * 2005-10-11 2009-10-07 努雅公司 Method and system for tracking and monitoring computer applications
CN102467414A (en) * 2010-11-19 2012-05-23 阿里巴巴集团控股有限公司 State machine control method, device and state machine system
CN102486743A (en) * 2010-12-01 2012-06-06 阿里巴巴集团控股有限公司 Cooperative control method for state machine, device and state machine system
US20140317625A1 (en) * 2011-12-08 2014-10-23 Hitachi, Ltd. Control method of virtual machine and virtual machine system
CN102866873A (en) * 2012-08-29 2013-01-09 华南理工大学 Method for detecting state of seat with computer
CN110442402A (en) * 2019-08-08 2019-11-12 中国建设银行股份有限公司 Data processing method, device, equipment and storage medium
CN111273969A (en) * 2020-01-20 2020-06-12 腾讯科技(深圳)有限公司 State switching method, device, equipment and storage medium
CN111880850A (en) * 2020-07-24 2020-11-03 北京浪潮数据技术有限公司 Method, device, equipment and storage medium for assisting computer equipment to shut down

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113835927A (en) * 2021-09-23 2021-12-24 武汉深之度科技有限公司 Instruction execution method, computing device and storage medium
CN113835927B (en) * 2021-09-23 2023-08-11 武汉深之度科技有限公司 Instruction execution method, computing device and storage medium
CN114895967A (en) * 2022-04-15 2022-08-12 北京兆维智能装备有限公司 Control method based on state machine and computer equipment
CN114895967B (en) * 2022-04-15 2024-04-12 北京兆维智能装备有限公司 Control method based on state machine and computer equipment
CN115225633A (en) * 2022-06-24 2022-10-21 浪潮软件集团有限公司 State machine state conversion method and system based on opposite terminal network signal
CN115225633B (en) * 2022-06-24 2024-04-12 浪潮软件集团有限公司 State machine state transition method and system based on opposite-end network signal

Similar Documents

Publication Publication Date Title
CN112711476A (en) Computer running state management method, computing device and storage medium
US8806502B2 (en) Batching resource requests in a portable computing device
JP5697284B2 (en) Method, apparatus and system for transitioning system power state of a computer platform
US8631414B2 (en) Distributed resource management in a portable computing device
TWI617914B (en) Specialized boot path for speeding up resume from sleep state
US8327174B2 (en) Loading operating systems using memory segmentation and ACPI based context switch
US9671816B2 (en) Suspension and/or throttling of processes for connected standby
US8793697B2 (en) Method and system for scheduling requests in a portable computing device
US8745629B2 (en) System and method of controlling power in an electronic device
US7296050B2 (en) Distributed computing system and method
WO2013022462A1 (en) Suspension and/or throttling of processes for connected standby
TW201250459A (en) Method of operating a heterogneous computer system
EP2742400A1 (en) Suspension and/or throttling of processes for connected standby
US8943504B2 (en) Tracking and releasing resources placed on a deferred unlock list at the end of a transaction
WO2019128574A1 (en) Information processing method and device, computer device and computer readable storage medium
US20130275791A1 (en) Method and System for Tracking and Selecting Optimal Power Conserving Modes of a PCD
KR20090011293A (en) Apparatus and method for informing the pc user of the status of wake on lan
US20150268706A1 (en) System and method for memory power management in a system on a chip with multiple execution environments
US7272731B2 (en) Information handling system having reduced power consumption
WO2023206693A1 (en) System sleep method and apparatus and system wake-up method and apparatus
CN112947677B (en) Timer reading method, computing device and readable storage medium
US20240028222A1 (en) Sleep mode using shared memory between two processors of an information handling system
WO2005045684A1 (en) The apparatus and method that achieve the security translation of the calculating unit
KR20090104768A (en) Platform power management based on latency guidance
CN115373874A (en) Cross-process event processing method and device, electronic equipment, storage medium and vehicle

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