CN108401453B - Method and device for controlling display screen and intelligent terminal - Google Patents

Method and device for controlling display screen and intelligent terminal Download PDF

Info

Publication number
CN108401453B
CN108401453B CN201780003287.5A CN201780003287A CN108401453B CN 108401453 B CN108401453 B CN 108401453B CN 201780003287 A CN201780003287 A CN 201780003287A CN 108401453 B CN108401453 B CN 108401453B
Authority
CN
China
Prior art keywords
operating system
display screen
control request
control
state
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.)
Active
Application number
CN201780003287.5A
Other languages
Chinese (zh)
Other versions
CN108401453A (en
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.)
Cloudminds Inc
Original Assignee
Cloudminds Inc
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 Cloudminds Inc filed Critical Cloudminds Inc
Publication of CN108401453A publication Critical patent/CN108401453A/en
Application granted granted Critical
Publication of CN108401453B publication Critical patent/CN108401453B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake
    • 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/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The invention relates to the technical field of virtualization, and particularly provides a method and a device for controlling a display screen and an intelligent terminal. The method is applied to an intelligent terminal, the intelligent terminal comprises a main operating system and a plurality of guest operating systems, and the method comprises the following steps: detecting a first control request received by a guest operating system, wherein the first control request is used for indicating the guest operating system to light on or turn off a display screen of an intelligent terminal; and converting the first control request into a first control event, and inputting the first control event into a main operating system so that the main operating system lights or extinguishes the display screen according to the first control event. Through the technical scheme, the embodiment of the invention can enable the control of the client operating system on the display screen to be realized in the application layer of the main operating system, thereby effectively solving the problem that the display state is possibly disordered when the main operating system and the client operating system control the display screen simultaneously.

Description

