CN114265660A - Desktop screen locking method and device, storage medium and computer equipment - Google Patents

Desktop screen locking method and device, storage medium and computer equipment Download PDF

Info

Publication number
CN114265660A
CN114265660A CN202210190852.6A CN202210190852A CN114265660A CN 114265660 A CN114265660 A CN 114265660A CN 202210190852 A CN202210190852 A CN 202210190852A CN 114265660 A CN114265660 A CN 114265660A
Authority
CN
China
Prior art keywords
interface
preset
virtual desktop
desktop
switching
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.)
Granted
Application number
CN202210190852.6A
Other languages
Chinese (zh)
Other versions
CN114265660B (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.)
Chengdu Luyi Technology Co ltd
Original Assignee
Chengdu Luyi 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 Chengdu Luyi Technology Co ltd filed Critical Chengdu Luyi Technology Co ltd
Priority to CN202210190852.6A priority Critical patent/CN114265660B/en
Publication of CN114265660A publication Critical patent/CN114265660A/en
Application granted granted Critical
Publication of CN114265660B publication Critical patent/CN114265660B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The application discloses a desktop screen locking method and device, a storage medium and computer equipment, wherein the method comprises the following steps: creating a virtual desktop, and running the virtual desktop in a background; continuously monitoring user operation behaviors, and recording first idle time based on the monitored user operation behaviors; when the first idle time is longer than first preset time, switching a display desktop into the virtual desktop running in a background; and starting a virtual desktop screen locking based on the virtual desktop, and shielding a preset screen saver interface, wherein the preset screen saver interface comprises a system screen saver interface and a system screen locking screen saver interface. The method and the device are beneficial to avoiding the screen locking and blocking of the desktop of the computer equipment, and meanwhile, the experience of the user is enhanced.

Description

