Data sharing method, data sharing equipment and electronic equipment

By establishing a second communication link between electronic devices and capturing and sending operation information of input devices, the problem of data sharing interruption caused by screen out of the sharing party device is solved, and automatic recovery and continuity of data sharing are realized.

CN119996478AActive Publication Date: 2025-05-13LENOVO (BEIJING) LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411977459.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-05-13
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

In the data sharing scheme of two or more electronic devices, if the sharing device turns off, the shared data is interrupted, resulting in data sharing not being able to proceed normally.

Method used

By establishing a second communication link between the input device of the first device and the second device, the operation information of the input device of the first device to the target area is captured, and encapsulated as a target input event, and sent to the second device to restore the transmission of screen shared data.

Benefits of technology

It realizes automatic recovery of data sharing when the sharing device is turned off to ensure the continuity and stability of data sharing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996478A_ABST
    Figure CN119996478A_ABST
Patent Text Reader

Abstract

The invention discloses a data sharing method and electronic equipment. The method comprises the following steps: establishing a first communication link between first equipment and second equipment; establishing a second communication link between the input device of the first device and the second device; obtaining screen sharing data from the second equipment based on the first communication link, and displaying the screen sharing data to a target area of a display screen of the first equipment; under the condition that the screen sharing data of the target area disappears, target operation information of an input device of the first device on the target area is obtained, a target input event of the input device is sent to the second device based on the second communication link, the target input event is used for representing the target operation information, and the target input event is used for representing the target operation information. And the second equipment recovers to send the screen sharing data based on the target input event.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic equipment, and in particular to a data sharing method, a data sharing device and an electronic device. Background Art

[0002] In a data sharing solution between two or more electronic devices, if the screen of the sharing device is turned off, the shared data sent by the sharing device to the shared device will be interrupted, and data sharing cannot be carried out normally. How to simply and effectively realize data sharing recovery has become a technical problem that needs to be solved urgently. Summary of the invention

[0003] The present application provides a data sharing method, a data sharing device and an electronic device to at least solve the above technical problems existing in the prior art.

[0004] According to a first aspect of the present application, a data sharing method is provided, which is applied to a first device, and the method includes:

[0005] Establishing a first communication link between the first device and the second device;

[0006] establishing a second communication link between the input device of the first device and the second device;

[0007] Obtaining screen sharing data from the second device based on the first communication link, and displaying the screen sharing data on a target area of ​​the display screen of the first device;

[0008] When the screen sharing data of the target area disappears, the target operation information of the input device of the first device on the target area is obtained, and a target input event of the input device is sent to the second device based on the second communication link, wherein the target input event is used to characterize the target operation information, so that the second device resumes sending the screen sharing data based on the target input event.

[0009] In one possible implementation manner, obtaining target operation information of an input device of the first device on the target area includes:

[0010] Obtain operation information of an input device of a first device, identify that the operation information belongs to a target window corresponding to a target area, determine the operation information as target operation information for operating a second device, and encapsulate the target operation information into the target input event that complies with a preset protocol format, so that the second device recognizes the target operation information of the input device of the first device based on the target input event.

[0011] In one embodiment, the method further comprises:

[0012] The target operation information is processed to obtain the target input event, wherein the target operation information includes first coordinate information of a target area, and the first coordinate information of the target area is mapped to second coordinate information of a screen sharing information area of ​​the second device.

[0013] In one possible implementation, obtaining target operation information of an input device of the first device on the target area, and sending a target input event of the input device to the second device based on the second communication link includes:

[0014] When the screen of the second device is off, first operation information of the input device of the first device on the target area is obtained, and a first input event of the input device is sent to the second device based on the second communication link, where the first input event is used to characterize the first operation information, so that the second device lights up the display screen of the second device based on the first input event, and the lighting state of the display screen of the second device enables the second device to resume sending screen sharing data.

[0015] In one possible implementation, obtaining target operation information of an input device of the first device on the target area, and sending a target input event of the input device to the second device based on the second communication link includes:

[0016] When the screen of the second device is off or the display screen of the second device is on, second operation information of the input device of the first device on the target area is obtained, and a second input event of the input device is sent to the second device based on the second communication link, where the second input event is used to characterize the second operation information, so that the second device displays a second unlocking interface based on the second input event, and controls the display screen of the first device to display a first unlocking interface, where the second unlocking interface is different from the first unlocking interface; the second unlocking interface displayed by the second device enables the second device to resume sending screen sharing data.

[0017] In one embodiment, the method further comprises:

[0018] When the second device displays the second unlock interface, obtain third operation information of the input device of the first device on the first unlock interface, and send a third input event of the input device to the second device based on the second communication link, where the third input event is used to represent the third operation information, so that the second device unlocks the second unlock interface and displays the target interface based on the third input event;

[0019] When the second device displays the target interface, generating a screen sharing data recovery request, and transmitting the recovery request to the second device, so that the second device generates authorization prompt information based on the recovery request;

[0020] generating authorization response information for the authorization prompt information, and transmitting the authorization response information to the second device, wherein the authorization response information can be responded by the second device to restore the first communication link;

[0021] The screen sharing data is obtained from the second device through the restored first communication link, and the screen sharing data is displayed in the target area. According to a second aspect of the present application, a data sharing method is provided, which is applied to the second device, and the method includes:

[0022] Establishing a first communication link between the first device and the second device;

[0023] establishing a second communication link between the first device input device and the second device;

[0024] Sending screen sharing data to the first device based on the first communication link to display the screen sharing data on a target area of ​​a display screen of the first device;

[0025] In response to the display screen of the second device switching from a first state to a target state, stopping sending the screen sharing data, wherein the power consumption of the display screen in the first state is higher than the power consumption of the display screen in the target state;

[0026] In response to receiving a target input event of the input device sent by the first device through the second communication link, the display screen is controlled to switch from the target state to the first state to resume sending the screen sharing data.

[0027] In one embodiment, the method further comprises:

[0028] The target input event is parsed to obtain second coordinate information of the screen sharing information area of ​​the second device, wherein the second coordinate information is obtained by mapping the input device of the first device to the first coordinate information of the target area.

[0029] In one possible implementation, in response to receiving a target input event of the input device sent by the first device through the second communication link, controlling the display screen to switch from the target state to the first state to resume sending screen sharing data includes at least one of the following solutions:

