Patent Description:
Embodiments of this application relate to the field of communications technologies, and in particular, to a screen locking method and apparatus.

A mobile terminal such as a mobile phone may establish a Wi-Fi display (Wi-Fi Display) connection to a large-screen terminal such as a television or a PC display. In this way, the mobile phone may project stored or displayed content onto the large-screen terminal for display, so that a user can enjoy a high-definition image display effect on the large-screen terminal.

After the Wi-Fi display connection is established, it is equivalent to that the mobile phone has two displays, one is a display of the mobile phone, and the other is a display of the large-screen terminal connected to the mobile phone. Usually, a display status of the display of the mobile phone is synchronized with a display status of the display of the large-screen terminal. For example, when the mobile phone is in a screen-locked state, the large-screen terminal is also in a screen-locked state; or when the mobile phone is in a screen-unlocked state, the large-screen terminal is also in a screen-unlocked state.

Therefore, when the user needs to perform a relatively private operation, for example, read an SMS message or make a call, if the Wi-Fi display connection to the large-screen terminal is not disconnected, user privacy displayed on the mobile phone is also projected onto the display of the large-screen terminal, and consequently a security risk of user privacy disclosure is undoubtedly increased. <CIT> discloses Method, apparatus and system for interactive class support and education management. The system includes a system for interactive class support and education management, the system comprising:a first device configured to create a course, to upload materials used for the course to a server, to set students to participate in the course, to configure a student group in a class, and to manage information of the students and education of the students; and a second device configured to submit an assignment result and a test by using materials created by the first device, wherein the first device performs correction guidance for the assignment and test submitted by the first device and stores teacher-correction-guided content in the server, and the second device receives the correction guidance from the first device. <CIT> discloses Systems, methods, and media for presenting media content are provided. The system comprising: a hardware processor that is programmed to: establish a connection with a media playback device; respond to a discovery request from a computing device presenting a media content item; establish a persistent communication channel with the computing device over a network in response to a request from the computing device to establish the persistent communication channel; receive identifying information of the media content item being presented by the computing device and identifying information of a source of the media content item being presented by the computing device; request the media content item from the identified source of the media content item as a stream of media content; and cause the media content item to be presented using the media playback device. <CIT>discloses a remote control method and system of a terminal device. The remote control system comprises a screen locking unit, a password verification unit and an unlocking unit. The remote control method comprises step <NUM>, sending a screen locking instruction to a target terminal through a control terminal to achieve screen locking of the target terminal; step <NUM>, verifying an input password when the target terminal receives the password input; step <NUM>, sending an unlocking request to the control terminal through the target terminal when the password verification is passed and achieving the unlocking after a confirmation instruction which is returned from the control terminal is received.

Embodiments of this application provide a screen locking method and apparatus, so that when a terminal performs display on a multi-screen, a security risk of user privacy disclosure can be reduced.

To achieve the foregoing objective, the embodiments of this application use the following technical solutions:.

According to a first aspect, an embodiment of this application provides a screen locking method, including: after a first terminal establishes a connection to a second terminal, sending, by the first terminal, to-be-displayed data to the second terminal, so that the second terminal displays a first interface, and in this case, the first terminal displays a second interface different from the first interface; then, obtaining, by the first terminal, a first screen locking operation triggered by a user, where the first screen locking operation is used to instruct to lock a screen of the second terminal; and sending, by the first terminal, a screen locking instruction to the second terminal in response to the first screen locking operation, so that the second terminal enters a screen-locked state. In this way, when the first terminal is in a screen-unlocked state, performing the first screen locking operation on the first terminal by the user may enable the second terminal to enter the screen-locked state, so as to prevent display content on the second terminal from being disclosed.

In a possible design method, the sent screen locking instruction includes screen-locked interface data, and the screen-locked interface data is used to instruct the second terminal to display a screen-locked interface corresponding to the screen-locked interface data.

In a possible design method, a screen-locked interface displayed after the second terminal enters the screen-locked state is the same as the first interface. Therefore, after the screen of the second terminal is subsequently unlocked, the second terminal may continue to display an interface displayed before screen locking, so as to implement a seamless display interface connection on the second terminal.

In a possible design method, a screen locking button is disposed on the second interface; and the obtaining, by the first terminal, a first screen locking operation triggered by a user includes: obtaining, by the first terminal, the first screen locking operation performed by the user on the screen locking button.

In a possible design method, after the second terminal enters the screen-locked state, the method further includes: displaying, by the first terminal, an icon of a screen unlocking button, where the icon of the screen unlocking button and an icon of the screen locking button are at a same location.

In a possible design method, before the first terminal establishes the connection to the second terminal, the method further includes: displaying, by the first terminal, an icon of a connection button for connecting to the second terminal, where the icon of the connection button and the icon of the screen locking button are at a same location.

In a possible design method, the method further includes: obtaining, by the first terminal, a second screen locking operation triggered by the user, where the second screen locking operation is used to instruct to lock a screen of the first terminal; sending, by the first terminal, the screen locking instruction to the second terminal in response to the second screen locking operation, so that the second terminal enters the screen-locked state; and displaying, by the first terminal, a screen-locked interface in response to the second screen locking operation, so that the first terminal enters a screen-locked state. In other words, when the screen of the first terminal is locked, the second terminal is triggered to enter the screen-locked state, so as to ensure that the second terminal that shares the screen with the first terminal does not disclose user-related information when the screen of the first terminal is locked.

In a possible design method, the screen locking method further includes: when the first terminal enters a screen-locked state, obtaining, by the first terminal, a current screen state of the second terminal; and if the second terminal is in a state in which the screen is not locked, still keeping, by the first terminal, in the screen-off state for power saving. However, in this case, the first terminal does not enter the screen-locked state, so as to avoid a problem that normal running of the second terminal is interfered with when a screen locking operation on the second terminal is also triggered after the screen of the first terminal is locked.

In a possible design method, the screen locking method further includes: receiving, by the first terminal, a timing screen locking time entered by the user, where the timing screen locking time is used to indicate a time at which the second terminal enters the screen-locked state; and when the timing screen locking time arrives, sending, by the first terminal, the screen locking instruction to the second terminal, so that the second terminal enters the screen-locked state, thereby implementing a timing screen locking function on the second terminal.

According to a second aspect, an embodiment of this application provides a screen locking method, including: presenting, by a first terminal, a first interface, where the first interface is an interface presented when a first application is run; after the first terminal establishes a connection to a second terminal, sending, by the first terminal, to-be-displayed data to the second terminal, so that the second terminal displays a second interface; and if the first terminal presents a third interface, sending, by the first terminal, a screen locking instruction to the second terminal, so that the second terminal enters a screen-locked state, where the third interface includes an interface element associated with a second application, and the second application is different from the first application. In this way, the first terminal may automatically initiate the screen locking instruction to the second terminal in an application scenario that relates to user privacy, and therefore the second terminal may enter the screen-locked state without requiring a user to manually trigger a screen locking process for the second terminal, thereby improving intelligent human-computer interaction.

In a possible design method, a screen-locked interface displayed after the second terminal enters the screen-locked state is the same as the second interface.

In a possible design method, the third interface displays a notification message of the second application. After the sending, by the first terminal, a screen locking instruction to the second terminal, the method further includes: when the first terminal stops displaying the notification message of the second application, sending, by the first terminal, a screen unlocking instruction to the second terminal, so that the second terminal enters a screen-unlocked state.

In a possible design method, the third interface is an interface presented when the second application is run. After the sending, by the first terminal, a screen locking instruction to the second terminal, the method further includes: when the second application is not run in the foreground of the first terminal, sending, by the first terminal, a screen unlocking instruction to the second terminal, so that the second terminal enters a screen-unlocked state.

In other words, the first terminal may automatically recover the screen-unlocked state of the second terminal in an application scenario that does not relate to user privacy, and therefore the second terminal may enter the screen-unlocked state without requiring the user to manually trigger a screen unlocking process for the second terminal, thereby improving intelligent human-computer interaction.

According to a third aspect, an embodiment of this application provides a screen unlocking method, including: establishing, by a first terminal, a connection to a second terminal; receiving, by the first terminal, an unlocking request sent by the second terminal, where the unlocking request is used to request the first terminal to terminate a screen-locked state of the second terminal; and sending, by the first terminal, a screen unlocking instruction to the second terminal in response to the unlocking request, so that the second terminal enters a screen-unlocked state.

In a possible design method, the sending, by the first terminal, a screen unlocking instruction to the second terminal in response to the unlocking request includes: in response to the unlocking request, prompting, by the first terminal, a user whether to unlock a screen of the second terminal; and when it is detected that the user unlocks the screen of the second terminal, sending, by the first terminal, the screen unlocking instruction to the second terminal.

