File sharing method and device and storage medium
Patent Information
- Application Number
- CN202480011215.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-12-14
- Filing Date
- 2024-08-08
- Publication Date
- 2025-09-16
AI Technical Summary
In screen collaboration scenarios, how to achieve cross-device file sharing, especially in multi-screen collaboration scenarios, it is difficult for users to share files quickly and efficiently.
By displaying the screen content of the second electronic device on the first electronic device, the user can drag and drop the file from the first window to the screen effective area of the third electronic device to realize the cross-device transmission and display of the file. The specific steps include: the first electronic device is wired or wirelessly connected to the second and third electronic devices, displaying the screen content of the second electronic device, the user drags the file to the screen effective area of the third electronic device, and the third electronic device receives and displays the file.
It realizes cross-device file sharing in screen collaboration scenarios, is easy to operate, can quickly and efficiently realize file transmission and display, and improves the convenience of user operations.
Smart Images

Figure CN120660084A_ABST
Abstract
Description
File sharing method, device and storage medium
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on December 14, 2023, with application number 202311730631.4 and application name “File Sharing Method, Device and Storage Medium”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of terminal technology, and in particular to a file sharing method, device, and storage medium. Background Art
[0003] With the development of cross-device collaboration and multi-screen interaction technologies, users are increasingly demanding multi-screen interaction, and multi-screen collaboration scenarios are becoming increasingly diverse. Multi-screen collaboration scenarios, also known as screen collaboration scenarios, include screen projection, extended screen, and simultaneous projection and extended screen. How to achieve cross-device file sharing in screen collaboration scenarios is currently a pressing issue.
[0004] Summary of the Invention
[0005] Embodiments of the present application provide a file sharing method, device, and storage medium to implement cross-device file sharing in a screen collaboration scenario.
[0006] In a first aspect, an embodiment of the present application proposes a file sharing method, which is applied to a system including a first electronic device, a second electronic device and a third electronic device, wherein the first electronic device is connected to the second electronic device and the third electronic device, respectively. The method includes: the first electronic device displays a first window, the first window displays the screen content of the second electronic device, and the screen content of the second electronic device includes a first file; when the first file is dragged from the first window to the effective area of the screen of the third electronic device, in response to the drag-and-release operation of the first file, the third electronic device displays the first file.
[0007] The first electronic device is connected to the second electronic device by wire or wirelessly, and the first electronic device is connected to the third electronic device by wire or wirelessly. The first window displayed by the first electronic device is a collaborative window of the second electronic device, and the content displayed in the first window can be consistent with the content displayed on the display screen of the second electronic device. When the content displayed in the first window is consistent with the content displayed on the display screen of the second electronic device, the first window can be regarded as a mirror window of the second electronic device on the first electronic device. In one example, the first window displays a first file, and the display screen of the second electronic device displays the first file. The first file is a file stored locally on the second electronic device. For example, the first file can be a picture, video, text, audio, application, etc.
[0008] For example, referring to FIG5 , the first electronic device is a personal computer (PC) 100, the second electronic device is a mobile phone 200, and the third electronic device is a tablet computer 300. PC 100 is connected to mobile phone 200 by wire or wireless connection, and PC 100 is connected to tablet computer 300 by wire or wireless connection. The first window is window 101, and the first file displayed in the first window is picture 1. The active screen area of the third electronic device is area 301 on the display screen of tablet computer 300. The user can use a wireless mouse to drag picture 1 across the edge of the PC 100 screen to area 301 of tablet computer 300, then release picture 1, and picture 1 will be displayed in area 301.
[0009] In the above method, the content projected from the second electronic device to the first electronic device is displayed in the first window of the first electronic device. The user drags the first file in the first window across devices to the third electronic device, thereby dragging the first file stored locally on the second electronic device to the third electronic device for display through the first electronic device. The operation process is simple and can quickly and efficiently realize cross-device file sharing in the screen collaboration scenario.
[0010] In an optional embodiment of the first aspect, before the third electronic device displays the first file, the method further includes: the second electronic device transmitting the first file to the first electronic device; and the first electronic device transmitting the first file to the third electronic device.
[0011] In the above method, the second electronic device transmits the first file dragged by the user to the third electronic device through the first electronic device, thereby realizing cross-device file transfer in the screen collaboration scenario.
[0012] In an optional embodiment of the first aspect, before the second electronic device transfers the first file to the first electronic device, the method further includes: in response to a drag-and-release operation on the first file, the third electronic device determines whether the release position of the first file is within the effective area of the screen of the third electronic device; if so, the third electronic device sends a first notification message to the first electronic device, and the first notification message is used to indicate that the first file is released to the effective area of the screen of the third electronic device; the first electronic device sends a file transfer request to the second electronic device, and the file transfer request is used to request the transfer of the first file.
[0013] Exemplarily, continuing to refer to Figure 5, the drag-and-release operation on the first file is a drag-and-release operation on the image 1 on the display screen of the tablet computer 300. The effective screen area of the third electronic device is area 301 on the display screen of the tablet computer 300. It should be understood that if the image 1 is dragged outside area 301, since it is not the effective screen area of the tablet computer 300, the cross-device drag fails, and the tablet computer 300 will not receive and display the image 1. The first notification message sent by the third electronic device to the first electronic device may correspond to the notification message of S609 in Figure 6. The file transfer request sent by the first electronic device to the second electronic device may correspond to the file transfer request of S613 in Figure 6.
[0014] In the above method, after the first electronic device receives a notification from the third electronic device that the file has been released to the effective area of the screen, the first electronic device obtains the dragged first file from the second electronic device, and then transfers the first file to the third electronic device for display, thereby realizing cross-device file sharing in the screen collaboration scenario. It should be understood that if the first electronic device receives a notification from the third electronic device that the file has not been released to the effective area of the screen, the first electronic device will not obtain the first file from the second electronic device, and the third electronic device will not receive and display the first file.
[0015] In an optional embodiment of the first aspect, the method further includes: when the first file is dragged from the first window to the screen edge of the first electronic device, the first electronic device sends a first cross-device drag event to the third electronic device, and the first cross-device drag event is used to indicate that a file is dragged from the first electronic device to the third electronic device.
[0016] For example, continuing to refer to Figure 5, when picture 1 is dragged from window 101 of PC 100 to the left screen edge of PC 100, PC 100 sends a first cross-device drag event to tablet computer 300 to indicate that a picture is dragged from PC 100 to tablet computer 300. The first cross-device drag event may correspond to the super keyboard and mouse drag-in event of S606b in Figure 6.
[0017] In the above method, when the first file is dragged to the screen edge of the main screen of the first electronic device, the first electronic device notifies the third electronic device that a file is dragged across devices by sending a first cross-device drag event, so that the third electronic device starts monitoring the dragged first file.
[0018] In an optional embodiment of the first aspect, the method further includes: the third electronic device displays a second file, where the second file is a file locally stored on the third electronic device; when the second file is dragged from the screen of the third electronic device to the first window, in response to a drag-and-release operation on the second file, the first window and the second electronic device display the second file.
[0019] The second file can be an image, video, text, audio, application, etc. For example, referring to FIG7 , the second file is image 5, and image 5 is displayed on the display screen of tablet computer 300. The user can use a wireless mouse to drag image 5 across the edge of the tablet computer 300 screen to window 101 of PC 100 and then release image 5. Image 5 is displayed in window 101 and on the display screen of mobile phone 200.
[0020] In the above method, the content projected from the second electronic device to the first electronic device is displayed in the first window of the first electronic device. The user drags the third file in the third electronic device to the first window across devices, and the second file stored locally on the third electronic device can be dragged to the second electronic device through the first electronic device for display. The first window can synchronously display the second file. The operation process is simple, and cross-device file sharing in the screen collaboration scenario can be realized quickly and efficiently.
[0021] In an optional embodiment of the first aspect, before the first window and the second electronic device display the second file, the method further includes: the third electronic device transmitting the second file to the first electronic device; and the first electronic device transmitting the second file to the second electronic device.
[0022] In the above method, the third electronic device transmits the second file dragged by the user to the second electronic device through the first electronic device, thereby realizing cross-device file transfer in the screen collaboration scenario.
[0023] In an optional embodiment of the first aspect, the third electronic device transmits the second file to the first electronic device, including: in response to a drag-and-release operation on the second file, the first electronic device sends a second notification message to the third electronic device, the second notification message being used to indicate that the second file is released to the first window; and the third electronic device transmits the second file to the first electronic device.
[0024] For example, with continued reference to FIG7 , the drag-and-drop operation on the second file is a drag-and-drop operation on picture 5 in window 101 of PC 100. The second notification message sent by the first electronic device to the third electronic device may correspond to the notification message in S809b of FIG8 . The transmission of the second file by the third electronic device to the first electronic device may correspond to S811 of FIG8 .
[0025] In the above method, after the third electronic device receives the notification sent by the first electronic device that the file is released to the first window, the third electronic device transmits the second file to the first electronic device, so that the first electronic device transfers the second file to the second electronic device for display, thereby realizing cross-device file sharing in the screen collaboration scenario.
[0026] In an optional embodiment of the first aspect, the method further includes: when the second file is dragged to the screen edge of the third electronic device, the third electronic device sends a second cross-device drag event to the first electronic device, and the second cross-device drag event is used to indicate that a file is dragged from the third electronic device to the first electronic device.
[0027] For example, continuing to refer to Figure 7, when the picture 5 is dragged from the tablet computer 300 to its right screen edge, the tablet computer 300 sends a second cross-device drag event to the PC 100 to indicate that a picture is dragged from the tablet computer 300 to the PC 100. The second cross-device drag event may correspond to the super keyboard and mouse drag-in event of S801 in Figure 8.
[0028] In the above method, when the second file is dragged to the edge of the screen of the third electronic device, the third electronic device notifies the first electronic device that a file is dragged across devices by sending a second cross-device drag event, so that the first electronic device starts monitoring the dragged second file.
[0029] In an optional embodiment of the first aspect, the method further includes: after the super keyboard and mouse service of the first electronic device is started, the super keyboard and mouse service of the first electronic device creates a first virtual window; the first virtual window is used to detect cross-device drag events on the main screen of the first electronic device.
[0030] The first virtual window is located in the lower right corner of the main screen of the first electronic device and can trigger a cross-device drag event on the main screen of the first electronic device. For example, referring to FIG5 , the first electronic device is PC 100, and the first virtual window is window 103 in the lower right corner of the main screen of PC 100. The first virtual window can be used to detect the aforementioned first cross-device drag event and the aforementioned second cross-device drag event.
[0031] In a second aspect, an embodiment of the present application provides a file sharing method, which is applied to a system including a first electronic device, a second electronic device and a third electronic device, wherein the first electronic device is connected to the second electronic device and the third electronic device, respectively. The method includes: the third electronic device displays an extended screen of the first electronic device, the extended screen occupies part of the screen space of the third electronic device, the extended screen displays a second window, the second window displays the screen content of the second electronic device, and the screen content of the second electronic device includes a third file; when the third file is dragged from the second window to the first screen space of the third electronic device excluding the extended screen, in response to the drag-and-release operation of the third file, the first screen space of the third electronic device displays the third file.
[0032] The first electronic device is connected to the second electronic device by wire or wirelessly, and the first electronic device is connected to the third electronic device by wire or wirelessly. The second window is a collaborative window of the second electronic device, and the content displayed in the second window can be consistent with the content displayed on the display screen of the second electronic device. When the content displayed in the second window is consistent with the content displayed on the display screen of the second electronic device, the second window can be regarded as a mirror window of the second electronic device on the first electronic device. In one example, the second window displays a third file, and the display screen of the second electronic device displays the third file. The third file is a file stored locally on the second electronic device. For example, the third file can be a picture, video, text, audio, application, etc.
[0033] For example, referring to FIG9 , the first electronic device is a personal computer (PC) 100, the second electronic device is a mobile phone 200, and the third electronic device is a tablet computer 300. PC 100 is connected to mobile phone 200 by wire or wireless connection, and PC 100 is connected to tablet computer 300 by wire or wireless connection. The extended screen of the first electronic device is an extended screen 304 of tablet computer 300, which is projected from PC 100. Extended screen 304 occupies part of the screen space of tablet computer 300. The second window is window 305 on extended screen 304, and the third file displayed in the second window is picture 1. The first screen space of the third electronic device is screen space 306 of tablet computer 300, excluding extended screen 304. The user can use a wireless mouse to drag picture 1 from window 305 of tablet computer 300 to screen space 306 and then release it. Picture 1 is then displayed on screen space 306.
[0034] In the above method, the first electronic device projects its extended screen onto the display screen of the third electronic device, and the second window of the second electronic device is displayed on the extended screen of the first electronic device. The user drags the third file in the second window to the first screen space of the third electronic device, thereby dragging the third file locally stored on the second electronic device to the third electronic device for display. The operation process is simple and can quickly and efficiently realize cross-device file sharing in the screen collaboration scenario.
[0035] In an optional embodiment of the second aspect, before the third file is displayed in the first screen space of the third electronic device, the method further includes: the second electronic device transmitting the third file to the first electronic device; and the first electronic device transmitting the third file to the third electronic device.
[0036] In the above method, the second electronic device transmits the third file dragged by the user to the third electronic device through the first electronic device, thereby realizing cross-device file transfer in the screen collaboration scenario.
[0037] In an optional embodiment of the second aspect, when a third file is dragged from the second window to the screen edge of the extended screen of the first electronic device, the first electronic device sends a third cross-device drag event to the third electronic device, and the third cross-device drag event is used to indicate that a file is dragged from the extended screen of the first electronic device to the third electronic device.
[0038] For example, continuing to refer to Figure 9, when picture 1 is dragged from window 305 to the screen edge of the extended screen 304 of PC 100, PC 100 sends a third cross-device drag event to tablet computer 300 to indicate that a picture is dragged from the extended screen 304 of PC 100 to tablet computer 300. The third cross-device drag event may correspond to the super keyboard and mouse drag-in event of S1008b in Figure 10.
[0039] In the above method, when the third file is dragged to the screen edge of the extended screen of the first electronic device, the first electronic device notifies the third electronic device that a file is dragged across devices by sending a third cross-device drag event, so that the third electronic device starts monitoring the dragged third file.
[0040] In an optional embodiment of the second aspect, the method also includes: when the third file in the second window is selected and dragged, the super keyboard and mouse service of the first electronic device creates a second virtual window; the second virtual window is used to detect a cross-device drag event on the extended screen of the first electronic device.
[0041] The second virtual window is located in the lower right corner of the extended screen of the first electronic device and can trigger a cross-device drag event on the extended screen of the first electronic device. For example, referring to FIG9 , the first electronic device is PC 100, and the second virtual window is window 309 in the lower right corner of extended screen 304 of PC 100. The second virtual window can be used to detect the aforementioned third cross-device drag event.
[0042] In an optional embodiment of the second aspect, the first electronic device is installed with a first operating system, and the second electronic device and the third electronic device are installed with a second operating system, and the first operating system and the second operating system are different.
[0043] Exemplarily, the first operating system is a Windows operating system, and the second operating system is an Android operating system.
[0044] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory and a processor, wherein the processor is used to call a computer program in the memory to execute the method of the first electronic device as described in any one of the first aspects, or to execute the method of the second electronic device as described in any one of the first aspects, or to execute the method of the third electronic device as described in any one of the first aspects.
[0045] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a memory and a processor, wherein the processor is used to call a computer program in the memory to execute the method of the first electronic device as described in any one of the second aspects, or to execute the method of the second electronic device as described in any one of the second aspects, or to execute the method of the third electronic device as described in any one of the second aspects.
[0046] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on an electronic device, the electronic device executes the method of the first electronic device as described in any one of the first aspects, or executes the method of the second electronic device as described in any one of the first aspects, or executes the method of the third electronic device as described in any one of the first aspects.
[0047] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on an electronic device, the electronic device executes the method of the first electronic device as described in any one of the second aspects, or executes the method of the second electronic device as described in any one of the second aspects, or executes the method of the third electronic device as described in any one of the second aspects.
[0048] In the seventh aspect, an embodiment of the present application provides a chip, the chip including a processor, the processor being used to call a computer program in a memory to execute a method of the first electronic device as described in any one of the first aspects, or to execute a method of the second electronic device as described in any one of the first aspects, or to execute a method of the third electronic device as described in any one of the first aspects.
[0049] In an eighth aspect, an embodiment of the present application provides a chip, the chip including a processor, the processor being used to call a computer program in a memory to execute a method of the first electronic device as described in any one of the second aspects, or to execute a method of the second electronic device as described in any one of the second aspects, or to execute a method of the third electronic device as described in any one of the second aspects.
[0050] In the ninth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is run, the computer executes the method of the first electronic device as described in any one of the first aspects, or executes the method of the second electronic device as described in any one of the first aspects, or executes the method of the third electronic device as described in any one of the first aspects.
[0051] In the tenth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is run, it enables the computer to execute the method of the first electronic device as described in any one of the second aspects, or execute the method of the second electronic device as described in any one of the second aspects, or execute the method of the third electronic device as described in any one of the second aspects.
[0052] It should be understood that the third to tenth aspects of the present application correspond to the technical solutions of the first or second aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] FIG1 is a schematic diagram of a screen collaboration scenario according to an embodiment of the present application;
[0054] FIG2 is a second schematic diagram of a screen collaboration scenario provided in an embodiment of the present application;
[0055] FIG3 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0056] FIG4 is a schematic structural diagram of another electronic device provided in an embodiment of the present application;
[0057] FIG5 is a schematic diagram of a first scenario of a file sharing method provided in an embodiment of the present application;
[0058] FIG6 is a flowchart of a file sharing method according to an embodiment of the present application;
[0059] FIG7 is a second schematic diagram of a scenario of the file sharing method provided in an embodiment of the present application;
[0060] FIG8 is a second flow chart of the file sharing method provided in an embodiment of the present application;
[0061] FIG9 is a schematic diagram of a third scenario of the file sharing method provided in an embodiment of the present application;
[0062] FIG10 is a third flow chart of the file sharing method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0063] To facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that the words "first" and "second" do not limit the quantity or execution order, and the words "first" and "second" do not necessarily mean different.
[0064] It should be noted that in the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0065] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items (kind / individual)" or similar expressions refers to any combination of these items, including any combination of single items (kind / individual) or plural items (kind / individual). For example, at least one of a, b or c (kind / individual) can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0066] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0067] To facilitate understanding, the relevant concepts involved in the embodiments of the present application are first described below for reference.
[0068] First, electronic devices are devices with display screens. In the embodiments of the present application, electronic devices may be portable devices, such as mobile phones, tablet computers, wearable devices with display and wireless communication functions, vehicle-mounted terminal devices, virtual reality (VR) devices, augmented reality (AR) devices, personal computers (PCs), laptops, netbooks, personal digital assistants (PDAs), smart home devices (such as smart TVs), etc. The embodiments of the present application do not limit the specific technologies and specific device forms used by the electronic devices.
[0069] Second, external devices refer to devices connected to the computer system outside of the mainframe. They are generally divided into external input devices, external output devices, and external storage devices. External devices are an important part of the computer system, playing the role of information transmission, input, and storage. In the embodiment of the present application, external input devices may include a keyboard, a mouse, a pen input device (such as a stylus), etc.
[0070] Third, an application (APP), also known as an application program, is a software program that can implement one or more specific functions. Typically, multiple applications can be installed in an electronic device, such as a camera application, a text messaging application, a browser application, an album application, etc. The applications mentioned in the embodiments of the present application can be applications that are installed on the electronic device when it leaves the factory, or they can be applications that the user downloads from the Internet or obtains from other electronic devices while using the electronic device.
[0071] Fourth, a P2P (peer-to-peer) connection, also known as a point-to-point connection, refers to direct communication and data transmission between two devices without the need for a centralized server. This connection method is commonly used in scenarios such as distributed computing, file sharing, and instant messaging. It can reduce the burden on servers and improve the efficiency and security of data transmission. In the embodiments of the present application, the communication connection between devices can be a P2P connection.
[0072] Fifth, the Super Keyboard and Mouse Service is a multi-device collaboration function of electronic devices that can share external input devices with nearby devices. In the embodiment of this application, the PC can share the PC's mouse, keyboard, pen input device, etc. with nearby devices such as a tablet.
[0073] Sixth, screen collaboration service is a multi-device collaboration function of electronic devices that can connect and work together with nearby devices to share screen content. Collaboration can be mirroring or extending screen content between different devices. In the embodiment of the present application, screen collaboration service mainly refers to screen content mirroring between devices, such as a mobile phone projecting its mirrored screen onto a PC.
[0074] Seventh, the accompanying service is a screen collaboration function of an electronic device that can project the extended screen of a device onto the screen of a nearby device. In the embodiment of the present application, a PC can project its extended screen onto, for example, a tablet computer.
[0075] The present application provides a file sharing method for sharing files between multiple electronic devices that establish screen collaboration. The multiple electronic devices that establish screen collaboration include at least two electronic devices. The shared files can be applications, pictures, videos, audio, text, etc.
[0076] The following introduces the screen collaboration scenario of the file sharing method provided in the embodiment of the present application with reference to the accompanying drawings.
[0077] Scenario 1: FIG1 is a schematic diagram of a screen collaboration scenario provided in an embodiment of the present application. As shown in FIG1 , the scenario includes a PC 100, a mobile phone 200, and a tablet computer 300, wherein the PC 100 is respectively connected to the mobile phone 200 and the tablet computer 300. The communication connection between devices in FIG1 is a wireless fidelity (Wi-Fi) P2P connection. In some embodiments, the devices can also be connected by wire, for example, via a universal serial bus (USB).
[0078] PC 100 and mobile phone 200 have established a screen collaborative connection. Mobile phone 200 projects the content on its own display screen to the display screen of PC 100 for display, such as window 101 in Figure 1. Window 101 is the collaborative window of mobile phone 200. Normally, the content displayed on window 101 is consistent with the content displayed on the screen of mobile phone 200. Window 101 can also be called the mirror screen of mobile phone 200.
[0079] In some embodiments, the content displayed on the window 101 may also be inconsistent with the content displayed on the screen of the mobile phone 200.
[0080] The window 101 is located at the upper layer of the PC 100 screen. The user can drag the window 101 to any position on the PC 100 screen or adjust the window size of the window 101 on the PC 100 screen.
[0081] After establishing a P2P connection between the devices, the user can access PC Manager on PC 100 and quickly establish a screen collaboration connection between PC 100 and mobile phone 200 in Multi-Screen Collaboration within PC Manager. For example, the user can scan a QR code displayed in Multi-Screen Collaboration with their mobile phone to establish a screen collaboration connection. Of course, other methods can also be used to establish the connection, which is not limited in this embodiment of the application.
[0082] PC 100 and tablet 300 have established a super keyboard and mouse connection. PC 100 and tablet 300 can share external input devices such as PC 100's keyboard, mouse, or stylus. PC 100's keyboard and mouse can be used to control the PC 100 and tablet, and can also be used to drag and drop images and files between the devices. In Figure 1, the external input device used by the user is a wireless mouse.
[0083] After establishing a P2P connection between the devices, the user can move the mouse pointer and tap the edge of the PC 100 screen twice to establish a super keyboard and mouse connection. Of course, other methods can also be used to connect, which is not limited in this embodiment of the application.
[0084] Based on the screen collaboration scenario shown in Figure 1, an embodiment of the present application provides a file sharing method. In response to operation 1 shown in Figure 1, the file in the mobile phone collaboration window on the PC screen can be transferred to the tablet computer via the PC, and the successfully transferred file can be displayed on the screen of the tablet computer. In response to operation 2 shown in Figure 1, the file in the tablet computer can be transferred to the mobile phone via the PC, and the successfully transferred file can be displayed on the mobile phone screen and the mobile phone collaboration window on the PC screen. The above method can quickly and efficiently realize cross-device file sharing in the screen collaboration scenario (screen projection), thereby improving the convenience of user operation.
[0085] Among them, operation 1 is a cross-device drag operation starting from the mobile phone collaboration window on the PC screen and released to the tablet screen, and operation 2 is a cross-device drag operation starting from the tablet screen and released to the mobile phone collaboration window on the PC screen.
[0086] Scenario 2: Figure 2 is a second schematic diagram of a screen collaboration scenario provided by an embodiment of the present application. As shown in Figure 2, this scenario also includes PC 100, mobile phone 200, and tablet computer 300. PC 100 is connected to mobile phone 200 and tablet computer 300, respectively, in a communication manner, such as a P2P connection. PC 100 and mobile phone 200 have established a screen collaboration connection, and PC 100 and tablet computer 300 have established a super keyboard and mouse connection. For related details, please refer to the previous text.
[0087] Unlike FIG1 , PC 100 also establishes a sidecar connection with tablet computer 300, allowing PC 100 to project files on its extended screen onto the display screen of tablet computer 300 for display, as shown in FIG2 , as extended screen 301. Extended screen 301 is located on top of the screen of tablet computer 300, occupying a portion of the screen space of tablet computer 300. In some embodiments, extended screen 301 may also occupy the entire screen of tablet computer 300.
[0088] 1 , window 101 is located on the upper layer of extended screen 301. The user can drag window 101 to any position on extended screen 301 or adjust the size of window 101 on extended screen 301. In some embodiments, the user can also drag window 101 on extended screen 301 to the screen of PC 100.
[0089] After establishing a P2P connection between the devices, the user can enter the PC Manager of PC 100 and quickly establish a freewheeling connection between PC 100 and tablet computer 300 in the multi-screen collaboration of PC Manager.
[0090] Based on the screen collaboration scenario shown in Figure 2, an embodiment of the present application provides a file sharing method. In response to operation 3 shown in Figure 2, the file in the mobile phone collaboration window on the PC extended screen can be transferred to the tablet computer via the PC, and the successfully transferred file is displayed on the tablet computer screen in the screen space other than the PC extended screen. The above method can quickly and efficiently realize cross-device file sharing in the screen collaboration scenario (screen projection and extended screen concurrently), improving the convenience of user operation.
[0091] Among them, operation 3 is a drag operation starting from the mobile phone collaborative window on the PC extended screen and releasing it to the screen space on the tablet computer except the PC extended screen.
[0092] To facilitate understanding of the file sharing method of the present application, the structures of the electronic devices involved in the above-mentioned scenarios 1 and 2 are introduced below.
[0093] Figure 3 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Taking the electronic device as a PC as an example, as shown in Figure 3, the PC may include an application layer, a Windows system, and a hardware layer.
[0094] The application layer may include applications such as photo albums, folders, browsers, etc. In an embodiment of the present application, the application layer also includes a super keyboard and mouse service, a screen collaboration service, and a companion service. The super keyboard and mouse service of the PC can be informed of cross-device drag events on the PC (such as dragging a file on the PC to a tablet), drag-and-release events (such as dragging a file on a tablet to the PC and then releasing it), etc. The screen collaboration service of the PC can obtain the screen content of an external projection device (such as a mobile phone) and present the screen content of the external projection device on the PC screen. The companion service of the PC can transmit the content of the extended screen of the PC to an externally connected device (such as a tablet) to achieve the expansion of the PC screen.
[0095] Windows systems may include Bluetooth drivers and wireless fidelity (WiFi) drivers. The hardware layer includes the Bluetooth module, WiFi module, and display. The Bluetooth driver drives the Bluetooth module, allowing the PC to establish Bluetooth connections with other devices. The WiFi driver drives the WiFi module, allowing the PC to establish WiFi connections with other devices. The display driver drives the display.
[0096] It should be noted that the layers in the PC hierarchical structure shown in Figure 3 and the modules or components contained in each layer do not constitute a specific limitation on the PC. In other embodiments, the PC may include more or fewer layers than shown, and each layer may include more or fewer components, which is not limited in this embodiment of the application.
[0097] Figure 4 is a schematic diagram of the structure of another electronic device provided in an embodiment of the present application. Taking a mobile phone as an example, the software system of the mobile phone can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. This embodiment of the present application takes the Android system as an example to illustrate the software structure of the mobile phone.
[0098] As shown in Figure 4, the layered architecture divides the phone's software system into several layers, each with distinct roles and responsibilities. Layers communicate with each other via software interfaces. In some embodiments, the Android system can be divided into four layers: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
[0099] The application layer can include a series of application packages, such as photo albums, folders, navigation, browsers, email, calendars, alarm clocks, and other applications. In the embodiment of the present application, the application layer also includes a screen collaboration service. The screen collaboration service of the mobile phone can exchange data with the screen collaboration service of the PC, for example, transmitting the screen content of the mobile phone so that the mobile phone collaboration window is displayed on the PC screen, such as window 101 shown in Figure 1.
[0100] The application framework layer provides an application programming interface (API) and programming framework for the applications in the application layer. In some embodiments, the application framework layer includes input management services, power management services, window management services, etc.
[0101] The Android runtime consists of core libraries and a virtual machine (VM). The Android runtime is responsible for scheduling and management of the Android system. The core libraries consist of two parts: one containing the Java language's callable functions and the other the Android core library. The application layer and the application framework layer run in the VM. The VM executes the Java files in the application and framework layers as binary files. The VM is responsible for managing object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0102] The system library can include multiple functional modules, such as a surface manager, media libraries, a 3D graphics processing library (e.g., OpenGL ES), and a 2D graphics engine (e.g., SGL).
[0103] The kernel layer is the layer between hardware and software. The kernel layer includes, for example, display drivers, camera drivers, audio drivers, sensor drivers, Bluetooth drivers, WiFi drivers, etc., which are not limited in this embodiment of the application.
[0104] The hardware layer includes Bluetooth module, WiFi module, display screen, etc.
[0105] It should be noted that the layers in the hierarchical structure of a mobile phone and the modules or components contained in each layer shown in Figure 4 do not constitute a specific limitation on the mobile phone. In other embodiments, the mobile phone may include more or fewer layers than shown, and each layer may include more or fewer components, which is not limited in this embodiment of the application.
[0106] In an embodiment of the present application, the tablet computer structure can be seen in FIG4 . The tablet computer's application layer may include a super keyboard and mouse service and a companion service. The tablet computer's super keyboard and mouse service can be notified of cross-device drag events on the tablet computer (e.g., dragging a file from a PC to the tablet computer), drag-and-drop events (e.g., releasing a file dragged across devices on the tablet computer), and the like. The companion service of the tablet computer can receive the content of the PC's extended screen transmitted and present the PC's extended screen on the tablet computer's screen.
[0107] Based on the device structures shown in FIG3 and FIG4 , the file sharing methods for the above scenario 1 and scenario 2 are respectively described in detail below in conjunction with specific embodiments.
[0108] The file sharing method of scenario 1 corresponds to the embodiments shown in Figures 5 to 8 below. Specifically, the embodiments shown in Figures 5 and 6 detail the file sharing method based on operation 1, and the embodiments shown in Figures 7 and 8 detail the file sharing method based on operation 2.
[0109] The file sharing method of scenario 2 corresponds to the embodiments shown in FIG. 9 and FIG. 10 below. The embodiments shown in FIG. 9 and FIG. 10 introduce the file sharing method based on operation 3 in detail.
[0110] For ease of understanding, the following embodiments are described using the transmission of pictures as an example. For transmission of other types of files, reference may be made to the following embodiments.
[0111] FIG5 is a schematic diagram of a scenario of a file sharing method provided by an embodiment of the present application. As shown in FIG5 , a collaborative window 101 of a mobile phone 200 is displayed on the screen of the PC 100. The interface of the photo album application of the mobile phone 200 is synchronously displayed on the screen of the window 101 and the screen of the mobile phone 200, and the interface displays multiple pictures, such as picture 1 and picture 2. The user can use a wireless mouse to select a picture in the window 101, such as picture 1, and drag picture 1 from the window 101 to the left edge of the screen of the PC 100, and then enter the right edge of the screen of the tablet computer 300, until the picture 1 is dragged to the effective area 301 of the screen of the tablet computer 300 and released. The mobile phone 200 transfers the picture 1 in the photo album application of the mobile phone 200 to the tablet computer 300 through the PC 100, and displays the picture 1 in the effective area 301 of the tablet computer 300. The effective area 301 can occupy a portion of the screen space of the tablet computer 300. In some embodiments, the effective area 301 can also occupy the entire screen of the tablet computer 300.
[0112] While dragging an image on the screen of PC 100, at a certain moment, as shown in 102 in FIG. 5 , a cursor appears on the screen of PC 100, and a thumbnail of the image appears below the cursor. While dragging an image on the screen of tablet computer 300, at a certain moment, as shown in 302 in FIG. 5 , a cursor appears on the screen of tablet computer 300, and a thumbnail of the image appears below the cursor. A plus sign may be displayed in the upper left corner of the thumbnail of the image to indicate that an image has been imported into the tablet computer. FIG. 5 is merely an example, and the embodiments of this application do not limit the styles of dragging images on different types of devices.
[0113] Based on the scenario shown in FIG5 , the interaction process between devices is described in detail below in conjunction with FIG6 .
[0114] Figure 6 is a flowchart of a file sharing method provided in an embodiment of the present application. The file sharing method shown in Figure 6 involves the screen collaboration service of a mobile phone, the screen collaboration service and super keyboard and mouse service of a PC, and the super keyboard and mouse service of a tablet. In Figure 6, the mobile phone and PC have established screen collaboration, and the PC and tablet have established a super keyboard and mouse.
[0115] As shown in FIG6 , the file sharing method includes:
[0116] S601. When it is detected that a picture in the collaboration window is selected and dragged, the screen collaboration service of the PC sends a screen collaboration drag-in event to the super keyboard and mouse service of the PC.
[0117] The drag-in event of screen collaboration (Mirror's DragEnter event) refers to an event triggered in the mobile phone collaboration window of selecting and dragging a file. In this embodiment, the file refers to a picture.
[0118] Exemplarily, as shown in FIG5 , when the user selects and drags the picture 1 in the window 101 , the screen collaboration service of the PC sends a screen collaboration drag-in event to the super keyboard and mouse service of the PC.
[0119] S602. The PC's super keyboard and mouse service modifies the first flag to true.
[0120] The initial value of the first flag may be false. After the PC's super keyboard and mouse service receives the drag-in event sent by the PC's screen collaboration service, the PC's super keyboard and mouse service modifies the first flag from false to true. The modified first flag may be recorded as mirrorDragFileFlag_=true, indicating that a file has been dragged out of the mobile phone collaboration window.
[0121] S603. When it is detected that the image is dragged to the edge of the PC screen, the super keyboard and mouse service of the PC determines whether the first flag is true.
[0122] S604: If it is determined that the first flag is true, the super keyboard and mouse service of the PC modifies the second flag to true.
[0123] Exemplarily, as shown in FIG5 , when the picture 1 is dragged to the left edge of the PC screen, the super keyboard and mouse service of the PC determines whether the first flag is true.
[0124] The initial value of the second flag can be false. When detecting that an image is dragged to the edge of the PC screen (a drag-in event of the super keyboard and mouse), the PC's super keyboard and mouse service can reconfirm whether the first flag is true. Its purpose is to check whether the drag-in event of the super keyboard and mouse is triggered based on the drag-in event of the screen collaboration. If so, the second flag is changed to true.
[0125] The modified second flag can be recorded as transFileFromMirrorFlag_=true, indicating that a file has been dragged out of the mobile phone collaborative window and dragged across devices. The second flag can be regarded as the overall flag of the screen collaboration and super keyboard and mouse dragging recorded by the PC super keyboard and mouse (abbreviated as collaborative keyboard and mouse dragging).
[0126] S605. The super keyboard and mouse service of the PC determines whether the second flag is true.
[0127] S606a. If it is determined that the second flag is true, the super keyboard and mouse service of the PC sends a super keyboard and mouse drag-in event to the screen coordination service of the PC.
[0128] S606b. If it is determined that the second flag is true, the super keyboard and mouse service of the PC sends a super keyboard and mouse drag event to the super keyboard and mouse service of the tablet computer.
[0129] In this embodiment, the Super Mouse and Keyboard drag event (SuperIO DragEnter event) refers to a cross-device drag event triggered at the edge of the PC screen. Before the PC's Super Mouse and Keyboard service sends the Super Mouse and Keyboard drag event to the PC's Screen Collaboration Service and the tablet's Super Mouse and Keyboard Service, it can reconfirm whether the second flag is true. The purpose is to check whether the current scenario is a collaborative mouse and keyboard drag.
[0130] This embodiment does not limit the execution order of S606a and S606b, which may be executed simultaneously or sequentially.
[0131] In some embodiments, after S604, when it is detected that the image is dragged across the tablet screen without releasing the file, and then the image is dragged back to the PC screen, the super keyboard and mouse service of the PC will trigger the drag and release (DragLeave) event of the super keyboard and mouse, and change the second flag from true to false.
[0132] After S606a, you can execute:
[0133] S607. The screen collaboration service of the PC changes the third flag to true.
[0134] The initial value of the third flag bit can be false. After receiving the super keyboard and mouse drag event sent by the PC's super keyboard and mouse service, the PC's screen collaborative service can be informed that the image dragged from the mobile phone collaborative window is being dragged across devices. The PC's screen collaborative service modifies the third flag bit to true to record the collaborative keyboard and mouse drag. The modified third flag bit can be recorded as superIODragEnter_=true to indicate that a file has been dragged out of the mobile phone collaborative window and dragged across devices.
[0135] After S606b, you can execute:
[0136] S608. When a drag-and-release operation is detected, the super keyboard and mouse service of the tablet computer determines whether the operation is released within the valid area of the tablet computer screen.
[0137] Exemplarily, as shown in FIG5 , when the cross-device dragged picture 1 is released, the super keyboard and mouse service of the tablet computer determines whether the release is within the valid area of the tablet computer screen.
[0138] S609. If it is determined that the release is within the valid area of the tablet screen, the super keyboard and mouse service of the tablet sends a notification message of release to the valid area to the super keyboard and mouse service of the PC.
[0139] S610. The super keyboard and mouse service of the PC determines whether the second flag is true.
[0140] S611. If it is determined that the second flag is true, the super keyboard and mouse service of the PC sends a notification message of releasing to the valid area to the screen coordination service of the PC.
[0141] The PC's Super Keyboard and Mouse Service determines whether the scene is a collaborative dragging scenario by determining whether the second flag is true. If the second flag is true, the PC's Super Keyboard and Mouse Service determines that the scene is a collaborative dragging scenario and can send a notification message to the PC's Screen Collaboration Service to synchronize the release to the valid area.
[0142] S612. If it is determined that the second flag is true, the super keyboard and mouse service of the PC changes the first flag to false.
[0143] After the PC's super keyboard and mouse service receives the notification message sent by the tablet's super keyboard and mouse service to release to the valid area and determines that the current scene is a keyboard and mouse collaborative drag scene, it changes the first flag from true to false. The modified first flag can be recorded as mirrorDragFileFlag_=false to indicate that no file is currently being dragged out of the mobile phone collaborative window.
[0144] This embodiment does not limit the execution order of S611 and S612, which may be executed simultaneously or sequentially.
[0145] After S611, you can execute:
[0146] S613. The screen collaboration of the PC sends a file transfer request to the screen collaboration of the mobile phone.
[0147] S614. The screen collaboration service of the mobile phone sends a file transfer response to the screen collaboration service of the PC. The file transfer response includes the dragged picture in the mobile phone camera application, for example, picture 1 in FIG5 .
[0148] S615. The screen collaboration service of the PC stores the image to the target path.
[0149] The target path is the default path for storing files on the PC's screen collaboration service.
[0150] S616. The screen collaboration service of the PC determines whether the third flag is true.
[0151] S617. If it is determined that the third flag is true, the screen collaboration service of the PC sends a picture transmission completion message to the super keyboard and mouse service of the PC.
[0152] The PC's screen collaboration service determines whether the current scenario is a keyboard and mouse collaborative drag scene by determining whether the third flag is true. If the third flag is true, the PC's screen collaboration service determines that the current scenario is a keyboard and mouse collaborative drag scene and can send an image transfer completion message to the PC's super keyboard and mouse service.
[0153] S618. The PC's super keyboard and mouse service determines whether the second flag is true.
[0154] S619. If it is determined that the second flag is true, the super keyboard and mouse service of the PC obtains the image from the target path.
[0155] The PC's super keyboard and mouse service determines whether the second flag is true to determine whether it is a keyboard and mouse coordinated drag scene. If the second flag is true, the PC's super keyboard and mouse service determines that the current scene is a keyboard and mouse coordinated drag scene and can obtain the image from the target path.
[0156] S620. The PC's super keyboard and mouse service transmits images to the tablet's super keyboard and mouse service.
[0157] S621a. After the image is transferred to the tablet computer, the PC's super keyboard and mouse service sends an image transfer completion message to the PC's screen collaboration service.
[0158] S621b. After the image is transferred to the tablet computer, the super keyboard and mouse service of the PC modifies the second flag to false.
[0159] The modified second flag may be recorded as transFileFromMirrorFlag_=false, to indicate that no file is currently dragged out of the mobile phone collaborative window and dragged across devices, ie, indicating that the collaborative keyboard and mouse dragging process is terminated.
[0160] This embodiment does not limit the execution order of S621a and S621b, and they can be executed simultaneously or sequentially.
[0161] After S621a, you can execute:
[0162] S622. The screen collaboration service of the PC modifies the third flag to false. The modified third flag may be recorded as superIODragEnter_=false, indicating that no file is currently being dragged out of the mobile phone collaboration window and dragged across devices.
[0163] After S620, you can execute:
[0164] S623. The super keyboard and mouse service of the tablet computer transmits the image to the display driver of the tablet computer to display the dragged image on the tablet computer screen.
[0165] The transferred picture can be displayed anywhere within the active area of the tablet screen.
[0166] For example, as shown in FIG5 , when the cross-device dragged picture 1 is released into the valid area of the tablet computer, if the valid area is the picture list area, the picture 1 may be displayed at the first position in the picture list.
[0167] In some embodiments, a picture may also be displayed at the location where the picture was released.
[0168] The file sharing method illustrated in this embodiment, through information interaction between the mobile phone's screen collaboration service, the PC's screen collaboration service, the PC's super keyboard and mouse service, and the tablet's super keyboard and mouse service, can transfer a file selected and dragged across devices in the mobile phone collaboration window to the tablet via the PC, and display the file on the tablet screen. This solution can quickly and efficiently implement cross-device file sharing in the screen collaboration scenario, improving user convenience.
[0169] FIG7 is a second schematic diagram of a file sharing method according to an embodiment of the present application. As shown in FIG7 , a collaborative window 101 of a mobile phone 200 is displayed on the screen of PC 100. Window 101 and the screen of mobile phone 200 simultaneously display the interface of the photo album application of mobile phone 200, which displays multiple images, such as Image 1 and Image 2. A user can use a wireless mouse to navigate to the screen of tablet computer 300, which displays interface 303 of the photo album application of tablet computer 300. Interface 303 displays multiple images, including, for example, Image 5.
[0170] The user can use a wireless mouse to select picture 5 in interface 303, drag picture 5 to the right edge of the tablet computer 300 screen, then enter the left edge of the PC 100 screen, and drag picture 5 until it reaches window 101 on the PC 100 screen and then release it. Tablet computer 300 then transfers picture 5 from the tablet computer 300 photo album application to mobile phone 200 via PC 100, and displays picture 5 in collaborative window 101 of mobile phone 200 and on the screen of mobile phone 200. The display position of picture 5 is not limited to the position of the first picture in the album. In some embodiments, picture 5 can also be displayed at the released position.
[0171] Based on the scenario shown in FIG7 , the interaction process between devices is described in detail below in conjunction with FIG8 .
[0172] Figure 8 is a second flow chart of the file sharing method provided in an embodiment of the present application. The file sharing method shown in Figure 8 involves the screen collaboration service of the mobile phone, the screen collaboration service and super keyboard and mouse service of the PC, and the super keyboard and mouse service of the tablet. In Figure 8, the mobile phone and PC have established screen collaboration, and the PC and tablet have established super keyboard and mouse.
[0173] As shown in FIG8 , the file sharing method includes:
[0174] S801. When it is detected that a picture in the tablet computer is selected and dragged to the edge of the tablet computer screen, the super keyboard and mouse service of the tablet computer sends a super keyboard and mouse drag-in event to the super keyboard and mouse service of the PC.
[0175] In this embodiment, the Super Mouse and Keyboard Drag-In event refers to a cross-device drag event triggered at the edge of the tablet screen. For example, as shown in Figure 7, when the user selects and drags Image 5 on the tablet to the right edge of the tablet screen, the tablet's Super Mouse and Keyboard service sends a Super Mouse and Keyboard Drag-In event to the PC's Super Mouse and Keyboard service.
[0176] S802. The super keyboard and mouse service of the PC sends a super keyboard and mouse drag-in event to the screen collaboration service of the PC.
[0177] Since the screen collaboration service of the PC in the screen collaboration scenario shown in Figure 7 has been turned on, the super keyboard and mouse service of the PC can send the super keyboard and mouse drag-in event to the screen collaboration service of the PC after receiving the super keyboard and mouse drag-in event sent by the super keyboard and mouse service of the tablet computer, so as to inform the screen collaboration service of the PC that the super keyboard and mouse is dragging a file.
[0178] S803. The screen collaboration service of the PC changes the fourth flag to true.
[0179] The initial value of the fourth flag may be false. After receiving the drag-in event of the super keyboard and mouse, the PC screen collaboration service may modify the fourth flag from false to true. The modified fourth flag may be recorded as superIODragFileFlag_ = true to indicate that the PC super keyboard and mouse is dragging a file across devices.
[0180] S804. When detecting that the dragged image enters the collaboration window, the screen collaboration service of the PC determines whether the fourth flag is true.
[0181] S805. If it is determined that the fourth flag is true, the screen collaboration service of the PC changes the fifth flag to true.
[0182] Exemplarily, as shown in FIG7 , when the picture 5 is dragged into the window 101 of the PC 100 , the screen coordination service of the PC determines whether the fourth flag is true.
[0183] The initial value of the fifth flag can be false. When detecting that the dragged image enters the collaboration window (the drag-in event of the screen collaboration), the PC's screen collaboration service can reconfirm whether the fourth flag is true. Its purpose is to check whether the drag-in event of the keyboard and mouse service is still in progress. If the drag-in event of the keyboard and mouse service is still in progress (the fourth flag is true), it indicates that the drag-in event of the screen collaboration is triggered based on the drag-in event of the keyboard and mouse service. At this time, the PC's screen collaboration service will modify the fifth flag from false to true. This can avoid the problem of operation interruption after the drag-in event of the keyboard and mouse service, which triggers the drag-in event of the screen collaboration and incorrectly modifies the fifth flag.
[0184] The modified fifth flag can be recorded as superIODragFileToMirror_=true, indicating that a file has been dragged from the tablet to the mobile collaboration window on the PC. The fifth flag can be regarded as the overall flag for the concurrent screen collaboration and super keyboard and mouse dragging recorded by the PC screen collaboration.
[0185] S806. The screen collaboration service of the PC determines whether the fifth flag is true.
[0186] S807. If it is determined that the fifth flag is true, the screen collaboration service of the PC sends a notification message to the super keyboard and mouse service of the PC to drag the image into the collaboration window.
[0187] Before the PC's screen collaboration service sends a notification message to the PC's super keyboard and mouse service about dragging an image into the collaboration window, it can confirm again whether the fifth flag is true. The purpose is to check whether the current scenario is collaborative keyboard and mouse dragging.
[0188] S808. The PC's super keyboard and mouse service modifies the sixth flag to true.
[0189] The initial value of the sixth flag bit may be false.
[0190] The modified sixth flag bit may be recorded as superIODragInMirrorStatus_=true, to indicate that a file is dragged from the tablet computer to the mobile phone collaboration window of the PC across devices.
[0191] S809a. When it is detected that the image is released in the collaborative window, the super keyboard and mouse service of the PC sends a notification message of releasing the image to the screen collaborative service of the PC.
[0192] S809b. When it is detected that the image is released in the collaborative window, the super keyboard and mouse service of the PC sends a notification message of releasing the image to the super keyboard and mouse service of the tablet computer.
[0193] For example, as shown in FIG7 , when the user releases the picture 5 dragged across devices in window 101 , the super keyboard and mouse service of the PC sends a notification message of releasing the picture to the screen collaboration service of the PC, and sends a notification message of releasing the picture to the super keyboard and mouse service of the tablet computer.
[0194] This embodiment does not limit the execution order of S809a and S809b, which may be executed simultaneously or sequentially.
[0195] After S809a, you can execute:
[0196] S810. The screen collaboration service of the PC changes the fourth flag bit to false.
[0197] After the PC's screen collaboration service receives the notification message of releasing the image sent by the PC's super keyboard and mouse service, it changes the fourth flag from true to fasle. The modified fourth flag can be recorded as superIODragFileFlag_=fasle to indicate that the PC super keyboard and mouse is not currently dragging files across devices.
[0198] After S809a, you can execute:
[0199] S811. The tablet computer's super keyboard and mouse service transmits an image to the PC's super keyboard and mouse service.
[0200] The super keyboard and mouse service of S812.PC stores the image to the target path.
[0201] S813. The PC's super keyboard and mouse service determines whether the sixth flag is true.
[0202] S814. If it is determined that the sixth flag is true, the super keyboard and mouse service of the PC sends a picture transmission completion message to the screen collaboration service of the PC.
[0203] S815. The screen collaboration service of the PC obtains the image from the target path.
[0204] After the PC's super keyboard and mouse service stores the image to the target path, it can determine whether it is a keyboard and mouse collaborative dragging scenario by determining whether the sixth flag is true. If the sixth flag is true, the PC's super keyboard and mouse service determines that the current scenario is a keyboard and mouse collaborative dragging scenario, and sends a picture transfer completion message to the PC's screen collaborative service so that the PC's screen collaborative service can obtain the image at the target path.
[0205] S816. The screen collaboration service of the PC transmits the image to the screen collaboration service of the mobile phone.
[0206] S817. The screen collaboration service of the mobile phone transmits the image to the display driver of the mobile phone to display the dragged image on the mobile phone screen.
[0207] Exemplarily, as shown in FIG7 , after the window 101 releases the picture 5 , the picture 5 is displayed on the screen of the mobile phone 200 .
[0208] After S816, you can execute:
[0209] S818. After the image is transferred to the mobile phone, the PC's screen collaboration service sends an image transfer completion message to the PC's super keyboard and mouse service.
[0210] S819. The PC's super keyboard and mouse service changes the sixth flag to false.
[0211] The modified sixth flag bit may be recorded as superIODragInMirrorStatus_=false, to indicate that no file is currently being dragged from the tablet across devices into the mobile phone collaboration window of the PC.
[0212] After S816, you can execute:
[0213] S820. After the image is transferred to the mobile phone, the screen collaboration service of the PC modifies the fifth flag to false.
[0214] The modified fifth flag bit may be recorded as superIODragFileToMirror_=fasle, to indicate that no file is currently being dragged from the tablet computer to the mobile phone collaboration window of the PC across devices.
[0215] S821. The screen collaboration service of the PC transmits the image to the display driver of the PC to display the dragged image in the collaboration window.
[0216] Exemplarily, as shown in FIG7 , after the window 101 releases the picture 5 , the picture 5 is displayed in the window 101 .
[0217] In some embodiments, after S805, when it is detected that the file is not released after the image is dragged into the collaborative window on the PC screen, and the image is dragged back to the PC screen desktop, the super keyboard and mouse service of the PC will trigger the drag and release (DragLeave) event of the super keyboard and mouse, and change the fifth flag from true to false.
[0218] The file sharing method illustrated in this embodiment uses information interaction between the mobile phone's screen collaboration service, the PC's screen collaboration service, the PC's super keyboard and mouse service, and the tablet's super keyboard and mouse service to transfer a file selected and dragged across devices from the tablet computer to the mobile phone via the PC, and then display the file in the mobile collaboration window on both the mobile phone screen and the PC screen. This solution enables fast and efficient cross-device file sharing in a screen collaboration scenario, improving user convenience.
[0219] In some embodiments, after the PC's super keyboard and mouse service is activated, a virtual window is created in the lower right corner of the PC's main screen, such as window 103 in Figure 5 . The virtual window is used to detect cross-device drag events on the PC's main screen. For example, referring to Figure 5 , when the PC's extended screen is located on the tablet's main screen and the mobile phone collaboration window is located on the PC's main screen, if an image is dragged from the PC's mobile phone collaboration window to the left edge of the PC's main screen, window 103 can detect the cross-device drag event on the PC's main screen, thereby triggering S606a and S606b in Figure 6 .
[0220] However, when the PC extended screen is located on the tablet main screen and the mobile phone collaborative window is located on the PC extended screen, referring to Figure 2, since the virtual window is located in the lower right corner of the PC main screen, when dragging the picture from the mobile phone collaborative window on the PC extended screen to the edge of the PC extended screen, since the virtual window is located in the lower right corner of the PC main screen, the virtual window cannot detect the cross-device drag event of the super keyboard and mouse on the PC extended screen, resulting in the inability to transfer files across devices in this scenario.
[0221] In response to the above problems, an embodiment of the present application proposes a file sharing method, which can detect the position of the mobile phone collaborative window and create a virtual window according to the position of the mobile phone collaborative window. If the mobile phone collaborative window is located on the PC main screen, the PC's super keyboard and mouse service creates a virtual window in the lower right corner of the PC main screen. Alternatively, if the mobile phone collaborative window is located on the PC extended screen, the PC's super keyboard and mouse service creates a virtual window in the lower right corner of the PC extended screen. In other words, the virtual window is located in the lower right corner of the screen where the mobile phone collaborative window is located, so that no matter whether the mobile phone collaborative window is on the PC main screen or the PC extended screen, when dragging files from the mobile phone collaborative window to the PC main screen or the edge of the PC extended screen, the virtual window can trigger the cross-device drag event of the PC super keyboard and mouse, thereby realizing cross-device file transfer.
[0222] The file sharing method provided by this application is described in detail below with reference to Figures 9 and 10.
[0223] FIG9 is a schematic diagram of a third scenario of the file sharing method provided by an embodiment of the present application. As shown in FIG9 , the extended screen 304 of the PC 100 is displayed on the main screen of the tablet computer 300, and the collaborative window 305 of the mobile phone 200 is displayed on the extended screen 304. The window 305 and the screen of the mobile phone 200 synchronously display the interface of the photo album application of the mobile phone 200, which displays multiple pictures, such as picture 1 and picture 2. The user can use a wireless mouse to navigate to the screen of the tablet computer 300, select picture 1 in window 305, drag picture 1 to the screen space 306 on the main screen of the tablet computer 300 excluding the extended screen 304, and then release it. The mobile phone 200 then transfers picture 1 in the photo album application of the mobile phone 200 to the tablet computer 300 via the PC 100, and displays picture 1 on the screen space 306 of the tablet computer 300.
[0224] While dragging an image on extended screen 304, at a certain moment, as shown in 307 in FIG. 9 , a cursor appears on extended screen 304, and a thumbnail of the image appears below the cursor. While dragging an image on screen space 306, at a certain moment, as shown in 308 in FIG. 9 , a cursor appears on screen space 306, and a thumbnail of the image appears below the cursor. A plus sign may appear in the upper left corner of the thumbnail of the image to indicate that an image has been imported into the tablet computer. FIG. 9 is merely an example, and the embodiments of this application do not limit the manner in which images may be dragged on different screens.
[0225] Based on the scenario shown in FIG9 , the interaction process between devices is described in detail below in conjunction with FIG10 .
[0226] Figure 10 is a flowchart diagram of the third embodiment of the file sharing method provided by the present application. The file sharing method shown in Figure 10 involves the screen collaboration service of the mobile phone, the screen collaboration service and super keyboard and mouse service of the PC, and the super keyboard and mouse service of the tablet computer.
[0227] In Figure 10, the mobile phone and PC have established screen collaboration, the PC and tablet have established super keyboard and mouse, and the PC and tablet have established sidecar. As shown in Figure 10, the method includes:
[0228] S1001. When it is detected that a picture in the collaboration window is selected and dragged, the screen collaboration service of the PC sends a screen collaboration drag-in event to the super keyboard and mouse service of the PC.
[0229] S1002. The PC's super keyboard and mouse service detects the location of the collaborative window.
[0230] S1003. When the collaborative window is located on the PC extended screen, the PC's super keyboard and mouse create a virtual window in the lower right corner of the PC extended screen.
[0231] The virtual window can be regarded as a sub-process of the PC's super keyboard and mouse service, such as window 309 in Figure 9, which is used to detect the drag-in event of the super keyboard and mouse on the PC's extended screen. The drag-in event of the super keyboard and mouse on the PC's extended screen is triggered after the drag-in event of the mobile phone collaborative window on the PC's extended screen.
[0232] S1004. The PC's super keyboard and mouse service modifies the first flag to true.
[0233] S1005. When it is detected that the image is dragged to the edge of the PC extended screen, the super keyboard and mouse service of the PC determines whether the first flag is true.
[0234] After S1005, S1006 to S1009 are executed. S1006 to S1009 of this embodiment are similar to S604 to S607 of the above embodiment. For details, please refer to the above embodiment and will not be elaborated here.
[0235] After S1008b, you can execute:
[0236] S1010. When a drag-and-release operation is detected, the super keyboard and mouse service of the tablet computer determines whether the operation is released in a valid screen area outside the extended screen.
[0237] S1011. If it is determined that the effective screen area outside the extended screen is released, the super keyboard and mouse service of the tablet computer sends a notification message of releasing the effective screen area outside the extended screen to the super keyboard and mouse service of the PC.
[0238] S1012. The PC's super keyboard and mouse service determines whether the second flag is true.
[0239] S1013. If it is determined that the second flag is true, the super keyboard and mouse service of the PC sends a notification message of releasing the effective screen area outside the extended screen to the screen coordination service of the PC.
[0240] S1014. If it is determined that the second flag is true, the super keyboard and mouse service of the PC modifies the first flag to false.
[0241] After S1013, you can execute:
[0242] S1015 to S1025. S1015 to S1025 of this embodiment are similar to S613 to S6023 of the aforementioned embodiment, and the details can be referred to the aforementioned embodiment, which will not be elaborated here.
[0243] The file sharing method illustrated in this embodiment creates a virtual window in the lower right corner of the PC's extended screen, where the mobile phone collaboration window resides. This allows the PC's super keyboard and mouse to detect cross-device drag events on the PC's extended screen, thereby transferring files from the mobile phone collaboration window on the PC's extended screen to the tablet via the PC and displaying them on the tablet's main screen. This solution enables fast and efficient cross-device file sharing in screen collaboration scenarios, improving user convenience.
[0244] Based on the aforementioned embodiments, an embodiment of the present application proposes a file sharing method, which is applied to a system including a first electronic device, a second electronic device and a third electronic device, wherein the first electronic device is connected to the second electronic device and the third electronic device, respectively. The method includes: the first electronic device displays a first window, the first window displays the screen content of the second electronic device, and the screen content of the second electronic device includes a first file; when the first file is dragged from the first window to the effective area of the screen of the third electronic device, in response to the drag-and-release operation of the first file, the third electronic device displays the first file.
[0245] The first electronic device is connected to the second electronic device by wire or wirelessly, and the first electronic device is connected to the third electronic device by wire or wirelessly. The first window displayed by the first electronic device is a collaborative window of the second electronic device, and the content displayed in the first window can be consistent with the content displayed on the display screen of the second electronic device. When the content displayed in the first window is consistent with the content displayed on the display screen of the second electronic device, the first window can be regarded as a mirror window of the second electronic device on the first electronic device. In one example, the first window displays a first file, and the display screen of the second electronic device displays the first file. The first file is a file stored locally on the second electronic device. For example, the first file can be a picture, video, text, audio, application, etc.
[0246] For example, referring to FIG5 , the first electronic device is a personal computer (PC) 100, the second electronic device is a mobile phone 200, and the third electronic device is a tablet computer 300. PC 100 is connected to mobile phone 200 by wire or wireless connection, and PC 100 is connected to tablet computer 300 by wire or wireless connection. The first window is window 101, and the first file displayed in the first window is picture 1. The active screen area of the third electronic device is area 301 on the display screen of tablet computer 300. The user can use a wireless mouse to drag picture 1 across the edge of the PC 100 screen to area 301 of tablet computer 300, then release picture 1, and picture 1 will be displayed in area 301.
[0247] In the above method, the content projected from the second electronic device to the first electronic device is displayed in the first window of the first electronic device. The user drags the first file in the first window across devices to the third electronic device, thereby dragging the first file stored locally on the second electronic device to the third electronic device for display through the first electronic device. The operation process is simple and can quickly and efficiently realize cross-device file sharing in the screen collaboration scenario.
[0248] In an optional embodiment, before the third electronic device displays the first file, the method further includes: the second electronic device transmitting the first file to the first electronic device; and the first electronic device transmitting the first file to the third electronic device.
[0249] In the above method, the second electronic device transmits the first file dragged by the user to the third electronic device through the first electronic device, thereby realizing cross-device file transfer in the screen collaboration scenario.
[0250] In an optional embodiment, before the second electronic device transfers the first file to the first electronic device, the method further includes: in response to a drag-and-release operation on the first file, the third electronic device determines whether the release position of the first file is within the effective area of the screen of the third electronic device; if so, the third electronic device sends a first notification message to the first electronic device, and the first notification message is used to indicate that the first file is released to the effective area of the screen of the third electronic device; the first electronic device sends a file transfer request to the second electronic device, and the file transfer request is used to request the transfer of the first file.
[0251] Exemplarily, continuing to refer to Figure 5, the drag-and-release operation on the first file is a drag-and-release operation on the image 1 on the display screen of the tablet computer 300. The effective screen area of the third electronic device is area 301 on the display screen of the tablet computer 300. It should be understood that if the image 1 is dragged outside area 301, since it is not the effective screen area of the tablet computer 300, the cross-device drag fails, and the tablet computer 300 will not receive and display the image 1. The first notification message sent by the third electronic device to the first electronic device may correspond to the notification message of S609 in Figure 6. The file transfer request sent by the first electronic device to the second electronic device may correspond to the file transfer request of S613 in Figure 6.
[0252] In the above method, after the first electronic device receives a notification from the third electronic device that the file has been released to the effective area of the screen, the first electronic device obtains the dragged first file from the second electronic device, and then transfers the first file to the third electronic device for display, thereby realizing cross-device file sharing in the screen collaboration scenario. It should be understood that if the first electronic device receives a notification from the third electronic device that the file has not been released to the effective area of the screen, the first electronic device will not obtain the first file from the second electronic device, and the third electronic device will not receive and display the first file.
[0253] In an optional embodiment, the method further includes: when the first file is dragged from the first window to the screen edge of the first electronic device, the first electronic device sends a first cross-device drag event to the third electronic device, and the first cross-device drag event is used to indicate that a file is dragged from the first electronic device to the third electronic device.
[0254] For example, continuing to refer to Figure 5, when picture 1 is dragged from window 101 of PC 100 to the left screen edge of PC 100, PC 100 sends a first cross-device drag event to tablet computer 300 to indicate that a picture is dragged from PC 100 to tablet computer 300. The first cross-device drag event may correspond to the super keyboard and mouse drag-in event of S606b in Figure 6.
[0255] In the above method, when the first file is dragged to the screen edge of the main screen of the first electronic device, the first electronic device notifies the third electronic device that a file is dragged across devices by sending a first cross-device drag event, so that the third electronic device starts monitoring the dragged first file.
[0256] In an optional embodiment, the method further includes: the third electronic device displays a second file, where the second file is a file locally stored on the third electronic device; when the second file is dragged from the screen of the third electronic device to the first window, in response to a drag-and-release operation on the second file, the first window and the second electronic device display the second file.
[0257] The second file can be an image, video, text, audio, application, etc. For example, referring to FIG7 , the second file is image 5, and image 5 is displayed on the display screen of tablet computer 300. The user can use a wireless mouse to drag image 5 across the edge of the tablet computer 300 screen to window 101 of PC 100 and then release image 5. Image 5 is displayed in window 101 and on the display screen of mobile phone 200.
[0258] In the above method, the content projected from the second electronic device to the first electronic device is displayed in the first window of the first electronic device. The user drags the third file in the third electronic device to the first window across devices, and the second file stored locally on the third electronic device can be dragged to the second electronic device through the first electronic device for display. The first window can synchronously display the second file. The operation process is simple, and cross-device file sharing in the screen collaboration scenario can be realized quickly and efficiently.
[0259] In an optional embodiment, before the first window and the second electronic device display the second file, the method further includes: the third electronic device transmitting the second file to the first electronic device; and the first electronic device transmitting the second file to the second electronic device.
[0260] In the above method, the third electronic device transmits the second file dragged by the user to the second electronic device through the first electronic device, thereby realizing cross-device file transfer in the screen collaboration scenario.
[0261] In an optional embodiment, the third electronic device transmits the second file to the first electronic device, including: in response to a drag-and-release operation on the second file, the first electronic device sends a second notification message to the third electronic device, where the second notification message is used to indicate that the second file is released to the first window; and the third electronic device transmits the second file to the first electronic device.
[0262] For example, with continued reference to FIG7 , the drag-and-drop operation on the second file is a drag-and-drop operation on picture 5 in window 101 of PC 100. The second notification message sent by the first electronic device to the third electronic device may correspond to the notification message in S809b of FIG8 . The transmission of the second file by the third electronic device to the first electronic device may correspond to S811 of FIG8 .
[0263] In the above method, after the third electronic device receives the notification sent by the first electronic device that the file is released to the first window, the third electronic device transmits the second file to the first electronic device, so that the first electronic device transfers the second file to the second electronic device for display, thereby realizing cross-device file sharing in the screen collaboration scenario.
[0264] In an optional embodiment, the method further includes: when the second file is dragged to the screen edge of the third electronic device, the third electronic device sends a second cross-device drag event to the first electronic device, and the second cross-device drag event is used to indicate that a file is dragged from the third electronic device to the first electronic device.
[0265] For example, continuing to refer to Figure 7, when the picture 5 is dragged from the tablet computer 300 to its right screen edge, the tablet computer 300 sends a second cross-device drag event to the PC 100 to indicate that a picture is dragged from the tablet computer 300 to the PC 100. The second cross-device drag event may correspond to the super keyboard and mouse drag-in event of S801 in Figure 8.
[0266] In the above method, when the second file is dragged to the edge of the screen of the third electronic device, the third electronic device notifies the first electronic device that a file is dragged across devices by sending a second cross-device drag event, so that the first electronic device starts monitoring the dragged second file.
[0267] In an optional embodiment, the method further includes: after the super keyboard and mouse service of the first electronic device is started, the super keyboard and mouse service of the first electronic device creates a first virtual window; the first virtual window is used to detect a cross-device drag event on the main screen of the first electronic device.
[0268] The first virtual window is located in the lower right corner of the main screen of the first electronic device and can trigger a cross-device drag event on the main screen of the first electronic device. For example, referring to FIG5 , the first electronic device is PC 100, and the first virtual window is window 103 in the lower right corner of the main screen of PC 100. The first virtual window can be used to detect the aforementioned first cross-device drag event and the aforementioned second cross-device drag event.
[0269] In a second aspect, an embodiment of the present application provides a file sharing method, which is applied to a system including a first electronic device, a second electronic device and a third electronic device, wherein the first electronic device is connected to the second electronic device and the third electronic device, respectively. The method includes: the third electronic device displays an extended screen of the first electronic device, the extended screen occupies part of the screen space of the third electronic device, the extended screen displays a second window, the second window displays the screen content of the second electronic device, and the screen content of the second electronic device includes a third file; when the third file is dragged from the second window to the first screen space of the third electronic device excluding the extended screen, in response to the drag-and-release operation of the third file, the first screen space of the third electronic device displays the third file.
[0270] The first electronic device is connected to the second electronic device by wire or wirelessly, and the first electronic device is connected to the third electronic device by wire or wirelessly. The second window is a collaborative window of the second electronic device, and the content displayed in the second window can be consistent with the content displayed on the display screen of the second electronic device. When the content displayed in the second window is consistent with the content displayed on the display screen of the second electronic device, the second window can be regarded as a mirror window of the second electronic device on the first electronic device. In one example, the second window displays a third file, and the display screen of the second electronic device displays the third file. The third file is a file stored locally on the second electronic device. For example, the third file can be a picture, video, text, audio, application, etc.
[0271] For example, referring to FIG9 , the first electronic device is a personal computer (PC) 100, the second electronic device is a mobile phone 200, and the third electronic device is a tablet computer 300. PC 100 is connected to mobile phone 200 by wire or wireless connection, and PC 100 is connected to tablet computer 300 by wire or wireless connection. The extended screen of the first electronic device is an extended screen 304 of tablet computer 300, which is projected from PC 100. Extended screen 304 occupies part of the screen space of tablet computer 300. The second window is window 305 on extended screen 304, and the third file displayed in the second window is picture 1. The first screen space of the third electronic device is screen space 306 of tablet computer 300, excluding extended screen 304. The user can use a wireless mouse to drag picture 1 from window 305 of tablet computer 300 to screen space 306 and then release it. Picture 1 is then displayed on screen space 306.
[0272] In the above method, the first electronic device projects its extended screen onto the display screen of the third electronic device, and the second window of the second electronic device is displayed on the extended screen of the first electronic device. The user drags the third file in the second window to the first screen space of the third electronic device, thereby dragging the third file locally stored on the second electronic device to the third electronic device for display. The operation process is simple and can quickly and efficiently realize cross-device file sharing in the screen collaboration scenario.
[0273] In an optional embodiment, before the third file is displayed in the first screen space of the third electronic device, the method further includes: the second electronic device transmitting the third file to the first electronic device; and the first electronic device transmitting the third file to the third electronic device.
[0274] In the above method, the second electronic device transmits the third file dragged by the user to the third electronic device through the first electronic device, thereby realizing cross-device file transfer in the screen collaboration scenario.
[0275] In an optional embodiment, when a third file is dragged from the second window to the screen edge of the extended screen of the first electronic device, the first electronic device sends a third cross-device drag event to the third electronic device, and the third cross-device drag event is used to indicate that a file is dragged from the extended screen of the first electronic device to the third electronic device.
[0276] For example, continuing to refer to Figure 9, when picture 1 is dragged from window 305 to the screen edge of the extended screen 304 of PC 100, PC 100 sends a third cross-device drag event to tablet computer 300 to indicate that a picture is dragged from the extended screen 304 of PC 100 to tablet computer 300. The third cross-device drag event may correspond to the super keyboard and mouse drag-in event of S1008b in Figure 10.
[0277] In the above method, when the third file is dragged to the screen edge of the extended screen of the first electronic device, the first electronic device notifies the third electronic device that a file is dragged across devices by sending a third cross-device drag event, so that the third electronic device starts monitoring the dragged third file.
[0278] In an optional embodiment, the method further includes: when the third file in the second window is selected and dragged, the super keyboard and mouse service of the first electronic device creates a second virtual window; the second virtual window is used to detect a cross-device drag event on the extended screen of the first electronic device.
[0279] The second virtual window is located in the lower right corner of the extended screen of the first electronic device and can trigger a cross-device drag event on the extended screen of the first electronic device. For example, referring to FIG9 , the first electronic device is PC 100, and the second virtual window is window 309 in the lower right corner of extended screen 304 of PC 100. The second virtual window can be used to detect the aforementioned third cross-device drag event.
[0280] In an optional embodiment, the first electronic device is installed with a first operating system, and the second electronic device and the third electronic device are installed with a second operating system, and the first operating system and the second operating system are different.
[0281] Exemplarily, the first operating system is a Windows operating system, and the second operating system is an Android operating system.
[0282] It should be noted that the embodiments of the present application do not particularly limit the specific structure of the execution subject of a file sharing method. As long as the code storing the file sharing method of the embodiments of the present application can be executed to perform processing according to the file sharing method provided by the embodiments of the present application. For example, the execution subject of the file sharing method provided by the embodiments of the present application can be a functional module in an electronic device that can call and execute a program, or a processing device used in an electronic device, for example, the processing device is a chip.
[0283] In the above embodiments, the modules / services may be software programs, hardware circuits, or a combination of the two to implement the above functions. The hardware circuits may include application specific integrated circuits (ASICs), electronic circuits, processors (e.g., shared processors, dedicated processors, or group processors) and memories for executing one or more software or firmware programs, combined logic circuits, and / or other suitable components that support the described functions.
[0284] Therefore, the modules / services described in each example in the embodiments of this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0285] An embodiment of the present application also provides an electronic device, which may correspond to the first electronic device of the aforementioned embodiment. The first electronic device includes: a memory and a processor. The processor is used to call a computer program in the memory to execute the technical solution of the PC in any of the aforementioned method embodiments. Its implementation principle and technical effects are similar to those of the aforementioned related embodiments and will not be repeated here.
[0286] An embodiment of the present application also provides an electronic device, which may correspond to the second electronic device of the aforementioned embodiment. The second electronic device includes: a memory and a processor. The processor is used to call a computer program in the memory to execute the technical solution of the mobile phone in any of the aforementioned method embodiments. Its implementation principle and technical effects are similar to those of the aforementioned related embodiments and will not be repeated here.
[0287] An embodiment of the present application also provides an electronic device, which may correspond to the third electronic device in the aforementioned embodiment. The third electronic device includes: a memory and a processor. The processor is used to call a computer program in the memory to execute the technical solution of the tablet computer in any of the aforementioned method embodiments. Its implementation principle and technical effects are similar to those of the aforementioned related embodiments and will not be repeated here.
[0288] The memory may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including a compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via a communication line. The memory may also be integrated with the processor.
[0289] The processor may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program of the present application.
[0290] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program runs on a first electronic device, the first electronic device executes the technical solution of the PC in any of the aforementioned method embodiments. The implementation principle and technical effects are similar to those of the aforementioned related embodiments and are not repeated here.
[0291] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program runs on a second electronic device, the second electronic device executes the technical solution of the mobile phone in any of the aforementioned method embodiments. The implementation principle and technical effects are similar to those of the aforementioned related embodiments and will not be repeated here.
[0292] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program runs on a third electronic device, the third electronic device executes the technical solution of the tablet computer in any of the aforementioned method embodiments. The implementation principle and technical effects thereof are similar to those of the aforementioned related embodiments and are not further described here.
[0293] An embodiment of the present application provides a chip, which includes a processor. The processor is used to call a computer program in a memory to execute the technical solution of the PC in any of the aforementioned method embodiments. Its implementation principle and technical effects are similar to those of the above-mentioned related embodiments and will not be repeated here.
[0294] An embodiment of the present application provides a chip, which includes a processor. The processor is used to call a computer program in a memory to execute the technical solution of the mobile phone in any of the aforementioned method embodiments. Its implementation principle and technical effects are similar to those of the aforementioned related embodiments and will not be repeated here.
[0295] An embodiment of the present application provides a chip, which includes a processor. The processor is used to call a computer program in a memory to execute the technical solution of a tablet computer in any of the aforementioned method embodiments. Its implementation principle and technical effects are similar to those of the aforementioned related embodiments and will not be repeated here.
[0296] An embodiment of the present application provides a computer program product. When the computer program product is run on a first electronic device, the first electronic device executes the technical solution of the PC in any of the aforementioned method embodiments. Its implementation principle and technical effects are similar to those of the aforementioned related embodiments and are not repeated here.
[0297] An embodiment of the present application provides a computer program product. When the computer program product is run on a second electronic device, the second electronic device executes the technical solution of the mobile phone in any of the aforementioned method embodiments. Its implementation principle and technical effects are similar to those of the aforementioned related embodiments and are not repeated here.
[0298] An embodiment of the present application provides a computer program product. When the computer program product is run on a third electronic device, the third electronic device executes the technical solution of the tablet computer in any of the aforementioned method embodiments. Its implementation principle and technical effects are similar to those of the aforementioned related embodiments and are not repeated here.
[0299] An embodiment of the present application provides a cross-device dragging system. Referring to FIG1 or FIG2 , the system includes: a first electronic device 100, a second electronic device 200, and a third electronic device 300. The first electronic device 100 is connected to the second electronic device 200 and the third electronic device 300, respectively. The first electronic device 100 executes the technical solution of the PC in any of the aforementioned method embodiments, the second electronic device 200 executes the technical solution of the mobile phone in any of the aforementioned method embodiments, and the third electronic device 300 executes the solution of the tablet computer in any of the aforementioned method embodiments. The implementation principles and technical effects are similar to those of the aforementioned related embodiments and will not be repeated here.
[0300] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of this application in detail. It should be understood that the above are only specific implementation methods of this application and are not intended to limit the scope of protection of this application. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solutions of this application should be included in the scope of protection of this application.
Claims
1. A file sharing method, characterized in that: Applied to a system including a first electronic device, a second electronic device and a third electronic device, wherein the first electronic device is connected to the second electronic device and the third electronic device respectively, the method includes: The first electronic device displays a first window, the first window displays screen content of the second electronic device, and the screen content of the second electronic device includes a first file; When the first file is dragged from the first window to the effective area of the screen of the third electronic device, in response to a drag-and-release operation on the first file, the third electronic device displays the first file.
2. The method according to claim 1, characterized in that: Before the third electronic device displays the first file, the method further includes: The second electronic device transmits the first file to the first electronic device; The first electronic device transmits the first file to the third electronic device.
3. The method according to claim 2, characterized in that Before the second electronic device transmits the first file to the first electronic device, the method further includes: In response to a drag-and-release operation on the first file, the third electronic device determines whether a release position of the first file is within a valid area of a screen of the third electronic device; If yes, the third electronic device sends a first notification message to the first electronic device, where the first notification message is used to indicate that the first file is released to a valid screen area of the third electronic device; The first electronic device sends a file transfer request to the second electronic device, where the file transfer request is used to request the transfer of the first file.
4. The method according to claims 1 to 3, characterized in that The method further comprises: When the first file is dragged from the first window to the screen edge of the first electronic device, the first electronic device sends a first cross-device drag event to the third electronic device, where the first cross-device drag event is used to indicate that a file is dragged from the first electronic device to the third electronic device.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: The third electronic device displays a second file, where the second file is a file locally stored in the third electronic device; When the second file is dragged from the screen of the third electronic device to the first window, in response to a drag-and-release operation on the second file, the first window and the second electronic device display the second file.
6. The method according to claim 5, characterized in that Before the first window and the second electronic device display the second file, the method further includes: The third electronic device transmits the second file to the first electronic device; The first electronic device transmits the second file to the second electronic device.
7. The method according to claim 6, characterized in that The third electronic device transmitting the second file to the first electronic device includes: In response to the drag-and-release operation on the second file, the first electronic device sends a second notification message to the third electronic device, where the second notification message is used to indicate that the second file is released to the first window; The third electronic device transmits the second file to the first electronic device.
8. The method according to any one of claims 5 to 7, characterized in that: The method further comprises: When the second file is dragged to the screen edge of the third electronic device, the third electronic device sends a second cross-device drag event to the first electronic device, where the second cross-device drag event is used to indicate that a file is dragged from the third electronic device to the first electronic device.
9. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: After the super keyboard and mouse service of the first electronic device is started, the super keyboard and mouse service of the first electronic device creates a first virtual window; The first virtual window is used to detect a cross-device drag event on the main screen of the first electronic device.
10. A file sharing method, characterized in that: Applied to a system including a first electronic device, a second electronic device and a third electronic device, wherein the first electronic device is connected to the second electronic device and the third electronic device respectively, the method includes: The third electronic device displays an extended screen of the first electronic device, the extended screen occupies a portion of the screen space of the third electronic device, the extended screen displays a second window, the second window displays screen content of the second electronic device, and the screen content of the second electronic device includes a third file; When the third file is dragged from the second window to a first screen space of the third electronic device other than the extended screen, in response to a drag-and-release operation on the third file, the first screen space of the third electronic device displays the third file.
11. The method according to claim 10, characterized in that Before the first screen space of the third electronic device displays the third file, the method further includes: The second electronic device transmits the third file to the first electronic device; The first electronic device transmits the third file to the third electronic device.
12. The method according to claim 10 or 11, characterized in that: When the third file is dragged from the second window to the screen edge of the extended screen of the first electronic device, the first electronic device sends a third cross-device drag event to the third electronic device, and the third cross-device drag event is used to indicate that a file is dragged from the extended screen of the first electronic device to the third electronic device.
13. The method according to any one of claims 10 to 12, characterized in that: The method further comprises: When the third file in the second window is selected and dragged, the super keyboard and mouse service of the first electronic device creates a second virtual window; The second virtual window is used to detect a cross-device drag event on the extended screen of the first electronic device.
14. The method according to any one of claims 1 to 13, characterized in that: The first electronic device is installed with a first operating system, and the second electronic device and the third electronic device are installed with a second operating system, and the first operating system and the second operating system are different.
15. An electronic device, characterized in that: The electronic device comprises: a memory and a processor, wherein the processor is used to call a computer program in the memory to execute the method of the first electronic device as described in any one of claims 1 to 14, or to execute the method of the second electronic device as described in any one of claims 1 to 14, or to execute the method of the third electronic device as described in any one of claims 1 to 14.
16. A chip, characterized in that: The chip includes a processor, and the processor is used to call a computer program in a memory so that the chip executes the method of the first electronic device as described in any one of claims 1 to 14, or executes the method of the second electronic device as described in any one of claims 1 to 14, or executes the method of the third electronic device as described in any one of claims 1 to 14.
17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed on an electronic device, enables the electronic device to execute the method of the first electronic device as described in any one of claims 1 to 14, or the method of the second electronic device as described in any one of claims 1 to 14, or the method of the third electronic device as described in any one of claims 1 to 14.