[0030] When the display screen of the second device is in a screen-off state, in response to receiving a first input event of the input device sent by the first device through the second communication link, based on the first input event, lighting up the display screen of the second device, so as to switch the display screen of the second device from a target state to a first state; wherein the first input event is obtained by the first device generating first operation information on a target area by the input device of the first device when the second device is in a screen-off state;

[0031] When the display screen of the second device is in an off state or the display screen of the second device is in an on state, in response to receiving a second input event of the input device sent by the first device through the second communication link, a second unlocking interface is displayed based on the second input event to switch the display screen of the second device from the target state to the first state; wherein the second input event is second operation information generated by the input device of the first device on the target area when the second device is in an off state or the display screen of the second device is in an on state; the second operation information is used to control the display screen of the first device to display a first unlocking interface, and the second unlocking interface is different from the first unlocking interface.

[0032] According to a third aspect of the present application, an electronic device is provided, comprising: a display screen for displaying screen sharing data, an input device for generating target operation information, and

[0033] A first communication module, used to establish a first communication link with a second device;

[0034] A second communication module, used to establish a second communication link between the input device and the second device;

[0035] A processor, which obtains screen sharing data from the second device based on the first communication link, and controls display of the screen sharing data on a target area of ​​a display screen of the first device;

[0036] The processor is also used to: when the screen sharing data of the target area disappears, obtain the target operation information of the input device of the first device on the target area, and send the target input event of the input device to the second device based on the second communication link, wherein the target input event is used to characterize the target operation information, so that the second device resumes sending the screen sharing data based on the target input event.

[0037] According to a fourth aspect of the present application, an electronic device is provided, comprising: a display screen and

[0038] A first communication module, used to establish a first communication link with a first device;

[0039] A second communication module, used to establish a second communication link with an input device of the first device;

[0040] A processor, configured to send screen sharing data to the first device based on the first communication link, so as to display the screen sharing data on a target area of ​​a display screen of the first device;

[0041] The processor is further configured to stop sending screen sharing data in response to the display screen switching from a first state to a target state, wherein the power consumption of the display screen in the first state is higher than the power consumption of the display screen in the target state;

[0042] The processor is further configured to control the display screen to switch from the target state to the first state to resume sending screen sharing data in response to receiving a target input event of the input device sent by the first device through the second communication link.

[0043] According to a fifth aspect of the present application, there is provided an electronic device, including:

[0044] at least one processor; and

[0045] a memory communicatively connected to the at least one processor; wherein,

[0046] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the present application.

[0047] According to a sixth aspect of the present application, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the present application.

[0048] According to a seventh aspect of the present application, a computer program product is provided, comprising a computer program or instructions, which implement the method described in the present application when executed by a processor.

[0049] In the present application, when the screen shared data disappears, based on the operation of the input device of the first device on the target area that originally displayed the shared data, the input event corresponding to the operation is sent to the second device through the second communication link established between the input device and the second device, so as to realize the sharing recovery of the screen shared data. This is a solution for recovering shared data based on the operation of the input device of the first device and the second communication link between the input device of the first device and the second device, and is a simple and effective solution for realizing data sharing recovery.

[0050] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become readily understood. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, wherein:

[0052] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.

[0053] Figure 1 The following is a schematic diagram showing the implementation process of the data sharing method in the embodiment of the present application. Figure 1 ;

[0054] Figure 2 The following is a schematic diagram showing the implementation process of the data sharing method in the embodiment of the present application. Figure 2 ;

[0055] Figure 3 The following is a schematic diagram showing the implementation process of the data sharing method in the embodiment of the present application. Figure 3 ;

[0056] Figure 4 The following is a schematic diagram showing the implementation process of the data sharing method in the embodiment of the present application. Figure 4 ;

[0057] Figure 5 A schematic diagram of the composition structure of the first device in an embodiment of the present application is shown;

[0058] Figure 6 A schematic diagram of the composition structure of the second device in an embodiment of the present application is shown;

[0059] Figure 7 A schematic diagram of the structure of an electronic device in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0060] In order to make the purpose, features, and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0061] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0062] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0063] In the following description, the terms "first\second" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0064] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0065] It should be understood that in the various embodiments of the present application, the size of the serial number of each implementation process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0066] The first device and the second device in this application can be any reasonable electronic device capable of data sharing. For example, the first device and the second device can be any type of device such as a laptop, a desktop, a tablet, a smart phone, a wearable device, etc. Further, as a shared device, the first device can be a laptop, a desktop, or a tablet. As a sharing device, the second device can be a smart phone, a wearable device such as a smart watch, etc.

[0067] In the present application, two communication links are included: a first communication link and a second communication link. The first device obtains screen sharing data from the second device using the first communication link. In the case where the screen sharing data disappears, based on the operation generated by the input device of the first device on the target area that originally displayed the shared data, the input event corresponding to the operation is sent to the second device through the second communication link, thereby realizing the sharing recovery of the screen sharing data. In simple terms, the recovery of shared data is realized based on the operation of the input device of the first device and the second communication link between the input device of the first device and the second device, which provides a technical support for the recovery of data sharing between devices and is a simple and effective solution to realize data sharing recovery.

[0068] Figure 1 The following is a schematic diagram showing the implementation process of the data sharing method in the embodiment of the present application. Figure 1 The data sharing method is applied to the first device, such as Figure 1 As shown, the method includes:

[0069] S101: Establish a first communication link between a first device and a second device.

[0070] S102: Establish a second communication link between the input device of the first device and the second device.

[0071] The present application involves two communication links: a first communication link and a second communication link. Among them, the first communication link is a link that facilitates data sharing between two devices, referred to as a shared link. For example, the second device sends shared data to the first device through the first communication link to realize the sharing of the data of the second device at the first device. The second communication link is a (second) communication link established between the input device of the first device and the second device. In the case where the second device cannot share data to the first device, the second communication link is used to realize the recovery of data sharing.

[0072] In the present application, there is no strict order for establishing the first communication link and the second communication link, and they can be established simultaneously.

[0073] S103: Obtain screen sharing data from the second device based on the first communication link, and display the screen sharing data on a target area of ​​the display screen of the first device.