In a possible design method, the sending, by the first terminal, a screen unlocking instruction to the second terminal in response to the unlocking request includes: in response to the unlocking request, determining, by the first terminal, whether display content including user privacy is displayed; and when the display content including user privacy is not displayed, sending, by the first terminal, the screen unlocking instruction to the second terminal.

It can be learned that in this embodiment of this application, independent screen locking windows are respectively disposed on a screen of the first terminal and the screen of the second terminal. Therefore, when the screen of the second terminal needs to be locked, the first terminal may control the second terminal to load the screen locking window of the second terminal, or the second terminal itself may load the screen locking window of the second terminal, so as to reduce a risk of user privacy disclosure caused by projecting user privacy displayed on the first terminal onto the second terminal. When the screen of the second terminal needs to be unlocked, the first terminal grants screen unlocking permission to the second terminal to control the second terminal to remove the loaded screen locking window, so as to avoid a risk of user privacy disclosure occurring after the screen of the second terminal is unlocked.

In a possible design method, after the establishing, by a first terminal, a connection to a second terminal, the method further includes: sending, by the first terminal, a screen locking instruction to the second terminal, so that the second terminal enters a screen-locked state.

According to a fourth aspect, an embodiment of this application provides a terminal, including a display, a processor, a transceiver, a communications interface, and an input device that are connected by using a bus, where the communications interface is configured to establish a connection between the terminal and another terminal; the transceiver is configured to send to-be-displayed data to the another terminal, so that the another terminal displays a first interface, where the display of the terminal displays a second interface, and the first interface is different from the second interface; the input device is configured to obtain a first screen locking operation triggered by a user, where the first screen locking operation is used to instruct to lock a screen of the another terminal; and the transceiver is further configured to send a screen locking instruction to the another terminal in response to the first screen locking operation, so that the another terminal enters a screen-locked state.

In a possible design method, the sent screen locking instruction includes screen-locked interface data, and the screen-locked interface data is used to instruct the another terminal to display a screen-locked interface corresponding to the screen-locked interface data.

In a possible design method, a screen-locked interface displayed after the another terminal enters the screen-locked state is the same as the first interface.

In a possible design method, a screen locking button is disposed on the second interface; and the input device is specifically configured to obtain the first screen locking operation performed by the user on the screen locking button.

In a possible design method, the display is further configured to display an icon of a screen unlocking button, where the icon of the screen unlocking button and an icon of the screen locking button are at a same location.

In a possible design method, the display is further configured to display an icon of a connection button for connecting to the another terminal, where the icon of the connection button and the icon of the screen locking button are at a same location.

In a possible design method, the input device is further configured to obtain a second screen locking operation triggered by the user, where the second screen locking operation is used to instruct to lock a screen of the terminal; the transceiver is further configured to send the screen locking instruction to the another terminal in response to the second screen locking operation, so that the another terminal enters the screen-locked state; and the display is further configured to display a screen-locked interface in response to the second screen locking operation, so that the terminal enters a screen-locked state.

In a possible design method, the transceiver is further configured to: when the first terminal enters a screen-locked state, obtain a current screen state of the second terminal; and the display is further configured to: if the second terminal is in a state in which the screen is not locked, keep in the screen-off state.

In a possible design method, the input device is further configured to receive a timing screen locking time entered by the user, where the timing screen locking time is used to indicate a time at which the second terminal enters the screen-locked state; and the transceiver is further configured to: when the timing screen locking time arrives, send the screen locking instruction to the second terminal, so that the second terminal enters the screen-locked state.

According to a fifth aspect, an embodiment of this application provides a terminal, including a display, a processor, a transceiver, and a communications interface that are connected by using a bus, where the communications interface is configured to establish a connection between the terminal and another terminal; the display is configured to present a first interface, where the first interface is an interface presented when the first application is run; and the transceiver is configured to: send to-be-displayed data to the another terminal, so that the another terminal displays a second interface; and if the display presents a third interface, send a screen locking instruction to the another terminal, so that the another terminal enters a screen-locked state, where the third interface includes an interface element associated with a second application, and the second application is different from the first application.

In a possible design method, a screen-locked interface displayed after the another terminal enters the screen-locked state is the same as the second interface.

In a possible design method, the third interface displays a notification message of the second application; and the transceiver is further configured to: when the display stops displaying the notification message of the second application, send a screen unlocking instruction to the another terminal, so that the another terminal enters a screen-unlocked state.

In a possible design method, the third interface is an interface presented when the second application is run; and the transceiver is further configured to: when the second application is not run in the foreground of the terminal, send a screen unlocking instruction to the another terminal, so that the another terminal enters a screen-unlocked state.

According to a sixth aspect, an embodiment of this application provides a terminal, including a transceiver and a communications interface, where the communications interface is configured to establish a connection between the terminal and another terminal; and the transceiver is configured to: receive an unlocking request sent by the another terminal, where the unlocking request is used to request the terminal to terminate a screen-locked state of the another terminal; and send a screen unlocking instruction to the another terminal in response to the unlocking request, so that the another terminal enters a screen-unlocked state.

In a possible design method, the terminal further includes a display; the display is configured to prompt a user whether to unlock a screen of the another terminal; and the transceiver is specifically configured to: when it is detected that the user unlocks the screen of the another terminal, send the screen unlocking instruction to the another terminal.

In a possible design method, the processor is configured to determine whether display content including user privacy is displayed; and the transceiver is specifically configured to: when the display content including user privacy is not displayed, send the screen unlocking instruction to the another terminal.

In a possible design method, the transceiver is further configured to send a screen locking instruction to the another terminal, so that the another terminal enters a screen-locked state.

According to a seventh aspect, an embodiment of this application provides a terminal, including: a communications unit, configured to: establish a connection to another terminal; and send to-be-displayed data to the another terminal, so that the another terminal displays a first interface, where the terminal displays a second interface, and the first interface is different from the second interface; an obtaining unit, configured to obtain a first screen locking operation triggered by a user, where the first screen locking operation is used to instruct to lock a screen of the another terminal; and a locking unit, configured to send a screen locking instruction to the another terminal in response to the first screen locking operation, so that the another terminal enters a screen-locked state.

In a possible design method, a screen locking button is disposed on the second interface; and the obtaining unit is specifically configured to obtain the first screen locking operation performed by the user on the screen locking button.

In a possible design method, the terminal further includes a display unit, configured to display an icon of a screen unlocking button, where the icon of the screen unlocking button and an icon of the screen locking button are at a same location.

In a possible design method, the display unit is further configured to display an icon of a connection button for connecting to the another terminal, where the icon of the connection button and the icon of the screen locking button are at a same location.

In a possible design method, the obtaining unit is configured to obtain a second screen locking operation triggered by the user, where the second screen locking operation is used to instruct to lock a screen of the terminal; and the locking unit is further configured to: send the screen locking instruction to the another terminal in response to the second screen locking operation, so that the another terminal enters the screen-locked state; and display a screen-locked interface in response to the second screen locking operation, so that the terminal enters a screen-locked state.

According to an eighth aspect, an embodiment of this application provides a terminal, including a display unit, configured to present a first interface, where the first interface is an interface presented when a first application is run; a communications unit, configured to: establish a connection to another terminal; and send to-be-displayed data to the another terminal, so that the another terminal displays a second interface; and a locking unit, configured to: if the terminal presents a third interface, send a screen locking instruction to the another terminal, so that the another terminal enters a screen-locked state, where the third interface includes an interface element associated with a second application, and the second application is different from the first application.

In a possible design method, the third interface displays a notification message of the second application. The terminal further includes an unlocking unit, configured to: when the terminal stops displaying the notification message of the second application, send a screen unlocking instruction to the another terminal, so that the another terminal enters a screen-unlocked state.

In a possible design method, the third interface is an interface presented when the second application is run. The terminal further includes an unlocking unit, configured to: when the second application is not run in the foreground of the terminal, send a screen unlocking instruction to the another terminal, so that the another terminal enters a screen-unlocked state.

According to a ninth aspect, an embodiment of this application provides a terminal, including a communications unit, configured to: establish a connection to another terminal; and receive an unlocking request sent by the another terminal, where the unlocking request is used to request the terminal to terminate a screen-locked state of the another terminal; and an unlocking unit, configured to send a screen unlocking instruction to the another terminal in response to the unlock request, so that the another terminal enters a screen-unlocked state.

In a possible design method, the unlocking unit is specifically configured to: in response to the unlocking request, prompt a user whether to unlock a screen of the another terminal; and when it is detected that the user unlocks the screen of the another terminal, send the screen unlocking instruction to the another terminal.

