Methods and devices for opening files

The method simplifies file opening in multi-screen collaboration by detecting user operations to open files on the intended device within the collaboration, reducing steps and conserving power, addressing the complexity of current multi-device file access.

JP7741160B2Active Publication Date: 2025-09-17HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2023501315
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-07-07
Filing Date
2021-06-30
Publication Date
2025-09-17
Estimated Expiration
2041-06-30

AI Technical Summary

Technical Problem

In multi-screen collaboration scenarios, users face complications in opening files on the desired device without exiting the collaboration mode, as current methods require multiple steps and do not allow for seamless file opening on the device where the user intends to view the content.

Method used

A method and device that enable a first device to detect user operations on either its display or a second device's display, allowing the file to be opened locally on the first device if the operation is detected on the first device, and sending metadata to the second device for opening on the second device if the operation is detected on the second device, with optional user prompts for device selection.

Benefits of technology

Simplifies the file opening procedure, reduces device response times, and conserves power by allowing files to be opened on the device where the user intends to view them without exiting the multi-screen collaboration mode, enhancing user convenience and reducing unnecessary operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007741160000001
    Figure 0007741160000001
  • Figure 0007741160000002
    Figure 0007741160000002
  • Figure 0007741160000003
    Figure 0007741160000003
Patent Text Reader

Abstract

The present application relates to a method and device for opening a file. A first device displays a first interface and projects the first interface onto a second interface of a second device, the first interface including at least one file icon, and the second interface including a first interface, where files corresponding to the at least one file icon are stored on the first device. The first device detects an operation performed on the file icon. If the file icon is an icon displayed on the first interface, the first device invokes a first application to open the file; or if the file icon is an icon displayed on the second interface, the first device transmits file metadata to the second device, which is used to open the file on the second device. According to an embodiment of the present application, the user's current focus of attention can be determined based on the user's operation during the projection process, and the corresponding device is selected to open the file. This facilitates user browsing and avoids excessive user operation steps.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims priority to Chinese Patent Application No. 202010648535.5, entitled "FILE OPENING METHOD AND DEVICE," filed with the State Intellectual Property Office of China on July 7, 2020, which is incorporated herein by reference in its entirety.

[0002] The present application relates to the field of communication technologies, and in particular to a method and device for opening a file. [Background technology]

[0003] With the development of intelligent terminals, there are more and more scenarios in which one user has multiple intelligent terminals, such as devices such as smartphones, tablet computers (PADs), and personal computers (PCs). Interconnection between multiple devices brings a good user experience.

[0004] Currently, a multi-screen collaboration function (also called a multi-device collaboration function) is provided to improve the user experience. The multi-screen collaboration function allows a file on one device to be opened on another device. For example, when a mobile phone and a PC perform multi-screen collaboration, the display interface of the mobile phone is displayed on the PC display, and the display interface of the mobile phone displayed on the PC can also be understood as a projection interface. A user performs an operation on the projection interface on the PC. For example, the user selects to open file A. In this case, file A can be opened on the PC. Alternatively, the user performs an operation on the mobile phone. For example, the user selects to open file B. Similarly, file B can also be opened on the PC rather than the mobile phone. A PC has a larger display area than a mobile phone. A user can browse files on the PC to improve the browsing experience.

[0005] In a multi-screen collaboration scenario, regardless of which device a user performs an operation on, it is understood that a response will be made on one of the devices participating in the multi-screen collaboration. For example, during multi-screen collaboration between a mobile phone and a PC, regardless of whether a user performs an operation on the mobile phone or the PC to open a file, the file will be opened on the PC but not on the mobile phone. However, if a user actually wants to view a file on the mobile phone, this cannot be realized in the current method. A user can usually open and view the corresponding content on the mobile phone only after exiting the multi-screen collaboration mode. However, this process requires multiple steps, which is complicated. Summary of the Invention [Means for solving the problem]

[0006] SUMMARY OF THE INVENTION The embodiments of the present application provide a file opening method and device for simplifying the file opening procedure.

[0007] According to a first aspect, a method for opening a file is provided. The method includes: a first device and a second device enter a multi-screen collaboration mode in a preset manner; the first device displays a first interface and projects the first interface onto a second interface of a second device, the first interface including at least one file icon, the second interface including the first interface, and a file corresponding to the at least one file icon is stored on the first device; the first device detects an operation performed on the file icon; the first device determines whether the operation was performed on a display of the first device or a display of the second device; when the operation was performed on the display of the first device, the first device invokes a first application to open the file; or when the operation was performed on the display of the second device, the first device sends file metadata to the second device, and the file metadata is used to open the file on the second device.

[0008] The method may be performed by a first device. The first device may be a mobile device such as a mobile phone, a tablet computer (PAD), or a portable computer. Alternatively, the first device may be a device at a fixed location, such as a desktop computer at a fixed location.

[0009] The first device projects onto the second device. In the current method, the user must perform an operation on the first device to open the corresponding file, and the file must then be opened on the second device. However, in this embodiment of the present application, if the first device detects that the user has performed an operation on the display of the first device, the file can be opened locally on the first device rather than on the second device. If the user has performed an operation on the display of the first device, it indicates that the user may currently use the first device, and it is clear that opening the file on the first device is more convenient for the user to view. In the method provided in this embodiment of the present application, the file can be opened on the first device, so the user does not need to exit the multi-screen collaboration mode and, naturally, does not need to perform multiple steps. This simplifies the file opening procedure, reduces the device response times, and helps reduce device power consumption. In addition, if the first device determines that the user has performed an operation on the display of the second device, the file can also be opened on the second device. That is, according to the method provided in this embodiment of the present application, the user's current attention focus can be determined based on the user's operation, so that the corresponding device is selected to open the file, which helps the user browse and avoids excessive operation steps for the user.

[0010] In one possible implementation, the method further includes: The first device receives the updated file from the second device, and the updated file is Tafu It is a file.

[0011] The first device updates the locally stored file with the updated file.

[0012] When a file is opened on the second device, a user may perform an editing operation on the file on the second device. For example, the user may modify the file. After the user performs the editing operation on the file, the modified file may be stored on the second device, and the modified file may be called, for example, an updated file. The second device may send the updated file to the first device, and the first device may update the original file stored on the first device with the updated file. In this way, the file is updated.

[0013] In one possible implementation, the first device detecting an operation performed on a file icon includes: The first device receives event information from the second device, the event information being used to direct an operation, the event information including an identifier of the second device.

[0014] When a user performs an operation on the display of a first device, the first device can directly collect the user's operation, that is, the first device can capture the user's operation event. Therefore, if the first device can collect the user's operation, it can be determined that the operation was performed on the display of the first device. When a user performs an operation on the display of a second device, the first device cannot directly collect the user's operation, but the second device can collect the user's operation. In other words, the second device can capture the user's operation event and obtain event information corresponding to the operation event, and the second device can send the event information to the first device. The event information may indicate the operation, that is, the event information may describe the operation. The event information may include an identifier of the second device to indicate that the operation corresponding to the event information was performed on the second device.

[0015] In one possible implementation, the first device determining that an operation has been performed on a display of the second device includes: The first device determines, based on the identifier of the second device, that the operation was performed on a display of the second device.

[0016] For example, the event information may include an identifier of the second device, so that the first device can determine that the operation was performed on the display of the second device after obtaining the event information. Optionally, the event information may further include information such as the relative position coordinates of the operation with respect to the first interface displayed on the second device, so that the first device can determine the file corresponding to the user's operation. In this manner, the first device can determine the user's operation focus and select the device on which the file should be opened.

[0017] In one possible implementation, the first device sending the metadata of the file to the second device includes: A first device synchronizes (or sends) metadata of a file to a distributed file system of a second device by using the distributed file system of the first device.

[0018] A distributed file system may be configured in both the first device and the second device. For example, the distributed file system may be used to manage files, and some information related to the files may be synchronized between the first device and the second device by using the distributed file system. Thus, the first device may synchronize file metadata by using the distributed file system. Of course, the first device may send file metadata to the second device in another manner. This is not particularly limited.

[0019] In one possible implementation, before the first device invokes the first application to open the file, the method further includes: The first device outputs prompt information, the prompt information including one or more options, the one or more options being used to determine the device in which the file should be opened.

[0020] The first device detects an operation to select a first option among the one or more options, the first option corresponding to the first application.

[0021] In other words, even if the first device determines that the user has performed an operation on the display of the first device, the first device can still output prompt information, allowing the user to select the device on which the file should be opened. If the user selects to open the file on the first device, the file will be opened on the first device according to the user's selection. In this manner, the device on which the file is opened can better meet the user's requirements, which helps the user browse.

[0022] In one possible implementation, The first device outputs prompt information when the operation is performed on a display of the first device, the prompt information including one or more options, the one or more options being used to determine a device in which the file should be opened.

[0023] The first device detects an operation of selecting a second option from the one or more options, and the second option is used to instruct the file to be opened on the second device.

[0024] The first device sends file metadata to the second device, and the file metadata is used to open the file on the second device.

[0025] Even if the first device determines that the user has performed an operation on the display of the first device, the first device can further output prompt information, so that the user selects a device on which the file should be opened. If the user selects to open the file on the second device, the file is opened on the second device according to the user's selection. For example, it is often the case that the user performs an operation on the first device, but actually expects to present the corresponding file to another user on the second device for viewing. In this scenario, according to the technical solution provided in this embodiment of the present application, the user may select to open the file on a portable computer to complete the presentation process. According to the technical solution provided in this embodiment of the present application, the user is provided with an opportunity to select, and it is found that it is more convenient for the user to select an appropriate device for opening the corresponding file.

[0026] In one possible implementation, the metadata of the file includes storage path information of the file in the first device.

[0027] The file metadata may include storage path information of the file in the first device, so that after obtaining the file metadata, the second device can obtain the file from the first device based on the storage path information to open the file locally on the second device.

[0028] In one possible implementation, the metadata of the file further includes one or more of the following: file type information, file size information, or the name of the file.

[0029] In addition to the storage path information of the file in the first device, the metadata of the file may further include other information, such as file type information and file size information, so that the second device can obtain more information about the file.

[0030] According to a second aspect, a second communication method is provided. The method includes: a first device and a second device enter a multi-screen collaboration mode in a preset manner; the first device displays a first interface and projects the first interface onto a second interface of a second device, the first interface including at least one file icon, the second interface including a first interface, and files corresponding to the at least one file icon are stored on the first device; the first device detects an operation performed on the file icon; if the file icon is an icon displayed on the first interface of the first device, the first device invokes a first application to open the file; or if the file icon is an icon displayed on the second interface, the first device transmits file metadata to the second device, and the file metadata is used to open the file on the second device.

[0031] The method may be performed by a first device. The first device may be a mobile device such as a mobile phone, a tablet computer, or a portable computer. Alternatively, the first device may be a device at a fixed location, such as a desktop computer at a fixed location.

[0032] In one possible implementation, the method further includes: The first device receives an updated file from the second device, where the updated file is an updated file.

[0033] The first device updates the locally stored file with the updated file.

[0034] In one possible implementation, the first device detecting an operation performed on a file icon includes: the first device receives event information from the second device, the event information being used to direct an operation, the event information including an identifier of the second device; or The first device detects event information generated by an operation on the first device.

[0035] A first device detecting event information generated by an operation on the first device can be understood as follows: the first device detects an operation on the first device and acquires event information corresponding to the operation. Therefore, the first device can be considered to detect event information generated by an operation on the first device, or the first device can be understood to detect event information corresponding to the operation on the first device. That is, the former understanding is that the first device detects an operation and acquires event information, and the latter understanding is that the first device detects event information, and the event information corresponds to the operation.

[0036] In one possible implementation, the first device determining that the file icon is the icon displayed on the second interface includes: The first device determines, based on the identifier of the second device, that the file icon is the icon displayed on the second interface.

