Screen projection method, device, equipment, system and storage medium

CN119343651APending Publication Date: 2025-01-21GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202280097076.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-06-16
Filing Date
2022-12-29
Publication Date
2025-01-21

Smart Images

  • Figure CN119343651A_ABST
    Figure CN119343651A_ABST
Patent Text Reader

Abstract

The invention discloses a screen projection method, device, equipment, system and a storage medium, and belongs to the technical field of screen projection. The method comprises: in a screen projection state, setting a screen turn-off duration from a first duration to a second duration, the screen turn-off duration being a duration during which the source device automatically enters a screen turn-off state, and the second duration being greater than the first duration (201); when a target duration is reached, controlling the screen to be turned off, where the source device does not enter the screen-off state after the screen is turned off, and the target duration is less than the second duration (202); and when the screen is turned off and the second duration is not reached, maintaining screen projection data stream transmission with the destination end device (203).
Need to check novelty before this filing date? Find Prior Art

Description

Screen projection method, device, equipment, system and storage medium

[0001] This application claims priority to Chinese patent application number 202210684186.1 filed on June 16, 2022, entitled “Screen projection method, device, equipment, system and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present application relate to the field of screen projection technology, and in particular to a screen projection method, device, equipment, system and storage medium. Background Art

[0003] In order to meet people's demand for screen projection display, mirror projection technology is constantly developing.

[0004] In the related technology, during the mirroring screen projection process, the source device needs to always keep the screen on. Once the screen enters the off state, the screen projection of the destination device will be interrupted, resulting in a worse user screen projection experience. If the source device always keeps the screen on, it will increase the power consumption of the source device.

[0005] Summary of the Invention

[0006] The embodiments of the present application provide a screen projection method, apparatus, device, and storage medium. The technical solution is as follows:

[0007] In one aspect, an embodiment of the present application provides a screen projection method, which is performed by a source device and includes:

[0008] In the screen projection state, the screen off duration is set from the first duration to the second duration, where the screen off duration is the duration during which the source device automatically enters the screen off state, and the second duration is greater than the first duration;

[0009] When the target duration is reached, controlling the screen to turn off, wherein the source device does not enter the screen-off state after the screen turns off, and the target duration is less than the second duration;

[0010] When the screen is off and the second duration has not been reached, the screen projection data stream transmission between the target device is maintained.

[0011] On the other hand, an embodiment of the present application provides a screen projection device, comprising:

[0012] A duration setting module, used to set the screen-off duration from a first duration to a second duration in the screen-casting state, wherein the screen-off duration is the duration during which the source device automatically enters the screen-off state, and the second duration is greater than the first duration;

[0013] a screen control module, configured to control the screen to turn off when a target duration is reached, wherein the source device does not enter the screen-off state after the screen turns off, and the target duration is less than the second duration;

[0014] The data transmission module is used to maintain the screen projection data stream transmission between the target device and the target device when the screen is off and the second time duration has not been reached.

[0015] On the other hand, an embodiment of the present application provides a screen projection system, which includes a source device and a destination device;

[0016] The source device is configured to, in the screen projection state, set the screen off duration from a first duration to a second duration, where the screen off duration is the duration for the source device to automatically enter the screen off state, and the second duration is greater than the first duration; when the target duration is reached, control the screen to turn off, wherein the source device does not enter the screen off state after the screen is turned off, and the target duration is less than the second duration; when the screen is turned off and the second duration is not reached, maintain the screen projection data stream transmission with the destination device;

[0017] The destination device is used to receive the audio and video data stream transmitted by the source device while maintaining the transmission of the projection data stream between the destination device and the source device; and play the projection content based on the audio and video data stream.

[0018] On the other hand, an embodiment of the present application provides a computer device, which includes a processor and a memory; the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the screen projection method as described in the above aspect.

[0019] On the other hand, an embodiment of the present application provides a computer-readable storage medium, in which at least one program code is stored. The program code is loaded and executed by a processor to implement the screen projection method as described in the above aspects.

[0020] In another aspect, an embodiment of the present application provides a computer program product comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the screen projection method provided in various optional implementations of the above aspects. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0022] FIG1 is a schematic diagram showing an implementation environment provided by an exemplary embodiment of the present application;

[0023] FIG2 shows a flow chart of a screen projection method provided by an exemplary embodiment of the present application;

[0024] FIG3 is a schematic diagram illustrating an exemplary embodiment of the present application showing that the screen turns off when the target duration is reached;

[0025] FIG4 shows a flowchart of a screen projection method provided by another exemplary embodiment of the present application;

[0026] FIG5 is a schematic diagram illustrating an exemplary embodiment of controlling screen brightness according to the present application;

[0027] FIG6 is a flowchart of a workflow after the screen is turned off in the projection state provided by another exemplary embodiment of the present application;

[0028] FIG7 is a flowchart of entering a locked screen and off screen state provided by another exemplary embodiment of the present application;

[0029] FIG8 is a schematic diagram illustrating another exemplary embodiment of the present application for resuming screen projection data stream transmission after successful unlocking;

[0030] FIG9 is a flowchart of a work flow in a locked screen state during screen projection provided by another exemplary embodiment of the present application;

[0031] FIG10 is a general workflow diagram of entering the screen projection state provided by another exemplary embodiment of the present application;

[0032] FIG11 is a structural block diagram of a screen projection system provided by an exemplary embodiment of the present application;

[0033] FIG12 is a structural block diagram of a screen projection device provided by an exemplary embodiment of the present application;

[0034] FIG13 shows a structural block diagram of a computer device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0035] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0036] In this document, "plurality" refers to two or more. "And / or" describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates an "or" relationship between the associated objects.

[0037] In related technologies, when a source device is projecting its screen to a destination device, the source device needs to always keep its screen on. Once the screen is off, the source device will disconnect from the destination device and end the screen projection.

[0038] In one possible scenario, when the source device is mirroring the screen to the destination device, if the user operates the screen through the destination device instead of the source device, the source device still needs to keep the screen on. Once the source device enters the off-screen state, the connection between the source device and the destination device will be interrupted, and the screen projection will fail. Therefore, during the screen projection process, the user needs to intermittently operate the source device (such as touch screen operation) or manually turn off the automatic screen-off function of the source device to avoid the source device from entering the off-screen state. However, keeping the screen on on the source device will increase power consumption and increase power consumption.

[0039] In an embodiment of the present application, in order to address the above-mentioned problem, during the screen projection process, the source device automatically extends the screen-off time, and controls the screen to be turned off if the extended screen-off time has not been reached, so that the screen projection data stream transmission between the target device and the destination device can be maintained while only turning off the screen without entering the screen-off state, which not only reduces the power consumption of the source device, but also avoids the interruption of screen projection due to the source device automatically entering the screen-off state.

[0040] FIG1 shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application, wherein the implementation environment includes a source device 101 and a destination device 102 .

[0041] The source device 101 is an electronic device with a screen projection function, wherein the screen projection function can be a function of a native application in the electronic device or a third-party application; the destination device 102 is an electronic device with a screen projection display function, wherein the screen projection display function can be a function of a native application in the electronic device or a third-party application. The electronic device can be a smartphone, tablet computer, personal computer, wearable device, or vehicle-mounted terminal, etc. In Figure 1, the source device 101 is a smartphone and the destination device 102 is a TV terminal as an example, but this does not constitute a limitation.

[0042] In a possible implementation, the source device 101 and the destination device 102 are located in the same local area network, and the screen projection data stream is transmitted through the local area network.