In a possible design method, the unlocking unit is specifically configured to: in response to the unlocking request, determine whether display content including user privacy is displayed; and when the display content including user privacy is not displayed, send the screen unlocking instruction to the another terminal.

In a possible design method, the terminal further includes a locking unit, configured to send a screen locking instruction to the another terminal, so that the another terminal enters a screen-locked state.

According to a tenth aspect, an embodiment of this application provides a terminal, including a processor, a memory, a bus, and a communications interface. The memory is configured to store a computer execution instruction, and the processor is connected to the memory by using the bus. When the terminal runs, the processor executes the computer execution instruction stored in the memory, so that the terminal performs any screen locking method or screen unlocking method described above.

According to an eleventh aspect, an embodiment of this application provides a computer readable storage medium. The computer readable storage medium stores an instruction, and when the instruction is run on any terminal described above, the terminal performs any screen locking method or screen unlocking method described above.

According to a twelfth aspect, an embodiment of this application provides a computer program product including an instruction, and when the computer program product is run on any terminal described above, the terminal performs any screen locking method or screen unlocking method described above.

In the embodiments of this application, a name of the terminal imposes no limitation on the device. In actual implementation, these devices may have other names, provided that functions of the devices are similar to those in the embodiments of this application, that is, fall within the scope of the claims of this application and their equivalent technologies.

The terms "first" and "second" mentioned below are merely intended for a purpose of description, and shall not be understood as an instruction or implication of relative importance or implicit instruction of the number of indicated technical features. Therefore, a feature limited by "first" or "second" may explicitly or implicitly include one or more features. In the descriptions of the embodiments of this application, "a plurality of" means two or more than two unless otherwise specified.

An embodiment of this application provides a screen locking method that may be applied to an application scenario in which a terminal performs display on a multi-screen, for example, a mobile office. For example, as shown in <FIG>, a first terminal <NUM> may be a mobile phone, and a second terminal <NUM> may be a desktop computer or an independent display. As shown in (a) in <FIG>, the first terminal <NUM> may establish a connection to the second terminal <NUM> through wireless communication (for example, through Wi-Fi). Alternatively, as shown in (b) in <FIG>, the first terminal <NUM> may establish a communication connection to the second terminal <NUM> through wired communication (for example, by using a data line). This is not limited in this embodiment of this application.

The first terminal <NUM> may be used as a controlling device to project display content of a display of the first terminal <NUM> onto a display of the second terminal <NUM>, so as to implement screen sharing between the first terminal <NUM> and the second terminal <NUM>. Alternatively, the first terminal <NUM> may project other display content (namely, display content different from display content on a display of the first terminal <NUM>) onto a display of the second terminal <NUM>, so that the first terminal <NUM> can separately display different display content on the display of the first terminal <NUM> and the display of the second terminal <NUM>.

In this embodiment of this application, to reduce a security risk of user privacy disclosure occurring when the second terminal <NUM> displays the display content of the first terminal <NUM>, independent screen locking windows may be disposed on the first terminal <NUM> and the second terminal <NUM>. In this way, when a user privacy-related application is run or displayed on the second terminal <NUM>, the independent screen locking window may be loaded on the second terminal <NUM>, so as to prevent user privacy on the first terminal <NUM> from being projected onto the display of the second terminal <NUM>, thereby reducing the security risk of user privacy disclosure.

The first terminal <NUM> and the second terminal <NUM> each may be specifically any terminal such as a mobile phone, a wearable device, an AR (augmented reality) device/VR (virtual reality) device, a tablet computer, a notebook computer, a UMPC (ultra-mobile personal computer), a netbook, or a PDA (personal digital assistant). This is not limited in this embodiment of this application.

As shown in <FIG>, the first terminal (or the second terminal) in this embodiment of this application may be a mobile phone <NUM>. The embodiment is described in detail below by using the mobile phone <NUM> as an example. It should be understood that the mobile phone <NUM> shown in the figure is merely an example of a terminal, and the mobile phone <NUM> may have more or fewer components than those shown in the figure, or combine two or more components, or have different component configurations.

As shown in <FIG>, the mobile phone <NUM> may specifically include components such as a processor <NUM>, a radio frequency (RF) circuit <NUM>, a memory <NUM>, a touchscreen <NUM>, a Bluetooth apparatus <NUM>, one or more sensors <NUM>, a Wi-Fi apparatus <NUM>, a positioning apparatus <NUM>, an audio frequency circuit <NUM>, a peripheral interface <NUM>, and a power system <NUM>. These components may communicate with each other by using one or more communications buses or signal cables (which are not shown in <FIG>). A person skilled in the art may understand that a hardware structure shown in <FIG> does not constitute a limitation on the mobile phone, and the mobile phone <NUM> may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

The following specifically describes the components of the mobile phone <NUM> with reference to <FIG>.

The processor <NUM> is a control center of the mobile phone <NUM>, connects all parts of the mobile phone <NUM> by using various interfaces and lines, and performs various functions of the mobile phone <NUM> and data processing by running or executing an application (which may be referred to as APP for short hereinafter) stored in the memory <NUM> and by invoking data stored in the memory <NUM>. In some embodiments, the processor <NUM> may include one or more processing units. For example, the processor <NUM> may be a chip Kirin <NUM> manufactured by Huawei Technologies Co.

The radio frequency circuit <NUM> may be configured to receive and send a wireless signal in an information receiving and sending process or in a call process. Particularly, after receiving downlink data from a base station, the radio frequency circuit <NUM> may send the downlink data to the processor <NUM> for processing. In addition, the radio frequency circuit <NUM> sends related uplink data to the base station. The radio frequency circuit usually includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, and a duplexer. In addition, the radio frequency circuit <NUM> may further communicate with another device through wireless communication. The wireless communication may use any communications standard or protocol, including but not limited to a Global System for Mobile Communications, a general packet radio service, Code Division Multiple Access, Wideband Code Division Multiple Access, Long Term Evolution, an email, and an SMS message service.

The memory <NUM> is configured to store an application and data. The processor <NUM> performs various functions of the mobile phone <NUM> and data processing by running the application and the data stored in the memory <NUM>. The memory <NUM> mainly includes a program storage area and a data storage area. The program storage area may store an operating system, and an application required by at least one function (for example, a sound playing function or an image playing function). The data storage area may store data (for example, audio data or a phone book) created when the mobile phone <NUM> is used. In addition, the memory <NUM> may include a high-speed random access memory, or may include a nonvolatile memory such as a magnetic disk storage device, a flash memory, or another volatile solid-state storage device. The memory <NUM> may store various operating systems such as an iOS operating system developed by Apple Inc. and an Android operating system developed by Google Inc.

The touchscreen <NUM> may include a touchpad <NUM>-<NUM> and a display <NUM>-<NUM>. The touchpad <NUM>-<NUM> may collect a touch event (for example, an operation performed by a user on or near the touchpad <NUM>-<NUM> by using any proper object such as a finger or a stylus) performed by the user of the mobile phone <NUM> on or near the touchpad <NUM>-<NUM>, and send collected touch information to another component such as the processor <NUM>. Although the touchpad <NUM>-<NUM> and the display <NUM>-<NUM> in <FIG> are used as two independent components to implement input and output functions of the mobile phone <NUM>, in some embodiments, the touchpad <NUM>-<NUM> and the display <NUM>-<NUM> may be integrated to implement the input and output functions of the mobile phone <NUM>. It can be understood that the touchscreen <NUM> is obtained by stacking a plurality of layers of materials. In this embodiment of this application, only the touchpad (layer) and the display (layer) are displayed, and another layer is not recorded in this embodiment of this application. In addition, in some other embodiments of this application, the touchpad <NUM>-<NUM> may cover the display <NUM>-<NUM>, and a size of the touchpad <NUM>-<NUM> is greater than a size of the display <NUM>-<NUM>, so that the display <NUM>-<NUM> is completely covered by the touchpad <NUM>-<NUM>. Alternatively, the touchpad <NUM>-<NUM> may be disposed on a front facet of the mobile phone <NUM> in a full panel manner, in other words, all touches performed by the user on the front facet of the mobile phone <NUM> can be perceived by the mobile phone, so that all-touch experience can be implemented on the front facet of the mobile phone. In some other embodiments, the touchpad <NUM>-<NUM> is disposed on a front facet of the mobile phone <NUM> in a full panel manner, and the display <NUM>-<NUM> may also be disposed on the front facet of the mobile phone <NUM> in a full panel manner, so that a frameless structure of the front facet of the mobile phone can be implemented.