[0074] In the present application, the second device sends (screen) shared data to the first device via a shared link. The first device receives the shared data transmitted from the second device via the shared link. The screen shared data is displayed on a display screen. The display screen of the first device includes an area dedicated to displaying the shared data, which area can be regarded as a target area. The first device displays the shared data in the target area of ​​the display screen.

[0075] In the present application, the shared data shared by the second device to the first device may be document data, page data, or application data. For example, social application data, phone application data, and short message application data. The first device and the second device may be two different devices belonging to the same user, or may be devices belonging to different users. If the shared data is document data or page data, the second device shares the data with the first device, and the data of the first user may be shared with the second user. If the shared data is social application data, phone application data, short message application data, etc., and the first device and the second device may be two devices belonging to the same user, the second device will share the data with the first device. When it is inconvenient to reply to the application data using the second device, the first device may be used to reply to the application data, such as answering a call or replying to a message.

[0076] S104: When the screen sharing data of the target area disappears, obtain the target operation information of the input device of the first device on the target area, and send the target input event of the input device to the second device based on the second communication link, where the target input event is used to characterize the target operation information, so that the second device resumes sending the screen sharing data based on the target input event.

[0077] In the present application, because the first device shares data from the second device, from the second device side, when the display screen of the second device is displayed in the first state, the second device sends screen sharing data to the first device based on the first communication link to display the screen sharing data on the target area of ​​the display screen of the first device. In the case where the display screen of the first device switches from the first state to the target state, the second device responds to the display screen switching from the first state to the target state, the first communication link is disconnected, and the screen sharing data is stopped from being sent to the first device. The power consumption of the display screen in the first state is higher than the power consumption of the display screen in the target state. If the first state is the lighting state of the display screen of the second device, the target state is the off state of the display screen.

[0078] The first communication link is disconnected, and the second device cannot send screen sharing data to the first device. On the first device side, the screen sharing data of the target area of ​​the display screen disappears. Detect the (target) operation of the input device of the first device on the target area. Because the second communication link is a link established between the input device of the first device and the second device, for the operation of the input device on the target area detected by the first device, the target input event of the input device can be sent to the second device through the second communication link.

[0079] On the second device side, in response to receiving a target input event of the input device sent by the first device through the second communication link, the display screen is controlled to switch from the target state to the first state. The first communication link is restored when the display screen switches from the target state to the first state, and the second device can continue to share data with the first device through the first communication link, thereby realizing the restoration of screen sharing.

[0080] It can be understood that in the present application, the input device is an input device located at the first device. For example, a mouse, a keyboard, etc. In the data sharing scheme of the present application, the operation of the target area generated by the input device on the first device side on the first device side is sent to the second device through the second communication link established between the input device and the second device, as an operation to restore the sending of shared data at the second device. Through the operation and the (second communication) link, the shared recovery of the screen data is realized, which is a simple and effective solution with high feasibility and easy implementation.

[0081] In summary, in S101 to S104, when the screen sharing data disappears, based on the operation of the input device of the first device on the target area that originally displayed the shared data, the input event corresponding to the operation is sent to the second device through the second communication link established between the input device and the second device, so as to realize the sharing recovery of the screen sharing data. This is a solution for recovering shared data based on the operation of the input device of the first device and the second communication link between the input device of the first device and the second device, and is a simple and effective solution for realizing data sharing recovery.

[0082] In some embodiments, the aforementioned obtaining of target operation information of the input device of the first device on the target area may be: obtaining operation information of the input device of the first device, identifying that the operation information belongs to the target window corresponding to the target area, determining the operation information as target operation information for operating the second device, and encapsulating the target operation information into a target input event that conforms to a preset protocol format, so that the second device recognizes the target operation information of the input device of the first device based on the target input event.

[0083] In the present application, if the shared data shared from the second device to the first device is regarded as the projection data from the second device to the first device, the target area can be the projection area. The first device displays the projection data in the projection area through a projection window. When the screen sharing data of the first device disappears, the user generates an operation through the input device of the first device, and the first device detects the operation generated by the input device and identifies whether the operation is within the target area. If it is within the target area, it is identified that the operation belongs to the target window corresponding to the target area. The operation is an operation generated for the projection window, and the operation generated for the projection window is determined as the target operation. The target operation information is encapsulated into a target input event that complies with the HID (Human Interface Device) protocol format (preset protocol format) to transmit the target input event to the second device through a second communication link.

[0084] In this application, the target operation is identified by identifying whether the operation information belongs to the target window corresponding to the target area, which ensures the accuracy of the recognition of the projection window operation and provides a certain guarantee for the recovery of screen sharing. The target operation information is encapsulated in the HID protocol format, which is convenient for transmission through the second communication link and also facilitates the recognition of the target operation information by the second device.

[0085] The target operation generated by the input device can be an operation to light up the display screen of the second device, or can be an operation to keep the display screen of the second device in a lit state (such as the presentation operation of the unlock interface, the unlock operation of the unlock interface). The second device decapsulates the target input event according to the HID protocol format to identify the target operation. Under the action of the target operation, the display screen of the second device switches from the off state to the lit state, the first communication link is restored, and the second device can continue to share data to the first device through the first communication link, realizing the recovery and sending of screen sharing.

[0086] In some embodiments, the data sharing method further includes: processing target operation information to obtain target input events, wherein the target operation information includes first coordinate information of the target area, and mapping the first coordinate information of the target area to second coordinate information of the screen sharing information area of ​​the second device.

[0087] In the present application, the target operation on the target area generated by the input device on the first device side can be used as an operation to resume the transmission of shared data at the second device. Because the size, dimension, resolution, etc. of the target area on the first device side and the screen sharing information area on the second device side are different, the mapping relationship between the two areas of the two devices is pre-calculated. Through the mapping relationship, the position information of the target operation in the target area of ​​the first device can be known to obtain the position information of the operation mapped from the first device to the second device in the screen sharing information area of ​​the second device.

[0088] The first device in the present application detects the position information (first coordinate information) of the target operation in the target area, and calculates the position information (second coordinate information) in the second device through a mapping relationship, encapsulates the position information, and sends the encapsulated target input event to the second device through a second communication link. The second device parses the target input event to obtain the second coordinate information of the screen sharing information area of ​​the second device to achieve accurate operation at the position in the second device. For example, the operation of the light-up key at the position is achieved to light up the display screen, or the input of the unlock password at the position is achieved to unlock.