[0043] As shown in FIG1 , the source device 101 and the destination device 102 are simultaneously connected to the same local area network provided by the router 103 , thereby transmitting the screen projection data stream through the router 103 .

[0044] During screen projection from source device 101 to destination device 102, source device 101 records the screen and captures device audio, thereby encoding the recorded screen and audio to generate an audio and video data stream. This audio and video data stream is then transmitted to destination device 102 via router 103, and destination device 102 decodes and plays the audio and video data stream. In addition, when the reverse control function is supported, destination device 102 can transmit a reverse control instruction to source device 101 via router 103, and source device 101 performs the corresponding reverse control operation according to the reverse control instruction.

[0045] It should be noted that the source device 101 and the destination device 102 may be connected to the same local area network by connecting to the same router at the same time, or by other possible methods, which are not limited in this embodiment of the present application. In addition, in other possible implementations, the source device 101 and the destination device 102 may also be used to cast screens via the Internet, which is not limited in this embodiment.

[0046] In addition, the source device 101 can simultaneously transmit screen projection data streams to multiple destination devices 102 with screen projection functions (i.e., one-to-many screen projection), and the destination device 102 can also simultaneously receive screen projection data streams from multiple source devices 101 (i.e., many-to-one screen projection). The embodiment of the present application only uses one-to-one screen projection as an example for schematic illustration, but does not constitute a limitation to this.

[0047] Please refer to Figure 2, which shows a flow chart of a screen projection method provided by an exemplary embodiment of the present application. This embodiment of the present application takes the method as an example for the source device shown in Figure 1, and the method may include the following steps:

[0048] Step 201: In the projection state, the screen-off duration is set from the first duration to the second duration. The screen-off duration is the duration for the source device to automatically enter the screen-off state, and the second duration is greater than the first duration.

[0049] Since keeping the screen on for a long time without receiving any operations (such as touch screen operations) or events (such as incoming call notifications) will increase power consumption, the source device can set a screen-off timer to reduce power consumption. When the screen-off timer is reached, the source device will automatically enter the screen-off state.

[0050] In this screen-off state, the source device will reduce or shut down some of its voltage output, save the data of running applications in memory, monitor applications that switch to the background, turn off the screen, and keep it locked. Only when the screen is unlocked can the source device turn on the screen and continue running applications in the foreground.

[0051] Optionally, in the non-projection state, the screen-off duration of the source device is set to the first duration. That is, in the non-projection state, if no keep-screen-on operation or event is received within the first duration, the source device automatically enters the screen-off state.

[0052] To prevent the source device from automatically entering the screen-off state when the first duration has expired and no keep-screen-on operation or event has been received while in the screen-casting state, the source device automatically sets the screen-off duration from the first duration to a second duration when entering the screen-casting state, where the second duration is greater than the first duration. By setting this second duration, the time it takes for the source device to automatically enter the screen-off state can be extended, avoiding screen-casting interruptions caused by the source device entering the screen-off state in a short period of time.

[0053] Optionally, the second duration can be the maximum value among the screen-off duration candidate values ​​supported by the source device, for example, the second duration is an integer maximum value. Alternatively, if the source device turns off the automatic screen-off function, when the screen-off duration is set to the second duration, the source device will not enter the screen-off state, that is, the automatic screen-off function is turned off.

[0054] Optionally, the screen projection state refers to the mirroring screen projection state. The source device records the screen to obtain the recorded screen image, and the destination device displays the recorded screen image.

[0055] Schematically, as shown in Figure 3, in the non-screen projection state, the source device 301 automatically enters the screen-off state for 2 minutes. When the screen projection function is turned on to project the screen to the destination device 302, the source device 301 automatically extends the time it takes to enter the screen-off state to the integer (int) maximum value. Therefore, the source device 301 will not enter the screen-off state, that is, the automatic screen-off function is turned off.

[0056] Step 202: When the target duration is reached, the screen is controlled to be turned off, wherein the source device does not enter the screen-off state after the screen is turned off, and the target duration is less than the second duration.

[0057] Unlike related art, in which the source device's screen remains on after the automatic screen-off duration is extended, this embodiment reduces power consumption by extending the screen-off duration. When the source device reaches the target duration, the screen remains off, thereby reducing power consumption.

[0058] Optionally, the target duration is less than the second duration and can be the first duration or another duration less than the second duration. When the target duration is the first duration, the duration of controlling the screen to be off is the same as the duration of the source device automatically entering the screen-off state, thereby providing the user with a process of controlling the screen to be off that is similar to entering the screen-off state. In terms of user experience, the process of the source device screen being off is consistent with the process of the screen being off when entering the screen-off state.

[0059] In a possible implementation, the source device sets a countdown timer with a countdown duration equal to the target duration, and controls the screen to turn off after the countdown timer expires.

[0060] In the above process, since the screen-off duration of the source device is extended, the source device will not automatically enter the screen-off state if the second duration has not been reached. However, by controlling the screen to turn off when the target duration is reached, not only does this avoid excessive power consumption on the source device, but the screen-off process on the source device is also similar to that of entering the screen-off state in terms of user experience.

[0061] Optionally, the screen may be controlled to turn off by adjusting the screen brightness to zero or by stopping power supply to the screen alone, etc. This embodiment of the present application does not limit this.

[0062] In one possible implementation, the source device controls the screen to turn off and does not enter the screen-off state, the screen is in an unlocked state, and the source device maintains the screen recording and projection state.

[0063] Schematically, as shown in FIG3 , if no operation is received within 2 minutes, the source device 301 turns off the screen and does not enter the screen-off state, maintaining the screen projection state.

[0064] Step 203: When the screen is off and the second time duration has not been reached, the screen projection data stream transmission between the target device and the target device is maintained.

[0065] When the screen is off and has not reached the second time duration, since the source device has not entered the screen-off state, the source device can maintain the screen projection data stream transmission with the destination device, wherein the screen projection data stream includes the audio and video data stream sent by the source device to the destination device and the reverse control instructions sent by the destination device to the source device.

[0066] Schematically, as shown in FIG3 , when the extended screen-off time is not reached, the source device 301 continues to maintain the screen projection data stream transmission with the destination device 302 , and the destination device 302 continues to display the recorded screen.

[0067] To summarize, in the embodiment of the present application, in the screen projection state, the source-end device will automatically enter the screen-off state and extend the screen-off duration from the first duration to the second duration, and control the screen to turn off when the target duration is reached. The target duration is less than the second duration. Since the source-end device only turns off the screen but does not enter the screen-off state when the second duration is not reached, the source-end device can maintain the screen projection data stream transmission with the destination-end device. By adopting the solution provided in the embodiment of the present application, the source-end device can automatically extend the screen-off duration in the screen projection state, and maintain the screen projection data stream transmission with the destination-end device when the screen is off but does not enter the screen-off state. This not only ensures normal screen projection between the source-end device and the destination-end device, but also avoids the increase in power consumption of the source-end device due to the long-term screen-on state, which helps to reduce the power consumption of the source-end device during the screen projection process.

[0068] Optionally, the method further includes:

[0069] When the third duration is reached, the screen brightness is adjusted from the first brightness to the second brightness, the third duration is less than the target duration, and the second brightness is less than the first brightness.

[0070] Optionally, adjusting the screen brightness from the first brightness to the second brightness includes:

[0071] When the brightness adjustment mode is the first adjustment mode, the brightness adjustment mode is set to the second adjustment mode, wherein in the first adjustment mode, the function of automatically adjusting the screen brightness based on the ambient light brightness is turned on, and in the second adjustment mode, the function of automatically adjusting the screen brightness based on the ambient light brightness is turned off;