In this embodiment of this application, the mobile phone <NUM> may further have a fingerprint recognition function. For example, a fingerprint sensor <NUM> may be disposed on a back facet of the mobile phone <NUM> (for example, below a rear-facing camera), or may be disposed on a front facet of the mobile phone <NUM> (for example, below the touchscreen <NUM>). For another example, a fingerprint collection device <NUM> may be disposed on the touchscreen <NUM> to implement the fingerprint recognition function. In other words, the fingerprint collection device <NUM> and the touchscreen <NUM> may be integrated to implement the fingerprint recognition function of the mobile phone <NUM>. In this case, the fingerprint collection device <NUM> may be disposed on the touchscreen <NUM> to serve as a part of the touchscreen <NUM>, or may be disposed on the touchscreen <NUM> in another manner. In this embodiment of this application, a main component of the fingerprint collection device <NUM> is the fingerprint sensor, and the fingerprint sensor may use any sensing technology that includes but is not limited to an optical sensing technology, a capacitive sensing technology, a piezoelectric sensing technology, and an ultrasonic sensing technology.

In this embodiment of this application, the mobile phone <NUM> may further include the Bluetooth apparatus <NUM>, configured to implement data exchange between the mobile phone <NUM> and another short-distance terminal (for example, a mobile phone or a smartwatch). The Bluetooth apparatus in this embodiment of this application may be an integrated circuit, a Bluetooth chip, or the like.

The Wi-Fi apparatus <NUM> is configured to provide the mobile phone <NUM> with network access that complies with a Wi-Fi-related standard protocol, and the mobile phone <NUM> may access a Wi-Fi access point by using the Wi-Fi apparatus <NUM>, so as to help the user to receive and send an email, browse a web page, access streaming media, and the like, thereby providing the user with wireless broadband Internet access. In some other embodiments, the Wi-Fi apparatus <NUM> may be used as a Wi-Fi wireless access point, and may provide another terminal with Wi-Fi network access.

The mobile phone <NUM> may further include the at least one sensor <NUM> such as an optical sensor, a motion sensor, and another sensor. Specifically, the optical sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor may adjust luminance of the display of the touchscreen <NUM> based on ambient light luminance. The proximity sensor may power off the display when the mobile phone <NUM> approaches to ears. As one of motion sensors, an accelerometer sensor may detect a value of an acceleration in each direction (usually, in three axes), may detect a value and a direction of gravity when the sensor is stationary, and may be used in a posture identification application of the mobile phone (for example, screen switching between a landscape mode and a portrait mode, a related game, and magnetometer posture calibration), a function related to vibration identification (such as a pedometer or a knock), and the like. Other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor may be further disposed on the mobile phone <NUM>.

The positioning apparatus <NUM> is configured to provide the mobile phone <NUM> with a geographical location. It can be understood that the positioning apparatus <NUM> may be specifically a receiver of a positioning system such as a global positioning system (GPS), a BeiDou Navigation Satellite System, or a GLONASS. After receiving the geographical location sent by the positioning system, the positioning apparatus <NUM> sends the information to the processor <NUM> for processing, or sends the information to the memory <NUM> for storage. In some other embodiments, the positioning apparatus <NUM> may be a receiver of an assisted global positioning system (AGPS), and the AGPS system is used as an auxiliary server to assist the positioning apparatus <NUM> in completing ranging and positioning services. In this case, the auxiliary positioning server communicates with a terminal such as the positioning apparatus <NUM> of the mobile phone <NUM> (namely, the GPS receiver) by using a wireless communications network, to provide positioning assistance. In some other embodiments, the positioning apparatus <NUM> may be a positioning technology based on the Wi-Fi access point. Each Wi-Fi access point has a globally unique MAC address, and the terminal can scan and collect a broadcast signal of a surrounding Wi-Fi access point when Wi-Fi is enabled. Therefore, the terminal can obtain the MAC address that is broadcast by the Wi-Fi access point. The terminal sends data (for example, the MAC address) that can identify the Wi-Fi access point to a location server through the wireless communications network. The location server retrieves a geographical location of each Wi-Fi access point, calculates a geographical location of the terminal with reference to strength of the Wi-Fi broadcast signal, and sends the geographical location to the positioning apparatus <NUM> of the terminal.

The audio frequency circuit <NUM>, a loudspeaker <NUM>, and a microphone <NUM> may provide an audio interface between the user and the mobile phone <NUM>. The audio frequency circuit <NUM> may convert received audio data into an electrical signal and transmit the electrical signal to the loudspeaker <NUM>, and the loudspeaker <NUM> converts the electrical signal into a sound signal and outputs the sound signal. In addition, the microphone <NUM> converts a collected sound signal into an electrical signal, and the audio frequency circuit <NUM> receives the electrical signal, converts the electrical signal into audio data, and outputs the audio data to the RF circuit <NUM> to send the audio data to, for example, another mobile phone, or outputs the audio data to the memory <NUM> for further processing.

The communications interface <NUM> is configured to provide various interfaces for an external input/output device (such as a keyboard, a mouse, an external display, an external memory, or a subscriber identity module card). For example, the communications interface is connected to the mouse or the display by using a universal serial bus (USB) interface; by using a metal contact on a subscriber identity module card slot, is connected to the subscriber identity module (SIM) card provided by a telecommunications operator; and communicates with another terminal by using an interface of the Wi-Fi apparatus <NUM>, an interface of a near field communication (NFC) apparatus, an interface of a Bluetooth module, or the like. The communications interface <NUM> may be configured to couple the external input/output peripheral device to the processor <NUM> and the memory <NUM>.

In this embodiment of this application, the first terminal <NUM> may establish a connection to a display of the second terminal <NUM> by using the communications interface <NUM> of the first terminal <NUM>, so that the first terminal <NUM> and the second terminal <NUM> can communicate with each other.

The mobile phone <NUM> may further include the power supply apparatus <NUM> (such as a battery and a power management chip) that supplies power to each component, and the battery may be logically connected to the processor <NUM> by using the power management chip, so as to implement functions such as charging and discharging management and power consumption management by using the power supply apparatus <NUM>.

Although not shown in <FIG>, the mobile phone <NUM> may further include a camera (a front-facing camera and/or a rear-facing camera), a camera flash, a micro projection apparatus, the near field communication (NFC) apparatus, and the like.

The following describes in detail a screen locking method according to an embodiment of this application with reference to a specific embodiment.

A first terminal establishes a connection to a second terminal.

The first terminal may establish the connection to the second terminal through communication such as Bluetooth, Wi-Fi, or ZigBee, so that the first terminal and the second terminal can communicate with each other. A specific connection establishment manner is not limited in this embodiment of this application.

In this embodiment of this application, after the first terminal <NUM> establishes the connection to the second terminal <NUM>, the first terminal <NUM> may project display content of the first terminal <NUM> onto a display of the second terminal <NUM> by using a single-source display method or a multi-source display method.

Single-source display indicates that signal sources of display interfaces of different displays such as a display of the first terminal <NUM> and the display of the second terminal <NUM> are the same, and multi-source display indicates that a signal source of a display interface of the display of the first terminal <NUM> and a signal source of a display interface of the display of the second terminal <NUM> are independent.

As shown in <FIG> and <FIG>, when the first terminal projects an application installed on the first terminal onto the display of the second terminal through single-source display, the first terminal <NUM> stores generated to-be-displayed display content in a screen container of a memory before the first terminal <NUM> establishes the connection to the second terminal <NUM>. In this way, the display of the first terminal <NUM> may display a related image by reading the display content in the screen container. Still as shown in <FIG> and <FIG>, after the first terminal <NUM> establishes the connection to the second terminal <NUM>, the display of the second terminal <NUM> may also display, by reading the display content in the screen container, display content that is the same as that of the first terminal <NUM>, so as to implement synchronous display between the first terminal <NUM> and the second terminal <NUM>.

As shown in <FIG> and <FIG>, when the first terminal <NUM> projects an application installed on the first terminal onto the display of the second terminal <NUM> through multi-source display, the first terminal <NUM> stores generated to-be-displayed display content <NUM> in a screen container <NUM> of a memory before the first terminal <NUM> establishes the connection to the second terminal <NUM>. In this way, the display of the first terminal <NUM> may display a related image by reading the display content <NUM> in the screen container <NUM>.

After the first terminal <NUM> establishes the connection to the second terminal <NUM>, the first terminal <NUM> may identify related specification information of the display of the second terminal <NUM> connected to the first terminal, for example, resolution and dots per inch (Dots Per Inch, DPI) of the display of the second terminal <NUM>. In this case, the first terminal <NUM> may establish an independent screen container, namely, a screen container <NUM> in <FIG> and <FIG> for the second terminal <NUM> in the memory of the first terminal based on the specification information of the display of the second terminal <NUM>. Different display identifiers (Display ID) may be used to distinguish between the screen container <NUM> and the screen container <NUM>.