Method and device for controlling display screen and intelligent terminal
Technical Field
The application relates to the technical field of virtualization, in particular to a method and a device for controlling a display screen of an intelligent terminal with multiple operating systems and the intelligent terminal.
Background
With the continuous increase of hardware cost, virtualization technologies represented by virtual machines have been developed due to their characteristics of low cost, high security, and the like. With the rapid development and popularization of virtual machine technology, intelligent terminals with multiple operating systems are also widely applied.
The intelligent terminal with multiple operating systems may include 1 main operating system and several guest operating systems, and hardware devices of the intelligent terminal, such as a processor, a memory, an input device, a display screen, and the like of the intelligent terminal, may be shared between the main operating system and each guest operating system. Specifically, the host operating system is supported by a physically existing host machine to run, and can directly call each hardware device of the intelligent terminal; and each guest operating system is supported by a corresponding virtual machine to run, each virtual machine is used as an application program of the main operating system to run, and when the guest operating system is supported to run, virtual hardware equipment is simulated for use.
Currently, if a guest operating system needs to control (turn on or turn off) a display screen of an intelligent terminal, a driver running in a kernel of the guest operating system and related to display control may be called to control the display screen, and specifically, the driver may achieve the purpose of turning on or turning off the display screen by operating a related interface in the intelligent terminal for controlling the display screen.
In the course of implementing the present application, the inventors found that the related art has at least the following problems: currently, the control of the display screen by the guest operating system is implemented in the kernel layer, and if a plurality of operating systems simultaneously operate the relevant interfaces for controlling the display screen at a certain time, the display state may be disordered due to the asynchronous operation of the plurality of operating systems.
Disclosure of Invention
The embodiment of the application provides a method and a device for controlling a display screen and an intelligent terminal, and can solve the problem that a plurality of operating systems may cause disorder of display states when controlling the display screen simultaneously.
In order to solve the above technical problem, the embodiment of the present application provides the following technical solutions:
in a first aspect, an embodiment of the present application provides a method for controlling a display screen, which is applied to an intelligent terminal, where the intelligent terminal includes a main operating system and a plurality of guest operating systems, and the method includes:
detecting a first control request received by a guest operating system, wherein the first control request is used for indicating the guest operating system to light on or turn off a display screen of an intelligent terminal;
determining the running state of a guest operating system receiving the first control request, wherein the running state comprises a background running state;
if the running state of the client operating system receiving the first control request is the background running state, judging the priority of the first control request;
if the first control request is of high priority, converting the first control request into a first control event, and inputting the first control event into a main operating system, so that the main operating system lights or extinguishes the display screen according to the first control event;
otherwise, the first control request is discarded.
In a second aspect, an embodiment of the present application provides an apparatus for controlling a display screen, where the apparatus runs on an intelligent terminal, the intelligent terminal includes a main operating system and a plurality of guest operating systems, and the apparatus includes:
the system comprises a first detection unit, a second detection unit and a control unit, wherein the first detection unit is used for detecting a first control request received by a client operating system, and the first control request is used for indicating the client operating system to light on or turn off a display screen of the intelligent terminal; the first control request is received from a client operating system, and the running state of the client operating system is determined; if the running state of the client operating system receiving the first control request is the background running state, judging the priority of the first control request;
the first control unit is used for converting the first control request into a first control event and inputting the first control event into a main operating system when the first control request is in a high priority level, so that the main operating system lights or extinguishes the display screen according to the first control event; otherwise, the first control request is discarded.
In a third aspect, an embodiment of the present application provides an intelligent terminal, including:
a display screen;
at least one processor in communicative connection with the display screen; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method of controlling a display screen as described above.
In a fourth aspect, embodiments of the present application provide a non-transitory computer-readable storage medium storing computer-executable instructions for causing a smart terminal to perform the method for controlling a display screen as described above.
In a fifth aspect, the present application further provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, where the computer program includes program instructions, and when the program instructions are executed by a smart terminal, the smart terminal is caused to execute the method for controlling a display screen as described above.
The beneficial effects of the embodiment of the application are that: according to the method, the device and the intelligent terminal for controlling the display screen, the first control request which is received by the client operating system and used for indicating the client operating system to light or extinguish the display screen of the intelligent terminal is converted into the first control event, the first control event is input into the main operating system, the main operating system enables the display screen to be lightened or extinguished according to the first control event, the control of the client operating system on the display screen can be achieved in the application layer of the main operating system, the situation that a plurality of operating systems simultaneously operate related interfaces used for controlling the display screen in the intelligent terminal is avoided, and therefore the problem that the display state is possibly disordered when the plurality of operating systems simultaneously control the display screen is effectively solved; in addition, the control of the client operating system on the display screen is realized on the application layer of the main operating system, so that the transportability of the client operating system can be improved, and the system can be conveniently replaced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the embodiments of the present application will be briefly described below. It is obvious that the drawings described below are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
FIG. 1 is a schematic diagram of an application environment of a method for controlling a display screen according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a method for controlling a display screen according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of another method for controlling a display screen according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an apparatus for controlling a display screen according to an embodiment of the present application;
fig. 5 is a schematic diagram of a hardware structure of an intelligent terminal according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It should be noted that, if not conflicted, the various features of the embodiments of the present application may be combined with each other within the scope of protection of the present application. Additionally, while functional block divisions are performed in apparatus schematics, with logical sequences shown in flowcharts, in some cases, steps shown or described may be performed in sequences other than block divisions in apparatus or flowcharts. In addition, the terms "first," "second," "third," and the like as used herein do not limit the data and the execution order, but merely distinguish the same items or similar items having substantially the same functions or actions.
Generally, for an intelligent terminal with multiple operating systems, multiple operating systems (including a main operating system and several guest operating systems) running on the intelligent terminal share the same display screen, and each operating system lights or lights the display screen by operating an associated interface (such as an IOCTL interface, an API interface, and the like of a frame buffer device of the intelligent terminal) for controlling the display screen. The host operating system can directly operate the relevant interface for controlling the display screen, and the guest operating system needs to operate the relevant interface for controlling the display screen through a driver program which is operated in a kernel of the guest operating system and is relevant to display control. However, since the control of the display screen by the main operating system and the guest operating system is implemented in the kernel layer, if a plurality of operating systems simultaneously operate the relevant interfaces for controlling the display screen and operate asynchronously (i.e., one of the operating systems instructs the smart terminal to light up the display screen and the other operating system instructs the smart terminal to light off the display screen), the display status of the display screen may be confused.
Based on this, the embodiment of the application provides a method for controlling a display screen, an apparatus for controlling a display screen, an intelligent terminal, a non-transitory computer readable storage medium and a computer program product.
The method for controlling the display screen provided by the embodiment of the application is a method capable of realizing control of a client operating system on the display screen in an application layer of a main operating system, and specifically comprises the following steps: when detecting that a client operating system receives a first control request for indicating the client operating system to light or extinguish a display screen of an intelligent terminal, converting the first control request into a first control event, and inputting the first control event into a main operating system, so that the main operating system lights or extinguishes the display screen according to the first control event. In this embodiment of the present application, the "first control event" is one of the control events received by the main operating system in the application layer, and the control event is used to control the main operating system to operate the relevant interface in the intelligent terminal, which is used to control the display screen, so as to turn on or turn off the display screen. In the embodiment of the application, the control of the client operating system on the display screen is realized through the application layer of the main operating system, so that on one hand, the situation that a plurality of operating systems are used for controlling the relevant interfaces of the display screen in the kernel layer operating intelligent terminal at the same time can be avoided, and the problem that the display state is possibly disordered when the plurality of operating systems control the display screen at the same time is effectively solved; on the other hand, a relevant interface for controlling the display screen is not required to be configured for each client operating system in the kernel layer, so that the portability of the client operating systems is improved, and the system is convenient to replace.
The device for controlling the display screen provided by the embodiment of the present application is a virtual device which is formed by software programs and can realize the method for controlling the display screen provided by the embodiment of the present application, and the device and the method for controlling the display screen provided by the embodiment of the present application are based on the same inventive concept and have the same technical characteristics and beneficial effects.
The intelligent terminal provided by the embodiment of the present application may be any type of electronic device, such as: robots, smart phones, personal computers, tablet computers, wearable smart devices, smart appliances, and the like. The intelligent terminal comprises a main operating system and a plurality of client operating systems, and can execute the method for controlling the display screen provided by the embodiment of the application, or run the device for controlling the display screen provided by the embodiment of the application.
Specifically, the embodiments of the present application will be further explained below with reference to the drawings.
Fig. 1 is a schematic diagram of an application environment of a method for controlling a display screen according to an embodiment of the present application. The application environment may be a computer system environment running on some intelligent terminal. Specifically, as shown in fig. 1, the application environment includes: a physical hardware device 10, a host operating system 11, and a number of guest operating systems 12.
Where physical hardware device 10 is an actual hardware device, it may include any suitable device components that make up a complete computer system, including but not limited to: processor 101, memory 102, input device 103, communication module 104, display screen 105, and the like.
In particular, the processor 101 may be any suitable type of processor having certain logical operational capabilities, such as: a CPU, a graphics processor, etc. Processor 101 may also include multiple cores for multi-threading or parallel processing.
The storage 102 may include memory modules, such as: ROM, RAM, flash memory modules, and mass storage such as optical disks and hard disks. The memory 102 stores computer programs that, when executed by the processor 101, implement various corresponding method steps or procedures.
The input device 103 may be any suitable type of peripheral device that provides one or more ways of user interaction, such as: the system comprises a mouse, a keyboard or a touch input screen for receiving user action operation instructions, a somatosensory camera for collecting image information or a microphone for collecting sound information and the like. The input device 103 may optionally be connected to other physical hardware devices using wired or wireless peripherals.
The communication module 104 may include some network interface device that establishes a connection through a wired or wireless communication network. For example, a network cable interface, a bus interface, a USB interface, a WiFi module, or a bluetooth communication module.
The display screen 105 may be any type of display, such as: liquid crystal displays, OLED displays, LED displays, quantum dot displays, electrophoretic displays, and the like. Which is connected to the processor 101 in communication and can receive the control command sent by the processor 101 and perform relevant display operation according to the control command, such as turning on the display screen, turning off the display screen, etc.
In practical applications, one or more devices may be added or omitted from the physical hardware device 10 to meet different practical application requirements, such as adding a database, a server device, or other types of output devices.
The host operating system 11 and the guest operating system 12 are both computer programs for managing and controlling the physical hardware device 10 and corresponding software resources, and are the most basic system software directly running on the "bare computer", and any other software must be supported by the host operating system 11 or the guest operating system 12 to run. In the embodiment of the present application, the host operating system 11 and the guest operating system 12 may be any suitable type of operating system, such as: linux, Unix, IOS, Android, Windows, etc., for receiving user instructions and outputting corresponding processing results to be displayed to the user accordingly.
The physical hardware device 10 is shared between a host operating system 11 and a number of guest operating systems 12. In actual operation, the host operating system 11 may directly use the hardware devices in the physical hardware devices 10, while the guest operating system 12 uses virtual devices provided by the virtual machine driving the guest operating system 12. The virtual machine is a computer system which is simulated by software and has complete hardware system functions and runs in a completely isolated environment. The virtual machine may form a plurality of emulated hardware devices (i.e., virtual devices) for use by guest operating systems based on physical hardware devices 10 or software programs. A virtual machine drives a guest operating system 12, and each of the virtual machines can operate as one of the application programs in the host operating system 11.
There is memory isolation between the different operating systems, and even the host operating system 11 cannot access the memory space of the guest operating system 12. Thus, when two or more guest operating systems 12 exist in the computer system, if one of the guest operating systems 12 is restarted due to an exception, the main operating system 11 and the other guest operating systems 12 can still operate normally and are isolated from each other. However, since the virtual machine is running as an application program in the host operating system 11, if the host operating system 11 is restarted due to an exception, all the guest operating systems 12 need to be restarted to run, and similarly, if the host operating system 11 is suspended, all the guest operating systems 12 are also suspended.
When the user uses the smart terminal, only one operating system is running in the foreground among all operating systems (including the main operating system 11 and all guest operating systems 12), while the other operating systems are running in the background or are sleeping. For example, if the operating system running in the foreground is the main operating system 11, all the guest operating systems 12 are in a background running state or a sleep state; if the operating system running in the foreground is one of the guest operating systems 12, the main operating system 11 is in a background running state, and the other guest operating systems 12 are in a background running state or a dormant state.
In the embodiment of the present application, the host operating system 11 and all guest operating systems 12 running in the foreground or the background may receive a control request for controlling the display state of the display screen 105. In the embodiment of the present application, the control request received by the guest operating system 12 is referred to as a "first control request", and the control request received by the host operating system 11 is referred to as a "second control request". The "first control request" includes a "first wake-up request" for instructing the corresponding guest operating system 12 to light up the display screen 105 and a "first sleep request" for instructing the corresponding guest operating system 12 to extinguish the display screen 105; the "second control request" includes a "second wake-up request" for instructing the main operating system 11 to turn on the display screen 105 and a "second sleep request" for instructing the main operating system 11 to turn off the display screen 105.
In particular, in this embodiment, when the smart terminal detects that a certain guest operating system 12 receives a first control request, the method for controlling a display screen provided in this embodiment may be used to control the display state of the display screen 105, specifically, when it detects that the guest operating system 12 receives the first control request, the first control request is converted into a first control event, and the first control event is input to the main operating system 11, so that the main operating system 11 lights or extinguishes the display screen 105 according to the first control event. The "first control event" is one of the input events received by the main operating system 11 at the application layer thereof, and the main operating system 11 can operate the relevant interface in the intelligent terminal for controlling the display screen 105 according to the first control event, so as to light up the display screen 105.
The first control events comprise first awakening events and first dormancy events corresponding to different types of first control requests. Specifically, when the first control request is a first wake-up request, the first wake-up request is correspondingly converted into a first wake-up event, and when the first control request is a first sleep request, the first sleep request is converted into a first sleep event. The first wake-up event is used to control the main operating system 11 to turn on the display screen 105, and the first sleep event is used to control the main operating system 11 to turn off the display screen 105.
It should be noted that the method for controlling the display screen provided in the embodiment of the present application may be further extended to other suitable application environments, and is not limited to the application environment shown in fig. 1. In actual practice, the application environment may also include more or fewer guest operating systems and more or fewer physical hardware device types.
Fig. 2 is a flowchart illustrating a method for controlling a display screen according to an embodiment of the present disclosure, where the method may be executed by an intelligent terminal, such as a smart phone, a robot, a personal computer, a wearable intelligent device, an intelligent appliance, and the like, including a main operating system and a plurality of guest operating systems.
Specifically, referring to fig. 2, the method may include, but is not limited to, the following steps:
step 110: a first control request received by a guest operating system is detected.
In this embodiment, the "control request" may be any instruction capable of instructing the smart terminal to light up or extinguish the display screen of the smart terminal. The method can comprise a wake-up request and a sleep request, wherein the wake-up request is used for instructing the intelligent terminal to light up the display screen of the intelligent terminal, and the sleep request is used for instructing the intelligent terminal to extinguish the display screen of the intelligent terminal.
The control request may be triggered and generated when the user performs a relevant operation on the intelligent terminal, such as: when a user presses a power key of the intelligent terminal in a screen off state of the display screen, or a specific gesture operation is input on the display screen comprising the touch screen, or a voice instruction for lightening the display screen is input, triggering to generate the awakening request, and lightening the display screen; and when a user presses a power key of the intelligent terminal or inputs an instruction for closing the display screen in the screen-on state of the display screen, triggering to generate the dormancy request, and extinguishing the display screen.
Or, the control request may also be automatically triggered by a running operating system (including a main operating system and a guest operating system) when certain preset conditions are met, for example, when a certain operating system receives an incoming call, receives an instant message, receives a notification alert, detects a face image, or detects a user turning action, the control request is triggered to generate the wake-up request, and the display screen is lit; and when the operation system running in the foreground does not receive the interactive signal of the user within the preset time, triggering to generate the dormancy request, and turning off the display screen.
In this embodiment, the control request received by the guest operating system is referred to as a "first control request" and is used to instruct the guest operating system to light on or off the display screen of the intelligent terminal. The first control request comprises a first awakening request used for instructing the client operating system to light up the display screen of the intelligent terminal and a first dormancy request used for instructing the client operating system to extinguish the display screen of the intelligent terminal.
Specifically, in this embodiment, a virtual frame buffer device for controlling the display screen is configured in the virtual machine supporting the operation of the guest operating systems, and each guest operating system may receive the first control request through its corresponding virtual frame buffer. Therefore, the first control request received by the guest operating system is detected, that is, the first control request received by the virtual frame buffer device corresponding to the guest operating system is detected by the intelligent terminal.
Step 120: and converting the first control request into a first control event, and inputting the first control event into a main operating system so that the main operating system lights or extinguishes the display screen according to the first control event.
In this embodiment, the "first control event" is one of control events for instructing the main operating system to turn on or off the display screen, where the control event is an input event received by the main operating system at the application layer. The converting the first control request into the first control event is converting the first control request received by the guest operating system into the first control event that can be recognized and received by the application layer of the host operating system. After the first control event is input into the main operating system, the main operating system can operate a related interface used for controlling the display screen in the intelligent terminal according to the first control event, and the display screen is lightened or extinguished.
When a first control request received by a guest operating system is a first awakening request, converting the first awakening request into a first awakening event, and inputting the first awakening event into a main operating system so that the main operating system can light a display screen of the intelligent terminal according to the first awakening event; when the first control request received by the client operating system is a first dormancy request, the first dormancy request is converted into a first dormancy event, and the first dormancy event is input into the main operating system, so that the main operating system extinguishes the display screen of the intelligent terminal according to the first dormancy event.
Specifically, in the present embodiment, the main operating system is provided with an input service unit for responding to and processing an input event, and a power management service unit for controlling the power state of each physical hardware (including a display screen) in the smart terminal. When the virtual frame buffer device corresponding to the guest operating system receives the first control request, the first control request may be first converted into a first control event that can be recognized by the input service unit of the host operating system, and then the first control event is input to the host operating system by communicating with the input service unit of the host operating system; after the input service unit of the main operating system receives the first control event, the display screen of the intelligent terminal may be turned on or off according to the first control event by using a conventional method, specifically, the power state of the display screen in the power management service unit of the main operating system is set to be an awake state or a sleep state according to the received first control event, and then the relevant interface in the intelligent terminal for controlling the display screen is operated according to the power state of the display screen in the power management service unit to turn on or off the display screen.
In practical application, if the display screen of the current intelligent terminal is in a bright screen state, when the main operating system receives a first wake-up event, the current bright screen state of the display screen is maintained unchanged; and when the main operating system receives the first dormancy event, operating a related interface in the intelligent terminal for controlling the display screen to extinguish the display screen. If the display screen of the intelligent terminal is in a screen-off state currently, when the main operating system receives a first awakening event, operating a related interface in the intelligent terminal for controlling the display screen to light up the display screen; when the main operating system receives the first dormancy event, the current screen-off state of the display screen is maintained.
In addition, in this embodiment, when it is detected that the main operating system receives a second control request for instructing the main operating system to turn on or turn off the display screen of the smart terminal, the second control request is a second control event received by the main operating system, so that, no matter whether the main operating system is currently running in the foreground or in the background, the relevant interface in the smart terminal for controlling the display screen can be directly operated according to the second control request to turn on or turn off the display screen. Similarly, the second control request may also include a second wake-up request for instructing the main operating system to light up the display screen of the intelligent terminal and a second sleep request for instructing the main operating system to turn off the intelligent terminal; when the main operating system receives the second awakening request, the display screen is directly lightened according to the second awakening request; and when the main operating system receives the second dormancy request, the display screen is extinguished directly according to the second dormancy request.
According to the technical scheme, in the embodiment, the first control request received by the client operating system is converted into the first control event which can be recognized and received by the main operating system, and the first control event and the second control request received by the main operating system both belong to the input event which is received by the main operating system at the application layer of the main operating system, so that the display screen can be turned on or off only by operating the relevant interfaces used for controlling the display screen in the intelligent terminal by the main operating system according to the received input event, the situation that the relevant interfaces used for controlling the display screen in the intelligent terminal are simultaneously operated by a plurality of operating systems is avoided, and the problem that the display state is possibly disordered when the plurality of operating systems simultaneously control the display screen is effectively solved; in addition, the control of the client operating system on the display screen is realized on the application layer of the main operating system, so that the transportability of the client operating system can be improved, and the system can be conveniently replaced.
Furthermore, only the operating system running in the foreground can call the physical input device of the intelligent terminal to interact with the user in unit time. Therefore, in some embodiments, in order to reduce resource consumption, when each guest operating system switches to foreground operation, its corresponding display window is in a display state, and when the guest operating system switches to background operation, its corresponding display window is in a hidden state; the main operating system displays only the image data in the display window in the display state. For example, if the main operating system runs in the foreground, the display window corresponding to the main operating system may be presented to the user through the display screen, and the display windows corresponding to all the client operating systems running in the background are all in a hidden state; if one of the guest operating systems is running in the foreground, the display window corresponding to the guest operating system in the foreground running state can be presented to the user through the display screen, and the display windows corresponding to the main operating system and other guest operating systems running in the background are all in a hidden state.
Therefore, in this embodiment, the display window corresponding to the guest operating system running in the background is hidden, and the user cannot interact with the guest operating system running in the background, and if the step 120 is also performed on the first control request received by the guest operating system running in the background, the display screen is turned on or off, which wastes energy consumption of the smart terminal.
Based on the method, the embodiment of the application also provides another method for controlling the display screen. Specifically, referring to fig. 3, the method may include, but is not limited to, the following steps:
step 210: a first control request received by a guest operating system is detected.
Step 220: determining an operating state of the guest operating system that received the first control request.
In this embodiment, the "running state" may include a foreground running state, a background running state and a dormant state, the foreground running state indicates that the operating system runs in the foreground, the background running state indicates that the operating system runs in the background, and the dormant state indicates that the operating system is dormant. In all operating systems, only one operating system is in a foreground running state, other started operating systems are in a background running state, and the non-started operating systems are in a dormant state. In this embodiment, the discussion is mainly directed to the operating system in the foreground operating state or the background operating state, because the guest operating system in the hibernation state has neither a running process nor an interface interacting with the user, and generally does not receive the first control request. The display window corresponding to the operating system in the foreground running state is in a display state, so that a user can conveniently interact with the operating system; and the display window corresponding to the operating system in the background running state is in a hidden state, so that idling is avoided, and resources of the intelligent terminal are saved.
Specifically, in this embodiment, when it is detected that the guest operating system receives the first control request (for example, a certain guest operating system receives a notification alert at a certain time, where the notification alert may trigger generation of a first wake-up request for instructing the guest operating system to light up a display screen of the smart terminal), the operating state of the guest operating system is first determined.
In some embodiments, the specific implementation of determining the running state of the guest operating system receiving the first control request may be:
and providing a state lock service in the main operating system, applying for a state lock from the main operating system when the client operating system is switched to foreground operation, and canceling the state lock from the main operating system when the client operating system is switched to background operation or enters a dormant state, so that the operating state of the client operating system receiving the first control request can be determined by inquiring a state lock service list maintained in the main operating system.
Alternatively, in other embodiments, the specific implementation of determining the running state of the guest operating system receiving the first control request may also be:
each guest operating system maintains a corresponding state record table for recording the operating state of the guest operating system. For example, if a certain guest operating system is switched to foreground operation, the state record table is updated to "foreground operation state", if the guest operating system is switched to background operation, the state record table is updated to "background operation state", and if the guest operating system is suspended, the state record table is updated to "dormant state". Therefore, the running state of the guest operating system can be determined by inquiring the state record table corresponding to the guest operating system receiving the first control request.
Specifically, a virtual machine supporting the running of the guest operating system is further configured with a virtual system switching device, which is used for switching the running state of the corresponding guest operating system. When the virtual system switching device switches the corresponding client operating system from background operation to foreground operation or from foreground operation to background operation, the virtual system switching device communicates with the virtual frame cache device to inform the virtual frame cache device of the current operating state of the client operating system, and the virtual frame cache device updates the state record table corresponding to the client operating system according to the determined operating state. In the embodiment, by enabling each client operating system to maintain a state record table, the running state of each operating system can be determined more quickly, and meanwhile, the error rate is reduced.
Further, in this embodiment, if it is determined in this step 220 that the running state of the guest operating system receiving the first wake-up request is the foreground running state, the following step 230 is executed; if it is determined that the operating state of the guest operating system receiving the first control request is a background operating state (or a hibernation state), the following step 240 is performed.
Step 230: and converting the first control request into a first control event, and inputting the first control event into a main operating system so that the main operating system lights or extinguishes the display screen according to the first control event.
Step 240: discarding the first control request.
In this embodiment, after determining that the operating state of the guest operating system receiving the first control request is a background operating state (or a sleep state), the first control request is discarded and is not responded to the first control request (i.e., the first control request is not converted into a first control event and is input to the host operating system), so that the energy consumption of the smart terminal can be reduced.
In some embodiments, in order to further reduce the error rate when the guest operating system controls the display screen, when the guest operating system is switched from a foreground operating state to a background operating state, the communication connection between the virtual frame cache device corresponding to the guest operating system and the input service unit of the main operating system may be disconnected; when the client operating system is switched from the background operating state to the foreground operating state, the communication connection between the virtual frame buffer device corresponding to the client operating system and the input service unit of the main operating system is established.
It should be noted that, in this embodiment, after determining that the running state of the guest operating system of the received first control request is the background running state, the first control request is discarded, which is only one implementation manner provided in this embodiment and is not limited to the embodiment of the present application. In some other embodiments, after determining that the running state of the guest operating system of the received first control request is the background running state, the priority of the first control request may be determined first, and if the priority is higher, the step 230 is executed, and at the same time, the guest operating system is switched to the foreground running state.
For example, a user sets a certain guest operating system a to perform a certain operation in the background, and when the operation obtains a calculation result, a first wake-up request a is triggered, and the priority of the first wake-up request a is higher; then, when the operation is finished and a calculation result is obtained, the intelligent terminal may detect that the guest operating system a receives the first wake-up request a, at this time, even if the guest operating system a is in a background running state, the above step 230 may be executed, and at the same time, the intelligent terminal also switches the guest operating system a to a foreground running state, at this time, a display window corresponding to the guest operating system a is in a display state, so that a user can conveniently see the calculation result of the operation on the display screen in time.
In addition, it should be further noted that the steps 210 and 230 have the same technical features as the steps 110 and 120 in the method for controlling a display screen shown in fig. 2, so that the detailed implementation thereof may refer to the corresponding descriptions in the steps 110 and 120 of the foregoing embodiment, and is not repeated in this embodiment.
According to the technical scheme, before the received first control request is converted into the first control event, the method for controlling the display screen provided by the embodiment firstly judges the running state of the client operating system receiving the first control request, converts the first control request into the first control event if the running state of the client operating system is the foreground running state, and inputs the first control event into the main operating system, so that the main operating system lights or extinguishes the display screen according to the first control event, and the energy loss of the intelligent terminal can be reduced.
Fig. 4 is a schematic structural diagram of an apparatus for controlling a display screen according to an embodiment of the present application, where the apparatus 40 may be run on any intelligent terminal including a main operating system and a plurality of guest operating systems, and can implement the method for controlling a display screen according to the above embodiment.
Specifically, referring to fig. 4, the apparatus 40 may include, but is not limited to: a first detection unit 41 and a first control unit 42.
Specifically, the first detecting unit 41 is configured to detect a first control request received by a guest operating system, where the first control request is used to instruct the guest operating system to light up or turn off a display screen of the smart terminal. The first control unit 42 is configured to convert the first control request into a first control event, and input the first control event into a main operating system, so that the main operating system lights or extinguishes the display screen according to the first control event.
In this embodiment, when the first detection unit 41 detects that a certain guest operating system receives a first control request for instructing the guest operating system to turn on or off the display screen of the smart terminal, the first control request is converted into a first control event by the first control unit 42, and the first control event is input to the main operating system, so that the main operating system turns on or off the display screen according to the first control event.
Wherein, in some embodiments, only the display window corresponding to the guest operating system running in the foreground is displayed, and the display window corresponding to the guest operating system running in the background is hidden; moreover, the guest operating system running in the background cannot invoke the physical input device to interact with the user. Therefore, in this embodiment, in order to reduce unnecessary energy loss of the smart terminal, the apparatus 40 further includes: a state determination unit 43.
The state determination unit 43 is configured to determine an operation state of the guest operating system that received the first control request. Wherein the running states include a foreground running state and a background running state. If the state determining unit 42 determines that the operating state of the guest operating system receiving the first control request is the foreground operating state, the first control unit 42 converts the first control request into a first control event, and inputs the first control event to the host operating system.
In some embodiments, the client operating systems in the intelligent terminals all maintain a corresponding state record table, and then the state determining unit 43 is specifically configured to: and determining the running state of the guest operating system by inquiring a state record table corresponding to the guest operating system receiving the first control request.
Further, in some embodiments, the apparatus 40 also includes a discarding unit 44.
If the state determination unit 43 determines that the operating state of the guest operating system receiving the first control request is the background operating state, the first control request is discarded by the discarding unit 44.
Moreover, in some further embodiments, the apparatus 40 further comprises: a second detection unit 45 and a second control unit 46.
The second detecting unit 45 is configured to detect a second control request received by the main operating system, where the second control request is used to instruct the main operating system to light on or turn off the display screen;
the second control unit 46 is configured to turn on or off the display screen according to the second control request.
It should be noted that, since the apparatus for controlling a display screen and the method for controlling a display screen in the above method embodiment are based on the same inventive concept, corresponding contents and advantageous effects of the above method embodiment are also applicable to the apparatus embodiment, and detailed description is omitted here.
According to the technical scheme, the beneficial effects of the embodiment of the application are as follows: the device for controlling the display screen provided in the embodiment of the application converts a first control request, which is received by a client operating system and used for instructing the client operating system to light or extinguish the display screen of the intelligent terminal, into a first control event through the first control unit 42, and inputs the first control event into the main operating system, so that the main operating system lights or extinguishes the display screen according to the first control event, the control of the client operating system on the display screen can be realized in an application layer of the main operating system, and the situation that a plurality of operating systems simultaneously operate related interfaces used for controlling the display screen in the intelligent terminal is avoided, thereby effectively solving the problem that the display state may be disordered when the plurality of operating systems simultaneously control the display screen; in addition, the control of the client operating system on the display screen is realized on the application layer of the main operating system, so that the transportability of the client operating system can be improved, and the system can be conveniently replaced.
Fig. 5 is a schematic structural diagram of an intelligent terminal provided in an embodiment of the present application, where the intelligent terminal 500 may be any type of electronic device, such as: the display screen control method can be used for executing the display screen control method provided by the method embodiment or operating the display screen control device provided by the device embodiment.
Specifically, referring to fig. 5, the intelligent terminal 500 includes:
one or more processors 501, a memory 502, and a display 503, with one processor 501 being exemplified in fig. 5.
The processor 501, the memory 502 and the display 503 may be connected by a bus or other means, and fig. 5 illustrates the bus connection.
The memory 502, which is a non-transitory computer-readable storage medium, may be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions/modules corresponding to the method of controlling a display screen in the embodiment of the present application (for example, the first detection unit 41, the first control unit 42, the state determination unit 43, the discarding unit 44, the second detection unit 45, and the second control unit 46 shown in fig. 4). The processor 501 executes various functional applications and data processing of the apparatus 40 for controlling a display screen by executing non-transitory software programs, instructions and modules stored in the memory 502, namely, a method for controlling a display screen according to any one of the above-mentioned method embodiments.
The memory 502 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the stored data area may store data created according to the use of the device 40 controlling the display screen, and the like. Further, the memory 502 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 502 may optionally include memory located remotely from processor 501, which may be connected to intelligent terminal 500 through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the memory 502 and, when executed by the one or more processors 501, perform the method of controlling a display screen in any of the method embodiments described above, e.g., performing the method steps 110 to 120 of fig. 2, 210 to 240 of fig. 3, described above, to implement the functionality of the units 41-46 of fig. 4.
Embodiments of the present application also provide a non-transitory computer-readable storage medium storing computer-executable instructions, which are executed by one or more processors, for example, by one of the processors 501 in fig. 5, and may cause the one or more processors to perform the method for controlling a display screen in any of the method embodiments, for example, the method steps 110 to 120 in fig. 2 and the method steps 210 to 240 in fig. 3, which are described above, to implement the functions of the units 41 to 46 in fig. 4.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a general hardware platform, and certainly can also be implemented by hardware. It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by relevant hardware instructed by a computer program in a computer program product, where the computer program can be stored in a non-transitory computer readable storage medium, and the computer program includes program instructions, which when executed by the intelligent terminal, can make the intelligent terminal execute the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The product (including the intelligent terminal, the non-transitory computer readable storage medium and the computer program product) can execute the method for controlling the display screen, and has the corresponding functional modules and beneficial effects of executing the method for controlling the display screen. For details of the technology not described in detail in this embodiment, reference may be made to the method for controlling the display screen provided in the embodiments of the present application.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; within the context of the present application, where technical features in the above embodiments or in different embodiments can also be combined, the steps can be implemented in any order and there are many other variations of the different aspects of the present application as described above, which are not provided in detail for the sake of brevity; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A method for controlling a display screen is applied to an intelligent terminal, the intelligent terminal comprises a main operating system and a plurality of client operating systems, and the method is characterized by comprising the following steps:
detecting a first control request received by a guest operating system, wherein the first control request is used for indicating the guest operating system to light on or turn off a display screen of an intelligent terminal;
determining the running state of a guest operating system receiving the first control request, wherein the running state comprises a background running state;
if the running state of the client operating system receiving the first control request is the background running state, judging the priority of the first control request;
if the first control request is of high priority, converting the first control request into a first control event, and inputting the first control event into a main operating system, so that the main operating system lights or extinguishes the display screen according to the first control event;
otherwise, the first control request is discarded.
2. The method of claim 1, wherein prior to the step of converting the first control request to a first control event and inputting the first control event to a host operating system, further comprising:
determining the running state of the guest operating system receiving the first control request, wherein the running state comprises a foreground running state;
and if the running state of the guest operating system receiving the first control request is the foreground running state, executing the step of converting the first control request into a first control event and inputting the first control event into a main operating system.
3. The method of claim 1 or 2, wherein the guest operating system maintains a corresponding state record table, and wherein determining the operating state of the guest operating system that received the first control request comprises:
and determining the running state of the guest operating system by inquiring a state record table corresponding to the guest operating system receiving the first control request.
4. The method of claim 1, further comprising:
detecting a second control request received by a main operating system, wherein the second control request is used for indicating the main operating system to light or extinguish the display screen;
and lightening or extinguishing the display screen according to the second control request.
5. A device for controlling a display screen runs on an intelligent terminal, the intelligent terminal comprises a main operating system and a plurality of client operating systems, and the device is characterized by comprising:
the system comprises a first detection unit, a second detection unit and a control unit, wherein the first detection unit is used for detecting a first control request received by a client operating system, and the first control request is used for indicating the client operating system to light on or turn off a display screen of the intelligent terminal; the first control request is received from a client operating system, and the running state of the client operating system is determined; if the running state of the client operating system receiving the first control request is the background running state, judging the priority of the first control request;
the first control unit is used for converting the first control request into a first control event and inputting the first control event into a main operating system when the first control request is in a high priority level, so that the main operating system lights or extinguishes the display screen according to the first control event; otherwise, the first control request is discarded.
6. The apparatus of claim 5, further comprising:
a state determination unit, configured to determine an operating state of the guest operating system that receives the first control request, where the operating state includes a foreground operating state;
if the state determining unit determines that the running state of the guest operating system receiving the first control request is the foreground running state, the first control unit converts the first control request into a first control event and inputs the first control event into a main operating system.
7. The apparatus according to claim 5 or 6, wherein the guest operating system maintains a corresponding state record table, and the state determining unit is specifically configured to:
and determining the running state of the guest operating system by inquiring a state record table corresponding to the guest operating system receiving the first control request.
8. The apparatus of claim 5, further comprising:
the second detection unit is used for detecting a second control request received by a main operating system, and the second control request is used for indicating the main operating system to light on or turn off the display screen;
and the second control unit is used for lightening or extinguishing the display screen according to the second control request.
9. An intelligent terminal, comprising:
a display screen;
at least one processor in communicative connection with the display screen; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.
10. A non-transitory computer-readable storage medium storing computer-executable instructions for causing a smart terminal to perform the method of any one of claims 1-4.
CN201780003287.5A 2017-12-27 2017-12-27 Method and device for controlling display screen and intelligent terminal Active CN108401453B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/118931 WO2019127082A1 (en) 2017-12-27 2017-12-27 Display screen control method and apparatus, and intelligent terminal