[0072] In the second adjustment mode, the screen brightness is automatically adjusted from the first brightness to the second brightness.

[0073] Optionally, the method further includes:

[0074] When a screen-lighting event is detected, the screen is turned on, wherein the screen displayed after the screen is turned on is a non-lock screen screen, and the screen-lighting event is an event that triggers the screen to light up;

[0075] Set the screen brightness to the first brightness and the brightness adjustment mode to the first adjustment mode.

[0076] Optionally, when the third duration is reached, adjusting the screen brightness from the first brightness to the second brightness includes:

[0077] When the third duration is reached and no target event is detected, the screen brightness is adjusted from the first brightness to the second brightness, and the target event has the function of keeping the screen of the source device in a bright state;

[0078] The method also includes:

[0079] If the target duration is not reached and the target event is detected, the screen brightness is adjusted to the first brightness.

[0080] Optionally, when the target duration is reached, the screen is controlled to turn off, including:

[0081] When the target duration is reached and no target event is detected, the screen is turned off. The target event has the function of keeping the screen of the source device on.

[0082] The method also includes:

[0083] When the target event is detected within the target duration, the screen is kept on and the countdown timer is reset. The countdown timer's countdown duration is the target duration.

[0084] Optionally, the method further includes:

[0085] When a screen lock event is detected within the target duration, the screen goes into off state, and the screen projection data stream transmission between the source device and the destination device is interrupted in the off state.

[0086] Optionally, if a lock screen event is detected within the target duration, the screen goes into the off state, including:

[0087] When a lock screen event is detected within the target duration, a lock screen message is sent to the destination device so that the destination device displays a lock screen prompt based on the lock screen message.

[0088] Enter screen-off mode.

[0089] Optionally, the method further includes:

[0090] In the screen-off state, if a screen-on event is detected, the screen will be turned on and the lock screen interface will be displayed. The screen-on event is the event that triggers the screen to turn on.

[0091] If the unlocking is successful, the screen projection data stream transmission between the target device is resumed.

[0092] Optionally, the method further includes:

[0093] When the screen is off and the second duration has not yet elapsed, receiving a reverse control instruction sent by the destination device, where the reverse control instruction is used to reversely control the source device;

[0094] Execute the reverse control operation indicated by the reverse control instruction.

[0095] Optionally, the method further includes:

[0096] When exiting the screen projection state, the screen off duration is set to the first duration.

[0097] Typically, the process of the source device automatically entering the screen-off state from the screen-on state includes the process of the screen changing from bright to dark and then to off. In the embodiments of the present application, in order to improve the user experience, the process of the source device controlling the screen to turn off can be consistent with the screen turning off process shown by the source device automatically entering the screen-off state. The following describes in detail the process of the source device controlling the screen to turn off and the working state when the screen is off through specific embodiments.

[0098] Please refer to Figure 4, which shows a flow chart of a screen projection method provided by another exemplary embodiment of the present application. This embodiment uses the method for the source device shown in Figure 1 as an example to illustrate, and the method may include the following steps:

[0099] Step 401: In the projection state, the screen-off duration is set from the first duration to the second duration. The screen-off duration is the duration for the source device to automatically enter the screen-off state, and the second duration is greater than the first duration.

[0100] The implementation of this step can refer to the above-mentioned step 201, and will not be described in detail in this embodiment.

[0101] Step 402: When the third duration is reached, the screen brightness is adjusted from the first brightness to the second brightness, the third duration is less than the target duration, and the second brightness is less than the first brightness.

[0102] According to the screen turning off process displayed when the source device automatically enters the screen-off state under normal circumstances, the source device sets a third duration. When the third duration is reached, the source device adjusts the screen brightness from the first brightness to the second brightness, thereby simulating the process of the screen dimming when the source device automatically enters the screen-off state.

[0103] Optionally, the difference between the third duration and the target duration is a fixed value. For example, the fixed value is 5 seconds. When the target duration is 1 minute, the third duration is 55 seconds; when the target duration is 30 seconds, the third duration is 25 seconds. In one possible implementation, the source device determines the third duration based on the target duration and the fixed value, thereby setting a countdown timer with a countdown duration of the third duration, and starting the countdown timer, so that after the countdown timer expires, the screen brightness is adjusted from the first brightness to the second brightness.

[0104] In order to ensure the screen display effect in different environments, users generally set the brightness adjustment mode of the screen to the first adjustment mode (or automatic adjustment mode). In the first adjustment mode, the function of automatically adjusting the screen brightness based on the ambient light brightness is turned on, and the source-end device automatically adjusts the screen brightness according to the ambient light brightness of its environment (which can be collected by the ambient light sensor). When the user manually adjusts the screen brightness, the source-end device will still adjust the screen brightness according to the ambient light brightness of its environment. In the embodiment of the present application, since the screen brightness needs to be adjusted from the first brightness to the second brightness, in order to ensure the normal execution of the screen brightness adjustment process (the adjusted second brightness will not change due to the first adjustment mode), in a possible implementation method, the brightness adjustment process may include the following steps:

[0105] 1. When the brightness adjustment mode is the first adjustment mode, set the brightness adjustment mode to the second adjustment mode.

[0106] In one possible implementation, the source device determines the current brightness adjustment mode. If the current brightness adjustment mode is the first adjustment mode, the brightness adjustment mode is modified to the second adjustment mode (or manual adjustment mode), wherein in the second adjustment mode, the function of automatically adjusting the screen brightness based on the ambient light brightness is turned off, and the source device does not automatically adjust the screen brightness according to the ambient light brightness. When the user manually adjusts the screen brightness, the source device does not adjust the screen brightness according to the ambient light brightness of the environment in which it is located. If the current brightness adjustment mode is the second adjustment mode, the second adjustment mode is maintained.

[0107] It should be noted that the brightness adjustment mode setting process is automatically performed by the source device in the background and the user side will not perceive it.

[0108] 2. In the second adjustment mode, the screen brightness is automatically adjusted from the first brightness to the second brightness.

[0109] Furthermore, in the second adjustment mode, the source device automatically adjusts the screen brightness from the first brightness to the second brightness. Since the screen brightness does not change with changes in ambient light brightness in the second adjustment mode, the screen brightness will not change after being set to the second brightness.

[0110] It should be noted that, when the initial brightness adjustment mode of the source device is the second adjustment mode, the source device directly adjusts the first brightness to the second brightness.

[0111] In some embodiments, the second brightness is a fixed value, and the second brightness is the brightness of the screen after the screen brightness is reduced before the screen normally enters the off state. For example, the second brightness is 50 nits.

[0112] In an illustrative example, when the target duration is 1 minute, when it reaches 55 seconds, the source device sets the brightness adjustment mode to the second adjustment mode and adjusts the screen brightness from 1000 nit to 50 nit.

[0113] In the normal automatic screen-off process, before entering the screen-off state, if the user operates the device or the device receives a specific notification, the device needs to keep the screen on. To simulate this effect, in one possible implementation, in the screen-casting state, the source device monitors the target event. When the third duration is reached and no target event is detected, the source device adjusts the screen brightness from the first brightness to the second brightness, wherein the target event has the function of keeping the screen of the source device in the screen-on state.

[0114] Optionally, the target event may be an incoming call notification, a message reminder, a touch screen operation, a voice control instruction, etc., which is not limited in the embodiments of the present application.

[0115] Optionally, if the target event is detected before the third duration is reached, the source device responds to the target event and maintains the first brightness.