Still as shown in <FIG> and <FIG>, after the first terminal <NUM> establishes the connection to the second terminal <NUM>, the first terminal <NUM> may initialize the display of the second terminal <NUM>, convert information such as an application icon of the first terminal <NUM> into desktop display content such as an application icon, an icon layout, or a status bar that matches the specification information of the second terminal <NUM> to store the desktop display content in the screen container <NUM>, and send the display content in the screen container <NUM> to the display of the second terminal <NUM>. In this way, the display of the second terminal <NUM> may independently project all applications installed on the first terminal <NUM> onto the display of the second terminal <NUM> by reading the desktop display content stored in the screen container <NUM>, so as to complete an initialization process of the display of the second terminal <NUM>. Then, the first terminal <NUM> and the second terminal <NUM> may independently run two display interfaces in a same operating system by reading display content in respective screen containers.

Certainly, in a multi-source projection system shown in <FIG> and <FIG>, the display content in the screen container <NUM> may be the same as the display content in the screen container <NUM> (for example, both the display content in the screen container <NUM> and the display content in the screen container <NUM> are video pictures that are being played). Alternatively, the first terminal <NUM> may convert the display content in the screen container <NUM> into display content that matches the specification information of the second terminal <NUM>, to store the display content in the screen container <NUM> (for example, adjust a resolution value of a picture A in the screen container <NUM> to a resolution value that matches the display of the second terminal <NUM>, and store the converted picture A in the screen container <NUM>). In this way, based on the foregoing multi-source display principle, the display content in the display of the first terminal <NUM> may be also synchronously displayed in the display of the second terminal <NUM>.

It should be noted that the foregoing screen container may be specifically an application stack established when a terminal (for example, the first terminal) runs an application. Usually, content of a stack top of the application stack is content that is being run and displayed on the terminal. For example, when an application A is run, a plurality of tasks (task) are generated in an application stack of the application A, and the terminal starts to execute each task from a stack top, and outputs an execution result of each task to a display of the terminal for display.

In addition, when the second terminal <NUM> displays the display content in the screen container <NUM> on a second display interface, the first terminal <NUM> may adjust the display content in the screen container <NUM> and a display layout of the display content on the second display interface based on a parameter such as screen resolution of the second terminal <NUM> or an operation habit of a user to use the second terminal <NUM>, for example, may adjust a size, a location, and an icon of the display content. This is not limited in this embodiment of this application.

The second terminal obtains a screen locking operation triggered by a user on the second terminal.

After the first terminal establishes the connection to the second terminal, the first terminal may project the display content of the display of the first terminal onto the display of the second terminal based on the single-source display principle shown in <FIG> and <FIG>. Alternatively, the first terminal may project the display content of the screen container <NUM> onto the display of the second terminal based on the multi-source display principle shown in <FIG> and <FIG>. Therefore, if the user needs to lock a screen of the second terminal, for example, when the user needs to temporarily leave the second terminal and does not want other people to read the display content on the second terminal, the user may trigger the screen locking operation on the second terminal.

For example, as shown in <FIG>, the second terminal <NUM> is a desktop computer. When the second terminal <NUM> is in a screen-locked state, a screen locking button <NUM> may be disposed on a display interface of the second terminal <NUM>, and the screen locking button <NUM> is for triggering locking of the screen of the second terminal. Therefore, if it is detected that the user taps the screen locking button <NUM> by using a mouse, the second terminal <NUM> obtains the screen locking operation triggered by the user on the second terminal <NUM>.

The screen locking button <NUM> may be also disposed on a status bar or another location of the second terminal <NUM>. This is not limited in this embodiment of this application.

Alternatively, when the display of the second terminal <NUM> has a touch function, the screen locking operation may also be a gesture such as tapping, sliding, or floating touch.

In response to the screen locking operation, the second terminal loads a screen locking window that covers a current display window, so that the second terminal enters a screen-locked state.

In this embodiment of this application, independent screen locking windows are disposed on the first terminal <NUM> and the second terminal <NUM>. Therefore, after obtaining the screen locking operation, the second terminal <NUM> may load a screen locking window on the current display window of the second terminal <NUM>, and the screen locking window covers a currently running application. In this case, the second terminal <NUM> presents a screen-locked interface.

A priority of the screen locking window is higher than a priority of any application of the second terminal <NUM>. To be specific, the loaded screen locking window covers an application window that is being displayed, and a new application window may be shielded by the screen locking window when being started on the second terminal <NUM>, unless the user performs unlocking to remove the screen locking window.

In this way, when the first terminal <NUM> is in a screen-unlocked state, triggering the screen locking operation on the second terminal <NUM> by the user may also enable the second terminal <NUM> to enter the screen-locked state. In this case, in a single-source display scenario shown in <FIG> and <FIG>, display content in an application running on the first terminal <NUM> is not projected onto the screen of the second terminal <NUM>, so as to avoid a case in which user privacy displayed on the first terminal <NUM> is disclosed after being projected onto the second terminal <NUM>. In a multi-source display scenario shown in <FIG> and <FIG>, the display content that is in the screen container <NUM> of the first terminal <NUM> and that is originally presented on the second terminal <NUM> is not disclosed.

For example, as shown in (a) in <FIG>, after entering the screen-locked state, the second terminal <NUM> may display a screen-unlocked interface. If entering a correct unlocking password, the user may unlock the screen of the second terminal <NUM>. Otherwise, the second terminal <NUM> cannot display the display content projected by the first terminal <NUM>. Alternatively, as shown in (b) in <FIG>, after the second terminal <NUM> enters the screen-locked state, a magazine screen locking function may be triggered, and different screen-locked patterns are displayed on the display of the second terminal <NUM>. Similarly, before the screen of the second terminal <NUM> is not locked, the second terminal <NUM> cannot display the display content projected by the first terminal <NUM>.

In another possible design method, an embodiment of this application provides a screen locking method.

For a method in which the first terminal establishes the connection to the second terminal, refer to the related description in step <NUM>.

After establishing the connection, the first terminal may send to-be-displayed display data in the foregoing screen container <NUM> to the second terminal, so that the second terminal presents a first interface in a display of the second terminal. In this case, the first terminal may present a second interface in a display of the first terminal by reading display content in the foregoing screen container <NUM>. The first interface may be different from the second interface. For example, an interface of an application WeChat is run on the display of the first terminal, and an interface of a video application is run on the display of the second terminal.

When the first terminal is in a screen-unlocked state, obtain a first screen locking operation triggered by a user on the first terminal.

The first terminal sends a screen locking instruction to the second terminal in response to the first screen locking operation, so that the second terminal enters a screen-locked state.

The first screen locking operation is used to instruct to lock a screen of the second terminal. For example, as shown in <FIG>, when the first terminal <NUM> is in a screen-unlocked state, a screen locking button <NUM> for locking the screen of the second terminal <NUM> may be disposed on a display interface of the first terminal <NUM>. In this case, the first screen locking operation may be specifically tapping the screen locking button <NUM>, double-tapping the screen locking button <NUM>, dragging the screen locking button <NUM> to a specified area, a floating touch gesture, or the like. This is not limited in this embodiment of this application.

Certainly, a correspondence between a screen locking instruction and a specified gesture such as a sliding operation may also be preset on the first terminal <NUM>. In this case, there is no need to dispose the screen locking button <NUM> on the display interface of the first terminal <NUM>. Once it is detected that the user performs the foregoing specified gesture on the first terminal <NUM>, the first terminal <NUM> sends the screen locking instruction to the second terminal <NUM>.

For example, as shown in <FIG>, the screen locking button <NUM> may be disposed on a desktop of the first terminal <NUM>. Alternatively, as shown in <FIG>, the screen locking button <NUM> may be disposed in a drop-down or pull-up list of the first terminal <NUM>. Alternatively, as shown in <FIG>, after the user taps a suspend button on the first terminal <NUM>, the screen locking button <NUM> may be disposed in a suspend list triggered by the suspend button. In addition, the user may customize a specific implementation of the first screen locking operation on a setting interface. This is not limited in this embodiment of this application.

In a possible design method, the display of the second terminal <NUM> has a function of loading a screen locking window. Therefore, after the second terminal <NUM> receives the screen locking instruction, the display of the second terminal <NUM> may load, on a display interface of the second terminal, a screen locking window that covers a current display window. In this case, the display of the second terminal <NUM> presents a screen-locked interface, and the second terminal <NUM> enters the screen-locked state.

In another possible design method, the screen locking instruction sent by the first terminal <NUM> carries screen-locked interface data. Therefore, after receiving the screen locking instruction, the second terminal <NUM> may load, on a display interface of the second terminal based on the screen-locked interface data carried in the screen locking instruction, a screen locking window that covers a current display window. In this case, the display of the second terminal <NUM> presents a screen-locked interface, and the second terminal <NUM> enters the screen-locked state.