[0037] In one possible implementation, the first device sending the metadata of the file to the second device includes: The first device sends metadata of the file to the distributed file system of the second device by using the distributed file system of the first device.

[0038] In one possible implementation, before the first device invokes the first application to open the file, the method further includes: The first device outputs prompt information, the prompt information including one or more options, the one or more options being used to determine the device in which the file should be opened.

[0039] The first device detects an operation to select a first option among the one or more options, the first option corresponding to the first application.

[0040] In one possible implementation, the method further includes: The first device outputs prompt information when the file icon is the icon displayed on the first interface, the prompt information including one or more options, the one or more options being used to determine a device in which the file should be opened.

[0041] The first device detects an operation of selecting a second option from the one or more options, and the second option is used to instruct the file to be opened on the second device.

[0042] The first device sends file metadata to the second device, and the file metadata is used to open the file on the second device.

[0043] In one possible implementation, the metadata of the file includes storage path information of the file in the first device.

[0044] In one possible implementation, the metadata of the file further includes one or more of the following: file type information, file size information, or the name of the file.

[0045] For technical effects provided by the second aspect or possible implementations of the second aspect, please refer to the description of the technical effects provided by the first aspect or corresponding implementations.

[0046] According to a third aspect, there is provided an electronic device, the electronic device including a display, one or more processors, a memory, and one or more programs, the one or more programs being stored in the memory, the one or more programs including instructions that, when executed by the electronic device, enable the electronic device to perform a method according to the first aspect or any one of possible implementations of the first aspect, or enable the electronic device to perform a method according to the second aspect or any one of possible implementations of the second aspect.

[0047] According to a fourth aspect, there is provided an electronic device, the electronic device including a module / unit configured to perform the method according to the first aspect or any one of the possible implementations of the first aspect, or the electronic device including a module / unit configured to perform the method according to the second aspect or any one of the possible implementations of the second aspect.

[0048] According to a fifth aspect, there is provided a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed on a computer, the computer is enabled to perform the method according to the first aspect or any one of the possible implementations of the first aspect, or the computer is enabled to perform the method according to the second aspect or any one of the possible implementations of the second aspect.

[0049] According to a sixth aspect, there is provided a computer program product comprising instructions. The computer program product is configured to store a computer program. When the computer program is executed on a computer, the computer is enabled to perform the method according to the first aspect or any one of the possible implementations of the first aspect, or the computer is enabled to perform the method according to the second aspect or any one of the possible implementations of the second aspect.

[0050] According to a seventh aspect, there is provided a communication system, the communication system including an electronic device according to the third aspect or including an electronic device according to the fourth aspect.

[0051] In one optional implementation, the communication system further includes a second device, which is a second device according to the first aspect or implementation, or a second device according to the second aspect or implementation.

[0052] According to the method provided in the embodiment of the present application, the user's current attention focus can be determined based on the user's operation, so that the corresponding device is selected to open the file, which helps the user browse and avoids excessive operation steps for the user. [Brief explanation of the drawings]

[0053] [Figure 1] 1 is a schematic diagram of the structure of an electronic device. [Figure 2] FIG. 1 is a schematic diagram of the current process for opening a file in multi-screen collaboration mode. [Figure 3A] FIG. 2 is a schematic diagram of a home screen of a mobile phone according to an embodiment of the present application; [Figure 3B] 1 is a schematic diagram of a user touching a portable computer by using a mobile phone according to an embodiment of the present application; [Figure 3C] FIG. 1 is a schematic diagram of displaying a mirror of a mobile phone on a portable computer in a multi-screen collaboration mode according to an embodiment of the present application; [Figure 4A] 2 is a schematic diagram illustrating a user performing a first operation on a projection interface 202 displayed on a portable computer according to an embodiment of the present application. [Figure 4B] 1 is a schematic diagram of opening a file 3 on a portable computer according to an embodiment of the present application; [Figure 4C] FIG. 2 is another schematic diagram of opening a file 3 on a portable computer according to an embodiment of the present application. [Figure 4D] FIG. 10 is yet another schematic diagram of opening a file 3 on a portable computer according to an embodiment of the present application. [Figure 5A] 10 is a schematic diagram of a user performing a second operation on the mobile phone 100 according to an embodiment of the present application. [Figure 5B] 1 is a schematic diagram of opening a file 3 on a mobile phone 100 according to an embodiment of the present application. [Figure 6] FIG. 2 is a schematic diagram of a process for opening a file in multi-screen collaboration mode according to an embodiment of the present application. [Figure 7A] 1 is a schematic diagram of displaying prompt information on a mobile phone 100 according to an embodiment of the present application. [Figure 7B] FIG. 2 is a schematic diagram illustrating a user performing an operation on an option included in prompt information according to an embodiment of the present application; [Figure 7C] FIG. 10 is another schematic diagram of displaying prompt information on a mobile phone 100 according to an embodiment of the present application. [Figure 7D] FIG. 10 is another schematic diagram of a user performing an operation on an option included in prompt information according to an embodiment of the present application. [Figure 8A] 1 is a flowchart of a method for opening a first file according to an embodiment of the present application. [Figure 8B] 1 is a flowchart of a method for opening a first file according to an embodiment of the present application. [Figure 9A] 4 is a flowchart of a method for opening a second file according to an embodiment of the present application. [Figure 9B] 4 is a flowchart of a method for opening a second file according to an embodiment of the present application. [Figure 10] 1 is a schematic diagram of a structure of an electronic device according to an embodiment of the present application; DETAILED DESCRIPTION OF THE INVENTION

[0054] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the following further describes the embodiments of the present application in detail with reference to the accompanying drawings.

[0055] The following explains some terms in the embodiments of the present application to facilitate understanding by those skilled in the art.

[0056] In this application, an application (app) is a software program capable of realizing one or more specific functions. Typically, multiple applications, such as a camera application, a message application, an image application, a multimedia message application, various email applications, WeChat, WhatsApp Messenger, Line, Instagram, or KakaoTalk, may be installed on an electronic device. The following applications may be applications installed when the electronic device is shipped from the factory, or may be applications downloaded by a user from a network or obtained from another electronic device during use of the electronic device (e.g., applications sent by another electronic device).

[0057] A file in this application may be, for example, a multimedia file such as an image file, a video file, or an audio file, or a text file, for example, a Microsoft Office file such as a Word file, an Excel file, or a PowerPoint file, or a picture file such as a Microsoft Office Visio file or a Photoshop file corresponding to a drawing application.

[0058] In the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. The term "and / or" describes an association relationship between associated objects and indicates that three relationships may exist. For example, A and / or B may represent three cases: only A is present, both A and B are present, and only B is present, and A and B may be singular or plural. The character " / " typically represents an "or" relationship between associated objects. "At least one of" or similar expressions indicates any combination of items, including any combination of a single item or multiple items. For example, at least one of a, b, or c may indicate a, b, c, ab, ac, bc, or abc, and a, b, and c may be singular or plural.

[0059] In addition, unless otherwise specified, in the embodiments of the present application, ordinal numbers such as "first" and "second" are intended to distinguish between multiple objects, but are not intended to limit the size, content, order, chronological order, priority, importance, etc. of the multiple objects. For example, 1 The first file and the second file are simply used to distinguish between different files and do not dictate different sizes, contents, priorities, importance, etc. of the two files.

[0060] The technical solutions provided in this application may be applied to electronic devices. The following describes electronic devices, graphical user interfaces (GUIs) used in the electronic devices, and embodiments used to use the electronic devices. In some embodiments of this application, the electronic devices may be portable electronic devices such as mobile phones, PADs, portable computers, wearable devices (such as smart watches, smart glasses, smart bands, and smart helmets) with wireless communication capabilities, or in-vehicle devices. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices using iOS®, Android®, Microsoft®, or another operating system. It should be further understood that in some other embodiments of this application, the electronic device may not be a portable device, but may be a desktop computer such as a PC that can collect images and run image compression algorithms to compress the images.

[0061] For example, FIG. 1 is a schematic diagram of the structure of an electronic device 100.

[0062] It should be understood that the electronic device 100 shown in the figures is only an example, and that the electronic device 100 may have more or fewer components than those shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing circuits and / or application specific integrated circuits.

[0063] As shown in FIG. 1, electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset jack 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, a subscriber identification module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, an optical proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.

[0064] Each part of the electronic device 100 will be specifically described below with reference to FIG.

[0065] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, a neural-network processing unit (NPU), etc. Different processing units may be independent components or integrated into one or more processors. The controller may be the nerve center and command center of the electronic device 100. The controller may generate operation control signals based on instruction operation codes and time-series signals to complete the control of instruction reading and execution.

[0066] A memory may also be disposed in the processor 110 and configured to store instructions and data. In some embodiments, the memory in the processor 110 is a cache. The memory may store instructions or data that are simply used or periodically used by the processor 110. When the processor 110 needs to use the instructions or data again, the processor 110 may retrieve the instructions or data directly from the memory to avoid repeated accesses and reduce the wait time of the processor 110. Therefore, system efficiency may be improved.

[0067] The processor 110 may execute the file opening method provided in this embodiment of the present application. For example, an embodiment of the present application provides manager software. The manager software may be a software module, which may run on the processor 110, and the software module may be understood as a computer program. As another example, an embodiment of the present application further provides projection software. The projection software may be a software module, which may run on the processor 110, and the software module may be understood as a computer program. The manager software and the projection software may be the same software module, or may be different software modules. In addition, the manager software may be software that operates independently or may be part of system software. Similarly, the projection software may be software that operates independently or may be part of system software. When different components are integrated into the processor 110, for example, when a CPU and a GPU are integrated, the CPU and the GPU may cooperate to perform the method provided in this embodiment of the present application. For example, in the method provided in this embodiment of the present application, some algorithms are performed by the CPU and other algorithms are performed by the GPU to achieve high-speed processing efficiency.

[0068] In some embodiments, processor 110 may include one or more interfaces. For example, the interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, a universal serial bus (USB) interface, etc.

[0069] The wireless communication function of the electronic device 100 may be realized via Antenna 1, Antenna 2, mobile communication module 150, wireless communication module 160, a modem processor, a baseband processor, etc. Antenna 1 and Antenna 2 are configured to transmit and receive electromagnetic signals. Each antenna in the electronic device 100 may be configured to cover one or more communication bands. Different antennas may be further multiplexed to improve antenna utilization. For example, Antenna 1 may be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas may be used in combination with tuning switches.

[0070] Mobile communication module 150 may provide wireless communication solutions, including 2G / 3G / 4G / 5G, applied to electronic device 100. Mobile communication module 150 may include at least one filter, switch, power amplifier, low-noise amplifier (LNA), etc. Mobile communication module 150 may receive electromagnetic waves via antenna 1, process the received electromagnetic waves, such as filtering and amplifying them, and send the electromagnetic waves to a modem processor for demodulation. Mobile communication module 150 may further amplify signals modulated by the modem processor and convert the amplified signals into electromagnetic waves for emission via antenna 1. In some embodiments, at least some functional modules of mobile communication module 150 may be located within processor 110. In some embodiments, at least some functional modules of mobile communication module 150 may be located within the same device as at least some modules of processor 110.

[0071] The wireless communication module 160 may be applied to the electronic device 100 to provide wireless communication solutions including wireless local area networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite systems (GNSS), frequency modulation (FM), near field communication (NFC) technology, and infrared (IR) technology. The wireless communication module 160 may be one or more components integrating at least one communication processor module. The wireless communication module 160 receives electromagnetic signals via the antenna 2, performs frequency modulation and filtering on the electromagnetic signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may further receive signals to be transmitted from the processor 110, perform frequency modulation and amplification on the signals, and convert the signals into electromagnetic waves for emission via the antenna 2.