[0116] In one possible implementation, the source device sets a countdown timer with a third duration and starts the countdown timer. If the target event is not detected during the countdown, the screen brightness is adjusted to the second brightness after the countdown timer expires. If the target event is detected during the countdown, the countdown timer is reset when the target event is detected, and the screen brightness is maintained at the first brightness.

[0117] 5 , the source device 501 sets the target duration to 1 minute and the third duration to 55 seconds. When the third duration is reached and no touch operation or incoming call notification is detected, the source device 501 adjusts the screen brightness from the first brightness of 1000 nit to the second brightness of 50 nit.

[0118] In a possible implementation, when the third duration is reached but the target duration is not reached and the target event is monitored, the source device adjusts the screen brightness to the first brightness.

[0119] When the third duration is reached but the target duration is not reached, the source device monitors the target event. In order to facilitate the user to perform subsequent operations, the source device restores the screen brightness to the first brightness.

[0120] Schematically, as shown in FIG5 , when the source device 501 detects a touch screen operation, it adjusts the screen brightness from 50 nit to 1000 nit, thereby facilitating subsequent operations by the user.

[0121] Step 403: When the target duration is reached and no target event is detected, the screen is controlled to turn off. The target event has the function of keeping the screen of the source device in a bright state.

[0122] In one possible implementation, in the screen projection state, the source device sets a countdown timer with a target duration and starts the countdown timer. If the target event is not detected during the countdown, the screen is turned off when the countdown timer expires.

[0123] Among them, the target event has the function of keeping the screen of the source device in a bright state. The target event can be triggered by the user's operation on the source device, such as a touch event triggered by the user's touch screen operation on the source device, or it can be triggered by a notification received by the source device, such as an incoming call notification received by the source device.

[0124] 5 , if the source device 501 does not detect any touch screen operation or incoming call notification within the target duration, the screen is controlled to turn off when the target duration is reached.

[0125] Step 404: When a target event is detected within the target duration, the screen is kept on and the countdown timer is reset. The countdown timer has the target duration.

[0126] In one possible implementation, when a target event is detected during the countdown process (the countdown duration of the countdown timer is the target duration), in order to facilitate the user to perform subsequent operations, the source device keeps the screen in a bright state and resets the countdown timer when the target event is detected.

[0127] In one possible implementation, if the target event is not detected within the third duration, the source device saves the current brightness adjustment mode and the first brightness. If the target event is detected after the third duration but before the target duration, the source device restores the saved brightness adjustment mode and restores the screen brightness to the first brightness.

[0128] Step 405: When the screen is off and the second duration has not been reached, the screen projection data stream transmission between the target device and the target device is maintained.

[0129] The implementation of this step can refer to the above-mentioned step 203, and will not be described in detail in this embodiment.

[0130] Step 406: When the screen is off and the second duration has not been reached, a reverse control instruction sent by the destination device is received, where the reverse control instruction is used to perform reverse control on the source device.

[0131] When the screen is off and the second time period has not been reached, when the user operates on the projected screen through the destination device, the destination device sends the user operation to the source device in the form of a reverse control instruction. Further, the source device receives the reverse control instruction and performs the corresponding reverse control operation.

[0132] In one possible implementation, the destination device receives an operation instruction from the user on the projected screen. Optionally, the destination device receives a touch operation on the screen by the user, or receives the operation instruction through an external device (such as a mouse, keyboard, etc.). After receiving the operation instruction, the destination device identifies the operation instruction, converts it into a reverse control instruction for the source device, and sends the reverse control instruction to the source device.

[0133] Among them, the reverse control instruction includes the operation type and the corresponding operation parameters. For example, when the destination device receives a click operation from the mouse, the reverse control instruction includes the operation type "click", the click coordinates corresponding to the click operation, and the number of clicks of the click operation; when the destination device receives a sliding operation, the reverse control instruction includes the operation type "slide" and the sliding trajectory coordinates of the sliding operation; when the destination device receives a long press operation, the reverse operation instruction includes the operation type "long press", the long press coordinates corresponding to the long press operation, and the long press duration, etc. The embodiment of the present application does not limit the specific parameters contained in the reverse control instruction.

[0134] Step 407: Execute the reverse control operation indicated by the reverse control instruction.

[0135] Furthermore, the source device executes the reverse control operation indicated by the reverse control instruction. Accordingly, the user can see the updated projection screen after the reverse control operation through the destination device.

[0136] It should be noted that, since the screen sizes of the source device and the destination device may be different, the source device needs to perform coordinate conversion on the parameters in the reverse control instruction before executing the reverse control operation, which is not described in detail in this embodiment.

[0137] Furthermore, in this embodiment, during the process of reversely controlling the source device through the destination device, the screen of the source device remains off.

[0138] Step 408: When a screen-lighting event is detected, the screen is turned on. After the screen is turned on, the screen displayed is a non-lock screen image, and the screen-lighting event is an event that triggers the screen to light up.

[0139] To simulate the process of the source device lighting up its screen when the screen is normally off, the source device monitors the screen-on event when the screen is off, and lights up the screen when the screen-on event is detected. The screen-on event is an event that triggers the screen to light up.

[0140] Optionally, the screen lighting event can be an event triggered by pressing a physical button, an event triggered by a touch operation, an event triggered by a voice control command, or an event triggered by a specific notification (such as an incoming call notification), etc. The embodiments of the present application do not limit this.

[0141] It should be noted that after the screen is turned off, the source device needs to register the screen-on event. The source device will only turn on the screen if it monitors the registered screen-on event.

[0142] Optionally, the registered screen-on event may be the same as or different from the event that wakes up the source device to exit the screen-off state, and this embodiment of the application does not limit this. For example, when the source device supports exiting the screen-off state through the power button, clicking the screen, and message notification, the registered screen-on event may include the power button press event, the screen click event, and the notification event, or may only include the power button press event and the incoming call notification event (i.e., a notification event of a specified type).

[0143] When the source device is awakened and the screen is exited from the off state, since it is still in the locked state, the source device will display the lock screen interface after turning on the screen and wait for the unlock operation. However, in the embodiment of the present application, in the screen projection state, since the source device only controls the screen to be turned off and does not enter the off state (not the locked state), when the screen light event is detected, the source device will turn on the screen, and after turning on the screen, the current projection screen will be directly displayed instead of the lock screen interface.

[0144] In an illustrative example, the source device registers the pressing operation of the power button as a screen-lighting event. In response to the pressing operation of the power button, the source device lights up the screen and directly displays the current projection screen without the need for an unlocking operation.

[0145] In an illustrative example, to ensure privacy, a source device registers incoming call notifications as screen-on events. Upon receiving an incoming call notification, the source device lights up the screen and displays the incoming call interface. During the incoming call, the source device first performs privacy processing on the recorded screen, then encodes the recorded screen to generate a data stream, which is then transmitted to the destination device. Privacy processing methods include, but are not limited to, mosaicing the number displayed on the incoming call display.

[0146] Step 409: Set the screen brightness to the first brightness, and set the brightness adjustment mode to the first adjustment mode.

[0147] Since the source device adjusts the brightness adjustment mode and the screen brightness when the screen brightness adjustment mode is the first adjustment mode during the process of controlling the screen to turn off, in order to ensure the consistency of the screen brightness and the brightness adjustment mode after the screen is turned on and before the screen is turned off, the source device sets the screen brightness to the first brightness and resets the brightness adjustment mode to the first adjustment mode.

[0148] Furthermore, after the source device turns on the screen, the above step 402 is continued.

