Screen sharing optimization method and electronic equipment
By storing device information and querying online status, the connection can be directly re-established with the previously connected device, solving the problem of cumbersome and time-consuming reconnection after screen sharing is lost. This achieves a fast and efficient reconnection process and improves the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2024-10-12
- Publication Date
- 2026-04-21
AI Technical Summary
When the screen sharing connection between a mobile phone and a tablet is lost, the reconnection process is cumbersome and time-consuming, requiring user confirmation of the connection, resulting in low efficiency.
By storing device information in the device and querying the device's online status, the connection can be directly re-established with the previously connected device, simplifying the user confirmation process and optimizing the reconnection process.
It enables rapid reconnection after screen sharing is lost, improving reconnection efficiency and enhancing user experience.
Smart Images

Figure CN121908404A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a screen sharing optimization method and electronic device. Background Technology
[0002] When a screen sharing connection between a phone and a tablet is lost, the tablet needs to re-establish the connection with the phone to continue screen sharing. Currently, during the re-establishment process, the tablet needs to initiate a Bluetooth broadcast so that the phone, upon receiving the broadcast, will display a confirmation page for screen sharing. Only after the user confirms the connection on this confirmation page can the tablet and phone reconnect. This current reconnection process after a screen sharing failure between two electronic devices is cumbersome. One device must receive the Bluetooth broadcast from the other device and wait for user confirmation before reconnection can proceed, resulting in a time-consuming and inefficient process. Summary of the Invention
[0003] To address the aforementioned technical problems, this application provides a screen sharing optimization method and an electronic device. In this method, the electronic device optimizes the reconnection process after screen sharing is disconnected, changing the process from sending a connection broadcast to all surrounding devices to selectively reconnecting to previously connected devices. This simplifies the user's confirmation operation during the reconnection process, thereby effectively shortening the reconnection time, achieving rapid reconnection after screen sharing is disconnected, and improving the reconnection efficiency after screen sharing is disconnected.
[0004] In a first aspect, this application provides a screen sharing optimization method. This method is applied to a first device, wherein the first device and a second device establish a first connection, which supports data transmission during screen sharing between the first and second devices. The screen sharing optimization method includes: displaying a connection failure interface in response to an interruption of the first connection; querying whether device information is stored locally in response to a first operation by the user on the connection failure interface; the device information is used to uniquely identify the second device; if device information is found, determining whether the second device is online based on the device information; establishing a first connection with the second device if the second device is online; receiving first projection data sent by the second device based on the first connection; and displaying the screen interface of the second device on a display interface based on the first projection data.
[0005] In this embodiment, when the screen sharing connection between the first device and the second device is interrupted, the first device can quickly identify the peer device requiring screen sharing reconnection by querying locally stored device information. After receiving the first connection establishment request from the first device, the second device can directly re-establish the first connection with the first device, without needing to wait for user confirmation after receiving the first device's connection information via Bluetooth scanning as in a conventional reconnection process. The optimized screen sharing reconnection method provided in this embodiment effectively simplifies the reconnection process after a screen sharing disconnection, shortens the reconnection time, improves reconnection efficiency, and enhances the user's terminal experience.
[0006] According to the first aspect, before displaying a connection failure interface in response to a first connection interruption, the method further includes: establishing a first channel with a second device in response to a screen sharing initiation command; receiving device information sent by the second device based on the first channel; storing the device information of the second device; and establishing a second channel with the second device based on the first channel; wherein the first connection includes the first channel and the second channel.
[0007] In this embodiment, after establishing a connection, the first device obtains the device information of the second device to identify which device needs to be re-established if screen sharing is interrupted. Furthermore, the first channel established between the first and second devices in this embodiment is a secure encrypted transmission channel. Therefore, even if the second device sends its device information to the first device, the information cannot be stolen or misused, thus ensuring the security of the second device.
[0008] According to the first aspect, or any implementation of the first aspect above, when the second device is online, establishing a first connection with the second device includes: when the second device is online, sending a first channel establishment request to the second device via Bluetooth to enable the second device to establish a first channel with the first device; and based on the first channel, sending a second channel establishment request to the second device to enable the second device to establish a second channel with the first device; the second channel is used to transmit screen projection data.
[0009] In this embodiment of the application, when the second device is offline, the first device can establish a screen sharing connection with other devices via Bluetooth broadcast.
[0010] According to the first aspect, or any implementation of the first aspect above, the method further includes: performing a first screen sharing operation when no device information is stored locally, or when the second device is offline; the first screen sharing operation includes: broadcasting connection information based on Bluetooth, so that the third device can display a connection confirmation interface in response to the connection information; establishing a second connection with the third device in response to the connection response information returned by the third device; the connection response information is the connection response information returned by the third device in response to the user's confirmation operation on the connection confirmation interface; the second connection is used to support data transmission when screen sharing occurs between the first device and the third device; receiving first projection data sent by the third device based on the first connection; and displaying the screen interface of the third device in a display interface based on the first projection data.
[0011] In this embodiment of the application, if no device information is stored locally, or if the second device is offline, the first device can establish a screen sharing connection with other devices via Bluetooth broadcast.
[0012] According to the first aspect, or any implementation of the first aspect above, before establishing a first channel with the second device in response to the screen sharing command, the method further includes: setting the first device and the second device as devices belonging to the same trust ring.
[0013] In this embodiment, the first device and the second device are trust ring devices. That is, the first device and the second device belong to the same user account, or the first device and the second device belong to a user account and its associated accounts, respectively. The user account can be, for example, a Honor account, a Huawei account, a Xiaomi account, etc. The associated accounts can be, for example, family accounts bound to the user account (pre-bound in the trust ring application). It is understood that because the first device and the second device are trust ring devices, both will access device cloud management, both will be authenticated as trusted devices, and the transmission channel between the first device and the second device will be specially encrypted, ensuring high data transmission security.
[0014] According to the first aspect, or any implementation of the first aspect above, the first channel is a Bluetooth-based data transmission channel; the second channel is a P2P-based data transmission channel.
[0015] In this embodiment, the data transmission channel may be a Magiclink channel, the first channel is used to transmit signaling data, and the second channel is used to transmit audio and video stream data.
[0016] According to the first aspect, or any implementation of the first aspect above, determining whether the second device is online based on device information includes: sending an online status query request to the second device based on the device information; receiving online status information returned by the second device, and determining that the second device is online.
[0017] In this embodiment of the application, the first device stores device information, so the first device can communicate directly with the second device. Based on the device information, an online status query request is sent to the second device to determine whether the second device can respond to the online status query request. If the second device can respond, it is determined that the second device is online.
[0018] According to the first aspect, or any implementation of the first aspect above, after sending an online status query request to the second device based on the device information, the method further includes: if no information is received from the second device after a preset time, determining that the second device is offline.
[0019] In this embodiment of the application, the process of the first device sending an online status query request to the second device is a process of the first device establishing a timeout response. If the first device does not receive a response from the device management service module of the second device within a preset time (e.g., 1 second), it is considered that the second device is offline.
[0020] Based on the first aspect, or any of the implementations of the first aspect above.
[0021] In a second aspect, this application provides an electronic device comprising: one or more processors; a memory; and a computer program, wherein the computer program is stored in the memory and, when executed by one or more processors, causes the electronic device to perform instructions of the method in the first aspect or any possible implementation thereof.
[0022] The second aspect and any implementation thereof correspond to the first aspect and any implementation thereof, respectively. The technical effects of the second aspect and any implementation thereof are similar to those of the first aspect and any implementation thereof, and will not be repeated here.
[0023] Thirdly, this application provides a computer storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform the method of the first aspect or any possible implementation thereof.
[0024] The third aspect and any implementation thereof correspond to the first aspect and any implementation thereof, respectively. The technical effects of the third aspect and any implementation thereof are similar to those of the first aspect and any implementation thereof, and will not be repeated here. Attached Figure Description
[0025] Figure 1 This is a schematic diagram of a screen sharing reconnection method provided in an embodiment of this application.
[0026] Figure 2a This application provides an embodiment of a screen sharing reconnection process after disconnection. Figure 1 ;
[0027] Figure 2b A schematic diagram 2 illustrates the reconnection process after a screen sharing connection is lost, as provided in an embodiment of this application.
[0028] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0029] Figure 4 A software structure block diagram of an electronic device provided in an embodiment of this application;
[0030] Figure 5 A flowchart illustrating a screen sharing optimization method provided in an embodiment of this application;
[0031] Figure 6 A flowchart illustrating another screen sharing optimization method provided in an embodiment of this application;
[0032] Figure 7 This application provides an embodiment of a screen sharing reconnection process after disconnection. Figure 3 . Detailed Implementation
[0033] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0034] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.
[0035] The terms "first" and "second," etc., used in the specification and claims of this application are used to distinguish different objects, not to describe a specific order of objects. For example, "first target object" and "second target object," etc., are used to distinguish different target objects, not to describe a specific order of target objects.
[0036] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0037] In the description of the embodiments in this application, unless otherwise stated, "multiple" means two or more. For example, multiple processing units means two or more processing units; multiple systems means two or more systems.
[0038] Figure 1 This is a schematic diagram of a screen sharing reconnection method provided in an embodiment of this application. Figure 2a This application provides an embodiment of a screen sharing reconnection process after disconnection. Figure 1 . Figure 2b This is a second schematic diagram illustrating a screen sharing reconnection process after a disconnection, provided as an embodiment of this application. Before introducing the embodiments of this application, firstly based on... Figure 1 , Figure 2a and Figure 2b The application scenarios of the embodiments of this application will be described.
[0039] like Figure 2a For example, this application scenario involves at least two devices: user device 1 (e.g., a mobile phone) and user device 2 (e.g., a tablet). Figure 2a As shown in (1), the display interface of device 2 is interface 201. When the screen sharing connection established between device 1 and device 2 is abnormally disconnected, the sharing interface corresponding to device 1 in interface 201 cannot continue to be displayed, but instead displays connection failure interface 202. The connection failure interface 202 includes a reconnection control 2021, a cancel reconnection control and a text prompt indicating that device 1 is disconnected, such as "User's device 1 has been disconnected".
[0040] When a user wants to initiate a reconnection, they can click the reconnection control 2021 on the connection failure screen 202 to initiate a device reconnection. For reconnection methods after screen sharing disconnection, please refer to [link to relevant documentation]. Figure 1 The method flowchart is shown.
[0041] like Figure 1As shown, in step S101, the collaboration module in device 2 responds to the user's click operation on the reconnection control in the connection failure interface by sending a screen sharing reconnection request to the Bluetooth reconnection module in device 2.
[0042] In step S102, the Bluetooth reconnection module in device 2 responds to the screen sharing reconnection request by broadcasting a connection request via Bluetooth.
[0043] In the conventional reconnection method, after device 1 and device 2 lose connection, device 2 cannot know which device it needs to reconnect to. Therefore, device 2 needs to broadcast a connection request via Bluetooth so that nearby online devices can receive the connection request via Bluetooth and pop up a connection confirmation window, allowing the user to manually confirm which device to reconnect to.
[0044] In step S103, the Bluetooth discovery module in device 1 responds to the received connection request by popping up a connection confirmation window.
[0045] In this conventional reconnection method, after Device 1 and Device 2 disconnect, if Device 1 is still online and its Bluetooth and wireless network connectivity are normal, it will periodically scan for nearby devices and receive Bluetooth broadcasts from them. However, this pop-up window process can be time-consuming because Device 1's Bluetooth scan is performed periodically. Device 1 may not receive the connection request immediately after Device 2 sends it. For example, if Device 1 performs a Bluetooth scan every 5 seconds, and Device 1 finishes a scan just as Device 2 is broadcasting a connection request, it will only receive the connection request broadcast by Device 2 5 seconds later when it performs its next scan, thus triggering the connection confirmation window. This pop-up window process is therefore time-consuming.
[0046] In the normal reconnection process, after the user clicks the reconnection control 2021 on the connection failure interface 202 to initiate the reconnection process, as follows: Figure 2a As shown in (2), the display interface of device 1 is interface 203. After device 1 receives the connection request, a connection confirmation window 204 pops up. The connection confirmation window 204 includes a connection confirmation control 2041, a cancellation window control, the device initiating the reconnection (e.g., tablet device 2), and instructions on screen sharing, etc. If the user wants device 1 and device 2 to re-enable screen sharing, they will click the connection confirmation control 2041 in the connection confirmation window 204 that pops up on device 1 to re-establish the connection between device 1 and device 2, thereby realizing the reconnection after the screen sharing is disconnected.
[0047] In step S104, the Bluetooth discovery module in device 1 responds to the user's click operation on the connection confirmation control and initiates device connection and Bluetooth connection to the Bluetooth reconnection module in device 2.
[0048] Among them, device connections include, for example, peer-to-peer (P2P) connections between devices.
[0049] It is understandable that after device 1 initiates a device connection and Bluetooth connection with device 2, device 1 and device 2 will achieve P2P connection and Bluetooth connection through multiple signaling interactions. The signaling interaction process is omitted in the figure.
[0050] In one example, after the user clicks the connection confirmation control 2041 in the connection confirmation window 204 that pops up on device 1, that is, during the process of establishing a P2P connection and Bluetooth connection between device 1 and device 2, as follows: Figure 2b As shown in (1), the device 2 displays a connection interface 205 in the display interface 201, so that the user can know that the device 2 and the device 1 are currently reconnecting.
[0051] In step S105, the Bluetooth reconnection module in device 2 initiates a data transmission channel establishment request to device 1.
[0052] In some examples, this data transmission channel is, for example, a MagicLink channel.
[0053] In step S106, after the data transmission channel is established, device 1 sends the projection data through the data transmission channel.
[0054] In the normal reconnection process, device 1 responds to the data transmission channel establishment request and establishes a data transmission channel with device 2. The process of establishing this data transmission channel is omitted in the figure.
[0055] In step S107, the Bluetooth reconnection module in device 2 receives the screen projection data and sends it to the collaboration module.
[0056] In step S108, the collaboration module in device 2 displays the display interface of device 1 based on the projection data.
[0057] like Figure 2b As shown in (2), in the display interface 201 of device 2, the screen sharing interface 206 corresponding to device 1 is displayed.
[0058] As can be seen from the above description of the conventional screen sharing reconnection method, in the current reconnection process after an abnormal screen sharing disconnection between two electronic devices, one device must receive the Bluetooth broadcast from the other device and wait for user confirmation before reconnection can proceed. Furthermore, the time it takes for the device to receive the Bluetooth broadcast is uncertain, and there is a certain probability that there will be a long waiting time for the pop-up window. This current screen sharing reconnection method is cumbersome and inefficient.
[0059] Therefore, this application provides a screen sharing optimization method to optimize the reconnection process after screen sharing is disconnected. The method optimizes the process by sending a connection broadcast to all surrounding devices and then reconnecting to the previously connected devices. This simplifies the user's operation during the reconnection process, thereby effectively shortening the reconnection time, enabling fast reconnection after screen sharing is disconnected, and improving the reconnection efficiency.
[0060] The screen sharing optimization method provided in this application can be applied to electronic devices, such as wearable electronic devices (e.g., watches), portable computers (e.g., mobile phones), tablets, laptops, personal computers (PCs), augmented reality (AR) / virtual reality (VR) devices, in-vehicle computers, etc. The following embodiments do not impose any special restrictions on the specific form of the electronic device.
[0061] Before describing the technical solutions of the embodiments of this application, the electronic devices of the embodiments of this application will first be described in conjunction with the accompanying drawings. Figure 3 This is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of this application. It should be understood that... Figure 3 The electronic device 100 shown is merely an example of an electronic device, and the electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. Figure 3 The various components shown can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0062] Electronic device 100 may include: processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0063] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0064] In this embodiment, the processor can display the screen interface of the peer device in real time on the screen based on the screen projection data sent by the peer device. The processor can also store the device identifier (e.g., device ID) of the peer device that last established a screen projection (or screen sharing) connection, so as to quickly identify the peer device that needs to be reconnected when screen sharing is interrupted.
[0065] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0066] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The USB interface 130 is an interface compliant with the USB standard specification, specifically a Mini USB interface, a Micro USB interface, a USB Type-C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used for data transfer between the electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.
[0067] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.
[0068] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, internal memory 121, external memory, display 194, camera 193, and wireless communication module 160, etc.
[0069] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0070] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0071] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
[0072] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc.
[0073] In this embodiment of the application, after the electronic device 100 establishes a screen sharing connection with the peer device through wireless communication, screen sharing can be achieved by transmitting screen data through the established wireless communication channel (e.g., MagicLink channel).
[0074] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with networks and other devices through wireless communication technology.
[0075] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0076] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.
[0077] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0078] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0079] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 100 selects a frequency, the DSP performs Fourier transforms on the frequency energy.
[0080] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0081] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0082] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0083] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0084] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0085] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the intensity of the touch operation based on pressure sensor 180A. Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS is executed.
[0086] Touch sensor 180K, also known as a "touch panel," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touch screen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194.
[0087] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.
[0088] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, different vibration feedback effects can be corresponding to touch operations applied to different applications (such as taking photos, playing audio, etc.).
[0089] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.
[0090] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100.
[0091] Figure 4 This is a software structure block diagram of an electronic device 100 provided in an embodiment of this application.
[0092] The layered architecture of the electronic device 100 divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
[0093] The application layer can include a series of application packages.
[0094] like Figure 4 As shown, the application package may include applications such as gallery, calling, navigation, WLAN, Bluetooth, collaboration assistant, PC assistant, trust ring, etc.
[0095] The collaboration assistant is used to implement screen collaboration functionality. This collaboration assistant module includes at least a collaboration module and a reconnection module.
[0096] The collaboration module is used to initiate screen sharing and provide related view management.
[0097] In this embodiment of the application, the newly added reconnection module is mainly used to provide users with a quick reconnection entry point. Screen sharing connections between two devices may be disconnected due to network fluctuations. In this scenario, users can quickly complete the connection through the reconnection module without having to close the failed window, open the connection entry point, and then click on the dual-end connection and other cumbersome operations to complete the reconnection.
[0098] The computer assistant is used to enable interaction and connection with peer devices. This computer assistant module includes at least an entry service module, a connection service module, and a device management service module.
[0099] The entry service module is used to initiate the connection process with the peer device, such as initiating the establishment process of the Bluetooth-based MagicLink channel with the peer device, or initiating the Bluetooth discovery connection process.
[0100] The connection service module is used to execute the connection establishment process with the peer device, such as the establishment process of a data transmission channel (based on a P2P MagicLink channel) with the peer device. This connection service module also stores the device identifier of the peer device with which the connection is established, which is used to uniquely identify the device.
[0101] The device management service module is used to synchronize the status of devices, such as their online status.
[0102] A trust ring application is used to manage connections between different devices. This trust ring-based connection is based on an identity authentication system, enabling trusted interconnection of multiple devices across systems, allowing services to flow and be shared between devices. In this application embodiment, multiple devices under the same user account can be considered as trust ring devices, or multiple devices under a user account and its associated accounts can be considered as trust ring devices, such as family member accounts associated with the user account.
[0103] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0104] like Figure 4 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, trust ring sharing service framework, etc.
[0105] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
[0106] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.
[0107] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0108] The phone manager is used to provide communication functions for electronic device 100. For example, it manages call status (including connection and disconnection).
[0109] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0110] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.
[0111] The Trust Ring Sharing Service Framework is used to manage trust ring-based sharing services, such as screen sharing, keyboard and mouse sharing, and call sharing.
[0112] The Android Runtime consists of core libraries and a virtual machine. The Android Runtime is responsible for scheduling and managing the Android system.
[0113] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.
[0114] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0115] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
[0116] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0117] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0118] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0119] A 2D graphics engine is a graphics engine for 2D drawing.
[0120] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.
[0121] Understandable Figure 4 The layers in the illustrated software structure and the components contained in each layer do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer layers than illustrated, and each layer may include more or fewer components; this application does not impose any limitations.
[0122] Figure 5 This is a flowchart illustrating a screen sharing optimization method provided in an embodiment of this application. The screen sharing optimization method is applied to an electronic device, which includes a collaboration assistant module and a computer assistant module. The collaboration assistant module includes a collaboration module and a reconnection module, and the computer assistant module includes an entry service module, a connection service module, and a device management service module. Figure 5 This paper uses the interaction between two electronic devices (a first device and a second device) as an example to illustrate the screen sharing optimization method provided in the embodiments of this application. Figure 5 As shown, the screen sharing optimization method includes the following steps: S501-S512.
[0123] Step S501: In response to the user's first operation, the collaboration module of the first device sends a screen sharing request to the entry service module of the first device.
[0124] The first operation is used to initiate the screen sharing function. This first operation may include, for example, clicking the screen sharing control, or dragging a service ball when starting an application flow on the application flow page, etc., and is not specifically limited in this embodiment.
[0125] In some embodiments, the first operation is used to initiate a screen sharing function based on MagicLink.
[0126] Step S502: In response to the screen sharing request, the entry service module sends a first channel establishment request to the connection service module of the second device.
[0127] In this embodiment, the first channel is a data transmission channel for transmitting instruction data. This first channel is a Bluetooth-based data transmission channel; for example, it is a Bluetooth-based MagicLink channel.
[0128] In one implementation, the first device and the second device are trust ring devices. That is, the first device and the second device belong to the same user account, or the first device and the second device belong to a user account and its associated accounts, respectively. The user account could be, for example, a Honor account, a Huawei account, a Xiaomi account, etc. The associated accounts could be, for example, family accounts bound to the user account (pre-bound in the trust ring application). It is understood that because the first device and the second device are trust ring devices, both will access device cloud management, both will be authenticated as trusted devices, and the transmission channel between the first device and the second device will be specially encrypted, ensuring high data transmission security.
[0129] Step S503: The connection service module of the second device responds to the first channel establishment request and establishes a first channel with the first device.
[0130] It is understandable that establishing a first channel between the first device and the second device involves multiple interactive processes. Figure 5 This is merely a flowchart and does not describe the detailed interaction steps. In this embodiment, the connection service module of the second device responds to the first channel establishment request. The process of establishing the first channel with the first device can refer to the process of a conventional screen sharing method. For example, the entry service module of the first device responds to the screen sharing request by calling Bluetooth to broadcast the first channel establishment request. The connection service module of the second device receives the first channel establishment request via Bluetooth, pops up a connection confirmation page, and after the user clicks the confirmation control to establish a connection with the first device on the connection confirmation page, the connection service module of the second device establishes the first channel with the first device.
[0131] Step S504: After the first channel is established, the connection service module of the second device sends the device information of the second device to the connection service module of the first device.
[0132] In this embodiment of the application, the device information of the second device includes the device identifier of the second device, which is used to uniquely identify the second device.
[0133] In a typical screen sharing process, the first device does not store the device information of the second device. If the screen sharing connection between the first and second devices is interrupted, and the first device needs to reconnect, it cannot determine which device to rebuild the connection with. In this embodiment, after establishing a connection, the first device obtains the device information of the second device to identify which device to rebuild the connection with should a screen sharing interruption occur. Furthermore, in this embodiment, the first and second devices are trusted ring devices, meaning they are mutually trusted, and the first channel established between them is a secure encrypted transmission channel. Therefore, even if the second device sends its device information to the first device, this information cannot be stolen or misused, thus ensuring the security of the second device.
[0134] Step S505: The connection service module of the first device stores the device information of the second device.
[0135] In this embodiment of the application, the connection service module of the first device stores the device information in the local persistent storage area.
[0136] In this embodiment, the first device stores the device information of the second device so that if screen sharing is interrupted in the future, it can be determined which device needs to be re-established with the screen sharing connection, thereby simplifying the screen sharing connection re-establishment steps and shortening the screen sharing connection re-establishment time.
[0137] It is understandable that when the first device stores the device information of the second device, it can use the device information of the second device to overwrite the historically stored device information, so as to ensure that the device information stored in the first device corresponds to the device that last shared the screen with the first device.
[0138] Step S506: The connection service module of the second device sends a collaborative pairing command to the connection service module of the first device.
[0139] In this embodiment, the collaborative pairing instruction is used to instruct the first device to launch a collaborative window. The collaborative pairing instruction may include information such as the screen dimensions of the second device.
[0140] Step S507: In response to the collaboration pairing command, the connection service module of the first device sends a command to pull up the collaboration window to the collaboration module of the first device.
[0141] Step S508: The collaboration module of the first device responds to the command to pull up the collaboration window and performs window collaboration operation.
[0142] In this embodiment of the application, window collaboration operation includes operations such as determining the size of the collaboration window, the size and position of the collaboration window relative to the screen of the first device.
[0143] Step S509: After the first device's collaboration module completes the window collaboration operation, it sends a pairing success response to the first device's connection service module.
[0144] Step S510: The connection service module of the first device sends the pairing success response to the connection service module of the second device.
[0145] Step S511: The connection service module of the first device sends a second channel establishment request to the connection service module of the second device.
[0146] The second channel is a data transmission channel for transmitting media data. The first channel is a P2P-based data transmission channel; for example, it is a P2P-based MagicLink channel.
[0147] Step S512: The connection service module of the second device responds to the second channel establishment request and establishes a second channel with the first device.
[0148] It is understandable that establishing a second channel between the first device and the second device involves multiple interaction processes. Figure 5 The diagram is for illustrative purposes only and does not describe the detailed steps involved in establishing the channel.
[0149] In this embodiment, after the second channel is established, the second device can send screen projection data to the first device. Based on this projection data, the first device can display the second device's interface on its own display screen, thus achieving screen sharing. For example, after the second channel is established, the first device's connection service module sends a screen projection data request to the second device's connection service module. The second device's connection service module responds to the request, determines the projection data information, and returns the projection data information to the first device's connection service module. The first device's connection service module then sends the projection data information to its collaboration module. Based on this projection data information, the collaboration module initializes the audio / video virtualization service and performs screen sharing. The projection data request may be, for example, a video stream width / height request, and the projection data information may be, for example, video stream width / height information.
[0150] In the screen sharing optimization method provided in this application embodiment, after the first device and the second device establish a connection, the first device stores the device information of the second device. This allows the first device to determine which device it needs to re-establish the screen sharing connection with if a screen sharing interruption occurs, simplifying the subsequent screen sharing connection reconstruction steps, shortening the reconstruction time, and improving the reconnection efficiency after a screen sharing interruption. Furthermore, in this application embodiment, the first device and the second device are trust ring devices, meaning they are mutually trusted devices, and the transmission channel established between them is a secure encrypted transmission channel. Therefore, even if the second device sends device information to the first device, it can be guaranteed that the device information will not be stolen or illegally used, thus ensuring that the operation of the second device sending device information to the first device does not affect the security of the second device.
[0151] In this embodiment of the application, after the first device and the second device establish a second channel, it can be considered that a screen sharing connection has been established between the first device and the second device. This is because after the first device and the second device establish a second channel, the first device and the second device can transmit screen data through the second channel to achieve screen sharing.
[0152] In some implementation scenarios, if the screen sharing connection between the first device and the second device is abnormally interrupted, for example, due to a Wi-Fi or Bluetooth malfunction, preventing the first device from continuing screen sharing, a connection failure interface will be displayed on the first device. This connection failure interface can be found in the aforementioned... Figure 2a Interface 202 in (1). In this scenario, if the user needs to continue screen sharing, they need to click the reconnection control in the connection failure interface to initiate the reconnection process. In this embodiment of the application, another screen sharing optimization method is provided to optimize the reconnection process, so as to simplify the steps of the reconnection process after screen sharing is disconnected, shorten the reconnection time after screen sharing is disconnected, improve the reconnection efficiency, and enhance the user's terminal experience.
[0153] Figure 6 This is a flowchart illustrating another screen sharing optimization method provided in an embodiment of this application. The screen sharing optimization method is applied to an electronic device, which includes a collaboration assistant module and a computer assistant module. The collaboration assistant module includes a collaboration module and a reconnection module, and the computer assistant module includes an entry service module, a connection service module, and a device management service module. Figure 6 This paper uses the interaction between two electronic devices (a first device and a second device) as an example to illustrate the screen sharing optimization method provided in the embodiments of this application. Figure 6 As shown, the screen sharing optimization method includes the following steps: S513-S522.
[0154] Step S513: In response to the interruption of the screen sharing connection with the second device, the collaboration module of the first device sends a screen sharing connection interruption reminder to the reconnection module.
[0155] In this embodiment, the reasons for the screen sharing connection interruption include, but are not limited to, Wi-Fi or Bluetooth malfunctions. If either Wi-Fi or Bluetooth malfunctions, the first and second channels between the first and second devices will be disconnected.
[0156] Step S514: The reconnection module responds to the screen sharing connection interruption reminder and displays the connection failure interface.
[0157] In this embodiment, the connection failure interface can be found in the foregoing. Figure 2a Interface 202 in (1). The connection failure interface includes controls for initiating a reconnection, such as those mentioned above. Figure 2a The reconnection control 2021 in (1).
[0158] Step S515: In response to the user's second operation on the connection failure interface, the reconnection module sends a reconnection request to the entry service module of the first device.
[0159] The second operation is used to initiate a screen sharing reconnection. This second operation could be, for example, clicking the reconnection control on the connection failure screen.
[0160] Step S516: The entry service module of the first device responds to the reconnection request and queries whether the first device stores device information.
[0161] In this embodiment of the application, the first device can query whether the device information is stored in the local persistent storage.
[0162] In this embodiment, during the aforementioned steps, when the first device stores the device information of the second device, it overwrites the previously stored device information with the device information of the second device to ensure that the device information stored in the first device corresponds to the device that most recently shared its screen with the first device. Therefore, the first device queries whether it stores device information. If it does, the device information corresponds to the device that most recently shared its screen with the first device, i.e., the device information of the second device.
[0163] In some embodiments, if the first device does not store device information, it indicates that the process of storing the device information of the second device may be malfunctioning. To ensure the success rate of screen sharing reconnection, if the first device does not store device information, the first device can, as described above... Figure 1The method for reconnecting after a screen sharing disconnection is shown in the embodiment of this application. This reconnection method will not be described in detail in this embodiment.
[0164] Step S517: If the device information of the second device is stored in the first device, the entry service module of the first device sends a device online status query request to the device management service module of the first device.
[0165] In this embodiment of the application, screen sharing reconnection with the second device requires the second device to be online, that is, the second device's Wi-Fi connection is in a normal communication state.
[0166] Understandably, since the first device stores the device information of the second device, when the user initiates a screen sharing reconnection after the screen sharing connection is lost, the first device can quickly identify the peer device that needs to re-establish the screen sharing connection as the second device, without having to broadcast connection information via Bluetooth. This avoids the problem of long reconnection time and low reconnection efficiency caused by the unpredictable timing of the peer device receiving the Bluetooth broadcast.
[0167] Step S518: The device management service module of the first device sends an online status query request for the device to the device management service module of the second device.
[0168] In this embodiment of the application, the process of the device management service module of the first device sending the device online status query request to the device management service module of the second device is a process of the first device establishing a timeout response. If no response is received from the device management service module of the second device within a preset time (e.g., 1 second), the second device is considered to be offline.
[0169] If the second device is offline, the first device can either terminate the screen reconnection process or establish a screen sharing connection with other devices via Bluetooth broadcast. The process of establishing a screen sharing connection with other devices via Bluetooth broadcast can be found above. Figure 1 The steps S102-S108 shown are not described again in this embodiment of the application.
[0170] Step S519: In response to the device online status query request, the device management service module of the second device sends the device online status information to the device management service module of the first device.
[0171] Step S520: The device management service module of the first device sends the online status information of the device to the entry service module of the first device.
[0172] Step S521: When the device online status information indicates that the second device is online, the entry service module of the first device sends the online information of the second device to the connection service module of the first device.
[0173] The online status information of the second device is used to indicate that the second device is currently online.
[0174] Step S522: In response to the online information of the second device, the connection service module of the first device sends a data transmission channel establishment request to the connection service module of the second device.
[0175] In this embodiment, the data transmission channel establishment request is used to instruct the establishment of a data transmission channel, which includes a first channel and a second channel. Detailed descriptions of the first and second channels are provided in the foregoing embodiments and will not be repeated here.
[0176] In some embodiments, the connection service module of the first device responds to the online information of the second device by creating a session server, opening a session, and opening a MagicLink service instance to establish a data transmission channel with the second device.
[0177] Step S523: The connection service module of the second device responds to the data transmission channel establishment request and establishes a data transmission channel with the first device.
[0178] In this embodiment of the application, the data transmission channel includes a first channel and a second channel.
[0179] In this embodiment, the connection service module of the second device, in response to a data transmission channel establishment request, establishes a data transmission channel with the first device. This includes: when the second device is online, the first device sends a first channel establishment request to the second device via Bluetooth to enable the second device to establish a first channel with the first device. After the first channel is established, based on the first channel, a second channel establishment request is sent to the second device to enable the second device to establish a second channel with the first device.
[0180] It is understandable that the process of establishing a data transmission channel between the second device and the first device involves multiple interactive processes between the two. Figure 6 This is for illustrative purposes only and the specific channel establishment steps are omitted. For details on the specific channel establishment steps, please refer to the establishment process of the regular Bluetooth-based MagicLink channel and the P2P-based MagicLink channel. They will not be elaborated here.
[0181] In this embodiment, the first device and the second device trust each other, and the second device is the peer device that the first device determines needs to reconnect via screen sharing. Therefore, after receiving the data transmission channel establishment request from the first device, the second device can directly establish a data transmission channel with the first device, without needing to do what was described above. Figure 1 In the illustrated reconnection process, the second device receives the connection information from the first device via Bluetooth scanning and then pops up a connection confirmation window. Reconnection to screen sharing can only proceed after user confirmation. In the screen sharing reconnection optimization method provided in this application embodiment, user confirmation is not required on the second device side, effectively simplifying the reconnection process after screen sharing disconnection, shortening screen sharing reconnection time, improving screen sharing reconnection efficiency, and enhancing the user's terminal experience.
[0182] Step S524: In response to the completion of the data transmission channel establishment, the connection service module of the first device sends a reconnection success message to the reconnection module.
[0183] Step S525: The connection service module of the second device sends screen projection data to the connection service module of the first device based on the data transmission channel.
[0184] In this embodiment, the connection service module of the second device sends screen projection data to the connection service module of the first device based on the second channel in the data transmission channel.
[0185] Step S526: The connection service module of the first device sends screen projection data to the collaboration module.
[0186] Step S527: The collaboration module of the first device displays the screen interface of the second device in the display interface of the first device based on the projection data.
[0187] Figure 7 This application provides an embodiment of a screen sharing reconnection process after disconnection. Figure 3 In the screen sharing reconnection optimization method provided in the embodiments of this application, such as... Figure 7 As shown in (1) of Figure 2, the display interface of the first device (tablet) is interface 701. When the screen sharing connection established between the first device and the second device (phone) is abnormally disconnected, a connection failure interface 702 is displayed in interface 701. The user clicks the reconnection control 7021 in the connection failure interface 702 to initiate the reconnection process of screen sharing with the second device. In this embodiment of the application, the first device and the second device can directly rebuild the data transmission channel. The second device does not need to pop up a reconnection confirmation window to wait for user confirmation. That is, the interface shown in (2) of Figure 2(a) will not appear in the second device. This can effectively simplify the reconnection process after the screen sharing is disconnected, shorten the screen sharing reconnection time, improve the screen sharing reconnection efficiency, and enhance the user's terminal experience.
[0188] In this embodiment of the application, after the user clicks the reconnection control 7021 in the connection failure interface 702, as follows: Figure 7 As shown in (2), the first device's display interface 701 displays the "Connecting" interface 703. After the first device and the second device complete the data transmission channel reconstruction, and the second device sends the projection data to the first device, as shown in (2), the connection is established. Figure 7 As shown in (3), the first device displays the screen interface 704 corresponding to the second device based on the projection data.
[0189] It is understood that, in order to achieve the above-mentioned functions, electronic devices include hardware and / or software modules that perform the respective functions. Based on the algorithmic steps of the examples described in the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in conjunction with the embodiments, but such implementation should not be considered beyond the scope of this application.
[0190] The steps performed by the electronic device in the screen sharing optimization method provided in the above-described embodiments of this application can also be performed by a chip system included in the electronic device. This chip system may include a processor and a Bluetooth chip. The chip system may be coupled to a memory, enabling it to call a computer program stored in the memory during runtime to implement the steps performed by the electronic device. The processor in the chip system can be an application processor or a non-application processor.
[0191] This embodiment also provides a computer-readable medium storing computer instructions, which, when executed on an electronic device, cause the electronic device to perform the aforementioned method steps to implement the methods described in the above embodiments.
[0192] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the methods described in the above embodiments.
[0193] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component, or module. The apparatus may include a connected processor and a memory; wherein the memory is used to store computer execution instructions, and when the apparatus is running, the processor may execute the computer execution instructions stored in the memory to cause the chip to execute the methods in the above-described method embodiments.
[0194] In this embodiment, the electronic device, computer-readable medium, computer program product, or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0195] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0196] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0197] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units.
[0198] Any content in the various embodiments of this application, as well as any content in the same embodiment, can be freely combined. Any combination of the above content is within the scope of this application. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, and other media capable of storing program code. The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A screen sharing optimization method, characterized in that, The method is applied to a first device, which establishes a first connection with a second device, the first connection being used to support data transmission during screen sharing between the first device and the second device; the method includes: In response to the first connection interruption, a connection failure interface is displayed; In response to the user's first action on the connection failure screen, query whether device information is stored locally; the device information is used to uniquely identify the second device. If the device information is found, determine whether the second device is online based on the device information; While the second device is online, a first connection is established with the second device; Receive the first screen projection data sent by the second device based on the first connection; Based on the first projection data, the screen interface of the second device is displayed in the display interface.
2. The method according to claim 1, characterized in that, Before displaying the connection failure interface in response to the first connection interruption, the method further includes: In response to the command to initiate screen sharing, a first channel is established with the second device; Based on the first channel, receive device information sent by the second device; Store the device information of the second device; Based on the first channel, a second channel is established with the second device; the first connection includes the first channel and the second channel.
3. The method according to claim 1, characterized in that, When the second device is online, establishing a first connection with the second device includes: When the second device is online, a first channel establishment request is sent to the second device via Bluetooth so that the second device establishes a first channel with the first device; Based on the first channel, a second channel establishment request is sent to the second device to enable the second device to establish a second channel with the first device; the second channel is used to transmit projection data.
4. The method according to claim 1, characterized in that, The method further includes: If no device information is stored locally, or if the second device is offline, a first screen sharing operation is performed; the first screen sharing operation includes: Based on Bluetooth broadcast connection information, a third device responds to the connection information and displays a connection confirmation interface; In response to the connection response information returned by the third device, a second connection with the third device is established; the connection response information is the connection response information returned by the third device in response to the user's confirmation operation on the connection confirmation interface; the second connection is used to support data transmission when the first device and the third device share the screen. Receive the first screen projection data sent by the third device based on the first connection; Based on the first projection data, the screen interface of the third device is displayed in the display interface.
5. The method according to claim 2, characterized in that, Before establishing a first channel with the second device in response to a screen sharing initiation command, the method further includes: Configure the first device and the second device to belong to the same trust ring.
6. The method according to claim 2 or 3, characterized in that, The first channel is a Bluetooth-based data transmission channel; the second channel is a P2P-based data transmission channel.
7. The method according to claim 1, characterized in that, Determining whether the second device is online based on the device information includes: Based on the device information, an online status query request is sent to the second device; Receive the online status information returned by the second device to determine that the second device is online.
8. The method according to claim 7, characterized in that, After sending an online status query request to the second device based on the device information, the method further includes: If no information is received from the second device within a preset time, it is determined that the second device is offline.
9. An electronic device, characterized in that, The electronic device includes: One or more processors; Memory; And a computer program, wherein the computer program is stored on the memory, and when the computer program is executed by the one or more processors, causes the electronic device to perform the method as described in any one of claims 1-8.
10. A computer storage medium, characterized in that, Includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1-8.