[0072] In some embodiments, in electronic device 100, antenna 1 and mobile communication module 150 are coupled, and antenna 2 and wireless communication module 160 are coupled, so that electronic device 100 can communicate with a network and other devices by using wireless communication technologies that may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, IR technologies, etc. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and / or a geostationary satellite-based augmentation system (SBAS).

[0073] It will be understood that the interfacing relationships between modules illustrated in the embodiments of the present application are merely examples for illustrative purposes and do not constitute limitations on the structure of the electronic device 100. In some other embodiments of the present application, the electronic device 100 may alternatively use an interfacing scheme different from that of the aforementioned embodiments, or may use a combination of interfacing schemes.

[0074] The electronic device 100 realizes display functions by using a GPU, a display 194, an application processor, etc. The GPU is a microprocessor for image processing and is connected to the display 194 and the application processor. The GPU is configured to perform mathematical and geometric calculations and render images. The processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0075] The display 194 is configured to display images, videos, etc. The display 194 includes a display panel, which may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), MiniLed, MicroLed, Micro-oLed, quantum dot light-emitting diodes (QLED), etc.

[0076] The electronic device 100 may achieve picture taking or image capturing functionality by using a camera 193, an ISP, a video codec, a GPU, a display 194, an application processor, and the like.

[0077] The ISP may be configured to process data fed back by the camera 193. For example, during photography, the shutter is pressed and light is transmitted through the lens to the camera's light receiving element. The light signal is converted into an electrical signal, which the camera's light receiving element sends to the ISP for processing to convert the electrical signal into a visible image. The ISP may further perform algorithmic optimization for image noise, brightness, and complexion. The ISP may further optimize parameters such as exposure and color temperature for the photography scenario. In some embodiments, the ISP may be located in the camera 193.

[0078] The camera 193 may be configured to capture still images or video. An optical image of an object is generated through a lens and projected onto a light-receiving element. The light-receiving element may be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) photoelectric transistor. The light-sensitive element converts an optical signal into an electrical signal, which is then sent to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into a standard image signal in a format such as RGB or YUV. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0079] The digital signal processor is configured to process digital signals and may process other digital signals in addition to the digital image signal. For example, once the electronic device 100 selects a frequency, the digital signal processor is configured to perform a Fourier transform on the frequency energy.

[0080] A video codec is configured to compress or decompress digital video. Electronic device 100 may support one or more video codecs. In this manner, electronic device 100 may play or record video in multiple coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG 2, MPEG 3, and MPEG 4.

[0081] The NPU is a neural network (NN) computing processor that can rapidly process input information and continuously self-learn by referencing the structure of biological neural networks, for example, the communication mode between neurons in the human brain. Applications such as intelligent perception of the electronic device 100, for example, image recognition, face recognition, speech recognition, and text understanding, can be realized through the NPU.

[0082] The internal memory 121 may be configured to store computer-executable program code, which includes instructions. The internal memory 121 may include a program storage area and a data storage area. The program storage area may store an operating system, applications necessary for at least one function (e.g., audio playback function, image playback function), etc. The data storage area may store data created during use of the electronic device 100 (e.g., audio data, address book, etc.). Additionally, the internal memory 121 may include high-speed random access memory or non-volatile memory, such as at least one magnetic disk storage device, flash memory, or universal flash storage (UFS). The processor 110 executes instructions stored in the internal memory 121 and / or instructions stored in memory located within the processor to perform various functional applications and data processing of the electronic device 100.

[0083] The external memory interface 120 may be configured to connect to an external storage card, such as a Micro SD card, to expand the storage capabilities of the electronic device. The external memory card communicates with the processor 110 through the external memory interface 120 to achieve data storage functions. The external storage card stores files, such as pictures and videos.

[0084] The electronic device 100 may provide audio functionality, such as music playback and recording, by using an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset jack 170D, an application processor, and the like.

[0085] The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, an optical proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.

[0086] The buttons 190 include a power button, a volume button, etc. The buttons 190 may be mechanical buttons or touch buttons. The electronic device 100 may receive the button input and generate a button signal input related to user settings and function control of the electronic device 100. The motor 191 may generate a vibration prompt. The indicator 192 may be an indicator and may be configured to indicate a charging status and a power change, or may be configured to indicate a message, a missed call, a notification, etc. The SIM card interface 195 is configured to connect to a SIM card. The SIM card may be inserted into or removed from the SIM card interface 195 to connect or disconnect the SIM card from the electronic device 100.

[0087] It can be understood that the components shown in Figure 1 do not constitute specific limitations on electronic device 100. A mobile phone may further include more or fewer components than those shown, may combine some components, may separate some components, or may have a different component arrangement. In addition, the combination / connection relationships between the components in Figure 1 may also be adjusted and modified.

[0088] The present application provides a first device and a second device. For example, the first device may be realized as the electronic device 100, a chip or another functional component disposed within the electronic device 100 (in this case, the first device may also be referred to as a first apparatus), or may be realized in another form. For example, the second device may be realized as the electronic device 100, a chip or another functional component disposed within the electronic device 100 (in this case, the second device may also be referred to as a second apparatus), or may be realized in another form. One or more of the microphone 170C, the camera 193, the fingerprint sensor 180H, the touch sensor 180K, or the bone conduction sensor 180M shown in FIG. 1 may collect user operations in the present application. Alternatively, an embodiment of the present application may provide several peripheral input devices for collecting user operations. For example, the electronic device 100 is connected to several peripheral input devices, and these peripheral input devices can collect user operations. The peripheral input devices include, for example, a keyboard and a mouse.

[0089] The present application further provides a multi-screen collaboration system. The multi-screen collaboration system may include a first device and a second device. Of course, the multi-screen collaboration system may also include another device. For example, three or more devices may perform multi-screen collaboration. In the embodiments of the present application, a multi-screen collaboration process between two devices is mainly used as an example.

[0090] Currently, in a multi-screen collaboration (or multi-device collaboration) scenario, regardless of which device a user performs an operation on, a response is made on one of the devices participating in the multi-screen collaboration. For example, during multi-screen collaboration between a mobile phone and a PC, regardless of whether a user performs an operation on the mobile phone or the PC to open a file, the file is opened on the PC but not on the mobile phone. However, if a user actually wants to view a file on the mobile phone, this cannot be realized in the current method. A user can usually open and view the corresponding content on the mobile phone only after exiting the multi-screen collaboration mode. However, this process requires multiple steps, which is complicated.

[0091] For example, a user may perform an operation using a mobile phone, and a file on the mobile phone may need to be opened on a personal computer (PC) for viewing by a user using the PC. In this way, two users do not need to use the mobile phone at the same time. The PC's display may be larger, providing a better viewing experience. In this case, the mobile phone and the PC may enter a multi-screen collaboration mode. The mobile phone may open a file in the multi-screen collaboration mode, and the file will be displayed on the PC. Figure 2 is a schematic diagram of the process of opening a file in the multi-screen collaboration mode.

[0092] In Fig. 2, 1 indicates that a user taps a file displayed on the display of a mobile phone, and a mobile phone assistant (also called a mobile phone PC assistant) installed on the mobile phone acquires the user's tap operation information and responds to the tap operation. Alternatively, in Fig. 2, 1 indicates that a user clicks a file displayed on the projection interface of the mobile phone on the display of a PC, and a PC manager installed on the PC acquires the user's click operation information and responds to the click operation.

[0093] In FIG. 2, 2 indicates that the PC manager installed in the PC sends the acquired user click operation information to the mobile phone assistant.

[0094] In FIG. 2, 3 indicates that the mobile phone should stop opening a file. If the mobile phone determines, based on the normal process, that a user has performed a file-opening operation on the mobile phone, the mobile phone opens the corresponding file in response to the operation. However, in multi-screen collaboration mode, a file can only be opened on a PC, not on the mobile phone. Therefore, the mobile phone must stop the file-opening operation that should have been performed.

[0095] In Figure 2, 4 indicates that the mobile phone obtains the file path, which is the absolute path of the file, that is, the storage path of the file in the mobile phone.

[0096] In Figure 2, 5 indicates that the mobile phone assistant creates a soft link in the mobile phone's distributed file system (MDFS). The soft link refers to a storage path, which is the storage path of a file in the mobile phone, for example, the storage path of a file in the mobile phone's secure digital memory card (SD) or the file's uniform resource locator (URL). In addition, the soft link is further associated with file metadata, which includes, for example, the file's storage path and may also include other file content, such as file type information.

[0097] In FIG. 2, 6 indicates that the distributed file system of the mobile phone synchronizes the metadata of the file with the distributed file system of the PC.

[0098] In FIG. 2, 7 indicates that the mobile phone assistant obtains the path of the soft link created in the distributed file system.

[0099] In Figure 2, 8 indicates that the mobile phone assistant sends the path of the soft link created in the distributed file system of the mobile phone to the PC manager. In addition, the mobile phone assistant can also obtain file metadata, such as file type information, and the mobile phone assistant can send the obtained file metadata to the PC manager.

[0100] In Figure 2, 9 and 10 indicate that PC Manager calls an application that can open the file based on the file type information. In addition, PC Manager also sends the path of the soft link to the application. In Figure 2, an example is used in which the application is a Microsoft office application, and the application is represented as "office application" in Figure 2.

[0101] In FIG. 2, 11 indicates that the office application opens the soft link based on the path of the soft link.

[0102] In Figure 2, 12 indicates that the distributed file system of the PC requests to retrieve a file from the distributed file system of the mobile phone based on the metadata corresponding to the soft link (e.g., based on the storage path of the file included in the metadata).

[0103] In Figure 2, 13 indicates that the mobile phone's distributed file system reads the file that the soft link actually points to, and then sends the read file to the PC's distributed file system, so that the office application on the PC can open the file.

[0104] From the above process, we can see that currently, in a multi-screen collaboration (or multi-device collaboration) scenario, regardless of which device a user operates, a response is made on one of the devices participating in the multi-screen collaboration. For example, during multi-screen collaboration between a mobile phone and a PC, whether a user operates on the mobile phone or the PC to open a file, the file is opened on the PC but not on the mobile phone. However, if a user actually wants to view a file on the mobile phone, this cannot be realized in the current method. A user can usually open and view the corresponding content on the mobile phone only after exiting the multi-screen collaboration mode. However, this process requires multiple steps, which is complicated.

[0105] In consideration of this, in this application, the device may determine the user's operation focus or the device the user expects to view based on the user's operation, so as to select a corresponding device according to the user's response intention. In this manner, the response results can meet the user's requirements and improve the user experience. For example, when a mobile phone and a PC perform multi-screen collaboration, if the user performs an operation on the mobile phone to open a file, the file may be opened on the mobile phone, or if the user performs an operation on the PC to open a file, the file may be opened on the PC. The user can see that the corresponding content on the mobile phone can be opened and viewed without exiting the multi-screen collaboration mode. This simplifies the user's operation process. The device does not need to respond multiple times, which helps reduce the device's power consumption.

[0106] The following describes the technical solutions provided in the embodiments of the present application.

[0107] In an embodiment of the present application, a first device and a second device need to perform multi-screen collaboration. For ease of understanding, the following description will use an example in which the first device is a mobile phone and the second device is a portable computer. The structure of the mobile phone is, for example, the structure shown in FIG. 1. In consideration of this, the electronic device 100 shown in FIG. 1 may also be referred to as a mobile phone 100. In addition, the first device needs to realize the multi-screen collaboration function, for example, by using first manager software installed on the first device. The second device needs to realize the multi-screen collaboration function, for example, by using second manager software installed on the second device. From the above description, it can be seen that the first manager software may be a software module that operates independently on the first device or may be part of the system software of the first device. The second manager software may be a software module that operates independently on the second device or may be part of the system software of the second device. In addition, the "projection software" may have another name, for example, it may be called a "projection application (APP)." If the first device is a mobile phone 100, the first manager software may be called a mobile phone assistant, etc. It should be understood that the manager software may be called by other names. The term "manager" does not have any particular meaning and does not imply that the manager software is specifically required to manage other software on the device on which it is located.