For example, as shown in <FIG>, with reference to the multi-source display principle shown in <FIG> and <FIG>, the display of the first terminal <NUM> displays display content <NUM>, and the display of the second terminal <NUM> displays display content <NUM>. As shown in <FIG>, after the first terminal <NUM> detects the first screen locking operation, the first terminal <NUM> may be triggered to load a screen locking window in the screen container <NUM>, and the screen locking window covers the display content <NUM> that is being displayed in the screen container <NUM>. For example, when the screen container <NUM> is an application stack, the screen locking window may be loaded on a stack top of the application stack. In this way, as shown in <FIG>, the first terminal <NUM> first adds the screen locking window on the stack top to the screen locking instruction as the screen-locked interface data, and sends the screen-locked interface data to the second terminal <NUM>, so as to load the screen locking window that covers the current display interface on the display interface of the second terminal <NUM>.

A priority of the screen locking window is higher than a priority of any application of the second terminal <NUM>. To be specific, the loaded screen locking window covers an application window that is being displayed, and a new application window may be shielded by the screen locking window when being started on the second terminal <NUM>, unless the user performs unlocking to remove the screen locking window. In this case, as shown in <FIG>, the first terminal <NUM> is still in the screen-unlocked state, the user may still perform an operation on the first terminal <NUM>, and the display content such as user privacy displayed on the first terminal <NUM> is not projected onto the display of the second terminal <NUM>.

In another possible design method, before the first terminal establishes the connection to the second terminal, the first terminal may present a first interface (for example, an interface for reading a document A) when a first application is run. After the first terminal establishes the connection to the second terminal, the first terminal may send to-be-displayed display content in the screen container <NUM> to the second terminal, so that the second terminal presents a second interface. In this case, the second interface and the first interface may be the same or different. This is not limited in this embodiment of this application.

Then, when the first terminal jumps from the first interface to a third interface that includes an interface element associated with a second application, for example, when the first terminal jumps from the display interface of the document A to a chatting interface of the application WeChat (the second application) or when the first terminal receives a new SMS message (the second application) and displays a notification bar of the SMS message on the display interface of the document A, related content of the second application may be synchronously displayed on the display of the second terminal, and the content may include user privacy or content that the user does not want other people to read. Therefore, the first terminal may automatically send the screen locking instruction to the second terminal, so that the second terminal enters the screen-locked state.

In this way, the first terminal may automatically lock the screen of the second terminal in an application scenario that relates to user privacy, and therefore the second terminal may enter the screen-locked state without requiring the user to manually trigger a screen locking process for the second terminal, thereby improving intelligent human-computer interaction.

The foregoing third interface is a display interface on which the interface element associated with the second application (the second application is different from the first application) is presented. For example, the interface element may be specifically information such as a character, a picture, or a video that is displayed when the second application (for example, a document application) is run, or may be information such as a notification message, a character, a picture, or a video that is received by the second application (for example, an instant messaging application), or may be a program icon (for example, a caller ID display icon) when the second application is run. This is not limited in this embodiment of the present invention.

In a possible design method, the first terminal that originally runs the first application may switch to running the second application. In this case, the display interface of the first terminal jumps from the first interface to the third interface, and the third interface presents only the interface element of the second application. For example, the third interface is a caller ID display interface or a chatting interface of WeChat. Because the interface element of the second application that is presented on the third interface may be synchronously displayed on the display of the second terminal, and the content may include user privacy or content that the user does not want other people to read, the first terminal may automatically send the screen locking instruction to the second terminal, so that the second terminal enters the screen-locked state.

In another possible design method, when the first terminal jumps from the first interface on which the first application is run to the third interface, only a part of the third interface possibly presents the interface element of the second application. For example, the first terminal receives a notification message of an SMS message (the second application) while running the first application, and the notification message is overlaid on a running interface of the first application in a form of a message notification bar. Similarly, the notification message may be also synchronously displayed on the display of the second terminal, and the content may include user privacy or content that the user does not want other people to read. Therefore, the first terminal may automatically send the screen locking instruction to the second terminal, so that the second terminal enters the screen-locked state.

For example, as shown in <FIG>, after establishing the connection to the second terminal <NUM>, the first terminal <NUM> may project the document A that is being displayed onto the display of the second terminal <NUM> for synchronous display. Certainly, based on the multi-source display principle shown in <FIG> and <FIG>, the display of the second terminal <NUM> may also display another interface in addition to the document A. This is not limited in this embodiment of this application.

Further, as shown in <FIG>, the first terminal <NUM> may receive a new SMS message. Therefore, if the first terminal <NUM> detects that the display interface of the document A displays a notification message of the new SMS message (for example, a message notification bar of the new SMS message), a related interface element of the SMS message application may be synchronously displayed on the display of the second terminal <NUM>. Therefore, to avoid user privacy disclosure, the first terminal <NUM> may be triggered to automatically load the screen locking interface on the display interface of the second terminal <NUM>, so that the second terminal <NUM> enters the screen-locked state.

In this case, as shown in <FIG>, the second terminal <NUM> may use, as a screen-locked interface, an image of the document A that is being displayed, and the user may read a received new SMS message on the first terminal.

Then, when the user exits the SMS message application on the first terminal <NUM>, or when display of the notification message of the SMS message on the display interface of the first terminal is stopped, the first terminal may switch to the interface of the document A again. In this case, the first terminal <NUM> may be triggered to remove the screen locking window loaded on the second terminal <NUM>. In this way, a process of seamless display of the document A on the second terminal <NUM> is implemented while user privacy disclosure generated by using the second terminal <NUM> is avoided, thereby improving user experience when the user performs screen sharing.

For another example, as shown in <FIG>, after the first terminal <NUM> establishes the connection to the second terminal <NUM>, an SMS message application may be run on the display interface of the first terminal <NUM>, and the interface of the document A may be displayed on the display interface of the second terminal <NUM>. Further, as shown in <FIG>, when the first terminal <NUM> receives a new incoming call, the display interface of the first terminal automatically jumps to a caller ID display interface, and the caller ID display interface may include user privacy such as a name or a phone number. If the caller ID display interface is synchronously displayed on the display of the second terminal <NUM>, user privacy disclosure is caused. Therefore, when the first terminal displays the caller ID display interface, the first terminal <NUM> may be triggered to automatically load the screen locking window on the display interface of the second terminal <NUM>, so that the second terminal <NUM> enters the screen-locked state. After the first terminal exits the caller ID display interface, for example, as shown in <FIG>, when the first terminal switches back to the SMS message application and displays an interface of the SMS message application, the first terminal <NUM> may be triggered to automatically send a screen unlocking instruction to the second terminal <NUM> to remove the screen locking window loaded on the second terminal <NUM>, so that the second terminal <NUM> enters a screen-unlocked state.

In this way, in an application scenario that relates to user privacy, the first terminal may automatically lock the screen of the second terminal; in an application that does not relate to user privacy, the first terminal may automatically unlock the screen of the second terminal, so as to improve intelligent human-computer interaction while avoiding user privacy disclosure.

The second application may be manually set by the user on the first terminal, or may be automatically set by the first terminal based on application reading permission. For example, an application in which reading an SMS message or a photo of the user is allowed is set as the second application. This is not limited in this embodiment of this application.

In another possible design method, after the first terminal <NUM> establishes the connection to the second terminal <NUM>, if the first terminal <NUM> obtains a second screen locking operation triggered by the user and used to lock the screen of the first terminal, for example, pressing a power button, as shown in <FIG>, the first terminal <NUM> loads the screen locking window on the display interface of the first terminal, and the first terminal <NUM> is further triggered to send the screen locking instruction to the second terminal <NUM> to load the screen locking window on the display interface of the second terminal <NUM>, so that the second terminal <NUM> enters the screen-locked state. In other words, when the screen of the first terminal <NUM> is locked, the second terminal <NUM> is triggered to perform a screen locking operation, so as to ensure that the second terminal <NUM> that shares the screen with the first terminal <NUM> does not disclose information on the first terminal <NUM> when the first terminal <NUM> is in a screen-locked state.

For example, by using a mobile phone as the first terminal <NUM>, when the user does not operate the mobile phone for a long time, the mobile phone automatically enters a screen-off state, and in the screen-off state, backlight may be turned off and a screen may be off for the mobile phone for power saving. However, in this case, the screen of the mobile phone is not locked, and when the mobile phone subsequently receives a user operation, the mobile phone can be normally operated without a need of screen unlocking. When the mobile phone does not receive a user operation within a specific time period in which the mobile phone is in the screen-off state, the mobile phone may automatically enter a screen-locked state.