[0149] Step 410, when exiting the screen projection state, set the screen off duration to the first duration.

[0150] Since the second duration is set to prevent the source device from quickly entering the screen-off state when in the projection state, when exiting the projection state, in order to reduce power consumption, the source device adjusts the screen-off duration from the second duration to the first duration, that is, the duration during which the source device automatically enters the screen-off state when returning to normal use. It should be noted that if the projection state is exited while the screen is off, the source device needs to restore the brightness adjustment mode and screen brightness.

[0151] Optionally, exiting the screen projection state can be triggered by the destination device, for example, when the source device receives the exit screen projection instruction sent by the destination device, the source device exits the screen projection state; or, exiting the screen projection state can also be triggered by the source device, for example, when the screen projection exit operation is received, the source device exits the screen projection state; or, exiting the screen projection state can be automatically triggered when the screen projection link is disconnected, for example, when the screen projection link is disconnected due to network reasons, the source device exits the screen projection state.

[0152] In the above embodiment, in the screen projection state, by setting the third time duration and monitoring the target event, the source device can make the process of controlling the screen to turn off consistent with the process of the screen turning off when entering the screen off state, thereby improving the user experience. In addition, when a screen lighting event is monitored, the source device can directly display the interface where the screen lighting event is located, omitting the step of unlocking the screen, making it convenient for the user to perform subsequent processing in a timely manner.

[0153] It should be noted that the above embodiment is only one possible control logic. In other possible implementations, after the control screen is turned off, the source device can monitor the screen lighting event and receive the reverse control instructions sent by the destination device at the same time. The embodiment of this application does not limit the specific control logic.

[0154] According to the above embodiment, as shown in Figure 6, it shows a workflow diagram after the screen is turned off in the projection state provided by another exemplary embodiment of the present application. In the projection state, after the source device 601 controls the screen to turn off, the projection data stream transmission between the source device 601 and the destination device 602 is maintained. When the source device 601 registers the incoming call notification and the triggering operation of the power button as a screen-on event, the source device 601 judges the events in sequence, first judging whether a reverse control instruction is received. When a reverse control instruction is received, the source device 601 executes the reverse control operation indicated by the reverse control instruction and keeps the screen off; when no reverse control instruction is received, it continues to judge whether an incoming call notification is detected. When an incoming call notification is detected, the source device 601 turns on the screen and displays the incoming call notification; when no incoming call notification is detected, it continues to judge whether a volume button triggering operation is detected. When a volume button triggering operation is detected, the source device 601 adjusts the volume according to the volume button triggering operation and keeps the screen off; when no volume button triggering operation is detected, it continues to judge whether a power button triggering operation is detected. When a power button triggering operation is detected, the source device 601 turns on the screen and directly displays the projection screen. When no power button triggering operation is detected, the source device 601 keeps the screen off.

[0155] It should be noted that the above embodiments are only for illustrative purposes. In other possible implementations, when the source device judges an event, it can simultaneously judge the reception of reverse control instructions, monitoring of incoming call operations, monitoring of volume key trigger operations, and monitoring of power key trigger operations. It can also judge in a judgment order different from that shown in Figure 6. The embodiments of the present application do not constitute a limitation on this.

[0156] Unlike related technologies, during the screen projection process, in response to the lock screen event of the source device, the destination device disconnects from the source device and exits the screen projection state. To project the screen again, it is necessary to reconnect to the screen projection. In an embodiment of the present application, when the source device responds to the lock screen event and enters the screen off state, the destination device remains connected to the source device and displays a lock screen prompt screen to prompt the user that the source device is in the lock screen off state. After the source device unlocks the screen, the destination device interface resumes displaying the projection screen.

[0157] When a screen lock event is detected within the target duration, the source device enters the screen-off state, and the screen projection data stream transmission between the source device and the destination device is interrupted in the screen-off state.

[0158] In one possible implementation, when a lock screen event is detected within the target duration, the source device enters a lock screen state, stops recording the screen, interrupts the screen projection data stream transmission with the destination device, and monitors the applications running in the background.

[0159] Optionally, the lock screen event can be an event triggered by a physical button (such as pressing the power button), or an event triggered by a voice control command, etc., which is not limited in the embodiments of the present application.

[0160] As shown in Figure 7, the process specifically includes the following steps:

[0161] Step 701: When a lock screen event is detected within a target duration, a lock screen message is sent to a destination device so that the destination device displays a lock screen prompt screen based on the lock screen message.

[0162] In one possible implementation, when a lock screen event is detected within the target duration, the source device sends a lock screen message to the destination device, prompting the destination device that the screen projection data stream is interrupted and the device is about to enter a lock screen off state.

[0163] The lock screen message can be an instruction in the projection data stream transmitted from the source device to the destination device, instructing the destination device to display a preset lock screen prompt screen; or it can be a lock screen prompt image contained in the projection data stream, and the destination device displays the lock screen prompt screen based on the image. When the destination device decodes the projection data stream and generates the projection screen, when the destination device listens to the instruction or the lock screen prompt image, it means that it has received the lock screen message that the source device is about to enter the locked screen off state.

[0164] Step 702, enter the screen-off state.

[0165] In one possible implementation, the source device enters a screen-off state and interrupts the screen projection data stream transmission with the destination device. At the same time, the destination device displays a lock screen prompt screen.

[0166] Schematically, as shown in FIG8 , the source device 801 enters the screen-off state, interrupting the screen projection data stream transmission with the destination device 802 , and at the same time, the destination device 802 displays a lock screen prompt screen.

[0167] Step 703: When the screen is off, if a screen-on event is detected, the screen is turned on and the lock screen interface is displayed. The screen-on event is an event that triggers the screen to turn on.

[0168] In one possible implementation, after the source device monitors the screen-on event, it turns on the screen and displays the lock screen to be unlocked interface. At this time, the screen brightness is set to the first brightness, and the source device continues to maintain the interruption of the screen projection data flow between it and the destination device.

[0169] When the fourth time duration is reached and no unlocking operation is detected, the source device turns off the screen and continues to keep the screen off. The fourth time duration is the screen-on time duration while waiting for the user to perform the unlocking operation.

[0170] Indicatively, the source device registers the incoming call notification as a screen-on event. When the source device detects the incoming call notification, it turns on the screen and displays the incoming call screen. When the source device detects the unlock operation, the screen remains on after the call ends. After the call ends and no unlock operation is detected, the source device remains in the screen-off state.

[0171] Step 704: If the unlocking is successful, resume the screen projection data stream transmission with the destination device.

[0172] In one possible implementation, when the unlocking is successful, the source device continues to record the screen image and collect the device audio, thereby encoding the recorded image and audio, generating an audio and video data stream, and transmitting the generated audio and video data stream to the destination device. Upon receiving the audio and video data stream, the destination device stops displaying the lock screen prompt screen and re-displays the projected screen. At the same time, the source device receives the reverse control instruction from the destination device and executes the reverse control operation indicated by the reverse control instruction.

[0173] Schematically, as shown in FIG8 , when the unlocking is successful, the source device 801 continues to record the screen image, collects the device audio, and transmits the generated audio and video data stream to the destination device 802 , and the destination device 802 directly displays the projected screen image.

[0174] In the above embodiment, during the screen projection process, after the source device enters the locked screen off state, it can maintain a connection with the destination device, and the destination device will prompt the user that the source device is in the locked screen off state, which helps the user to promptly understand the status of the source device. If the unlock is successful, the source device can directly resume the screen projection data stream transmission between it and the destination device, improving the convenience of operation during the screen projection process.