[0108] Additionally, in the embodiments of the present application, a software module and an application (APP) may be the same concept. For example, a mobile phone assistant is both a software module and an application. Therefore, "software" may be replaced with "application (APP)." For example, "manager software" may be referred to as a "manager application," and "projection software" may be referred to as a "projection application." Alternatively, an application may include one or more software modules, but a software module cannot be considered an application. For example, the manager software is a software module but is not an independent application. The manager software may be considered to be a software module configured in a corresponding application (e.g., a manager application), or may be a software module configured in the system software. Similarly, the projection software is also a software module but is not an independent application. The projection software may be considered to be a software module configured in a corresponding application (e.g., a projection application), or may be a software module configured in the system software. An "application" is an icon that can be directly invoked by a user. For example, icons such as "Messages" and "Application Market" displayed on the display interface of a mobile phone represent the corresponding application. In the following description, an example in which a software module and an application are the same concept is used.

[0109] FIG. 3A shows the GUI of the mobile phone 100. The GUI is the mobile phone's home screen 201. When a user expects the mobile phone 100 and the portable computer to perform multi-screen collaboration, the user needs to enable both the mobile phone 100 and the portable computer to enter the multi-screen collaboration mode. A preset method may be used to enable the mobile phone 100 and the portable computer to enter the multi-screen collaboration mode, and the preset method may include multiple operation methods. For example, as shown in FIG. 3B, the user may hold the mobile phone 100 and tap the portable computer, for example, tapping the NFC area of ​​the portable computer. In this case, the mobile phone 100 and the portable computer may establish an NFC connection, and both enter the multi-screen collaboration mode. In this case, the preset method is a "one-hop" method. That is, the user only needs to perform a single operation (tap operation) to establish a connection between the two devices, and the two devices can enter the multi-screen collaboration mode. FIG. 3B mainly illustrates the process of the mobile phone 100 tapping the portable computer. Therefore, the display interface of the mobile phone 100 is not depicted in detail.

[0110] Alternatively, the user may enable the Bluetooth function on the mobile phone 100 and the portable computer. For example, after the Bluetooth function is enabled, the mobile phone 100 scans for surrounding Bluetooth devices. If the mobile phone 100 discovers a portable computer through the scan, the mobile phone 100 and the portable computer may establish a Bluetooth connection, and both enter the multi-screen collaboration mode. In this case, the preset method is either the method in which the user enables the Bluetooth function or the method in which the mobile phone 100 scans for the portable computer. That is, the user only needs to perform one operation (the operation of enabling the Bluetooth function) so that a connection can be established between the two devices, and the two devices can enter the multi-screen collaboration mode. Alternatively, the user may enable the Bluetooth function on the mobile phone 100 and the portable computer. For example, after the Bluetooth function is enabled, the mobile phone 100 scans for surrounding Bluetooth devices. If the mobile phone 100 discovers a portable computer through the scan, the mobile phone 100 and the portable computer may establish a Bluetooth connection. After the mobile phone 100 and the portable computer establish a Bluetooth connection, the user performs a corresponding operation, which causes the mobile phone 100 and the portable computer to enter a multi-screen collaboration mode. For example, the portable computer has second projection software installed, and the mobile phone 100 has first projection software installed. The operation performed by the user is, for example, using the first projection software to scan a two-dimensional code provided by the second projection software, and the operation performed by the user is considered to be a preset method. That is, the user needs to perform at least two operations so that the two devices can establish a connection and enter a multi-screen collaboration mode.

[0111] Alternatively, the mobile phone 100 and the portable computer may establish a connection via Wi-Fi or in another manner and enter into a multi-screen collaboration mode.

[0112] Alternatively, the second projection software is installed on a portable computer, and the first projection software is installed on the mobile phone 100. The first projection software and the second projection software may be of two different types, or may be of the same type but installed on different devices. From the above description, it can be seen that the first projection software may be a software module that operates independently on the mobile phone 100 or may be part of the system software of the mobile phone 100. The second projection software may be a software module that operates independently on the portable computer or may be part of the system software of the portable computer. It should be understood that the "projection software" may have another name, for example, it may be called a "projection application." In addition, the projection software and the manager software may be the same software module. For example, the first projection software and the first manager software may be the same software module, and the second projection software and the second manager software may be the same software module. Alternatively, the projection software and the manager software may be different software modules. For example, the first projection software and the first manager software may be different software modules, and the second projection software and the second manager software may be different software modules. For example, the first projection software may be part of the system software of the mobile phone 100, and the first manager software may be a software module that runs independently on the mobile phone 100 and does not belong to the system software. In this case, the first projection software and the first manager software are considered to be different software modules. As another example, the first projection software and the first manager software are both software modules that run independently on the mobile phone 100, but are different software modules.In this case, the first projection software and the first manager software are still considered to be different software modules. A user may open the second projection software on the portable computer and also open the first projection software on the mobile phone 100. The second projection software on the portable computer may provide a two-dimensional code. The user may use the mobile phone 100 to scan the two-dimensional code provided by the second projection software on the portable computer by using the first projection software on the mobile phone 100, thereby establishing a connection between the mobile phone 100 and the portable computer and both entering multi-screen collaboration mode. Alternatively, the user's operation of using the first projection software on the mobile phone 100 to scan the two-dimensional code provided by the second projection software on the portable computer simply enables the two devices to enter multi-screen collaboration mode, and the two devices have already established a connection, for example, via Bluetooth or Wi-Fi.

[0113] Alternatively, the user may log in to the same account on the second projection software of the portable computer and the first projection software of the mobile phone 100, for example, by entering the same account and password on the second projection software of the portable computer and the first projection software of the mobile phone 100. In this way, the mobile phone 100 and the portable computer can establish a connection and enter the multi-screen collaboration mode without scanning a two-dimensional code. The preset operation method is to have the user enter the same account and password on the second projection software of the portable computer and the first projection software of the mobile phone 100. Alternatively, the operation method of having the user enter the same account and password on the second projection software of the portable computer and the first projection software of the mobile phone 100 only allows the two devices to enter the multi-screen collaboration mode, and the two devices have already established a connection before, for example, via Bluetooth or Wi-Fi.

[0114] When the first projection software is installed on the mobile phone 100, the first manager software can capture operations performed by a user on the first projection software, and the first manager software can send instructions from the portable computer (or from the second manager software) to the first projection software. Similarly, when the second projection software is installed on the portable computer, the second manager software can capture operations performed by a user on the second projection software, and the second manager software can send instructions from the mobile phone 100 (or from the first manager software) to the second projection software.

[0115] Alternatively, the user may use another method to enable both the mobile phone 100 and the portable computer to enter the multi-screen collaboration mode. The specific method is not limited.

[0116] Additionally, as shown in FIG. 3C , in the multi-screen collaboration mode, the display of the portable computer displays the current display interface 202 of the mobile phone 100. The display interface 202 may also be referred to as a projection interface 202 or a screen recording interface 202. The projection interface 202 is a mirror of the display interface of the mobile phone 100. The projection interface 202 displayed on the portable computer and the display interface of the mobile phone 100 are from the same source, i.e., both are from the mobile phone 100. For example, the mobile phone 100 transmits information about the display interface of the mobile phone to the portable computer, so that the portable computer can display the projection interface 202 at the same scale as the size of the display of the mobile phone 100. After the portable computer displays the projection interface 202, the user may perform operations such as zooming in or zooming out on the projection interface 202 to change the size of the projection interface 202, or the user may further perform operations such as dragging on the projection interface 202 to change the position of the projection interface 202 on the display of the portable computer.

[0117] After both the mobile phone 100 and the portable computer enter the multi-screen collaboration mode, according to the technical solution provided in this application, the user may choose to view the content on the mobile phone on the portable computer side. The display of the portable computer is larger, and viewing on a larger screen can provide the user with a better viewing experience. Alternatively, the user may choose to view the content on the mobile phone on the mobile phone side. The mobile phone is more portable and can meet the requirement of being able to view content at any time. The following describes how to select a device for viewing.

[0118] For example, a user performs a first operation on the projection interface 202 displayed on the portable computer. The first operation may be, for example, a touch operation. As shown in FIG. 4A , the first operation is an operation in which the user touches the file icon “File 3” on the projection interface 202 using a finger. This indicates that the user is attempting to open File 3. A touch sensor on the display of the portable computer may collect (or capture) event information of the first operation. In other words, the touch sensor on the display of the portable computer may capture the user's first operation and obtain event information corresponding to the first operation, and the event information may indicate the first operation. Because the area in which the first operation is performed is the projection interface 202, the touch sensor may send the collected event information of the first operation to the second manager software. The event information of the first operation may include, for example, an identifier of the portable computer and, optionally, may further include position information of the first operation. The position information of the first operation may be, for example, relative position information of the first operation on the projection interface 202. In this way, even if the projection interface 202 is in a different position on the display of the portable computer, the relative position information of the first operation remains unchanged. In the mobile phone 100, the file corresponding to the first operation can be determined based on the area conversion ratio between the display 194 of the mobile phone 100 and the projection interface 202 and the relative position information of the first operation.

[0119] Alternatively, the first operation may be other operations such as a voice control operation, a gesture operation, or a pressing operation performed on the display of the portable computer. In this case, the first operation is collected by using different sensors in the portable computer. The type of the first operation is not limited in the embodiments of the present application.

[0120] The second manager software transmits the first operation event information to the first manager software. The transmission method depends on the connection method between the mobile phone 100 and the portable computer, such as NFC, Bluetooth, Wi-Fi, or a mobile network. After the first manager software receives the first operation event information, the first manager software determines that the first operation event information corresponds to the portable computer because the first operation event information includes an identifier of the portable computer, i.e., determines that the first operation is an operation performed on the portable computer. In other words, the first manager software determines that a file icon corresponding to the first operation (e.g., the file icon "File 3") is located on the display interface of the portable computer. In this case, the first manager software can determine the storage path of the file corresponding to the first operation. For example, if the event information of the first operation includes relative position information of the first operation on the projection interface 202, the first manager software may determine a file, such as file 3, corresponding to the first operation based on the area conversion ratio between the projection interface 202 and the display 194 of the mobile phone 100 and the relative position information of the first operation. As a result, the first manager software can determine the storage path of file 3. The first manager software may create a soft link corresponding to the file in the distributed file system of the mobile phone 100. The soft link points to the storage path of the file. For example, the soft link points to the storage path of the file in the SD card of the mobile phone or the URL of the file. In addition, the soft link is associated with metadata of the file. The distributed file system of the mobile phone 100 may synchronize the metadata of the file corresponding to the first operation with the distributed file system of the portable computer.

[0121] The metadata of a file may also be referred to as description information of the file. The metadata of a file may include, for example, a storage path of the file. Optionally, the metadata may further include one or more of a file name, file type information, or file size information. For example, the metadata of a file may include file storage path information, or the metadata of a file may include file type information and file storage path information, or the metadata of a file may include file size information, the file name, and file storage path information. The storage path indicated by the file storage path information may be the storage path of the file in the mobile phone 100. In the above example, the file corresponding to the first operation is file 3, and the distributed file system of the mobile phone 100 may synchronize the metadata of file 3 with the distributed file system of the portable computer.

[0122] The first manager software may obtain a path of a soft link created in the distributed file system of the mobile phone 100, and the first manager software may send the path of the soft link to the second manager software. In addition, the first manager software may also obtain file metadata, for example, file type information, and the first manager software may send the obtained file metadata to the second manager software.