In this embodiment of this application, when the mobile phone enters the screen-off state, a current screen state of the second terminal <NUM> may be obtained. If the second terminal <NUM> does not enter the screen-locked state but normally runs, the mobile phone may continue to keep in the screen-off state for power saving. However, in this case, the mobile phone does not enter the screen-locked state, so as to avoid a problem that normal running of the second terminal <NUM> is interfered with when the second terminal <NUM> is triggered to perform a screen locking operation after the screen of the mobile phone is locked.

Certainly, if the mobile phone learns that the second terminal <NUM> has entered the screen-locked state, the mobile phone may continue to use an existing screen locking mechanism. If the mobile phone does not receive a user operation within a specific time period in which the mobile phone is in the screen-off state, the mobile phone automatically enters the screen-locked state.

In some other embodiments of this application, the user may further set a timing screen locking time for the second terminal <NUM> on the first terminal <NUM>. For example, as shown in <FIG>, the user may set, on the first terminal <NUM>, that a power-off time of the second terminal <NUM> is <NUM>:<NUM>. Therefore, when <NUM>:<NUM> arrives, the first terminal <NUM> may send the screen locking instruction to the second terminal <NUM>, so that the second terminal <NUM> enters the screen-locked state.

Alternatively, the user may further set a timing screen locking time for the second terminal <NUM> on the second terminal <NUM>. For example, as shown in <FIG>, the user may set, in a timing screen locking function of the second terminal <NUM>, that the screen of the second terminal <NUM> is locked after half an hour. Therefore, in response to a current setting operation of the user, the second terminal <NUM> may start a timer with duration of an hour and a half. When the timer expires, the second terminal <NUM> may be triggered to enter the screen-locked state.

Further, after the second terminal enters the screen-locked state, an embodiment of this application further provides a screen unlocking method.

When a first terminal is in a screen-unlocked state, the first terminal obtains a first screen unlocking operation triggered by a user on the first terminal.

The first screen unlocking operation is used to instruct to unlock a screen of a second terminal. As shown in <FIG>, when the second terminal <NUM> enters the screen-locked state, and the first terminal <NUM> is in the screen-unlocked state, a screen unlocking button <NUM> for unlocking the screen of the second terminal <NUM> may be disposed on a display interface of the first terminal <NUM>. In this case, the first screen unlocking operation may be specifically tapping the screen unlocking button <NUM>, double-tapping the screen unlocking button <NUM>, pressing the screen unlocking button <NUM>, dragging the screen unlocking button <NUM> to a specified area, a floating touch gesture, or the like. This is not limited in this embodiment of this application.

The first terminal sends a screen unlocking instruction to the second terminal in response to the first screen unlocking operation, so that the second terminal enters a screen-unlocked state.

Specifically, still as shown in <FIG>, after the first screen unlocking operation triggered on the first terminal <NUM> is detected, the first terminal <NUM> may remove a screen locking window loaded for the second terminal when the screen of the second terminal <NUM> is locked. In this case, as shown in <FIG>, an application window on the second terminal <NUM> that is originally covered by the screen locking window is displayed on a current display interface, and the second terminal <NUM> enters the screen-unlocked state.

For example, an example in <FIG> is still used for description. When obtaining the first screen unlocking operation triggered by the user on the first terminal <NUM>, the first terminal <NUM> may delete a screen locking window loaded in a screen container <NUM> when the screen of the second terminal <NUM> is locked. In this way, by reading display content in the screen container <NUM>, a display of the second terminal <NUM> may display, on the current display interface, the application window originally covered by the screen locking window.

Further, after deleting the screen locking window loaded in the screen container <NUM>, the first terminal <NUM> may further update the display content in the screen container <NUM>, for example, synchronize current display content in a screen container <NUM> to the screen container <NUM>. In this way, the display of the second terminal <NUM> may implement a process of synchronous display with the first terminal <NUM> by reading the display content in the screen container <NUM>.

Further, still as shown in <FIG>, after the second terminal <NUM> enters the screen-unlocked state, a screen locking button <NUM> for locking the screen of the second terminal <NUM> may be re-displayed on the display interface of the first terminal <NUM>. In this way, when the user needs to lock the screen of the second terminal <NUM> again, the second terminal <NUM> may enter the screen-locked state again by triggering the screen locking button <NUM> (namely, the first screen locking operation).

Alternatively, as shown in <FIG>, after the second terminal <NUM> enters the screen-locked state, if a screen-unlocked interface is displayed on the second terminal <NUM>, the user may further trigger, by entering identity authentication information such as a password or a fingerprint, the second terminal <NUM> to remove the screen locking window on the current display interface. The password entered by the user on the screen-unlocked interface of the second terminal <NUM> and an unlocking password of the first terminal <NUM> may be the same or different. This is not limited in this embodiment of this application.

Correspondingly, after the second terminal enters the screen-locked state, if the first terminal is also in a screen-locked state, the first terminal may obtain a second screen unlocking operation triggered by the user on the first terminal, and the second screen unlocking operation is used to instruct to unlock a screen of the first terminal.

In this case, in response to the second screen unlocking operation, the first terminal removes a screen locking window on a display interface of the first terminal, and there is no need to trigger the first terminal to remove the screen locking window on the current display interface of the second terminal. In this way, a problem that user privacy disclosure is caused by synchronously projecting information such as user privacy displayed on the first terminal onto the display of the second terminal after screen locking windows of the first terminal and the second terminal are simultaneously removed.

In another possible design method, after the second terminal enters the screen-locked state, an embodiment of this application further provides a screen unlocking method.

A second terminal obtains a screen unlocking operation triggered by a user, where the screen unlocking operation is used to instruct to unlock a screen of the second terminal.

For example, as shown in <FIG>, when the second terminal <NUM> is in a screen-locked state, a screen unlocking button <NUM> may be disposed on a display interface of the second terminal <NUM>, and the screen unlocking button <NUM> is for triggering unlocking of the screen of the second terminal <NUM>. Therefore, if it is detected that a user taps the screen unlocking button <NUM> by using a mouse or the like, the second terminal <NUM> obtains the screen unlocking operation triggered by the user.

The second terminal sends an unlocking request to a first terminal in response to the screen unlocking operation.

In response to the unlocking request, the first terminal determines whether the second terminal is allowed to unlock the screen.

If the second terminal is allowed to unlock the screen, the first terminal sends a screen unlocking instruction to the second terminal, so that the second terminal enters a screen-unlocked state.

Still as shown in <FIG>, after obtaining the screen unlocking operation triggered by the user on the second terminal <NUM>, the second terminal <NUM> does not immediately perform the screen unlocking operation, but sends the unlocking request to the first terminal <NUM>. The first terminal <NUM> determines whether to allow the second terminal <NUM> to unlock the screen of the second terminal <NUM>.

This is because if any user may trigger, by tapping the screen unlocking button <NUM> on the second terminal <NUM>, the second terminal <NUM> to unlock the screen of the second terminal <NUM>, it means that any user may unlock the screen of the second terminal <NUM>. Therefore, the unlocked second terminal <NUM> may still synchronously display information such as user privacy that is being displayed on the first terminal <NUM> and consequently user privacy disclosure is caused. Therefore, permission of the first terminal <NUM> that initiates screen sharing needs to be obtained when the screen of the second terminal <NUM> is unlocked. As shown in <FIG>, after the first terminal <NUM> determines to allow the second terminal <NUM> to unlock the screen, the first terminal <NUM> sends a message for allowing screen unlocking to the second terminal <NUM>, so that the second terminal <NUM> removes a screen locking window on a current display interface based on the message for allowing screen unlocking.

As shown in <FIG>, when the first terminal <NUM> determines whether to allow the second terminal <NUM> to unlock the screen of the second terminal <NUM>, a prompt box may be used on the first terminal <NUM> to prompt the user whether to unlock the screen of the second terminal <NUM>. If the user confirms to unlock the screen of the second terminal <NUM>, permission to unlock the screen of the second terminal is obtained from the user. In this case, the first terminal <NUM> sends the message for allowing screen unlocking to the second terminal <NUM>.

Alternatively, the first terminal <NUM> may determine, based on a currently running specific application, whether to allow the second terminal <NUM> to unlock the screen of the second terminal <NUM>. For example, if the first terminal <NUM> currently displays display content that includes user privacy, the user privacy displayed on the first terminal <NUM> may also be projected onto a display of the second terminal <NUM> if the second terminal <NUM> is allowed to unlock the screen of the second terminal, and consequently user privacy disclosure is caused. Therefore, in this case, the first terminal does not allow the second terminal to unlock the screen. Specifically, in this case, the first terminal <NUM> may send a message for disallowing screen unlocking to the second terminal <NUM>, and the second terminal <NUM> still keeps in a screen-locked state after receiving the message for disallowing screen unlocking.