[0089] In some embodiments, the implementation of the aforementioned S104 may include the following situations:

[0090] Scenario 1: When the screen of the second device is off, the first operation information of the input device of the first device on the target area is obtained, and a first input event of the input device is sent to the second device based on the second communication link. The first input event is used to characterize the first operation information, so that the second device lights up the display screen of the second device based on the first input event. The lighting state of the display screen of the second device enables the second device to resume sending screen sharing data.

[0091] The screen of the second device turns off, the first communication link is disconnected, the second device stops sending shared data to the first device, and data sharing from the second device to the first device is interrupted.

[0092] In scenario one, the first operation information may be an operation generated by an input device of the first device for lighting up the second display screen. The (first) input event encapsulated with the operation is sent to the second device via the second communication link. The second device parses the input event and identifies that the operation generated by the current input device on the first device side is an operation to light up the display screen of the second device. The second device responds to the operation by switching the display screen from an off state to a lit state. When the second device is in the lit state, the shared link can be re-established through the shared link establishment process, so that the shared data of the second device can be shared at the first device through the re-established shared link. In layman's terms, the scenario one solution is a solution that can restore data sharing by lighting up the screen.

[0093] Scenario 2: When the screen of the second device is off or the display screen of the second device is on, second operation information of the input device of the first device on the target area is obtained, and a second input event of the input device is sent to the second device based on the second communication link. The second input event is used to characterize the second operation information, so that the second device displays a second unlock interface based on the second input event, and controls the display screen of the first device to display the first unlock interface, and the second unlock interface is different from the first unlock interface; the second unlock interface displayed by the second device can enable the second device to resume sending screen sharing data.

[0094] In scenario 2, the second operation information may be an operation generated by the input device of the first device for presenting the unlocking interface of the second device. The operation may be generated when the screen of the second device is off, and data sharing is restored when the screen is turned on. Adapted to this situation: In actual applications, when the screen of the terminal device is off, the terminal device can be switched directly from the screen-off state to the unlocking interface by clicking a button or a virtual key, thereby turning on the screen.

[0095] The second operation may also be generated when the display screen of the second device is turned on, which is suitable for first turning on the screen and then presenting the unlock interface and then resuming data sharing.

[0096] Based on this, in the present application, the first device encapsulates the detected operation (second operation information) that can present the unlocking interface of the second device into a (second) input event and sends it to the second device through the second communication link. The second device parses the input event and identifies that the operation generated by the current input device on the first device side is an operation that causes the second device to present the (second) unlocking interface. The second device responds to the operation and switches the display screen from an off state to a state that presents the unlocking interface.

[0097] The first device detects the second operation information generated by the input device, responds to the second operation, and presents an unlocking interface (first unlocking interface) in the target area. The unlocking interface of the first device is presented mainly to facilitate the user to simulate the input of the unlocking password or password on the second device side on the first device side. In order to distinguish the two unlocking interfaces of the first device and the second device, an unlocking interface different from the unlocking interface on the second device side needs to be drawn on the first device side in this application and used as the unlocking interface of the first device.

[0098] When the second device presents the unlock interface, it is in a lighted state, and the shared link can be re-established through the shared link establishment process, so that the shared data at the second device can be shared at the first device through the re-established shared link. In addition, it is also possible to:

[0099] When the second device displays the second unlock interface, third operation information of the input device of the first device on the first unlock interface is obtained, and a third input event of the input device is sent to the second device based on the second communication link, where the third input event is used to represent the third operation information, so that the second device unlocks the second unlock interface based on the third input event to display the target interface; when the second device displays the target interface, a screen sharing data recovery request is generated, and the recovery request is transmitted to the second device, so that the second device generates authorization prompt information based on the recovery request; authorization response information is generated for the authorization prompt information, and the authorization response information is transmitted to the second device, where the authorization response information can be responded to by the second device to restore the first communication link; screen sharing data is obtained from the second device through the restored first communication link, and the screen sharing data is displayed to the target area.

[0100] The third operation information may be an operation generated by the input device of the first device for unlocking the unlock interface of the second device. For example, the operation of inputting the unlock password or password of the second device. The user may input the unlock password or password in the unlock interface of the first device through the input device. The (third) input event encapsulated with the operation is sent to the second device through the second communication link. The second device parses the input event and identifies that the operation generated by the current input device on the first device side is an operation of inputting the unlock password or password into the unlock interface of the second device. The second device responds to the operation, unlocks the unlock interface based on the input unlock password, and enters the main page (target page) of the second device.

[0101] In the present application, the second device parses the third input event, analyzes the position information of each input password or input password obtained by the first device after processing in the second device, and inputs the input password on the second device side according to the position information of each input password. The input of each input password or password at the first device is equivalent to inputting each input password or password into each corresponding position of the second device, thereby unlocking the unlocking interface of the second device.

[0102] When the second device displays the target interface, a screen sharing data recovery request is generated, and the recovery request is transmitted to the second device to re-establish the shared link. The second device generates authorization prompt information based on the recovery request. The first device generates authorization response information for the authorization prompt information based on the historical authorization response information. If the historical authorization response information is to allow authorization, the first device generates authorization response information to allow authorization. The first device transmits such authorization response information to the second device, and the shared link can be re-established through the shared link establishment process to restore the first communication link. When the first communication link is restored, the second device shares data to the first device through the first communication link. In this way, data sharing recovery is achieved simply and effectively.

[0103] Scenario 3: When the screen of the second device is off, the first operation information of the input device of the first device on the target area is obtained, and a first input event of the input device is sent to the second device based on the second communication link. The first input event is used to represent the first operation information, so that the second device lights up the display screen of the second device based on the first input event. When the second device is on, the second operation information of the input device of the first device on the target area is obtained, and a second input event of the input device is sent to the second device based on the second communication link. The second input event is used to represent the second operation information, so that the second device displays a second unlocking interface based on the second input event, and controls the display screen of the first device to display the first unlocking interface, and the second unlocking interface is different from the first unlocking interface. When the second device displays the second unlock interface, obtain the third operation information of the input device of the first device on the first unlock interface, and send the third input event of the input device to the second device based on the second communication link, the third input event is used to represent the third operation information, so that the second device unlocks the second unlock interface based on the third input event to display the target interface; when the second device displays the target interface, generate a screen sharing data recovery request, transmit the recovery request to the second device, so that the second device generates authorization prompt information based on the recovery request; generate authorization response information for the authorization prompt information, transmit the authorization response information to the second device, and the authorization response information can be responded by the second device to restore the first communication link; obtain screen sharing data from the second device through the restored first communication link, and display the screen sharing data to the target area.