[0175] According to the above embodiment, as shown in FIG9 , it shows a workflow diagram in the locked screen off state during the screen projection process provided by another exemplary embodiment of the present application. In the locked screen off state, the source device 901 interrupts the screen projection data stream transmission between the target device 902, and the target device 902 displays the lock screen prompt screen. When the source device 901 registers the incoming call notification and the trigger operation of the power button as a screen light event, the source device 901 judges the event in sequence. When the incoming call notification is monitored, the source device 901 lights up the screen. After the incoming call ends, if there is a successful unlock operation, the source device 901 exits the locked screen off state; if there is no successful unlock operation, the source device 901 restores the locked screen off state; when no incoming call notification is monitored, it continues to judge whether the power button trigger operation is monitored. When the power button trigger operation is monitored, the source device 901 lights up the screen. If there is a successful unlock operation, the source device 901 exits the locked screen off state and resumes the screen projection data stream transmission with the target device 902. In the case where no triggering operation of the power button is detected, the source device 901 maintains the screen locked and turned off state.

[0176] It should be noted that during the above-mentioned screen projection process, when the screen is locked and off, the source device can simultaneously judge the triggering operations of monitoring incoming call notifications and monitoring the power button. The embodiment of the present application does not limit the specific execution order.

[0177] In combination with the above embodiments, as shown in Figure 10, it shows the overall workflow diagram for entering the screen projection state provided by another exemplary embodiment of the present application.

[0178] Step 1001: In the projection state, keep the screen on.

[0179] In the screen projection state, the source device keeps the screen on and transmits the screen projection data stream with the destination device.

[0180] Step 1002: Determine whether there is a screen lock event.

[0181] The source device monitors the lock screen event and determines whether there is a lock screen event. If there is a lock screen event, the process proceeds to step 1003; if there is no lock screen event, the process proceeds to step 1004.

[0182] Step 1003, enter the locked screen state.

[0183] When a lock screen event is detected, the source device sends a lock screen message to the destination device, the destination device displays a lock screen prompt screen, and the source device interrupts the screen projection data stream transmission between it and the destination device.

[0184] Step 1004: Determine whether there is an incoming call notification or a touch screen operation.

[0185] The source device monitors incoming call notifications and touch screen operations to determine whether there is an incoming call notification or touch screen operation. If there is an incoming call notification or touch screen operation, it returns to step 1001 and keeps the screen on; if there is no incoming call notification or touch screen operation, it goes to step 1005.

[0186] Step 1005: Adjust screen brightness.

[0187] When the third duration is reached, the source device adjusts the screen brightness from the first brightness to the second brightness, and when the brightness adjustment mode is the first adjustment mode, adjusts the brightness adjustment mode to the second adjustment mode.

[0188] Step 1006, continue to determine whether there is an incoming call notification or a touch screen operation.

[0189] The source device continues to monitor incoming call notifications and touch screen operations to determine whether there is an incoming call notification or touch screen operation. If there is an incoming call notification or touch screen operation, it returns to step 1001 and keeps the screen on; if there is no incoming call notification or touch screen operation, it enters step 1007.

[0190] Step 1007: Control the screen to turn off, monitor incoming call notifications and trigger operations on the power button.

[0191] When the target duration is reached, the source device controls the screen to turn off and monitors incoming call notifications and triggering operations of the power button. At the same time, the source device maintains the screen projection data stream transmission between it and the destination device, and the destination device continues to display the projection screen.

[0192] Please refer to Figure 11, which shows a structural block diagram of a screen projection system provided by an exemplary embodiment of the present application. The screen projection system includes a source device 1101 and a destination device 1102.

[0193] The source device 1101 is used to set the screen-off duration from a first duration to a second duration in the screen projection state, where the screen-off duration is the duration for the source device 1101 to automatically enter the screen-off state, and the second duration is greater than the first duration; when the target duration is reached, the screen is controlled to be turned off, wherein the source device does not enter the screen-off state after the screen is turned off, and the target duration is less than the second duration; when the screen is turned off and the second duration is not reached, the screen projection data stream transmission between the source device 1102 is maintained.

[0194] The destination device 1102 is used to receive the audio and video data stream transmitted by the source device 1101 while the projection data stream between the destination device 1102 and the source device 1101 remains transmitted; and play the projection content based on the audio and video data stream.

[0195] In a possible implementation, the screen projection data stream transmitted between the source device 1101 and the destination device 1102 also includes reverse control instructions.

[0196] The destination device 1102 is used to receive a reverse control operation on the projected content when the screen of the source device 1101 is off and has not reached the second time duration; and send a reverse control instruction to the source device 1101 based on the reverse control operation.

[0197] When the destination device 1102 receives a reverse control operation on the projected content, it converts the reverse control operation into a corresponding reverse control instruction, wherein the reverse control instruction includes the operation type and corresponding operation parameters, so that the destination device 1102 sends the reverse control instruction to the source device 1101.

[0198] The source device 1101 is configured to execute the reverse control operation indicated by the reverse control instruction.

[0199] In a possible implementation, the source device 1101 enters a locked screen state, and the screen projection data stream transmission between the source device 1101 and the destination device 1102 is interrupted.

[0200] The source device 1101 is configured to enter a screen-off state upon detecting a screen-lock event within a target duration, and send a screen-lock message to the destination device 1102. In the screen-off state, the transmission of the screen projection data stream between the source device 1101 and the destination device 1102 is interrupted.

[0201] The destination device 1102 is configured to display a lock screen prompt based on the lock screen message when the source device 1101 enters the screen-off state.

[0202] When the source device 1101 enters the screen-off state, in order to prompt the user that the source device 1101 is in the locked screen and screen-off state, the destination device 1102 displays a lock screen prompt screen based on the received lock screen message.

[0203] The source device 1101 is also used to turn on the screen and display the lock screen interface when the screen is off and a screen light event is detected. The screen light event is an event that triggers the screen to light up. When the unlocking is successful, the screen projection data stream transmission between the target device 1102 is resumed.

[0204] Please refer to FIG12 , which shows a structural block diagram of a screen projection device provided by an exemplary embodiment of the present application. The device may include the following structure:

[0205] Duration setting module 1201, used to set the screen-off duration from a first duration to a second duration in the screen-casting state, wherein the screen-off duration is the duration during which the source device automatically enters the screen-off state, and the second duration is greater than the first duration;

[0206] The screen control module 1202 is configured to control the screen to turn off when the target duration is reached, wherein the source device does not enter the screen-off state after the screen turns off, and the target duration is less than the second duration;

[0207] The data transmission module 1203 is used to maintain the screen projection data stream transmission between the target device and the target device when the screen is off and the second time period has not been reached.

[0208] Optional,

[0209] The screen control module 1202 is further configured to adjust the screen brightness from the first brightness to the second brightness when a third duration is reached, the third duration being less than the target duration, and the second brightness being less than the first brightness.

[0210] Optionally, the screen control module 1202 is configured to:

[0211] When the brightness adjustment mode is the first adjustment mode, setting the brightness adjustment mode to the second adjustment mode, wherein in the first adjustment mode, the function of automatically adjusting the screen brightness based on the ambient light brightness is turned on, and in the second adjustment mode, the function of automatically adjusting the screen brightness based on the ambient light brightness is turned off;

[0212] In the second adjustment mode, the screen brightness is automatically adjusted from the first brightness to the second brightness.

[0213] Optional,

[0214] The screen control module 1202 is further configured to light up the screen when a screen light-up event is detected, wherein the screen displayed after the screen is lit up is a non-lock screen screen, and the screen light-up event is an event that triggers the screen light-up;