Publications (2)

Publication Number Publication Date
CN108401453A CN108401453A (en) 2018-08-14
CN108401453B true CN108401453B (en) 2020-01-07

Family

ID=63095118

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201780003287.5A Active CN108401453B (en) 2017-12-27 2017-12-27 Method and device for controlling display screen and intelligent terminal

Country Status (2)

Country Link
CN (1) CN108401453B (en)
WO (1) WO2019127082A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109377460A (en) * 2018-10-15 2019-02-22 Oppo广东移动通信有限公司 A kind of image processing method, image processing apparatus and terminal device
CN111314442B (en) * 2020-01-21 2023-07-18 维达力实业(深圳)有限公司 Terminal control method and device based on time-sharing control, terminal and computer equipment
CN114816627B (en) * 2022-04-07 2023-03-24 镁佳(北京)科技有限公司 Screen state adjusting method and device, electronic equipment and storage medium
CN115657879B (en) * 2022-12-09 2023-04-07 北京小米移动软件有限公司 Input control method, device, equipment and medium based on heterogeneous operating system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101685404A (en) * 2008-09-28 2010-03-31 联想(北京)有限公司 Computer and method for dynamically switching equipment in virtual environment
CN101984641A (en) * 2010-10-14 2011-03-09 中兴通讯股份有限公司 Mobile terminal and backlight control method thereof
CN102810040A (en) * 2011-05-31 2012-12-05 联想(北京)有限公司 Display processing method, display processing device and computer system
CN107003875A (en) * 2016-12-13 2017-08-01 深圳前海达闼云端智能科技有限公司 For the display methods of multiple operating system, device and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2746935A1 (en) * 2012-12-20 2014-06-25 Océ-Technologies B.V. User interface with splash screen
CN103677964B (en) * 2013-12-30 2017-02-15 杭州冰特科技有限公司 Virtual machine control system
CN105373413A (en) * 2014-08-22 2016-03-02 中兴通讯股份有限公司 Full-mapping method and apparatus for Xen virtualization system
CN106873749B (en) * 2015-12-10 2020-03-06 北京安云世纪科技有限公司 Operation optimization method, operation optimization system and terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101685404A (en) * 2008-09-28 2010-03-31 联想(北京)有限公司 Computer and method for dynamically switching equipment in virtual environment
CN101984641A (en) * 2010-10-14 2011-03-09 中兴通讯股份有限公司 Mobile terminal and backlight control method thereof
CN102810040A (en) * 2011-05-31 2012-12-05 联想(北京)有限公司 Display processing method, display processing device and computer system
CN107003875A (en) * 2016-12-13 2017-08-01 深圳前海达闼云端智能科技有限公司 For the display methods of multiple operating system, device and electronic equipment