Correspondingly, if the first terminal <NUM> does not display display content that includes user privacy currently, the first terminal <NUM> may allow the second terminal <NUM> to unlock the screen of the second terminal. In this case, similar to step <NUM>, the first terminal <NUM> sends the screen unlocking instruction to the second terminal <NUM> to remove a screen locking window loaded on the second terminal <NUM>, so that the second terminal <NUM> enters the screen-unlocked state.

A privacy application described above may be manually set by the user on the first terminal, or may be automatically set by the first terminal based on application reading permission. For example, an application in which reading an SMS message or a photo of the user is allowed is set as the private application. This is not limited in this embodiment of this application.

For example, as shown in <FIG>, a shortcut button having a screen projection function is disposed in a drop-down list of the first terminal <NUM>. When the first terminal <NUM> detects that the user taps the shortcut button having a screen projection function, the first terminal <NUM> may be triggered to establish a connection to the second terminal <NUM>. For example, reference may be made to the related description in step <NUM>. The first terminal may project display content on the first terminal <NUM> onto the display of the second terminal <NUM> by using a single-source display method or a multi-source display method.

As shown in <FIG>, after the first terminal <NUM> establishes the connection to the second terminal <NUM>, a screen locking button <NUM> described above may be displayed at a location in the drop-down list at which the shortcut button having a screen projection function is originally displayed. The screen locking button <NUM> is for locking the screen of the second terminal <NUM>. Therefore, as described in step <NUM>, when it is detected that the user taps the screen locking button <NUM>, the first terminal <NUM> may load, on the display interface of the second terminal <NUM>, a screen locking window that covers a current display window, so that the second terminal <NUM> enters the screen-locked state. However, in this case, the first terminal <NUM> is still in a screen-unlocked state, so as to avoid a case in which user privacy displayed when the first terminal <NUM> is in the screen-unlocked state is disclosed after being projected onto the display of the second terminal <NUM>.

As shown in <FIG>, after the second terminal <NUM> enters the screen-locked state, a screen unlocking button <NUM> described above may be displayed at a location in the drop-down list at which the foregoing screen locking button <NUM> is originally displayed. The screen unlocking button <NUM> is for unlocking the screen of the second terminal <NUM>. Therefore, as described in step <NUM>, when it is detected that the user taps the screen unlocking button <NUM>, the first terminal <NUM> may remove the screen locking window loaded on the second terminal <NUM>, so that the second terminal <NUM> enters the screen-unlocked state. In this case, an application window on the second terminal <NUM> that is originally covered by the screen locking window is displayed on the current display interface.

It can be learned that in this embodiment of this application, independent screen locking window are respectively disposed on a screen of a controlling device (namely, the first terminal) and a screen of a secondary device (namely, the second terminal). Therefore, when the screen of the second terminal needs to be locked, the first terminal may control the second terminal to load the screen locking window of the second terminal, or the second terminal itself may load the screen locking window of the second terminal, so as to reduce a risk of user privacy disclosure caused by projecting user privacy displayed on the first terminal onto the second terminal. When the screen of the second terminal needs to be unlocked, the first terminal grants screen unlocking permission to the second terminal to control the second terminal to remove the loaded screen locking window, so as to avoid a risk of user privacy disclosure occurring after the screen of the second terminal is unlocked.

It can be understood that, to implement the foregoing functions, the terminal and the like include corresponding hardware structures and/or software modules for performing the functions. A person skilled in the art should easily be aware that, in combination with units and algorithm steps of the examples described in the embodiments disclosed in this specification, the embodiments of this application may be implemented by using hardware or a combination of hardware and computer software. Whether a function is performed by hardware or hardware driven by computer software depends on particular applications and design constraint conditions of the technical solutions. A person skilled in the art may use different methods to implement the described functions for each particular application, but it should not be considered that the implementation goes beyond the scope of the embodiments of this application.

In the embodiments of this application, the terminal may be divided into function modules based on the foregoing method examples. For example, each function module may be obtained through division based on each corresponding function, or two or more functions may be integrated into one processing module. The integrated module may be implemented in a form of hardware, or may be implemented in a form of a software function module. It should be noted that the module division in the embodiments of this application is an example, and is merely logical function division and may be other division in actual implementation.

When each function module is obtained through dividing by using a corresponding function, <FIG> is a possible schematic structural diagram of a terminal (for example, the foregoing first terminal or the foregoing second terminal) used in the foregoing embodiments. The terminal includes an obtaining unit <NUM>, a communications unit <NUM>, a locking unit <NUM>, and an unlocking unit <NUM>.

The obtaining unit <NUM> is configured to support the terminal in performing the process <NUM> in <FIG>, the process <NUM> in <FIG>, the process <NUM> in <FIG>, and the process <NUM> in <FIG>. The communications unit <NUM> is configured to support the terminal in performing the process <NUM> in <FIG>, the process <NUM> in <FIG>, the process <NUM> in <FIG>, and the process <NUM> in <FIG>. The locking unit <NUM> is configured to support the terminal in performing the process <NUM> in <FIG> and the process <NUM> in <FIG>. The unlocking unit <NUM> is configured to support the terminal in performing the process <NUM> in <FIG> and the processes <NUM> and <NUM> in <FIG>.

Further, still as shown in <FIG>, the terminal may include a display unit <NUM>, configured to display an icon of a screen unlocking button. The icon of the screen unlocking button and an icon of the screen locking button are at a same location. Alternatively, the display unit <NUM> may be configured to display an icon of a connection button configured to connect to the second terminal, and the icon of the connection button and an icon of the screen locking button are at a same location.

All related content of the steps in the foregoing method embodiments may be cited in function descriptions of corresponding function modules in the summary.

When an integrated unit is used, <FIG> is a possible schematic structural diagram of a terminal (for example, the foregoing first terminal or the foregoing second terminal) used in the foregoing embodiments. The terminal includes a processing module <NUM> and a communications module <NUM>. The processing module <NUM> is configured to control and manage an action of the terminal. The communications module <NUM> is configured to support the terminal in communicating with another network entity. The terminal may further include a storage module <NUM>, configured to store program code and data of the terminal.

The processing module <NUM> may be a processor or a controller, such as a central processing unit (Central Processing Unit, CPU), a general purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application-Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or another programmable logic device, a transistor logic device, a hardware component, or a combination thereof. The processing module may implement or execute various example logic blocks, modules, and circuits described with reference to content disclosed in this application. Alternatively, the processor may be a combination of processors implementing a calculation function, for example, a combination of one or more microprocessors, or a combination of a DSP and a microprocessor. The communications module <NUM> may be a transceiver, a transceiver circuit, a communications interface, or the like. The storage module <NUM> may be a memory.

When the processing module <NUM> is a processor, the communications module <NUM> is an RF transceiver circuit. When the storage module <NUM> is a memory, the terminal provided in this embodiment of this application may be the mobile phone <NUM> shown in <FIG>.

All or some of the foregoing embodiments may be implemented by using software, hardware, firmware, or any combination thereof. When a software program is used to implement the embodiments, all or some of the embodiments may be implemented in a form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the procedure or functions according to the embodiments of this application are all or partially generated. The computer may be a general purpose computer, a dedicated computer, a computer network, or other programmable apparatuses. The computer instructions may be stored in a computer readable storage medium or may be transmitted from a computer readable storage medium to another computer readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center in a wired (for example, a coaxial cable, an optical fiber, or a digital subscriber line (DSL)) or wireless (for example, infrared, radio, or microwave) manner. The computer readable storage medium may be any available medium accessible by the computer, or a data storage device integrating one or more available media, such as a server or a data center. The available medium may be a magnetic medium (for example, a floppy disk, a hard disk, or a magnetic tape), an optical medium (for example, a DVD), a semiconductor medium (for example, a solid state disk Solid State Disk (SSD)), or the like.

Claim 1:
A method, comprising:
establishing (<NUM>), by a first electronic device (<NUM>), a coupling to a second electronic device (<NUM>) for screen projection;
displaying, by the first electronic device, a first interface;
sending, by the first electronic device, data of the first interface to the second electronic device, so that the second terminal displays a second interface when the first terminal displays a second interface, wherein the second interface and the first interface are the same;
stopping, by the first electronic device display of the first interface;
displaying, by the first electronic device, a third interface after stopping display of the first interface, wherein the third interface comprises an interface element related to user privacy;
sending, by the first terminal, a screen locking instruction to the second terminal , so that the second terminal displays a screen locked interface;
wherein the method further comprises:
the screen locking instruction is automatically sent by the first electronic device in response to a switch to the third interface that comprises the interface element related to user privacy, so that displaying of said interface element on the second electronic device is avoided.