[0104] Generally speaking, scenario one can be regarded as a shared data recovery scheme implemented by the operation of lighting up the second device generated by the input device at the first device and the second communication link. Scenario two can be regarded as a shared data recovery scheme implemented by the operation of presenting the unlocking interface of the second device generated by the input device at the first device and the second communication link. Scenario three can be regarded as a shared data recovery scheme implemented by the operations of lighting up the second device, presenting the unlocking interface, inputting the unlocking password, authorizing and the second communication link generated by the input device at the first device. Of course, in scenario three, the shared data recovery scheme can also be implemented by the operations of lighting up the second device, presenting the unlocking interface, inputting the unlocking password and the second communication link generated by the input device at the first device without the need for authorization. For the understanding of scenario three, please refer to the relevant understanding, and the repetitions will not be repeated.

[0105] It can be understood that the first device is usually a device with a large display screen and is convenient for users to operate, and the second device is usually a device with a small display screen. In the aforementioned situations, the target operation generated by the input device on the first device side is used as an operation to restore the sharable state of the second device or restore the sending of shared data, that is, the input device on the first device side is used as the input device of the second device to restore the sharable state (such as the lighting state) of the second device. This can avoid using the input device of the first device to restore the sharable state of the display screen of the second device when the second device with a small display screen is inconvenient to operate or the second device can only be restored to the sharable state by frequent operation, thereby simply and effectively realizing the recovery of shared data.

[0106] Combine the following Figure 2 and Figure 3 The technical solution of this application is described in detail.

[0107] exist Figure 2 and Figure 3 In the description, the first device is a notebook computer (PC) of Windows system and the second device is a smart phone of Apple system.

[0108] Figure 2 This is a schematic diagram of the implementation process of the data sharing method in this application Figure 2 . The PC runs an application that has a screen sharing function. The mobile phone runs an application (IOS application) that has a screen sharing function. In the case where the PC and the mobile phone each run a screen sharing application,

[0109] S21: The PC side, specifically the PC application, initiates a screen sharing request to the mobile phone side. The request is a request for the PC to establish a first communication link (sharing link) with the mobile phone.

[0110] S22: The mobile phone side, specifically the IOS application, receives the screen sharing request and requests the mobile phone system (IOS system) to call an APK data package that can implement the screen sharing function, so as to implement its own screen sharing function.

[0111] S23: The mobile phone side, specifically the IOS system, synchronizes the APK data package to the IOS application. In addition, the IOS system sends a system authorization notification to the IOS application to learn whether the user on the PC side wants to share the screen.

[0112] S24: On the mobile phone side, specifically the IOS application displays the system authorization notification interface, and the user manually inputs permission to authorize the screen to share this information to the IOS application, and the authorization is passed.

[0113] S25: The sharing link between the PC and the mobile phone is established, and the screen sharing function can be started.

[0114] The PC side, specifically the PC application, has a HOGP service, the HOGP service is turned on, and a second communication link between the input device on the PC side and the mobile phone side is established through the HOGP service.

[0115] In this scenario, the HOGP link may be regarded as the second communication link.

[0116] It can be understood that the HOGP (HID Over GATT Profile) service in this application enables input devices such as a PC's Bluetooth keyboard and mouse to communicate with devices such as a mobile phone that support the HID protocol.

[0117] The PC application has a (screen projection) window, and the shared data transmitted from the mobile phone side to the PC side through the shared link can be displayed in the screen projection window. For example, the mobile phone side with a smaller display screen can share social applications to the PC side with a larger display screen through a shared link. The user can process the shared data through the mouse or keyboard on the PC side. For example, the incoming call notification generated on the mobile phone side will be projected from the mobile phone side to the PC side through the shared link. The user on the PC side uses the mouse to answer the call and answers the incoming call on the mobile phone side from the PC side.

[0118] The above solution can be regarded as a solution in which the PC side and the mobile phone side establish a shared link and a HOGP link to execute the screen sharing process, that is, the first execution of the screen sharing process.

[0119] Figure 3 This is a schematic diagram of the implementation process of the data sharing method in this application Figure 2 .like Figure 3 As shown,

[0120] In this scenario, the screen sharing function of the Apple mobile phone is implemented based on the ReplayKit framework. In this ReplayKit framework, if you want to implement the screen sharing function, you need to keep the mobile phone in the light state. That is, when the mobile phone is in the light state, the mobile phone can transmit the shared data to the PC side through the shared link.

[0121] S31: The mobile phone screen is turned off, i.e., it switches from the on state to the off state, the ReplayKit framework stops working, and the sharing link is disconnected. The mobile phone side, specifically the IOS application, stops sending shared data to the PC side, and screen sharing stops.

[0122] Screen sharing stops and the screen sharing data on the PC disappears.

[0123] When the shared link between the PC and the mobile phone is disconnected, the HOGP link remains connected. In this application scenario, the HOGP link that remains connected and multiple operations generated by the input device on the PC side are used to realize the processes of lighting up the PC screen, presenting the unlocking interface, unlocking the unlocking interface, and authorization, so as to restore the data sharing between the PC and the mobile phone.

[0124] S32: When the screen sharing data on the PC side disappears, it is detected that an operation such as shaking the mouse or tapping the keyboard on the PC side is used to light up the mobile phone display. If it is an operation on the screen projection window on the PC side, then the operation is considered to be a first input operation, and the first input event is transmitted to the mobile phone side, specifically the IOS system, through the HOGP link.

[0125] The mobile phone side, specifically the IOS system, analyzes the first input event, identifies that the operation currently generated on the PC side through the input device is an operation to control the lighting of the mobile phone screen, and then lights up the display screen. The mobile phone display screen switches from the screen off state to the screen lighting state.

[0126] S33: When the mobile phone display screen is on, an operation on the PC side, such as pressing the enter button on the keyboard to display the mobile phone unlocking interface, is detected. If the operation is for the screen projection window on the PC side, then the operation is considered to be a second input operation, and the second input event is transmitted to the mobile phone side, specifically the IOS system, through the HOGP link.

