WO2025123722A1 - 文件共享方法、设备及存储介质 - Google Patents

文件共享方法、设备及存储介质 Download PDF

Info

Publication number
WO2025123722A1
WO2025123722A1 PCT/CN2024/110746 CN2024110746W WO2025123722A1 WO 2025123722 A1 WO2025123722 A1 WO 2025123722A1 CN 2024110746 W CN2024110746 W CN 2024110746W WO 2025123722 A1 WO2025123722 A1 WO 2025123722A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
file
screen
window
dragged
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
PCT/CN2024/110746
Other languages
English (en)
French (fr)
Inventor
郑鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202480011215.5A priority Critical patent/CN120660084A/zh
Publication of WO2025123722A1 publication Critical patent/WO2025123722A1/zh
Anticipated expiration legal-status Critical
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/176Support for shared access to files; File sharing support
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • G06F15/173Interprocessor communication using an interconnection network, e.g. matrix, shuffle, pyramid, star, snowflake
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • G06F15/173Interprocessor communication using an interconnection network, e.g. matrix, shuffle, pyramid, star, snowflake
    • G06F15/17306Intercommunication techniques
    • G06F15/17318Parallel communications techniques, e.g. gather, scatter, reduce, roadcast, multicast, all to all
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0486Drag-and-drop
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1423Digital output to display device ; Cooperation and interconnection of the display device with other functional units controlling a plurality of local displays, e.g. CRT and flat panel display
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1454Digital output to display device ; Cooperation and interconnection of the display device with other functional units involving copying of the display data of a local workstation or window to a remote workstation or window so that an actual copy of the data is displayed simultaneously on two or more displays, e.g. teledisplay