[0123] The second manager software determines and invokes an application that can open the file based on the file's type information, etc. For example, the second manager software determines that the second application can open the file. In an embodiment of the present application, if the two nouns "software" and "application" can be interchangeable, the "second application" may be referred to as "second software." Alternatively, if "software" and "application" are not concepts at the same level and cannot be interchangeable, one or more software modules may be considered to be configured in the second application. For example, if the type information of file 3 indicates that file 3 is of an image type, the second manager software may determine that the image application can open file 3. As another example, if the type information of file 3 indicates that file 3 is a Microsoft Word document, the second manager software may determine that the Microsoft office word application can open file 3. In addition, the second manager software also sends the path of the soft link to the second application.

[0124] The second application opens the soft link based on the path of the soft link. In this case, the distributed file system of the portable computer may retrieve file 3 from the mobile phone 100 based on the metadata corresponding to the soft link. This may be understood as retrieving data of file 3 from the mobile phone 100. For example, the distributed file system of the portable computer may retrieve file 3 from the mobile phone 100 based on the storage path information of file 3 included in the metadata corresponding to the soft link. Thus, the second application can open file 3.

[0125] FIG. 4B is a schematic diagram of opening file 3 on a portable computer. Interface 203 in FIG. 4B represents the interface of file 3 opened on the portable computer. In FIG. 4B, file 3 is an example of a Word file. After the file is opened on the portable computer, the user may adjust the size of interface 203. As shown in FIG. 4B, interface 203 and projection interface 202 may be displayed together. Alternatively, interface 203 may cover projection interface 202 as shown in FIG. 4C. Alternatively, as shown in FIG. 4D, the user may set projection interface 202 to be "pinned to the top," and some or all of the area of ​​projection interface 202 may be located on interface 203.

[0126] In this manner, if file 3 is opened on the portable computer, file 3 is not opened on the mobile phone 100 .

[0127] In addition, the portable computer may further store the data of file 3 on the portable computer. For example, the portable computer may use the second application to store the data of file 3 in the local file system of the portable computer, for example, to store the data of file 3 as a temporary file.

[0128] The user may view file 3 on the portable computer by using the second application, or the user may perform an editing operation on file 3 on the portable computer by using the second application, for example, deleting content in file 3, adding content, or modifying content. After the user completes the operation on file 3, file 3 may be saved, and the portable computer may update the stored data of file 3 to obtain updated data of file 3. The updated data of file 3 may be understood as updated file 3. This is equivalent to a process in which the portable computer overwrites the original data of file 3 stored on the portable computer with the updated data of file 3. The portable computer may send the updated data of file 3 to the mobile phone 100. For example, the portable computer may synchronize the second file with the distributed file system of the mobile phone 100 by using the distributed file system of the portable computer. In this case, the mobile phone 100 may overwrite the original data of file 3 stored in the local file system of the mobile phone 100 with the updated data of file 3. In this way, file 3 is updated. The portable computer may send updated data of file 3 to the mobile phone 100 every time the user updates file 3, so that file 3 can be updated on the mobile phone in a timely manner. Alternatively, the portable computer may send updated data of file 3 to the mobile phone 100 after the user closes file 3, thereby reducing the number of times updated data is sent and reducing transmission overhead. In addition, after the portable computer sends updated data of file 3 to the mobile phone 100, the portable computer may delete the stored updated data of file 3. For example, the portable computer may delete temporary files to free up storage space.

[0129] The above describes the process in which a user performs an operation on a portable computer in a multi-screen collaboration mode. Alternatively, in the multi-screen collaboration mode, the user may also perform an operation on the mobile phone 100. For example, the user may be in a moving state, and it is more convenient to use the mobile phone 100 during the moving process, or the user may be far away from the portable computer, and it is more convenient for the user to use the nearby mobile phone 100. The following describes how the device responds when the user performs an operation on the mobile phone.

[0130] For example, the user performs a second operation (also referred to as a first operation) on the mobile phone 100. The second operation is, for example, a touch operation. As shown in FIG. 5A , the second operation is an operation in which the user touches the file icon “File 3” on the display interface of the mobile phone using a finger. This indicates that the user is attempting to open File 3. The touch sensor 180K on the display 194 of the mobile phone 100 may collect (or detect) event information of the second operation. In other words, the touch sensor 180K on the display 194 of the mobile phone 100 may capture the second operation and obtain event information of the second operation, which may indicate the second operation. The touch sensor 180K may transmit the collected event information of the second operation to the first manager software. The event information of the second operation may include, for example, an identifier of the mobile phone 100 and, optionally, may further include location information of the second operation. The location information of the second operation is, for example, absolute location information of the second operation on the display 194.

[0131] After the first manager software obtains the event information of the second operation, the event information of the second operation includes, for example, an identifier of the mobile phone 100 from the touch sensor 180K, so the first manager software may determine that the event information of the second operation corresponds to the mobile phone 100, that is, determine that the second operation is an operation performed on the mobile phone 100. In other words, the first manager software determines that a file icon corresponding to the second operation (e.g., the file icon "File 3") is located on the display interface of the mobile phone 100. In this case, the first manager software may determine a file, such as File 3, corresponding to the second operation based on the location information of the second operation, and then the first manager software may determine an application, for example, the first application, that can open File 3 based on the type of File 3. In embodiments of the present application, if the two nouns "software" and "application" can be interchangeable, a "first application" may be referred to as "first software." Alternatively, if "software" and "application" are not concepts at the same level and cannot be interchangeable, one or more software modules may be considered to be part of the first application. The second application and the first application may be the same application, for example, both may be Microsoft Office Word applications but have different names because they are installed on different devices. Alternatively, the first application and the second application may be different applications. For example, the first application may be a Microsoft Office Word application and the second application may be a WPS Office Word application, but both the first application and the second application can open the same type of file.

[0132] The first manager software may then open file 3 stored in the local file system of mobile phone 100 on mobile phone 100 by using the first application. Figure 5B is a schematic diagram of opening file 3 on mobile phone 100. Interface 204 in Figure 5B indicates the interface of file 3 opened on display 194 of mobile phone 100. After the file is opened on mobile phone 100, the user may adjust the size of interface 204.

[0133] In this manner, if file 3 is opened on the mobile phone 100, file 3 is not opened on the portable computer.

[0134] The user may view the file 3 on the mobile phone 100 by using the first application, and the user may perform an editing operation on the file 3 on the mobile phone 100 by using the first application, for example, delete content, add content, or modify content in the file 3. After the user completes the operation on the file 3, the file 3 may be saved, and the mobile phone 100 may update the data of the file 3 stored in the local file system of the mobile phone 100.

[0135] FIG. 6 is a schematic diagram of the process of opening a file in multi-screen collaboration mode after the method provided in the foregoing embodiment of the present application is used.

[0136] In Fig. 6, 1 indicates that a user taps a file displayed on the display interface of the mobile phone 100, and first manager software (e.g., mobile phone assistant in Fig. 6) installed on the mobile phone 100 obtains the user's tap operation information and responds to the tap. Alternatively, in Fig. 6, 1 indicates that a user clicks on a file displayed on the projection interface 202 of the mobile phone on the display of the portable computer, and second manager software (e.g., PC manager in Fig. 6) installed on the portable computer obtains the user's click operation information and responds to the click.

[0137] In FIG. 6, 2 indicates that the second manager software transmits the acquired click operation information of the user to the first manager software.

[0138] In FIG. 6, 3 indicates that the first manager software performs focus determination, i.e., determines the location of the user's operational focus. In an embodiment of the present application, for example, the first manager software may determine the user's focus based on a parameter of a tap response. For example, if the tap operation information is transmitted by the second manager software, the first manager software may set the value of the parameter of the tap response to a first value when responding to the tap. If the tap operation information is transmitted by a sensor (e.g., touch sensor 180K) within the mobile phone 100, the first manager software may set the value of the parameter of the tap response to a second value when responding to the tap. In this way, when determining the focus, the first manager software can determine the device on which the user's operation is performed or the device on which the user's operational focus is located based on different values ​​of the parameter of the tap operation.

[0139] In FIG. 6, 4 indicates that the first manager software performs different processing based on the focus determination result.

[0140] If the first manager software determines that the user's operational focus is on the portable computer, the first manager software may stop opening the file, because the user's operational focus is located on the portable computer and therefore the file needs to be opened on the portable computer, not on the mobile phone 100. Therefore, the mobile phone 100 needs to stop the operation that is originally required to open the file.

[0141] 6, 5 indicates that the first manager software acquires the path of the file. The path of the file in this case is the absolute path of the file, that is, the storage path of the file in the mobile phone 100.

[0142] In Figure 6, 6 indicates that the first manager software creates a soft link in the distributed file system of the mobile phone. The soft link points to a first storage path, which is the storage path of a file in the mobile phone, for example, the storage path of the file in the SD card of the mobile phone or the URL of the file. In addition, the soft link is further associated with file metadata, which includes, for example, the storage path of the file and, optionally, may further include file type information.

[0143] In FIG. 6, 7 indicates that the distributed file system of the mobile phone 100 synchronizes the metadata of the file with the distributed file system of the portable computer.

[0144] In FIG. 6, 8 indicates that the first manager software obtains the path of the soft link created in the distributed file system of the mobile phone 100 .

[0145] 6, 9 indicates that the first manager software sends the path of the soft link created in the distributed file system of the mobile phone 100 to the second manager software. In addition, the first manager software may also obtain file metadata, for example, file type information, and the first manager software may send the obtained file metadata to the second manager software.

[0146] In Figure 6, 10 and 11 indicate that the second manager software calls an application that can open the file based on the file type information. In addition, the second manager software also sends the path of the soft link to the application. In Figure 6, an example is used in which the application is a Microsoft office application.

[0147] In FIG. 6, 12 indicates that the office application opens the soft link based on the path of the soft link.

[0148] In FIG. 6, 13 indicates that the distributed file system of the portable computer requests to retrieve a file from the distributed file system of the mobile phone 100 based on the metadata corresponding to the soft link (e.g., based on the storage path of the file included in the metadata).

[0149] In FIG. 6 , 14 indicates that the distributed file system of the mobile phone 100 retrieves the file that the soft link actually points to. For example, the distributed file system of the mobile phone 100 retrieves the file from the local file system of the mobile phone 100. The distributed file system of the mobile phone 100 then transmits the retrieved file to the distributed file system of the portable computer, allowing an office application on the portable computer to open the file. The portable computer may also store data for file 3 on the portable computer. For example, the portable computer may use a second application to store the data for file 3 in the local file system of the portable computer, e.g., as a temporary file. A user may use the second application on the portable computer to perform an operation on file 3, such as modifying, deleting, or adding content, and the temporary file stored in the local file system of the portable computer may be updated. After the update, the portable computer may send the updated file to the mobile phone 100, allowing the mobile phone 100 to update the original file stored in the local file system of the mobile phone 100 based on the updated file.

[0150] 6A to 6C illustrate how to open a file on a portable computer. Alternatively, if the first manager software determines that the user's operational focus is on the mobile phone 100, the mobile phone 100 may invoke an application capable of opening the file, such as the first application. Then, referring to 15 in FIG. 6A, the first application opens the file based on the file's storage path in the local file system of the mobile phone 100.

[0151] After the method provided in the embodiment of the present application is used for the same file in the first device, the final experience effect between the operation on the first device and the operation in the collaborative window (e.g., the projection interface 202) mirrored by the first device to the second device is different. Even in a multi-screen collaboration scenario, the first device may intelligently select a device based on the user's current focus (e.g., the device on which the user's operation is performed) to open, edit, and save the corresponding file, allowing the user to complete office work without leaving or switching the currently focused screen, providing the user with a better preview and editing experience.

[0152] In the above-mentioned manner, when a user performs an operation on the mobile phone 100, the mobile phone 100 opens the corresponding file. The following describes another manner. In this manner, when a user performs an operation on the mobile phone 100, the mobile phone 100 may provide the user with an option to select whether to open the corresponding file on the mobile phone 100 or on a portable computer. In this manner, the device on which the file is finally opened can better meet the user's requirements.

