Data sharing method, data sharing device, and electronic device
By establishing a second communication link between the input device of the first device and the second device, and using input events to restore screen sharing data, the problem of data interruption after the screen of the sharing device is turned off is solved, and simple and effective data sharing and recovery between devices is realized.
Patent Information
- Application Number
- CN202411977459.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2044-12-30
AI Technical Summary
In a data sharing scheme involving two or more electronic devices, if the screen of the sharing device is turned off, the shared data is interrupted and cannot be restored normally.
By establishing a second communication link between the input device of the first device and the second device, input events generated based on the input operations of the first device are sent to the second device through this link to restore screen sharing data, including operations such as turning on the display, presenting the unlock interface, and entering the unlock password.
It enables simple and effective resumption of data sharing after the screen of a shared device is turned off, avoiding data interruption caused by the device screen being turned off and improving the reliability of data sharing between devices.
Smart Images

Figure CN119996478B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electronic devices, and in particular to a data sharing method, a data sharing device, and an electronic device. BACKGROUND
[0002] In a data sharing scheme of two or more electronic devices, if a sharing device is turned off, the sharing data sent by the sharing device to the shared device is interrupted, and the data sharing cannot be normally performed. How to simply and effectively realize data sharing recovery has become a technical problem to be solved. SUMMARY
[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 in the prior art.
[0004] According to a first aspect of the present application, a data sharing method is provided, applied to a first device, and the method comprises:
[0005] establishing a first communication link between the first device and a second device;
[0006] establishing a second communication link between an 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 to a target area of a display screen of the first device;
[0008] in a case where the screen sharing data in the target area disappears, obtaining target operation information of the input device of the first device on the target area, sending a target input event of the input device to the second device based on the second communication link, the target input event being used to represent the target operation information, so that the second device resumes sending the screen sharing data based on the target input event.
[0009] In an implementation manner, the obtaining of the target operation information of the input device of the first device on the target area comprises:
[0010] obtaining operation information of the input device of the first device, identifying that the operation information belongs to a target window corresponding to the target area, determining the operation information as target operation information for operating the second device, encapsulating the target operation information into the target input event in a preset protocol format, so that the second device identifies the target operation information of the input device of the first device based on the target input event.
[0011] In an implementation manner, the method further comprises:
[0012] processing the target operation information to obtain the target input event, wherein the target operation information comprises target region first coordinate information, and the target region first coordinate information is mapped to second coordinate information of the second device screen sharing information region.
[0013] In an implementation, the obtaining of the target operation information of the input device of the first device on the target region, and the sending of the target input event of the input device to the second device based on the second communication link comprises:
[0014] In a case where the second device is in a screen-off state, the obtaining of the first operation information of the input device of the first device on the target region, and the sending of the first input event of the input device to the second device based on the second communication link, the first input event being 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, and the light-up state of the display screen of the second device enables the second device to resume sending of the screen sharing data.
[0015] In an implementation, the obtaining of the target operation information of the input device of the first device on the target region, and the sending of the target input event of the input device to the second device based on the second communication link comprises:
[0016] In a case where the second device is in a screen-off state or the display screen of the second device is in a light-up state, the obtaining of the second operation information of the input device of the first device on the target region, and the sending of the second input event of the input device to the second device based on the second communication link, the second input event being 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 a first unlocking interface, the second unlocking interface being different from the first unlocking interface; and the second unlocking interface displayed by the second device enables the second device to resume sending of the screen sharing data.
[0017] In an implementation, the method further comprises:
[0018] In a case where the second device displays the second unlocking interface, the obtaining of third operation information of the input device of the first device on the first unlocking interface, and the sending of a third input event of the input device to the second device based on the second communication link, the third input event being used to represent the third operation information, so that the second device displays a target interface based on the third input event.
[0019] In a case where the second device displays the target interface, a screen sharing data resumption request is generated, and the resumption request is transmitted to the second device, so that the second device generates authorization prompt information based on the resumption request.
[0020] generating an authorization response information in response to the authorization prompt information, transmitting the authorization response information to the second device, the authorization response information being capable of being responded by the second device to resume the first communication link;
[0021] obtaining screen sharing data from the second device through the resumed first communication link, and displaying the screen sharing data to the target area. According to a second aspect of the present application, a data sharing method applied to a second device is provided, the method comprising:
[0022] establishing a first communication link between the first device and the second device;
[0023] establishing a second communication link between an input device of the first device and the second device;
[0024] sending screen sharing data to the first device based on the first communication link, so as to display the screen sharing data to a target area of a display screen of the first device;
[0025] stopping sending the screen sharing data in response to a display screen of the second device being switched from a first state to a target state, wherein power consumption of the display screen in the first state is higher than that in the target state;
[0026] controlling the display screen to be switched from the target state to the first state to resume sending the screen sharing data in response to receiving a target input event of the input device sent by the first device from the second communication link.
[0027] In an implementation, the method further comprises:
[0028] analyzing the target input event to obtain second coordinate information of a screen sharing information area of the second device, wherein the second coordinate information is obtained by mapping first coordinate information of the target area by the input device of the first device.
[0029] In an implementation, the controlling the display screen to be switched from the target state to the first state to resume sending the screen sharing data in response to receiving a target input event of the input device sent by the first device from the second communication link comprises at least one of the following solutions:
[0030] when the display screen of the second device is in the screen-off state, in response to receiving the first input event of the input device sent by the first device from the second communication link, based on the first input event, lighting the display screen of the second device to switch the display screen of the second device 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 second device is in the screen-off state.
[0031] when the display screen of the second device is in the screen-off state or the display screen of the second device is in the lighted state, in response to receiving the second input event of the input device sent by the first device from 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 second operation information generated by the input device of the first device on the target area when the second device is in the screen-off state or the display screen of the second device is in the lighted 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 for establishing a first communication link with a second device;
[0034] a second communication module for establishing a second communication link between the input device and the second device;
[0035] a processor for obtaining screen sharing data from the second device based on the first communication link, and controlling the display of the screen sharing data to a target area of the display screen of the first device;
[0036] the processor is further configured to, in the case that the screen sharing data of the target area disappears, obtain target operation information of the input device of the first device on the target area, send a target input event of the input device to the second device based on the second communication link, the target input event is used to represent the target operation information, so that the second device resumes to send 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 for establishing a first communication link with a first device;
[0039] a second communication module, configured to establish a second communication link between the input device and 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 to a target area of a display screen of the first device;
[0041] the processor is further configured to stop sending the screen sharing data in response to the display screen switching from a first state to a target state, wherein the display screen in the first state has a higher power consumption than 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 the screen sharing data in response to receiving a target input event of the input device sent by the first device from the second communication link.
[0043] According to a fifth aspect of the present application, an electronic device is provided, comprising:
[0044] at least one processor; and
[0045] a memory connected with the at least one processor in communication; wherein
[0046] the memory stores instructions executable 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, the computer instructions being used to cause the computer to perform the method described in the present application.
[0048] According to a seventh aspect of the present application, a computer program product is provided, comprising computer programs or instructions, which are executed by a processor to implement the method described in the present application.
[0049] In the present application, in the case where the screen sharing data disappears, the operation of the input device of the first device on the target area originally displaying the sharing data is based on, and 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. It is a recovery scheme of sharing 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 it is a simple and effective scheme for realizing data sharing recovery.
[0050] It is to be understood that the description of the contents described in this section is not intended to identify key or essential features of the embodiments of the application, nor is it used to limit the scope of the application. Other features of the application will become apparent through the following description. BRIEF DESCRIPTION OF DRAWINGS
[0051] The above and other objects, features and advantages of the present application will become more apparent from the following detailed description read in conjunction with the accompanying drawings, in which:
[0052] In the drawings, identical or corresponding reference signs indicate identical or corresponding parts.
[0053] Figure 1 An implementation flowchart of a data sharing method in an embodiment of the application is shown Figure One ;
[0054] Figure 2 An implementation flowchart of a data sharing method in an embodiment of the application is shown Figure Two ;
[0055] Figure 3 An implementation flowchart of a data sharing method in an embodiment of the application is shown Figure Three ;
[0056] Figure 4 An implementation flowchart of a data sharing method in an embodiment of the application is shown Figure Four ;
[0057] Figure 5 A schematic diagram of the component structure of a first device in an embodiment of the application is shown
[0058] Figure 6 A schematic diagram of the component structure of a second device in an embodiment of the application is shown
[0059] Figure 7 A schematic diagram of the component structure of an electronic device in an embodiment of the application is shown. DETAILED DESCRIPTION
[0060] In order to make the purposes, features and advantages of the application more obvious and easy to understand, the technical solutions in the embodiments of the application will be clearly and completely described below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only some of the embodiments of the application, but not all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the application.
[0061] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings, and the described embodiments should not be regarded as limiting the present application. All other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.
[0062] In the following description, "some embodiments" are referred to, which describe a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same or different subsets of all possible embodiments, and can be combined with each other without conflict.
[0063] In the following description, the term "first\second" is only to distinguish similar objects, and does not represent a specific order of the objects. It can be understood that "first\second" can be interchanged in a specific order or sequence as allowed, 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 commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0065] It should be understood that in various embodiments of the present application, the size of the serial number of each implementation process does not mean the order of execution, and the execution order of each process should be determined by its function and inherent 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 the present 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 notebook computer, a desktop computer, a tablet computer, a smart phone, a wearable device, etc. Further, as a shared device, the first device can be a notebook computer, a desktop computer, a tablet computer. 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 involved: the first communication link and the second communication link. The first device obtains screen sharing data from the second device through the first communication link. In the case where the screen sharing data disappears, the operation of the input device of the first device on the target area where the sharing data is originally displayed is used to send the input event corresponding to the operation to the second device through the second communication link, so as to realize the recovery of the sharing data. In short, the recovery of the sharing 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 the data sharing between devices and is a simple and effective solution for the recovery of the data sharing.
[0068] Figure 1 The implementation flow of the data sharing method in the embodiment of the present application is shown Figure One . The data sharing method is applied to a first device, as shown in Figure 1 , the method comprises:
[0069] S101: Establish a first communication link between the first device and the second device.
[0070] S102: Establish a second communication link between the input device of the first device and the second device.
[0071] In the present application, two communication links are involved: the first communication link and the second communication link. Among them, the first communication link is a link for facilitating data sharing between two devices, which is referred to as a sharing link. For example, the second device sends sharing 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 the data sharing.
[0072] In the present application, the establishment of the first communication link and the second communication link has no strict sequence, and they can also be established at the same time.
[0073] S103: Obtain screen sharing data from the second device based on the first communication link, and display the screen sharing data to the target area of the display screen of the first device.
[0074] In the present application, the second device sends (screen) sharing data to the first device through the sharing link. The first device receives the sharing data transmitted from the second device through the sharing link. The screen sharing data is displayed on the display screen. The display screen of the first device includes an area dedicated to display the sharing data, which can be regarded as a target area. The first device displays the sharing data in the target area of the display screen.
[0075] In the present application, the shared data from the second device to the first device can be document data, page data, and can also be application data, such as social application data, telephone application data, short message application data. The first device and the second device can be two different devices belonging to the same user, or can be devices belonging to different users. If the shared data is document data or page data, the second device can share the data of the first user to the second user. If the shared data is social application data, telephone application data, short message application data, etc., the first device and the second device can be two devices belonging to the same user, and the second device can share the data to the first device. When it is inconvenient to reply to the application data using the second device, the first device can be used to reply to the application data, such as answering the phone or replying to the message.
[0076] S104: In the case that the screen sharing data in the target area disappears, obtaining target operation information of the 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, the target input event being used to represent 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 displays the first state, the second device sends the screen sharing data to the first device based on the first communication link to display the screen sharing data to the target area of the display screen of the first device. In the case that the display screen of the first device switches from the first state to the target state, the second device responds to the switching of the display screen from the first state to the target state, the first communication link is disconnected, and the sending of the screen sharing data to the first device is stopped. The power consumption of the display screen in the first state is higher than that in the target state. For example, the first state is the lighting state of the display screen of the second device, and the target state is the off state of the display screen.
[0078] The first communication link is disconnected, and the second device cannot send the screen sharing data to the first device. On the first device side, the screen sharing data in the target area of the display screen disappears. The input device of the first device is detected for the operation on the target area. Because the second communication link is 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, a 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 the target input event of the input device sent by the first device from the second communication link, the display screen is controlled to switch from the target state to the first state. The first communication link is resumed in the case that the display screen switches from the target state to the first state, and the second device can continue to share data to the first device through the first communication link, thereby realizing the resumption of the screen sharing transmission.
[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 input device on the first device side on the target region is sent to the second device through the second communication link established between the input device and the second device, so as to serve as an operation for the second device to resume the data sharing transmission. Through the operation and the (second communication) link, the sharing of the screen data is resumed, which is a simple and effective scheme with high feasibility and easy implementation.
[0081] In summary, in S101-S104, in the case that the screen sharing data disappears, the operation of the input device of the first device on the target region is obtained, and 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 resumption of the sharing of the screen data. This is a resumption scheme of the sharing 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, which is a simple and effective scheme for realizing the resumption of the data sharing.
[0082] In some embodiments, the aforementioned obtaining of the target operation information of the input device of the first device on the target region can 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 region, determining the operation information as the target operation information of the input device of the first device, and encapsulating the target operation information into a target input event in a format conforming to a preset protocol, so that the second device identifies 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 screen projection data from the second device to the first device, the target area can be a screen projection area. The first device displays the screen projection data in the screen projection area through a screen projection window. In the case that the screen sharing data of the first device disappears, the user generates an operation through an input device of the first device, and the first device detects the operation generated by the input device and identifies whether the operation is in the target area. If it is in 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 screen projection window, and the operation generated for the screen projection window is determined as a target operation. The target operation information is encapsulated into a target input event in a HID (Human Interface Device) protocol format (a preset protocol format), so as to transmit the target input event to the second device through the second communication link.
[0084] In the present application, the identification of the target operation is realized by identifying whether the operation information belongs to the target window corresponding to the target area, so as to ensure the identification accuracy of the operation of the screen projection window and provide a certain guarantee for the recovery of the screen sharing. The encapsulation of the target operation information is in the HID protocol format, so as to facilitate the transmission through the second communication link and the identification of the target operation information by the second device.
[0085] The target operation generated by the input device can be an operation of lighting the display screen of the second device, or can be an operation of maintaining the display screen of the second device in a lighted state (such as a presentation operation of an unlocking interface and an unlocking operation of the unlocking interface). The second device decapsulates the target input event according to the HID protocol format, so as to identify the target operation. Under the action of the target operation, the display screen of the second device is switched from an off state to a lighted state, the first communication link is recovered, the second device can continue to share data to the first device through the first communication link, and the recovery of the screen sharing is realized.
[0086] In some embodiments, the data sharing method further comprises: processing the target operation information to obtain a target input event, wherein the target operation information comprises first coordinate information of the 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.
[0087] In the present application, the input device of the first device side can be used as an operation of resuming the sending of the shared data by the second device in response to the target operation of the target region generated by the first device side. Because the size, dimension, resolution, etc. of the target region of the first device side and the screen sharing information region of the second device side are different, the mapping relationship between the two regions of the two devices is calculated in advance. Through the mapping relationship, the position information of the target operation in the target region of the first device is known, and the position information of the operation in the screen sharing information region of the second device is known through the mapping from the first device to the second device.
[0088] In the present application, the first device detects the position information (first coordinate information) of the target operation in the target region, and calculates the position information (second coordinate information) in the second device through the mapping relationship, encapsulates the position information, and sends the encapsulated target input event to the second device through the second communication link. The second device analyzes the target input event to obtain the second coordinate information of the screen sharing information region of the second device, so as to realize the accurate operation on the position in the second device. For example, the operation on the light key at the position is realized to realize the lighting of the display screen, or the input of the unlocking password at the position is realized to realize the unlocking.
[0089] In some embodiments, the implementation of the foregoing S104 can include the following cases:
[0090] Case one: when the second device is in a screen-off state, the first operation information of the input device of the first device on the target region is obtained, and the 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, and the display screen of the second device is in a lighted state, which can make the second device resume sending the screen sharing data.
[0091] The second device is screen-off, the first communication link is disconnected, the second device stops sending the shared data to the first device, and the data sharing of the second device to the first device is interrupted.
[0092] In the first case, the first operation information can be an operation of an input device of the first device for lighting the second display screen. The operation is encapsulated into a (first) input event which is sent to the second device through the second communication link. The second device parses the input event and identifies that the operation of the current input device on the first device side is an operation for lighting the display screen of the second device. The second device responds to the operation and switches the display screen from the off state to the lighting state. When the second device is in the lighting state, the re-establishment of the shared link can be realized through the establishment process of the shared link, so as to realize the sharing of the shared data of the second device at the first device through the re-established shared link. In a popular way, the first case is a scheme in which the data sharing is restored by lighting the screen.
[0093] In the second case, when the second device is in the screen-off state or the display screen of the second device is in the lighting state, the second operation information of the input device of the first device on the target region 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 the first device displays a first unlocking interface, the second unlocking interface is different from the first unlocking interface; the second unlocking interface displayed by the second device can restore the sending of the screen sharing data.
[0094] In the second case, the second operation information can be an operation of an input device of the first device for presenting a second unlocking interface of the second device. The operation can be generated when the second device is in the screen-off state, and the data sharing is restored when the screen is lighted. This is suitable for the case that in actual application, the terminal device is directly switched from the screen-off state to the unlocking interface through the clicking operation of the key or the virtual key, and the screen is lighted.
[0095] The second operation can also be generated when the display screen of the second device is lighted, which is suitable for the case that the data sharing is restored after the screen is lighted and then the unlocking interface is presented.
[0096] Therefore, in the present application, the (second) input event encapsulated by the first device based on the detected operation (second operation information) for presenting the second unlocking interface of the second device is sent to the second device through the second communication link. The second device parses the input event and identifies that the operation of the current input device on the first device side is an operation for presenting the (second) unlocking interface of the second device. The second device responds to the operation and switches the display screen from the off state to the state of presenting the unlocking interface.
[0097] The first device presents a first unlocking interface in the target region in response to the second operation upon detecting second operation information generated by the input device. The first unlocking interface is presented on the side of the first device to facilitate the user to input an unlocking password or code on the side of the first device to simulate the input on the side of the second device. In order to distinguish the two unlocking interfaces of the first device and the second device, a different unlocking interface needs to be drawn on the side of the first device as the first unlocking interface of the first device.
[0098] When the second device presents the unlocking interface, the second device is in a lighted state. The re-establishment of the shared link can be achieved through the establishment process of the shared link to share the shared data on the second device on the first device through the re-established shared link. In addition, the following can also be achieved:
[0099] When the second device displays the second unlocking interface, third operation information of the input device of the first device on the first unlocking 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 unlocking interface based on the third input event to display a 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 an authorization prompt information based on the recovery request. An authorization response information for the authorization prompt information is generated, and the authorization response information is transmitted to the second device, which can be responded by the second device to recover the first communication link. The screen sharing data is obtained from the second device through the recovered first communication link, and the screen sharing data is displayed to the target region.
[0100] The third operation information can be an operation of the input device of the first device to unlock the unlocking interface of the second device. For example, an operation of inputting an unlocking password or code of the second device. The user can input the unlocking password or code in the unlocking interface of the first device through the input device. The operation is encapsulated into a (third) input event, which is sent to the second device through the second communication link. The second device analyzes the input event and identifies that the operation of the current input device on the side of the first device is an operation of inputting an unlocking password or code to the unlocking interface of the second device. The second device responds to the operation, unlocks the unlocking interface based on the inputted unlocking password, and enters the home page (target page) of the second device.
[0101] In this application, the second device analyzes the third input event, analyzes the position information of each input password or input code processed by the first device in the second device, and inputs the input password on the side of the second device according to the position information of each input password. The input of each input password or code at the first device is equivalent to inputting each input password or code to each corresponding position of the second device, thereby realizing the unlocking of the unlocking interface of the second device.
[0102] In the case that 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 sharing link. The second device generates an authorization prompt information based on the recovery request. The first device generates an authorization response information for the authorization prompt information based on the historical authorization response information. If the historical authorization response information is an allowed authorization, the first device generates an authorization response information of the allowed authorization. The first device transmits the authorization response information to the second device, and the re-establishment of the sharing link can be realized through the establishment process of the sharing link to recover the first communication link. In the case that the first communication link is recovered, the second device shares the data to the first device through the first communication link. Thus, the recovery of the data sharing is realized simply and effectively.
[0103] Case three: in the case that the second device is in the screen-off state, the first operation information of the input device of the first device to the target region is obtained, and the 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. In the case that the second device is in the lighted state, the second operation information of the input device of the first device to the target region is obtained, and the 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 a first unlocking interface, the second unlocking interface is different from the first unlocking interface. In the case that the second device displays the second unlocking interface, the third operation information of the input device of the first device to the first unlocking interface is obtained, and the third input event of the input device is sent 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 displays a target interface based on the third input event; in the case that 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 make the second device generate an authorization prompt information based on the recovery request; an authorization response information for the authorization prompt information is generated, and the authorization response information is transmitted to the second device, the authorization response information can be responded by the second device to recover the first communication link; screen sharing data is obtained from the second device through the recovered first communication link, and the screen sharing data is displayed to the target region.
[0104] In a general way, the first case can be regarded as a shared data recovery scheme realized by the lighting operation of the second device and the second communication link generated by the input device at the first device. The second case can be regarded as a shared data recovery scheme realized by the operation of presenting the unlocking interface of the second device and the second communication link generated by the input device at the first device. The third case can be regarded as a shared data recovery scheme realized by the lighting, the operation of presenting the unlocking interface, the operation of inputting the unlocking password, the operation of authorization and the second communication link generated by the input device at the first device. Of course, in the third case, the shared data recovery scheme can also be realized by the lighting, the operation of presenting the unlocking interface, the operation of inputting the unlocking password and the second communication link generated by the input device at the first device without the operation of authorization. The understanding of the third case can be referred to the related understanding, and the repeated part will not be described.
[0105] It can be understood that the first device is usually a device with a larger display screen and convenient for user operation, and the second device is usually a device with a smaller display screen. In the above-mentioned cases, the target operation generated by the input device at the first device side is regarded as the operation of recovering the sharable state or sending the shared data of the second device, that is, the input device at the first device side is regarded as the input device of the second device, so as to realize the recovery of the sharable state (such as the lighting state) of the second device, which can avoid the situation that the display screen of the second device with a smaller display screen is not convenient for operation or frequent operation of the second device to recover the sharable state, and thus the recovery of the shared data is realized simply and effectively.
[0106] The technical scheme of the present application will be described in detail below with reference to the accompanying drawings of Figure 2 and Figure 3 .
[0107] In Figure 2 and Figure 3 , a notebook computer (PC) with a window system as the first device and a smart phone with an apple system as the second device are taken as examples for description.
[0108] Figure 2 The implementation process of the data sharing method in the present application is shown in Figure Two . The PC runs an application, and the application has a screen sharing function. The smart phone side runs an application (IOS application), and the application has a screen sharing function. In the case that the PC side and the smart phone side run the respective screen sharing applications,
[0109] S21: The PC side, specifically the PC application, initiates a screen sharing request to the smart phone side. The request is a request of the PC to establish a first communication link (sharing link) with the smart 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 the APK data packet that can realize the screen sharing function to realize the screen sharing function of itself.
[0111] S23: The mobile phone side, specifically the IOS system, synchronizes the APK data packet to the IOS application. In addition, the IOS system sends a system authorization notification to the IOS application to know whether the user of the PC side wants to perform screen sharing.
[0112] S24: The mobile phone side, specifically the IOS application, displays the system authorization notification interface, and the user manually inputs the information of allowing the authorization of screen sharing to the IOS application, and the authorization is passed.
[0113] S25: The sharing link of the PC side and the mobile phone side is established, and the screen sharing function can be started.
[0114] The PC side, specifically the PC application, has a HOGP service, opens the HOGP service, and establishes the second communication link of the input device of the PC side and the mobile phone side through the HOGP service.
[0115] In this scenario, the HOGP link can be regarded as the second communication link.
[0116] It can be understood that the HOGP (HID Over GATT Profile) service in the present application can enable the Bluetooth keyboard, mouse and other input devices of the PC to communicate with devices supporting the HID protocol, such as mobile phones.
[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 sharing 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 the sharing link. The user can process the shared data through the mouse or keyboard of the PC side. For example, the incoming call notification generated by the mobile phone side is projected from the mobile phone side to the PC side through the sharing link, and the user generates an answering operation through the mouse of the PC side to hear the incoming call conversation of the mobile phone side from the PC side.
[0118] The foregoing scheme can be regarded as a scheme of establishing a sharing link and a HOGP link between the PC side and the mobile phone side to perform a screen sharing process, that is, a first time of performing a screen sharing process.
[0119] Figure 3 The implementation process of the data sharing method in the present application is shown in Figure Two . As Figure 3 shown,
[0120] In this scenario, the Apple phone is based on the ReplayKit framework to realize the screen sharing function. Under the ReplayKit framework, if you want to realize the screen sharing function, you need to keep the phone in the lighted state. That is, in the lighted state of the phone, the phone can transmit shared data to the PC side through the sharing link.
[0121] S31: The phone is turned off, that is, it is switched from the lighted state to the off state, the ReplayKit framework stops working, and the sharing link is disconnected. The phone side, specifically the IOS application, stops sending shared data to the PC side, and the screen sharing stops.
[0122] The screen sharing stops, and the screen sharing data on the PC side disappears.
[0123] In the case that the sharing link between the PC side and the phone side is disconnected, the HOGP link still maintains the linked state. In this application scenario, by using the HOGP link that maintains the linked state and multiple operations generated by the input device on the PC side, the processes of lighting the PC side screen, presenting the unlock interface of the unlock interface, unlocking the unlock interface, authorization, etc. are realized, and the recovery of data sharing between the PC side and the phone side is realized.
[0124] S32: When the screen sharing data on the PC side disappears, it is detected that the operation for lighting the phone display screen, such as shaking the mouse or tapping the keyboard, generated on the PC side is an operation for the screen projection window on the PC side. It is considered that the operation is a first input operation, and the first input event is transmitted to the phone side, specifically the IOS system, through the HOGP link.
[0125] The phone side, specifically the IOS system, analyzes the first input event and identifies that the operation currently generated on the PC side through the input device is an operation for controlling the phone side screen to light up, and then lights up the display screen. The phone display screen is switched from the screen off state to the screen lighted state.
[0126] S33: In the lighted state of the phone display screen, it is detected that the operation for displaying the phone unlock interface, such as tapping the enter key of the keyboard, generated on the PC side is an operation for the screen projection window on the PC side. It is considered that the operation is a second input operation, and the second input event is transmitted to the phone side, specifically the IOS system, through the HOGP link.
[0127] On the PC side, the PC displays the unlock interface in the screen projection window on the PC side in response to the second input operation. The unlock interface on the PC side is used to simulate the unlock interface on the phone side, and is a specially drawn unlock interface on the PC side, which is different from the unlock interface on the phone side.
[0128] The mobile phone side, specifically the IOS system, analyzes the second input event and identifies that the operation currently generated by the input device on the PC side is an operation of controlling the mobile phone side to present an unlocking interface. Then, the mobile phone side controls the display screen to display the unlocking interface.
[0129] S34: When the mobile phone side displays the unlocking interface or displays the specially drawn unlocking interface in the projection window on the PC side, it is detected that the unlocking operation generated by the mouse or keyboard on the PC side is an operation on the projection window on the PC side. It is considered that the operation is 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 identifies that the operation currently generated by the input device on the PC side is an operation of unlocking the mobile phone unlocking interface, such as an input operation of an unlocking password. Then, the unlocking password is used to realize the unlocking of 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 location of the unlocking password in the unlocking interface on the PC side according to the location information (such as coordinates) of the unlocking password in the unlocking interface on the PC side and the pre-set mapping relationship. The mobile phone side inputs the unlocking password at the location where the unlocking password should appear in the unlocking interface on the mobile phone side to realize the unlocking of the unlocking interface.
[0132] S35: When the mobile phone side displays the main page, the PC side, specifically the PC application, initiates a screen sharing data recovery request to the mobile phone side. The recovery request is a request of the PC 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 the APK data package that can realize the screen sharing function to recover the screen sharing function of itself.
[0134] S37: 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 information to the IOS application to know whether the user of the PC side wants to perform screen sharing. S38: The PC side, specifically the PC application, automatically generates an authorization response information for the authorization prompt information based on the historical response information. If the user historically, such as in the first execution of the screen sharing process, authorizes the screen sharing, 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 of the screen sharing and the restart of the screen sharing.
[0136] S35~S38 can be regarded as the recovery of the shared link through the reestablishment process of the shared link.
[0137] S39: PC side and mobile phone side shared link recovery.
[0138] The screen sharing can start. The data of the mobile phone side can be transmitted to the PC side through the shared link to display the shared data of the mobile phone side in the projection window of the PC application, so as to realize the sharing of the data of the mobile phone side on the PC side. After the recovery of the shared link, 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 recovered shared link.
[0139] Figure Three The scheme shown corresponds to the third case described above. The above scheme can be regarded as using the HOGP link that maintains the link state to realize the transmission of the operations of the PC side input device generated in sequence, such as the lighting of the PC side screen, the presentation of the unlock interface, the unlocking of the unlock interface, and the authorization, from the PC side to the mobile phone side, so as to realize the switching of the display screen of the mobile phone side from the off-screen state to the lighted state by using the aforementioned operations generated by the input device of the PC side, thereby realizing the recovery of the data sharing between the PC side and the mobile phone side. It is a simple and effective data recovery scheme, which can avoid the case that the display screen of the mobile phone side is small and it is not convenient to operate or frequently operate the mobile phone to recover the sharable state, and thus the input device of the PC side with a larger display screen is used to realize the recovery of the sharable state of the display screen of the mobile phone side, thereby realizing the recovery of the data sharing between the two.
[0140] The scheme of the first case described above can include the schemes shown in S31, S32, S36~S39. The scheme of the second case described above can include the schemes shown in S31, S33', S36~S39. Among them, S33' is to detect the operation generated at the PC side, such as the enter key of the keyboard, which is used to display the mobile phone unlock interface, in the off state of the mobile phone display screen, and the rest of the process is the same as the aforementioned S33. A technical support is provided for the data recovery scheme.
[0141] Figure 4 The implementation flow of the data sharing method in the embodiment of the application is shown Figure Four The data sharing method is applied to a second device, as Figure 4 shown, the method comprises:
[0142] S401: establishing a first communication link between a first device and a second device;
[0143] S402: establishing a second communication link between an input device of the first device and the second device;
[0144] S403: sending the screen sharing data to the first device based on the first communication link, to display the screen sharing data to 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, stopping sending the screen sharing data, wherein the power consumption of the display screen in the first state is higher than that in the target state;
[0146] S405: in response to receiving the target input event of the input device sent by the first device from 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-S405, the target input event of the input device sent by the first device is received through the second communication link, and the switching of the display screen from the target state to the first state is realized through the response to the target input event, so as to realize the recovery of the shared data. It is a simple and effective solution for data sharing recovery.
[0148] In some embodiments, the data sharing method applied to the second device further comprises:
[0149] The target input event is analyzed 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 first coordinate information of the target area by the input device of the first device.
[0150] In some embodiments, the data sharing method applied to the second device, specifically the aforementioned response to the target input event of the input device sent by the first device from 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, comprises one of the following solutions:
[0151] When the display screen of the second device is in a screen-off state, in response to receiving the first input event of the input device sent by the first device from the second communication link, based on the first input event, lighting up the display screen of the second device to switch the display screen of the second device 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 second device is in a screen-off state;
[0152] In a case that the display screen of the second device is in a screen-off state or the display screen of the second device is in a lighted state, in response to receiving the second input event of the input device sent by the first device from 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 in a case that the second device is in a screen-off state or the display screen of the second device is in a lighted 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, refer to the foregoing related understanding, and no further description is given.
[0154] The present application provides a first electronic device, which can be the first device described above. As shown in the figure, 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; Figure 5
[0155] A second communication module 504 is configured to establish a second communication link between the input device and the second device;
[0156] A processor 505 is configured to obtain screen sharing data from the second device based on the first communication link, and control the display of the screen sharing data to a target area of the display screen 501;
[0157] The processor 505 is further configured to, in a case that the screen sharing data of the target area disappears, obtain target operation information of the target area generated by the input device 502, send a target input event of the input device to the second device based on the second communication link, the target input event is used to represent the target operation information, so that the second device resumes sending screen sharing data based on the target input event.
[0158] In some embodiments, the processor 505 is further configured to obtain operation information of the input device 502, identify that the operation information belongs to a target window corresponding to the target area, determine the operation information as target operation information for operating the second device, encapsulate the target operation information into the target input event in a format conforming to a preset protocol, so that the second device identifies the target operation information of the input device 502 based on the target input event.
[0159] In some embodiments, the processor 505 is further configured to process the target operation information to obtain the target input event, wherein the target operation information comprises target region first coordinate information, and map the target region first coordinate information to second coordinate information of the second device screen sharing information region.
[0160] In some embodiments, the processor 505 is further configured to, when the second device is in a screen-off state, obtain first operation information of the input device 502 on the target region, send a first input event of the input device 502 to the second device based on the second communication link, the first input event being 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, and the display screen of the second device in the lighted-up state enables the second device to resume sending screen sharing data.
[0161] In some embodiments, the processor 505 is further configured to, when the second device is in a screen-off state or the display screen of the second device is in a lighted-up state, obtain second operation information of the input device 502 on the target region, send a second input event of the input device 502 to the second device based on the second communication link, the second input event being used to represent the second operation information, so that the second device displays a second unlocking interface based on the second input event, and the display screen 501 of the electronic device displays a first unlocking interface, the second unlocking interface being 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 configured to, when the second device displays the second unlocking interface, obtain third operation information of the input device 502 on the first unlocking interface, send a third input event of the input device 502 to the second device based on the second communication link, the third input event being used to represent the third operation information, so that the second device displays a target interface based on the third input event.
[0163] When the second device displays the target interface, generate a screen sharing data resumption request, and transmit the resumption request to the second device, so that the second device generates authorization prompt information based on the resumption request;
[0164] Generate authorization response information for the authorization prompt information, and transmit the authorization response information to the second device, the authorization response information being able to be responded to by the second device to resume the first communication link;
[0165] Obtain screen sharing data from the second device through the resumed first communication link, and display the screen sharing data to the target region.
[0166] The application provides a second electronic device, which can be the second device described above. As shown in the figure, the electronic device comprises a display screen 600 and Figure 6
[0167] a first communication module 601, configured to establish a first communication link with the first device;
[0168] a second communication module 602, configured to establish a second communication link with an input device of the first device;
[0169] a processor 603, configured to send screen sharing data to the first device based on the first communication link, and display the screen sharing data to a target area of a display screen of the first device;
[0170] The processor 603 is further configured to stop sending the screen sharing data in response to the display screen 600 being switched from a first state to a target state, wherein the power consumption of the display screen 600 in the first state is higher than that in the target state.
[0171] The processor 603 is further configured to control the display screen 600 to be switched from the target state to the first state to resume sending the screen sharing data in response to receiving a target input event of the input device sent by the first device from the second communication link.
[0172] In some embodiments, the processor 603 is further configured to
[0173] analyze the target input event to obtain second coordinate information of the screen sharing information area, wherein the second coordinate information is obtained by mapping the first coordinate information of the target area by the input device of the first device.
[0174] In some embodiments, the processor 603 is further configured to perform at least one of the following schemes:
[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 from the second communication link, based on the first input event, light 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 the screen-off state;
[0176] In response to receiving the second input event of the input device sent by the first device from the second communication link when the display screen 600 is in the screen-off state or the display screen 600 is in the lighted state, 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 the screen-off state or the display screen 600 is in the lighted state; the second operation information is used to control 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.
[0177] It should be noted that the two electronic devices (the first device and the second device) of the embodiments of the present application have similar principles to solve the problems as the above-mentioned data sharing method, and therefore, the implementation process and implementation principles of the electronic device can be referred to the implementation process and implementation principles of the above-mentioned method, and the repeated parts will not be described herein.
[0178] According to the embodiments of the present application, the present application further provides an electronic device and a readable storage medium.
[0179] The electronic device includes at least one processor, and a memory connected with 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 to enable the at least one processor to execute the data sharing method of the present application. The computer instructions are used to enable the computer to execute the data sharing method of the present application.
[0180] The present application further provides a computer program product, including computer programs / instructions, which are executed by a processor to implement the data sharing method of the present application.
[0181] Figure 7 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present application described and / or claimed in this document.
[0182] As Figure 7As shown, the device 800 includes a computing unit 801 that can perform various appropriate actions and processes in accordance with 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 through a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0183] A plurality 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 magnetic 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 can be various general and / or special purpose 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 special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 801 performs various methods and processes described above, such as the data sharing method. For example, in some embodiments, the data sharing method can be implemented as a computer software program that is tangibly embodied in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the data sharing method described above can be performed. Alternatively, in other embodiments, the computing unit 801 can be configured to perform the data sharing method by any other appropriate means, such as by means of firmware.
[0185] The various embodiments of the systems and techniques described above can be implemented in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a load programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0186] Program code for carrying out methods of the present application can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces a means for implementing the functions / acts specified in the flowcharts and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a 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 can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical conductors, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0188] To provide for interaction with a user, the systems and techniques described here 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 a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, 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, speech, or tactile input.
[0189] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can 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] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0191] The above description is provided as an enabling teaching of the application and is not intended to limit the scope of the application. Any modification of the application in keeping with the spirit of the application falls within the scope of the application. The scope of the application is defined by the appended claims.
Claims
1. A data sharing method applied to a first device, the method comprising: establishing a first communication link between the first device and a second device; establishing a second communication link between an 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 to a target area of a display screen of the first device; in a case where the screen sharing data in the target area disappears, obtaining target operation information of the 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, the target input event being used to represent the target operation information, so that the second device resumes sending the screen sharing data based on the target input event. 2.The method of claim 1, wherein the obtaining the target operation information of the input device of the first device on the target area comprises: obtaining operation information of the input device of the first device, identifying that the operation information belongs to a target window corresponding to the target area, determining the operation information as the target operation information for operating the second device, and encapsulating the target operation information into the target input event in a format conforming to a preset protocol, so that the second device identifies the target operation information of the input device of the first device based on the target input event. 3.The method of claim 2, further comprising: processing the target operation information to obtain the target input event, wherein the target operation information comprises first coordinate information of the 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 of claim 1, wherein the obtaining the target operation information of the input device of the first device on the target area and the sending the target input event of the input device to the second device based on the second communication link comprises: in a case where the second device is in a screen-off state, obtaining first operation information of the input device of the first device on the target area, and sending a first input event of the input device to the second device based on the second communication link, the first input event being used to represent the first operation information, so that the second device lights up a display screen of the second device based on the first input event, and the light-up state of the display screen of the second device enables the second device to resume sending the screen sharing data. 5.The method of claim 1, wherein the obtaining the target operation information of the input device of the first device on the target area and the sending the target input event of the input device to the second device based on the second communication link comprises: In a case that the second device is in a screen-off state or the display screen of the second device is in a lighted state, obtaining second operation information of the input device of the first device on the target region, sending a second input event of the input device to the second device based on the second communication link, the second input event being used to represent the second operation information, so that the second device displays a second unlocking interface based on the second input event, and the first device controls the display screen to display a first unlocking interface, the second unlocking interface being different from the first unlocking interface; and the second device displays the second unlocking interface, which enables the second device to resume sending the screen sharing data.
6. The method of claim 5, further comprising: when the second device displays the second unlocking interface, obtaining third operation information of the input device of the first device on the first unlocking interface, sending a third input event of the input device to the second device based on the second communication link, the third input event being used to represent the third operation information, so that the second device displays a target interface based on the third input event; when the second device displays the target interface, generating a screen sharing data resuming request, and sending the resuming request to the second device, so that the second device generates authorization prompt information based on the resuming request; generating authorization response information for the authorization prompt information, and sending the authorization response information to the second device, the authorization response information being capable of being responded by the second device to resume the first communication link; obtaining the screen sharing data from the second device through the resumed first communication link, and displaying the screen sharing data to the target region.
7. A data sharing method applied to a second device, the method comprising: establishing a first communication link between a first device and the second device; establishing a second communication link between an input device of the first device and the second device; sending screen sharing data to the first device based on the first communication link, so as to display the screen sharing data to a target region of a display screen of the first device; in response to a display screen of the second device being switched from a first state to a target state, stopping sending the screen sharing data, wherein power consumption of the display screen in the first state is higher than that in the target state; in response to receiving a target input event of the input device sent by the first device from the second communication link, controlling the display screen to be switched from the target state to the first state to resume sending the screen sharing data.
8. The method of claim 7, further comprising: analyzing the target input event to obtain second coordinate information of a screen sharing information region of the second device, wherein the second coordinate information is obtained by mapping first coordinate information of the input device of the first device on the target region.
9. The method of claim 7, wherein the response to receiving the target input event of the input device sent by the first device from the second communication link, and the controlling the display screen to be switched from the target state to the first state to resume sending the screen sharing data, comprises at least one of the following schemes: when the display screen of the second device is in a screen-off state, in response to receiving the first input event of the input device sent by the first device from the second communication link, based on the first input event, lighting up the display screen of the second device to switch the display screen of the second device from the target state to the first state; wherein, The first input event is first operation information of the input device of the first device on the target area when the second device is in the screen-off state; In response to receiving the second input event of the input device sent by the first device from the second communication link when the display screen of the second device is in the screen-off state or the display screen of the second device is in the lighted state, 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 of the input device of the first device on the target area when the second device is in the screen-off state or the display screen of the second device is in the lighted 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 is configured to establish a first communication link between the first device and the second device; A second communication module is configured to establish a second communication link between the input device of the first device and the second device; A processor is configured to obtain screen sharing data from the second device based on the first communication link, and control the display of the screen sharing data to a target area of the display screen of the first device; The processor is further configured to, in the case that the screen sharing data of the target area disappears, obtain target operation information of the input device of the first device on the target area, send target input event of the input device to the second device based on the second communication link, the target input event is used to represent the target operation information, so that the second device resumes to send screen sharing data based on the target input event.
Citation Information
Patent Citations
Screen projection system and electronic equipment
CN117908814A
Projection screen connection method and device, terminal equipment and computer program product
CN118803333A