Also Published As

Publication number Publication date
WO2019127082A1 (en) 2019-07-04
CN108401453A (en) 2018-08-14

Similar Documents

Publication Publication Date Title
CN108401453B (en) Method and device for controlling display screen and intelligent terminal
CN104360900B (en) Method for operating multiple operating systems, corresponding system and mobile device
CN106233249B (en) Apparatus and method for managing graphics buffers of sleep mode processor
KR101702729B1 (en) System and method for switching between environments in a multi-environment operating system
US20120173986A1 (en) Background synchronization within a multi-environment operating system
WO2016095383A1 (en) Method for implementing application call and virtual machine
US20120144042A1 (en) Mechanism for migration of client-side virtual machine system resources
US20200174823A1 (en) State management method and apparatus for virtual machine, and smart terminal thereof
US20110016299A1 (en) Multi-environment operating system
CN103229156A (en) Auto-configuration of a docked system in a multi-OS environment
WO2016026113A1 (en) Secure interaction method and device
EP3133481B1 (en) Terminal device display method and terminal device
CN105940375B (en) Dynamic reassignment for multiple operating system devices
WO2014101213A1 (en) Method, device and system for synchronizing mice
WO2019119315A1 (en) Input processing method and apparatus based on multiple operating systems, and electronic device
US11366679B2 (en) Guest operating system wake-up method, device, electronic apparatus, and readable medium
US11249771B2 (en) Terminal input invocation
WO2015176422A1 (en) Android system-based application management method and device thereof
TWI719323B (en) Method and apparatus for switching a view, and computing device
CN110989820A (en) Method and device for controlling power consumption of processor, processor and electronic device
CN110290058A (en) A kind of method and apparatus that conversation message being presented in the application
CN112346612B (en) Page display method and device
WO2018112772A1 (en) Method and apparatus for operating another operating system and electronic device
CN107015874B (en) Data transmission control method, device and terminal
CN113407318B (en) Operating system switching method and device, computer readable medium and electronic equipment

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
GR01 Patent grant
GR01 Patent grant