[0153] For example, a user performs a second operation on the mobile phone 100. The second operation is, for example, a touch operation, and the second operation is used to open a first file. Further refer to FIG. 5A . The second operation is an operation in which the user touches a file icon “File 3” on a display interface of the mobile phone using a finger, which indicates that the user is trying to open File 3. The touch sensor 180K on the display 194 of the mobile phone 100 may capture the second operation and obtain event information of the second operation. The touch sensor 180K may transmit the event information of the second operation to the first manager software. The event information of the second operation may include, for example, an identifier of the mobile phone 100 and may optionally further include position information of the second operation, etc. The position information of the second operation is, for example, absolute position information of the second operation on the display 194. It should be understood that the touch operation in this specification may be replaced with a floating operation, a voice command, etc. Although the touch operation is used in this specification as an example for explanation, this does not constitute a limitation on the embodiments of the present application.

[0154] After the first manager software acquires the event information of the second operation, the event information of the second operation includes an identifier of the mobile phone 100. Therefore, the first manager software may determine that the event information of the second operation corresponds to the mobile phone 100, i.e., that the second operation is an operation performed on the mobile phone 100. In other words, the first manager software determines that a file icon corresponding to the second operation (e.g., the file icon "File 3") is located on the display interface of the mobile phone 100. In this case, the first manager software may output prompt information 205 by using the display 194. The prompt information 205 may include one or more options, and the prompt information 205 may be used to determine the device on which File 3 should be opened. For example, FIG. 7A is a schematic diagram of prompt information 205 displayed on the display 194 of the mobile phone 100. For example, the prompt information 205 includes four options. One option is "Computer Application," which indicates that File 3 should be opened on a collaborative device (e.g., a portable computer). The remaining three options are "1," "2," and "3," which represent Application 1, Application 2, and Application 3, respectively. All three applications are applications on mobile phone 100 and are also applications that can open file 3. One or more applications on mobile phone 100 can open the first file. If only one application on mobile phone 100 can open the first file, prompt information 205 displays only one option in addition to the option "Computer Applications." Alternatively, if multiple applications on mobile phone 100 can open the first file, prompt information 205 may display options corresponding to all or some of the applications that can open the first file in addition to the option "Computer Applications."If the user selects the option "Computer Application", this indicates that the user has selected to open the first file on the collaborative device. If the user selects any application other than "Computer Application", this indicates that the user has selected to open the first file on the mobile phone 100 by using that application.

[0155] 7B, for example, the user may use a finger to touch the option "Computer Application" included in the prompt information 205, indicating that the user has selected "Computer Application." In this case, the distributed file system of the mobile phone 100 may synchronize the metadata of the first file corresponding to the first operation with the distributed file system of the portable computer. For the file metadata, please refer to the above description. For the operation process after the portable computer obtains the metadata of the first file, please refer to the above description of the process of opening file 3 on the portable computer.

[0156] Optionally, in FIG. 7A or 7B , the prompt information 205 output by the mobile phone 100 may not include specific options on the portable computer. That is, the user cannot select a specific application on the portable computer based on the prompt information 205 output by the mobile phone 100. For example, in FIG. 7A or 7B , if the user selects to open an application on the portable computer, the user may select the option “Computer Application,” which corresponds only to the portable computer and does not correspond to a specific application on the portable computer. If the user selects to open a first file on the portable computer, the portable computer selects a corresponding application for opening the first file based on the type of the first file. Alternatively, in another manner, the prompt information 205 output by the mobile phone 100 may include options on the portable computer. For example, FIG. 7C is a schematic diagram of another prompt information 205 displayed on the display 194 of the mobile phone 100. For example, the prompt information 205 includes five options. The five options are "1," "2," "3," "4," and "5," representing Application 1, Application 2, Application 3, Application 4, and Application 5, respectively. Application 4 and Application 5 are applications on the portable computer and are also applications that can open File 3, which indicates that File 3 is to be opened on a collaborative device (e.g., the portable computer). Application 1, Application 2, and Application 3 are applications on the mobile phone 100 and are also applications that can open File 3.7B, the display fonts of "4" and "5" are large and bold, indicating that application 4 and application 5 are applications on the portable computer, or another prompting method may be used to indicate that the corresponding applications are applications on the portable computer, for example, prompt text may be displayed, in which case the user may select the application to be used to open the first file on the portable computer, resulting in a better user browsing experience.

[0157] 7D , for example, the user may touch option “1” by using a finger, which indicates that the user selects to open a first file on the mobile phone 100 by using application 1 corresponding to “1”, and the first manager software may call application 1 corresponding to “1” to open file 3. For the operation process after the first manager software calls application 1 corresponding to “1” to open file 3, please refer to the above description of the process of opening file 3 on the mobile phone 100.

[0158] For example, a user may perform an operation on a mobile phone 100, but the user may actually expect to present the corresponding file to another user on a portable computer for viewing. In this scenario, according to the technical solution provided in the embodiment of the present application, the user may choose to open the file on the portable computer to complete the presenting process. According to the technical solution provided in the embodiment of the present application, the user is given an opportunity to choose, and it is found that it is more convenient for the user to select an appropriate device for opening the corresponding file.

[0159] In multi-screen collaboration mode, the collaborative window displayed on the second device is a mirror of the display interface of the first device. Therefore, according to existing methods, whether a user performs an operation on the first device or on the collaborative window of the second device, the operation process is from the same source, and ultimately, the second device actually responds to the user's operation. However, embodiments of the present application break down this "same source" barrier by using technology. A decision mechanism is added to the first device. If a user performs an operation on the same file on different devices, the file may be opened on the different devices. This creates a differentiated experience different from the prior art, providing a better user experience. In addition, the user does not need to open the corresponding file on the first device after exiting multi-screen collaboration mode, which simplifies the user's operation steps, reduces the device's response process, and helps reduce device power consumption.

[0160] With reference to the above-mentioned embodiments and the related accompanying drawings, an embodiment of the present application provides a method for opening a first file. The method can be used in a multi-screen collaboration scenario. For example, the method relates to a first device and a second device. For the structure of the first device, please refer to FIG. 1. Please refer to FIG. 8A and FIG. 8B. The following describes the steps of the method. For ease of understanding, the following description will use an example in which the first device is a mobile phone 100 and the second device is a portable computer.

[0161] S801: The mobile phone 100 and the portable computer enter the multi-screen collaboration mode in a preset manner. For example, if the mobile phone 100 and the portable computer enter the multi-screen collaboration mode as long as a connection is established, S801 may be replaced with "The mobile phone 100 and the portable computer establish a connection." Alternatively, the mobile phone 100 and the portable computer must first establish a connection, and then the user performs a corresponding operation, so that the mobile phone 100 and the portable computer enter the multi-screen collaboration mode. In this case, before S801, the mobile phone 100 and the portable computer must first establish a connection.

[0162] There may be multiple operation methods for the mobile phone 100 and the portable computer to enter the multi-screen collaboration mode. For example, a user may hold the mobile phone 100 and tap the portable computer, or the mobile phone 100 and the portable computer may establish an NFC connection to enter the multi-screen collaboration mode. In this case, the preset method is the "one-hop" method. Alternatively, the preset method may be another method. For specific details, please refer to the above description.

[0163] After the mobile phone 100 and the portable computer enter the multi-screen collaboration mode, a first interface is displayed on the display of the portable computer, and the first interface is a mirror of the display interface of the mobile phone 100. It is understood that the mobile phone 100 displays the first interface, the portable computer displays a second interface, and the mobile phone 100 may project the first interface onto the display of the portable computer, or in other words, project the first interface onto the second interface. After projection, the second interface includes the first interface. The first interface may include at least one file icon. Each file icon corresponds to one file, and at least one file icon corresponds to at least one file, and the at least one file is stored on the mobile phone 100. For example, the first interface is the projection interface 202 shown in FIG. 3C , where “File 1,” “File 2,” and “File 3” represent three file icons, and the three file icons correspond to three files: File 1, File 2, and File 3.

[0164] For further details on S801, please refer to the above description.

[0165] S802: A user performs an operation on the portable computer, and the portable computer collects the user's operation and obtains event information corresponding to the operation. For example, the operation may be referred to as a first operation, and the portable computer may capture the first operation and obtain event information for the first operation. The first operation may be performed on a file icon. For example, the file icon may be referred to as a first file icon, and the first file icon may belong to at least one file icon. That is, the user performs a first operation on a first file icon on a first interface included in a second interface displayed on the portable computer. The first file icon corresponds to a file, for example, the file may be referred to as a first file. For a description of the event information for the first operation, please refer to the related content above.

[0166] For example, the first operation is a touch operation. See, for example, FIG. 4A . Alternatively, the first operation may be another type of operation, such as a gesture operation, a sound control operation, or a floating operation. The purpose of the user performing the first operation is to open a first file. Therefore, the first operation is an operation to open a first file.

[0167] For further details on S802, please refer to the above description.

[0168] S803: The portable computer transmits event information of the first operation to the mobile phone 100, and the mobile phone 100 receives the event information of the first operation from the portable computer. The mobile phone 100 receiving the event information of the first operation may also be equivalent to the mobile phone 100 detecting an operation performed on the first file icon.

[0169] For example, a sensor (e.g., a touch sensor or another sensor) in the portable computer collects event information of the first operation and transmits the event information of the first operation to second manager software installed on the portable computer. The second manager software may transmit the event information of the first operation to the first manager software installed on the mobile phone 100, and the first manager software receives the event information of the first operation from the second manager software. The first manager software receiving the event information of the first operation may also be equivalent to the first manager software detecting an operation performed on the first file icon.

[0170] For further details on S803, please refer to the above description.

[0171] S804: The mobile phone 100 determines that the event information of the first operation corresponds to the portable computer. In other words, the mobile phone 100 determines that the first operation was performed on the portable computer. In other words, the mobile phone 100 determines that the first operation (or the event information of the first operation) was performed on the display of the portable computer. In other words, the mobile phone 100 determines that a file icon corresponding to the first operation is located on the display interface of the portable computer. The fact that the first operation corresponds to the portable computer means that the first operation is an operation performed on the portable computer.

[0172] For example, after the first manager software receives the first operation event information, the first operation event information includes an identifier of the second device, so the first manager software determines that the first operation event information corresponds to the portable computer, i.e., determines that the first operation is an operation performed on the portable computer. In other words, the first manager software determines that a file icon corresponding to the first operation is located on the display interface of the portable computer. For example, the first operation event information indicates that the first operation is a touch operation, so the first manager software may determine that the first operation is an operation performed on the display of the portable computer, or may determine that a file icon corresponding to the first operation is located on the display interface of the portable computer.

[0173] For further details on S804, please refer to the above description.

[0174] S805: The mobile phone 100 determines that the file corresponding to the event information of the first operation is the first file, or the mobile phone 100 determines the storage path of the first file corresponding to the event information of the first operation, or the mobile phone 100 determines that the first operation corresponds to the first file.

[0175] For example, if the event information of the first operation includes relative position information of the first operation on the first interface, the first manager software may determine a file, such as the first file, corresponding to the first operation based on the area conversion ratio between the first interface and the display 194 of the mobile phone 100 and the relative position information of the first operation. The first file is, for example, file 3 described above. In addition, the first manager software may determine a storage path of the first file, and the first manager software may create a soft link corresponding to the first file in the distributed file system of the mobile phone 100. The soft link points to the storage path of the first file. For example, the soft link points to the storage path of the first file in the SD card of the mobile phone or the URL of the file. In addition, the soft link is associated with metadata of the first file.

[0176] For further details on S805, please refer to the above description.

[0177] S806: The mobile phone 100 transmits the metadata of the first file to the portable computer, and the portable computer receives the metadata of the first file from the mobile phone 100.

[0178] For example, the metadata of the first file may include one or more of the following: a name of the first file, type information of the first file, size information of the first file, or storage path information of the first file. For further description of the metadata of the first file, please refer to the above description.