[0215] The screen brightness is set to the first brightness, and the brightness adjustment mode is set to the first adjustment mode.

[0216] Optionally, the screen control module 1202 is configured to:

[0217] When the third duration is reached and no target event is detected, adjusting the screen brightness from the first brightness to the second brightness, wherein the target event has a function of keeping the screen of the source device in a bright state;

[0218] If the target duration is not reached and the target event is detected, the screen brightness is adjusted to the first screen brightness.

[0219] Optionally, the screen control module 1202 is configured to:

[0220] When the target duration is reached and no target event is detected, the screen is controlled to turn off. The target event has the function of keeping the screen of the source device in a bright state.

[0221] When the target event is detected within the target duration, the screen is kept on and the countdown timer is reset. The countdown timer has the target duration.

[0222] Optionally, the device further includes:

[0223] The screen lock and screen off module is used to enter the screen off state when a screen lock event is monitored within the target duration, wherein the screen projection data stream transmission between the source device and the destination device is interrupted in the screen off state.

[0224] Optionally, the screen lock and screen off module is used to:

[0225] When the lock screen event is monitored within the target duration, a lock screen message is sent to the destination device so that the destination device displays a lock screen prompt screen based on the lock screen message;

[0226] Enter the screen-off state.

[0227] Optionally, it is also used to light up the screen and display the lock screen interface when a screen-on event is detected in the screen-off state, where the screen-on event is an event that triggers the screen to light up;

[0228] The data transmission module 1203 is also used to resume the screen projection data stream transmission between the target device and the target device when the unlocking is successful.

[0229] Optional,

[0230] The data transmission module 1203 is further configured to receive a reverse control instruction sent by the destination device when the screen is off and the second duration has not been reached, wherein the reverse control instruction is used to reversely control the source device;

[0231] The operation execution module is used to execute the reverse control operation indicated by the reverse control instruction.

[0232] Optional,

[0233] The screen control module 1202 is also used to set the screen off time to the first time when exiting the screen projection state.

[0234] To summarize, in the embodiment of the present application, in the screen projection state, the source-end device will automatically enter the screen-off state and extend the screen-off duration from the first duration to the second duration, and control the screen to turn off when the target duration is reached. The target duration is less than the second duration. Since the source-end device only turns off the screen but does not enter the screen-off state when the second duration is not reached, the source-end device can maintain the screen projection data stream transmission with the destination-end device. By adopting the solution provided in the embodiment of the present application, the source-end device can automatically extend the screen-off duration in the screen projection state, and maintain the screen projection data stream transmission with the destination-end device when the screen is off but does not enter the screen-off state. This not only ensures normal screen projection between the source-end device and the destination-end device, but also avoids the increase in power consumption of the source-end device due to the long-term screen-on state, which helps to reduce the power consumption of the source-end device during the screen projection process.

[0235] Moreover, in the screen projection state, by setting the third duration and monitoring the target event, the source device can make the process of controlling the screen to turn off consistent with the process of the screen turning off when entering the screen off state, thereby improving the user experience. In addition, when a screen lighting event is monitored, the source device can directly display the interface where the screen lighting event is located, omitting the step of unlocking the screen, making it convenient for users to perform subsequent processing in a timely manner.

[0236] It should be noted that the apparatus provided in the above embodiments is merely exemplified by the division of the above functional modules. In actual applications, the above functions can be distributed among different functional modules as needed, that is, the internal structure of the apparatus can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments are based on the same concept. The implementation process is detailed in the method embodiments and will not be repeated here.

[0237] Please refer to FIG13 , which shows a block diagram of a computer device according to an exemplary embodiment of the present application. The computer device 1300 may include one or more of the following components: a processor 1310 , a memory 1320 , and a display screen 1330 .