Desktop screen locking method and device, storage medium and computer equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a desktop screen locking method and apparatus, a storage medium, and a computer device.
Background
The desktop screen locking can prevent the display screen from being static on the same Windows picture for a long time, prevent the electron beam from continuously attacking the same position of the screen and further prolong the service life of the display screen; on the other hand, under the condition that the user does not operate the computer equipment for a long time, the power consumption can be prevented through the screen locking.
The desktop screen locking often exists the condition that the screen locking screen savers corresponding to a plurality of screen locking programs robbed each other at the top now, or the taskbar flickering appears again under the condition that the desktop has been locked, leads to the taskbar to appear in desktop screen locking screen savers upper strata, and the appearance of these circumstances not only makes the computer equipment desktop lock screen card pause, has also influenced user's experience simultaneously and has felt.
Therefore, how to avoid the screen locking screen saver corresponding to a plurality of screen locking programs from being set on top when the desktop is locked, the screen locking screen saver of the desktop of the computer equipment is prevented from being locked, the experience of a user is enhanced, and the problem to be solved in the field is solved urgently.
Disclosure of Invention
In view of this, the application provides a desktop screen locking method and apparatus, a storage medium, and a computer device, which are beneficial to enhancing the experience of a user while avoiding the desktop screen locking jam of the computer device.
According to one aspect of the application, a desktop screen locking method is provided, which comprises the following steps:
creating a virtual desktop, and running the virtual desktop in a background;
continuously monitoring user operation behaviors, and recording first idle time based on the monitored user operation behaviors;
when the first idle time is longer than first preset time, switching a display desktop into the virtual desktop running in a background;
and starting a virtual desktop screen locking based on the virtual desktop, and shielding a preset screen saver interface, wherein the preset screen saver interface comprises a system screen saver interface and a system screen locking screen saver interface.
Optionally, the switching the display desktop to the virtual desktop running in the background specifically includes:
when the interface corresponding to the display desktop is a system screen saver interface, simulating the user operation behavior by using a preset first function, unlocking the system screen saver interface, switching the system screen saver interface to a user operation interface, and switching the system screen saver interface to the virtual desktop running in the background from the user operation interface;
after the shielding of the preset screen saver interface, the method further comprises:
and switching the virtual desktop to the user operation interface and switching the user operation interface to the system screen saver interface.
Optionally, the switching the display desktop to the virtual desktop running in the background specifically includes:
when the interface corresponding to the display desktop is the system screen locking screen saver interface, monitoring the state corresponding to the system screen locking screen saver, and when the unlocking of the system screen locking screen saver is monitored, switching the system screen locking screen saver interface to the user operation interface and switching the system screen locking screen saver interface to the virtual desktop running in the background from the user operation interface;
after the shielding of the preset screen saver interface, the method further comprises:
and switching the virtual desktop to the user operation interface.
Optionally, the switching the display desktop to the virtual desktop running in the background specifically includes:
when the interface corresponding to the display desktop is the user operation interface, switching the user operation interface to the virtual desktop running in the background;
after the shielding of the preset screen saver interface, the method further comprises:
and switching the virtual desktop to the user operation interface.
Optionally, the shielding the preset screen saver interface specifically includes:
calling a preset second function, closing a program corresponding to the system screen saver interface based on the preset second function, and shielding the program corresponding to the system screen locking screen saver interface by modifying a preset registry;
after the shielding of the preset screen saver interface, the method further comprises:
and continuously monitoring the system awakening behavior, calling the preset second function again when the system awakening behavior is monitored, starting a program corresponding to the preset screen saver interface, and starting the program corresponding to the system screen locking screen saver interface by using the preset registry.
Optionally, after the system wake-up behavior is monitored, the method further includes:
calling a preset third function, and acquiring a handle corresponding to the user operation interface according to the preset third function;
the switching the virtual desktop to the user operation interface specifically includes:
and switching the virtual desktop to the user operation interface based on the handle corresponding to the user operation interface.
Optionally, after the virtual desktop lock screen is started, the method further includes:
continuously monitoring equipment input data, calling a preset shortcut key operation interception function when preset input data are monitored, and shielding a preset shortcut key operation behavior through the preset shortcut key operation interception function.
Optionally, after shielding the preset screen saver interface, the method further includes:
when the system sleep time is longer than the preset sleep time, starting a system screen locking, switching the virtual desktop into an interface corresponding to the system screen locking, stopping monitoring the system awakening action, and continuously monitoring the system screen locking and unlocking action;
and when the system screen locking and unlocking behavior is monitored, switching an interface corresponding to the system screen locking to the user operation interface, switching the user operation interface to the virtual desktop, and recovering monitoring of the system awakening behavior.
Optionally, after shielding the preset screen saver interface, the method further includes:
and cutting off preset heartbeat communication, monitoring the system awakening behavior, starting to record second idle time when the system awakening behavior is monitored, and recovering the connection of the preset heartbeat communication when the second idle time is greater than the second preset time.
According to another aspect of the present application, there is provided a desktop screen locking device, including:
the virtual desktop creating module is used for creating a virtual desktop and running the virtual desktop on a background;
the monitoring module is used for continuously monitoring user operation behaviors and recording first idle time based on the monitored user operation behaviors;
the virtual desktop switching module is used for switching a display desktop into the virtual desktop running in a background when the first idle time is greater than first preset time;
and the screen locking module is used for starting the screen locking of the virtual desktop based on the virtual desktop and shielding a preset screen saver interface, wherein the preset screen saver interface comprises a system screen saver interface and a system screen locking screen saver interface.
Optionally, the virtual desktop switching module is specifically configured to:
when the interface corresponding to the display desktop is a system screen saver interface, simulating the user operation behavior by using a preset first function, unlocking the system screen saver interface, switching the system screen saver interface to a user operation interface, and switching the system screen saver interface to the virtual desktop running in the background from the user operation interface;
the device further comprises:
and the desktop switching-back module is used for switching the virtual desktop to the user operation interface and switching the user operation interface into the system screen saver interface after shielding the preset screen saver interface.
Optionally, the virtual desktop switching module is specifically configured to:
when the interface corresponding to the display desktop is the system screen locking screen saver interface, monitoring the state corresponding to the system screen locking screen saver, and when the unlocking of the system screen locking screen saver is monitored, switching the system screen locking screen saver interface to the user operation interface and switching the system screen locking screen saver interface to the virtual desktop running in the background from the user operation interface;
the device further comprises:
and the desktop switching-back module is used for switching the virtual desktop to the user operation interface after shielding the preset screen saver interface.
Optionally, the virtual desktop switching module is specifically configured to:
when the interface corresponding to the display desktop is the user operation interface, switching the user operation interface to the virtual desktop running in the background;
the device further comprises:
and the desktop switching-back module is used for switching the virtual desktop to the user operation interface after shielding the preset screen saver interface.
Optionally, the screen locking module is specifically configured to:
calling a preset second function, closing a program corresponding to the system screen saver interface based on the preset second function, and shielding the program corresponding to the system screen locking screen saver interface by modifying a preset registry;
the monitoring module is further configured to:
after the preset screen saver interface is shielded, the system awakening behavior is continuously monitored, when the system awakening behavior is monitored, the preset second function is called again, the program corresponding to the preset screen saver interface is started, and the program corresponding to the system screen locking screen saver interface is started by utilizing the preset registry.
Optionally, the apparatus further comprises:
the handle acquisition module is used for calling a preset third function after the system awakening behavior is monitored, and acquiring a handle corresponding to the user operation interface according to the preset third function;
the virtual desktop switching module is further configured to:
and switching the virtual desktop to the user operation interface based on the handle corresponding to the user operation interface.
Optionally, the apparatus further comprises:
and the interception module is used for continuously monitoring equipment input data after the virtual desktop screen locking is started, calling a preset shortcut key operation interception function when preset input data is monitored, and shielding a preset shortcut key operation behavior through the preset shortcut key operation interception function.
Optionally, the apparatus further comprises:
the system screen locking module is used for starting system screen locking when the system sleep time is greater than the preset sleep time after the preset screen saver interface is shielded, switching the virtual desktop into an interface corresponding to the system screen locking, stopping monitoring the system awakening action and continuously monitoring the system screen locking and unlocking action;
the virtual desktop switching module is further configured to switch an interface corresponding to the system lock screen to the user operation interface when the system lock screen unlocking behavior is monitored, switch the interface from the user operation interface to the virtual desktop, and resume monitoring the system wakeup behavior.
Optionally, the apparatus further comprises:
and the communication module is used for cutting off preset heartbeat communication after shielding the preset screen saver interface, monitoring the system awakening behavior, starting to record second idle time when monitoring the system awakening behavior, and recovering the connection of the preset heartbeat communication when the second idle time is greater than the second preset time.
According to yet another aspect of the present application, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the desktop screen locking method described above.
According to yet another aspect of the present application, there is provided a computer device, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the desktop screen locking method when executing the program.
By means of the technical scheme, the desktop screen locking method and device, the storage medium and the computer device provided by the application create the virtual desktop after the virtual desktop screen locking program is started, run the created virtual desktop on the background, continuously monitor the operation behavior of the user, record the corresponding first idle time based on the monitored operation behavior of the user when the operation behavior of the user is monitored, compare the recorded first idle time with the first preset time, switch the display desktop to the created virtual desktop running on the background when the first idle time is greater than the first preset time, start the virtual desktop screen locking and shield the preset screen protection interface. According to the embodiment of the application, the virtual desktop is created, the screen locking is displayed on the virtual desktop, the screen locking and screen saving interface is shielded and preset, the condition that the screen locking and screen saving corresponding to a plurality of screen locking programs is robbed on the top when the desktop is locked can be effectively avoided, and the experience of a user is enhanced while the desktop of the computer equipment is prevented from being locked and blocked.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a flowchart illustrating a desktop screen locking method according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating another desktop screen locking method provided by an embodiment of the present application;
fig. 3 shows a schematic structural diagram of a desktop screen locking device provided in an embodiment of the present application.
Detailed Description
The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
In this embodiment, a desktop screen locking method is provided, as shown in fig. 1, the method includes:
step 101, creating a virtual desktop, and running the virtual desktop on a background;
the desktop screen locking method provided by the embodiment of the application can be realized by creating a virtual desktop and displaying the screen locking on the virtual desktop. The method can be applied to terminal equipment, and the application is described by taking application to computer equipment as an example. And after the screen locking program of the virtual desktop is started, the virtual desktop is created, and the created virtual desktop is operated in the background. After the virtual desktop is created, corresponding communication can be established between the display desktop and the virtual desktop corresponding to the computer equipment, and the display desktop can be successfully switched to the virtual desktop subsequently.
Step 102, continuously monitoring user operation behaviors, and recording first idle time based on the monitored user operation behaviors;
after the virtual desktop is created, the operation behavior of the user is monitored continuously, and when the operation behavior of the user is monitored, the corresponding first idle time is recorded on the basis of the monitored operation behavior of the user. Here, the first idle time may be understood as a time corresponding to a case where the user does not operate the computer device while the computer device is not in a video play, projection mode, or the like.
103, when the first idle time is greater than a first preset time, switching a display desktop into the virtual desktop running in a background;
and comparing the recorded first idle time with first preset time, when the first idle time is less than the first preset time, if the operation behavior of the user is monitored again, resetting the first idle time, and recording the first idle time again. When the first idle time is greater than the first preset time, which indicates that the user has not used the computer device for a long time, the display desktop can be switched to the created virtual desktop running in the background. Before the display desktop is switched to the virtual desktop, whether the communication between the display desktop and the virtual desktop is in a connection state or not can be checked, when the communication is in the connection state, the display desktop can be switched to the virtual desktop, and when the communication is in a non-connection state, the switching fails.
And 104, starting a virtual desktop screen locking based on the virtual desktop, and shielding a preset screen saver interface, wherein the preset screen saver interface comprises a system screen saver interface and a system screen locking screen saver interface.
After the display desktop is switched to the virtual desktop, the virtual desktop screen locking is started, meanwhile, the preset screen saver interface is shielded, the system screen saver interface and the like are prevented from appearing in the process of locking the virtual desktop screen, and the experience of a user is prevented from being influenced.
By applying the technical scheme of the embodiment, after the virtual desktop screen locking program is started, the virtual desktop is created, the created virtual desktop runs in the background, the operation behavior of the user is monitored continuously, when the operation behavior of the user is monitored, the corresponding first idle time is recorded on the basis of the monitored user operation behavior, the recorded first idle time is compared with the first preset time, when the first idle time is greater than the first preset time, the display desktop is switched to the created virtual desktop running in the background, the virtual desktop screen locking is started, and the preset screen protection interface is shielded. According to the embodiment of the application, the virtual desktop is created, the screen locking is displayed on the virtual desktop, the screen locking and screen saving interface is shielded and preset, the condition that the screen locking and screen saving corresponding to a plurality of screen locking programs is robbed on the top when the desktop is locked can be effectively avoided, and the experience of a user is enhanced while the desktop of the computer equipment is prevented from being locked and blocked.
In this embodiment of the application, optionally, the step 103 of "switching the display desktop to the virtual desktop running in the background" may specifically include:
103-1, when the interface corresponding to the display desktop is a system screen saver interface, simulating the user operation behavior by using a preset first function, unlocking the system screen saver interface, switching the system screen saver interface to a user operation interface, and switching from the user operation interface to the virtual desktop running on a background.
After "shielding the preset screen saver interface" in step 104, the method further includes:
and 104-1, switching the virtual desktop to the user operation interface, and switching the user operation interface to the system screen saver interface.
In this embodiment, when the display desktop is switched to the virtual desktop, which interface is the interface corresponding to the display desktop may be determined first. When the interface corresponding to the display desktop is the system screen saver interface, the system screen saver interface needs to be closed first, specifically, the operation behavior of the user can be simulated through a preset first function, the mouse operation behavior or the keyboard operation behavior of the user is simulated, so that the system screen saver interface is closed, and after the system screen saver interface is closed, the system screen saver interface is switched to the virtual desktop. The specific switching process may be switching from the system screen saver interface to the user operation interface, and then switching from the user operation interface to the virtual desktop running in the background. This is because the existence of the session isolation mechanism under windows makes the user have no right to switch directly from the system screen saver interface to the virtual desktop.
When the virtual desktop is switched to, the screen locking of the virtual desktop is started, and after the preset screen saver interface is shielded, if a user wants to quit the virtual interface, the corresponding display interface switching process is that the virtual desktop is switched to a user operation interface, and then the user operation interface is switched to a system screen saver interface.
In this embodiment of the application, optionally, the step 103 of "switching the display desktop to the virtual desktop running in the background" may specifically include:
and 103-2, monitoring the corresponding state of the system screen locking screen saver when the interface corresponding to the display desktop is the system screen locking screen saver interface, switching the system screen locking screen saver interface to the user operation interface when the unlocking of the system screen locking screen saver is monitored, and switching the user operation interface to the virtual desktop running in the background.
After "shielding the preset screen saver interface" in step 104, the method further includes:
and 104-2, switching the virtual desktop to the user operation interface.
In this embodiment, when the display desktop is switched to the virtual desktop, which interface is the interface corresponding to the display desktop may be determined first. When the interface corresponding to the display desktop is the system screen locking screen saver interface, the system screen locking screen saver interface needs to be closed first and then the virtual desktop can be switched to. When the system screen locking and protecting interface exists, the virtual desktop is positioned at the lower layer of the system screen locking and protecting interface and monitors the corresponding state of the system screen locking and protecting interface, wherein the state can comprise unlocked state and non-unlocked state, and the system screen locking and protecting interface can be closed by a user. And when the unlocking of the system screen locking screen saver is monitored, the virtual desktop at the lower layer can be displayed. Also, due to the existence of the session isolation mechanism under windows, the specific handover process may be: and switching the system screen locking screen saver interface into a user operation interface, and switching the user operation interface into a virtual desktop running on the background.
When the virtual desktop is switched to, after the virtual desktop is started to lock the screen and the preset screen saver interface is shielded, if the user wants to quit the virtual interface, the corresponding display interface switching process is that the virtual desktop is switched to the user operation interface.
In this embodiment of the application, optionally, the step 103 of "switching the display desktop to the virtual desktop running in the background" may specifically include:
103-3, when the interface corresponding to the display desktop is the user operation interface, switching the user operation interface to the virtual desktop running on the background;
after "shielding the preset screen saver interface" in step 104, the method further includes:
and step 104-3, switching the virtual desktop to the user operation interface.
In this embodiment, when the display desktop is switched to the virtual desktop, which interface is the interface corresponding to the display desktop may be determined first. When the interface corresponding to the display desktop is the user operation interface, the user operation interface can be directly switched to the virtual desktop running in the background, and in this case, the transitional display desktop does not exist.
When the virtual desktop is switched to, after the virtual desktop is started to lock the screen and the preset screen saver interface is shielded, if the user wants to quit the virtual interface, the corresponding display interface switching process is that the virtual desktop is switched to the user operation interface.
In this embodiment of the application, optionally, the step 104 of "shielding the preset screen saver interface" may specifically include: calling a preset second function, closing a program corresponding to the system screen saver interface based on the preset second function, and shielding the program corresponding to the system screen locking screen saver interface by modifying a preset registry; after "shielding the preset screen saver interface" in step 104, the method further includes: and continuously monitoring the system awakening behavior, calling the preset second function again when the system awakening behavior is monitored, starting a program corresponding to the preset screen saver interface, and starting the program corresponding to the system screen locking screen saver interface by using the preset registry.
In this embodiment, when the virtual desktop screen locking is started, in order to shield the preset screen saver interface and improve user experience and the virtual desktop display effect, the preset second function may be called, and the program corresponding to the system screen saver interface is closed by the preset second function, so that the system screen saver is prevented from occurring in the virtual desktop screen locking process. Here, the preset second function may be a systemoparametersinfo function. Meanwhile, the program corresponding to the system screen locking screen saver interface can be closed by modifying the preset registry, and the system screen locking screen saver is prevented from occurring in the virtual desktop screen locking process. Whether the preset registry needs to be modified or not can be selected according to the actual needs of the user, and the preset registry can also be uniformly modified by a virtual desktop screen locking program developer.
And after the virtual desktop screen locking is started and the preset screen saver interface is shielded, continuously monitoring the system awakening action, and when the system awakening action is monitored, restarting a program corresponding to the system screen saver interface by calling a preset second function, and simultaneously restarting the program corresponding to the shielded system screen saver interface through a preset registry, so that the system screen saver interface and the system screen saver interface can normally appear on the display desktop after the virtual desktop screen locking is quitted.
According to the method and the device for displaying the screen saver, the program corresponding to the system screen saver interface is closed by calling the preset second function, the program corresponding to the system screen saver interface is shielded by modifying the preset registry, interference caused by the fact that other display interfaces appear on the upper layer of the virtual desktop to the virtual desktop when the virtual desktop is locked can be effectively avoided, the experience of a user in leisure time is improved, and meanwhile, the display of scenes on the virtual desktop is facilitated. And after the virtual desktop screen locking is quitted, opening the program corresponding to the system screen saver interface and shielding the program corresponding to the system screen saver interface again, so that the system screen saver interface and the system screen saver interface can normally appear on the display desktop of the computer equipment, and the normal use of the computer equipment cannot be influenced.
In the above embodiment, optionally, after the system wake-up behavior is monitored, the method further includes: calling a preset third function, and acquiring a handle corresponding to the user operation interface according to the preset third function; the switching the virtual desktop to the user operation interface specifically includes: and switching the virtual desktop to the user operation interface based on the handle corresponding to the user operation interface.
In this embodiment, after the system wake-up behavior is monitored, a preset third function may be called, and a handle corresponding to the user operation interface may be obtained according to the preset third function. Here, the preset third function may be an OpenInputDesktop function, and if the function is executed successfully, the return value is a corresponding desktop handle.
When the virtual desktop is switched to the user operation interface, the corresponding operation steps may be: and determining an address corresponding to the user operation interface according to the handle corresponding to the user operation interface, and further switching the virtual desktop into the user operation interface.
Further, as a refinement and an extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of the embodiment, another desktop screen locking method is provided, as shown in fig. 2, and the method includes:
step 201, creating a virtual desktop, and running the virtual desktop on a background;
step 202, continuously monitoring user operation behaviors, and recording first idle time based on the monitored user operation behaviors;
step 203, when the first idle time is greater than a first preset time, switching a display desktop into the virtual desktop running in a background;
step 204, starting a virtual desktop screen locking and shielding a preset screen saver interface based on the virtual desktop, wherein the preset screen saver interface comprises a system screen saver interface and a system screen locking screen saver interface;
in this embodiment, after the virtual desktop screen locking program is started, a virtual desktop is created, the created virtual desktop is run in the background, the operation behavior of the user is monitored continuously, when the operation behavior of the user is monitored, a corresponding first idle time is recorded based on the monitored user operation behavior, the recorded first idle time is compared with a first preset time, when the first idle time is greater than the first preset time, the display desktop is switched to the created virtual desktop running in the background, the virtual desktop screen locking is started, and the preset screen protection interface is shielded.
Step 205, continuously monitoring input data of equipment, calling a preset shortcut key operation interception function when preset input data is monitored, and shielding a preset shortcut key operation behavior through the preset shortcut key operation interception function;
in this embodiment, after the virtual desktop is started to lock the screen, the device input data is continuously monitored, and the device input data may be data input by operating a keyboard or data input by clicking a mouse. When the monitored equipment input data is preset input data, a preset shortcut key operation interception function can be called to intercept the monitored preset input data. The preset shortcut key operation intercepting function may be a global hook function, the preset input data may be input data corresponding to user operations such as WIN + … …, ALT + … …, CTRL + … …, and here, the user may complete a preset shortcut key operation behavior through WIN + … …, ALT + … …, CTRL + … …, for example, WIN + D (display desktop or restore desktop), ALT + F (open file menu), CTRL + Esc (display start menu), and the like. That is, the preset shortcut key operation behavior of the user can be intercepted through the preset shortcut key operation intercepting function. According to the method and the device, the input data corresponding to part of user shortcut key operation is shielded, the window generated by the shortcut key operation can be effectively prevented from appearing on the upper layer of the virtual desktop lock screen, and the influence on the display effect when the virtual desktop is locked is reduced.
Step 206, when the system sleep time is longer than the preset sleep time, starting a system screen lock, switching the virtual desktop into an interface corresponding to the system screen lock, stopping monitoring a system awakening behavior, and continuously monitoring a system screen lock unlocking behavior; and when the system screen locking and unlocking behavior is monitored, switching an interface corresponding to the system screen locking to the user operation interface, switching the user operation interface to the virtual desktop, and recovering monitoring of the system awakening behavior.
In this embodiment, after the virtual desktop screen locking is started, although the preset screen saver interface is shielded, the system screen locking may also occur when the system sleep time is greater than the preset sleep time. After the system screen locking is started, the interface corresponding to the system screen locking can appear on the upper layer of the virtual desktop, and at the moment, the interface corresponding to the display desktop is the interface corresponding to the system screen locking. And after the system locks the screen, stopping monitoring the system awakening behavior, and continuously monitoring the system screen locking and unlocking behavior. When the system screen locking and unlocking behavior is monitored, the interface corresponding to the system screen locking is closed, the interface corresponding to the display desktop is switched from the interface corresponding to the system screen locking to the user operation interface, the user operation interface is switched to the virtual desktop, and the system awakening behavior is monitored continuously.
In the foregoing embodiment, specifically, after "when the system sleep time is greater than the preset sleep time, the system screen locking is started" in step 206, the method may further include: switching the virtual desktop to an interface corresponding to a system screen lock, closing the virtual desktop screen lock, and operating the virtual desktop on a background; and when the screen locking and unlocking behaviors of the system are monitored, switching an interface corresponding to the screen locking of the system to the user operation interface.
In this embodiment of the present application, optionally, after step 204, the method may further include: and cutting off preset heartbeat communication, monitoring the system awakening behavior, starting to record second idle time when the system awakening behavior is monitored, and recovering the connection of the preset heartbeat communication when the second idle time is greater than the second preset time.
In this embodiment, after the virtual desktop is started to lock the screen and the preset screen saver interface is shielded, the system enters a sleep state at this time, and the preset heartbeat communication can be cut off, where the preset heartbeat communication is the heartbeat communication between the virtual desktop and the display desktop, and whether the heartbeat communication is in a connected state can be checked by sending a heartbeat message. And after the preset heartbeat communication is cut off, monitoring the system awakening behavior, recording second idle time when the system awakening behavior is monitored, and recovering the cut-off preset heartbeat communication when the second idle time is greater than the second preset time.
Further, as a specific implementation of the method in fig. 1, an embodiment of the present application provides a desktop screen locking device, and as shown in fig. 3, the device includes:
the virtual desktop creating module is used for creating a virtual desktop and running the virtual desktop on a background;
the monitoring module is used for continuously monitoring user operation behaviors and recording first idle time based on the monitored user operation behaviors;
the virtual desktop switching module is used for switching a display desktop into the virtual desktop running in a background when the first idle time is greater than first preset time;
and the screen locking module is used for starting the screen locking of the virtual desktop based on the virtual desktop and shielding a preset screen saver interface, wherein the preset screen saver interface comprises a system screen saver interface and a system screen locking screen saver interface.
Optionally, the virtual desktop switching module is specifically configured to:
when the interface corresponding to the display desktop is a system screen saver interface, simulating the user operation behavior by using a preset first function, unlocking the system screen saver interface, switching the system screen saver interface to a user operation interface, and switching the system screen saver interface to the virtual desktop running in the background from the user operation interface;
the device further comprises:
and the desktop switching-back module is used for switching the virtual desktop to the user operation interface and switching the user operation interface into the system screen saver interface after shielding the preset screen saver interface.
Optionally, the virtual desktop switching module is specifically configured to:
when the interface corresponding to the display desktop is the system screen locking screen saver interface, monitoring the state corresponding to the system screen locking screen saver, and when the unlocking of the system screen locking screen saver is monitored, switching the system screen locking screen saver interface to the user operation interface and switching the system screen locking screen saver interface to the virtual desktop running in the background from the user operation interface;
the device further comprises:
and the desktop switching-back module is used for switching the virtual desktop to the user operation interface after shielding the preset screen saver interface.
Optionally, the virtual desktop switching module is specifically configured to:
when the interface corresponding to the display desktop is the user operation interface, switching the user operation interface to the virtual desktop running in the background;
the device further comprises:
and the desktop switching-back module is used for switching the virtual desktop to the user operation interface after shielding the preset screen saver interface.
Optionally, the screen locking module is specifically configured to:
calling a preset second function, closing a program corresponding to the system screen saver interface based on the preset second function, and shielding the program corresponding to the system screen locking screen saver interface by modifying a preset registry;
the monitoring module is further configured to:
after the preset screen saver interface is shielded, the system awakening behavior is continuously monitored, when the system awakening behavior is monitored, the preset second function is called again, the program corresponding to the preset screen saver interface is started, and the program corresponding to the system screen locking screen saver interface is started by utilizing the preset registry.
Optionally, the apparatus further comprises:
the handle acquisition module is used for calling a preset third function after the system awakening behavior is monitored, and acquiring a handle corresponding to the user operation interface according to the preset third function;
the virtual desktop switching module is further configured to:
and switching the virtual desktop to the user operation interface based on the handle corresponding to the user operation interface.
Optionally, the apparatus further comprises:
and the interception module is used for continuously monitoring equipment input data after the virtual desktop screen locking is started, calling a preset shortcut key operation interception function when preset input data is monitored, and shielding a preset shortcut key operation behavior through the preset shortcut key operation interception function.
Optionally, the apparatus further comprises:
the system screen locking module is used for starting system screen locking when the system sleep time is greater than the preset sleep time after the preset screen saver interface is shielded, switching the virtual desktop into an interface corresponding to the system screen locking, stopping monitoring the system awakening action and continuously monitoring the system screen locking and unlocking action;
the virtual desktop switching module is further configured to switch an interface corresponding to the system lock screen to the user operation interface when the system lock screen unlocking behavior is monitored, switch the interface from the user operation interface to the virtual desktop, and resume monitoring the system wakeup behavior.
Optionally, the apparatus further comprises:
and the communication module is used for cutting off preset heartbeat communication after shielding the preset screen saver interface, monitoring the system awakening behavior, starting to record second idle time when monitoring the system awakening behavior, and recovering the connection of the preset heartbeat communication when the second idle time is greater than the second preset time.
It should be noted that other corresponding descriptions of the functional units related to the desktop screen locking device provided in the embodiment of the present application may refer to corresponding descriptions in the methods in fig. 1 to fig. 2, and are not described herein again.
Based on the method shown in fig. 1 to 2, correspondingly, an embodiment of the present application further provides a storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the desktop screen locking method shown in fig. 1 to 2.
Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the implementation scenarios of the present application.
Based on the above methods shown in fig. 1 to fig. 2 and the virtual device embodiment shown in fig. 3, in order to achieve the above object, an embodiment of the present application further provides a computer device, which may specifically be a personal computer, a server, a network device, and the like, where the computer device includes a storage medium and a processor; a storage medium for storing a computer program; a processor for executing a computer program to implement the desktop screen locking method as described above with reference to fig. 1 to 2.
Optionally, the computer device may also include a user interface, a network interface, a camera, Radio Frequency (RF) circuitry, sensors, audio circuitry, a WI-FI module, and so forth. The user interface may include a Display screen (Display), an input unit such as a keypad (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (e.g., a bluetooth interface, WI-FI interface), etc.
It will be appreciated by those skilled in the art that the present embodiment provides a computer device architecture that is not limiting of the computer device, and that may include more or fewer components, or some components in combination, or a different arrangement of components.
The storage medium may further include an operating system and a network communication module. An operating system is a program that manages and maintains the hardware and software resources of a computer device, supporting the operation of information handling programs, as well as other software and/or programs. The network communication module is used for realizing communication among components in the storage medium and other hardware and software in the entity device.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present application can be implemented by software plus a necessary general hardware platform, and can also be implemented by hardware. After a virtual desktop screen locking program is started, a virtual desktop is created, the created virtual desktop runs in the background, the operation behavior of a user is monitored continuously, when the operation behavior of the user is monitored, corresponding first idle time is recorded on the basis of the monitored user operation behavior, the recorded first idle time is compared with first preset time, when the first idle time is larger than the first preset time, a display desktop is switched to the created virtual desktop running in the background, the virtual desktop screen locking is started, and a preset screen protection interface is shielded. According to the embodiment of the application, the virtual desktop is created, the screen locking is displayed on the virtual desktop, the screen locking and screen saving interface is shielded and preset, the condition that the screen locking and screen saving corresponding to a plurality of screen locking programs is robbed on the top when the desktop is locked can be effectively avoided, and the experience of a user is enhanced while the desktop of the computer equipment is prevented from being locked and blocked.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above application serial numbers are for description purposes only and do not represent the superiority or inferiority of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.

Claims (12)

1. A desktop screen locking method is characterized by comprising the following steps:
creating a virtual desktop, and running the virtual desktop in a background;
continuously monitoring user operation behaviors, and recording first idle time based on the monitored user operation behaviors;
when the first idle time is longer than first preset time, switching a display desktop into the virtual desktop running in a background;
and starting a virtual desktop screen locking based on the virtual desktop, and shielding a preset screen saver interface, wherein the preset screen saver interface comprises a system screen saver interface and a system screen locking screen saver interface.
2. The method according to claim 1, wherein switching the display desktop to the virtual desktop running in the background specifically comprises:
when the interface corresponding to the display desktop is a system screen saver interface, simulating the user operation behavior by using a preset first function, unlocking the system screen saver interface, switching the system screen saver interface to a user operation interface, and switching the system screen saver interface to the virtual desktop running in the background from the user operation interface;
after the shielding of the preset screen saver interface, the method further comprises:
and switching the virtual desktop to the user operation interface and switching the user operation interface to the system screen saver interface.
3. The method according to claim 1, wherein switching the display desktop to the virtual desktop running in the background specifically comprises:
when the interface corresponding to the display desktop is the system screen locking screen saver interface, monitoring the state corresponding to the system screen locking screen saver, and when the unlocking of the system screen locking screen saver is monitored, switching the system screen locking screen saver interface to the user operation interface and switching the system screen locking screen saver interface to the virtual desktop running in the background from the user operation interface;
after the shielding of the preset screen saver interface, the method further comprises:
and switching the virtual desktop to the user operation interface.
4. The method according to claim 1, wherein switching the display desktop to the virtual desktop running in the background specifically comprises:
when the interface corresponding to the display desktop is the user operation interface, switching the user operation interface to the virtual desktop running in the background;
after the shielding of the preset screen saver interface, the method further comprises:
and switching the virtual desktop to the user operation interface.
5. The method according to any one of claims 2 to 4, wherein the shielding of the predetermined screen saver interface specifically comprises:
calling a preset second function, closing a program corresponding to the system screen saver interface based on the preset second function, and shielding the program corresponding to the system screen locking screen saver interface by modifying a preset registry;
after the shielding of the preset screen saver interface, the method further comprises:
and continuously monitoring the system awakening behavior, calling the preset second function again when the system awakening behavior is monitored, starting a program corresponding to the preset screen saver interface, and starting the program corresponding to the system screen locking screen saver interface by using the preset registry.
6. The method of claim 5, wherein after the system wake up behavior is monitored, the method further comprises:
calling a preset third function, and acquiring a handle corresponding to the user operation interface according to the preset third function;
the switching the virtual desktop to the user operation interface specifically includes:
and switching the virtual desktop to the user operation interface based on the handle corresponding to the user operation interface.
7. The method of claim 6, wherein after the initiating of the virtual desktop lock, the method further comprises:
continuously monitoring equipment input data, calling a preset shortcut key operation interception function when preset input data are monitored, and shielding a preset shortcut key operation behavior through the preset shortcut key operation interception function.
8. The method of claim 1, wherein after masking the predetermined screensaver interface, the method further comprises:
when the system sleep time is longer than the preset sleep time, starting a system screen locking, switching the virtual desktop into an interface corresponding to the system screen locking, stopping monitoring the system awakening action, and continuously monitoring the system screen locking and unlocking action;
and when the system screen locking and unlocking behavior is monitored, switching an interface corresponding to the system screen locking to the user operation interface, switching the user operation interface to the virtual desktop, and recovering monitoring of the system awakening behavior.
9. The method of claim 8, wherein after masking the predetermined screensaver interface, the method further comprises:
and cutting off preset heartbeat communication, monitoring the system awakening behavior, starting to record second idle time when the system awakening behavior is monitored, and recovering the connection of the preset heartbeat communication when the second idle time is greater than the second preset time.
10. A desktop screen locking device, comprising:
the virtual desktop creating module is used for creating a virtual desktop and running the virtual desktop on a background;
the monitoring module is used for continuously monitoring user operation behaviors and recording first idle time based on the monitored user operation behaviors;
the virtual desktop switching module is used for switching a display desktop into the virtual desktop running in a background when the first idle time is greater than first preset time;
and the screen locking module is used for starting the screen locking of the virtual desktop based on the virtual desktop and shielding a preset screen saver interface, wherein the preset screen saver interface comprises a system screen saver interface and a system screen locking screen saver interface.
11. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method of any of claims 1 to 9.
12. A computer device comprising a storage medium, a processor and a computer program stored on the storage medium and executable on the processor, characterized in that the processor implements the method of any one of claims 1 to 9 when executing the computer program.
CN202210190852.6A 2022-03-01 2022-03-01 Desktop screen locking method and device, storage medium and computer equipment Active CN114265660B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210190852.6A CN114265660B (en) 2022-03-01 2022-03-01 Desktop screen locking method and device, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210190852.6A CN114265660B (en) 2022-03-01 2022-03-01 Desktop screen locking method and device, storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN114265660A true CN114265660A (en) 2022-04-01
CN114265660B CN114265660B (en) 2022-05-03

Family

ID=80833755

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210190852.6A Active CN114265660B (en) 2022-03-01 2022-03-01 Desktop screen locking method and device, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN114265660B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019661A (en) * 2011-09-23 2013-04-03 腾讯科技(深圳)有限公司 Event prompting method and system
CN103856529A (en) * 2012-12-05 2014-06-11 华为技术有限公司 Method, device and system for locking screen
CN105677154A (en) * 2015-09-30 2016-06-15 北京清川科技有限公司 System and method for controlling other intelligent devices on basis of mobile phone screen locking
US9710639B1 (en) * 2015-09-14 2017-07-18 Google Inc. Single input unlock for computing devices
CN107145349A (en) * 2017-04-28 2017-09-08 珠海市魅族科技有限公司 Method for switching theme, device, computer installation and computer-readable recording medium
CN107479806A (en) * 2017-08-30 2017-12-15 深圳市金立通信设备有限公司 The method and terminal of a kind of changing interface
CN109388928A (en) * 2018-09-29 2019-02-26 广州视源电子科技股份有限公司 Screen locking control method, device, system and the equipment of computer equipment, medium
CN109753336A (en) * 2019-01-15 2019-05-14 Oppo广东移动通信有限公司 Method, electronic device and the computer readable storage medium that locking screen interface switches to desktop
CN111399960A (en) * 2020-03-17 2020-07-10 北京金山安全软件有限公司 Screen locking method and device, electronic equipment and storage medium
CN111580904A (en) * 2020-04-20 2020-08-25 北京小米移动软件有限公司 Display state switching method, display state switching device and storage medium
CN113687925A (en) * 2021-07-22 2021-11-23 成都鲁易科技有限公司 Equipment operation processing method and device, storage medium and computer equipment
CN113761511A (en) * 2020-11-17 2021-12-07 北京沃东天骏信息技术有限公司 Screen locking management method and device

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019661A (en) * 2011-09-23 2013-04-03 腾讯科技(深圳)有限公司 Event prompting method and system
CN103856529A (en) * 2012-12-05 2014-06-11 华为技术有限公司 Method, device and system for locking screen
US9710639B1 (en) * 2015-09-14 2017-07-18 Google Inc. Single input unlock for computing devices
CN105677154A (en) * 2015-09-30 2016-06-15 北京清川科技有限公司 System and method for controlling other intelligent devices on basis of mobile phone screen locking
CN107145349A (en) * 2017-04-28 2017-09-08 珠海市魅族科技有限公司 Method for switching theme, device, computer installation and computer-readable recording medium
CN107479806A (en) * 2017-08-30 2017-12-15 深圳市金立通信设备有限公司 The method and terminal of a kind of changing interface
CN109388928A (en) * 2018-09-29 2019-02-26 广州视源电子科技股份有限公司 Screen locking control method, device, system and the equipment of computer equipment, medium
CN109753336A (en) * 2019-01-15 2019-05-14 Oppo广东移动通信有限公司 Method, electronic device and the computer readable storage medium that locking screen interface switches to desktop
CN111399960A (en) * 2020-03-17 2020-07-10 北京金山安全软件有限公司 Screen locking method and device, electronic equipment and storage medium
CN111580904A (en) * 2020-04-20 2020-08-25 北京小米移动软件有限公司 Display state switching method, display state switching device and storage medium
CN113761511A (en) * 2020-11-17 2021-12-07 北京沃东天骏信息技术有限公司 Screen locking management method and device
CN113687925A (en) * 2021-07-22 2021-11-23 成都鲁易科技有限公司 Equipment operation processing method and device, storage medium and computer equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
夏王霞: "高校计算机房监控系统的设计与实现", 《科技视界》 *
陈锦飞等: "基于梅尔频率倒谱系数与动态时间规整的安卓声纹解锁系统", 《计算机工程》 *

Also Published As

Publication number Publication date
CN114265660B (en) 2022-05-03

Similar Documents

Publication Publication Date Title
US10394547B2 (en) Applying update to snapshots of virtual machine
CN109831420B (en) Method and device for determining kernel process permission
US20190361571A1 (en) Managing a floating window
US10055184B1 (en) Systems and methods for providing card-based interfaces for enumerable datasets
US9183606B1 (en) Trusted processing location within a graphics processing unit
EP3522508B1 (en) Recovery method for power-on failure of terminal device, and terminal device
US9245095B2 (en) System and method for license management of virtual machines at a virtual machine manager
CN109542744B (en) Method, device, storage medium and terminal for detecting abnormal starting problem of terminal
US10176329B2 (en) Systems and methods for detecting unknown vulnerabilities in computing processes
US7703133B1 (en) Secure authentication curtain system and method
CN106990972B (en) Method and device for operating a trusted user interface
WO2007053331A1 (en) Direct computing experience
WO2019070460A1 (en) Systems and methods for monitoring bait to protect users from security threats
US10430261B2 (en) Detecting a guest operating system crash on a virtual computing instance
CN110442426A (en) A kind of password remapping method, device and storage medium
CN105512562B (en) Vulnerability mining method and device and electronic equipment
JP2003167749A (en) Information processor with simplified user switching function and program for use in the same
CN113867585B (en) Interface display method, device, electronic equipment and storage medium
CN114265660B (en) Desktop screen locking method and device, storage medium and computer equipment
US8868979B1 (en) Host disaster recovery system
CN116028125A (en) Remote control startup display mode setting method, system, terminal and storage medium
CN109491825B (en) Method, device, storage medium and terminal for positioning abnormal starting problem
CN113824830A (en) Application management method and device
CN106778231A (en) A kind of application security management method realized in Android system
CN113010222A (en) File processing method and server

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