[0179] For example, the distributed file system of the mobile phone 100 may synchronize (or send) metadata for the file corresponding to the first operation to the distributed file system of the portable computer.

[0180] For further details on S806, please refer to the above description.

[0181] S807: The portable computer determines an application to be used to open the first file based on the metadata of the first file. The application is, for example, called the second application.

[0182] The first manager software may obtain a path of a soft link created in the distributed file system of the mobile phone 100, and may send the path of the soft link to the second manager software. In addition, the first manager software may obtain file metadata, such as file type information, and may send the obtained file metadata to the second manager software. The second manager software may determine and call an application that can open the file based on the file type information, etc. For example, the second manager software may determine that the second application can open the file.

[0183] For further details on S807, please refer to the above description.

[0184] S808: The portable computer invokes the second application to open the first file.

[0185] The first file, i.e., the data of the first file, is obtained from the mobile phone 100 based on the metadata of the first file.

[0186] The portable computer invokes the second application, and the second application opens the soft link based on the path of the soft link. In this case, the distributed file system of the portable computer may obtain the first file from the mobile phone 100 based on the metadata corresponding to the soft link. This may be understood as obtaining data of the first file from the mobile phone 100. For example, the distributed file system of the portable computer may obtain the first file from the mobile phone 100 based on the storage path information of the first file included in the metadata corresponding to the soft link. Thus, the second application can open the first file. In addition, the portable computer may further store data of the first file on the portable computer. For example, the portable computer may store data of the first file in the local file system of the portable computer by using the second application, for example, storing the data of the first file as a temporary file.

[0187] For an example of the second manager software opening the first file, see any one of Figures 4B to 4D.

[0188] For further details on S808, please refer to the above description.

[0189] S809: The user edits the first file on the portable computer and saves the edited first file. The edited first file may be called, for example, a second file or an updated file. The name of the file is not limited.

[0190] A user may view a first file on the portable computer or perform editing operations on the first file on the portable computer, for example, deleting content in the first file, adding content, or modifying content. After the user completes the operations on the first file, the first file may be saved. In this case, the portable computer may update the stored first file or update the data of the first file to obtain updated data of the first file. The updated data of the first file may be understood as the updated first file, i.e., the second file.

[0191] For further details on S809, please refer to the above description.

[0192] S810: The portable computer transmits a second file to the mobile phone 100, and the mobile phone 100 receives the second file from the portable computer.

[0193] The portable computer may send the second file to the mobile phone 100. For example, the portable computer may synchronize the second file with the distributed file system of the mobile phone 100 by using the distributed file system of the portable computer, so that the mobile phone 100 can use the second file to overwrite the first file stored in the local file system of the mobile phone. In this way, the first file is updated. The portable computer may send the second file obtained to the mobile phone 100 every time the user updates the first file, so that the first file can be updated in a timely manner on the mobile phone side. Alternatively, the portable computer may send the second file obtained after the user closes the first file to the mobile phone 100, thereby reducing the number of times updated data needs to be sent and reducing transmission overhead.

[0194] In addition, after the portable computer transmits the second file to the mobile phone 100, the portable computer may delete the stored second file to free up storage space.

[0195] For further details on S810, please refer to the above description.

[0196] S811: A user performs an operation on the mobile phone 100, and the mobile phone 100 collects the user's operation to obtain event information corresponding to the operation, or the mobile phone 100 detects event information corresponding to the operation. For example, the operation may be referred to as a first operation, and the mobile phone 100 may capture the first operation and obtain event information for the first operation. The first operation may be performed on a file icon. For example, the file icon may be referred to as a first file icon, and the first file icon may belong to at least one file icon. That is, the user performs a first operation on a first file icon on a first interface displayed on the mobile phone 100. The first file icon corresponds to a file, for example, the file may be referred to as a first file.

[0197] The mobile phone 100 collecting (or detecting) event information of the user's first operation is equivalent to the mobile phone 100 detecting a first operation performed on a first file icon.

[0198] For example, the first operation is a touch operation. See, for example, FIG. 5A . Alternatively, the first operation may be another type of operation, such as a gesture operation, a sound control operation, or a floating operation. The purpose of the user performing the first operation is to open a first file. Therefore, the first operation is an operation to open a first file.

[0199] For further details on S811, please refer to the above description.

[0200] S812: The mobile phone 100 determines that the event information of the first operation corresponds to the mobile phone 100. In other words, the mobile phone 100 determines that the first operation was performed on the mobile phone 100. In other words, the mobile phone 100 determines that the first operation (or the event information of the first operation) was performed on the display of the mobile phone 100. In other words, the mobile phone 100 determines that a file icon corresponding to the first operation is located on the display interface of the mobile phone 100. The fact that the first operation corresponds to the mobile phone 100 means that the first operation is an operation performed on the mobile phone 100.

[0201] For example, after the first manager software obtains the event information of the first operation, because the event information of the first operation includes an identifier of the mobile phone 100, the first manager software may determine that the event information of the first operation corresponds to the mobile phone 100, that is, determine that the second operation is an operation performed on the mobile phone 100. In other words, the first manager software determines that a file icon corresponding to the second operation is located on the display interface of the mobile phone 100. For example, the event information of the first operation indicates that the first operation is a touch operation, and the first manager software may determine that the touch operation is an operation performed on the display of the mobile phone 100, or may determine that a file icon corresponding to the touch operation is located on the display interface of the mobile phone 100.

[0202] For further details on S812, please refer to the above description.

[0203] S813: The mobile phone 100 determines that the file corresponding to the event information of the first operation is the first file, or the mobile phone 100 determines the storage path of the first file corresponding to the event information of the first operation, or the mobile phone 100 determines that the first operation corresponds to the first file.

[0204] For example, if the event information of the first operation includes absolute position information of the first operation on the display interface of the mobile phone, the first manager software may determine a file, such as a first file, corresponding to the first operation based on the position information of the first operation, and the first manager software may determine a storage path of the first file. The first file is, for example, the above-mentioned file 3.

[0205] For further details on S813, please refer to the above description.

[0206] S814: The mobile phone 100 invokes the first application to open the first file.

[0207] For example, the first manager software may determine an application, such as the first application, that can open the first file based on the type of the first file.

[0208] For further details on S814, please refer to the above description.

[0209] S815: The user edits the first file on the mobile phone 100 and saves the edited first file. The edited first file is called, for example, a second file.

[0210] For further details on S815, please refer to the above description.

[0211] A user may view a first file on the mobile phone 100 or perform editing operations on the first file on the mobile phone 100, for example, deleting content in the first file, adding content, or modifying content. After the user completes the operations on the first file, the first file may be saved. In this case, the mobile phone 100 may update the first file stored in memory or update the data of the first file to obtain updated data of the first file. The updated data of the first file may be understood as the updated first file, i.e., the second file.

[0212] S802 to S810 and S811 to S815 are two parallel solutions that are not performed simultaneously. For example, when a user performs an operation, if the user selects to perform the operation on the portable computer, S802 to S810 may be performed, and if the user selects to perform the operation on the mobile phone 100, S811 to S815 may be performed.

[0213] After the method provided in this embodiment of the present application is used for the same file in the first device, the final experience effect is different between the operation on the mobile phone 100 and the operation in the collaborative window (e.g., the projection interface 202) mirrored by the mobile phone 100 to the portable computer. Even in a multi-screen collaboration scenario, the mobile phone 100 may intelligently select a device (e.g., the mobile phone 100 or the portable computer) based on the user's current focus (e.g., the device on which the user's operation is performed) to open, edit, and save the corresponding file, allowing the user to complete office work without leaving or switching the currently focused screen, providing the user with a better preview and editing experience.

[0214] In the method for opening a first file, when a user performs an operation on the mobile phone 100, the mobile phone 100 opens the corresponding file. Next, an embodiment of the present application further provides a method for opening a second file. In this method, when a user performs an operation on the mobile phone 100, the mobile phone 100 may provide the user with an option, and the user selects whether to open the corresponding file on the mobile phone 100 or on a portable computer. The method for opening a second file provided in this embodiment of the present application can be used in a multi-screen collaboration scenario. For example, the method relates to a first device and a second device. For the structure of the first device, please refer to FIG. 1. Please refer to FIGS. 9A and 9B. The following describes the steps of the method. For ease of understanding, the following description uses an example in which the first device is the mobile phone 100 and the second device is a portable computer.

[0215] S901: The mobile phone 100 and the portable computer enter a multi-screen collaboration mode in a preset manner.

[0216] For further details of S901, please refer to the description of S801 in the embodiment shown in FIGS. 8A and 8B or the above description.

[0217] S902: A user performs an operation on the portable computer, and the portable computer collects the user's operation and obtains event information corresponding to the operation. For example, the operation may be referred to as a first operation, and the portable computer may capture the first operation and obtain event information for the first operation. The first operation may be performed on a file icon. For example, the file icon may be referred to as a first file icon, and the first file icon may belong to at least one file icon. That is, the user performs a first operation on a first file icon on a first interface included in a second interface displayed on the portable computer. The first file icon corresponds to a file, for example, the file may be referred to as a first file.

[0218] For further details of S902, please refer to the description of S802 in the embodiment shown in FIGS. 8A and 8B or the above description.

[0219] S903: The portable computer transmits event information of the first operation to the mobile phone 100, and the mobile phone 100 receives the event information of the first operation from the portable computer. The mobile phone 100 receiving the event information of the first operation may also be equivalent to the mobile phone 100 detecting an operation performed on the first file icon.

[0220] For further details of S903, please refer to the description of S803 in the embodiment shown in FIGS. 8A and 8B or the above description.

[0221] S904: The mobile phone 100 determines that the event information of the first operation corresponds to the portable computer. In other words, the mobile phone 100 determines that the first operation was performed on the portable computer. In other words, the mobile phone 100 determines that the first operation (or the event information of the first operation) was performed on the display of the portable computer. In other words, the mobile phone 100 determines that a file icon corresponding to the first operation is located on the display interface of the portable computer. The fact that the first operation corresponds to the portable computer means that the first operation is an operation performed on the portable computer.

[0222] For further details of S904, please refer to the description of S804 in the embodiment shown in FIGS. 8A and 8B or the above description.

[0223] S905: The mobile phone 100 determines that the file corresponding to the event information of the first operation is the first file, or the mobile phone 100 determines the storage path of the first file corresponding to the event information of the first operation, or the mobile phone 100 determines that the first operation corresponds to the first file.

[0224] For further details of S905, please refer to the description of S805 in the embodiment shown in FIGS. 8A and 8B or the above description.

[0225] S906: The mobile phone 100 transmits the metadata of the first file to the portable computer, and the portable computer receives the metadata of the first file from the mobile phone 100.

[0226] For further details of S906, please refer to the description of S806 in the embodiment shown in FIGS. 8A and 8B or the above description.

[0227] S907: The portable computer determines an application to be used to open the first file based on the metadata of the first file. The application is, for example, called the second application.

[0228] For further details of S907, please refer to the description of S807 in the embodiment shown in FIGS. 8A and 8B or the above description.

[0229] S908: The portable computer invokes the second application to open the first file.

[0230] For further details of S908, please refer to the description of S808 in the embodiment shown in FIGS. 8A and 8B or the above description.

[0231] S909: The user edits a first file on the portable computer and saves the edited first file. The edited first file may be called, for example, a second file or an updated file. The name of the file is not limited.

[0232] For further details of S909, please refer to the description of S809 in the embodiment shown in FIGS. 8A and 8B or the above description.

[0233] S910: The portable computer transmits a second file to the mobile phone 100, and the mobile phone 100 receives the second file from the portable computer.

[0234] For further details of S910, please refer to the description of S810 in the embodiment shown in FIGS. 8A and 8B or the above description.