[0238] The processor 1310 may include one or more processing cores. The processor 1310 utilizes various interfaces and circuits to connect the various components within the entire computer device 1300. It executes various functions and processes data of the computer device 1300 by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1320, and by calling data stored in the memory 1320. Optionally, the processor 1310 may be implemented in the form of at least one hardware component selected from the group consisting of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 1310 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a neural network processing unit (NPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content required to be displayed on the touch screen; the NPU is used to implement artificial intelligence (AI) functions; and the modem is used to handle wireless communications. It is understandable that the above-mentioned modem may not be integrated into the processor 1310, but may be implemented by a separate chip.

[0239] The memory 1320 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 1320 includes a non-transitory computer-readable storage medium. The memory 1320 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 1320 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc.; the data storage area may store data created according to the use of the computer device 1300 (such as audio data, a phone book), etc.

[0240] Display screen 1330 is a component for displaying images. Optionally, display screen 1330 also has a touch function, and a user can control the displayed content by performing touch operations on display screen 1330. For example, display screen 1330 is a touch screen display of a smartphone, or display screen 1330 is a non-touch screen display of a television terminal.

[0241] In addition, those skilled in the art will appreciate that the structure of the computer device 1300 shown in the above figures does not constitute a limitation of the computer device. The computer device may include more or fewer components than shown, or may combine certain components or arrange the components differently. For example, the computer device 1300 may also include a camera, a microphone, a speaker, a radio frequency circuit, an input unit, sensors (such as an accelerometer, an angular velocity sensor, a light sensor, etc.), an audio circuit, a WiFi module, a power supply, a Bluetooth module, and other components, which will not be described in detail here.

[0242] An embodiment of the present application also provides a computer-readable storage medium, which stores at least one program code, and the program code is loaded and executed by a processor to implement the screen projection method described in the above embodiments.

[0243] An embodiment of the present application provides a computer program product, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the screen projection method provided in various optional implementations of the above aspects.

[0244] It should be understood that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. In addition, the step numbers described in this article only illustrate a possible execution sequence between the steps. In some other embodiments, the above steps may not be executed in the order of the numbers, such as two steps with different numbers are executed at the same time, or two steps with different numbers are executed in the opposite order to the diagram. The embodiments of the present application do not limit this.

[0245] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A screen projection method, the method being executed by a source device, the method comprising: In the screen projection state, the screen off duration is set from the first duration to the second duration, where the screen off duration is the duration during which the source device automatically enters the screen off state, and the second duration is greater than the first duration; When the target duration is reached, controlling the screen to turn off, wherein the source device does not enter the screen-off state after the screen turns off, and the target duration is less than the second duration; When the screen is off and the second duration has not been reached, the screen projection data stream transmission between the target device is maintained.

2. The method according to claim 1, wherein The method further comprises: When the third duration is reached, the screen brightness is adjusted from the first brightness to the second brightness, the third duration is less than the target duration, and the second brightness is less than the first brightness.

3. The method according to claim 2, wherein: The adjusting the screen brightness from the first brightness to the second brightness includes: When the brightness adjustment mode is the first adjustment mode, setting the brightness adjustment mode to the second adjustment mode, wherein in the first adjustment mode, the function of automatically adjusting the screen brightness based on the ambient light brightness is turned on, and in the second adjustment mode, the function of automatically adjusting the screen brightness based on the ambient light brightness is turned off; In the second adjustment mode, the screen brightness is automatically adjusted from the first brightness to the second brightness.

4. The method according to claim 3, wherein: The method further comprises: When a screen-lighting event is detected, the screen is turned on, wherein the screen displayed after the screen is turned on is a non-lock screen screen, and the screen-lighting event is an event that triggers the screen to light up; The screen brightness is set to the first brightness, and the brightness adjustment mode is set to the first adjustment mode.

5. The method according to claim 2, wherein: When the third duration is reached, adjusting the screen brightness from the first brightness to the second brightness includes: When the third duration is reached and no target event is detected, adjusting the screen brightness from the first brightness to the second brightness, wherein the target event has a function of keeping the screen of the source device in a bright state; The method further comprises: If the target duration is not reached and the target event is detected, the screen brightness is adjusted to the first brightness.

6. The method according to any one of claims 1 to 5, wherein: When the target duration is reached, controlling the screen to turn off includes: When the target duration is reached and no target event is detected, the screen is controlled to turn off. The target event has the function of keeping the screen of the source device in a bright state. The method further comprises: When the target event is detected within the target duration, the screen is kept on and the countdown timer is reset. The countdown timer has the target duration.

7. The method according to any one of claims 1 to 5, wherein: The method further comprises: When a screen lock event is detected within the target duration, the screen-off state is entered, wherein the screen projection data stream transmission between the source device and the destination device is interrupted in the screen-off state.

8. The method according to claim 7, wherein: When a screen lock event is detected within the target duration, entering the screen off state includes: When the lock screen event is monitored within the target duration, a lock screen message is sent to the destination device so that the destination device displays a lock screen prompt screen based on the lock screen message; Enter the screen-off state.

9. The method according to claim 7, wherein: The method further comprises: In the screen-off state, when a screen-on event is detected, the screen is turned on and the lock screen interface is displayed, where the screen-on event is an event that triggers the screen to turn on; If the unlocking is successful, the screen projection data stream transmission between the target device is resumed.

10. The method according to any one of claims 1 to 5, wherein: The method further comprises: When the screen is off and the second duration has not been reached, receiving a reverse control instruction sent by the destination device, where the reverse control instruction is used to reversely control the source device; Execute the reverse control operation indicated by the reverse control instruction.

11. The method according to any one of claims 1 to 5, wherein: The method further comprises: When exiting the screen projection state, the screen off duration is set to the first duration.

12. A screen projection device, comprising: A duration setting module, used to set the screen-off duration from a first duration to a second duration in the screen-casting state, wherein the screen-off duration is the duration during which the source device automatically enters the screen-off state, and the second duration is greater than the first duration; a screen control module, configured to control the screen to turn off when a target duration is reached, wherein the source device does not enter the screen-off state after the screen turns off, and the target duration is less than the second duration; The data transmission module is used to maintain the screen projection data stream transmission between the target device and the target device when the screen is off and the second time duration has not been reached.

13. The device according to claim 12, wherein The screen control module is further configured to adjust the screen brightness from the first brightness to the second brightness when a third duration is reached, the third duration being less than the target duration, and the second brightness being less than the first brightness.

14. The device according to claim 13, wherein The screen control module is used to: When the brightness adjustment mode is the first adjustment mode, setting the brightness adjustment mode to the second adjustment mode, wherein in the first adjustment mode, the function of automatically adjusting the screen brightness based on the ambient light brightness is turned on, and in the second adjustment mode, the function of automatically adjusting the screen brightness based on the ambient light brightness is turned off; In the second adjustment mode, the screen brightness is automatically adjusted from the first brightness to the second brightness.

15. The device according to claim 14, wherein The screen control module is further configured to light up the screen when a screen light-up event is detected, wherein the screen displayed after the screen is lit up is a non-lock screen screen, and the screen light-up event is an event that triggers the screen light-up; The screen brightness is set to the first brightness, and the brightness adjustment mode is set to the first adjustment mode.

16. The device according to claim 13, wherein The screen control module is used to: When the third duration is reached and no target event is detected, adjusting the screen brightness from the first brightness to the second brightness, wherein the target event has a function of keeping the screen of the source device in a bright state; If the target duration is not reached and the target event is detected, the screen brightness is adjusted to the first brightness.

17. The device according to any one of claims 12 to 16, wherein: The screen control module is used to: When the target duration is reached and no target event is detected, the screen is controlled to turn off. The target event has the function of keeping the screen of the source device in a bright state. When the target event is detected within the target duration, the screen is kept on and the countdown timer is reset. The countdown timer has the target duration.

18. The device according to any one of claims 12 to 16, wherein: The device further comprises: The screen lock and screen off module is used to enter the screen off state when a screen lock event is monitored within the target duration, wherein the screen projection data stream transmission between the source device and the destination device is interrupted in the screen off state.

19. The device according to claim 18, wherein The screen lock and screen off module is used to: When the lock screen event is monitored within the target duration, a lock screen message is sent to the destination device so that the destination device displays a lock screen prompt screen based on the lock screen message; Enter the screen-off state.

20. The apparatus according to claim 18, wherein The lock screen off module is used to light up the screen and display the lock screen interface when a screen light event is detected in the screen off state. The screen light event is an event that triggers the screen to light up. The data transmission module is used to resume the screen projection data stream transmission between the target device and the target device when the unlocking is successful.

21. The device according to any one of claims 12 to 16, wherein: The device further comprises: The data transmission module is configured to receive a reverse control instruction sent by the destination device when the screen is off and the second duration has not been reached, wherein the reverse control instruction is used to reversely control the source device; The operation execution module is used to execute the reverse control operation indicated by the reverse control instruction.

22. The device according to any one of claims 12 to 16, wherein: The screen control module is used to set the screen off duration to the first duration when exiting the screen projection state.

23. A screen projection system, comprising a source device and a destination device; The source device is configured to set the screen-off duration from a first duration to a second duration in the screen projection state, wherein the screen-off duration is the duration during which the source device automatically enters the screen-off state, and the second duration is greater than the first duration; When the target duration is reached, the screen is controlled to turn off, wherein the source device does not enter the screen-off state after the screen is turned off, and the target duration is less than the second duration; when the screen is turned off and the second duration is not reached, the screen projection data stream transmission between the source device and the destination device is maintained; The destination device is used to receive the audio and video data stream transmitted by the source device while maintaining the transmission of the projection data stream between the destination device and the source device; and play the projection content based on the audio and video data stream.

24. The screen projection system according to claim 23, wherein: The screen projection data stream transmitted between the source device and the destination device also includes reverse control instructions; The destination device is further configured to receive a reverse control operation on the projected content when the screen of the source device is off and the second duration has not been reached; Sending a reverse control instruction to the source device based on the reverse control operation; The source device is configured to execute the reverse control operation indicated by the reverse control instruction.

25. The screen projection system according to claim 23, wherein: The source device is further configured to enter the screen-off state when a screen lock event is detected within the target duration, wherein the screen projection data stream transmission between the source device and the destination device is interrupted in the screen-off state; The destination device is further configured to display a lock screen prompt when the source device enters a screen-off state.

26. The screen projection system according to claim 25, wherein: The source device is further configured to send a screen lock message to the destination device when the screen lock event is detected within the target duration; The destination device is used to display the lock screen prompt image based on the lock screen message.

27. The screen projection system according to claim 25, wherein: The source device is also used to light up the screen and display the lock screen interface when the screen is off and a screen light event is detected. The screen light event is an event that triggers the screen to light up; when the unlocking is successful, the screen projection data stream transmission between the source device and the destination device is resumed.

28. A computer device comprising a processor and a memory; the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the screen projection method as described in any one of claims 1 to 11.

29. A computer-readable storage medium, wherein at least one program code is stored in the computer-readable storage medium, and the program code is loaded and executed by a processor to implement the screen projection method as described in any one of claims 1 to 11.

30. A computer program product, comprising computer instructions, wherein the computer instructions are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device implements the screen projection method as described in any one of claims 1 to 11.