Cross-device file management method and device, electronic device and program product
By displaying icons corresponding to file types in the cross-device file management interface, the problem of insufficient interface information in the prior art is solved, and the convenience and accuracy of user operations are improved.
Patent Information
- Application Number
- CN202411448833.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-02-14
AI Technical Summary
The front-end display interface information of the existing cross-device file management solution is less, which is not intuitive enough, affecting the convenience and accuracy of user operations.
By displaying icons corresponding to file types in the file management interface, users can help identify file types faster and reduce the probability of misoperation.
Improves the convenience and accuracy of users' cross-device file management operations and enhances the intuitiveness of the interface.
Smart Images

Figure CN119440339A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a cross-device file management method, apparatus, electronic device and program product. Background Art
[0002] With the rapid development of information technology, cross-device file management has become an indispensable function in daily work and life. Users can manage files stored on another electronic device on one electronic device, meeting the user's convenient file management needs. Among the cross-device file management solutions currently available on the market, the file management interface displayed on the front end shows less information and is not intuitive enough, which affects the convenience and accuracy of users' file management operations. Summary of the invention
[0003] The embodiments of the present application disclose a cross-device file management method, apparatus, electronic device and program product, which can display icons corresponding to the file types of files in the file management interface, and more intuitively reflect the file types of files through icons, which can help users find files that need to be managed more quickly, reduce the probability of misoperation, and improve the convenience and accuracy of users' management operations on files across devices.
[0004] The embodiment of the present application discloses a cross-device file management method, which is applied to a first electronic device, wherein the first electronic device establishes a communication connection with a second electronic device, and the method includes:
[0005] Acquire file information corresponding to one or more files stored in the second electronic device;
[0006] Displaying a file management interface according to the file information corresponding to the one or more files; displaying one or more icons corresponding to the files in the file management interface, wherein the icons corresponding to the files are determined according to the file types corresponding to the files;
[0007] In response to a triggering operation on a target icon in the file management interface, a management operation is performed on a target file corresponding to the target icon.
[0008] The embodiment of the present application discloses a cross-device file management method, which is applied to a second electronic device, where the second electronic device establishes a communication connection with a first electronic device, and the method includes:
[0009] Sending to the first electronic device file information corresponding to one or more files stored in the second electronic device, so that the first electronic device displays a file management interface according to the file information corresponding to the one or more files; displaying one or more icons corresponding to the files in the file management interface, wherein the icons corresponding to the files are determined according to the file types corresponding to the files; and the file management interface is used to provide management functions for files stored in the second electronic device.
[0010] The embodiment of the present application discloses a cross-device file management device, which is applied to a first electronic device, and the first electronic device establishes a communication connection with a second electronic device, and the device includes:
[0011] An information acquisition module, used to acquire file information corresponding to one or more files stored in the second electronic device;
[0012] A display module, used to display a file management interface according to the file information corresponding to the one or more files; the file management interface displays one or more icons corresponding to the files, and the icons corresponding to the files are determined according to the file types corresponding to the files;
[0013] The management module is used to perform management operations on the target file corresponding to the target icon in response to a trigger operation on the target icon in the file management interface.
[0014] The embodiment of the present application discloses a cross-device file management device, which is applied to a second electronic device, and the second electronic device establishes a communication connection with a first electronic device, and the device includes:
[0015] The information sending module is used to send the file information corresponding to one or more files stored in the second electronic device to the first electronic device, so that the first electronic device displays a file management interface according to the file information corresponding to the one or more files; the file management interface displays one or more icons corresponding to the files, and the icons corresponding to the files are determined according to the file types corresponding to the files; the file management interface is used to provide a management function for the files stored in the second electronic device. .
[0016] An embodiment of the present application discloses an electronic device, including a memory, a processor, and a transceiver unit. The memory stores a computer program. When the computer program is executed by the processor, the electronic device implements the method described in any of the above embodiments.
[0017] An embodiment of the present application discloses a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor in an electronic device, the electronic device implements the method described in any of the above embodiments.
[0018] An embodiment of the present application discloses a computer program product, including a computer program. When the computer program is executed by a processor in an electronic device, the electronic device implements the method described in any of the above embodiments.
[0019] The cross-device file management method, apparatus, electronic device and program product disclosed in the embodiments of the present application, a first electronic device obtains file information corresponding to one or more files stored in a second electronic device, and displays a file management interface based on the file information corresponding to the one or more files, wherein the file management interface displays icons corresponding to one or more files, and the icons corresponding to the files are determined based on the file types corresponding to the files, and the first electronic device responds to a trigger operation on a target icon in the file management interface and performs management operations on target files corresponding to the target icons. In the embodiments of the present application, the first electronic device can display icons corresponding to the file types of files stored in the second electronic device in the file management interface corresponding to the second electronic device, and the file types of the files can be more intuitively reflected through icons, which can help users find files that need to be managed more quickly, reduce the probability of misoperation, and improve the convenience and accuracy of users' management operations on cross-device files. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0021] Figure 1 This is an application scenario diagram of a cross-device file management method in an embodiment;
[0022] Figure 2 A timing diagram of a cross-device file management method in one embodiment;
[0023] Figure 3 is a flowchart of a cross-device file management method in one embodiment;
[0024] Figure 4 is a schematic diagram of an icon in an embodiment;
[0025] Figure 5A A schematic diagram of an interface for triggering a management operation on a file in a second electronic device in an embodiment;
[0026] Figure 5B This is a schematic diagram of an interface for triggering a management operation on a file in a second electronic device in another embodiment;
[0027] Figure 6 A flowchart of implementing a cross-device file search function in one embodiment;
[0028] Fig. 7A This is a schematic diagram of a file management interface in one embodiment;
[0029] Figure 7B This is a schematic diagram of a file management interface in another embodiment;
[0030] Figure 7C This is a schematic diagram of a file management interface in another embodiment;
[0031] Figure 8 A flowchart of a first electronic device managing a target file in a second electronic device in an embodiment;
[0032] Fig. 9 A schematic diagram of a timing sequence of a second electronic device transmitting a file to a first electronic device in an embodiment;
[0033] Fig.10 is a timing diagram for implementing data transmission between a first electronic device and a second electronic device in one embodiment;
[0034] Fig.11 A timing diagram of data transmission between a first electronic device and a second electronic device in another embodiment;
[0035] Fig.12 A timing diagram of data transmission between a first electronic device and a second electronic device in another embodiment;
[0036] Fig.13 A flowchart of a first electronic device downloading a file from a second electronic device in one embodiment;
[0037] Fig.14 A timing diagram of sending a file of a second electronic device to a local third-party application of a first electronic device in one embodiment;
[0038] Fig.15 This is a schematic diagram of a file management interface in another embodiment;
[0039] Fig.16 is a flowchart of a cross-device file management method in another embodiment;
[0040] Fig.17 A block diagram of a cross-device file management apparatus in one embodiment;
[0041] Fig.18 A block diagram of a cross-device file management apparatus in another embodiment;
[0042] Fig.19 FIG. 4 is a structural block diagram of an electronic device in an embodiment. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0044] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present application and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0045] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first electronic device may be referred to as a second electronic device, and similarly, a second electronic device may be referred to as a first electronic device. Both the first electronic device and the second electronic device are electronic devices, but they are not the same electronic device.
[0046] Figure 1 FIG. 1 is an application scenario diagram of a cross-device file management method in an embodiment. Figure 1 As shown, a communication connection can be established between the first electronic device 110 and the second electronic device 120. The first electronic device 110 and the second electronic device 120 may include but are not limited to mobile phones, wearable devices (such as smart watches, smart glasses, etc.), vehicle-mounted terminals, tablet computers, laptops, PCs (Personal Computers), smart home devices and other devices.
[0047] Exemplarily, the first electronic device 110 may be a laptop or a PC, and the second electronic device may be a mobile phone or a wearable device, etc., but is not limited thereto.
[0048] In the embodiment of the present application, cross-device file management can be implemented on the first electronic device 110, and the cross-device file management may refer to the first electronic device 110 managing files stored on other electronic devices (such as the second electronic device 120).
[0049] The communication connection established between the first electronic device 110 and the second electronic device 120 may include, but is not limited to, a Bluetooth communication connection, a Wi-Fi communication connection, a USB (Universal Serial Bus) connection, and the like.
[0050] Optionally, a communication connection may be established between the first electronic device 110 and the second electronic device 120 based on the WebSocket protocol, where the WebSocket protocol is a protocol for full-duplex communication over a single TCP (Transmission Control Protocol) connection.
[0051] In some embodiments, the first electronic device 110 and the second electronic device 120 may be electronic devices from different manufacturers, and the operating system of the first electronic device 110 may be different from the operating system of the second electronic device 120. For example, the operating system of the first electronic device 110 may be a Mac operating system or a Windows operating system, and the second electronic device may be an Android operating system, but is not limited thereto. In related technologies, since electronic devices from different manufacturers support different technical standards and data formats, it is usually difficult to implement cross-device file management between electronic devices from different manufacturers, and the file management interface displayed on the front end shows less information, and the management operations that can be provided are also relatively simple, which cannot meet the user's usage needs.
[0052] In the embodiment of the present application, the first electronic device 110 may install a file management application for implementing a cross-device file management function, and the file management application provides a function for the first electronic device 110 to manage files stored in the second electronic device 120. The file management application may display a file management interface, and the user may perform management operations on the files stored in the second electronic device 120 by interacting with the file management interface.
[0053] When the first electronic device 110 establishes a communication connection with the second electronic device 120, the second electronic device 120 may send file information corresponding to one or more files stored in the first electronic device 110. The first electronic device 110 may obtain file information corresponding to one or more files stored in the second electronic device 120, and display a file management interface based on the file information corresponding to the one or more files. Further, the first electronic device 110 may display the file management interface in a file management application. The file management interface displays icons corresponding to one or more files in the second electronic device 120, wherein the icons corresponding to the files are determined based on the file types corresponding to the files.
[0054] The user can manage files in the second electronic device 120 through the file management interface. The user can select files corresponding to one or more icons in the file management interface for management operations. The first electronic device 110 can respond to the trigger operation of the target icon in the file management interface and manage the target file corresponding to the target icon.
[0055] Figure 2 FIG. 1 is a timing diagram of a cross-device file management method in one embodiment. Figure 2 As shown, the cross-device file management method may include the following steps:
[0056] Step 1: The second electronic device sends file information corresponding to one or more files stored in the second electronic device to the first electronic device, and the first electronic device obtains file information corresponding to one or more files stored in the second electronic device.
[0057] Step 2: The first electronic device displays a file management interface according to the file information corresponding to the one or more files. The file management interface displays icons corresponding to the one or more files in the second electronic device, wherein the icons corresponding to the files are determined according to the file types corresponding to the files.
[0058] Step 3: The first electronic device performs management operations on the target file corresponding to the target icon in response to the trigger operation on the target icon in the file management interface. Furthermore, the first electronic device can implement management operations on the target file in the second electronic device through information interaction with the second electronic device.
[0059] like Figure 3 As shown, in one embodiment, a cross-device file management method is provided, which can be applied to the first electronic device mentioned above. The cross-device file management method may include the following steps:
[0060] Step 310: Obtain file information corresponding to one or more files stored in the second electronic device.
[0061] When the first electronic device establishes a communication connection with the second electronic device, the second electronic device may send file information corresponding to one or more files stored in the second electronic device to the first electronic device. The files stored in the second electronic device may include but are not limited to pictures, videos, audios, documents, application package files, etc. The file information corresponding to the file may refer to information used to describe the file, for example, the file information includes but is not limited to the file name, the application to which the file belongs, the file type corresponding to the file, etc.
[0062] The second electronic device may send file information corresponding to all files stored in the second electronic device to the first electronic device, or may send file information corresponding to some files stored in the second electronic device to the first electronic device.
[0063] As an implementation mode, when a file management application is turned on on the first electronic device, the first electronic device may send a file information acquisition request to the second electronic device. After receiving the file information acquisition request sent by the first electronic device, the second electronic device may respond to the file information acquisition request and send file information corresponding to one or more files stored in the second electronic device to the first electronic device.
[0064] In some embodiments, when a user accesses a file under a target in a second electronic device through a file management application, the first electronic device may respond to the user's access operation to the first directory (e.g., clicking on the first directory) by sending a file information acquisition request corresponding to the first directory to the second electronic device. The file information acquisition request may carry directory information of the first directory (e.g., directory path, directory name, etc.). After receiving the file information acquisition request, the second electronic device may send file information of each file under the first directory to the first electronic device according to the directory information of the first directory carried in the file information acquisition request. . In this way, the accuracy of the files displayed in the file management application can be guaranteed, the omission of files can be avoided, and the accuracy of file management across devices can be improved.
[0065] Step 320, displaying a file management interface according to the file information corresponding to the one or more files; displaying icons corresponding to the one or more files in the file management interface, where the icons corresponding to the files are determined according to the file types corresponding to the files.
[0066] The file management interface may refer to an interface in the file management application for displaying files stored in the second electronic device and providing management functions. The first electronic device may display the file management interface according to file information corresponding to one or more files stored in the second electronic device.
[0067] In the related art, the front-end interface of the application for implementing cross-device file management usually relies on the interface of the local file management tool of the first electronic device. The local file management tool refers to a tool for managing local files of the first electronic device, which cannot be customized, resulting in a poor user experience. Moreover, the icon style displayed on the front-end interface generally follows the icon style of the local file management tool of the first electronic device. There are few icon styles and they are not easy to distinguish. When files of multiple file types are mixed, the error rate of user operation of files is high.
[0068] In the embodiment of the present application, the front-end interface of the file management application does not rely on the local file management tool of the first electronic device, but is a front-end interface designed and developed independently. In some embodiments, the file management interface can be implemented using tools such as Electron, which uses JavaScript, HTML (Hyper Text Markup Language) and CSS (Cascading Style Sheets) to build a cross-platform desktop application framework that is compatible with a variety of different operating systems, allowing developers to use web page development methods to develop front-end interfaces, and can perform highly free interactive development, so that a more beautiful and interactive front-end interface can be developed, which increases the space for application customization.
[0069] The file management interface may include a file display area, which may be used to display icons corresponding to one or more files in the second electronic device. The icon may refer to a graphic symbol with a referential meaning.
[0070] The icon corresponding to the file may be determined according to the file type corresponding to the file, and the file type corresponding to the file may be determined according to the format of the file. For example, the file type corresponding to the file may include, but is not limited to, one or more of a presentation document, a video, a picture, an audio, a spreadsheet document, a text document, a plain text document, an application package file, etc., which are not limited here.
[0071] Optionally, after the first electronic device obtains file information corresponding to one or more files stored in the second electronic device, the file information may include file names, and the first electronic device may analyze the extensions in the file names corresponding to the files to determine the file types corresponding to the files. The file name extension may refer to the suffix part in the file name, which can be used to characterize the format of the file.
[0072] Exemplarily, the extensions are dwt (Dreamweaver Template), dxf (Drawing Exchange Format), etc., and the corresponding file types may be drawing files; the extensions are key, ppt (PowerPoint), etc., and the corresponding file types may be presentation documents; the extensions are txt, md (Markdown), etc., and the corresponding file types may be plain text documents; the extensions are pages, doc (DOCument), etc., and the corresponding file types may be text documents; the extensions are jpg (Joint Photographic Experts Group), gif (Graphics Interchange Format), etc., and the corresponding file types may be pictures; the extensions are numbers, excel, etc., and the corresponding file types may be spreadsheet documents; the extensions are apk (Android application package), etc., and the corresponding file types may be application package files, etc., but are not limited to these.
[0073] Different icons may be provided for different file types. For example, Figure 4 FIG. 1 is a schematic diagram of an icon in an embodiment. Figure 4 As shown, the icon corresponding to the drawing file may be icon 402; the icon corresponding to the presentation document may be icon 404; the icon corresponding to the text document may be icon 406; the icon corresponding to the table document may be icon 408; the icon corresponding to the plain text document may be icon 410; and the icon corresponding to the application package file may be icon 412. It should be noted that Figure 4 It is only used to illustrate the relationship between the file type and the icon in the embodiment of the present application, and is not used to limit the specific icon style. The icon style can be set according to actual needs; it can also be set according to the comparison Figure 4 There are more or fewer file types. Optionally, the icon corresponding to each file type can be a concise and clear rounded file icon.
[0074] In some embodiments, the mapping relationship between file types and icons may be pre-stored in the first electronic device. For example, an icon mapping table may be pre-stored, and the icon mapping table may include icons (or icon information, such as icon numbers, icon names, etc.) corresponding to multiple file types and / or extensions. After the first electronic device obtains the file information of one or more files stored in the second electronic device, the extension and / or file type corresponding to each file may be determined, and the icon corresponding to the extension and / or file type of each file may be determined based on the mapping relationship, and the icon corresponding to each file may be displayed in the file management interface. Through the pre-stored mapping relationship, the icon corresponding to each file can be determined quickly and accurately, thereby improving the efficiency of displaying icons in the file management interface.
[0075] In an embodiment of the present application, the file management application can customize simpler and clearer file icons for different file types. Compared with the way of displaying files in the related art, there are more file types and the divisions are finer. The graphic features of each icon are more obvious and clear, which can help users quickly find the desired files for operation when files of multiple file types are mixed, thereby reducing the error rate and improving the convenience of operation.
[0076] Step 330 , in response to the triggering operation of the target icon, performing a management operation on the target file corresponding to the target icon.
[0077] The user can select one or more files in the file management interface for management operations according to actual needs. Optionally, the management operation may include but is not limited to one or more of downloading operations, deleting operations, editing operations, opening file operations, copying operations, and sending files to local applications.
[0078] The download operation may refer to an operation of downloading a file in the second electronic device to the local device of the first electronic device.
[0079] The deletion operation may refer to an operation of deleting a file in the second electronic device.
[0080] The editing operation may refer to an operation of editing a file in the second electronic device through the first electronic device.
[0081] The file opening operation may refer to an operation of opening the second electronic device in the first electronic device.
[0082] The copy operation refers to an operation of copying a file in the second electronic device to a local application in the first electronic device, such as copying a file in the second electronic device to a local application in the first electronic device.
[0083] The operation of sending the file to the local application refers to sending the file in the second electronic device to the local application in the first electronic device.
[0084] It should be noted that the local application in the first electronic device may be a third-party application installed in the first electronic device. For example, the application may include but is not limited to a social application, an audio and video playback application, a game application, etc. The local application in the first electronic device may also not be a non-third-party application in the first electronic device, such as the desktop of the first electronic device, a native application of the first electronic device, etc.
[0085] Different management operations may correspond to the same or different trigger operations, and the trigger operation may refer to an icon operation mode in which a user operates the icon of a file to trigger the management operation of the file. When the first electronic device detects a user's trigger operation on a target icon in the file management interface, it may respond to the trigger operation on the target icon and perform a management operation on the target file corresponding to the target icon. It should be noted that the target icon refers to an icon triggered by the user, and the target icon may be one or more, that is, the user may select only one file for management operation, or may select multiple files for batch management operation.
[0086] For example, the triggering operations for different management operations can all be performed by right-clicking the file icon, displaying a drop-down operation menu, and selecting a management operation in the drop-down operation menu. Figure 5A FIG. 1 is a schematic diagram of an interface for triggering a management operation on a file in a second electronic device in an embodiment. Figure 5A As shown, the user can select one or more files displayed in the file management interface 500 and right-click on the icons of the one or more files. The first electronic device can display a drop-down operation menu 510 in the file management interface 500. The drop-down operation menu 510 may include multiple selectable management operations. The user can select any management operation and click it, thereby triggering the first electronic device to perform the management operation on the selected one or more files.
[0087] For example, the trigger operation corresponding to copying can be to right-click on the file icon, display a drop-down operation menu, and select the copy operation in the drop-down operation menu. The corresponding trigger operation for sending a file to a local application or downloading operation can be to drag and drop the file icon. By dragging the file icon to the local application of the first electronic device, the file can be sent to the local application; by dragging the file icon to the local file directory of the first electronic device, the file can be downloaded to the local file directory. Exemplarily, Figure 5BFIG. 1 is a schematic diagram of an interface for triggering a management operation on a file in a second electronic device in another embodiment. Figure 5B As shown, the user can select one or more files displayed in the file management interface 500, and can drag the icons of the one or more files to the interface 520 of the local third-party application to trigger the first electronic device to send the one or more files to the third-party application, thereby allowing the third-party application to obtain the one or more files.
[0088] It should be noted that the trigger operation may also be other operations, such as double-clicking an icon, operating an icon through shortcut keys, long pressing and dragging an icon, selecting multiple icons simultaneously by box selection, etc., which are not limited here.
[0089] In the above implementation, the file management application can provide richer and more flexible management operations and trigger operations, thereby improving the user's interactive experience and better meeting the user's needs for cross-device file management.
[0090] In an embodiment of the present application, the first electronic device can display an icon corresponding to the file type of the file stored in the second electronic device in the file management interface corresponding to the second electronic device. The icon can more intuitively reflect the file type of the file, which can help users find the files that need to be managed more quickly, reduce the probability of misoperation, and improve the convenience and accuracy of users' management operations on files across devices.
[0091] In some embodiments, the file management application may also provide a search function for searching files on the second electronic device. Figure 6 As shown, the above method may further include the following steps:
[0092] Step 602: In response to the search operation, obtain the search content input in the search component.
[0093] The file management interface of the file management application may include a file display area and a function area. The file display area may be used to display icons corresponding to one or more files. The function area may be used to provide one or more function components, and each function component may be used to implement different functions. In an embodiment of the present application, the function area may include a search component, which may be used to receive search content input by a user and trigger a search function for searching files in the second electronic device. Exemplarily, the search component may be a search box, etc.
[0094] The first electronic device may obtain search content input by the user in the search component in response to a search operation on the search component. The search content refers to content input by the user in the search component, for example, a search keyword input by the user.
[0095] Step 604: Determine one or more files matching the search content according to the search content and file information corresponding to the one or more files.
[0096] The first electronic device can search according to the search content and the file information corresponding to one or more files stored in the second electronic device to find the file whose file information matches the search content. The search method can adopt fuzzy search or precise search. The fuzzy search is an approximate matching search method, which allows the search results obtained by the search to be similar to the search content but not completely the same. The precise search is a completely matching search method, and the search results obtained by the search are completely the same as the search content.
[0097] Optionally, files whose names match the search content can be searched, and the first electronic device can compare the search content with the file names corresponding to one or more files stored in the second electronic device. If the file name contains the search content, the file can be determined to be a file that matches the search content.
[0098] Optionally, files whose file contents match the search contents can be searched. Exemplarily, the second electronic device can identify the file contents of each stored file, and generate file tags corresponding to each file based on the identification results. The file tags can be used to characterize the file contents. For example, the second electronic device can identify the stored pictures, and generate file tags (such as people, scenery, animals, food, etc.) that can be used to characterize the image contents based on the identified image contents. The file information corresponding to the file can include the file tag corresponding to the file. After the first electronic device obtains the search content, it can compare the search content with the file tags corresponding to one or more files stored in the second electronic device. If the file tag of the file is the same or similar to the search content, it can be determined that the file is a file that matches the search content.
[0099] Step 606: Display icons corresponding to the matched one or more files in the file display area.
[0100] When the first electronic device determines one or more files matching the search content in the second electronic device, it may display icons corresponding to the matching files in the file display area for the user to view.
[0101] For example, Fig. 7A FIG. 1 is a schematic diagram of a file management interface in an embodiment. Fig. 7AAs shown, the file management interface 500 may include a file display area 710 and a function area 720, and the function area 720 may include a search component 722. Exemplarily, the search area 720 may be located above the file display area 710. The user may enter the search content to be searched in the search component 722. The first electronic device searches for files stored in the second electronic device according to the search content, and may display icons corresponding to each searched file in the file display area 710.
[0102] In an embodiment of the present application, the file management application may also provide a search function for searching files on a second electronic device, thereby realizing cross-device file search, meeting the user's search needs, and improving the user's usage experience.
[0103] In some embodiments, the file management interface may further include a file classification area, which may include multiple categories. The multiple categories may be divided according to one or more of the following division methods:
[0104] (1) Classification according to the file type corresponding to the file.
[0105] The file management application can divide the files of the second electronic device into multiple categories according to the file types corresponding to the files, and the first electronic device can determine the file types corresponding to each file according to the extensions of each file in the second electronic device, and divide the files into the categories to which the corresponding file types belong. Exemplarily, according to the file types corresponding to the files, the files are divided into categories such as pictures, videos, music, documents, compressed packages, etc. Optionally, the categories corresponding to the divided file types can be determined based on the user's usage habits. For example, according to the user's frequency of use of files of each file type, multiple file types can be selected in a descending order of usage frequency, and multiple categories can be divided based on the selected multiple file types.
[0106] (2) Divide by the application to which the file belongs.
[0107] The file management application can classify the files of the second electronic device into multiple categories according to the applications to which the files belong, and the first electronic device can determine the applications to which each file in the second electronic device belongs, and classify the files into categories corresponding to the applications to which they belong. Optionally, the categories corresponding to the classified applications can be determined based on the user's usage habits. For example, multiple applications can be selected from high to low usage frequencies according to the user's usage frequency of each application, and multiple categories can be divided based on the selected multiple file types.
[0108] (3) Division of operation time for management operations according to files.
[0109] The file management application can classify the files of the second electronic device into multiple categories according to the operation time of the file management operation, and the first electronic device can determine the operation time of the most recent management operation of each file in the second electronic device, and determine the time interval to which the operation time of the most recent management operation of each file belongs, and then classify the files into the category corresponding to the time interval. For example, the operation time of the file management operation can be classified into categories such as the last day, the last week, and the last month.
[0110] For example, Figure 7B FIG. 1 is a schematic diagram of a file management interface in another embodiment. Figure 7B As shown, the file management interface 500 may include a file display area 710, a function area 720 and a file classification area 730. The function area 720 may be located on the first side (such as the upper side) of the file display area, and the file classification area 730 may be located on the second side (such as the left side) of the file display area. With this layout, the file management interface is more concise and beautiful, and the interactivity of the interface is improved. The function area 720 may display multiple categories, such as being divided into categories such as pictures, videos, audios, documents and compressed packages according to the file types corresponding to the files, and being divided into categories such as application 1 and application 2 according to the application to which the files belong, and being divided into categories such as recent files (such as management operations performed in the last day) and device storage (referring to non-recent files) according to the operation time of the file management operation. The user may click on any category, and the file display area 710 may display the icons corresponding to the various files under the category clicked by the user.
[0111] In the embodiments of the present application, multiple different dimensions can be used to implement cross-device file classification, helping users to achieve faster cross-device file search and improve cross-device file management. In addition, cross-device file classification can be based on user usage habits, and the classification is more in line with the user's actual usage needs, improving the user's usage experience.
[0112] In some embodiments, the file management application may also provide a function of viewing a record of file management operations across devices. The file management interface may also include a record component, which may be used to provide a function of viewing file management records. When a user needs to view a file management record, the user may trigger the record component (such as clicking on the record component), and the first electronic device may display one or more file management records in the file management interface in response to the triggering operation on the record component, and the file management record includes operation information of the management operation on the file.
[0113] Optionally, the operation information may include but is not limited to file name, operation type of management operation, operation time, etc., wherein the operation type of management operation may refer to the specific operation of the management operation, such as one or more of a download operation, a delete operation, an edit operation, a copy operation, an operation of sending the target file to a local application (or a sharing operation), etc.
[0114] It should be noted that the file management records displayed in the file management interface may be file management records corresponding to all management operations performed on the first electronic device, or file management records corresponding to management operations performed by the first electronic device running the file management application this time, or file management records corresponding to specified management operations. For example, only file management records corresponding to download operations may be displayed, but the present application is not limited thereto. The specific displayed file management records are not limited in the present application embodiment.
[0115] For example, Figure 7C FIG. 1 is a schematic diagram of a file management interface in another embodiment. Figure 7C As shown, the file management interface 500 may also include a record component 740. Further, the function area 720 may include the record component 740. The record component 740 may be located on the right side of the search component 722. The user may view the file management record by clicking on the record component 740.
[0116] In an embodiment of the present application, the file management application can also provide the function of viewing records of file management operations across devices. Users can view file management records by triggering the record component on the file management interface, thereby realizing richer cross-device file management functions, meeting user usage needs, and improving user experience.
[0117] In some embodiments, Figure 8 As shown, the step of managing the target file corresponding to the target icon may include the following steps:
[0118] Step 802: Acquire first path information of the target file in the second electronic device.
[0119] When the first electronic device detects a trigger operation performed by a user on a target icon in a file management interface, it determines that a management operation needs to be performed on the target file corresponding to the target icon, and can determine first path information of the target file in the second electronic device. The first path information can be used to characterize the storage path of the target file in the second electronic device.
[0120] In some embodiments, the file information corresponding to one or more files sent by the second electronic device to the first electronic device may include the first path information of the file in the second electronic device. When the first electronic device detects a trigger operation performed by a user on a target icon in the file management interface, the first electronic device may obtain the first path information of the target file in the second electronic device according to the file information corresponding to the target file.
[0121] Step 804: Generate an operation request according to the first path information, and send the operation request to the second electronic device, so that the second electronic device performs a process corresponding to the management operation on the target file corresponding to the first path information according to the operation request.
[0122] The first electronic device may generate an operation request corresponding to the target file according to the first path information of the target file in the second electronic device, and the operation request may carry the first path information of the target file in the second electronic device. The first electronic device may send the operation request to the second electronic device, determine the target file corresponding to the first path information according to the first path information carried in the operation request, and perform management operations on the target file.
[0123] As an optional implementation, the operation request may further include an operation type identifier corresponding to the management operation to be performed, and the operation type identifier may be used to identify the operation type corresponding to the management operation. Exemplarily, the operation type identifier may be represented by one or more of numbers, letters, and symbols. The second electronic device may perform a management operation corresponding to the operation type identifier on the target file according to the operation type identifier carried by the operation request.
[0124] Taking the deletion operation of a target file as an example, the first electronic device may send a deletion request to the second electronic device, and the deletion request may include the first path information of the target file in the second electronic device and the operation type identifier corresponding to the deletion operation; after the second electronic device receives the deletion request sent by the first electronic device, it may delete the target file corresponding to the first path information according to the deletion request.
[0125] As another optional implementation, the management operation to be performed may be an operation that requires data transmission, such as a download operation, a copy operation, a file opening operation, an operation of sending a target file to a local application, etc. The first electronic device may generate an operation request according to the first path information, and send the operation request to the second electronic device. The operation request may be used to instruct the second electronic device to create a data transmission channel corresponding to the target file, and return response information.
[0126] The operation request may carry the first path information of the target file in the second electronic device. After the second electronic device receives the operation request sent by the first electronic device, it may determine the target file based on the first path information carried in the operation request, create a data transmission channel corresponding to the target file, and send response information to the first electronic device.
[0127] Among them, the data transmission channel may refer to a channel for data transmission between the first electronic device and the second electronic device. Optionally, the data transmission channel may be a virtual transmission channel or a physical communication link. The virtual transmission channel may refer to a virtual connection abstracted from the physical communication link and can be used to transmit data, so that there is no need to pay attention to the underlying physical implementation details when performing data transmission.
[0128] The first electronic device can receive the response information sent by the second electronic device, and can send a data acquisition request to the second electronic device, where the data acquisition request is used to instruct the second electronic device to transfer the file data of the target file to the first electronic device through the data transmission channel.
[0129] After the first electronic device receives the response information sent by the second electronic device, it can determine that the second electronic device has created a data transmission channel corresponding to the target file based on the response information, and then send a data acquisition request to the second electronic device. After the second electronic device receives the data acquisition request sent by the first electronic device, it can send the file data of the target file to the first electronic device through the data transmission channel corresponding to the target file.
[0130] For example, Fig. 9 FIG. 1 is a schematic diagram of a timing sequence of a second electronic device transmitting a file to a first electronic device in an embodiment. Fig. 9 As shown, when the first electronic device detects a trigger operation performed by a user on a target icon in a file management interface, the first path information of the target file corresponding to the target icon in the second electronic device can be obtained. The first electronic device can generate an operation request based on the first path information, and send the operation request to the second electronic device. The second electronic device receives the operation request sent by the first electronic device, and can create a data transmission channel corresponding to the target file based on the operation request, and send response information to the first electronic device. After the first electronic device receives the response information sent by the second electronic device, it can send a data acquisition request to the second electronic device. The second electronic device receives the data acquisition request sent by the first electronic device, and can send the target file to the first electronic device through the data transmission channel corresponding to the target file based on the data acquisition request to complete the transmission of the file data of the target file.
[0131] In this embodiment, when data transmission of a target file is required, the first electronic device may first send an operation request carrying first path information of the target file on the second electronic device to the second electronic device, so that the second electronic device can prepare for the transmission, determine the target file and create a corresponding data transmission channel. The first electronic device may then send a data acquisition request to the second electronic device, so that the second electronic device can transmit the file data of the target file through the data transmission channel. The data transmission of the file data and the information triggering the data transmission can be sent separately, thereby improving the flexibility and efficiency of data transmission.
[0132] In some embodiments, the operation request may carry not only the first path information of the target file in the second electronic device, but also the task identifier of the download task corresponding to the target file. The second electronic device creates a data transmission channel corresponding to the target file and binds the data transmission channel to the task identifier.
[0133] When the first electronic device determines that the management operation to be performed may be an operation that requires data transmission, a download task corresponding to the target file may be created, and a task identifier corresponding to the download task, such as a task ID (Identity document, identity identification number), may be assigned. An operation request may be generated based on the first path information of the target file in the second electronic device and the task identifier. After receiving the operation request, the second electronic device may determine the target file based on the first path information, and create a data transmission channel corresponding to the target file, and may bind the data transmission channel to the task identifier.
[0134] After the first electronic device receives the response information sent by the second electronic device, it can generate a data acquisition request based on the task identifier of the download task, and send the data acquisition request to the second electronic device. The data acquisition request is used to instruct the second electronic device to transfer the file data of the target file to the first electronic device through the data transmission channel corresponding to the task identifier.
[0135] After the second electronic device receives the data acquisition request sent by the first electronic device, it can determine the data transmission channel corresponding to the task identifier based on the task identifier carried in the data acquisition request, and determine that the file to be transmitted is the target file, and transmit the file data of the target file to the first electronic device through the data transmission channel.
[0136] Optionally, if there are multiple target files, the first electronic device may generate a download task corresponding to the multiple target files; the first electronic device may also generate multiple download tasks, and the multiple download tasks correspond one-to-one to the multiple target files. The download request sent by the first electronic device may carry task identifiers corresponding to the multiple download tasks. The second electronic device may create a data transmission channel according to the task identifiers corresponding to the multiple download tasks, and send the file data of each target file to the first electronic device in sequence through the data transmission channel; the second electronic device may also create multiple data transmission channels according to the task identifiers corresponding to the multiple download tasks, and send the file data of multiple target files to the first electronic device in parallel through the multiple data transmission channels, and the transmission of multiple target files does not affect or interfere with each other.
[0137] In an embodiment of the present application, the first electronic device can create a download task and send an operation request carrying a task identifier of the download task, so that the second electronic device can bind the created data transmission channel with the task identifier, thereby achieving more accurate and convenient data transmission and improving the accuracy and efficiency of file transmission across devices.
[0138] In some embodiments, data transmission between the first electronic device and the second electronic device can be implemented using a combination of the WebSocket protocol and the HTTP protocol of the local area network.
[0139] The WebSocket protocol can realize full-duplex communication on a TCP connection, and can realize a persistent connection between the client and the server. It allows the server to actively push data to the client. The first electronic device can be used as a client of the WebSocket protocol, and the second electronic device can be used as a server of the WebSocket protocol. The first electronic device can send messages to the second electronic device and receive event-driven responses. Since the WebSocket protocol allows two-way communication between the server and the client and supports more frequent two-way data exchange, the WebSocket protocol is suitable for the transmission of short messages.
[0140] The HTTP protocol is a simple request-response protocol. The client needs to make a data request to the server, and the server will respond based on the data request. Only one-way data transmission can be achieved at the same time. However, the communication method is easier to manage, and supports caching and breakpoint resumption, with higher reliability. Therefore, it is suitable for transmitting file data.
[0141] In the embodiment of the present application, the operation request and response information are transmitted based on the WebSocket protocol, and the data acquisition request and the file data of the target file are transmitted based on the HTTP protocol.
[0142] For example, Fig.10 FIG. 1 is a timing diagram for realizing data transmission between a first electronic device and a second electronic device in one embodiment. Fig.10 As shown, the first electronic device can act as a client, the second electronic device can create a WebSocket server, and a WebSocket connection can be established between the client and the WebSocket server. The client can initiate a download request of the WebSocket protocol to the WebSocket server, and the download request can carry the first path information of the target file in the second electronic device. Furthermore, the first electronic device can also create a download task corresponding to the target file, and the download request can carry the task identifier of the download task. After the second electronic device receives the download request through the WebSocket server, it can prepare the target file according to the first path information, and create an HTTP server, which can be bound to the task identifier, and the WebSocket server can send ACK (Acknowledge character) to the client.
[0143] After receiving the ACK, the client can initiate an HTTP protocol acquisition request to the HTTP server of the second electronic device, for example, it can request to obtain the target file through Http: GET. Furthermore, the first electronic device can use the task identifier of the download task as the request path of the HTTP: GET request, such as the URL (uniform resource location) of the Http: GET request. After receiving the acquisition request, the HTTP server of the second electronic device can send the file data of the target file to the client.
[0144] By combining the WebSocket protocol with the HTTP protocol to achieve cross-device file data transmission, compared with other near-field communication methods (such as Bluetooth, Wi-Fi, etc.), the transmission speed is faster and the communication is more flexible, which improves the efficiency and flexibility of cross-device data transmission.
[0145] In some embodiments, when the file management application of the first electronic device detects a user triggering operation on a target icon, it may first determine whether a communication connection is currently established with the second electronic device. If a communication connection has been established, an operation request may be sent to the second electronic device. If a communication connection has not been established, the first electronic device may first send a connection request to the second electronic device. After the second electronic device receives the connection request sent by the first electronic device, it may respond to the connection request and send connection information to the first electronic device, such as an IP (Internet Protocol) address and port number. After the first electronic device receives the connection information, it may establish a communication connection with the second electronic device based on the connection information.
[0146] Further, after receiving the request sent by the first electronic device, the second electronic device can determine the request type corresponding to the request. If the request type is an operation request, it can be determined that the operation request sent by the first electronic device is received, and the target file is processed corresponding to the management operation according to the operation request. If the request type is a connection request, it can be determined that the connection request sent by the first electronic device is received, and the connection information can be sent to the first electronic device in response to the connection request.
[0147] Optionally, the request sent by the first electronic device may carry a type identifier, which can be used to identify the request type corresponding to the request, and the second electronic device may determine the request type corresponding to the request based on the type identifier carried by the request. Optionally, the data formats for requests of different request types may be different, and the second electronic device may determine the request type corresponding to the request by analyzing the data format corresponding to the request.
[0148] The second electronic device can automatically identify the request type corresponding to the request sent by the first electronic device and make a corresponding response, thereby ensuring the accuracy and flexibility of cross-device file management.
[0149] As a specific implementation, a WebSocket connection can be established between the first electronic device and the second electronic device, and communication can be performed based on the WebSocket connection. When the file management application of the first electronic device detects a user triggering operation on a target icon, it can first determine whether a WebSocket connection is currently established with the second electronic device. If a WebSocket connection is not established, the client of the first electronic device can first send a WebSocket connection request to the second electronic device. After the second electronic device receives the WebSocket connection request, it can open or create a WebSocket server, and feedback the IP address and port number that the WebSocket server listens on to the first electronic device. The client of the first electronic device can establish a WebSocket connection with the WebSocket server of the second electronic device based on the IP address and port number.
[0150] In some embodiments, the file management application running on the first electronic device may run an extension process (or extension module), which may run in the environment of a file management tool local to the first electronic device, and the extension process (or extension module) may be used to provide cross-device file access permissions. For example, the extension process (or extension module) may be implemented based on the FileProvider Extension class. The extension process (or extension module) may communicate with the operating system or file management process of the first electronic device, thereby implementing file management functions such as opening a file of the second electronic device on the first electronic device, downloading a file of the second electronic device to the local of the first electronic device, and sending a file of the second electronic device to an application local to the first electronic device.
[0151] For example, Fig.11 The timing diagram of data transmission between the first electronic device and the second electronic device in another embodiment. When the file management application of the first electronic device detects the download operation, copy operation, operation of sending the file to the local application program, etc. triggered by the user on the target icon through the file management interface, the extension process can call the download interface of the download module, and the download module can start the download of the target file. The download module refers to the module used to implement the download function in the file management application. The download module can first determine whether a WebSocket connection is currently established with the second electronic device. The download module can also create a download task. If a WebSocket connection has been established, a download request of the WebSocket protocol can be initiated to the second electronic device. The download request carries the first path information corresponding to the target file and the task identifier of the download task. After receiving the download request, the second electronic device can determine the target file corresponding to the first path information, create a corresponding data transmission channel, and then send an ACK to the first electronic device. After the download module of the first electronic device obtains the ACK, the task identifier can be used as the task_url of the Http:GET request to send an Http:GET request to the second electronic device. The second electronic device feeds back the file data of the target file according to the Http:GET request. After receiving the file data of the target file, the download module can feed back the download path of the target file to the extension process. The download path can refer to the path where the target file is saved after being downloaded to the first electronic device. The extension process can feed back the target file according to the download path.
[0152] For example, Fig.12This is a timing diagram for realizing data transmission between the first electronic device and the second electronic device in another embodiment. If the download module determines that a WebSocket connection is not currently established with the second electronic device, a connection may be initiated to the second electronic device first, the second electronic device starts the WebSocket server, and feeds back the IP address and port number that the WebSocket server listens to to the first electronic device, the client of the first electronic device establishes a WebSocket connection with the WebSocket server of the second electronic device based on the IP address and port number, and then performs subsequent processes such as sending download requests and file transfer.
[0153] In an embodiment of the present application, a WebSocket connection can be established between the first electronic device and the second electronic device for communication. The connection process is simple and convenient, and does not require the user to perform excessive operations, which further improves the convenience of cross-device file management and improves the user experience.
[0154] In an embodiment of the present application, the first electronic device can generate an operation request based on the first path information of the target file in the second electronic device, and send the operation request to the second electronic device, so that the second electronic device can perform processing corresponding to the management operation on the target file corresponding to the first path information according to the operation request, thereby improving the accuracy and convenience of file management across devices.
[0155] In some embodiments, the file management application may provide functions such as downloading and saving the files of the second electronic device to the local application of the first electronic device, and sending the files of the second electronic device to the local application of the first electronic device, such as sending the target file corresponding to the target icon to the third-party application by dragging the target icon to the local application of the first electronic device, or copying the target file corresponding to the target icon to the third-party application by right-clicking the target icon, etc. When implementing the function of sending the files of the second electronic device to the local application of the first electronic device, it is necessary to first download the target file of the second electronic device to the local application of the first electronic device, and then the target file is read by the local application of the first electronic device.
[0156] like Fig.13 As shown, the step of managing the target file corresponding to the target icon may include the following steps:
[0157] Step 1302, obtaining second path information of the target file in the local file system.
[0158] The second path information may refer to the storage path of the target file in the local file system of the first electronic device. In some embodiments, the file management application may create a target directory locally on the first electronic device, and the target directory may be used to store non-native files of the first electronic device, that is, the target directory may be used to store files of the second electronic device. For example, the target directory may be a directory under / Users / [username] / Library / CloudStorage / , but is not limited to this. When reading files under the target directory, the operating system of the first electronic device or the local file management tool will initiate a callback to the file management application to trigger the file management application to download the corresponding files from the second electronic device.
[0159] After obtaining file information corresponding to one or more files stored in the second electronic device, the first electronic device can generate second path information corresponding to the one or more files under the target directory of the local file system, and establish a mapping relationship between the second path information corresponding to each file and the corresponding first path information.
[0160] As an implementation, the first electronic device can obtain the first path information of one or more files stored in the second electronic device in the second electronic device, encode the first path information corresponding to each file, obtain the second path information, and generate the second path information under the target directory.
[0161] As another implementation, the first electronic device may also directly generate second path information corresponding to each file stored in the second electronic device under the target directory, and then establish a mapping relationship between the second path information corresponding to the file and the corresponding first path information.
[0162] The first electronic device generates second path information mapped to the first path information corresponding to each file under the target directory of the local file system, which facilitates subsequent path mapping and initiation of cross-device file downloads, thereby improving the accuracy of cross-device file management.
[0163] In some embodiments, the first electronic device may generate second path information corresponding to each file displayed in the file management interface under the target directory of the local file system when icons corresponding to one or more files are displayed in the file management interface.
[0164] Because when the first electronic device establishes a communication connection with the second electronic device, the file information corresponding to the files stored in the second electronic device obtained by the first electronic device may not be comprehensive enough, for example, only the file information corresponding to some files stored in the second electronic device is obtained. Therefore, when the user accesses a file in a directory of the second electronic device through a file management application, the first electronic device can generate second path information corresponding to each file in the directory of the accessed second electronic device under the target directory of the local file system of the first electronic device. When the file management application displays icons corresponding to one or more files in the file management interface, the second path information corresponding to each file displayed in the file management interface can be generated under the target directory of the local file system, thereby ensuring that each file currently displayed has corresponding second path information in the local file system, and ensuring that the second path information corresponding to the target file that needs to be managed can be accurately obtained.
[0165] Step 1304: Map the second path information to the first path information of the target file in the second electronic device.
[0166] After obtaining the second path information corresponding to the target file, the first electronic device can map the second path information to the first path information of the target file in the second electronic device, and based on the first path information, send an operation request to the second electronic device to download the target file from the second electronic device.
[0167] Step 1306: Generate an operation request according to the first path information, and send the operation request to the second electronic device, where the operation request is used to instruct the second electronic device to create a data transmission channel corresponding to the target file and return response information.
[0168] Step 1308: Receive response information sent by the second electronic device.
[0169] Step 1310: Send a data acquisition request to the second electronic device, where the data acquisition request is used to instruct the second electronic device to transmit file data of the target file to the first electronic device through a data transmission channel.
[0170] Step 1312: Receive file data of the target file sent by the second electronic device.
[0171] For the description of steps 1306 to 1312 , reference may be made to the relevant descriptions in the above embodiments, and will not be repeated here.
[0172] Step 1314, saving the file data to the second path information.
[0173] After receiving the file data of the target file sent by the second electronic device, the first electronic device can save the file data to the second path information. The user can then access the target file through the local file system of the first electronic device, and the local application in the first electronic device can also read the file data of the target file from the second path information under the target directory, thereby achieving a more flexible cross-device file management method.
[0174] In some embodiments, when the first electronic device creates the second path information under the target directory of the local file system, it can create the second path information corresponding to one or more files in the second electronic device under the target directory of the local file system, and generate a placeholder file under each second path information. The placeholder file can be used to represent the future content of the second path information under the target directory in the local file system, but it has not yet been filled with actual data.
[0175] After the first electronic device detects a trigger operation on a target icon of a file management application and obtains the second path information of the target file corresponding to the target icon in the local file system, it can determine whether the second path information is a placeholder file. If it is determined that the second path information is a placeholder file, it means that the target file corresponding to the second path information needs to be downloaded. The first electronic device can map the second path information corresponding to the target file to the first path information of the target file in the second electronic device, and based on the first path information, send an operation request to the second electronic device to download the target file from the second electronic device.
[0176] The first electronic device can receive file data of the target file sent by the second electronic device, and write the file data into a placeholder file under the second path information corresponding to the target file. The placeholder file is then updated to the target file for access by a local application or local file management tool of the first electronic device.
[0177] As a specific implementation, when a user chooses to download a target file in a second electronic device to a certain location on the first electronic device through a file management application running on the first electronic device, the operating system of the first electronic device can obtain the second path information of the target file in the local file system and read the file under the second path information. If the operating system of the first electronic device detects that the second path information is located under the target directory during the process of reading the file under the second path information, and determines that the second path information is a placeholder file, it can request the directory provider of the target directory (i.e., the extension module in the file management application) for the target file corresponding to the second path information. The extension module in the file management application can map the second path information corresponding to the target file to the first path information corresponding to the target file, and call the download interface of the download module to trigger the download module to download the target file from the second electronic device.
[0178] Optionally, the file data of the target file downloaded by the download module can be first saved to the local sandbox path of the first electronic device. The local sandbox path can be a path under a directory that can be accessed when the file management application is running, such as the path of the application sandbox directory corresponding to the file management application under the directory / Users / [username] / Library / Caches / , etc. By setting the sandbox directory of each application, the security and stability of the system can be improved. The download module can send the local sandbox path of the target file under the application sandbox directory corresponding to the file management application to the extension module (or extension process) in the file management application. The extension module can read the file data of the target file from the local sandbox path, and then write the file data of the target file into the placeholder file under the second path information corresponding to the target file. After the file data is written, the operating system of the first electronic device can read the target file from the second path information.
[0179] In an embodiment of the present application, a file management application of the first electronic device can create a target directory in the local file system, and can create second path information corresponding to one or more files in the second electronic device under the target directory, and generate a placeholder file under the second path information. When the operating system of the first electronic device reads the second path information under the target directory, it can trigger the file management application to download the corresponding file from the second electronic device and write it to the placeholder file under the corresponding second path information, so that the operating system of the first electronic device can accurately read the file in the second electronic device through the local file system, thereby achieving the compatibility of file management across devices and improving the convenience of file management across devices.
[0180] In some embodiments, the cross-device file download method described above can be used to implement an operation of sending a target file of a second electronic device to a local application of a first electronic device. If the file management application of the first electronic device detects a user triggering operation on a target icon through a file management interface, such as copying the target file to a third-party application of the first electronic device by right-clicking the target icon, or by dragging the target icon to a third-party application of the first electronic device, etc., it can respond to the triggering operation on the target icon in the file management interface, generate an operation object based on the second path information of the target file in the local file system, and send the operation object to the local application, so that the local application sends a read request corresponding to the second path information. The first electronic device can obtain the second path information of the target file in the local file system in response to the read request.
[0181] The file management application can respond to the trigger operation of the target icon in the file management interface, obtain the second path information of the target file corresponding to the target icon in the local file system, and encapsulate the second path information into an operation object, which may include but is not limited to a drag item (such as DragItem), a copy item, etc. The operation object can be sent to a local application, thereby passing the second path information corresponding to the target file to the local application. The local application detects a trigger event (such as a drag event, a copy event, etc.), and can try to read the second path information corresponding to the target file, and can send a read request to the operating system of the first electronic device, thereby triggering the operating system of the first electronic device to read the file under the second path information.
[0182] Furthermore, the operating system of the first electronic device reads the file under the second path information, thereby calling the file management application to download the target file from the second electronic device. For the description, please refer to the relevant description in the above embodiment, which will not be repeated here.
[0183] For example, Fig.14 FIG. 1 is a timing diagram of sending a file of a second electronic device to a third-party application locally on a first electronic device in one embodiment. Fig.14As shown, the file management application on the first electronic device can detect the triggering operation of the target icon (such as dragging the target icon, right-clicking the target icon to copy, etc.) through the file management interface, and can encapsulate the second path information of the target file corresponding to the target icon in the local file system into an operation object (such as a drag item, a copy item, etc.), and the first electronic device sends the operation object to the third-party application according to the user's operation. After receiving the operation object, the third-party application can try to read the second path information, trigger the operating system of the first electronic device or the local file management tool to read the file under the second path information, and when it is determined that the file under the second path information is a placeholder file, request the file data of the target file from the extension process (or extension module) of the file management application.
[0184] The extended process of the file management application can call the download interface of the download module to download the file data of the target file. The download module of the file management application can request the second electronic device to obtain the file data of the target file, and the second electronic device can return the file data of the target file to the download module. The specific way in which the download module downloads the file data of the target file from the second electronic device can refer to the relevant descriptions in the above embodiments, which will not be repeated here. The download module can return the file data of the target file to the extended process of the file management application, and the extended process will then return the file data to the third-party application.
[0185] Optionally, the download module may return the local sandbox path corresponding to the target file to the extension process, and the extension process reads the file data of the target file from the local sandbox path and writes it to the placeholder file under the second path information. After the writing is completed, the third-party application can successfully read the target file from the second path information.
[0186] In an embodiment of the present application, a management operation of sending files of a second electronic device to a local application is implemented on the first electronic device, and more compatible file management functions are provided, allowing the local application of the first electronic device to read cross-end files as if reading local files, thereby improving the flexibility and convenience of cross-device file management.
[0187] In some embodiments, the file management application may also provide a cross-device file upload function, that is, uploading files from the first electronic device to the second electronic device. The file management interface also includes an upload control. When the user needs to upload a file to the second electronic device, the upload control may be triggered (e.g., clicked). The first electronic device may determine the file to be transferred in response to the triggering operation of the upload control, and send the file to be transferred to the second electronic device.
[0188] When the first electronic device detects a trigger operation of the upload control by the user, a file selection interface may be displayed, and the file selection interface is used to display one or more files that can be selected for uploading to the second electronic device, for example, local files of the first electronic device and / or files in the cloud, etc. The user can select the file to be transferred on the file selection interface, and the first electronic device can obtain the file to be transferred and send the file to be transferred to the second electronic device.
[0189] Optionally, if the file to be transmitted is a file in the cloud, the first electronic device may first download the file to be transmitted from the cloud, and then send the file to be transmitted to the second electronic device. Optionally, if the file to be transmitted is a local file, the first electronic device may directly send the file to be transmitted to the second electronic device.
[0190] As an optional implementation, the first electronic device may first create an upload task and assign a task identifier for the upload task, and may send an upload request to the second electronic device based on the WebSocket protocol, and the upload request carries the task identifier for the upload task. The second electronic device may create a data transmission channel according to the upload request, and bind the data transmission channel to the task identifier, and may return response information to the first electronic device. The first electronic device receives the response information, and may send a data push request to the first electronic device based on the HTTP protocol, and the data push request may carry the file to be transmitted and the task identifier. For example, the file to be transmitted and the task identifier may be encapsulated in the URL in the HTTP:POST request, but is not limited thereto. The second electronic device receives the target file uploaded by the first electronic device through the data transmission channel bound to the task identifier, and saves the target file.
[0191] For example, Fig.15 FIG. 1 is a schematic diagram of a file management interface in another embodiment. Fig.15 As shown, the file management interface 500 may also include an upload control 1502. Further, the function area 720 may include the upload control 1502. The recording component 740 may be located on the right side of the recording component 740. The user may select a file to upload to the second electronic device by clicking the upload control 1502.
[0192] In the embodiment of the present application, the file management application can also realize the file upload function across devices, enrich the file management function across devices, meet the different needs of users, and improve the user experience.
[0193] In the embodiment of the present application, a cross-device file management solution combining the Electron front-end, FileProvider back-end, and WebSocket protocol and HTTP protocol transmission is adopted, which can provide users with a more beautiful, comfortable and convenient front-end interface, while taking into account the data transmission speed, and meeting the support scope and freedom requirements of cross-device file management operations, thereby improving the user experience.
[0194] like Fig.16 As shown, in another embodiment, a cross-device file management method is provided, which can be applied to the second electronic device mentioned above, and the method may include the following steps:
[0195] Step 1610, sending to the first electronic device file information corresponding to one or more files stored in the second electronic device, so that the first electronic device displays a file management interface based on the file information corresponding to the one or more files; the file management interface displays icons corresponding to the one or more files, and the icons corresponding to the files are determined based on the file types corresponding to the files; the file management interface is used to provide management functions for files stored in the second electronic device.
[0196] In some embodiments, the method also includes: receiving an operation request sent by the first electronic device; the operation request carries first path information of the target file in the second electronic device; the target file is a file that requires a management operation; and according to the operation request, performing processing corresponding to the management operation on the target file corresponding to the first path information.
[0197] In some embodiments, the steps are to perform processing corresponding to the management operation on the target file corresponding to the first path information according to the operation request, including: determining the target file corresponding to the first path information according to the operation request, and creating a data transmission channel corresponding to the target file; sending response information to the first electronic device; receiving a data acquisition request sent by the first electronic device; and responding to the data acquisition request, transmitting the file data of the target file to the first electronic device through the data transmission channel.
[0198] In some embodiments, the operation request also carries a task identifier of a download task corresponding to the target file;
[0199] The step determines the target file corresponding to the first path information according to the operation request, and creates a data transmission channel corresponding to the target file, including: determining the target file corresponding to the first path information according to the operation request, creating a data transmission channel corresponding to the target file, and binding the data transmission channel to the task identifier;
[0200] The step responds to the data acquisition request and transmits the file data of the target file to the first electronic device through the data transmission channel, including: according to the task identifier carried in the data acquisition request, transmitting the file data of the target file to the first electronic device through the data transmission channel corresponding to the task identifier.
[0201] In some embodiments, the operation request and response information are transmitted based on the WebSocket protocol, and the data acquisition request and the file data of the target file are transmitted based on the HTTP protocol.
[0202] In some embodiments, the step of receiving an operation request sent by a first electronic device includes: receiving a request sent by the first electronic device; determining a request type corresponding to the request, and if the request type is an operation request, determining that the operation request sent by the first electronic device is received.
[0203] In some embodiments, after the step of determining the request type corresponding to the request, the method further includes: if the request type is a connection request, determining that a connection request sent by the first electronic device is received; in response to the connection request, sending connection information to the first electronic device, so that the first electronic device establishes a communication connection with the second electronic device according to the connection information.
[0204] It should be noted that the description of the cross-device file management method applied to the second electronic device provided in the embodiments of the present application can refer to the relevant description of the cross-device file management method applied to the first electronic device provided in the above embodiments, and will not be repeated here.
[0205] In an embodiment of the present application, the second electronic device can send file information corresponding to one or more files stored in the second electronic device to the first electronic device. The first electronic device can display icons corresponding to the file types of the files stored in the second electronic device in the file management interface corresponding to the second electronic device. The icons can more intuitively reflect the file types of the files, which can help users find files that need to be managed more quickly, reduce the probability of misoperation, and improve the convenience and accuracy of users' management operations on files across devices.
[0206] like Fig.17 As shown, in one embodiment, a cross-device file management apparatus 1700 is provided, which can be applied to the first electronic device mentioned above. The cross-device file management apparatus 1700 may include an information acquisition module 1710, a display module 1720 and a management module 1730.
[0207] The information acquisition module 1710 is used to acquire file information corresponding to one or more files stored in the second electronic device.
[0208] The display module 1720 is used to display a file management interface according to the file information corresponding to the one or more files; the file management interface displays icons corresponding to the one or more files, and the icons corresponding to the files are determined according to the file types corresponding to the files.
[0209] The management module 1730 is used to perform a management operation on a target file corresponding to the target icon in the file management interface in response to a trigger operation on the target icon.
[0210] In one embodiment, the file management interface includes a file display area and a function area, wherein the file display area is used to display icons corresponding to one or more files; and the function area includes a search component. The cross-device file management apparatus 1700 also includes a search module.
[0211] The search module is used to obtain the search content input in the search component in response to the search operation; and determine one or more files matching the search content according to the search content and file information corresponding to the one or more files.
[0212] The display module 1720 is further configured to display icons corresponding to the matched one or more files in the file display area.
[0213] In one embodiment, the file management interface further includes a file classification area, which includes multiple categories, and the multiple categories are divided according to one or more of the following methods:
[0214] Divide according to the file type corresponding to the file;
[0215] Divide by the application to which the file belongs;
[0216] Divided according to the operation time of file management operations.
[0217] In one embodiment, the function area is located on a first side of the file display area, and the file classification area is located on a second side of the file display area.
[0218] In one embodiment, the file management interface includes a record component; the cross-device file management apparatus 1700 also includes a record viewing module.
[0219] The record viewing module is used to display one or more file management records in the file management interface in response to a trigger operation on the record component. The file management record includes operation information of the management operation on the file.
[0220] In one embodiment, the management operation includes one or more of a download operation, a delete operation, an edit operation, a file open operation, a copy operation, and an operation of sending the target file to a local application.
[0221] In one embodiment, the management module 1730 includes a path determination unit and a request unit.
[0222] The path determination unit is used to obtain first path information of the target file in the second electronic device.
[0223] The request unit is used to generate an operation request according to the first path information, and send the operation request to the second electronic device, so that the second electronic device performs processing corresponding to the management operation on the target file corresponding to the first path information according to the operation request.
[0224] In one embodiment, the request unit is also used to generate an operation request based on the first path information, and send the operation request to the second electronic device, the operation request is used to instruct the second electronic device to create a data transmission channel corresponding to the target file and return response information; receive the response information sent by the second electronic device; send a data acquisition request to the second electronic device, the data acquisition request is used to instruct the second electronic device to transfer the file data of the target file to the first electronic device through the data transmission channel.
[0225] In one embodiment, the operation request also carries a task identifier of the download task corresponding to the target file, and the operation request is used to instruct the second electronic device to create a data transmission channel corresponding to the target file and bind the data transmission channel to the task identifier.
[0226] The request unit is also used to generate a data acquisition request according to the task identifier of the download task, and send the data acquisition request to the second electronic device, wherein the data acquisition request is used to instruct the second electronic device to transfer the file data of the target file to the first electronic device through the data transmission channel corresponding to the task identifier.
[0227] In one embodiment, the operation request and response information are transmitted based on the WebSocket protocol, and the data acquisition request and the file data of the target file are transmitted based on the HTTP protocol.
[0228] In one embodiment, the path determination unit is further configured to obtain second path information of the target file in the local file system; and map the second path information to first path information of the target file in the second electronic device.
[0229] In one embodiment, the file information of the file includes first path information of the file in the second electronic device; the cross-device file management apparatus 1700 also includes a path creation module.
[0230] The path creation module is used to generate second path information corresponding to one or more files in the target directory of the local file system, and establish a mapping relationship between the second path information corresponding to each file and the corresponding first path information.
[0231] In one embodiment, the path creation module is also used to create second path information corresponding to one or more files under the target directory of the local file system, and generate placeholder files under each second path information; and to determine that the second path information corresponding to the target file is a placeholder file, then map the second path information corresponding to the target file to the first path information of the target file in the second electronic device.
[0232] In one embodiment, the management module 1730 is further configured to receive file data of a target file sent by a second electronic device; and write the file data into a placeholder file under the second path information corresponding to the target file.
[0233] In one embodiment, the path creation module is also used to generate second path information corresponding to each file displayed in the file management interface under the target directory of the local file system when icons corresponding to one or more files are displayed in the file management interface.
[0234] In one embodiment, the management module 1730 further includes an object generation unit
[0235] An object generation unit is used to respond to a trigger operation on a target icon in a file management interface, generate an operation object according to the second path information of the target file in the local file system, and send the operation object to a local application so that the local application sends a read request corresponding to the second path information.
[0236] The path determination unit is further used to obtain second path information of the target file in the local file system in response to the read request.
[0237] In one embodiment, the file management interface further includes an upload control; the cross-device file management apparatus 1700 further includes an upload module.
[0238] The upload module is used to determine the file to be transmitted in response to the trigger operation of the upload control, and send the file to be transmitted to the second electronic device.
[0239] In an embodiment of the present application, the first electronic device can display an icon corresponding to the file type of the file stored in the second electronic device in the file management interface corresponding to the second electronic device. The icon can more intuitively reflect the file type of the file, which can help users find the files that need to be managed more quickly, reduce the probability of misoperation, and improve the convenience and accuracy of users' management operations on files across devices.
[0240] like Fig.18As shown, in one embodiment, a cross-device file management apparatus 1800 is provided, which can be applied to the above-mentioned second electronic device. The cross-device file management apparatus 1800 includes an information sending module 1810.
[0241] The information sending module 1810 is used to send file information corresponding to one or more files stored in the second electronic device to the first electronic device, so that the first electronic device displays a file management interface based on the file information corresponding to the one or more files; icons corresponding to one or more files are displayed in the file management interface, and the icons corresponding to the files are determined based on the file types corresponding to the files; the file management interface is used to provide management functions for files stored in the second electronic device.
[0242] In one embodiment, the cross-device file management apparatus 1800 further includes a request processing module.
[0243] A request processing module is used to receive an operation request sent by a first electronic device; the operation request carries first path information of a target file in a second electronic device; the target file is a file that needs to be managed; and is used to perform processing corresponding to the management operation on the target file corresponding to the first path information according to the operation request.
[0244] In one embodiment, the request processing module includes a channel creation unit, a response sending unit, a request receiving unit and a transmission unit.
[0245] The channel creation unit is used to determine the target file corresponding to the first path information according to the operation request, and create a data transmission channel corresponding to the target file.
[0246] The response sending unit is used to send response information to the first electronic device.
[0247] The request receiving unit is used to receive a data acquisition request sent by the first electronic device.
[0248] The transmission unit is used to respond to the data acquisition request and transmit the file data of the target file to the first electronic device through the data transmission channel.
[0249] In one embodiment, the operation request also carries a task identifier of a download task corresponding to the target file; the channel creation unit is also used to determine the target file corresponding to the first path information according to the operation request, create a data transmission channel corresponding to the target file, and bind the data transmission channel to the task identifier.
[0250] The transmission unit is further used to transmit the file data of the target file to the first electronic device through the data transmission channel corresponding to the task identifier according to the task identifier carried in the data acquisition request.
[0251] In one embodiment, the operation request and response information are transmitted based on the WebSocket protocol, and the data acquisition request and the file data of the target file are transmitted based on the HTTP protocol.
[0252] In one embodiment, the request processing module is further used to receive a request sent by the first electronic device; determine the request type corresponding to the request, and if the request type is an operation request, determine that the operation request sent by the first electronic device is received.
[0253] In one embodiment, the request processing module is also used to determine that a connection request sent by the first electronic device is received if the request type is a connection request; in response to the connection request, send connection information to the first electronic device so that the first electronic device establishes a communication connection with the second electronic device according to the connection information.
[0254] In an embodiment of the present application, the second electronic device can send file information corresponding to one or more files stored in the second electronic device to the first electronic device. The first electronic device can display icons corresponding to the file types of the files stored in the second electronic device in the file management interface corresponding to the second electronic device. The icons can more intuitively reflect the file types of the files, which can help users find files that need to be managed more quickly, reduce the probability of misoperation, and improve the convenience and accuracy of users' management operations on files across devices.
[0255] Fig.19 FIG. 1 is a structural block diagram of an electronic device in an embodiment. Fig.19 As shown, the electronic device 1900 may include one or more of the following components: a processor 1910, a memory 1920 coupled to the processor 1910, and a transceiver unit, wherein the memory 1920 may store one or more computer programs, and the one or more computer programs may be configured to be executed by one or more processors 1910, so that the electronic device 1900 implements the cross-device file management method applied to the first electronic device as described in the above embodiments.
[0256] The processor 1910 may include one or more processing cores. The processor 1910 uses various interfaces and lines to connect the various parts of the entire electronic device 1900, and executes various functions and processes data of the electronic device 1900 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1920, and calling data stored in the memory 1920. Optionally, the processor 1910 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 1910 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 1910, but may be implemented separately through a communication chip.
[0257] The memory 1920 may include a random access memory (RAM) or a read-only memory (ROM). The memory 1920 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 1920 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. The data storage area may also store data created by the electronic device 1900 during use, etc.
[0258] The transceiver unit may include but is not limited to a Bluetooth module, a Wi-Fi module, etc., which may be used to provide communication functions.
[0259] An embodiment of the present application discloses an electronic device, including a memory, a processor, and a transceiver unit. The memory stores a computer program. When the computer program is executed by the processor, the headphone device implements the cross-device file management method applied to a second electronic device as described in the above embodiments.
[0260] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor in an electronic device, the electronic device implements a cross-device file management method applied to a first electronic device as described in the above embodiments.
[0261] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor in an electronic device, the electronic device implements a cross-device file management method applied to a second electronic device as described in the above embodiments.
[0262] An embodiment of the present application discloses a computer program product, which includes a computer program. When the computer program can be executed by a processor in an electronic device, the electronic device implements the cross-device file management method applied to a first electronic device as described in the above embodiments.
[0263] An embodiment of the present application discloses a computer program product, which includes a computer program. When the computer program can be executed by a processor in an electronic device, the electronic device implements the cross-device file management method applied to a second electronic device as described in the above embodiments.
[0264] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a ROM, etc.
[0265] As used herein, any reference to memory, storage, database, or other medium may include nonvolatile and / or volatile memory. Suitable nonvolatile memory may include ROM, programmable ROM (Programmable ROM, PROM), erasable PROM (Erasable PROM, EPROM), electrically erasable PROM (Electrically Erasable PROM, EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which is used as an external cache memory. By way of illustration and not limitation, RAM may be in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), memory bus direct RAM (RDRAM) and direct memory bus dynamic RAM (DRDRAM).
[0266] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. Those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application. It should be noted that "multiple" in the present application includes "two or more".
[0267] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the above-mentioned processes does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0268] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0269] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0270] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0271] The above is a detailed introduction to a cross-device file management method, device, electronic device and program product disclosed in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. At the same time, for those of ordinary skill in the art, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A cross-device file management method, characterized in that: Applied to a first electronic device, the first electronic device establishes a communication connection with a second electronic device, and the method includes: Acquire file information corresponding to one or more files stored in the second electronic device; Displaying a file management interface according to the file information corresponding to the one or more files; displaying one or more icons corresponding to the files in the file management interface, wherein the icons corresponding to the files are determined according to the file types corresponding to the files; In response to a triggering operation on a target icon in the file management interface, a management operation is performed on a target file corresponding to the target icon.
2. The method according to claim 1, characterized in that The file management interface includes a file display area and a function area, wherein the file display area is used to display one or more icons corresponding to the file; The functional area includes a search component; the method further includes: In response to a search operation, obtaining search content input in the search component; Determining one or more files matching the search content according to the search content and the file information corresponding to the one or more files; Icons corresponding to the matched one or more files are displayed in the file display area.
3. The method according to claim 2, characterized in that The file management interface also includes a file classification area, which includes multiple categories, and the multiple categories are divided according to one or more of the following methods: Divide according to the file type corresponding to the file; Divide by the application to which the file belongs; Divided according to the operation time of file management operations.
4. The method according to claim 3, characterized in that: The function area is located on a first side of the document display area, and the document classification area is located on a second side of the document display area.
5. The method according to claim 1, characterized in that The file management interface includes a record component; the method further includes: In response to a triggering operation on the record component, one or more file management records are displayed in the file management interface, and the file management record includes operation information of a management operation performed on a file.
6. The method according to any one of claims 1 to 5, characterized in that: The management operation includes one or more of a download operation, a delete operation, an edit operation, a file opening operation, a copy operation, and an operation of sending a target file to a local application.
7. The method according to claim 1, characterized in that The performing management operations on the target file corresponding to the target icon includes: Acquire first path information of the target file in the second electronic device; An operation request is generated according to the first path information, and the operation request is sent to the second electronic device, so that the second electronic device performs processing corresponding to the management operation on the target file corresponding to the first path information according to the operation request.
8. The method according to claim 7, characterized in that The step of generating an operation request according to the first path information, and sending the operation request to the second electronic device, so that the second electronic device performs a process corresponding to the management operation on the target file corresponding to the first path information according to the operation request, includes: Generate an operation request according to the first path information, and send the operation request to the second electronic device, wherein the operation request is used to instruct the second electronic device to create a data transmission channel corresponding to the target file and return response information; receiving the response information sent by the second electronic device; A data acquisition request is sent to the second electronic device, where the data acquisition request is used to instruct the second electronic device to transmit the file data of the target file to the first electronic device through the data transmission channel.
9. The method according to claim 8, characterized in that The operation request also carries a task identifier of the download task corresponding to the target file, and the operation request is used to instruct the second electronic device to create a data transmission channel corresponding to the target file and bind the data transmission channel to the task identifier; The sending a data acquisition request to the second electronic device includes: A data acquisition request is generated according to the task identifier of the download task, and the data acquisition request is sent to the second electronic device, wherein the data acquisition request is used to instruct the second electronic device to transfer the file data of the target file to the first electronic device through the data transmission channel corresponding to the task identifier.
10. The method according to claim 8 or 9, characterized in that: The operation request and the response information are transmitted based on the WebSocket protocol, and the data acquisition request and the file data of the target file are transmitted based on the Hypertext Transfer Protocol HTTP protocol.
11. The method according to claim 8 or 9, characterized in that: The obtaining first path information of the target file in the second electronic device includes: Obtaining second path information of the target file in the local file system; The second path information is mapped to the first path information of the target file in the second electronic device.
12. The method according to claim 11, characterized in that The file information of the file includes first path information of the file in the second electronic device; before obtaining the second path information of the target file in the local file system, the method further includes: In the target directory of the local file system, second path information corresponding to one or more of the files is generated, and a mapping relationship between the second path information corresponding to each of the files and the corresponding first path information is established.
13. The method according to claim 12, characterized in that Generating second path information corresponding to one or more files in the target directory of the local file system includes: In the target directory of the local file system, create one or more second path information corresponding to the file, and generate a placeholder file under each of the second path information; The mapping the second path information to the first path information of the target file in the second electronic device includes: If it is determined that the second path information corresponding to the target file is a placeholder file, the second path information corresponding to the target file is mapped to the first path information of the target file in the second electronic device.
14. The method according to claim 13, characterized in that The method further comprises: Receiving file data of the target file sent by the second electronic device; The file data is written into a placeholder file under the second path information corresponding to the target file.
15. The method according to any one of claims 12 to 14, characterized in that: Generate second path information corresponding to one or more files in the target directory of the local file system, including: When one or more icons corresponding to the files are displayed in the file management interface, second path information corresponding to each file displayed in the file management interface is generated in the target directory of the local file system.
16. The method according to claim 11, characterized in that The management operation includes sending the target file to a local application; the response to the triggering operation of the target icon in the file management interface, performing the management operation on the target file corresponding to the target icon, further includes: In response to a trigger operation on a target icon in the file management interface, an operation object is generated according to second path information of the target file in the local file system, and the operation object is sent to a local application so that the local application sends a read request corresponding to the second path information; The obtaining the second path information of the target file in the local file system includes: In response to the read request, second path information of the target file in the local file system is obtained.
17. The method according to any one of claims 1 to 5, characterized in that: The file management interface also includes an upload control; the method also includes: In response to the triggering operation of the upload control, a file to be transmitted is determined, and the file to be transmitted is sent to the second electronic device.
18. A cross-device file management method, characterized in that: Applied to a second electronic device, the second electronic device establishes a communication connection with a first electronic device, the method comprising: Sending to the first electronic device file information corresponding to one or more files stored in the second electronic device, so that the first electronic device displays a file management interface according to the file information corresponding to the one or more files; displaying one or more icons corresponding to the files in the file management interface, wherein the icons corresponding to the files are determined according to the file types corresponding to the files; and the file management interface is used to provide management functions for files stored in the second electronic device.
19. The method according to claim 18, characterized in that The method further comprises: receiving an operation request sent by the first electronic device; the operation request carries first path information of a target file in the second electronic device; the target file is a file that needs to be managed; According to the operation request, processing corresponding to the management operation is performed on the target file corresponding to the first path information.
20. The method according to claim 19, characterized in that The performing, according to the operation request, processing corresponding to the management operation on the target file corresponding to the first path information includes: According to the operation request, determining the target file corresponding to the first path information, and creating a data transmission channel corresponding to the target file; Sending response information to the first electronic device; Receiving a data acquisition request sent by the first electronic device; In response to the data acquisition request, the file data of the target file is transmitted to the first electronic device through the data transmission channel.
21. The method according to claim 20, characterized in that The operation request also carries a task identifier of the download task corresponding to the target file; The step of determining the target file corresponding to the first path information according to the operation request, and creating a data transmission channel corresponding to the target file, includes: According to the operation request, determine the target file corresponding to the first path information, create a data transmission channel corresponding to the target file, and bind the data transmission channel to the task identifier; The step of transmitting the file data of the target file to the first electronic device through the data transmission channel in response to the data acquisition request includes: According to the task identifier carried in the data acquisition request, the file data of the target file is transmitted to the first electronic device through the data transmission channel corresponding to the task identifier.
22. The method according to claim 20 or 21, characterized in that The operation request and the response information are transmitted based on the WebSocket protocol, and the data acquisition request and the file data of the target file are transmitted based on the Hypertext Transfer Protocol HTTP protocol.
23. The method according to any one of claims 19 to 21, characterized in that: The receiving the operation request sent by the first electronic device includes: receiving a request sent by the first electronic device; Determine a request type corresponding to the request, and if the request type is an operation request, determine that the operation request sent by the first electronic device is received.
24. The method according to claim 23, characterized in that After determining the request type corresponding to the request, the method further includes: If the request type is a connection request, determining that a connection request sent by the first electronic device is received; In response to the connection request, connection information is sent to the first electronic device, so that the first electronic device establishes a communication connection with the second electronic device according to the connection information.
25. A cross-device file management device, characterized in that: Applied to a first electronic device, the first electronic device establishes a communication connection with a second electronic device, and the device includes: An information acquisition module, used to acquire file information corresponding to one or more files stored in the second electronic device; A display module, used to display a file management interface according to the file information corresponding to the one or more files; the file management interface displays one or more icons corresponding to the files, and the icons corresponding to the files are determined according to the file types corresponding to the files; The management module is used to perform management operations on the target file corresponding to the target icon in response to a trigger operation on the target icon in the file management interface.
26. A cross-device file management device, characterized in that: Applied to a second electronic device, the second electronic device establishes a communication connection with a first electronic device, the device includes: The information sending module is used to send the file information corresponding to one or more files stored in the second electronic device to the first electronic device, so that the first electronic device displays a file management interface according to the file information corresponding to the one or more files; the file management interface displays one or more icons corresponding to the files, and the icons corresponding to the files are determined according to the file types corresponding to the files; the file management interface is used to provide a management function for the files stored in the second electronic device. .
27. An electronic device, characterized in that: The electronic device comprises a memory, a processor and a transceiver unit. The memory stores a computer program. When the computer program is executed by the processor, the electronic device implements the method according to any one of claims 1 to 17 or 18 to 24.
28. A computer program product, characterized in that The method comprises a computer program, and when the computer program is executed by a processor in an electronic device, the electronic device implements the method according to any one of claims 1 to 17 or 18 to 24.
Citation Information
Cited By
Cross-device file management method and apparatus, and electronic device and program product
WO2026081774A1