Definitions

  • the present application relates to the field of terminal technology, and in particular to a file sharing method, device and storage medium.
  • Multi-screen collaboration scenarios are also called screen collaboration scenarios, which include screen projection scenarios, extended screen scenarios, and concurrent screen projection and extended screen scenarios. How to achieve cross-device file sharing in screen collaboration scenarios is an urgent problem to be solved.
  • 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.
  • the first window can be regarded as a mirror window of the second electronic device on the first electronic device.
  • the first window displays a first file
  • the display screen of the second electronic device displays the first file.
  • the first file is a locally stored file of the second electronic device, for example, the first file can be a picture, video, text, audio, application, etc.
  • the first electronic device is a personal computer PC 100
  • the second electronic device is a mobile phone 200
  • the third electronic device is a tablet computer 300.
  • PC 100 is connected to mobile phone 200 by wire or wireless
  • PC 100 is connected to tablet computer 300 by wire or wireless.
  • the first window is window 101
  • the first file displayed in the first window is picture 1.
  • the screen effective 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, and then release picture 1 to area 301 of tablet computer 300, and picture 1 is displayed in area 301.
  • 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 displaying the first file stored locally on the second electronic device by dragging it to the third electronic device through the first electronic device.
  • the operation process is simple, and cross-device file sharing in the screen collaboration scenario can be realized quickly and efficiently.
  • the drag-and-release operation on the first file is a drag-and-release operation 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 picture 1 is dragged outside the 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 picture 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 FIG. 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 FIG. 6.
  • the method also includes: 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.
  • the second file may be a picture, video, text, audio, application, etc.
  • the second file is picture 5
  • picture 5 is displayed on the display screen of tablet computer 300.
  • the user can use the wireless mouse to drag picture 5 across the edge of the tablet computer 300 screen to window 101 of PC 100 and then release picture 5, and picture 5 is displayed in window 101 and on the display screen of mobile phone 200.
  • 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 can drag 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 method 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.
  • the third electronic device 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.
  • the method also 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.
  • the third electronic device when the second file is dragged to the screen edge of 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.
  • 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.
  • the first electronic device is a personal computer PC 100
  • the second electronic device is a mobile phone 200
  • the third electronic device is a tablet computer 300.
  • PC 100 is connected to mobile phone 200 by wire or wireless
  • PC 100 is connected to tablet computer 300 by wire or wireless.
  • the extended screen of the first electronic device is an extended screen 304 of the tablet computer 300 projected by PC 100, and the extended screen 304 occupies part of the screen space of the display screen of the tablet computer 300.
  • the second window is a window 305 on the extended screen 304
  • the third file displayed in the second window is picture 1.
  • the first screen space of the third electronic device is the screen space 306 of the tablet computer 300 except the extended screen 304.
  • the user can use a wireless mouse to drag picture 1 from window 305 of the tablet computer 300 to screen space 306 and then release it, and picture 1 is displayed in screen space 306.
  • 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.
  • the first electronic device 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.
  • PC 100 when picture 1 is dragged from window 305 to the screen edge of 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 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 FIG10 .
  • the second virtual window is located at 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.
  • the first electronic device is PC 100
  • the second virtual window is window 309 at the lower right corner of the extended screen 304 of PC 100.
  • the second virtual window can be used to detect the aforementioned third cross-device drag event.
  • 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 a method of a first electronic device as described in any one of the first aspects, or to execute a method of a second electronic device as described in any one of the first aspects, or to execute a method of a third electronic device as described in any one of the first aspects.
  • 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 a method of a first electronic device as described in any one of the second aspects, or to execute a method of a second electronic device as described in any one of the second aspects, or to execute a method of a third electronic device as described in any one of the second aspects.
  • an embodiment of the present application provides a computer program product, including a computer program.
  • the 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.
  • FIG2 is a second schematic diagram of a screen collaboration scenario provided in an embodiment of the present application.
  • FIG3 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
  • FIG4 is a schematic diagram of the structure of another electronic device provided in an embodiment of the present application.
  • FIG5 is a schematic diagram of a scenario of a file sharing method provided in an embodiment of the present application.
  • FIG7 is a second schematic diagram of a scenario of a file sharing method provided in an embodiment of the present application.
  • “at least one” refers to one or more, and “plurality” refers to two or more.
  • “And/or” describes the association relationship of associated objects, indicating that three relationships may exist.
  • a and/or B can represent: A exists alone, A and B exist at the same time, and B exists 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 (kind/piece)” or similar expressions refers to any combination of these items, including any combination of single items (kind/piece) or plural items (kind/piece).
  • At least one of a, b or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c can be single or multiple.
  • electronic devices are devices with display screens.
  • electronic devices may be portable devices, such as mobile phones, tablet computers, wearable devices with display functions 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.), etc.
  • VR virtual reality
  • AR augmented reality
  • PCs personal computers
  • laptops laptops
  • netbooks personal digital assistants
  • smart home devices such as smart TVs, etc.
  • an application also known as an application program, is a software program that can implement one or more specific functions.
  • 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 application mentioned in the embodiments of the present application can be an application installed when the electronic device leaves the factory, or it can be an application downloaded from the network or obtained from other electronic devices by the user during the use of the electronic device.
  • the accompanying service is a screen collaboration function of an electronic device, which can project the extended screen of the device onto the screen of a nearby device.
  • the PC can project its extended screen onto, for example, a tablet computer.
  • the embodiment of 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.
  • FIG. 1 is a schematic diagram of a screen collaboration scenario provided in an embodiment of the present application.
  • the scenario includes a PC 100, a mobile phone 200, and a tablet computer 300, wherein the PC 100 is connected to the mobile phone 200 and the tablet computer 300 in communication.
  • the communication connection between devices in FIG. 1 is a wireless fidelity (Wi-Fi) P2P connection.
  • the devices can also be connected by wire, such as by a universal serial bus (USB).
  • Wi-Fi wireless fidelity
  • USB universal serial bus
  • PC 100 and mobile phone 200 have established a screen collaborative connection.
  • Mobile phone 200 projects the content on its own display screen onto the display screen of PC 100 for display, such as window 101 in FIG. 1 .
  • Window 101 is a 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.
  • the content displayed on the window 101 may also be inconsistent with the content displayed on the screen of the mobile phone 200.
  • 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.
  • the file sharing method of scenario 2 corresponds to the embodiments shown in FIG. 9 and FIG. 10 described below.
  • the embodiments shown in FIG. 9 and FIG. 10 introduce the file sharing method based on operation 3 in detail.
  • FIG5 is a schematic diagram of a scenario of a file sharing method provided by an embodiment of the present application.
  • a collaborative window 101 of a mobile phone 200 is displayed on the screen of the PC 100, and the interface of the photo album application of the mobile phone 200 is synchronously displayed on the screen of the window 101 and 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 the 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, and the mobile phone 200 transmits 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 may occupy a part of the screen space of the tablet computer 300. In some embodiments, the effective area 301 may also occupy the entire screen of the tablet computer 300.
  • FIG. 5 is only an example, and the embodiment of the present application does not limit the style of dragging pictures on different types of devices.
  • FIG6 is a flowchart of a file sharing method provided in an embodiment of the present application.
  • the file sharing method shown in FIG6 involves a screen collaboration service of a mobile phone, a screen collaboration service and a super keyboard and mouse service of a PC, and a super keyboard and mouse service of a tablet computer.
  • a screen collaboration has been established between a mobile phone and a PC
  • a super keyboard and mouse has been established between a PC and a tablet computer.
  • the file sharing method includes:
  • the screen coordination service of the PC sends a screen coordination drag-in event to the super keyboard and mouse service of the PC.
  • the initial value of the first flag may be false.
  • the super keyboard and mouse service of the PC determines whether the first flag is true.
  • the initial value of the second flag can be false.
  • the PC's super keyboard and mouse service can reconfirm whether the first flag is true. The 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, modify the second flag to true.
  • the second flag can be regarded as the total flag of the screen collaboration and super keyboard and mouse dragging concurrency recorded by the PC super keyboard and mouse (referred to as collaborative keyboard and mouse dragging).
  • the PC's super keyboard and mouse service After the PC's super keyboard and mouse service receives the notification message sent by the tablet's super keyboard and mouse service of releasing 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 screen collaboration of the PC sends a file transfer request to the screen collaboration of the mobile phone.
  • the screen coordination service of the mobile phone sends a file transfer response to the screen coordination service of the PC, where the file transfer response includes the dragged picture in the mobile phone camera application, for example, picture 1 in FIG5 .
  • the screen collaboration service of the PC stores the image to the target path.
  • the screen collaboration service of the PC determines whether the third flag is true to know whether it is a keyboard and mouse collaborative drag scene. If the third flag is true, the screen collaboration service of the PC determines that the current scene is a keyboard and mouse collaborative drag scene, and can send a picture transfer completion message to the super keyboard and mouse service of the PC.
  • 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.
  • the super keyboard and mouse service of the PC transmits the image to the super keyboard and mouse service of the tablet computer.
  • This embodiment does not limit the execution order of S621a and S621b, and they can be executed simultaneously or sequentially.
  • the screen collaboration service of the PC modifies the third flag bit to false.
  • 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.
  • the transferred picture can be displayed anywhere within the active area of the tablet screen.
  • the picture 1 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.
  • a picture may also be displayed at the location where the picture was released.
  • the file sharing method shown in this embodiment can realize the transfer of the file selected by the user in the mobile phone collaboration window and dragged across devices through the PC to the tablet computer through the information interaction of the screen collaboration service of the mobile phone, the screen collaboration service of the PC, the super keyboard and mouse service of the PC, and the super keyboard and mouse service of the tablet computer, and display the file on the tablet computer screen.
  • the above scheme can quickly and efficiently realize cross-device file sharing in the screen collaboration scenario, and improve the convenience of user operation.
  • FIG7 is a second scenario diagram of the file sharing method provided by the embodiment of the present application.
  • the collaborative window 101 of the mobile phone 200 is displayed on the screen of the PC 100
  • the interface of the album application of the mobile phone 200 is synchronously displayed on 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 cross to the screen of the tablet computer 300, and the screen of the tablet computer 300 displays the interface 303 of the album application of the tablet computer 300, and the interface 303 displays multiple pictures, including, for example, picture 5.
  • the user can use the wireless mouse to select the picture 5 in the interface 303, drag the picture 5 to the right edge of the screen of the tablet computer 300, and then enter the left edge of the screen of the PC 100, until the picture 5 is dragged to the window 101 on the screen of the PC 100 and then released, the tablet computer 300 transmits the picture 5 in the album application of the tablet computer 300 to the mobile phone 200 through the PC 100, and displays the picture 5 in the collaborative window 101 of the mobile phone 200 and the screen of the mobile phone 200.
  • the display position of the picture 5 is not limited to the position of the first picture in the album. In some embodiments, the picture 5 can also be displayed at the released position.
  • FIG8 is a flowchart of the second method for sharing files provided by an embodiment of the present application.
  • the file sharing method shown in FIG8 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.
  • the mobile phone and the PC have established screen collaboration
  • the PC and the tablet computer have established super keyboard and mouse.
  • the file sharing method includes:
  • 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.
  • the drag-in event of the super keyboard and mouse refers to a cross-device drag event triggered at the edge of the tablet screen.
  • the super keyboard and mouse service of the tablet sends the drag-in event of the super keyboard and mouse to the super keyboard and mouse service of the PC.
  • 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.
  • 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 to inform the screen collaboration service of the PC that the super keyboard and mouse is dragging files.
  • the initial value of the fourth flag bit may be false.
  • the screen collaboration service of the PC may modify the fourth flag bit from false to true.
  • the screen collaboration service of the PC determines whether the fourth flag is true.
  • the screen collaboration service of the PC determines whether the fourth flag is true.
  • the initial value of the fifth flag can be false.
  • the screen collaboration service of the PC can confirm again whether the fourth flag is true. The 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 screen collaboration service of the PC 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.
  • the fifth flag can be regarded as the total flag of the screen collaboration and super keyboard and mouse dragging concurrently recorded by the PC screen collaboration.
  • the screen coordination service of the PC determines whether 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 that the image is dragged into the collaboration window.
  • the PC's screen collaboration service 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 a collaboration window, it can confirm again whether the fifth flag is true, in order to check whether the current scenario is a collaborative keyboard and mouse dragging scenario.
  • the initial value of the sixth flag bit may be false.
  • 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.
  • the super keyboard and mouse service of the PC 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.
  • This embodiment does not limit the execution order of S809a and S809b, and they can be executed simultaneously or sequentially.
  • the PC's screen collaboration service 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 super keyboard and mouse service of the tablet transmits the image to the super keyboard and mouse service of the PC.
  • the super keyboard and mouse service of the PC sends a picture transmission completion message to the screen coordination service of the PC.
  • the screen collaboration service of the PC obtains the image from the target path.
  • the PC's super keyboard and mouse service After the PC's super keyboard and mouse service stores the picture 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 picture at the target path.
  • the screen collaboration service of the PC transmits the image to the screen collaboration service of the mobile phone.
  • the screen coordination 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.
  • the picture 5 is displayed on the screen of the mobile phone 200 .
  • the screen collaboration service of the PC sends a message indicating that the image transfer is complete to the super keyboard and mouse service of the PC.
  • 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.
  • the picture 5 is displayed in the window 101 .
  • 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.
  • the file sharing method shown in this embodiment realizes the information interaction of the screen collaboration service of the mobile phone, the screen collaboration service of the PC, the super keyboard and mouse service of the PC, and the super keyboard and mouse service of the tablet computer, so as to transfer the file selected by the user in the tablet computer and dragged across devices to the mobile phone through the PC, and display the file on the mobile phone screen and the mobile phone collaboration window of the PC screen.
  • the above scheme can quickly and efficiently realize cross-device file sharing in the screen collaboration scenario, and improve the convenience of user operation.
  • a virtual window is created in the lower right corner of the PC main screen, such as window 103 in FIG5 , and the virtual window is used to detect cross-device drag events on the PC main screen.
  • window 103 can detect the cross-device drag event on the PC main screen, which can trigger S606a and S606b in FIG6 .
  • an embodiment of the present application proposes a file sharing method, which can create a virtual window according to the position of the mobile phone collaborative window by detecting 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.
  • 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.
  • FIG9 is a schematic diagram of a third scenario of the file sharing method provided by the embodiment of the present application.
  • the extended screen 304 of the PC 100 is displayed on the main screen of the tablet computer 300
  • the collaborative window 305 of the mobile phone 200 is displayed on the extended screen 304.
  • the interface of the photo album application of the mobile phone 200 is synchronously displayed on the window 305 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 cross to the screen of the tablet computer 300, select picture 1 in the window 305, drag picture 1 to the screen space 306 on the main screen of the tablet computer 300 except the extended screen 304, and then release it.
  • the mobile phone 200 transmits picture 1 in the photo album application of the mobile phone 200 to the tablet computer 300 through the PC 100, and displays picture 1 on the screen space 306 of the tablet computer 300.
  • a cursor is presented on the extended screen 304, and a picture thumbnail is presented below the cursor.
  • a cursor is presented on the screen space 306, and a picture thumbnail is presented below the cursor.
  • a plus sign may be displayed in the upper left corner of the picture thumbnail to indicate that a picture is imported into the tablet computer.
  • FIG. 9 is only an example, and the embodiment of the present application does not limit the style of dragging pictures on different screens.
  • Figure 10 is a flowchart diagram 3 of the file sharing method provided by the embodiment of 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.
  • the mobile phone and the PC have established screen collaboration, the PC and the tablet have established a super keyboard and mouse, and the PC and the tablet have established sidecar.
  • the method includes:
  • the screen collaboration service of the PC sends a screen collaboration drag-in event to the super keyboard and mouse service of the PC.
  • the PC's super keyboard and mouse service detects the location of the collaborative window.
  • the virtual window can be regarded as a subprocess 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.
  • S1006 to S1009 are executed.
  • S1006 to S1009 of this embodiment are similar to S604 to S607 of the above embodiment, and the details can be referred to the above embodiment, which will not be elaborated here.
  • 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.
  • 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.
  • S1015 to S1025 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.
  • the file sharing method shown in this embodiment creates a virtual window on the screen where the mobile phone collaboration window is located, that is, the lower right corner of the PC extended screen, so that the PC super keyboard and mouse can detect the cross-device drag event of the super keyboard and mouse on the PC extended screen, thereby realizing the transfer of files in the mobile phone collaboration window on the PC extended screen to the tablet computer through the PC and displaying them on the main screen of the tablet computer.
  • the above scheme can quickly and efficiently realize cross-device file sharing in the screen collaboration scenario, and improve the convenience of user operation.
  • 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, and 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.
  • 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.
  • the first window can be regarded as a mirror window of the second electronic device on the first electronic device.
  • the first window displays a first file
  • the display screen of the second electronic device displays the first file.
  • the first file is a locally stored file of the second electronic device, for example, the first file can be a picture, video, text, audio, application, etc.
  • the first electronic device is a personal computer PC 100
  • the second electronic device is a mobile phone 200
  • the third electronic device is a tablet computer 300.
  • PC 100 is connected to mobile phone 200 by wire or wireless
  • PC 100 is connected to tablet computer 300 by wire or wireless.
  • the first window is window 101
  • the first file displayed in the first window is picture 1.
  • the screen effective 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, and then release picture 1 to area 301 of tablet computer 300, and picture 1 is displayed in area 301.
  • the content of the second electronic device projected to the first electronic device is displayed in the first window of the first electronic device, and the user drags the first file in the first window across devices to the third electronic device to realize the local
  • the stored first file is dragged from the first electronic device to the third electronic device for display.
  • the method 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.
  • 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.
  • the method before the second electronic device transfers the first file to the first electronic device, the method also 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.
  • the drag-and-release operation on the first file is a drag-and-release operation 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 picture 1 is dragged outside the 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 picture 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 FIG. 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 FIG. 6.
  • the first electronic device after the first electronic device receives the notification sent by the third electronic device that the file is 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 the notification sent by the third electronic device that the file is not 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.
  • 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.
  • PC 100 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 FIG. 6 .
  • the first electronic device 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.
  • the method also 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.
  • the second file may be a picture, video, text, audio, application, etc.
  • the second file is picture 5
  • picture 5 is displayed on the display screen of tablet computer 300.
  • the user can use the wireless mouse to drag picture 5 across the edge of the tablet computer 300 screen to window 101 of PC 100 and then release picture 5, and picture 5 is displayed in window 101 and on the display screen of mobile phone 200.
  • the content of the second electronic device projected to the first electronic device is displayed in the first window of the first electronic device.
  • a user drags a third file in a third electronic device to the first window across devices, and then the second file stored locally on the third electronic device can be dragged to the second electronic device for display through the first electronic device.
  • the first window can synchronously display the second file.
  • the method 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; and the first electronic device transmits the second file to the second electronic device.
  • 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.
  • 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 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.
  • the drag-and-drop operation on the second file is a drag-and-drop operation on the window 101 of the PC 100.
  • the second notification message sent by the first electronic device to the third electronic device may correspond to the notification message of S809b in FIG. 8 .
  • the transmission of the second file from the third electronic device to the first electronic device may correspond to S811 in FIG. 8 .
  • the third electronic device 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.
  • 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.
  • the tablet computer 300 when the picture 5 is dragged from the tablet computer 300 to the right edge of the screen, 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 FIG8 .
  • the third electronic device when the second file is dragged to the screen edge of 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.
  • 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.
  • the first virtual window is located at 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.
  • the first electronic device is a PC 100
  • the first virtual window is a window 103 at the lower right corner of the main screen of the 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.
  • 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, and 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 a drag-and-release operation on the third file, the first screen space of the third electronic device displays the third file.
  • the first electronic device is connected to the second electronic device by wire or wirelessly
  • 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.
  • the second window can be regarded as a mirror window of the second electronic device on the first electronic device.
  • the second window displays a third file
  • 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.
  • the first electronic device is a personal computer PC 100
  • the second electronic device is a mobile phone 200
  • the third electronic device is a tablet computer 300.
  • PC 100 is connected to mobile phone 200 by wire or wireless
  • PC 100 is connected to tablet computer 300 by wire or wireless.
  • the extended screen of the first electronic device is an extended screen 304 of the tablet computer 300 projected by PC 100, and the extended screen 304 occupies part of the screen space of the display screen of the tablet computer 300.
  • the second window is a window 305 on the extended screen 304
  • the third file displayed in the second window is picture 1.
  • the first screen space of the third electronic device is the screen space 306 of the tablet computer 300 except the extended screen 304.
  • the user can use a wireless mouse to drag picture 1 from window 305 of the tablet computer 300 to screen space 306 and then release it, and picture 1 is displayed in screen space 306.
  • the first electronic device projects its extended screen onto the display screen of the third electronic device.
  • 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 cross-device file sharing in the screen collaboration scenario can be realized quickly and efficiently.
  • the method 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.
  • 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.
  • the first electronic device 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.
  • PC 100 when picture 1 is dragged from window 305 to the screen edge of 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 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 FIG10 .
  • the first electronic device 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.
  • 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.
  • the second virtual window is located at 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.
  • the first electronic device is PC 100
  • the second virtual window is window 309 at the lower right corner of the extended screen 304 of PC 100.
  • the second virtual window can be used to detect the aforementioned third cross-device drag event.
  • the first electronic device is installed with a first operating system
  • the second electronic device and the third electronic device are installed with a first operating system.
  • the device is installed with a second operating system, and the first operating system is different from the second operating system.
  • the first operating system is a Windows operating system
  • the second operating system is an Android operating system.
  • 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 of a file sharing method of the embodiments of the present application can be run to perform processing according to a file sharing method provided by the embodiments of the present application.
  • the execution subject of a 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 applied to an electronic device, for example, the processing device is a chip.
  • the module/service may be a software program, a hardware circuit, or a combination of the two to implement the above functions.
  • the hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group processor, etc.) and a memory for executing one or more software or firmware programs, a combined logic circuit, and/or other suitable components that support the described functions.
  • ASIC application specific integrated circuit
  • a processor such as a shared processor, a dedicated processor, or a group processor, etc.
  • memory for executing one or more software or firmware programs, a combined logic circuit, and/or other suitable components that support the described functions.
  • modules/services of each example described in the embodiments of the present application can be implemented with electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in the form of hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
  • 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 effect are similar to those of the aforementioned related embodiments and will not be repeated here.
  • 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 comprising: a memory and a processor, the processor being used to call a computer program in the memory to execute the technical solution of a mobile phone in any of the aforementioned method embodiments, and its implementation principle and technical effect are similar to those of the aforementioned related embodiments, and will not be repeated here.
  • 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 a tablet computer in any of the aforementioned method embodiments. Its implementation principle and technical effect are similar to those of the aforementioned related embodiments and will not be repeated here.
  • the memory may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices 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, optical disc storage (including compressed optical 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 the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this.
  • the memory may exist independently and be connected to the processor through a communication line. The memory may also be integrated with the processor.
  • the processor can 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.
  • CPU central processing unit
  • ASIC application-specific integrated circuit
  • the present application provides a computer-readable storage medium on which a computer program is stored.
  • the first electronic device executes the technical solution of the PC in any of the aforementioned method embodiments, and its implementation principle and technical effect are similar to those of the aforementioned related embodiments, which will not be repeated here.
  • An embodiment of the present application provides a computer-readable storage medium on which a computer program is stored.
  • 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 effect are similar to those of the aforementioned related embodiments and are not repeated here.
  • An embodiment of the present application provides a computer-readable storage medium on which a computer program is stored.
  • 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 effect are similar to those of the aforementioned related embodiments and are not repeated here.
  • 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 effect are similar to those of the above-mentioned related embodiments and will not be repeated here.
  • 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 effect are similar to those of the aforementioned related embodiments and will not be repeated here.
  • 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 effect are similar to those of the aforementioned related embodiments and will not be repeated here.
  • An embodiment of the present application provides a computer program product.
  • the 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.
  • the implementation principle and technical effect are similar to those of the aforementioned related embodiments and are not repeated here.
  • An embodiment of the present application provides a computer program product.
  • the computer program product is running 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 effect are similar to those of the aforementioned related embodiments and are not repeated here.
  • An embodiment of the present application provides a computer program product.
  • the computer program product is run on a third electronic device, the third electronic device executes the technical solution of a tablet computer in any of the aforementioned method embodiments.
  • the implementation principle and technical effect are similar to those of the aforementioned related embodiments and are not repeated here.
  • An embodiment of the present application provides a cross-device dragging system, referring to FIG. 1 or FIG. 2 , the system includes: a first electronic device 100, a second electronic device 200 and a third electronic device 300, wherein 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, and its implementation principle and technical effects are similar to those of the aforementioned related embodiments, which will not be repeated here.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Information Transfer Between Computers (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本申请提供一种文件共享方法、设备及存储介质,涉及终端技术领域,可应用于包括第一电子设备、第二电子设备和第三电子设备的系统,第一电子设备分别与第二电子设备和第三电子设备连接,该方法包括:第一电子设备显示第一窗口,第一窗口显示第二电子设备的屏幕内容,第二电子设备的屏幕内容包括第一文件;当第一文件从第一窗口被拖拽至第三电子设备的屏幕有效区域时,响应于对第一文件的拖拽释放操作,第三电子设备显示第一文件。上述方法将第二电子设备本地存储的第一文件,通过第一电子设备拖拽至第三电子设备显示,能够快速高效的实现屏幕协同场景下的跨设备文件共享。

Description

文件共享方法、设备及存储介质
本申请要求于2023年12月14日提交中国专利局、申请号为202311730631.4、申请名称为“文件共享方法、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端技术领域,尤其涉及文件共享方法、设备及存储介质。
背景技术
随着跨设备协同、多屏互动技术的发展,用户对多屏互动的需求越来越多,多屏协同场景越来越丰富。多屏协同场景也称为屏幕协同场景,屏幕协同场景包括投屏场景、扩展屏场景、投屏与扩展屏并发场景等。如何在屏幕协同场景下实现跨设备文件共享是目前亟待解决的问题。
发明内容
本申请实施例提供一种文件共享方法、设备及存储介质,实现屏幕协同场景下的跨设备文件共享。
第一方面,本申请实施例提出一种文件共享方法,应用于包括第一电子设备、第二电子设备和第三电子设备的系统,第一电子设备分别与第二电子设备和第三电子设备连接,该方法包括:第一电子设备显示第一窗口,第一窗口显示第二电子设备的屏幕内容,第二电子设备的屏幕内容包括第一文件;当第一文件从第一窗口被拖拽至第三电子设备的屏幕有效区域时,响应于对第一文件的拖拽释放操作,第三电子设备显示第一文件。
第一电子设备与第二电子设备有线或无线连接,第一电子设备与第三电子设备有线或无线连接。第一电子设备显示的第一窗口为第二电子设备的协同窗口,第一窗口显示的内容可以与第二电子设备显示屏显示的内容一致。当第一窗口显示的内容与第二电子设备显示屏显示的内容一致时,第一窗口可以看作是第二电子设备在第一电子设备的镜像窗。一种示例中,第一窗口显示第一文件,第二电子设备显示屏显示第一文件。第一文件为第二电子设备的本地存储的文件,例如第一文件可以是图片、视频、文本、音频、应用等。
示例性的,参照图5,第一电子设备为个人计算机PC 100,第二电子设备为手机200,第三电子设备为平板电脑300。PC 100与手机200有线或无线连接,PC 100和平板电脑300有线或无线连接。第一窗口为窗口101,第一窗口显示的第一文件为图片1。第三电子设备的屏幕有效区域为平板电脑300显示屏上的区域301。用户可使用无线鼠标拖拽图片1穿越PC 100屏幕边缘,至平板电脑300的区域301后释放图片1,图片1显示于区域301。
上述方法中,第二电子设备投屏到第一电子设备的内容显示在第一电子设备的第一窗口中,用户跨设备拖拽第一窗口中的第一文件至第三电子设备,实现将第二电子设备本地存储的第一文件,通过第一电子设备拖拽至第三电子设备显示,操作过程简便,能够快速高效的实现屏幕协同场景下的跨设备文件共享。
第一方面的一个可选实施例中,第三电子设备显示第一文件之前,该方法还包括:第 二电子设备向第一电子设备传输第一文件;第一电子设备向第三电子设备传输第一文件。
上述方法中,第二电子设备通过第一电子设备向第三电子设备传输用户拖拽的第一文件,实现屏幕协同场景下的跨设备文件传输。
第一方面的一个可选实施例中,第二电子设备向第一电子设备传输第一文件之前,该方法还包括:响应于对第一文件的拖拽释放操作,第三电子设备确定第一文件的释放位置是否在第三电子设备的屏幕有效区域内;若是,第三电子设备向第一电子设备发送第一通知消息,第一通知消息用于指示第一文件释放到第三电子设备的屏幕有效区域;第一电子设备向第二电子设备发送文件传输请求,文件传输请求用于请求传输第一文件。
示例性的,继续参照图5,对第一文件的拖拽释放操作为对图片1在平板电脑300显示屏上的拖拽释放操作。第三电子设备的屏幕有效区域为平板电脑300显示屏上的区域301。应理解,若拖拽图片1至区域301之外,由于不是平板电脑300的屏幕有效区域,本次跨设备拖拽失败,平板电脑300不会接收到图片1并显示。第三电子设备向第一电子设备发送的第一通知消息可对应图6中S609的通知消息。第一电子设备向第二电子设备发送的文件传输请求可对应图6中S613的文件传输请求。
上述方法中,在第一电子设备接收到第三电子设备发送的文件释放到屏幕有效区域的通知后,第一电子设备向第二电子设备获取被拖拽的第一文件,进而将第一文件传输至第三电子设备进行显示,实现屏幕协同场景下的跨设备文件共享。应理解,若第一电子设备接收到第三电子设备发送的文件未释放到屏幕有效区域的通知,第一电子设备不会向第二电子设备获取第一文件,第三电子设备不会接收到第一文件并显示。
第一方面的一个可选实施例中,该方法还包括:当第一文件从第一窗口被拖拽至第一电子设备的屏幕边缘时,第一电子设备向第三电子设备发送第一跨设备拖拽事件,第一跨设备拖拽事件用于指示有文件从第一电子设备拖拽至第三电子设备。
示例性的,继续参照图5,当图片1从PC 100的窗口101被拖拽至PC 100的左侧屏幕边缘时,PC 100向平板电脑300发送第一跨设备拖拽事件,以指示有图片从PC 100拖拽至平板电脑300,第一跨设备拖拽事件可对应图6中S606b的超级键鼠的拖入事件。
上述方法中,当第一文件被拖拽至第一电子设备的主屏幕的屏幕边缘时,第一电子设备通过发送第一跨设备拖拽事件,告知第三电子设备有文件跨设备拖入,以便第三电子设备开始监测被拖拽的第一文件。
第一方面的一个可选实施例中,该方法还包括:第三电子设备显示第二文件,第二文件为第三电子设备本地存储的文件;当第二文件从第三电子设备的屏幕被拖拽至第一窗口时,响应于对第二文件的拖拽释放操作,第一窗口和第二电子设备显示第二文件。
第二文件可以是图片、视频、文本、音频、应用等。示例性的,参照图7,第二文件为图片5,平板电脑300的显示屏上显示有图片5。用户可使用无线鼠标拖拽图片5穿越平板电脑300屏幕边缘,至PC 100的窗口101后释放图片5,图片5显示于窗口101,且图片5显示于手机200的显示屏上。
上述方法中,第二电子设备投屏到第一电子设备的内容显示在第一电子设备的第一窗口中,用户跨设备拖拽第三电子设备中的第三文件至第一窗口,即可将第三电子设备本地存储的第二文件,通过第一电子设备拖拽至第二电子设备显示,第一窗口可同步显示第二文件,操作过程简便,能够快速高效的实现屏幕协同场景下的跨设备文件共享。
第一方面的一个可选实施例中,第一窗口和第二电子设备显示第二文件之前,该方法还包括:第三电子设备向第一电子设备传输第二文件;第一电子设备向第二电子设备传输第二文件。
上述方法中,第三电子设备通过第一电子设备向第二电子设备传输用户拖拽的第二文件,实现屏幕协同场景下的跨设备文件传输。
第一方面的一个可选实施例中,第三电子设备向第一电子设备传输第二文件,包括:响应于对第二文件的拖拽释放操作,第一电子设备向第三电子设备发送第二通知消息,第二通知消息用于指示第二文件释放到第一窗口;第三电子设备向第一电子设备传输第二文件。
示例性的,继续参照图7,对第二文件的拖拽释放操作为对图片5在PC 100的窗口101的拖拽释放操作。第一电子设备向第三电子设备发送的第二通知消息可对应图8中S809b的通知消息。第三电子设备向第一电子设备传输第二文件可对应图8中S811。
上述方法中,在第三电子设备接收到第一电子设备发送的文件释放到第一窗口的通知后,第三电子设备向第一电子设备传输第二文件,以便第一电子设备将第二文件传输给第二电子设备进行显示,实现屏幕协同场景下的跨设备文件共享。
第一方面的一个可选实施例中,该方法还包括:当第二文件被拖拽至第三电子设备的屏幕边缘时,第三电子设备向第一电子设备发送第二跨设备拖拽事件,第二跨设备拖拽事件用于指示有文件从第三电子设备拖拽至第一电子设备。
示例性的,继续参照图7,当图片5从平板电脑300被拖拽至其右侧屏幕边缘时,平板电脑300向PC 100发送第二跨设备拖拽事件,以指示有图片从平板电脑300拖拽至PC 100,第二跨设备拖拽事件可对应图8中S801的超级键鼠的拖入事件。
上述方法中,当第二文件被拖拽至第三电子设备的屏幕边缘时,第三电子设备通过发送第二跨设备拖拽事件,告知第一电子设备有文件跨设备拖入,以便第一电子设备开始监测被拖拽的第二文件。
第一方面的一个可选实施例中,该方法还包括:第一电子设备的超级键鼠服务启动后,第一电子设备的超级键鼠服务创建第一虚拟窗口;第一虚拟窗口用于检测第一电子设备主屏幕上的跨设备拖拽事件。
第一虚拟窗口位于第一电子设备主屏幕的右下角,可触发第一电子设备的主屏幕上的跨设备拖拽事件。示例性的,参照图5,第一电子设备为PC 100,第一虚拟窗口为PC 100主屏幕右下角的窗口103。第一虚拟窗口可用于检测前述的第一跨设备拖拽事件、以及前述的第二跨设备拖拽事件。
第二方面,本申请实施例提供一种文件共享方法,应用于包括第一电子设备、第二电子设备和第三电子设备的系统,第一电子设备分别与第二电子设备和第三电子设备连接,方法包括:第三电子设备显示第一电子设备的扩展屏幕,扩展屏幕占据第三电子设备的部分屏幕空间,扩展屏幕显示有第二窗口,第二窗口显示第二电子设备的屏幕内容,第二电子设备的屏幕内容包括第三文件;当第三文件从第二窗口被拖拽至第三电子设备的除扩展屏幕外的第一屏幕空间时,响应于对第三文件的拖拽释放操作,第三电子设备的第一屏幕空间显示第三文件。
第一电子设备与第二电子设备有线或无线连接,第一电子设备与第三电子设备有线或 无线连接。第二窗口为第二电子设备的协同窗口,第二窗口显示的内容可以与第二电子设备显示屏显示的内容一致。当第二窗口显示的内容与第二电子设备显示屏显示的内容一致时,第二窗口可以看作是第二电子设备在第一电子设备上的镜像窗。一种示例中,第二窗口显示第三文件,第二电子设备显示屏显示第三文件。第三文件为第二电子设备的本地存储的文件,例如第三文件可以是图片、视频、文本、音频、应用等。
示例性的,参照图9,第一电子设备为个人计算机PC 100,第二电子设备为手机200,第三电子设备为平板电脑300。PC 100与手机200有线或无线连接,PC 100和平板电脑300有线或无线连接。第一电子设备的扩展屏幕为PC 100投屏到平板电脑300的扩展屏幕304,扩展屏幕304占据平板电脑300显示屏的部分屏幕空间。第二窗口为扩展屏幕304上的窗口305,第二窗口显示的第三文件为图片1。第三电子设备的第一屏幕空间为平板电脑300的除扩展屏幕304外的屏幕空间306。用户可使用无线鼠标将图片1从平板电脑300的窗口305拖拽至屏幕空间306后释放,图片1显示于屏幕空间306。
上述方法中,第一电子设备将其扩展屏幕投屏到第三电子设备的显示屏上,第一电子设备的扩展屏幕上显示有第二电子设备的第二窗口,用户拖拽第二窗口中的第三文件至第三电子设备的第一屏幕空间,实现将第二电子设备本地存储的第三文件,拖拽至第三电子设备进行显示,操作过程简便,能够快速高效的实现屏幕协同场景下的跨设备文件共享。
第二方面的一个可选实施例中,第三电子设备的第一屏幕空间显示第三文件之前,方法还包括:第二电子设备向第一电子设备传输第三文件;第一电子设备向第三电子设备传输第三文件。
上述方法中,第二电子设备通过第一电子设备向第三电子设备传输用户拖拽的第三文件,实现屏幕协同场景下的跨设备文件传输。
第二方面的一个可选实施例中,当第三文件从第二窗口被拖拽至第一电子设备的扩展屏幕的屏幕边缘时,第一电子设备向第三电子设备发送第三跨设备拖拽事件,第三跨设备拖拽事件用于指示有文件从第一电子设备的扩展屏幕拖拽至第三电子设备。
示例性的,继续参照图9,当图片1从窗口305被拖拽至PC 100的扩展屏幕304的屏幕边缘时,PC 100向平板电脑300发送第三跨设备拖拽事件,以指示有图片从PC 100扩展屏幕304拖拽至平板电脑300,第三跨设备拖拽事件可对应图10中S1008b的超级键鼠的拖入事件。
上述方法中,当第三文件被拖拽至第一电子设备的扩展屏幕的屏幕边缘时,第一电子设备通过发送第三跨设备拖拽事件,告知第三电子设备有文件跨设备拖入,以便第三电子设备开始监测被拖拽的第三文件。
第二方面的一个可选实施例中,该方法还包括:当第二窗口中的第三文件被选中并被拖拽时,第一电子设备的超级键鼠服务创建第二虚拟窗口;第二虚拟窗口用于检测第一电子设备扩展屏幕上的跨设备拖拽事件。
第二虚拟窗口位于第一电子设备扩展屏幕的右下角,可触发第一电子设备的扩展屏幕上的跨设备拖拽事件,示例性的,参照图9,第一电子设备为PC 100,第二虚拟窗口为PC 100扩展屏幕304右下角的窗口309。第二虚拟窗口可用于检测前述的第三跨设备拖拽事件。
第二方面的一个可选实施例中,第一电子设备安装有第一操作系统,第二电子设备和 第三电子设备安装有第二操作系统,第一操作系统和第二操作系统不同。
示例性的,第一操作系统为windows操作系统,第二操作系统为安卓操作系统。
第三方面,本申请实施例提供一种电子设备,电子设备包括:存储器和处理器,所述处理器用于调用所述存储器中的计算机程序,以执行如第一方面任一项所述的第一电子设备的方法,或者执行如第一方面任一项所述的第二电子设备的方法,或者执行如第一方面任一项所述的第三电子设备的方法。
第四方面,本申请实施例提供一种电子设备,电子设备包括:存储器和处理器,所述处理器用于调用所述存储器中的计算机程序,以执行如第二方面任一项所述的第一电子设备的方法,或者执行如第二方面任一项所述的第二电子设备的方法,或者执行如第二方面任一项所述的第三电子设备的方法。
第五方面,本申请实施例提供一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,当计算机程序在电子设备上运行时,使得电子设备执行如第一方面任一项所述的第一电子设备的方法,或者执行如第一方面任一项所述的第二电子设备的方法,或者执行如第一方面任一项所述的第三电子设备的方法。
第六方面,本申请实施例提供一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,当计算机程序在电子设备上运行时,使得电子设备执行如第二方面任一项所述的第一电子设备的方法,或者执行如第二方面任一项所述的第二电子设备的方法,或者执行如第二方面任一项所述的第三电子设备的方法。
第七方面,本申请实施例提供一种芯片,芯片包括处理器,处理器用于调用存储器中的计算机程序,以执行如第一方面任一项所述的第一电子设备的方法,或者执行如第一方面任一项所述的第二电子设备的方法,或者执行如第一方面任一项所述的第三电子设备的方法。
第八方面,本申请实施例提供一种芯片,芯片包括处理器,处理器用于调用存储器中的计算机程序,以执行如第二方面任一项所述的第一电子设备的方法,或者执行如第二方面任一项所述的第二电子设备的方法,或者执行如第二方面任一项所述的第三电子设备的方法。
第九方面,本申请实施例提供一种计算机程序产品,包括计算机程序,当计算机程序被运行时,使得计算机执行如第一方面任一项所述的第一电子设备的方法,或者执行如第一方面任一项所述的第二电子设备的方法,或者执行如第一方面任一项所述的第三电子设备的方法。
第十方面,本申请实施例提供一种计算机程序产品,包括计算机程序,当计算机程序被运行时,使得计算机执行如第二方面任一项所述的第一电子设备的方法,或者执行如第二方面任一项所述的第二电子设备的方法,或者执行如第二方面任一项所述的第三电子设备的方法。
应当理解的是,本申请的第三方面至第十方面与本申请的第一方面或第二方面的技术方案相对应,各方面及对应的可行实施方式所取得的有益效果相似,不再赘述。
附图说明
图1为本申请实施例提供的屏幕协同场景的示意图一;
图2为本申请实施例提供的屏幕协同场景的示意图二;
图3为本申请实施例提供的一种电子设备的结构示意图;
图4为本申请实施例提供的另一种电子设备的结构示意图;
图5为本申请实施例提供的文件共享方法的场景示意图一;
图6为本申请实施例提供的文件共享方法的流程示意图一;
图7为本申请实施例提供的文件共享方法的场景示意图二;
图8为本申请实施例提供的文件共享方法的流程示意图二;
图9为本申请实施例提供的文件共享方法的场景示意图三;
图10为本申请实施例提供的文件共享方法的流程示意图三。
具体实施方式
为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。
需要说明的是,本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(种/个)”或其类似表达,是指的这些项中的任意组合,包括单项(种/个)或复数项(种/个)的任意组合。例如,a,b或c中的至少一项(种/个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。
需要说明的是,本申请所涉及的用户信息(包括但不限于用户设备信息、用户个人信息等)和数据(包括但不限于用于分析的数据、存储的数据、展示的数据等),均为经用户授权或者经过各方充分授权的信息和数据,并且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准,并提供有相应的操作入口,供用户选择授权或者拒绝。
为了便于理解,下面首先对本申请实施例涉及到的相关概念进行说明,以供参考。
第一,电子设备,为具有显示屏幕的设备。本申请实施例中电子设备可以是便携式设备,诸如手机、平板电脑、具备显示功能及无线通讯功能的可穿戴设备、车载终端设备、虚拟现实(virtual reality,VR)设备、增强现实(augmented reality,AR)设备、个人计算机(personal computer,PC)、笔记本电脑、上网本、个人数字助理(personal digital assistant,PDA)、智能家居设备(如,智能电视等)等。本申请实施例对电子设备所采用的具体技术和具体设备形态不做限定。
第二,外部设备,是指连在计算机系统的主机之外的设备,一般分为外部输入设备、外部输出设备和外存储器。外部设备是计算机系统中的重要组成部分,起到信息传输、输入和存储的作用。本申请实施例中,外部输入设备可以包括键盘、鼠标、笔输入设备(如, 触控笔)等。
第三,应用(application,APP)也称为应用程序,是能够实现某项或多项特定功能的软件程序。通常,电子设备中可以安装多个应用,例如相机应用、短信应用、浏览器应用、相册应用等。本申请实施例中提到的应用,可以是电子设备出厂时已安装的应用,也可以是用户在使用电子设备过程中从网络下载或从其他电子设备获取的应用。
第四,P2P(peer-to-peer)连接,又称为点对点连接,是指两台设备之间直接进行通信和数据传输,不需要通过中心化的服务器进行中转。这种连接方式常用于分布式计算、文件共享、即时通讯等场景,可以减轻服务器的负担,提高数据传输的效率和安全性。本申请实施例中,设备之间的通信连接可以为P2P连接。
第五,超级键鼠服务,是电子设备的一种多设备协同功能,可以与附近设备共享外部输入设备。本申请实施例中,PC可与附近设备,如平板电脑,共享PC的鼠标、键盘、笔输入设备等。
第六,屏幕协同服务,是电子设备的一种多设备协同功能,可以与附近设备进行连接和协同工作,实现屏幕内容的共享。协同工作可以是不同设备之间的屏幕内容镜像或扩展。本申请实施例中,屏幕协同服务主要指的是设备之间屏幕内容镜像,例如手机将其镜像屏投射到PC上。
第七,随航服务,是电子设备的一种屏幕协同功能,可以将设备的扩展屏幕投射到附近设备的屏幕上。本申请实施例中,PC可将其扩展屏幕投射到例如平板电脑上。
本申请实施例提供一种文件共享方法,用于在建立屏幕协同的多个电子设备之间进行文件共享。建立屏幕协同的多个电子设备包括至少两个电子设备。共享的文件可以为应用、图片、视频、音频、文本等。
下面对结合附图对本申请实施例提供的文件共享方法的屏幕协同场景进行介绍。
场景一:图1为本申请实施例提供的屏幕协同场景的示意图一。如图1所示,该场景包括PC 100,手机200以及平板电脑300,其中PC 100分别与手机200和平板电脑300通信连接。图1中设备间通信连接是无线保真(wireless fidelity,Wi-Fi)P2P连接。在一些实施例中,设备间还可以通过有线方式连接,例如通过通用串行总线(universal serial bus,USB)连接。
PC 100与手机200已建立屏幕协同连接,手机200将自身显示屏幕中的内容投屏到PC 100的显示屏幕上进行显示,如图1中的窗口101,窗口101为手机200的协同窗口,通常情况下,窗口101上显示的内容与手机200屏幕上显示的内容一致,窗口101也可称为手机200的镜像屏。
在一些实施例中,窗口101上显示的内容也可以与手机200屏幕上显示的内容不一致。
窗口101位于PC 100屏幕的上层,用户可拖拽窗口101至PC 100屏幕的任意位置,或调整窗口101在PC 100屏幕上的窗口大小。
在设备间建立P2P连接后,用户可进入PC 100的电脑管家,在电脑管家的多屏协同中快速建立PC 100与手机200的屏幕协同连接,如用户通过手机扫描多屏协同中呈现的二维码,以建立屏幕协同连接。当然,还可以通过其他方式进行连接,对此本申请实施例不作限定。
PC 100与平板电脑300已建立超级键鼠连接,PC 100和平板电脑300可以共享使用 PC 100的键盘、鼠标或触控笔等外部输入设备,PC 100的键鼠可以在设备间穿梭操控PC 100和平板电脑,也可以在设备间拖拽互传图片、文件等。图1中用户使用的外部输入设备为无线鼠标。
在设备间建立P2P连接后,用户可通过移动鼠标指针,连续两次轻触PC 100屏幕边缘,以建立超级键鼠连接。当然,还可以通过其他方式进行连接,对此本申请实施例不作限定。
基于图1所示的屏幕协同场景,本申请实施例提供一种文件共享方法,响应于图1所示的操作1,可将PC屏幕上手机协同窗口中的文件,经PC传输至平板电脑,并在平板电脑的屏幕上显示传输成功的文件。响应于图1所示的操作2,可将平板电脑中的文件,经PC传输至手机,并在手机屏幕以及PC屏幕上的手机协同窗口上显示传输成功的文件。上述方法能够快速高效的实现屏幕协同场景(投屏)下的跨设备文件共享,提高用户操作的简便性。
其中,操作1为从PC屏幕上的手机协同窗口起始,至平板电脑屏幕释放的跨设备拖拽操作,操作2为从平板电脑屏幕起始,至PC屏幕上的手机协同窗口释放的跨设备拖拽操作。
场景二:图2为本申请实施例提供的屏幕协同场景的示意图二。如图2所示,该场景同样包括PC 100,手机200以及平板电脑300,PC 100分别与手机200和平板电脑300通信连接,如P2P连接。PC 100与手机200已建立屏幕协同连接,PC 100与平板电脑300已建立超级键鼠连接,相关内容可参照前文。
与图1不同的是,PC 100还与平板电脑300建立随航连接,PC 100可以将其扩展屏幕中的文件投屏到平板电脑300的显示屏幕上进行显示,如图2所示的扩展屏幕301,扩展屏幕301位于平板电脑300屏幕的上层,占据平板电脑300的一部分屏幕空间。在一些实施例中,扩展屏幕301也可以占据平板电脑300的整个屏幕。
与图1不同的是,窗口101位于扩展屏幕301的上层,用户可拖拽窗口101至扩展屏幕301的任意位置,或在扩展屏幕301上调整窗口101的窗口大小。在一些实施例中,用户也可以将位于扩展屏幕301中的窗口101拖拽至PC 100屏幕中。
在设备间建立P2P连接后,用户可进入PC 100的电脑管家,在电脑管家的多屏协同中快速建立PC 100与平板电脑300的随航连接。
基于图2所示的屏幕协同场景,本申请实施例提供一种文件共享方法,响应于图2所示的操作3,可将PC扩展屏幕上手机协同窗口中的文件,经PC传输至平板电脑,并在平板电脑屏幕上除PC扩展屏幕外的屏幕空间显示传输成功的文件。上述方法能够快速高效的实现屏幕协同场景(投屏和扩展屏并发)下的跨设备文件共享,提高用户操作的简便性。
其中,操作3为从PC扩展屏幕上的手机协同窗口起始,至平板电脑上除PC扩展屏幕外的屏幕空间释放的拖拽操作。
为了便于理解本申请的文件共享方法,下面对上述场景一和场景二中涉及到的电子设备的结构进行介绍。
图3为本申请实施例提供的一种电子设备的结构示意图。以电子设备为PC为例,如图3所示,PC可以包括应用程序层、windows系统和硬件层。
应用程序层可以包括如相册、文件夹、浏览器等应用程序。本申请实施例中,应用程 序层还包括超级键鼠服务、屏幕协同服务和随航服务。PC的超级键鼠服务可获知PC上的跨设备的拖拽事件(如,拖拽PC上的文件至平板电脑)、拖拽释放事件(如,拖拽平板电脑上的文件至PC后释放)等。PC的屏幕协同服务可获取外部投屏设备(如,手机)的屏幕内容,将外部投屏设备的屏幕内容呈现在PC屏幕上。PC的随航服务可将PC的扩展屏幕的内容传输至外部连接设备(如,平板电脑),以实现PC屏幕的扩展。
windows系统可以包括蓝牙驱动和无线保真(wireless fidelity,WiFi)驱动。硬件层包括蓝牙模块、WiFi模块和显示屏。蓝牙驱动用于驱动蓝牙模块工作,以便PC与其他设备建立蓝牙连接。WiFi驱动用于驱动WiFi模块工作,以便PC与其他设备建立WiFi连接。显示驱动用于驱动显示屏工作。
需要说明的是,图3示出的PC层级结构中的层以及各层中包含的模块或部件,并不构成对PC的具体限定。在另一些实施例中,PC可以包括比图示更多或更少的层,以及每个层中可以包括更多或更少的部件,本申请实施例不做限定。
图4为本申请实施例提供的另一种电子设备的结构示意图。以电子设备为手机为例,手机的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的软件系统为安卓(Android)系统为例,示例性说明手机的软件结构。
如图4所示,分层架构将手机的软件系统分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,可以将安卓系统分为四层,分别为应用程序层、应用程序框架层、安卓运行时(Android Runtime)和系统库,以及内核层。
应用程序层可以包括一系列应用程序包,例如相册,文件夹,导航,浏览器,电子邮件,日历,闹钟等应用程序。本申请实施例中,应用程序层还包括屏幕协同服务。手机的屏幕协同服务可与PC的屏幕协同服务进行数据交互,例如传输手机的屏幕内容,以便在PC屏幕上显示手机协同窗口,如图1所示的窗口101。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。在一些实施例中,应用程序框架层包括如输入管理服务,电源管理服务,窗口管理服务等
安卓运行时包括核心库和虚拟机。安卓运行时负责安卓系统的调度和管理。核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维(3D)图形处理库(例如:OpenGL ES),二维(2D)图形引擎(例如:SGL)等。
内核层是硬件和软件之间的层。内核层包括例如显示驱动,摄像头驱动,音频驱动,传感器驱动,蓝牙驱动,WiFi驱动等,本申请实施例对此不做任何限制。
硬件层包括蓝牙模块,WiFi模块,显示屏等。
需要说明的是,图4示出的手机层级结构中的层以及各层中包含的模块或部件,并不构成对手机的具体限定。在另一些实施例中,手机可以包括比图示更多或更少的层,以及 每个层中可以包括更多或更少的部件,本申请实施例不做限定。
本申请实施例中,平板电脑的结构可参照图4,平板电脑的应用程序层可以包括超级键鼠服务和随航服务。平板电脑的超级键鼠服务可获知平板电脑上的跨设备的拖拽事件(如,从PC拖拽文件至平板电脑)、拖拽释放事件(如,在平板电脑上释放跨设备拖拽的文件)等。平板电脑的随航服务可接收PC传输的其扩展屏幕的内容,并将PC扩展屏幕呈现在平板电脑的屏幕上。
基于图3和图4所示的设备结构,下面分别结合具体的实施例对上述场景一和场景二的文件共享方法进行详细介绍。
场景一的文件共享方法对应下述的图5至图8所示实施例,具体的,图5和图6所示实施例详细介绍基于操作1的文件共享方法,图7和图8所示实施例详细介绍基于操作2的文件共享方法。
场景二的文件共享方法对应下述的图9和图10所示实施例,图9和图10所示实施例详细介绍基于操作3的文件共享方法。
为了便于理解,下述几个实施例均以传输图片为例进行方案说明,传输其他类型的文件可参照下述几个实施例。
图5为本申请实施例提供的文件共享方法的场景示意图一。如图5所示,PC 100屏幕上显示有手机200的协同窗口101,窗口101和手机200屏幕上同步显示手机200相册应用的界面,该界面显示有多个图片,如图片1和图片2。用户可使用无线鼠标选中窗口101中的图片,如图片1,从窗口101拖拽图片1至PC 100左侧屏幕边缘,随后进入平板电脑300右侧屏幕边缘,直至将图片1拖拽至平板电脑300屏幕的有效区域301后释放,手机200通过PC 100将手机200相册应用中的图片1传输至平板电脑300,在平板电脑300的有效区域301显示图片1。有效区域301可以占据平板电脑300的一部分屏幕空间。在一些实施例中,有效区域301也可以占据平板电脑300的整个屏幕。
在PC 100屏幕上拖拽图片的过程中,某一时刻,如图5中102所示,PC 100屏幕上呈现光标,在光标下方呈现图片缩略图。在平板电脑300屏幕上拖拽图片的过程中,某一时刻,如图5中302所示,平板电脑300屏幕上呈现光标,光标下方呈现图片缩略图,图片缩略图的左上角可显示加号,以指示有图片导入平板电脑。图5仅作为一种示例,对于不同类型设备上拖拽图片的样式,本申请实施例不作限定。
基于图5所示的场景,下面结合附图6对设备间的交互过程进行详细说明。
图6为本申请实施例提供的文件共享方法的流程示意图一。图6所示的文件共享方法涉及手机的屏幕协同服务,PC的屏幕协同服务和超级键鼠服务,平板电脑的超级键鼠服务。图6中,手机与PC已建立屏幕协同,PC与平板电脑已建立超级键鼠。
如图6所示,该文件共享方法包括:
S601.检测到选中并拖拽协同窗口中的图片时,PC的屏幕协同服务向PC的超级键鼠服务发送屏幕协同的拖入事件。
屏幕协同的拖入事件(Mirror的DragEnter事件)指的是在手机协同窗口内触发的选中并拖拽文件的事件,本实施例中,文件指的是图片。
示例性的,如图5所示,当用户选中并拖拽窗口101的图片1时,PC的屏幕协同服务向PC的超级键鼠服务发送屏幕协同的拖入事件。
S602.PC的超级键鼠服务修改第一标志位为true。
第一标志位的初始值可以为false。在PC的超级键鼠服务接收到PC的屏幕协同服务发送的拖入事件后,PC的超级键鼠服务将第一标志位由false修改为true,修改后的第一标志位可记为mirrorDragFileFlag_=true,以指示有文件从手机协同窗口拖出。
S603.检测到拖拽图片到PC屏幕边缘时,PC的超级键鼠服务确定第一标志位是否为ture。
S604.若确定第一标志位为true,PC的超级键鼠服务修改第二标志位为true。
示例性的,如图5所示,当拖拽图片1至PC左侧屏幕边缘时,PC的超级键鼠服务确定第一标志位是否为ture。
第二标志位的初始值可以为false。在检测到拖拽图片到PC屏幕边缘(超级键鼠的拖入事件)时,PC的超级键鼠服务可再次确认第一标志位是否为true,其目的是检查超级键鼠的拖入事件是否是在屏幕协同的拖入事件的基础上触发的,若是,修改第二标志位为true。
修改后的第二标志位可记为transFileFromMirrorFlag_=true,以指示有文件从手机协同窗口拖出并跨设备拖拽。第二标志位可以看作是PC超级键鼠记录的屏幕协同与超级键鼠拖拽并发(简称为协同键鼠拖拽)的总标志位。
S605.PC的超级键鼠服务确定第二标志位是否为true。
S606a.若确定第二标志位为true,PC的超级键鼠服务向PC的屏幕协同服务发送超级键鼠的拖入事件。
S606b.若确定第二标志位为true,PC的超级键鼠服务向平板电脑的超级键鼠服务发送超级键鼠的拖入事件。
本实施例中,超级键鼠的拖入事件(SuperIO的DragEnter事件)指的是在PC屏幕边缘触发的跨设备拖拽事件。PC的超级键鼠服务分别向PC的屏幕协同服务和平板电脑的超级键鼠服务发送超级键鼠的拖入事件之前,可再次确认第二标志位是否为true,其目的是检查当前是否是协同键鼠拖拽的场景。
本实施例对S606a和S606b的执行顺序不作限定,可以同时执行或顺序执行。
在一些实施例中,S604之后,检测到拖拽图片穿越到平板电脑屏幕后没有释放文件,又拖拽图片返回到PC屏幕时,PC的超级键鼠服务会触发超级键鼠的拖拽释放(DragLeave)事件,将第二标志位由true修改为false。
在S606a之后,可执行:
S607.PC的屏幕协同服务修改第三标志位为true。
第三标志位的初始值可以为false。PC的屏幕协同服务在接收到PC的超级键鼠服务发送的超级键鼠的拖入事件后,可获知从手机协同窗口拖出的图片正在跨设备拖拽,PC的屏幕协同服务将第三标志位修改为true,以记录协同键鼠拖拽。修改后的第三标志位可记为superIODragEnter_=true,以指示有文件从手机协同窗口拖出并跨设备拖拽。
在S606b之后,可执行:
S608.检测到拖拽释放操作时,平板电脑的超级键鼠服务确定是否释放在平板电脑屏幕的有效区域内。
示例性的,如图5所示,当释放跨设备拖拽的图片1时,平板电脑的超级键鼠服务确定是否释放在平板电脑屏幕的有效区域内。
S609.若确定释放在平板电脑屏幕的有效区域内,平板电脑的超级键鼠服务向PC的超级键鼠服务发送释放到有效区域的通知消息。
S610.PC的超级键鼠服务确定第二标志位是否为true。
S611.若确定第二标志位为true,PC的超级键鼠服务向PC的屏幕协同服务发送释放到有效区域的通知消息。
PC的超级键鼠服务通过确定第二标志位是否为true,以获知是否为键鼠协同拖拽场景。若第二标志位为true,PC的超级键鼠服务确定当前为键鼠协同拖拽场景,可向PC的屏幕协同服务同步释放到有效区域的通知消息。
S612.若确定第二标志位为true,PC的超级键鼠服务修改第一标志位为false。
PC的超级键鼠服务接收到平板电脑的超级键鼠服务发送的释放到有效区域的通知消息,且确定当前为键鼠协同拖拽场景后,将第一标志位由true修改为false,修改后的第一标志位可记为mirrorDragFileFlag_=false,以指示当前没有文件从手机协同窗口拖出。
本实施例对S611和S612的执行顺序不作限定,可以同时执行或顺序执行。
在S611之后,可执行:
S613.PC的屏幕协同向手机的屏幕协同发送文件传输请求。
S614.手机的屏幕协同服务向PC的屏幕协同服务发送文件传输响应,文件传输响应包括手机相机应用中被拖拽的图片。例如,图5中的图片1。
S615.PC的屏幕协同服务将图片存储至目标路径。
目标路径为PC的屏幕协同服务存储文件的默认路径。
S616.PC的屏幕协同服务确定第三标志位是否为true。
S617.若确定第三标志位为true,PC的屏幕协同服务向PC的超级键鼠服务发送图片传输完成消息。
PC的屏幕协同服务通过确定第三标志位是否为true,以获知是否为键鼠协同拖拽场景。若第三标志位为true,PC的屏幕协同服务确定当前为键鼠协同拖拽场景,可向PC的超级键鼠服务发送图片传输完成消息。
S618.PC的超级键鼠服务确定第二标志位是否为true。
S619.若确定第二标志位为true,PC的超级键鼠服务从目标路径获取图片。
PC的超级键鼠服务通过确定第二标志位是否为true,以获知是否为键鼠协同拖拽场景。若第二标志位为true,PC的超级键鼠服务确定当前为键鼠协同拖拽场景,可从目标路径获取图片。
S620.PC的超级键鼠服务向平板电脑的超级键鼠服务传输图片。
S621a.图片传输至平板电脑后,PC的超级键鼠服务向PC的屏幕协同服务发送图片传输完成消息。
S621b.图片传输至平板电脑后,PC的超级键鼠服务修改第二标志位为false。
修改后的第二标志位可记为transFileFromMirrorFlag_=false,以指示当前没有文件从手机协同窗口拖出并跨设备拖拽,即指示协同键鼠拖拽的流程结束。
本实施例对S621a和S621b的执行顺序不作限定,可以同时执行或顺序执行。
在S621a之后,可执行:
S622.PC的屏幕协同服务修改第三标志位为false。修改后的第三标志位可记为 superIODragEnter_=false,以指示当前没有文件从手机协同窗口拖出并跨设备拖拽。
在S620之后,可执行:
S623.平板电脑的超级键鼠服务将图片传输至平板电脑的显示驱动,以在平板电脑屏幕上显示拖拽的图片。
传输的图片可显示在平板电脑屏幕的有效区域内的任意位置。
示例性的,如图5所示,当释放跨设备拖拽的图片1至平板电脑的有效区域内时,若有效区域为图片列表区域,可将图片1显示在图片列表中的第一个位置。
在一些实施例中,图片也可显示在释放图片的位置处。
本实施例示出的文件共享方法,通过手机的屏幕协同服务、PC的屏幕协同服务、PC的超级键鼠服务以及平板电脑的超级键鼠服务的信息交互,可实现将手机协同窗口中用户选中并跨设备拖拽的文件,通过PC传输至平板电脑,并在平板电脑屏幕上显示该文件。上述方案能够快捷高效的实现屏幕协同场景下的跨设备文件共享,提高用户操作的简便性。
图7为本申请实施例提供的文件共享方法的场景示意图二。如图7所示,PC 100屏幕上显示有手机200的协同窗口101,窗口101和手机200屏幕上同步显示手机200相册应用的界面,该界面显示有多个图片,如图片1和图片2。用户可使用无线鼠标穿越至平板电脑300的屏幕,平板电脑300的屏幕上显示平板电脑300的相册应用的界面303,该界面303显示有多个图片,包括例如图片5。
用户可使用无线鼠标选中界面303中的图片5,拖拽图片5至平板电脑300右侧屏幕边缘,随后进入PC 100左侧屏幕边缘,直至将图片5拖拽至PC 100屏幕上的窗口101后释放,平板电脑300通过PC 100将平板电脑300相册应用中的图片5传输至手机200,在手机200的协同窗口101以及手机200的屏幕上显示图片5。图片5的显示位置不限于在相册第一张图片的位置处,在一些实施例中,图片5也可以显示在释放位置处。
基于图7所示的场景,下面结合附图8对设备间的交互过程进行详细说明。
图8为本申请实施例提供的文件共享方法的流程示意图二。图8所示的文件共享方法涉及手机的屏幕协同服务,PC的屏幕协同服务和超级键鼠服务,平板电脑的超级键鼠服务。图8中,手机与PC已建立屏幕协同,PC与平板电脑已建立超级键鼠。
如图8所示,该文件共享方法包括:
S801.检测到选中并拖拽平板电脑中的图片至平板电脑屏幕边缘时,平板电脑的超级键鼠服务向PC的超级键鼠服务发送超级键鼠的拖入事件。
本实施例中,超级键鼠的拖入事件指的是在平板电脑屏幕边缘触发的跨设备拖拽事件。示例性的,如图7所示,当用户选中并拖拽平板电脑中的图片5至平板电脑右侧屏幕边缘时,平板电脑的超级键鼠服务向PC的超级键鼠服务发送超级键鼠的拖入事件。
S802.PC的超级键鼠服务向PC的屏幕协同服务发送超级键鼠的拖入事件。
由于图7所示屏幕协同场景中PC的屏幕协同服务已开启,PC的超级键鼠服务在接收到平板电脑的超级键鼠服务发送的超级键鼠的拖入事件后,可向PC的屏幕协同服务发送该超级键鼠的拖入事件,以告知PC的屏幕协同服务超级键鼠正在拖拽文件。
S803.PC的屏幕协同服务修改第四标志位为true。
第四标志位的初始值可以为false。PC的屏幕协同服务在接收到超级键鼠的拖入事件后,可将第四标志位由false修改为true,修改后的第四标志位可记为superIODragFileFlag_ =true,以指示PC超级键鼠正在跨设备拖拽文件。
S804.检测到拖拽的图片进入协同窗口时,PC的屏幕协同服务确定第四标志位是否为true。
S805.若确定第四标志位为true,PC的屏幕协同服务修改第五标志位为true。
示例性的,如图7所示,当拖拽图片5进入PC 100的窗口101时,PC的屏幕协同服务确定第四标志位是否为true。
第五标志位的初始值可以为false。在检测到拖拽的图片进入协同窗口(屏幕协同的拖入事件)时,PC的屏幕协同服务可再次确认第四标志位是否为true,其目的是检查键鼠服务的拖入事件是否仍在进行中,若键鼠服务的拖入事件仍在进行中(第四标志位为true),表明屏幕协同的拖入事件是在键鼠服务的拖入事件的基础上触发的,此时PC的屏幕协同服务才将第五标志位由false修改为true,这样可以避免键鼠服务的拖入事件后存在操作中断,又触发屏幕协同的拖入事件,而错误修改第五标志位的问题。
修改后的第五标志位可记为superIODragFileToMirror_=true,以指示有文件从平板电脑跨设备拖拽至PC的手机协同窗口。第五标志位可以看作是PC屏幕协同记录的屏幕协同与超级键鼠拖拽并发的总标志位。
S806.PC的屏幕协同服务确定第五标志位是否为true。
S807.若确定第五标志位为true,PC的屏幕协同服务向PC的超级键鼠服务发送拖拽图片进入协同窗口的通知消息。
PC的屏幕协同服务向PC的超级键鼠服务发送拖拽图片进入协同窗口的通知消息之前,可再次确认第五标志位是否为true,其目的是检查当前是否是协同键鼠拖拽的场景。
S808.PC的超级键鼠服务修改第六标志位为true。
第六标志位的初始值可以为false。
修改后的第六标志位可记为superIODragInMirrorStatus_=true,以指示有文件从平板电脑跨设备拖拽至PC的手机协同窗口。
S809a.检测到在协同窗口释放图片时,PC的超级键鼠服务向PC的屏幕协同服务发送释放图片的通知消息。
S809b.检测到在协同窗口释放图片时,PC的超级键鼠服务向平板电脑的超级键鼠服务发送释放图片的通知消息。
示例性的,如图7所示,用户在窗口101释放跨设备拖拽的图片5时,PC的超级键鼠服务向PC的屏幕协同服务发送释放图片的通知消息,以及向平板电脑的超级键鼠服务发送释放图片的通知消息。
本实施例对S809a和S809b的执行顺序不作限定,可以同时执行或顺序执行。
在S809a之后,可执行:
S810.PC的屏幕协同服务修改第四标志位为false。
PC的屏幕协同服务接收到PC的超级键鼠服务发送的释放图片的通知消息后,将第四标志位由true修改为fasle,修改后的第四标志位可记为superIODragFileFlag_=fasle,以指示PC超级键鼠当前没有跨设备拖拽文件。
在S809a之后,可执行:
S811.平板电脑的超级键鼠服务向PC的超级键鼠服务传输图片。
S812.PC的超级键鼠服务将图片存储至目标路径。
S813.PC的超级键鼠服务确定第六标志位是否为true。
S814.若确定第六标志位为true,PC的超级键鼠服务向PC的屏幕协同服务发送图片传输完成消息。
S815.PC的屏幕协同服务从目标路径获取图片。
PC的超级键鼠服务将图片存储至目标路径后,可通过确定第六标志位是否为true,以获知是否为键鼠协同拖拽场景,若第六标志位为true,PC的超级键鼠服务确定当前为键鼠协同拖拽场景,从而向PC的屏幕协同服务发送图片传输完成消息,以便PC的屏幕协同服务到目标路径下获取图片。
S816.PC的屏幕协同服务向手机的屏幕协同服务传输图片。
S817.手机的屏幕协同服务将图片传输至手机的显示驱动,以在手机屏幕上显示拖拽的图片。
示例性的,如图7所示,在窗口101释放图片5后,在手机200的屏幕上显示图片5。
在S816之后,可执行:
S818.图片传输至手机后,PC的屏幕协同服务向PC的超级键鼠服务发送图片传输完成消息。
S819.PC的超级键鼠服务修改第六标志位为false。
修改后的第六标志位可记为superIODragInMirrorStatus_=false,以指示当前没有文件从平板电脑跨设备拖拽进入PC的手机协同窗口。
在S816之后,可执行:
S820.图片传输至手机后,PC的屏幕协同服务修改第五标志位为false。
修改后的第五标志位可记为superIODragFileToMirror_=fasle,以指示当前没有文件从平板电脑跨设备拖拽至PC的手机协同窗口。
S821.PC的屏幕协同服务将图片传输至PC的显示驱动,以在协同窗口显示拖拽的图片。
示例性的,如图7所示,在窗口101释放图片5后,在窗口101中显示图片5。
在一些实施例中,S805之后,检测到拖拽图片进入PC屏幕的协同窗口后没有释放文件,又拖拽图片返回到PC屏幕桌面时,PC的超级键鼠服务会触发超级键鼠的拖拽释放(DragLeave)事件,将第五标志位由true修改为false。
本实施例示出的文件共享方法,通过手机的屏幕协同服务、PC的屏幕协同服务、PC的超级键鼠服务以及平板电脑的超级键鼠服务的信息交互,实现将平板电脑中用户选中并跨设备拖拽的文件通过PC传输至手机,并在手机屏幕和PC屏幕的手机协同窗口上显示该文件。上述方案能够快捷高效的实现屏幕协同场景下的跨设备文件共享,提高用户操作的简便性。
在一些实施例中,PC的超级键鼠服务启动后,在PC主屏幕的右下角创建虚拟窗口,如图5中的窗口103,虚拟窗口用于检测PC主屏幕上的跨设备拖拽事件。示例性的,参照图5,当PC扩展屏幕位于平板电脑主屏幕,手机协同窗口位于PC主屏幕时,从PC的手机协同窗口拖拽图片至PC主屏幕左侧边缘时,窗口103可检测到PC主屏幕上的跨设备拖拽事件,即可触发图6中S606a和S606b。
然而,当PC扩展屏幕位于平板电脑主屏幕,手机协同窗口位于PC扩展屏幕时,参照图2,由于虚拟窗口位于PC主屏幕的右下角,从PC扩展屏幕的手机协同窗口拖拽图片至PC扩展屏幕边缘时,由于虚拟窗口位于PC主屏幕的右下角,因此虚拟窗口无法检测到PC扩展屏幕上的超级键鼠的跨设备拖拽事件,导致该场景下无法进行跨设备文件传输。
针对上述问题,本申请实施例提出一种文件共享方法,可通过检测手机协同窗口的位置,根据手机协同窗口的位置创建虚拟窗口。若手机协同窗口位于PC主屏幕,PC的超级键鼠服务在PC主屏幕的右下角创建虚拟窗口。或者,若手机协同窗口位于PC扩展屏幕,PC的超级键鼠服务在PC扩展屏幕的右下角创建虚拟窗口。也即是说,虚拟窗口位于手机协同窗口所在的屏幕右下角,这样无论手机协同窗口在PC主屏幕还是PC扩展屏幕上,从手机协同窗口拖拽文件到PC主屏幕或者PC扩展屏幕边缘时,虚拟窗口均可触发PC超级键鼠的跨设备拖拽事件,从而实现跨设备文件传输。
下面结合附图9和图10对本申请提供的文件共享方法进行详细说明。
图9为本申请实施例提供的文件共享方法的场景示意图三。如图9所示,平板电脑300主屏幕上显示有PC 100的扩展屏幕304,扩展屏幕304上显示有手机200的协同窗口305,窗口305和手机200屏幕上同步显示手机200相册应用的界面,该界面显示有多个图片,如图片1和图片2。用户可使用无线鼠标穿越至平板电脑300的屏幕,选中窗口305中的图片1,拖拽图片1至平板电脑300主屏幕上除扩展屏幕304外的屏幕空间306后释放,手机200通过PC 100将手机200相册应用中的图片1传输至平板电脑300,在平板电脑300的屏幕空间306显示图片1。
在扩展屏幕304上拖拽图片的过程中,某一时刻,如图9中307所示,扩展屏幕304上呈现光标,在光标下方呈现图片缩略图。在屏幕空间306上拖拽图片的过程中,某一时刻,如图9中308所示,屏幕空间306上呈现光标,光标下方呈现图片缩略图,图片缩略图的左上角可显示加号,以指示有图片导入平板电脑。图9仅作为一种示例,对于不同屏幕上拖拽图片的样式,本申请实施例不作限定。
基于图9所示的场景,下面结合附图10对设备间的交互过程进行详细说明。
图10为本申请实施例提供的文件共享方法的流程示意图三。图10所示的文件共享方法涉及手机的屏幕协同服务,PC的屏幕协同服务和超级键鼠服务,平板电脑的超级键鼠服务。
图10中,手机与PC已建立屏幕协同,PC与平板电脑已建立超级键鼠,PC与平板电脑已建立随航。如图10所示,该方法包括:
S1001.检测到选中并拖拽协同窗口中的图片时,PC的屏幕协同服务向PC的超级键鼠服务发送屏幕协同的拖入事件。
S1002.PC的超级键鼠服务检测协同窗口的位置。
S1003.协同窗口位于PC扩展屏幕时,PC的超级键鼠在PC扩展屏幕的右下角创建虚拟窗口。
虚拟窗口可以看作是PC的超级键鼠服务的一个子进程,如图9中的窗口309,用于检测PC扩展屏幕上的超级键鼠的拖入事件,PC扩展屏幕上的超级键鼠的拖入事件是在PC扩展屏幕上的手机协同窗口的拖入事件之后触发的。
S1004.PC的超级键鼠服务修改第一标志位为true。
S1005.检测到拖拽图片到PC扩展屏幕边缘时,PC的超级键鼠服务确定第一标志位是否为ture。
在S1005之后,执行S1006至S1009。本实施例的S1006至S1009与前述实施例的S604至S607类似,具体可参照前述实施例,此处不再展开。
在S1008b之后,可执行:
S1010.检测到拖拽释放操作时,平板电脑的超级键鼠服务确定是否释放在扩展屏幕外的屏幕有效区域。
S1011.若确定释放在扩展屏幕外的屏幕有效区域,平板电脑的超级键鼠服务向PC的超级键鼠服务发送释放到扩展屏幕外的屏幕有效区域的通知消息。
S1012.PC的超级键鼠服务确定第二标志位是否为true。
S1013.若确定第二标志位为true,PC的超级键鼠服务向PC的屏幕协同服务发送释放到扩展屏幕外的屏幕有效区域的通知消息。
S1014.若确定第二标志位为true,PC的超级键鼠服务修改第一标志位为false。
在S1013之后,可执行:
S1015至S1025。本实施例的S1015至S1025与前述实施例的S613至S6023类似,具体可参照前述实施例,此处不再展开。
本实施例示出的文件共享方法,通过将虚拟窗口创建在手机协同窗口所在的屏幕,即PC扩展屏幕的右下角,使得PC超级键鼠能够检测到PC扩展屏幕上的超级键鼠的跨设备拖拽事件,从而实现将PC扩展屏幕上手机协同窗口中的文件通过PC传输至平板电脑,并在平板电脑主屏幕上显示。上述方案能够快捷高效的实现屏幕协同场景下的跨设备文件共享,提高用户操作的简便性。
基于前述几个实施例,本申请实施例提出一种文件共享方法,应用于包括第一电子设备、第二电子设备和第三电子设备的系统,第一电子设备分别与第二电子设备和第三电子设备连接,该方法包括:第一电子设备显示第一窗口,第一窗口显示第二电子设备的屏幕内容,第二电子设备的屏幕内容包括第一文件;当第一文件从第一窗口被拖拽至第三电子设备的屏幕有效区域时,响应于对第一文件的拖拽释放操作,第三电子设备显示第一文件。
第一电子设备与第二电子设备有线或无线连接,第一电子设备与第三电子设备有线或无线连接。第一电子设备显示的第一窗口为第二电子设备的协同窗口,第一窗口显示的内容可以与第二电子设备显示屏显示的内容一致。当第一窗口显示的内容与第二电子设备显示屏显示的内容一致时,第一窗口可以看作是第二电子设备在第一电子设备的镜像窗。一种示例中,第一窗口显示第一文件,第二电子设备显示屏显示第一文件。第一文件为第二电子设备的本地存储的文件,例如第一文件可以是图片、视频、文本、音频、应用等。
示例性的,参照图5,第一电子设备为个人计算机PC 100,第二电子设备为手机200,第三电子设备为平板电脑300。PC 100与手机200有线或无线连接,PC 100和平板电脑300有线或无线连接。第一窗口为窗口101,第一窗口显示的第一文件为图片1。第三电子设备的屏幕有效区域为平板电脑300显示屏上的区域301。用户可使用无线鼠标拖拽图片1穿越PC 100屏幕边缘,至平板电脑300的区域301后释放图片1,图片1显示于区域301。
上述方法中,第二电子设备投屏到第一电子设备的内容显示在第一电子设备的第一窗口中,用户跨设备拖拽第一窗口中的第一文件至第三电子设备,实现将第二电子设备本地 存储的第一文件,通过第一电子设备拖拽至第三电子设备显示,操作过程简便,能够快速高效的实现屏幕协同场景下的跨设备文件共享。
一个可选实施例中,第三电子设备显示第一文件之前,该方法还包括:第二电子设备向第一电子设备传输第一文件;第一电子设备向第三电子设备传输第一文件。
上述方法中,第二电子设备通过第一电子设备向第三电子设备传输用户拖拽的第一文件,实现屏幕协同场景下的跨设备文件传输。
一个可选实施例中,第二电子设备向第一电子设备传输第一文件之前,该方法还包括:响应于对第一文件的拖拽释放操作,第三电子设备确定第一文件的释放位置是否在第三电子设备的屏幕有效区域内;若是,第三电子设备向第一电子设备发送第一通知消息,第一通知消息用于指示第一文件释放到第三电子设备的屏幕有效区域;第一电子设备向第二电子设备发送文件传输请求,文件传输请求用于请求传输第一文件。
示例性的,继续参照图5,对第一文件的拖拽释放操作为对图片1在平板电脑300显示屏上的拖拽释放操作。第三电子设备的屏幕有效区域为平板电脑300显示屏上的区域301。应理解,若拖拽图片1至区域301之外,由于不是平板电脑300的屏幕有效区域,本次跨设备拖拽失败,平板电脑300不会接收到图片1并显示。第三电子设备向第一电子设备发送的第一通知消息可对应图6中S609的通知消息。第一电子设备向第二电子设备发送的文件传输请求可对应图6中S613的文件传输请求。
上述方法中,在第一电子设备接收到第三电子设备发送的文件释放到屏幕有效区域的通知后,第一电子设备向第二电子设备获取被拖拽的第一文件,进而将第一文件传输至第三电子设备进行显示,实现屏幕协同场景下的跨设备文件共享。应理解,若第一电子设备接收到第三电子设备发送的文件未释放到屏幕有效区域的通知,第一电子设备不会向第二电子设备获取第一文件,第三电子设备不会接收到第一文件并显示。
一个可选实施例中,该方法还包括:当第一文件从第一窗口被拖拽至第一电子设备的屏幕边缘时,第一电子设备向第三电子设备发送第一跨设备拖拽事件,第一跨设备拖拽事件用于指示有文件从第一电子设备拖拽至第三电子设备。
示例性的,继续参照图5,当图片1从PC 100的窗口101被拖拽至PC 100的左侧屏幕边缘时,PC 100向平板电脑300发送第一跨设备拖拽事件,以指示有图片从PC 100拖拽至平板电脑300,第一跨设备拖拽事件可对应图6中S606b的超级键鼠的拖入事件。
上述方法中,当第一文件被拖拽至第一电子设备的主屏幕的屏幕边缘时,第一电子设备通过发送第一跨设备拖拽事件,告知第三电子设备有文件跨设备拖入,以便第三电子设备开始监测被拖拽的第一文件。
一个可选实施例中,该方法还包括:第三电子设备显示第二文件,第二文件为第三电子设备本地存储的文件;当第二文件从第三电子设备的屏幕被拖拽至第一窗口时,响应于对第二文件的拖拽释放操作,第一窗口和第二电子设备显示第二文件。
第二文件可以是图片、视频、文本、音频、应用等。示例性的,参照图7,第二文件为图片5,平板电脑300的显示屏上显示有图片5。用户可使用无线鼠标拖拽图片5穿越平板电脑300屏幕边缘,至PC 100的窗口101后释放图片5,图片5显示于窗口101,且图片5显示于手机200的显示屏上。
上述方法中,第二电子设备投屏到第一电子设备的内容显示在第一电子设备的第一窗 口中,用户跨设备拖拽第三电子设备中的第三文件至第一窗口,即可将第三电子设备本地存储的第二文件,通过第一电子设备拖拽至第二电子设备显示,第一窗口可同步显示第二文件,操作过程简便,能够快速高效的实现屏幕协同场景下的跨设备文件共享。
一个可选实施例中,第一窗口和第二电子设备显示第二文件之前,该方法还包括:第三电子设备向第一电子设备传输第二文件;第一电子设备向第二电子设备传输第二文件。
上述方法中,第三电子设备通过第一电子设备向第二电子设备传输用户拖拽的第二文件,实现屏幕协同场景下的跨设备文件传输。
一个可选实施例中,第三电子设备向第一电子设备传输第二文件,包括:响应于对第二文件的拖拽释放操作,第一电子设备向第三电子设备发送第二通知消息,第二通知消息用于指示第二文件释放到第一窗口;第三电子设备向第一电子设备传输第二文件。
示例性的,继续参照图7,对第二文件的拖拽释放操作为对图片5在PC 100的窗口101的拖拽释放操作。第一电子设备向第三电子设备发送的第二通知消息可对应图8中S809b的通知消息。第三电子设备向第一电子设备传输第二文件可对应图8中S811。
上述方法中,在第三电子设备接收到第一电子设备发送的文件释放到第一窗口的通知后,第三电子设备向第一电子设备传输第二文件,以便第一电子设备将第二文件传输给第二电子设备进行显示,实现屏幕协同场景下的跨设备文件共享。
一个可选实施例中,该方法还包括:当第二文件被拖拽至第三电子设备的屏幕边缘时,第三电子设备向第一电子设备发送第二跨设备拖拽事件,第二跨设备拖拽事件用于指示有文件从第三电子设备拖拽至第一电子设备。
示例性的,继续参照图7,当图片5从平板电脑300被拖拽至其右侧屏幕边缘时,平板电脑300向PC 100发送第二跨设备拖拽事件,以指示有图片从平板电脑300拖拽至PC 100,第二跨设备拖拽事件可对应图8中S801的超级键鼠的拖入事件。
上述方法中,当第二文件被拖拽至第三电子设备的屏幕边缘时,第三电子设备通过发送第二跨设备拖拽事件,告知第一电子设备有文件跨设备拖入,以便第一电子设备开始监测被拖拽的第二文件。
一个可选实施例中,该方法还包括:第一电子设备的超级键鼠服务启动后,第一电子设备的超级键鼠服务创建第一虚拟窗口;第一虚拟窗口用于检测第一电子设备主屏幕上的跨设备拖拽事件。
第一虚拟窗口位于第一电子设备主屏幕的右下角,可触发第一电子设备的主屏幕上的跨设备拖拽事件。示例性的,参照图5,第一电子设备为PC 100,第一虚拟窗口为PC 100主屏幕右下角的窗口103。第一虚拟窗口可用于检测前述的第一跨设备拖拽事件、以及前述的第二跨设备拖拽事件。
第二方面,本申请实施例提供一种文件共享方法,应用于包括第一电子设备、第二电子设备和第三电子设备的系统,第一电子设备分别与第二电子设备和第三电子设备连接,方法包括:第三电子设备显示第一电子设备的扩展屏幕,扩展屏幕占据第三电子设备的部分屏幕空间,扩展屏幕显示有第二窗口,第二窗口显示第二电子设备的屏幕内容,第二电子设备的屏幕内容包括第三文件;当第三文件从第二窗口被拖拽至第三电子设备的除扩展屏幕外的第一屏幕空间时,响应于对第三文件的拖拽释放操作,第三电子设备的第一屏幕空间显示第三文件。
第一电子设备与第二电子设备有线或无线连接,第一电子设备与第三电子设备有线或无线连接。第二窗口为第二电子设备的协同窗口,第二窗口显示的内容可以与第二电子设备显示屏显示的内容一致。当第二窗口显示的内容与第二电子设备显示屏显示的内容一致时,第二窗口可以看作是第二电子设备在第一电子设备上的镜像窗。一种示例中,第二窗口显示第三文件,第二电子设备显示屏显示第三文件。第三文件为第二电子设备的本地存储的文件,例如第三文件可以是图片、视频、文本、音频、应用等。
示例性的,参照图9,第一电子设备为个人计算机PC 100,第二电子设备为手机200,第三电子设备为平板电脑300。PC 100与手机200有线或无线连接,PC 100和平板电脑300有线或无线连接。第一电子设备的扩展屏幕为PC 100投屏到平板电脑300的扩展屏幕304,扩展屏幕304占据平板电脑300显示屏的部分屏幕空间。第二窗口为扩展屏幕304上的窗口305,第二窗口显示的第三文件为图片1。第三电子设备的第一屏幕空间为平板电脑300的除扩展屏幕304外的屏幕空间306。用户可使用无线鼠标将图片1从平板电脑300的窗口305拖拽至屏幕空间306后释放,图片1显示于屏幕空间306。
上述方法中,第一电子设备将其扩展屏幕投屏到第三电子设备的显示屏上,第一电子设备的扩展屏幕上显示有第二电子设备的第二窗口,用户拖拽第二窗口中的第三文件至第三电子设备的第一屏幕空间,实现将第二电子设备本地存储的第三文件,拖拽至第三电子设备进行显示,操作过程简便,能够快速高效的实现屏幕协同场景下的跨设备文件共享。
一个可选实施例中,第三电子设备的第一屏幕空间显示第三文件之前,方法还包括:第二电子设备向第一电子设备传输第三文件;第一电子设备向第三电子设备传输第三文件。
上述方法中,第二电子设备通过第一电子设备向第三电子设备传输用户拖拽的第三文件,实现屏幕协同场景下的跨设备文件传输。
一个可选实施例中,当第三文件从第二窗口被拖拽至第一电子设备的扩展屏幕的屏幕边缘时,第一电子设备向第三电子设备发送第三跨设备拖拽事件,第三跨设备拖拽事件用于指示有文件从第一电子设备的扩展屏幕拖拽至第三电子设备。
示例性的,继续参照图9,当图片1从窗口305被拖拽至PC 100的扩展屏幕304的屏幕边缘时,PC 100向平板电脑300发送第三跨设备拖拽事件,以指示有图片从PC 100扩展屏幕304拖拽至平板电脑300,第三跨设备拖拽事件可对应图10中S1008b的超级键鼠的拖入事件。
上述方法中,当第三文件被拖拽至第一电子设备的扩展屏幕的屏幕边缘时,第一电子设备通过发送第三跨设备拖拽事件,告知第三电子设备有文件跨设备拖入,以便第三电子设备开始监测被拖拽的第三文件。
一个可选实施例中,该方法还包括:当第二窗口中的第三文件被选中并被拖拽时,第一电子设备的超级键鼠服务创建第二虚拟窗口;第二虚拟窗口用于检测第一电子设备扩展屏幕上的跨设备拖拽事件。
第二虚拟窗口位于第一电子设备扩展屏幕的右下角,可触发第一电子设备的扩展屏幕上的跨设备拖拽事件,示例性的,参照图9,第一电子设备为PC 100,第二虚拟窗口为PC 100扩展屏幕304右下角的窗口309。第二虚拟窗口可用于检测前述的第三跨设备拖拽事件。
一个可选实施例中,第一电子设备安装有第一操作系统,第二电子设备和第三电子设 备安装有第二操作系统,第一操作系统和第二操作系统不同。
示例性的,第一操作系统为windows操作系统,第二操作系统为安卓操作系统。
需要说明的是,本申请实施例并未特别限定一种文件共享方法的执行主体的具体结构,只要可以通过运行存储有本申请实施例的一种文件共享方法的代码,以根据本申请实施例提供的一种文件共享方法进行处理即可。例如,本申请实施例提供的一种文件共享方法的执行主体可以是电子设备中能够调用程序并执行程序的功能模块,或者为应用于电子设备中的处理装置,例如,该处理装置为芯片。
上述实施例中,模块/服务可以是实现上述功能的软件程序、硬件电路或二者结合。硬件电路可能包括应用特有集成电路(application specific integrated circuit,ASIC)、电子电路、用于执行一个或多个软件或固件程序的处理器(例如共享处理器、专有处理器或组处理器等)和存储器、合并逻辑电路和/或其他支持所描述的功能的合适组件。
因此,在本申请实施例中描述的各示例的模块/服务,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件形式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请实施例还提供一种电子设备,该电子设备可对应前述实施例的第一电子设备,第一电子设备,包括:存储器和处理器,处理器用于调用存储器中的计算机程序,以执行如前述任一方法实施例中PC的技术方案,其实现原理和技术效果与前述相关实施例类似,此处不再赘述。
本申请实施例还提供一种电子设备,该电子设备可对应前述实施例的第二电子设备,第二电子设备,包括:存储器和处理器,处理器用于调用存储器中的计算机程序,以执行如前述任一方法实施例中手机的技术方案,其实现原理和技术效果与前述相关实施例类似,此处不再赘述。
本申请实施例还提供一种电子设备,该电子设备可对应前述实施例的第三电子设备,第三电子设备,包括:存储器和处理器,处理器用于调用存储器中的计算机程序,以执行如前述任一方法实施例中平板电脑的技术方案,其实现原理和技术效果与前述相关实施例类似,此处不再赘述。
存储器可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过通信线路与处理器相连接。存储器也可以和处理器集成在一起。
处理器可以是通用中央处理器(central processing unit,CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。
本申请实施例提供一种计算机可读存储介质,其上存储有计算机程序,当计算机程序 在第一电子设备上运行时,使得第一电子设备执行前述任一方法实施例中PC的技术方案,其实现原理和技术效果与前述相关实施例类似,此处不再赘述。
本申请实施例提供一种计算机可读存储介质,其上存储有计算机程序,当计算机程序在第二电子设备上运行时,使得第二电子设备执行前述任一方法实施例中手机的技术方案,其实现原理和技术效果与前述相关实施例类似,此处不再赘述。
本申请实施例提供一种计算机可读存储介质,其上存储有计算机程序,当计算机程序在第三电子设备上运行时,使得第三电子设备执行前述任一方法实施例中平板电脑的技术方案,其实现原理和技术效果与前述相关实施例类似,此处不再赘述。
本申请实施例提供一种芯片,芯片包括处理器,处理器用于调用存储器中的计算机程序,以执行前述任一方法实施例中PC的技术方案,其实现原理和技术效果与上述相关实施例类似,此处不再赘述。
本申请实施例提供一种芯片,芯片包括处理器,处理器用于调用存储器中的计算机程序,以执行前述任一方法实施例中手机的技术方案,其实现原理和技术效果与前述相关实施例类似,此处不再赘述。
本申请实施例提供一种芯片,芯片包括处理器,处理器用于调用存储器中的计算机程序,以执行前述任一方法实施例中平板电脑的技术方案,其实现原理和技术效果与前述相关实施例类似,此处不再赘述。
本申请实施例提供一种计算机程序产品,当所述计算机程序产品在第一电子设备运行时,使得所述第一电子设备执行前述任一方法实施例中PC的技术方案,其实现原理和技术效果与前述相关实施例类似,此处不再赘述。
本申请实施例提供一种计算机程序产品,当所述计算机程序产品在第二电子设备运行时,使得所述第二电子设备执行前述任一方法实施例中手机的技术方案,其实现原理和技术效果与前述相关实施例类似,此处不再赘述。
本申请实施例提供一种计算机程序产品,当所述计算机程序产品在第三电子设备运行时,使得所述第三电子设备执行前述任一方法实施例中平板电脑的技术方案,其实现原理和技术效果与前述相关实施例类似,此处不再赘述。
本申请实施例提供一种跨设备拖拽系统,参照图1或图2,该系统包括:第一电子设备100、第二电子设备200和第三电子设备300,第一电子设备100分别与第二电子设备200和第三电子设备300连接;第一电子设备100执行如前述任一方法实施例中PC的技术方案,第二电子设备200执行如前述任一方法实施例中手机的技术方案,第三电子设备300执行如前述任一方法实施例中平板电脑的方案,其实现原理和技术效果与前述相关实施例类似,此处不再赘述。
以上的具体实施方式,对本申请的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上仅为本申请的具体实施方式而已,并不用于限定本申请的保护范围,凡在本申请的技术方案的基础之上,所做的任何修改、等同替换、改进等,均应包括在本申请的保护范围之内。

Claims (17)

  1. 一种文件共享方法,其特征在于,应用于包括第一电子设备、第二电子设备和第三电子设备的系统,所述第一电子设备分别与第二电子设备和第三电子设备连接,所述方法包括:
    所述第一电子设备显示第一窗口,所述第一窗口显示所述第二电子设备的屏幕内容,所述第二电子设备的屏幕内容包括第一文件;
    当所述第一文件从所述第一窗口被拖拽至所述第三电子设备的屏幕有效区域时,响应于对所述第一文件的拖拽释放操作,所述第三电子设备显示所述第一文件。
  2. 根据权利要求1所述的方法,其特征在于,所述第三电子设备显示所述第一文件之前,所述方法还包括:
    所述第二电子设备向所述第一电子设备传输所述第一文件;
    所述第一电子设备向所述第三电子设备传输所述第一文件。
  3. 根据权利要求2所述的方法,其特征在于,所述第二电子设备向所述第一电子设备传输所述第一文件之前,所述方法还包括:
    响应于对所述第一文件的拖拽释放操作,所述第三电子设备确定所述第一文件的释放位置是否在所述第三电子设备的屏幕有效区域内;
    若是,所述第三电子设备向所述第一电子设备发送第一通知消息,所述第一通知消息用于指示所述第一文件释放到所述第三电子设备的屏幕有效区域;
    所述第一电子设备向所述第二电子设备发送文件传输请求,所述文件传输请求用于请求传输所述第一文件。
  4. 根据权利要求1至3所述的方法,其特征在于,所述方法还包括:
    当所述第一文件从所述第一窗口被拖拽至所述第一电子设备的屏幕边缘时,所述第一电子设备向所述第三电子设备发送第一跨设备拖拽事件,所述第一跨设备拖拽事件用于指示有文件从所述第一电子设备拖拽至所述第三电子设备。
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述方法还包括:
    所述第三电子设备显示第二文件,所述第二文件为所述第三电子设备本地存储的文件;
    当所述第二文件从所述第三电子设备的屏幕被拖拽至所述第一窗口时,响应于对所述第二文件的拖拽释放操作,所述第一窗口和所述第二电子设备显示所述第二文件。
  6. 根据权利要求5所述的方法,其特征在于,所述第一窗口和所述第二电子设备显示所述第二文件之前,所述方法还包括:
    所述第三电子设备向所述第一电子设备传输所述第二文件;
    所述第一电子设备向所述第二电子设备传输所述第二文件。
  7. 根据权利要求6所述的方法,其特征在于,所述第三电子设备向所述第一电子设备传输所述第二文件,包括:
    响应于对所述第二文件的拖拽释放操作,所述第一电子设备向所述第三电子设备发送第二通知消息,所述第二通知消息用于指示所述第二文件释放到所述第一窗口;
    所述第三电子设备向所述第一电子设备传输所述第二文件。
  8. 根据权利要求5至7任一项所述的方法,其特征在于,所述方法还包括:
    当所述第二文件被拖拽至所述第三电子设备的屏幕边缘时,所述第三电子设备向所述第一电子设备发送第二跨设备拖拽事件,所述第二跨设备拖拽事件用于指示有文件从所述第三电子设备拖拽至所述第一电子设备。
  9. 根据权利要求1至8任一项所述的方法,其特征在于,所述方法还包括:
    所述第一电子设备的超级键鼠服务启动后,所述第一电子设备的超级键鼠服务创建第一虚拟窗口;
    所述第一虚拟窗口用于检测所述第一电子设备主屏幕上的跨设备拖拽事件。
  10. 一种文件共享方法,其特征在于,应用于包括第一电子设备、第二电子设备和第三电子设备的系统,所述第一电子设备分别与第二电子设备和第三电子设备连接,所述方法包括:
    所述第三电子设备显示所述第一电子设备的扩展屏幕,所述扩展屏幕占据所述第三电子设备的部分屏幕空间,所述扩展屏幕显示有第二窗口,所述第二窗口显示所述第二电子设备的屏幕内容,所述第二电子设备的屏幕内容包括第三文件;
    当所述第三文件从所述第二窗口被拖拽至所述第三电子设备的除所述扩展屏幕外的第一屏幕空间时,响应于对所述第三文件的拖拽释放操作,所述第三电子设备的所述第一屏幕空间显示所述第三文件。
  11. 根据权利要求10所述的方法,其特征在于,所述第三电子设备的所述第一屏幕空间显示所述第三文件之前,所述方法还包括:
    所述第二电子设备向所述第一电子设备传输所述第三文件;
    所述第一电子设备向所述第三电子设备传输所述第三文件。
  12. 根据权利要求10或11所述的方法,其特征在于,当所述第三文件从所述第二窗口被拖拽至所述第一电子设备的扩展屏幕的屏幕边缘时,所述第一电子设备向所述第三电子设备发送第三跨设备拖拽事件,所述第三跨设备拖拽事件用于指示有文件从所述第一电子设备的扩展屏幕拖拽至所述第三电子设备。
  13. 根据权利要求10至12任一项所述的方法,其特征在于,所述方法还包括:
    当所述第二窗口中的所述第三文件被选中并被拖拽时,所述第一电子设备的超级键鼠服务创建第二虚拟窗口;
    所述第二虚拟窗口用于检测所述第一电子设备扩展屏幕上的跨设备拖拽事件。
  14. 根据权利要求1至13任一项所述的方法,其特征在于,
    所述第一电子设备安装有第一操作系统,所述第二电子设备和所述第三电子设备安装有第二操作系统,所述第一操作系统和所述第二操作系统不同。
  15. 一种电子设备,其特征在于,所述电子设备包括:存储器和处理器,所述处理器用于调用所述存储器中的计算机程序,以执行如权利要求1至14任一项所述的第一电子设备的方法,或者,执行如权利要求1至14任一项所述的第二电子设备的方法,或者,执行如权利要求1至14任一项所述的第三电子设备的方法。
  16. 一种芯片,其特征在于,所述芯片包括处理器,所述处理器用于调用存储器中的计算机程序,使得所述芯片执行如权利要求1至14任一项所述的第一电子设备的方法,或者,执行如权利要求1至14任一项所述的第二电子设备的方法,或者,执行如权利要求1至14任一项所述的第三电子设备的方法。
  17. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,当所述计算机程序在电子设备上运行时,使得所述电子设备执行如权利要求1至14任一项所述的第一电子设备的方法,或者,执行如权利要求1至14任一项所述的第二电子设备的方法,或者,执行如权利要求1至14任一项所述的第三电子设备的方法。
PCT/CN2024/110746 2023-12-14 2024-08-08 文件共享方法、设备及存储介质 Pending WO2025123722A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202480011215.5A CN120660084A (zh) 2023-12-14 2024-08-08 文件共享方法、设备及存储介质

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202311730631.4 2023-12-14
CN202311730631.4A CN120196603A (zh) 2023-12-14 2023-12-14 文件共享方法、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2025123722A1 true WO2025123722A1 (zh) 2025-06-19

Family

ID=96056397

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/110746 Pending WO2025123722A1 (zh) 2023-12-14 2024-08-08 文件共享方法、设备及存储介质

Country Status (2)

Country Link
CN (2) CN120196603A (zh)
WO (1) WO2025123722A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060038741A1 (en) * 2004-08-23 2006-02-23 International Business Machines Corporation System and method for implementing a multi-monitor interface for a data processing system
CN107329927A (zh) * 2016-04-28 2017-11-07 富泰华工业(深圳)有限公司 一种数据共享系统及方法
CN113157231A (zh) * 2019-09-18 2021-07-23 华为技术有限公司 一种数据传输的方法及相关设备
CN114356195A (zh) * 2020-09-28 2022-04-15 华为技术有限公司 一种文件传输的方法及相关设备
CN115268807A (zh) * 2021-04-30 2022-11-01 华为技术有限公司 一种跨设备内容分享方法及电子设备
CN115421846A (zh) * 2022-09-30 2022-12-02 维沃移动通信有限公司 跨设备控制方法、控制装置、电子设备和可读存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060038741A1 (en) * 2004-08-23 2006-02-23 International Business Machines Corporation System and method for implementing a multi-monitor interface for a data processing system
CN107329927A (zh) * 2016-04-28 2017-11-07 富泰华工业(深圳)有限公司 一种数据共享系统及方法
CN113157231A (zh) * 2019-09-18 2021-07-23 华为技术有限公司 一种数据传输的方法及相关设备
CN114356195A (zh) * 2020-09-28 2022-04-15 华为技术有限公司 一种文件传输的方法及相关设备
CN115268807A (zh) * 2021-04-30 2022-11-01 华为技术有限公司 一种跨设备内容分享方法及电子设备
CN115421846A (zh) * 2022-09-30 2022-12-02 维沃移动通信有限公司 跨设备控制方法、控制装置、电子设备和可读存储介质

Also Published As

Publication number Publication date
CN120196603A (zh) 2025-06-24
CN120660084A (zh) 2025-09-16

Similar Documents

Publication Publication Date Title
CN109782976B (zh) 文件处理方法、装置、终端及存储介质
US11159922B2 (en) Layers in messaging applications
CN110750197B (zh) 文件共享方法、装置、系统、相应设备及存储介质
US11868605B2 (en) Application bar display method and electronic device
US12474885B2 (en) Projected interfaces of electronic devices
US7624192B2 (en) Framework for user interaction with multiple network devices
US10983747B2 (en) Remote desktop mirroring
CN108886672B (zh) 消息扩展应用程序商店
US10386992B2 (en) Display device for executing a plurality of applications and method for controlling the same
US10852912B2 (en) Image creation app in messaging app
US20190324603A1 (en) Display device for executing a plurality of applications and method for controlling the same
CN111049935B (zh) 远程控制电子设备的系统及其电子设备
US20210216337A1 (en) Multi-process model for cross-platform applications
CN114237464B (zh) 一种数据共享方法及电子设备
MX2013003427A (es) Redireccion de ambiente cruzado.
US20240184506A1 (en) Cross-device content sharing method and electronic device
MX2013003515A (es) Presentacion remota instantanea.
KR20150130800A (ko) 데이터 공유 기능을 지원하는 사용자 단말 장치와 그 방법
US20150180998A1 (en) User terminal apparatus and control method thereof
WO2021008295A1 (zh) 小程序的制作方法、装置、终端及存储介质
WO2024037555A1 (zh) 页面显示方法、装置、设备及存储介质
WO2024193301A1 (zh) 一种多屏协同控制方法、电子设备及系统
WO2022242281A1 (zh) 文件保存方法、装置、电子设备以及存储介质
CN111324398A (zh) 最近内容的处理方法、装置、终端及存储介质
WO2023179183A1 (zh) 子程序同步处理

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 24902148

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 202480011215.5

Country of ref document: CN

WWP Wipo information: published in national office

Ref document number: 202480011215.5

Country of ref document: CN