[0127] On the PC side, the PC responds to the second input operation and displays an unlocking interface in the projection window on the PC side. The unlocking interface on the PC side is used to simulate the unlocking interface on the mobile phone side. It is an unlocking interface specially drawn on the PC side and is different from the unlocking interface on the mobile phone side.

[0128] The mobile phone side, specifically the IOS system, parses the second input event, recognizes that the operation currently generated on the PC side through the input device is an operation to control the mobile phone side to present an unlock interface, and then controls the display screen to display the unlock interface.

[0129] S34: When an unlocking interface is displayed on the mobile phone side or a specially drawn unlocking interface is displayed in the projection window on the PC side, an unlocking operation generated by the mouse or keyboard on the PC side is detected, which is an operation on the projection window on the PC side. Then, the operation is considered to be a third input operation, and the third input event is transmitted to the mobile phone side, specifically the IOS system, through the HOGP link.

[0130] The mobile phone side, specifically the IOS system, analyzes the third input event and recognizes that the operation currently generated on the PC side through the input device is an operation to unlock the unlocking interface of the mobile phone, such as inputting an unlocking password, and then uses the unlocking password to unlock the unlocking interface and enter the main page of the IOS system. The IOS application runs on the main page.

[0131] The PC side needs to calculate the position of the unlock password in the unlock interface on the mobile phone side according to the position information (such as coordinates) of the unlock password in the unlock interface on the PC side and the pre-set mapping relationship. The mobile phone side enters the unlock password at the position where the unlock password should appear in the unlock interface on the mobile phone side to unlock the unlock interface.

[0132] S35: When the main page is displayed on the mobile phone, the PC, specifically the PC application, initiates a screen sharing data recovery request to the mobile phone, which indicates that the PC wants to recover the sharing link with the mobile phone.

[0133] S36: The mobile phone side, specifically the IOS application, receives the recovery request and requests the mobile phone system (IOS system) to call an APK data package that can implement the screen sharing function, so as to restore its own screen sharing function.

[0134] S37: On the mobile phone side, specifically, the IOS system synchronizes the APK data package to the IOS application. In addition, the IOS system sends an authorization prompt message to the IOS application to learn whether the user on the PC side wants to share the screen. S38: On the PC side, specifically, the PC application automatically generates authorization response information for the authorization prompt information based on the historical response information. If the user has historically allowed authorization for screen sharing, such as in the first execution of the screen sharing process, the PC side generates the same authorization response information as the historical response information.

[0135] The PC side, specifically the PC application, sends the automatically generated authorization response information to the mobile phone side, specifically the IOS system, through the HOGP link to allow the recovery and restart of screen sharing.

[0136] S35 to S38 can be regarded as realizing the recovery of the shared link through the shared link re-establishment process.

[0137] S39: The shared link between the PC and the mobile phone is restored.

[0138] Screen sharing can start. Data on the mobile phone side can be transmitted to the PC side through the shared link, so that the shared data on the mobile phone side can be displayed in the projection window of the PC application, so as to realize the sharing of data on the mobile phone side on the PC side. After the shared link is restored, the mobile phone side can continue to share the data before the shared link is disconnected to the PC through the IOS application. New data to be shared can also be shared to the PC through the restored shared link.

[0139] Figure 3 The scheme shown corresponds to the aforementioned situation three. The above scheme can be regarded as utilizing the HOGP link that maintains the connection state to realize the transmission of the operations such as lighting up the PC screen, presenting the unlocking interface, unlocking the unlocking interface, and authorization generated by the input device on the PC side from the PC side to the mobile phone side in sequence, so as to utilize the aforementioned operations generated by the input device on the PC side to realize the switching of the display screen on the mobile phone side from the off state to the lit state, thereby realizing the recovery of data sharing between the PC side and the mobile phone side. It is a simple and effective data recovery scheme, which can avoid the situation where the mobile phone side with a smaller display screen is inconvenient to operate or the mobile phone needs to be frequently operated to restore the sharable state, and utilize the input device on the PC side with a larger display screen to realize the recovery of the sharable state of the display screen on the mobile phone side, thereby realizing the recovery of data sharing between the two.

[0140] The solution of the aforementioned scenario 1 may include the solutions shown in S31, S32, and S36 to S39. The solution of the aforementioned scenario 2 may include the solutions shown in S31, S33', and S36 to S39. Among them, S33' is to detect the operation of displaying the mobile phone unlocking interface such as pressing the enter key on the keyboard generated on the PC side when the mobile phone display screen is off, and the rest of the process is similar to the aforementioned S33. It provides a technical support for the data recovery solution.

[0141] Figure 4 The following is a schematic diagram showing the implementation process of the data sharing method in the embodiment of the present application. Figure 4 The data sharing method is applied to the second device, such as Figure 4 As shown, the method includes:

[0142] S401: Establishing a first communication link between a first device and a second device;

[0143] S402: Establishing a second communication link between the first device input device and the second device;

[0144] S403: Sending screen sharing data to the first device based on the first communication link, so as to display the screen sharing data on a target area of ​​the display screen of the first device;

[0145] S404: In response to the display screen of the second device switching from the first state to the target state, stop sending the screen sharing data, wherein the power consumption of the display screen in the first state is higher than the power consumption of the display screen in the target state;

[0146] S405: In response to receiving a target input event of the input device sent by the first device through the second communication link, controlling the display screen to switch from the target state to the first state to resume sending the screen sharing data.

[0147] In S401 to S405, a target input event of an input device sent by the first device is received through the second communication link, and the display screen is switched from the target state to the first state by responding to the target input event, thereby realizing the recovery of shared data. This is a simple and effective solution for data sharing recovery.

[0148] In some embodiments, the data sharing method applied to the second device further includes:

[0149] The target input event is parsed to obtain second coordinate information of the screen sharing information area of ​​the second device, wherein the second coordinate information is obtained by mapping the input device of the first device to the first coordinate information of the target area.

[0150] In some embodiments, the data sharing method applied to the second device, specifically, in response to receiving a target input event of an input device sent by the first device through the second communication link, controlling the display screen to switch from the target state to the first state to resume sending screen sharing data, includes one of the following solutions:

[0151] When the display screen of the second device is in a screen-off state, in response to receiving a first input event of the input device sent by the first device through the second communication link, based on the first input event, lighting up the display screen of the second device, so as to switch the display screen of the second device from a target state to a first state; wherein the first input event is obtained by the first device generating first operation information on a target area by the input device of the first device when the second device is in a screen-off state;

[0152] When the display screen of the second device is in an off state or the display screen of the second device is in an on state, in response to receiving a second input event of the input device sent by the first device through the second communication link, a second unlocking interface is displayed based on the second input event to switch the display screen of the second device from the target state to the first state; wherein the second input event is second operation information generated by the input device of the first device on the target area when the second device is in an off state or the display screen of the second device is in an on state; the second operation information is used to control the display screen of the first device to display a first unlocking interface, and the second unlocking interface is different from the first unlocking interface.

[0153] For the understanding of the data sharing method applied to the second device, please refer to the aforementioned related understanding and will not be repeated here.

[0154] The present application provides a first electronic device, which may be the first device mentioned above. Figure 5 As shown, the electronic device includes: a display screen 501 for displaying screen sharing data, an input device 502 for generating target operation information, and a first communication module 503 for establishing a first communication link with a second device;

[0155] A second communication module 504, used to establish a second communication link between the input device and the second device;

[0156] The processor 505 obtains the screen sharing data from the second device based on the first communication link, and controls display of the screen sharing data on a target area of ​​the display screen 501;

[0157] The processor 505 is also used to: when the screen sharing data of the target area disappears, obtain the target operation information of the input device 502 on the target area, and send the target input event of the input device to the second device based on the second communication link, wherein the target input event is used to characterize the target operation information, so that the second device resumes sending the screen sharing data based on the target input event.

[0158] In some embodiments, the processor 505 is also used to: obtain operation information of the input device 502, identify that the operation information belongs to the target window corresponding to the target area, determine the operation information as target operation information for operating the second device, and encapsulate the target operation information into the target input event that conforms to a preset protocol format, so that the second device recognizes the target operation information of the input device 502 based on the target input event.

[0159] In some embodiments, the processor 505 is also used to: process the target operation information to obtain the target input event, wherein the target operation information includes first coordinate information of the target area, and map the first coordinate information of the target area to second coordinate information of the screen sharing information area of ​​the second device.

[0160] In some embodiments, the processor 505 is also used to: when the second device is in a screen-off state, obtain first operation information of the input device 502 on the target area, and send a first input event of the input device 502 to the second device based on the second communication link, wherein the first input event is used to characterize the first operation information, so that the second device lights up the display screen of the second device based on the first input event, and the lighting state of the display screen of the second device enables the second device to resume sending screen sharing data.

[0161] In some embodiments, the processor 505 is also used to: when the second device is in a screen-off state or the display screen of the second device is in a lit state, obtain second operation information of the input device 502 on the target area, and send a second input event of the input device 502 to the second device based on the second communication link, where the second input event is used to characterize the second operation information, so that the second device displays a second unlocking interface based on the second input event, and controls the display screen 501 of the electronic device to display a first unlocking interface, where the second unlocking interface is different from the first unlocking interface; the second unlocking interface displayed by the second device enables the second device to resume sending screen sharing data.

[0162] In some embodiments, the processor 505 is further used to: when the second device displays the second unlock interface, obtain third operation information of the input device 502 on the first unlock interface, and send a third input event of the input device 502 to the second device based on the second communication link, where the third input event is used to represent the third operation information, so that the second device unlocks the second unlock interface and displays the target interface based on the third input event;

[0163] When the second device displays the target interface, generating a screen sharing data recovery request, and transmitting the recovery request to the second device, so that the second device generates authorization prompt information based on the recovery request;

[0164] generating authorization response information for the authorization prompt information, and transmitting the authorization response information to the second device, wherein the authorization response information can be responded by the second device to restore the first communication link;

[0165] The screen sharing data is obtained from the second device through the restored first communication link, and the screen sharing data is displayed in the target area.

[0166] The present application provides a second electronic device, which may be the aforementioned second device. Figure 6 As shown, the electronic device includes: a display screen 600 and

[0167] The first communication module 601 is used to establish a first communication link with a first device;

[0168] The second communication module 602 is used to establish a second communication link with the input device of the first device;

[0169] The processor 603 is configured to send the screen sharing data to the first device based on the first communication link, so as to display the screen sharing data on a target area of ​​the display screen of the first device;

[0170] The processor 603 is further configured to stop sending screen sharing data in response to the display screen 600 switching from the first state to the target state, wherein the power consumption of the display screen 600 in the first state is higher than the power consumption of the display screen in the target state;

[0171] The processor 603 is further configured to control the display screen 600 to switch from the target state to the first state to resume sending screen sharing data in response to receiving a target input event of the input device sent by the first device through the second communication link.

[0172] In some embodiments, the processor 603 is further configured to:

[0173] The target input event is parsed to obtain second coordinate information of the screen sharing information area, wherein the second coordinate information is obtained by mapping the input device of the first device to the first coordinate information of the target area.

[0174] In some embodiments, the processor 603 is further configured to execute at least one of the following solutions:

[0175] When the display screen 600 is in a screen-off state, in response to receiving a first input event of the input device sent by the first device through the second communication link, based on the first input event, lighting up the display screen 600 to switch the display screen 600 from the target state to the first state; wherein the first input event is first operation information generated by the input device of the first device on the target area when the electronic device is in a screen-off state;

[0176] When the display screen 600 is in a screen-off state or the display screen 600 is in a lit state, in response to receiving a second input event of the input device sent by the first device through the second communication link, a second unlocking interface is displayed based on the second input event to switch the display screen 600 from the target state to the first state; wherein the second input event is second operation information generated by the input device of the first device on the target area when the electronic device is in a screen-off state or the display screen 600 is in a lit state; the second operation information is used to control the display screen of the first device to display a first unlocking interface, and the second unlocking interface is different from the first unlocking interface.

[0177] It should be noted that the two electronic devices (first device and second device) in the embodiments of the present application, since the principle of solving the problem by the electronic devices is similar to the aforementioned data sharing method, the implementation process and implementation principle of the electronic devices can refer to the description of the implementation process and implementation principle of the aforementioned method, and the repeated parts will not be repeated.

[0178] According to an embodiment of the present application, the present application also provides an electronic device and a readable storage medium.