[0235] S911: A user performs an operation on the mobile phone 100, and the mobile phone 100 collects information about the user's operation and obtains event information corresponding to the operation, or the mobile phone 100 detects event information corresponding to the operation. For example, the operation may be referred to as a first operation, and the mobile phone 100 may capture the first operation and obtain event information for the first operation. The first operation may be performed on a file icon. For example, the file icon may be referred to as a first file icon, and the first file icon may belong to at least one file icon. That is, the user performs a first operation on a first file icon on a first interface displayed on the mobile phone 100. The first file icon corresponds to a file, for example, the file may be referred to as a first file.

[0236] The mobile phone 100 collecting (or detecting) event information of the user's first operation is equivalent to the mobile phone 100 detecting a first operation performed on a first file icon.

[0237] For further details of S911, please refer to the description of S811 in the embodiment shown in FIGS. 8A and 8B or the above description.

[0238] S912: The mobile phone 100 determines that the event information of the first operation corresponds to the mobile phone 100. In other words, the mobile phone 100 determines that the first operation has been performed on the mobile phone 100. In other words, the mobile phone 100 determines that the first operation (or the event information of the first operation) has been performed on the display of the mobile phone 100. In other words, the mobile phone 100 determines that a file icon corresponding to the first operation is located on the display interface of the mobile phone 100.

[0239] For further details of S912, please refer to the description of S812 in the embodiment shown in FIGS. 8A and 8B or the above description.

[0240] S913: The mobile phone 100 outputs prompt information, and the prompt information is used to determine the device in which the first file should be opened.

[0241] For example, the mobile phone 100 may output prompt information by using the display 194. The prompt information may include one or more options, which may be used to determine the device on which the first file should be opened. See Figure 7A or 7B for examples of prompt information.

[0242] For further details on S913, please refer to the above description.

[0243] S914: The user selects a first option among one or more options, and the mobile phone 100 detects the operation of selecting the first option.

[0244] For example, as further shown in FIG. 7D , if a user touches option “1” by using a finger, touch sensor 180K may detect the operation and collect operation event information. After collecting the operation event information, touch sensor 180K may send the operation event information to the first manager software. After receiving the operation event information from touch sensor 180K, the first manager software determines that the user has selected to open a first file on mobile phone 100 by using application 1 corresponding to “1.”

[0245] For example, the first option corresponds to a first application, and for example, the first application is installed on the mobile phone 100 .

[0246] For further details on S914, please refer to the above description.

[0247] S915: The mobile phone 100 determines that the file corresponding to the event information of the first operation is the first file, or the mobile phone 100 determines the storage path of the first file corresponding to the event information of the first operation, or the mobile phone 100 determines that the first operation corresponds to the first file.

[0248] For further details of S915, please refer to the description of S813 in the embodiment shown in FIGS. 8A and 8B or the above description.

[0249] S916: The mobile phone 100 invokes the first application to open the first file.

[0250] For further details of S916, please refer to the description of S814 in the embodiment shown in FIGS. 8A and 8B or the above description.

[0251] S917: The user edits the first file on the mobile phone 100 and saves the edited first file. The edited first file is called, for example, a second file.

[0252] For further details of S917, please refer to the description of S815 in the embodiment shown in Figures 8A and 8B or the above description.

[0253] S918: The user selects a second option from among the one or more options included in the prompt information, and the mobile phone 100 detects the operation of selecting the second option.

[0254] For example, as further shown in FIG. 7B , if a user touches the option “Computer Applications” by using a finger, touch sensor 180K may detect the operation and collect operation event information. After collecting the operation event information, touch sensor 180K may send the operation event information to the first manager software. After receiving the operation event information from touch sensor 180K, the first manager software determines that the user has selected to open a first file on the portable computer.

[0255] For further details on S918, please refer to the above description.

[0256] After S918 is performed, S906 to S910 may be performed subsequently, and the details will not be described again.

[0257] Steps S902 to S910 and steps S911 to S918 and subsequent steps are two parallel solutions and are not performed simultaneously. For example, when a user performs an operation, if the user selects to perform the operation on the portable computer, steps S902 to S910 may be performed, and if the user selects to perform the operation on the mobile phone 100, steps S911 to S918 and subsequent steps may be performed. In addition, steps S914 to S917 and steps S918 and subsequent steps are also two parallel solutions and are not performed simultaneously. For example, when a user performs an operation based on prompt information, if the user selects to open a first file on the portable computer, steps S918 and subsequent steps may be performed, and if the user selects to open a first file on the mobile phone 100, steps S914 to S917 may be performed.

[0258] For example, a user may perform an operation on a mobile phone 100, but the user may actually expect to present the corresponding file to another user on a portable computer for viewing. In this scenario, according to the technical solution provided in this embodiment of the present application, the user may choose to open the file on the portable computer to complete the presenting process. According to the technical solution provided in this embodiment of the present application, the user is provided with an opportunity to choose, and it is found that it is more convenient for the user to select an appropriate device for opening the corresponding file.

[0259] In the foregoing embodiments provided in this application, the methods provided in the embodiments of this application are described in terms of the mobile phone 100 and the portable computer that function as execution entities. To realize the functions of the foregoing methods provided in the embodiments of this application, the mobile device (e.g., the mobile phone 100 or the portable computer) may include a hardware structure and / or a software module, and may realize the foregoing functions in the form of a hardware structure, a software module, or a combination of a hardware structure and a software module. Whether the functions among the foregoing functions are performed by using a hardware structure, a software module, or a combination of a hardware structure and a software module depends on the specific application and design constraints of the technical solution.

[0260] As shown in FIG. 10 , some other embodiments of the present application disclose an electronic device. The electronic device is, for example, a mobile phone (e.g., mobile phone 100), a Pad, or a portable computer. The electronic device may include a touchscreen 1001 including a touch-sensitive surface 1006 and a display 1007, an application 1008, one or more processors 1002, and one or more memories 1003 configured to store one or more programs 1004. The aforementioned components may be connected via one or more communication buses 1005. The display 1007 may be configured to display the contents of a file in the electronic device, or the display 1007 may be further configured to display the desktop of the electronic device, or the display 1007 may be configured to display images, etc.

[0261] When one or more programs 1004 stored in memory 1003 are executed by one or more processors 1002, the electronic device may be configured to perform the steps of the embodiment shown in Figures 8A and 8B, the embodiment shown in Figures 9A and 9B, or another corresponding embodiment.

[0262] It should be noted that in this embodiment of the present application, the division into units is merely an example and merely a logical division of functions. In actual implementation, other division schemes may be used. The functional units in the embodiment of the present invention may be integrated into one processing unit, each unit may exist physically alone, or two or more units may be integrated into one unit. For example, in the above embodiment, the first acquisition unit and the second acquisition unit may be the same unit or different units. The integrated unit may be realized in the form of hardware, in the form of a software functional unit, or in the form of a combination of hardware and software functional units.

[0263] Depending on the context, the term "when" used in the foregoing embodiments may be interpreted to mean "if," "after," "in response to determining," or "in response to detecting." Similarly, depending on the context, the phrases "when it is determined that" or "if (a stated condition or event) is detected" may be interpreted to mean "if determining," or "in response to determining," or "when (a stated condition or event) is detected," or "in response to detecting (a stated condition or event)."

[0264] All or part of the above-described embodiments may be realized by software, hardware, firmware, or any combination thereof. When software is used to realize an embodiment, the embodiment may be fully or partially realized in the form of a program product. The program product includes one or more computer instructions. When the program instructions are loaded and executed on a computer, the procedures or functions according to the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or another programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, radio wave, microwave) method. The computer-readable storage medium may be any available medium accessible by a computer, or may be a data storage device, such as a server or data center, that integrates one or more available media. The available media may be magnetic media (eg, floppy disks, hard disks, or magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, solid state drives).

[0265] For purposes of explanation, the foregoing description has been set forth with reference to specific embodiments. However, the foregoing illustrative discussion is not intended to be exhaustive or to limit the present application to the precise form disclosed. Many modifications and variations are possible in light of the above teachings. The embodiments have been chosen and described in order to fully illustrate the principles and practical applications of the principles of the present application so that others skilled in the art can fully utilize various embodiments with various modifications applicable to the present application and the particular use envisioned.

[0266] In the embodiments provided in the present application, the methods provided in the embodiments of the present application are described from the perspective of using a terminal device as an execution entity. To realize the functions of the aforementioned methods provided in the embodiments of the present application, the terminal device may include a hardware structure and / or a software module, and may realize the aforementioned functions in the form of a hardware structure, a software module, or a combination of a hardware structure and a software module. Whether the functions among the aforementioned functions are performed by using a hardware structure, a software module, or a combination of a hardware structure and a software module depends on the specific application and design constraints of the technical solution. [Explanation of symbols]

[0267] 100 Electronic Devices, Mobile Phones 110 processors 120 External Memory Interface 121 internal memory 130 Universal Serial Bus (USB) interface 140 Charging Management Module 141 Power Management Module 142 Battery 150 Mobile Communication Module 160 Wireless Communication Module 170 Audio Module 170A speaker 170B receiver 170C Microphone 170D Headset Jack 180 Sensor Module 180A Pressure Sensor 180B Gyroscope Sensor 180C Barometric Pressure Sensor 180D Magnetic Sensor 180E Accelerometer 180F distance sensor 180G Optical Proximity Sensor 180H fingerprint sensor 180J Temperature Sensor 180K touch sensor 180L Ambient Light Sensor 180M Bone Conduction Sensor 190 Buttons 191 Motor 192 indicators 193 Camera 194 displays 195 Subscriber Identity Module (SIM) Card Interface 201 Home screen 202 Projection Interface 203 Interface 204 Interface 205 Prompt Information 1001 touchscreen 1002 processor 1003 memory 1004 Program 1005 Communication Bus 1006 Touch-sensitive Surface 1007 Display 1008 Applications

Claims

1. 1. A method of opening a file, comprising: entering a multi-screen collaboration mode by the first device and the second device in a preset manner; displaying, by the first device, a first interface and projecting the first interface onto a second interface of the second device, the first interface including a file icon, the second interface including the first interface, and a file corresponding to the file icon being stored on the first device; detecting an operation performed on the file icon by the first device; determining, by the first device, that the operation was performed on a display screen of the first device or a display screen of a second device; opening, by the first device, the file on the first device when the operation is performed on the display screen of the first device; or transmitting, by the first device, metadata of the file to the second device when the operation is performed on the display screen of the second device, the metadata of the file being used to open the file on the second device; Including, The step of detecting an operation performed on the file icon by the first device includes: receiving, by the first device, event information from the second device, the event information being used to direct the operation, the event information including an identifier of the second device; Including, The step of determining, by the first device, that the operation was performed on the display screen of a second device includes: determining, by the first device, based on the identifier of the second device, that an operation was performed on the display screen of the second device; How to open a file, including:

2. The method comprises: receiving, by the first device, an updated file from the second device, the updated file being the file that has been updated; and updating, by the first device, the stored file with the updated file.

3. transmitting, by the first device, metadata of the file to the second device when the operation is performed on the display screen of the second device, 3. The method of claim 1, further comprising: when the operation is performed on the display screen of the second device, transmitting, by the first device, the metadata of the file to a distributed file system of the second device by using a distributed file system of the first device.

4. The method of claim 3 , wherein the metadata of the file includes storage path information of the file on the first device.

5. The method of claim 4 , wherein the metadata of the file further includes one or more of: type information of the file, size information of the file, or a name of the file.

6. 6. An electronic device comprising a display, one or more processors, a memory, and one or more programs, the one or more programs being stored in the memory and comprising instructions that, when executed by the electronic device, enable the electronic device to perform a method according to any one of claims 1 to 5.

7. 6. A computer-readable storage medium configured to store a computer program that, when executed on a computer, enables the computer to perform the method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Information interaction method and electronic equipment

    CN110618971A

  • Communication system, server device, information processing method, and program

    JP2015114800A