[0179] The electronic device includes at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the data sharing method described in the present application. The computer instructions are used to enable the computer to perform the data sharing method described in the present application.

[0180] The present application also provides a computer program product, including a computer program / instruction, which implements the data sharing method of the present application when executed by a processor.

[0181] Figure 7 A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0182] like Figure 7As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0183] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0184] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as the data sharing method. For example, in some embodiments, the data sharing method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the data sharing method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the data sharing method in any other appropriate manner (e.g., by means of firmware).

[0185] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0186] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0187] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0188] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0189] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0190] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0191] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A data sharing method, applied to a first device, comprising: Establishing a first communication link between the first device and the second device; establishing a second communication link between the input device of the first device and the second device; Obtaining screen sharing data from the second device based on the first communication link, and displaying the screen sharing data on a target area of ​​the display screen of the first device; When the screen sharing data of the target area disappears, the target operation information of the input device of the first device on the target area is obtained, and a target input event of the input device is sent to the second device based on the second communication link, wherein the target input event is used to characterize the target operation information, so that the second device resumes sending the screen sharing data based on the target input event.

2. The method according to claim 1, wherein obtaining target operation information of an input device of the first device on the target area comprises: Obtain operation information of an input device of a first device, identify that the operation information belongs to a target window corresponding to a target area, determine the operation information as target operation information for operating a second device, and encapsulate the target operation information into the target input event that complies with a preset protocol format, so that the second device recognizes the target operation information of the input device of the first device based on the target input event.

3. The method according to claim 2, further comprising: The target operation information is processed to obtain the target input event, wherein the target operation information includes first coordinate information of a target area, and the first coordinate information of the target area is mapped to second coordinate information of a screen sharing information area of ​​the second device.

4. The method according to claim 1, wherein obtaining target operation information of an input device of the first device on the target area and sending a target input event of the input device to the second device based on the second communication link comprises: When the screen of the second device is off, first operation information of the input device of the first device on the target area is obtained, and a first input event of the input device is sent to the second device based on the second communication link, where the first input event is used to characterize the first operation information, so that the second device lights up the display screen of the second device based on the first input event, and the lighting state of the display screen of the second device enables the second device to resume sending screen sharing data.

5. The method according to claim 1, wherein obtaining target operation information of an input device of the first device on the target area and sending a target input event of the input device to the second device based on the second communication link comprises: When the screen of the second device is off or the display screen of the second device is on, second operation information of the input device of the first device on the target area is obtained, and a second input event of the input device is sent to the second device based on the second communication link, where the second input event is used to characterize the second operation information, so that the second device displays a second unlocking interface based on the second input event, and controls the display screen of the first device to display a first unlocking interface, where the second unlocking interface is different from the first unlocking interface; the second unlocking interface displayed by the second device enables the second device to resume sending screen sharing data.

6. The method according to claim 5, further comprising: When the second device displays the second unlock interface, obtain third operation information of the input device of the first device on the first unlock interface, and send a third input event of the input device to the second device based on the second communication link, where the third input event is used to represent the third operation information, so that the second device unlocks the second unlock interface and displays the target interface based on the third input event; When the second device displays the target interface, generating a screen sharing data recovery request, and transmitting the recovery request to the second device, so that the second device generates authorization prompt information based on the recovery request; generating authorization response information for the authorization prompt information, and transmitting the authorization response information to the second device, wherein the authorization response information can be responded by the second device to restore the first communication link; The screen sharing data is obtained from the second device through the restored first communication link, and the screen sharing data is displayed in the target area.

7. A data sharing method, applied to a second device, the method comprising: Establishing a first communication link between the first device and the second device; establishing a second communication link between the first device input device and the second device; Sending screen sharing data to the first device based on the first communication link to display the screen sharing data on a target area of ​​a display screen of the first device; In response to the display screen of the second device switching from a first state to a target state, stopping sending the screen sharing data, wherein the power consumption of the display screen in the first state is higher than the power consumption of the display screen in the target state; In response to receiving a target input event of the input device sent by the first device through the second communication link, the display screen is controlled to switch from the target state to the first state to resume sending the screen sharing data.

8. The method according to claim 7, further comprising: The target input event is parsed to obtain second coordinate information of the screen sharing information area of ​​the second device, wherein the second coordinate information is obtained by mapping the input device of the first device to the first coordinate information of the target area.

9. The method according to claim 7, wherein in response to receiving a target input event of the input device sent by the first device through the second communication link, controlling the display screen to switch from the target state to the first state to resume sending screen sharing data comprises at least one of the following solutions: When the display screen of the second device is in a screen-off state, in response to receiving a first input event of the input device sent by the first device through the second communication link, based on the first input event, the display screen of the second device is lit up to switch the display screen of the second device from the target state to the first state; wherein, The first input event is obtained by first operation information generated by the input device of the first device on the target area when the screen of the second device is turned off; When the display screen of the second device is in a screen-off state or the display screen of the second device is in a light-on state, in response to receiving a second input event of the input device sent by the first device through the second communication link, based on the second input event, displaying a second unlocking interface to switch the display screen of the second device from the target state to the first state; wherein the second input event is obtained by the first device generating second operation information on the target area by the input device of the first device when the second device is in a screen-off state or the display screen of the second device is in a light-on state; The second operation information is used to control the display screen of the first device to display a first unlocking interface, and the second unlocking interface is different from the first unlocking interface.

10. An electronic device, comprising: A display screen for displaying screen sharing data, an input device for generating target operation information, and A first communication module, used to establish a first communication link between the first device and the second device; A second communication module, used to establish a second communication link between the input device of the first device and the second device; A processor, which obtains screen sharing data from the second device based on the first communication link, and controls display of the screen sharing data on a target area of ​​a display screen of the first device; The processor is also used to: when the screen sharing data of the target area disappears, obtain the target operation information of the input device of the first device on the target area, and send the target input event of the input device to the second device based on the second communication link, wherein the target input event is used to characterize the target operation information, so that the second device resumes sending the screen sharing data based on the target input event.

Citation Information

Patent Citations

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

    CN115097926A

  • Device sharing method, second device, first device and system

    CN117667464A

  • Screen projection system and electronic equipment

    CN117908814A

  • Projection screen connection method and device, terminal equipment and computer program product

    CN118803333A

  • Screen projection system and electronic device

    WO2024082871A1