CN118092726A - File management method and electronic equipment - Google Patents

File management method and electronic equipment Download PDF

Info

Publication number
CN118092726A
CN118092726A CN202211500737.0A CN202211500737A CN118092726A CN 118092726 A CN118092726 A CN 118092726A CN 202211500737 A CN202211500737 A CN 202211500737A CN 118092726 A CN118092726 A CN 118092726A
Authority
CN
China
Prior art keywords
file
external storage
equipment
electronic equipment
recycle bin
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211500737.0A
Other languages
Chinese (zh)
Inventor
颜宏
肖翰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202211500737.0A priority Critical patent/CN118092726A/en
Priority to PCT/CN2023/131103 priority patent/WO2024114344A1/en
Publication of CN118092726A publication Critical patent/CN118092726A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application provides a file management method and electronic equipment, which are used for improving the flexibility of file management so as to improve user experience. According to the method, when the user deletes the first file stored in the external storage device through the first window displayed by the electronic device, the icon of the first file can be displayed in the recycle bin window of the electronic device, so that the user can be reminded that the first file is deleted. The method can improve the flexibility of file management of the electronic equipment and improve the user experience.

Description

File management method and electronic equipment
Technical Field
The present application relates to the field of electronic devices, and in particular, to a file management method and an electronic device.
Background
Currently, electronic devices may establish a communication connection with an external storage device in a variety of ways. The manner in which the electronic device establishes a connection with the external storage device is different depending on the types of the external storage device and the electronic device. Taking electronic equipment as an example for illustration, if the external storage equipment is a USB flash disk, the computer can establish connection through a USB socket of the USB flash disk; if the external storage equipment is external equipment such as a mobile phone or a tablet personal computer with a USB interface, the computer can be connected with the external equipment through a USB cable; if the external storage device is an intelligent terminal (mobile phone, tablet personal computer, intelligent television, intelligent wearable device), the computer can establish connection with the intelligent terminal through a screen collaboration technology.
When the electronic device establishes communication connection with the external storage device, files stored in the external storage device can be managed. However, the current file management schemes are relatively single and have poor user experience.
Disclosure of Invention
The application provides a file management method and electronic equipment, which are used for improving the flexibility of file management so as to improve user experience.
In a first aspect, an embodiment of the present application provides a file management method, which may be applied to a communication system including an electronic device and an external storage device. The method comprises the following steps:
After the electronic equipment is connected with the external storage equipment, the electronic equipment displays an icon of a first file stored by the external storage equipment in a first window of a display screen; when the electronic equipment detects a first operation, the icon of the first file is not displayed in the first window; the first operation is used for deleting the first file; when the electronic equipment detects a second operation, a recycle bin window containing the icon of the first file is displayed in the display screen; wherein the second operation is for opening a recycle bin of the electronic device.
According to the method, when the user deletes the first file stored in the external storage device through the first window displayed by the electronic device, the icon of the first file can be displayed in the recycle bin window of the electronic device, so that the user can be reminded that the first file is deleted. The method can improve the flexibility of file management of the electronic equipment and improve the user experience.
In one possible design, after displaying a recycle bin window containing the icon of the first file in the display screen, the electronic device may further not display the icon of the first file in the recycle bin window and display the icon of the first file in the first window when the electronic device detects a third operation within the recycle bin window; wherein the third operation is used for restoring the first file.
Through the design, a user can restore the deleted first file of the external storage device through the recycle bin window displayed by the electronic device, so that the flexibility of file management of the electronic device and the user experience are further improved.
In one possible design, after displaying the recycle bin window containing the icon of the first file in the display screen, when the electronic device detects the second operation after disconnecting from the external storage device, displaying the recycle bin window not containing the icon of the first file in the display screen; and when the electronic equipment detects the second operation after the connection between the electronic equipment and the external storage equipment is established again, displaying a recycle bin window containing the icon of the first file in the display screen.
By means of the design, after the external storage device is disconnected from the electronic device, the recycle bin window of the electronic device does not display the deleted first file of the external storage device any more, and after the external storage device is connected with the electronic device again, the recycle bin window of the electronic device can display the first file again. Therefore, each time the external storage device is connected with the electronic device, the recycle bin window of the electronic device can display the deleted files of the external storage device, so that a user can be prompted and file management can be conveniently conducted on the deleted files by the user.
In one possible design, after the electronic device establishes a connection with the external storage device, the electronic device maps a virtual recycle bin of the external storage device to the recycle bin; wherein the virtual recycle bin is a hidden system folder created by the external storage device; when the electronic equipment detects the first operation, a file deleting instruction is sent to the external storage equipment; the file deleting instruction is used for indicating the external storage device to delete the first file; after receiving a file deletion instruction from the electronic device, the external storage device modifies the file attribute of the first file from a default value to deleted according to the file deletion instruction, and creates first link information in the virtual recycle bin; the first link information is used for indicating the first file.
In this design, by modifying the file attribute of the first file, it may be ensured that the first file is displayed in a deleted state, that is, no icon of the first file is displayed on the user interface of the external storage device or the first window of the electronic device. The external storage device does not move the location of the first file (i.e., does not change the storage space and storage address of the first file), so that the first file can be recovered later. In addition, since the first file is not moved, the virtual recycle bin only stores the link information of the deleted file, and does not need to store the deleted file, so that the virtual recycle bin does not actually occupy a large storage space of the external storage device. In addition, the first link information is created in the virtual recycle bin, so that the external storage device can conveniently find the first file through the first link information.
In one possible design, when the electronic device detects the second operation, displaying a recycle bin window containing an icon of the first file in the display screen, including: when the electronic equipment detects the second operation, a recycle bin window containing at least one icon for deleting the file is displayed in the display screen; wherein the at least one deleted file comprises a file indicated by at least one link information in the virtual recycle bin, the at least one link information comprising the first link information; the at least one deleted file includes the first file.
With this design, since the virtual recycle bin of the external storage device is mapped to the recycle bin of the electronic device, when the user opens the recycle bin window, icons of files indicated by all link information in the virtual recycle bin can be displayed in the recycle bin window.
In one possible design, when the first file is a multimedia file, the external storage device may further delete the media information of the first file in the media library according to the file deletion instruction.
By the design, the media library can be prevented from scanning the file when the file is scanned, so that the user interface of the external storage device can be ensured not to display the first file.
In one possible design, when the electronic device detects the third operation, the electronic device may further send a file recovery instruction to the external storage device; the file recovery instruction is used for indicating the external storage device to recover the first file; and after receiving a file recovery instruction from the electronic equipment, the external storage equipment recovers the file attribute of the first file to the default value according to the file recovery instruction, and deletes the first link information in the virtual recycle bin.
By the design, the user can restore the deleted files in the external storage device by operating the electronic device.
In one possible design, the external storage device is an intelligent terminal device, and the electronic device establishes a connection with the external storage device, including: the electronic device and the external storage device establish wireless communication connection through a short-distance wireless communication technology. Based on the above, after the electronic device establishes a connection with the external storage device, the electronic device may establish a device collaboration channel with the external storage device through the wireless communication connection; the electronic equipment receives screen projection data from the external storage equipment through the equipment collaboration channel; the electronic equipment displays the first window in the display screen according to the screen throwing data; the first window is a screen window currently displayed by the external storage device.
By means of the design, in the scene that the external storage device and the electronic device are in screen collaboration, a user can realize file management of the external storage device by operating the electronic device.
In one possible design, the electronic device may map a virtual recycle bin of the external storage device to the recycle bin by:
The electronic equipment generates a file management instruction according to a media transmission protocol MTP; the file management instruction is used for indicating the external storage device to mount the virtual recycle bin as a virtual disk of the electronic device; the electronic equipment sends the file management instruction to the external storage equipment through the equipment cooperative channel according to the network control mode NCM technology; the external storage device receives the file management instruction from the electronic device through the device cooperation channel according to the NCM technology, and mounts the virtual recycle bin as a virtual disk of the electronic device according to the file management instruction; the electronic equipment maps the virtual recycle bin to the recycle bin through a disk management program.
In the design, the electronic device and the external storage device can complete the transmission of MTP messages through NCM technology, and then the virtual recycle bin of the external storage device is mapped to the recycle bin of the electronic device.
In one possible design, the electronic device may send a file deletion instruction to the external storage device when the first operation is detected by:
When the electronic equipment detects the first operation, generating a file path request according to the MTP; according to the NCM technology, the file path request is sent to the external storage device through the device cooperation channel; the file path request is used for requesting a storage path of the first file; the external storage device receives the file path request from the electronic device through the device cooperation channel according to the NCM technology; acquiring a storage path of the first file according to the file path request, and generating a file path response containing the storage path of the first file according to the MTP; according to the NCM technology, sending the file path response to the electronic equipment through the equipment cooperative channel; the electronic equipment receives the file path response from the external storage equipment through the equipment cooperative channel according to the NCM technology; generating a file deletion instruction containing a storage path of the first file; and the electronic equipment sends the file deleting instruction to the external storage equipment through the equipment collaboration channel.
Through the design, the electronic device can complete the transmission of the MTP message through NCM technology, so that the storage path of the first file is obtained from the external storage device, and further a file deleting instruction containing the storage path of the first file can be sent to the external storage device to instruct the external storage device to execute deleting operation on the first file.
In one possible design, the electronic device may send a file restore instruction to the external storage device when the third operation is detected within the recycle bin window by:
When the electronic equipment detects the third operation in the recycle bin window, generating a file information request according to the MTP; according to the NCM technology, the file information request is sent to the external storage device through the device cooperation channel, and the file information request is used for requesting a storage path and a file name of the first file indicated by the first link information; the external storage device receives the file information request from the electronic device through the device cooperation channel according to the NCM technology; determining a storage path and a file name of the first file indicated by the first link information according to the file information request; generating a file information response containing a storage path and a file name of the first file according to the MTP; according to the NCM technology, the file information response is sent to the electronic equipment through the equipment cooperative channel; the electronic equipment receives the file information response from the external storage equipment through the equipment cooperative channel according to the NCM technology; generating a file recovery instruction containing a storage path and a file name of the first file; and the electronic equipment sends the file recovery instruction to the external storage equipment through the equipment collaboration channel.
Through the design, the electronic device can complete the transmission of the MTP message through NCM technology, so that the storage path and the file name of the first file are obtained from the external storage device, and further a file recovery instruction containing the storage path and the file name of the first file can be sent to the external storage device to instruct the external storage device to recover the first file.
In one possible design, the external storage device and the electronic device have a communication interface, and the electronic device establishes a connection with the external storage device, including: and the electronic equipment and the external storage equipment are in physical communication connection through the communication interface. Based on the above, after the electronic device establishes connection with the external storage device, the electronic device may map the storage space of the external storage device to the first disk of the electronic device according to a communication protocol corresponding to the communication interface; after the electronic equipment detects the fourth operation, the first window is displayed in the display screen; the fourth operation is used for opening the first disk, and the first window is a display window of the first disk.
By means of the design, in the scene that the external storage device and the electronic device are in physical communication connection through the communication interface, a user can realize file management of the external storage device by operating the electronic device.
In one possible design, the electronic device may map a virtual recycle bin of the external storage device to the recycle bin by:
The electronic equipment generates a file management instruction based on the communication protocol; the file management instruction is used for indicating the external storage device to mount the virtual recycle bin as a virtual disk of the electronic device; the electronic equipment sends the file management instruction to the external storage equipment through the communication interface; the external storage device receives the file management instruction from the electronic device through the communication interface, and mounts the virtual recycle bin as a virtual disk of the electronic device according to the file management instruction; the electronic equipment maps the virtual recycle bin to the recycle bin through a disk management program.
In this design, the electronic device and the external storage device may complete message transmission through a communication interface, and further map a virtual recycle bin of the external storage device to a recycle bin of the electronic device.
In one possible design, the electronic device may send a file deletion instruction to the external storage device when the first operation is detected by:
When the electronic equipment detects the first operation, generating a file path request according to the communication protocol, and sending the file path request to the external storage equipment through the communication interface; the file path request is used for acquiring a storage path of the first file; the external storage device receives the file path request from the electronic device through the communication interface; acquiring a storage path of the first file according to the file path request, and generating a file path response containing the storage path of the first file according to the communication protocol; transmitting the file path response to the electronic device through the communication interface; the electronic equipment receives the file path acquisition response through the communication interface and then generates a file deletion instruction containing a storage path of the first file; and the electronic equipment sends the file deleting instruction to the external storage equipment through the communication interface.
Through the design, the electronic device can complete transmission of the message through the communication interface, so that the storage path of the first file is obtained from the external storage device, and further a file deleting instruction containing the storage path of the first file can be sent to the external storage device to instruct the external storage device to execute deleting operation on the first file.
In one possible design, the electronic device may send a file restore instruction to the external storage device when the third operation is detected within the recycle bin window by:
When the electronic equipment detects the third operation in the recycle bin window, generating a file information request according to the communication protocol; the file information request is used for requesting a storage path and a file name of the first file indicated by the first link information; the external storage device receives the file information request from the electronic device through the communication interface; determining a storage path and a file name of the first file indicated by the first link information according to the file information request; generating a file information response containing a storage path and a file name of the first file according to the communication protocol; transmitting the file information response to the electronic equipment through the communication interface; the electronic equipment receives the file information response from the external storage equipment through the communication interface; generating a file recovery instruction containing a storage path and a file name of the first file; and the electronic equipment sends the file recovery instruction to the external storage equipment through the communication interface.
Through the design, the electronic device can complete transmission of the message through the communication interface, so that the storage path and the file name of the first file are obtained from the external storage device, and further a file recovery instruction containing the storage path and the file name of the first file can be sent to the external storage device to instruct the external storage device to recover the first file.
In a second aspect, an embodiment of the present application provides an electronic device including a display screen, a memory, and one or more processors; wherein the memory is for storing computer program code, the computer program code comprising computer instructions; the instructions, when invoked by the one or more processors, enable the electronic device to perform the method provided by the first aspect and any one of the possible designs described above.
In a third aspect, an embodiment of the present application provides an external storage device, including a memory and at least one processor; wherein the memory is for storing computer program code, the computer program code comprising computer instructions; the computer instructions, when invoked by the at least one processor, enable the external storage device to perform the methods provided by the first aspect and any one of the possible designs described above. Optionally, the external storage device may further include a display screen.
In a fourth aspect, embodiments of the present application provide a chip comprising a processor and a memory, the processor being coupled to the memory, the processor being configured to invoke a computer program stored in the memory at runtime, implementing the method provided by the first aspect and any one of the possible designs described above.
In a fifth aspect, embodiments of the present application provide a computer storage medium storing a computer program which, when run on an electronic device, causes the computer to carry out the method of the first aspect or any one of the possible designs of the first aspect.
In a sixth aspect, embodiments of the present application provide a computer program product comprising a computer program; the computer program, when run on a computer, causes the computer to perform the method of the first aspect or any one of the possible designs of the first aspect.
Drawings
Fig. 1A is a schematic diagram of a connection manner between an electronic device and an external storage device according to an embodiment of the present application;
Fig. 1B is a schematic diagram of a connection manner between an electronic device and an external storage device according to an embodiment of the present application;
Fig. 1C is a schematic diagram of a connection manner between an electronic device and an external storage device according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 3 is a schematic software structure of an electronic device or an external storage device according to an embodiment of the present application;
FIG. 4 is a flowchart of a method for managing files according to an embodiment of the present application;
FIG. 5 is a flowchart of interaction between an electronic device and an external storage device according to an embodiment of the present application;
FIG. 6 is a flowchart of interaction between an electronic device and an external storage device according to an embodiment of the present application;
FIG. 7 is a flowchart of interaction between an electronic device and an external storage device according to an embodiment of the present application;
fig. 8A is a schematic diagram of a smart phone and a PC establishing a device collaboration channel according to an embodiment of the present application;
fig. 8B is a schematic diagram of a virtual disk mounted as a PC on a smart phone according to an embodiment of the present application;
Fig. 8C is a schematic diagram of mapping a virtual recycle bin of a smart phone to a recycle bin of a PC according to an embodiment of the present application;
Fig. 8D is a schematic diagram of deletion of PIC1 provided in an embodiment of the present application;
fig. 8E is a schematic diagram of permanent deletion of PIC1 provided in an embodiment of the present application;
fig. 8F is a schematic diagram of a reduced PIC1 provided in an embodiment of the present application;
Fig. 9A is a schematic diagram of screen states of a PC and a smart phone in a file management process according to an embodiment of the present application;
Fig. 9B is a schematic diagram of screen states of a PC and a smart phone in a file management process according to an embodiment of the present application;
fig. 9C is a schematic diagram of screen states of a PC and a smart phone in a file management process according to an embodiment of the present application;
FIG. 10A is a schematic diagram of a PC screen state in a file management process according to an embodiment of the present application;
FIG. 10B is a schematic diagram of a PC screen state in a file management process according to an embodiment of the present application;
FIG. 10C is a schematic diagram of a PC screen state in a file management process according to an embodiment of the present application;
FIG. 11 is a block diagram of an electronic device according to an embodiment of the present application;
Fig. 12 is a block diagram of an external storage device according to an embodiment of the present application.
Detailed Description
The application provides a file management method and electronic equipment, which are used for improving the flexibility of file management so as to improve user experience. The method and the device are based on the same technical conception, and because the principle of solving the problems by the method and the device is similar, the implementation of the device and the method can be mutually referred to, and the repeated parts are not repeated.
Some terms used in the present application are explained below to facilitate understanding by those skilled in the art.
1) The electronic device is a device with a display screen, can establish connection with other external storage devices, and can be used as a master device (or a control management device) to manage files stored in the external storage devices.
The electronic device in the embodiment of the application can be a personal computer (personal computer, PC), a notebook computer, a netbook, a tablet personal computer, a vehicle-mounted computer and the like. Of course, the electronic device may also be various portable devices, such as a vehicle-mounted terminal device, a Personal Digital Assistant (PDA), a smart home device (e.g., a smart television, etc.), and the like. The electronic device may be, for example, but not limited to, on-board Or other operating system.
In the description of the subsequent embodiment of the present application, an electronic device is taken as an example of a PC. However, it should be noted that the scheme provided by the embodiment of the application does not limit the type of the electronic device, and may be replaced by other types of electronic devices.
2) And a recycle bin of the electronic equipment, wherein one of the system folders in the operating system of the electronic equipment is mainly used for storing files temporarily deleted by a user. Files stored in the recycle bin may be restored. Files in the recycle bin are permanently deleted when the user performs a purge recycle bin operation.
The operating system at the electronic device opens up separate space for each disk of the electronic device, i.e., creates a system folder named $ recycle. When a file in a disk is deleted, the file is renamed and moved to the hidden folder corresponding to the disk.
The operating system of the electronic device may map the hidden folders corresponding to the respective disks to the recycle bin. Thus, when the user opens the recycle bin window, the content in the hidden folder of each disk that has been deleted by the user can be displayed in the recycle bin window.
3) The system folder refers to a folder storing main files of an operating system, and is generally automatically created when the operating system is first run or installed. The files stored in the system folder typically affect the operation of the system.
4) An external storage device, a device having data storage capabilities. In the present application, the external storage device is capable of establishing a connection with the electronic device in 1).
In the embodiment of the application, the external storage device can be a portable storage product, a terminal device with a communication interface, an intelligent terminal device capable of performing screen collaboration with the electronic device, and the like.
By way of example, the portable storage product may be a USB flash disk, a removable hard disk, a card reader, or the like.
Some examples of terminal devices or intelligent terminal devices with a communication interface include: smart phones, wearable devices, VR devices, AR devices, smart home devices, smart televisions, wireless terminals in industrial control (industrial control), wireless terminals in unmanned (SELF DRIVING), wireless terminals in teleoperation (remote medical surgery), wireless terminals in smart grid (SMART GRID), wireless terminals in transportation security (transportation safety), wireless terminals in smart city (SMART CITY), wireless terminals in smart home (smart home), various smart meters (smart water meter, smart electricity meter, smart gas meter), on-board electronic control units (electronic control unit, ECU) and the like, on-board computers, on-board cruise systems, telematics processors (TELEMATICS BOX, T-BOX), terminal devices in future networks, and the like.
5) Screen collaboration, also known as multi-screen collaboration, screen projection, screen sharing, same screen, screen flying, screen sharing, refers to a setting area of a screen B of a device a (such as a mobile phone, a tablet, a notebook, a computer, etc.) in which a screen displayed by output is displayed on a screen B of a device B (such as a tablet, a notebook, a computer, a television, an integrated machine, etc.) in real time. The screen change of the screen a caused by the user operating the device a is synchronously displayed in the setting area of the screen b. In addition, the user operates a set area in the screen B of the device B, and causes a change in the screen of the set area, which is also displayed simultaneously in the screen a.
6) The files related to the embodiment of the application can be text, multimedia files (such as images, videos, audios and the like), office (office) files (such as word files, excel files, powerpoint files and the like), files, compressed files, executable files, non-executable files and the like, and the type of the files is not limited by the application.
It should be understood that in embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a alone, a and B together, and B alone, wherein A, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one (item) below" or the like, refers to any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b or c may represent: a, b, c, a and b, a and c, b and c, or a, b and c, wherein a, b and c can be single or multiple.
The following describes the scheme provided by the embodiment of the application in detail with reference to the accompanying drawings.
The file management method provided by the embodiment of the application can be applied to a communication system for establishing connection between the electronic equipment and the external storage equipment. Alternatively, the electronic device and the external storage device may be connected in a variety of ways. The connection manner between the electronic device and the external storage device is exemplarily described below with reference to the scenario provided in the accompanying drawings.
Scene one: the external storage device has a communication interface and the electronic device also has a communication interface. A physical connection may be established between the external storage device and the electronic device via a communication interface. The following exemplary descriptions are respectively made according to a connection manner between the external storage device and the electronic device:
The first connection mode is as follows: the communication interface (male port) of the external storage device may be plugged into the communication interface (female port) of the electronic device, both of which establish a physical connection, as shown with reference to fig. 1A. It should be noted that in fig. 1A, taking the external storage device as a usb disk as an example, other kinds of external storage devices such as a card reader may also establish a physical connection with an electronic device in a first manner.
And the connection mode II is as follows: the communication interface of the external storage device is connected with the communication interface of the electronic device through a cable, so that the physical connection of the communication interface of the external storage device and the communication interface of the electronic device is realized, and the communication interface is shown in fig. 1B. It should be noted that, in fig. 1B, taking the external device as an example of a mobile hard disk, other external storage devices with communication interfaces (for example, various terminal devices such as a mobile phone, mp3, mp4, etc.) may also use a cable to establish a physical connection with an electronic device in a second manner.
The present application is not limited to the type of the communication interface of the external storage device or the electronic device. By way of example, the communication interface may be, but is not limited to, a universal serial bus (universal serial bus, USB) interface.
In scenario one, the electronic device maps the storage space of an external storage device that is physically connected to the electronic device to a virtual disk of the electronic device. The user can manage (delete, modify, copy, cut, paste, etc.) the files in the virtual disk on the electronic device, thereby implementing management of the files stored in the external storage device.
Scene II: when the external storage device is an intelligent terminal device, the electronic device and the external storage device are in communication connection, so that a device cooperation channel can be established based on the communication connection, screen cooperation is realized, and the method is shown in fig. 1C. The communication connection between the electronic device and the external storage device may be a wireless communication connection or a wired communication connection, which is not limited in the present application. An example of a wireless communication connection is illustrated in fig. 1C.
In addition, in fig. 1C, an external storage device is taken as an example of a smart phone, but other smart terminal devices (e.g., smart wearable devices, smart televisions, tablet computers, etc.) may also establish a device collaboration channel with an electronic device.
In one embodiment, in the second scenario, the electronic device and the external storage device may access the same wireless local area network (wireless local area network, WLAN) through a short-range wireless communication technology. Thus, the electronic device and the external storage device can establish a device collaboration channel through the local area network. By way of example, the short-range wireless communication technology may include, but is not limited to: bluetooth technology, wireless-fidelity (Wi-Fi) technology, wi-Fi point-to-point (P2P) technology, near field communication (NEAR FIELD communication) technology, and the like.
Optionally, the second scenario may further comprise an access point. The access point supports short-range wireless communication technology. The electronic device and the external storage device may be first accessed to the access point by a short-range wireless communication technology, and then the access point accesses the electronic device and the external storage device to the local area network. For example, the access point may be a WIFI access point, and the electronic device and the external storage device may access the same WIFI access point.
For another example, the electronic device and the external storage device may access the same bluetooth beacon through bluetooth technology, so that the two devices may establish wireless communication connection through bluetooth technology, and further establish a device collaboration channel.
For another example, the electronic device and the external storage device can trigger communication connection through the NFC tag, and then transmit encryption through the Bluetooth module to perform identity authentication; after authentication is successful, the two can communicate in a P2P mode.
In the second scene, when the external storage device and the electronic device perform screen coordination, the external storage device can project the screen of the external storage device onto the screen of the electronic device, and at the moment, a screen projection window is displayed on the screen of the electronic device, and the content displayed by the screen projection window is the same as the content displayed by the screen window of the external storage device. It should be noted that the picture displayed in the screen-drop window of the electronic device is synchronized in real time with the picture displayed on the screen window of the external storage device.
When a user operates the external storage device and the screen picture of the external storage device changes, the external storage device can send screen throwing data to the electronic device through the device cooperation channel; and the electronic equipment updates the screen throwing window according to the received screen throwing data so as to ensure that the screen throwing window is synchronously changed.
In addition, when a user operates a screen throwing window in the electronic equipment to cause the window picture in the screen throwing window to change, the electronic equipment can send a control instruction to the external storage equipment through the equipment cooperative channel; the external storage device executes the received control instruction and updates the screen picture of the external storage device, so that the screen synchronization of the external storage device can be ensured to change.
Based on the above description, according to the data type and the data flow direction of the device cooperation channel, in the embodiment of the present application, the device cooperation channel may be divided into two sub-channels, that is, a screen cooperation channel and a cooperation reverse control channel, as shown in fig. 1C. The screen cooperation channel is used for the external storage device to send screen throwing data to the electronic device, and the cooperation reverse control channel is used for the electronic device to send various control instructions to the external storage device.
In summary, in the second scenario, the user may manage (delete, modify, etc.) the file in the external storage device through the screen window on the electronic device, so as to implement management of the file stored in the external storage device.
It should be noted that the types of the electronic device and the external storage device in fig. 1A-1C, the connection manner, the position of the displayed interface or window, and the like are only examples, and do not constitute any limitation on the scenario to which the embodiments of the present application are applicable.
In the first scenario, the user may manage the virtual disk mapped by the external storage device, but after the user deletes the target file of the external storage device through the virtual disk, the target file does not enter the recycle bin of the electronic device. Therefore, when the user opens the recycle bin of the electronic device, the recycle bin window does not display the target file, so that the user cannot see the deleted target file in the external storage device, and the user experience is poor.
In addition, in the first scene, after the user deletes the target file through the virtual disk, the target file is also deleted in the external storage device because the target file is not saved in the recycle bin of the electronic device, which results in permanent deletion of the target file. If the user deletes the target file due to misoperation or later expects to recover the target file, the target file cannot be recovered, and the user experience is further reduced.
In the second scene, when the user deletes the target file in the external storage device by executing the deleting operation on the screen throwing window, the target file does not enter the recycle bin of the electronic device. Therefore, when the user opens the recycle bin of the electronic device, the recycle bin window does not display the target file, so that the user cannot see the deleted target file in the external storage device, and the user experience is poor.
Optionally, in the second scenario, some external storage devices (such as smartphones, etc., tablet computers) may support placing the target file to be deleted into a local recycle bin. For example, applications (system applications or third party applications) of smartphones support moving files such as images, contact information, text messages, video, audio, etc. to be deleted to a local recycle bin. For example, there is an image recycle bin named "recently deleted" in the gallery application of the smartphone for saving images temporarily deleted by the user. The smart phone can move the target picture deleted by the user from the DCIM catalog (namely the original folder of the target image) to the/data/media/0/Pictures/. Gallery2/recycle catalog (namely the image recycle bin), and rename and store the target image in the image recycle bin, so that the target image is not scanned when the media library of the smart phone scans files, and the target image is not displayed when the Gallery application of the smart phone is never opened.
In summary, in both the first scenario and the second scenario, after the electronic device establishes a communication connection with the external storage device, if a user deletes a certain file in the external storage device by operating the electronic device, the recycle bin window of the electronic device will not display the file, and this file management scheme is relatively single and has poor user experience. Based on the above, the embodiment of the application provides a file management method. By the method, the recycle bin window of the electronic device can display the files of the external storage device deleted by the user through the electronic device.
The embodiment of the application provides electronic equipment which can form a communication system with external storage equipment, and the file management method provided by the embodiment of the application is realized. Next, referring to fig. 2, a structure of an electronic device provided in an embodiment of the present application will be described.
As shown in fig. 2, the electronic device 200 may include: processor 210, external memory interface 220, internal memory 221, usb interface 230, charge management module 240, power management module 241, battery 242, antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, audio module 270, speaker 270A, receiver 270B, microphone 270C, headset interface 270D, sensor module 280, keys 290, motor 291, indicator 292, camera 293, display 294, and SIM card interface 295, among others.
It will be appreciated that the electronic device shown in fig. 2 is merely an example and is not limiting of the electronic device, and that the electronic device may have more or fewer components than shown in the figures, may combine two or more components, or may have different configurations of components. The various components shown in fig. 2 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
Processor 210 may include one or more processing units such as, for example: processor 210 may include a central processor (central processing unit, CPU), an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (IMAGE SIGNAL processor, ISP), a controller, memory, a video codec, a digital signal processor (DIGITAL SIGNAL processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors. The controller may be a neural hub and a command center of the electronic device 200, among others. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 210 for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may hold instructions or data that the processor 210 has just used or recycled. If the processor 210 needs to reuse the instruction or data, it may be called directly from the memory. By providing the memory, the number of times the processor 210 performs data access to the internal memory 221 can be reduced, reducing the latency of the processor 210, and thus improving the efficiency of the system.
The file management method provided by the embodiment of the present application may be implemented by the processor 210 controlling or calling other components, such as calling the processing program of the embodiment of the present application stored in the internal memory 221, to control the wireless communication module 260 to perform data communication to the external storage device, and to control the display screen to display the user interface. The processor 210 may include different devices, such as an integrated CPU and a GPU, where the CPU and the GPU may cooperate to perform a file management method provided in an embodiment of the present application, such as a part of algorithms in the file management method being executed by the CPU and another part of algorithms related to user interface display being executed by the GPU, so as to obtain a faster processing efficiency.
The display 294 is used to display images, videos, and the like. The display 294 includes a display panel. The display panel may employ a Liquid Crystal Display (LCD) CRYSTAL DISPLAY, an organic light-emitting diode (OLED), an active-matrix organic LIGHT EMITTING diode (AMOLED), a flexible light-emitting diode (FLED), miniled, microLed, micro-oLed, a quantum dot LIGHT EMITTING diode (QLED), or the like. In some embodiments, the electronic device 200 may include 1 or N display screens 294, N being a positive integer greater than 1. The display 294 may be used to display information entered by or provided to a user as well as various graphical user interfaces (GRAPHICAL USER INTERFACE, GUIs). For example, the display 294 may display windows, photos, videos, web pages, or files, etc. Further, it is to be appreciated that in some embodiments, bluetooth icons, wi-Fi icons, external device icons, etc. may also be included in the status bar. In some embodiments, when the processor 210 detects a touch operation of a finger (or a stylus, etc.) of a user with respect to a certain application icon, a user interface corresponding to the application icon is opened in response to the touch operation, and the user interface is displayed on the display screen 294. In some embodiments, when the processor 210 detects a click operation of an external input device (such as a mouse, a keyboard, etc.) of the electronic device 200 on an application icon, a corresponding control operation is performed on the application in response to the click operation.
In the embodiment of the present application, the display 294 may be an integral flexible display, or a tiled display formed of two rigid screens and a flexible screen located between the two rigid screens may be used. After the processor 210 runs the file management method provided in the embodiment of the present application, the processor 210 may control the display 294 to display the relevant results.
The camera 293 is used to capture still images or video. Alternatively, the electronic device 200 may include 1 to N cameras 293. For example, the camera 293 may include a front camera or a rear camera, or one camera 293 may be used as a front camera or a rear camera. In general, the camera 293 may include photosensitive elements such as a lens group and an image sensor. The lens group comprises a plurality of lenses (convex lenses or concave lenses) for collecting optical signals reflected by an object to be photographed and transmitting the collected optical signals to the image sensor. The image sensor generates an original image of the object to be photographed according to the optical signal.
Internal memory 221 may be used to store computer executable program code that includes instructions. The processor 210 executes various functional applications of the electronic device 200 and data processing by executing instructions stored in the internal memory 221. The internal memory 221 may include a storage program area and a storage data area. The storage program area may store an operating system, program code of at least one application program, and the like. The operating system may be, but is not limited to includingEtc. The storage data area may store data created during use of the electronic device 200, etc.
The internal memory 221 may also store one or more computer programs for performing the file management methods provided by embodiments of the present application. The one or more computer programs are stored in the internal memory 221 and configured to be executed by the one or more processors 210, the one or more computer programs including instructions that can be used to perform the various steps in the following embodiments.
In addition, the internal memory 221 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The sensor module 280 may include a fingerprint sensor, a touch sensor, a pressure sensor, a magnetic sensor, an ambient light sensor, a barometric pressure sensor, a bone conduction sensor, and the like.
Touch sensors, also known as "touch panels". The touch sensor may be disposed on the display 294. The touch sensor is used to detect a touch operation acting on or near it. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 294. In other embodiments, the touch sensor may also be disposed on a surface of the electronic device 200 at a different location than the display 294.
The wireless communication function of the electronic device 200 can be implemented by the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 200 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 250 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied on the electronic device 200. The mobile communication module 250 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), or the like. The mobile communication module 250 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 250 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 250 may be disposed in the processor 210. In some embodiments, at least some of the functional modules of the mobile communication module 250 may be provided in the same device as at least some of the modules of the processor 210.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 270A, receiver 270B, etc.), or displays images or video through display screen 294. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 250 or other functional module, independent of the processor 210.
The wireless communication module 260 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (WIRELESS FIDELITY, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation SATELLITE SYSTEM, GNSS), frequency modulation (frequency modulation, FM), near field communication (NEAR FIELD communication, NFC), infrared (IR), etc., as applied to the electronic device 200. The wireless communication module 260 may be one or more devices that integrate at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 210. The wireless communication module 260 may also receive a signal to be transmitted from the processor 210, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2. In the embodiment of the present application, the electronic device 200 may establish a wireless communication connection with an external storage device through the wireless communication module 260 to perform data interaction, or the electronic device 200 may access an access point through the wireless communication module 260, so that instructions, data, etc. may be sent between the access point and a network device or other electronic devices. For example, the electronic device 200 may establish a device collaboration channel with an external storage device (intelligent terminal device) through the wireless communication module 260, receive screen projection data of the external storage device through the wireless communication module 260, and send a control instruction to the external storage device through the wireless communication module 260.
In addition, the electronic device 200 may implement audio functions through an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, an application processor, and the like. Such as music playing, recording, etc. The electronic device 200 may receive key 290 inputs, generating key signal inputs related to user settings and function control of the electronic device 200. The electronic device 200 may generate a vibration alert using the motor 291. The indicator 292 in the electronic device 200 may be an indicator light, which may be used to indicate a state of charge, a change in power, an indication message, a missed call, a notification, etc. The SIM card interface 295 in the electronic device 200 is used to connect to a SIM card. The SIM card may be inserted into the SIM card interface 295 or removed from the SIM card interface 295 to enable contact and separation from the electronic device 200.
It should be understood that in actual practice, the electronic device 200 shown in fig. 2 is only one example, and the electronic device 200 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits. For example, when the electronic apparatus 200 is a PC, the motor 291, the SIM card interface 295, and the like may not be included in the electronic apparatus 200.
It should be further noted that, in some scenarios (for example, when the external storage device is a smart terminal device such as a smart phone, a tablet computer, or a smart television), the structure of the embodiment of the present application is similar to that of the electronic device 200 in fig. 2, and specific reference may be made to the above description, which is not repeated.
In the electronic device 200 or the external storage device (for example, when the external storage device is an intelligent terminal device) provided in the embodiment of the present application, a software system thereof may adopt a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. In the embodiment of the application, taking an Android system with a layered architecture as an example, an exemplary software structure of an electronic device or an external storage device is shown in fig. 3.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. As shown in fig. 3, the software architecture can be divided into four layers, from top to bottom, an application layer, an application framework layer (FWK), an Zhuoyun lines (Android runtime) and a system library, and a kernel layer, respectively. In addition, the electronic device or the external storage device may also include a hardware layer.
The application layer is the top layer of the operating system, including native applications of the operating system, and third party applications such as cameras, gallery, calendar, bluetooth, music, video, information, and so forth. An application program referred to in the embodiments of the present application is simply referred to as Application (APP), which is a software program capable of implementing one or more specific functions.
In some embodiments, the application layer may include a screen-casting service for managing, in a screen-casting scene, interfaces or windows related to screen-casting on the display screen, for example, monitoring operation information, received by other software layers, of users for the interfaces or windows, controlling a display window on the display screen according to the monitored user operation information, performing information interaction related to screen-casting on the screen-casting service of other electronic devices, obtaining content to be displayed in the interfaces or windows, and the like.
In some embodiments, the application program layer may further include an application window service for managing local application windows displayed on the display screen of the electronic device, or managing application windows from which some specific electronic devices are projected, for example, monitoring operation information, received by other layers, of a user for the windows, controlling the display windows on the display screen according to the monitored operation information of the user, and so on.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for the application of the application layer. The application framework layer may include some predefined functions. The application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
The window manager is used for providing window management services. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like. The window manager may provide a number of management functions to control parameters such as transparency, position and size of a window or interface in the display.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include information such as files (e.g., documents, video, images, audio), text, etc.
The view system includes visual controls, such as controls that display text, pictures, documents, and the like. The view system may be used to build applications. The interface in the display window may be comprised of one or more controls. For example, a display interface on which a file icon is displayed may include a control for displaying text and a control for displaying a picture.
The telephony manager is arranged to provide communication functions for the terminal device. The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction.
The android runtime includes a core library and virtual machines. And the android running time is responsible for scheduling and managing an android system.
The core library of the android system comprises two parts: one part is a function which needs to be called by Java language, and the other part is a core library of the android system. The application layer and the application framework layer run in a virtual machine. Taking Java as an example, the virtual machine executes Java files of the application layer and the application framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media library (media library), three-dimensional graphics processing library (e.g., openGL ES), two-dimensional graphics engine (e.g., SGL), etc. The surface manager is used to manage the display subsystem and provides a fusion of two-dimensional and three-dimensional layers for multiple applications. Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio video encoding formats, such as: MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc. The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like. A two-dimensional graphics engine is a drawing engine that draws two-dimensional drawings.
The Kernel (Kernel) layer provides core system services of the operating system, such as security, memory management, process management, network protocol stacks, driving models, and the like, which are implemented based on the Kernel layer. The kernel layer also acts as an abstraction layer between the hardware and software stacks. This layer has many drivers associated with the electronic device, the main drivers being: a display drive; a keyboard driver as an input device; flash driving based on memory technology equipment; driving a camera; an audio drive; bluetooth driving; wiFi drive, etc.
In some embodiments, the kernel layer may further include an input driver service for acquiring and reporting operation information from an external input device (e.g., mouse, keyboard, touch pad, etc.), a sensor (e.g., touch screen, touch sensor, etc.), or other electronic device on an interface or window displayed on the display screen.
The hardware layer may include various types of sensors, display screens, cameras, and the like.
In order to improve the flexibility of file management, the embodiment of the application provides a file management method. The method is described below with reference to the accompanying drawings. The method may be applied to a communication system comprising an electronic device and an external storage device, such as in the scenario shown in fig. 1A-1C. Referring to fig. 4, the method includes:
S401: after the electronic equipment is connected with the external storage equipment, the electronic equipment displays an icon of a first file stored by the external storage equipment in a first window of a display screen.
S402: and when the electronic equipment detects a first operation, the icon of the first file is not displayed in the first window. The first operation is used for deleting the first file.
S403: and when the electronic equipment detects a second operation, displaying a recycle bin window containing the icon of the first file in the display screen. Wherein the second operation is for opening a recycle bin of the electronic device.
According to the method provided by the embodiment of the application, when the user deletes the first file stored in the external storage device through the first window displayed by the electronic device, the icon of the first file can be displayed in the recycle bin window of the electronic device, so that the user can be reminded that the first file is deleted. The method can improve the flexibility of file management of the electronic equipment and improve the user experience.
In one embodiment, after S403, when the electronic device detects a third operation in the recycle bin window, the icon of the first file may be further not displayed in the recycle bin window, and the icon of the first file may be displayed in the first window. Wherein the third operation is used for restoring the first file.
According to the embodiment, the user can restore the deleted first file of the external storage device through the recycle bin window displayed by the electronic device, so that the flexibility of file management of the electronic device and the user experience are further improved.
In one embodiment, after S403, when the electronic device detects the second operation after the electronic device is disconnected from the external storage device, a recycle bin window that does not include the icon of the first file is displayed in the display screen; and when the electronic equipment detects the second operation after the connection between the electronic equipment and the external storage equipment is established again, displaying a recycle bin window containing the icon of the first file in the display screen.
With this embodiment, after the external storage device is disconnected from the electronic device, the recycle bin window of the electronic device does not display the deleted first file of the external storage device any more, and after the external storage device is reestablished with the electronic device, the recycle bin window of the electronic device may display the first file again. Therefore, each time the external storage device is connected with the electronic device, the recycle bin window of the electronic device can display the deleted files of the external storage device, so that a user can be prompted and file management can be conveniently conducted on the deleted files by the user.
In the embodiment of the present application, the electronic device and the external storage device may implement the above file management method through the following interaction flow, and the specific process may be shown in fig. 5.
S501: after the electronic device establishes a connection with the external storage device, the electronic device may map a virtual recycle bin of the external storage device to the recycle bin of the electronic device. Wherein the virtual recycle bin creates a hidden system folder for the external storage device.
Through this step, the virtual recycle bin (hidden system folder) of the external storage device may be mapped to the recycle bin, so that when the user opens the recycle bin of the electronic device, the recycle bin window may display an icon of a file located in the virtual recycle bin.
Alternatively, the virtual recycle bin may be created when the external storage device is first powered on or powered up. It should be noted that the virtual recycle bin does not disappear when the external storage device is powered off or powered down; when the external storage device is powered on again or powered on again, the virtual recycle bin still exists.
S502: when the electronic equipment detects the first operation, a file deleting instruction is sent to the external storage equipment; the file deleting instruction is used for indicating the external storage device to delete the first file. And the external storage equipment receives a file deleting instruction from the electronic equipment.
S503: the external storage device modifies the file attribute of the first file from a default value to deleted according to the file deleting instruction, and creates first link information in the virtual recycle bin; the first link information is used for indicating the first file.
In this step, by modifying the file attribute of the first file, it may be ensured that the first file is displayed in a deleted state, that is, no icon of the first file is displayed on the user interface of the external storage device or the first window of the electronic device.
The external storage device does not move the location of the first file (i.e., does not change the storage space and storage address of the first file), so that the first file can be recovered later. In addition, since the first file is not moved, the virtual recycle bin only stores the link information of the deleted file, and does not need to store the deleted file, so that the virtual recycle bin does not actually occupy a large storage space of the external storage device. In addition, the first link information is created in the virtual recycle bin, so that the external storage device can conveniently find the first file through the first link information.
S503a: optionally, when the first file is a multimedia file, the external storage device may further delete media information of the first file in a media library according to the file deletion instruction.
It should be noted that this step is an optional step. This step may be performed if the first file is a multimedia file and the external storage device contains a media library.
In S503a, the external storage device deletes the media information of the first file in the media library, so that the media library can be prevented from scanning the file when scanning the file, and it is ensured that the user interface of the external storage device does not display the first file.
S504: and when the electronic equipment detects the second operation, a recycle bin window containing at least one icon for deleting the file is displayed in the display screen. Wherein the at least one deleted file comprises a file indicated by at least one link information in the virtual recycle bin, the at least one link information comprising the first link information; the at least one deleted file includes the first file.
In addition, the at least one deleted file may further include a file deleted locally by the electronic device.
In S504, the electronic device may display at least one icon for deleting a file in a recycle bin window through a related art implementation. For example, the operating system of the electronic device may call related API implementations, and detailed description of the embodiments of the present application is omitted.
S505: and when the electronic equipment detects the third operation, sending a file recovery instruction to the external storage equipment. The file recovery instruction is used for indicating the external storage device to recover the first file. And the external storage equipment receives a file recovery instruction from the electronic equipment.
S506: and the external storage equipment restores the file attribute of the first file to the default value according to the file restoring instruction, and deletes the first link information in the virtual recycle bin.
Since the external storage device changes only the file attribute of the first file and creates the first link information when deleting the first file in S503, the external storage device may restore the file attribute of the first file to a default value and delete the first link information in step S506 when restoring the first file.
Through the steps S501-S506, the electronic device and the external storage device may interact through some instructions to implement the file management method shown in fig. 4, so as to ensure that the icon of the deleted file in the external storage device may be displayed in the recycle bin window of the electronic device. In addition, the user can restore the deleted file in the external storage device through the recycle bin window of the electronic device.
The interaction process shown in fig. 5 is illustrated in the following in connection with different scenarios.
Embodiment one: referring to fig. 1C, when the external storage device is an intelligent terminal device, the electronic device and the external storage device establish a wireless communication connection through a short-range wireless communication technology (i.e., the second scenario). The following describes the flow chart shown in fig. 6 in detail.
The electronic device may display a first window (i.e., a projection window) in the display screen through the following steps S601-S603. The first window comprises an icon of the first file stored by the external storage device.
S601: after the electronic equipment and the external storage equipment are connected, an equipment cooperative channel is established between the electronic equipment and the external storage equipment through the wireless communication connection.
S602: the external storage device can send screen throwing data to the electronic device through the device collaboration channel according to the currently displayed screen window; and the electronic equipment receives the screen projection data from the external storage equipment through the equipment collaboration channel.
S603: and the electronic equipment displays the first window in the display screen according to the screen throwing data. The first window is a screen window currently displayed by the external storage device.
It should be noted that, the specific implementation of the above-mentioned screen projection process may refer to a conventional screen projection technology, which is not described herein.
Alternatively, in this embodiment, the electronic device may map the virtual recycle bin of the external storage device to the recycle bin through the following steps S604 to S607 (i.e., perform step S501 described above).
S604: the electronic equipment generates a file management instruction according to a media transmission protocol (MEDIA TRANSFER protocol, MTP). The file management instruction is used for indicating the external storage device to mount the virtual recycle bin as a virtual disk of the electronic device.
Alternatively, the electronic device may trigger execution S604 after establishing a device collaboration channel with the external storage device.
S605: the electronic device sends the file management instructions to the external storage device through the device collaboration channel according to a network control mode (network control model, NCM) technique. And the external storage equipment receives the file management instruction from the electronic equipment through the equipment cooperative channel according to the NCM technology.
Through NCM technology, data packets in MTP/USB data format between a Host (Host) and a Device (Device) can be converted into Ethernet frames for transmission. Therefore, in the embodiment of the present application, an NCM technology may be utilized between the electronic device and the external storage device to transmit a message in an MTP data format (hereinafter referred to as an MTP message for short). Namely, the transmitting end and the receiving end can complete the transmission of the MTP message through the following steps:
the transmitting end converts the MTP message to be transmitted into an Ethernet frame and transmits the Ethernet frame to the receiving end through the equipment collaboration channel;
After receiving the Ethernet frame through the device cooperation channel, the receiving end converts the received Ethernet frame into an MTP message by using an NCM technology.
S606: and the external storage equipment mounts the virtual recycle bin into a virtual disk of the electronic equipment according to the file management instruction.
Optionally, the external storage device may modify the attribute of the virtual recycle bin according to the file management instruction, and mount the virtual recycle bin as a virtual disk of the electronic device by using a disk management program.
S607: the electronic equipment maps the virtual recycle bin to the recycle bin through a disk management program.
Alternatively, in this embodiment, the electronic device may send a file deletion instruction to the external storage device when the first operation is detected (i.e., perform the above step S502) through the following steps S608 to S613.
S608: and when the electronic equipment detects the first operation, generating a file path request according to the MTP. The file path request is used for requesting a storage path of the first file.
The first operation may be a conventional file deletion operation of the electronic device, or a file deletion operation newly defined by a user, and the embodiment of the present application does not limit a specific form of the first operation. The following is illustrative:
For example: the first operation may be that after the user selects the first file through a mouse click (single click (left click or right click), double click, multiple clicks, or long press, etc.) or a finger touch (single click, double click, multiple clicks, or long press, etc.), the file management menu is popped up; the user then deletes the key in the file management menu and clicks a series of continuous operations such as a confirm key in the confirm window.
For another example, the first operation may be a series of continuous operations such as pressing a delete key in a keyboard after the user selects the first file by clicking a mouse or touching a finger, and then clicking a confirm key in a confirm window.
For another example, the first operation may be a series of operations such as touching the delete key in the first window after the user selects the first file by touching with a finger.
For another example, the first operation may be at least one continuous operation of clicking, long pressing, or sliding by a user through finger touch.
S609: and the electronic equipment sends the file path request to the external storage equipment through the equipment cooperative channel according to the NCM technology. The external storage device receives the file path request from the electronic device through the device collaboration channel according to the NCM technology.
S610: and the external storage equipment acquires the storage path of the first file according to the file path request, and generates a file path response containing the storage path of the first file according to the MTP.
S611: and the external storage equipment sends the file path response to the electronic equipment through the equipment cooperative channel according to the NCM technology. The electronic device receives the file path response from the external storage device through the device collaboration channel according to the NCM technology.
Through the above S608-S611, the electronic device may obtain, based on the MTP, a storage path of the first file to be deleted, so as to generate a file deletion instruction.
S612: the electronic equipment acquires the storage path of the first file from the file path response and generates a file deleting instruction containing the storage path of the first file.
S613: and the electronic equipment sends the file deleting instruction to the external storage equipment through the equipment collaboration channel. And the external storage device receives the file deleting instruction from the electronic device through the device cooperation channel.
After S613, when executing S503, the external storage device may find the first file according to the storage path of the first file in the file deletion instruction, so as to execute a corresponding operation to delete the first file.
It should be further noted that, after the electronic device detects the operation of permanently deleting the first file, the electronic device may also obtain the storage path of the first file through S608-S611, generate a file permanent deletion instruction including the storage path of the first file, and send the file permanent deletion instruction through a device collaboration channel. And the external storage equipment directly and permanently deletes the first file after receiving the file permanent deletion instruction. The permanent deletion process is the same as the prior art and will not be described in detail here.
Alternatively, in this embodiment, the electronic device may send a file recovery instruction to the external storage device when the third operation is detected in the recycle bin window (i.e., perform the above step S505) through the following steps S614-S619.
S614: and when the electronic equipment detects the third operation in the recycle bin window, generating a file information request according to the MTP. Wherein the file information request is used for requesting a storage path and a file name of the first file indicated by the first link information.
S615: and the electronic equipment sends the file information request to the external storage equipment through the equipment cooperative channel according to the NCM technology. And the external storage equipment receives the file information request from the electronic equipment through the equipment cooperative channel according to the NCM technology.
S616: the external storage device determines a storage path and a file name of the first file indicated by the first link information according to the file information request; and generating a file information response containing the storage path and the file name of the first file according to the MTP.
S617: and the external storage equipment sends the file information response to the electronic equipment through the equipment cooperative channel according to the NCM technology. And the electronic equipment receives the file information response from the external storage equipment through the equipment cooperative channel according to the NCM technology.
S618: and the electronic equipment acquires the storage path and the file name of the first file in the file information response and generates a file recovery instruction containing the storage path and the file name of the first file.
S619: and the electronic equipment sends the file recovery instruction to the external storage equipment through the equipment collaboration channel. And the external storage device receives the file recovery instruction from the electronic device through the device collaboration channel.
After S619, the external storage device may find the first file according to the storage path and the file name of the first file in the received file restoration instruction, so as to perform a corresponding operation, that is, perform S506, to restore the first file.
Embodiment two: referring to fig. 1A and 1B, when the external storage device and the electronic device have a communication interface, the electronic device establishes a physical communication connection with the external storage device through the communication interface (i.e., scenario one described above). The following describes in detail the flow shown in fig. 7.
The electronic device may display a first window (i.e., a display window of a virtual disk mapped by an external storage device) in the display screen through the following steps S701-S703. The first window comprises an icon of the first file stored by the external storage device.
S701: and the electronic equipment and the external storage equipment are in physical communication connection through a communication interface.
S702: after the electronic equipment and the external storage equipment are connected, the electronic equipment maps the storage space of the external storage equipment into a first magnetic disk of the electronic equipment according to a communication protocol corresponding to the communication interface.
The first magnetic disk is a virtual magnetic disk of the electronic equipment, and when the physical communication connection between the external storage equipment and the electronic equipment is disconnected, the virtual magnetic disk disappears on the electronic equipment.
Illustratively, the communication interface may be, but not limited to, a USB interface, and a communication protocol corresponding to the USB interface is a USB protocol.
S703: and after the electronic equipment detects the fourth operation, displaying the first window in the display screen. The fourth operation is used for opening the first disk, and the first window is a display window of the first disk.
It should be noted that, the specific process of mapping the storage space of the external storage device to the first disk may refer to the conventional technology, which is not described herein.
Alternatively, in this embodiment, the electronic device may map the virtual recycle bin of the external storage device to the recycle bin through the following steps S704 to S707 (i.e., perform step S501 described above).
S704: the electronic device generates a file management instruction based on the communication protocol. The file management instruction is used for indicating the external storage device to mount the virtual recycle bin as a virtual disk of the electronic device.
Alternatively, the electronic device may trigger execution S704 after establishing a physical communication connection with the external storage device.
S705: and the electronic equipment sends the file management instruction to the external storage equipment through the communication interface. The external storage device receives the file management instruction from the electronic device through the communication interface.
S706: and the external storage equipment mounts the virtual recycle bin into a virtual disk of the electronic equipment according to the file management instruction.
In the same way as S606, the external storage device may modify the attribute of the virtual recycle bin according to the file management instruction, and mount the virtual recycle bin as a virtual disk of the electronic device by using a disk management program.
S707: the electronic equipment maps the virtual recycle bin to the recycle bin through a disk management program.
Alternatively, in this embodiment, the electronic device may send a file deletion instruction to the external storage device when the first operation is detected (i.e., perform the above step S502) through the following steps S708 to S713.
S708: and when the electronic equipment detects the first operation, generating a file path request according to the communication protocol. The file path request is used for acquiring a storage path of the first file.
Optionally, the first operation may be a conventional file deletion operation of a file in a disk of the electronic device by the user, which is not described herein.
S709: and the electronic equipment sends the file path request to the external storage equipment through the communication interface. The external storage device receives the file path request from the electronic device through the communication interface.
S710: and the external storage equipment acquires the storage path of the first file according to the file path request, and generates a file path response containing the storage path of the first file according to the communication protocol.
S711: the external storage device sends the file path response to the electronic device through the communication interface; the electronic equipment receives the file path acquisition response through the communication interface.
Through the steps S708-S711, the electronic device may obtain, through a communication interface, a storage path of the first file to be deleted, so as to generate a file deletion instruction.
S712: the electronic equipment acquires the storage path of the first file from the file path acquisition response and generates a file deletion instruction containing the storage path of the first file.
S713: and the electronic equipment sends the file deleting instruction to the external storage equipment through the communication interface. The electronic equipment receives the file deleting instruction from the electronic equipment through the communication interface.
After S713, the external storage device may find the first file according to the storage path of the first file in the file deletion instruction, and perform a corresponding operation to delete the first file, thereby completing S503.
It should be noted that, after the electronic device detects the operation of permanently deleting the first file, the electronic device may also obtain the storage path of the first file through S708-S711, generate a file permanent deletion instruction including the storage path of the first file, and send the file permanent deletion instruction through a communication interface. And the external storage equipment directly and permanently deletes the first file after receiving the file permanent deletion instruction. The permanent deletion process is the same as the prior art and will not be described in detail here.
Alternatively, in this embodiment, the electronic device may send a file recovery instruction to the external storage device when the third operation is detected in the recycle bin window (i.e., perform the above step S505) through the following steps S714 to S719.
S714: and when the electronic equipment detects the third operation in the recycle bin window, generating a file information request according to the communication protocol. Wherein the file information request is used for requesting a storage path and a file name of the first file indicated by the first link information.
S715: and the electronic equipment sends the file information request to the external storage equipment through the communication interface. The external storage device receives the file information request from the electronic device through the communication interface.
S716: the external storage device determines a storage path and a file name of the first file indicated by the first link information according to the file information request; and generating a file information response containing the storage path and the file name of the first file according to the communication protocol.
S717: and the external storage device sends the file information response to the electronic device through the communication interface. The electronic device receives the file information response from the external storage device through the communication interface.
The step S718: and the electronic equipment acquires the storage path and the file name of the first file in the file information response and generates a file recovery instruction containing the storage path and the file name of the first file.
S719: and the electronic equipment sends the file recovery instruction to the external storage equipment through the communication interface. The external storage device receives the file recovery instruction from the electronic device through the communication interface.
After S719, the external storage device may find the first file according to the storage path and the file name of the first file in the received file restoration instruction, so as to perform a corresponding operation, that is, perform S506, to restore the first file.
Based on the embodiments shown in fig. 4 and 5, and the interaction procedure between the electronic device and the external storage device in two different scenarios shown in fig. 6 and 7, the present application also provides the following two embodiments. It should be noted that the following embodiments are examples, and do not limit the file management method provided by the present application.
Embodiment one: in the scenario where the smartphone and PC are screen-collaborative as shown in fig. 1C.
File attributes of files in a mobile phone file system, such as the flash friendly file system (FLASH FRIENDLY FILE SYSTEM, F2 FS), are described.
In a cell phone file system (e.g., F2 FS), the i_ flags parameter of the file data structure is used to indicate file attributes (file attributes). The i_ flags parameter is 32-bit integer data, where bit 31 can identify the deletion state of the file. When a file is generated, the 31 st bit value in the i_ flags parameter of the file is a default value (e.g., 0); when the 31 st bit value in the i_ flags parameter of the file is not equal to the default value (e.g., 1), then the file is identified as deleted.
It should be further noted that, when the file is temporarily deleted, the 31 st bit in the i_ flags parameter of the file is marked as a non-default value, but the index node (inode) of the file is not released; when the file is permanently deleted, not only will bit 31 in the i_ flags parameter of the file be marked as non-default, but the inode of the file will also be released.
An application (e.g., a PC manager, etc.) for realizing screen collaboration may be installed in the PC, and may be referred to as a collaboration service application hereinafter. The collaboration service application not only can realize screen collaboration, but also has a file management function. In this embodiment, a resource for implementing a file management function in the collaborative service application is referred to as a file management sub-module.
The file management sub-module supports MTP and Wi-Fi P2P technologies. The screen cooperation of the smart phone and the PC can be realized by establishing wireless communication connection based on Wi-Fi P2P technology. In addition, the conversion between the Ethernet frame between the device and the host and the data packet in the MTP/USB data format can be realized between the smart phone and the PC through NCM technology.
Through the file management sub-module, the PC can mount the storage space of the smart phone as a virtual disk of the PC through the MTP, so that the virtual recycle bin in the smart phone is mapped to the recycle bin of the PC.
In addition, when the PC deletes or restores the file in the smart phone, the file management sub-module can also be utilized to acquire file information such as a storage path or a file name of the file from the smart phone through the MTP, so that file management is realized.
The process of file management for a smart phone by a PC is described below with reference to the schematic diagram.
Referring to fig. 8A, after the smart phone and the PC establish a device collaboration channel through Wi-Fi P2P technology, the smart phone may send screen projection data to the PC through a screen collaboration channel in the device collaboration channel. In addition, the PC also supports reverse control of the smart phone in the screen-throwing window. In the reverse control process, the PC can send a control instruction to the smart phone through the cooperative reverse control channel.
The cooperative service applications of the smart phone and the PC both support MTP, and the two implement conversion between a data packet of an MTP data format and an ethernet frame through NCM technology, so as to indirectly implement interaction of MTP messages, thereby mounting an external storage space (for example, a directory of the external storage space is data/media/0) of the smart phone into a virtual disk (also called external disk) of the PC through MTP, as shown in fig. 8B.
Further, the file management sub-module in the collaborative service application of the PC may also indirectly transmit an MTP message (for example, a file management instruction in S604 in fig. 6) through the NCM technology, modify an attribute of the virtual recycle bin in the smart phone, and insert the mounted virtual disk into the local disk of the PC by using the disk management program, so as to map the virtual recycle bin in the smart phone to the recycle bin of the PC. Thus, when the user opens the recycle bin window of the PC, the user can view the files in the smart phone deleted by the user through the screen throwing window. As shown in fig. 8C, when the user deletes the PIC1 of the smart phone through the screen window, the recycle bin window may display the icon of the PIC1 when the recycle bin window is opened.
The virtual recycle bin of the smart phone is a hidden system folder named $cycle. When a user deletes a certain file of the smart phone through the screen-throwing window, the smart phone can modify the file attribute of the file into deleted in the process of deleting the file, and creates link information indicating the file in the virtual recycle bin. Since the virtual recycle bin is used to save the link information of the deleted file of the smart phone, the file is not actually saved. This feature is different from the recycle bin in the PC and is therefore referred to as a "virtual recycle bin".
Continuing to take fig. 8C as an example, when the user deletes the PIC1 of the smart phone through the screen window, the smart phone only modifies the file attribute of the PIC1, does not move the storage location of the PIC1, and deletes the media information of the PIC1 in the media library, so that the external storage directory and the screen window of the smart phone do not display the PIC1 any more. The smartphone creates link information indicating PIC1 in the virtual recycle bin so that the recycle bin window of the PC can display an icon of PIC.
Taking PIC1 as an example, the process of file management of the smart phone by the user through the screen window of the PC is described in detail below.
(1) PIC1 is deleted, as shown in fig. 8D.
When the user selects PIC1 on the screen-throwing window of the PC and executes the deleting operation, the collaborative service application of the PC responds to the deleting operation, generates a file path request (such as getObjectFilePath ()) through MTP, converts the file path request into an Ethernet frame according to NCM technology, and transmits the Ethernet frame to the smart phone through the equipment collaborative channel.
The intelligent mobile phone converts the received Ethernet frame into a file path request according to NCM technology, and obtains the storage path of PIC1 according to the file path request. The intelligent mobile phone generates a file path response containing the storage path of the PIC1 according to the MTP, converts the file path response into an Ethernet frame according to the NCM technology, and transmits the Ethernet frame to the PC through the equipment cooperative channel.
After receiving the ethernet frame, the collaboration service application of the PC converts the ethernet frame into a file path response according to the NCM technology, so as to obtain a storage path of PIC1 in the file path response. The co-service application of the PC may generate file deletion instructions (e.g., instructions containing PIC1 memory path and delete (remove) event) based on the memory path of PIC1. The PC may then transmit a file delete instruction to the smartphone via the coordinated reverse control channel.
The intelligent mobile phone executes deletion operation on the PIC1 according to the file deletion instruction, and the method comprises the following steps: and searching the PIC1 according to the storage path of the PIC in the file deleting instruction, and then modifying the 31 st bit in the i_ flags parameter of the PIC1 from a default value to other values to mark that the PIC1 is deleted, and deleting the media information of the PIC1 in a media library. In addition, the smartphone also needs to create link information (link command In-s 1) indicating PIC1 In the virtual recycle bin by an operating system command (e.g., linux system).
After deleting PIC1, the smart phone maps the virtual recycle bin to the recycle bin of the PC, so that when the user opens the recycle bin of the PC, the icon of PIC is displayed in the recycle bin window, and the icon of PIC1 is not displayed in the screen throwing window.
(2) Permanent deletion of PIC1 is shown in fig. 8E.
When the user selects the PIC1 on the screen window of the PC and performs the permanent deletion operation, the collaboration service application of the PC responds to the permanent deletion operation to obtain the storage path of the PIC1, and the specific process may refer to the description in (1) and will not be repeated here. The co-service application of the PC may generate a file permanent delete instruction (e.g., an instruction containing a PIC1 memory path and a permanent delete (delete) event) based on the memory path of the PIC and transmit the file permanent delete instruction to the smartphone through the co-reverse control channel.
The smart phone searches for PIC1 according to the storage path of PIC1 in the file permanent deletion instruction, and then performs permanent deletion operation on PIC1, where the specific deletion process is the same as that in the prior art, and details are not repeated here.
After the PIC1 is permanently deleted by the smart phone, the PIC1 in the external storage catalog of the smart phone completely disappears, and the link information indicating the PIC1 does not exist in the virtual recycle bin, so that when a user opens the recycle bin of the PC, an icon of the PIC is not displayed in the recycle bin window, and the screen throwing window does not display the icon of the PIC1 any more.
(3) After the deletion of PIC1 by (1) above, PIC1 is restored, as shown in fig. 8F.
When the user selects PIC1 In the recycle bin window of the PC and performs a restore operation, the co-service application of the PC generates a file information request (e.g., containing getObjectFilePath (). Optionally, may also contain link information (e.g., link command In-s 1)) indicating PIC1 through the MTP In response to the restore operation. The collaboration service application of the PC converts the file information request into an Ethernet frame according to NCM technology and transmits the Ethernet frame to the smart phone through a device collaboration channel.
The intelligent mobile phone converts the received Ethernet frame into a file information request according to NCM technology, and obtains the storage path and the file name of the PIC1 according to the file information request. The intelligent mobile phone generates a file information response containing a storage path and a file name of the PIC1 according to the MTP, converts the file information response into an Ethernet frame according to the NCM technology, and transmits the Ethernet frame to the PC through a device collaboration channel.
After receiving the Ethernet frame, the collaboration service application of the PC converts the Ethernet frame into a file information response according to NCM technology, so that the storage path and the file name of PIC1 in the file information response can be obtained. The co-service application of the PC may generate file restoration instructions (e.g., instructions containing PIC1 storage path, file name, and restoration event) based on the storage path and file name of PIC 1. And then the collaborative service application of the PC can transmit the file recovery instruction to the smart phone through the collaborative reverse control channel.
The smart phone executes recovery operation on the PIC1 according to the file recovery instruction, and the method comprises the following steps: PIC1 is found according to the memory path of PIC In the file delete instruction, then bit 31 In the i_ flags parameter of PIC1 is restored to the default value to be marked as undeleted, and the link information (e.g., link command In-s 1)) In the virtual recycle bin that indicates PIC1 is deleted.
After the smart phone resumes PIC1, the recycle bin window of the PC no longer displays PIC1, and the screen-throwing window of the PC can display PIC1.
Based on the file management method provided in the first embodiment, when the user deletes PIC1 in the smart phone through the PC, the screen changes of the PC and the smart phone are as follows:
As shown in fig. 9A, the smart phone projects the currently displayed screen window into the display screen of the PC through the device collaboration channel. At this time, the screen throwing window in the display screen of the PC is the same as the screen window of the smart phone in display content. The user selects the image PIC1 (i.e., the last image, the image with the fill mark in the figure) in the screen window of the PC, and performs the deletion operation on the PIC 1. After deleting PIC1 based on the procedure described in (1), the screen window of the PC and the screen window of the smart phone no longer display the icon of PIC, as shown in fig. 9B. When the user opens the recycle bin of the PC, the icon (image with the filling mark in the figure) of PIC1 is displayed in the recycle bin window displayed by the PC, as shown in fig. 9C.
Embodiment two: in the scenario where a PC is connected to a usb disk as shown in fig. 1A. It should be noted that, the PC is connected to other devices through the communication interface, or the file management method in the scenario shown in fig. 1B is similar to the file management method provided in the second embodiment, so the file management method provided in the second embodiment may be extended to other similar scenarios, which is not described in detail in the present application.
Taking the file management of PIC1 as an example, the following description will be given.
In this embodiment, the interaction process between the usb disk and the PC is similar to the interaction process between the smart phone and the PC in the first embodiment, and the same points can be referred to each other, except that:
When the PC inserts the USB flash disk into the USB interface of the PC, the PC can map the storage space of the USB flash disk into a virtual disk of the PC according to the USB protocol and the disk management program. When the user operates to open the virtual disk in the PC, the PC displays a display window of the disk. A picture of PIC1 may be displayed in the window.
The process of message interaction between the PC and the U disk can be completed through a communication interface without being realized through NCM technology.
In addition, when the file system (for example, a file configuration table (file allocation table) system, a FAT32 system, and an extended (extended) FAT (i.e., an exFAT) system) of the U disk delete or restore the PIC1, in addition to modifying the value of the 31 st bit in the i_ flags parameter of the PIC1, link information indicating the PIC1 may be created or deleted in the virtual recycle bin through the newly added interface, without being implemented through an operating system command.
Based on the file management method provided in the second embodiment, when the user deletes PIC1 in the U disc through the PC, the screen change in the PC is as follows:
as shown in fig. 10A, when the USB disk is inserted into the USB interface of the PC, the PC maps the storage space of the USB disk to the virtual disk of the PC (i.e., newly added volume (F:)). When the user selects to open the new scroll (F:), a display window of the new scroll (F:) is displayed in the display screen of the PC, wherein an icon of PIC1 (an image with a filling mark in the figure) is displayed in the display window. When the user selects and deletes PIC1 through the display window, the display window no longer displays the icon of PIC, as shown in fig. 10B. And when the user opens the recycle bin of the PC, the icon (image with the fill mark in the figure) of PIC1 is displayed in the recycle bin window displayed by the PC, as shown in fig. 10C.
The above embodiments may be used in combination with each other or may be used alone, and are not limited thereto.
Based on the same conception, the embodiment of the application also provides an electronic device, as shown in fig. 11, comprising a processor 1101, a memory 1102, a communication module 1103 and a display 1104. By way of example, the various devices described above may be connected by one or more communication buses. Wherein the one or more computer programs are stored in the memory 1102 and configured to be executed by the processor 1101, the one or more computer programs comprising instructions that can be used to cause the electronic device to perform the steps of the methods in the embodiments described above.
The processor 1101 may be, for example, the processor 210 shown in fig. 2. The memory 1102 may specifically be the internal memory 221 shown in fig. 2 and/or an external memory connected to the electronic device. The communication module 1104 includes a transceiver or a communication interface, where the transceiver may be the mobile communication module 250 and/or the wireless communication module 260 shown in fig. 2, and the communication interface may be the external memory interface 220 and/or the USB interface shown in fig. 2, etc. The display 1103 may be specifically the display 294 shown in fig. 2, which is not limited in any way by the embodiment of the present application.
Based on the same conception, the embodiment of the present application also provides an external storage device, as shown in fig. 12, including a processor 1201, a memory 1202, and a transceiver 1203. Optionally, the external storage device may also contain a display 1204. Wherein the various devices described above may be connected by one or more communication buses. Wherein the one or more computer programs are stored in the memory 1202 and configured to be executed by the processor 1201, the one or more computer programs comprising instructions that can be used to cause an external storage device to perform the various steps of the methods in the embodiments described above.
In addition, the embodiment of the application also provides a graphical user interface (GRAPHICAL USER INTERFACE, GUI) on the electronic equipment, wherein the graphical user interface specifically comprises the graphical user interface displayed by the electronic equipment when the method embodiments are executed.
As used in the above embodiments, the term "when …" or "after …" may be interpreted to mean "if …" or "after …" or "in response to determination …" or "in response to detection …" depending on the context. Similarly, the phrase "at the time of determination …" or "if detected (a stated condition or event)" may be interpreted to mean "if determined …" or "in response to determination …" or "at the time of detection (a stated condition or event)" or "in response to detection (a stated condition or event)" depending on the context.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk Solid STATE DISK (SSD)), etc. The schemes of the above embodiments may be used in combination without conflict.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (14)

1. A file management method applied to a communication system including an electronic device and an external storage device, comprising:
after the electronic equipment is connected with the external storage equipment, the electronic equipment displays an icon of a first file stored by the external storage equipment in a first window of a display screen;
when the electronic equipment detects a first operation, the icon of the first file is not displayed in the first window; the first operation is used for deleting the first file;
when the electronic equipment detects a second operation, a recycle bin window containing the icon of the first file is displayed in the display screen; wherein the second operation is for opening a recycle bin of the electronic device.
2. The method of claim 1, wherein after displaying a recycle bin window containing an icon of the first file in the display screen, the method further comprises:
When the electronic equipment detects a third operation in the recycle bin window, the icon of the first file is not displayed in the recycle bin window, and the icon of the first file is displayed in the first window; wherein the third operation is used for restoring the first file.
3. The method of claim 1 or 2, wherein after displaying a recycle bin window containing an icon of the first file in the display screen, the method further comprises:
when the electronic equipment is disconnected with the external storage equipment and the electronic equipment detects the second operation, a recycle bin window which does not contain the icon of the first file is displayed in the display screen;
And when the electronic equipment detects the second operation after the connection between the electronic equipment and the external storage equipment is established again, displaying a recycle bin window containing the icon of the first file in the display screen.
4. The method of claim 2, wherein the method further comprises:
After the electronic equipment establishes connection with the external storage equipment, the electronic equipment maps a virtual recycle bin of the external storage equipment to the recycle bin; wherein the virtual recycle bin is a hidden system folder created by the external storage device;
When the electronic equipment detects the first operation, a file deleting instruction is sent to the external storage equipment; the file deleting instruction is used for indicating the external storage device to delete the first file;
After receiving a file deletion instruction from the electronic device, the external storage device modifies the file attribute of the first file from a default value to deleted according to the file deletion instruction, and creates first link information in the virtual recycle bin; wherein the first link information is used for indicating the first file;
when the electronic equipment detects a second operation, a recycle bin window containing the icon of the first file is displayed in the display screen, and the recycle bin window comprises:
When the electronic equipment detects the second operation, a recycle bin window containing at least one icon for deleting the file is displayed in the display screen; wherein the at least one deleted file comprises a file indicated by at least one link information in the virtual recycle bin, the at least one link information comprising the first link information; the at least one deleted file includes the first file.
5. The method of claim 4, wherein when the first file is a multimedia file, the method further comprises:
and the external storage equipment deletes the media information of the first file in the media library according to the file deleting instruction.
6. The method of claim 4 or 5, wherein the method further comprises:
when the electronic equipment detects the third operation, a file recovery instruction is sent to the external storage equipment; the file recovery instruction is used for indicating the external storage device to recover the first file;
And after receiving a file recovery instruction from the electronic equipment, the external storage equipment recovers the file attribute of the first file to the default value according to the file recovery instruction, and deletes the first link information in the virtual recycle bin.
7. The method of claim 6, wherein the external storage device is a smart terminal device, the electronic device establishing a connection with the external storage device, comprising:
The electronic equipment and the external storage equipment are connected through a short-distance wireless communication technology;
the method further comprises the steps of:
After the electronic equipment and the external storage equipment are connected, the electronic equipment and the external storage equipment establish an equipment cooperative channel through the wireless communication connection;
the electronic equipment receives screen projection data from the external storage equipment through the equipment collaboration channel;
the electronic equipment displays the first window in the display screen according to the screen throwing data; the first window is a screen window currently displayed by the external storage device;
the electronic device maps a virtual recycle bin of the external storage device to the recycle bin, comprising:
The electronic equipment generates a file management instruction according to a media transmission protocol MTP; the file management instruction is used for indicating the external storage device to mount the virtual recycle bin as a virtual disk of the electronic device;
The electronic equipment sends the file management instruction to the external storage equipment through the equipment cooperative channel according to the network control mode NCM technology;
The external storage device receives the file management instruction from the electronic device through the device cooperation channel according to the NCM technology, and mounts the virtual recycle bin as a virtual disk of the electronic device according to the file management instruction;
The electronic equipment maps the virtual recycle bin to the recycle bin through a disk management program.
8. The method of claim 7, wherein when the electronic device detects the first operation, sending a file delete instruction to the external storage device comprises:
When the electronic equipment detects the first operation, generating a file path request according to the MTP; according to the NCM technology, the file path request is sent to the external storage device through the device cooperation channel; the file path request is used for requesting a storage path of the first file;
The external storage device receives the file path request from the electronic device through the device cooperation channel according to the NCM technology; acquiring a storage path of the first file according to the file path request, and generating a file path response containing the storage path of the first file according to the MTP; according to the NCM technology, sending the file path response to the electronic equipment through the equipment cooperative channel;
The electronic equipment receives the file path response from the external storage equipment through the equipment cooperative channel according to the NCM technology; generating a file deletion instruction containing a storage path of the first file;
and the electronic equipment sends the file deleting instruction to the external storage equipment through the equipment collaboration channel.
9. The method of claim 7 or 8, wherein the electronic device sending a file restore instruction to the external storage device when the third operation is detected within the recycle bin window, comprising:
When the electronic equipment detects the third operation in the recycle bin window, generating a file information request according to the MTP; according to the NCM technology, the file information request is sent to the external storage device through the device cooperation channel, and the file information request is used for requesting a storage path and a file name of the first file indicated by the first link information;
The external storage device receives the file information request from the electronic device through the device cooperation channel according to the NCM technology; determining a storage path and a file name of the first file indicated by the first link information according to the file information request; generating a file information response containing a storage path and a file name of the first file according to the MTP; according to the NCM technology, the file information response is sent to the electronic equipment through the equipment cooperative channel;
The electronic equipment receives the file information response from the external storage equipment through the equipment cooperative channel according to the NCM technology; generating a file recovery instruction containing a storage path and a file name of the first file;
And the electronic equipment sends the file recovery instruction to the external storage equipment through the equipment collaboration channel.
10. The method of claim 6, wherein the external storage device and the electronic device have a communication interface, the electronic device establishing a connection with the external storage device, comprising:
the electronic equipment and the external storage equipment establish physical communication connection through the communication interface;
the method further comprises the steps of:
After the electronic equipment and the external storage equipment are connected, the electronic equipment maps the storage space of the external storage equipment into a first magnetic disk of the electronic equipment according to a communication protocol corresponding to the communication interface;
after the electronic equipment detects the fourth operation, the first window is displayed in the display screen; the fourth operation is used for opening the first disk, and the first window is a display window of the first disk;
the electronic device maps a virtual recycle bin of the external storage device to the recycle bin, comprising:
the electronic equipment generates a file management instruction based on the communication protocol; the file management instruction is used for indicating the external storage device to mount the virtual recycle bin as a virtual disk of the electronic device;
The electronic equipment sends the file management instruction to the external storage equipment through the communication interface;
the external storage device receives the file management instruction from the electronic device through the communication interface, and mounts the virtual recycle bin as a virtual disk of the electronic device according to the file management instruction;
The electronic equipment maps the virtual recycle bin to the recycle bin through a disk management program.
11. The method of claim 10, wherein the electronic device sending a file delete instruction to the external storage device when the first operation is detected, comprises:
When the electronic equipment detects the first operation, generating a file path request according to the communication protocol, and sending the file path request to the external storage equipment through the communication interface; the file path request is used for acquiring a storage path of the first file;
The external storage device receives the file path request from the electronic device through the communication interface; acquiring a storage path of the first file according to the file path request, and generating a file path response containing the storage path of the first file according to the communication protocol; transmitting the file path response to the electronic device through the communication interface;
The electronic equipment receives the file path acquisition response through the communication interface and then generates a file deletion instruction containing a storage path of the first file;
And the electronic equipment sends the file deleting instruction to the external storage equipment through the communication interface.
12. The method of claim 10 or 11, wherein the electronic device sending a file restore instruction to the external storage device when the third operation is detected within the recycle bin window, comprising:
When the electronic equipment detects the third operation in the recycle bin window, generating a file information request according to the communication protocol; the file information request is used for requesting a storage path and a file name of the first file indicated by the first link information;
the external storage device receives the file information request from the electronic device through the communication interface; determining a storage path and a file name of the first file indicated by the first link information according to the file information request; generating a file information response containing a storage path and a file name of the first file according to the communication protocol; transmitting the file information response to the electronic equipment through the communication interface;
the electronic equipment receives the file information response from the external storage equipment through the communication interface; generating a file recovery instruction containing a storage path and a file name of the first file;
and the electronic equipment sends the file recovery instruction to the external storage equipment through the communication interface.
13. An electronic device comprising a display screen, a memory, and one or more processors;
Wherein the memory is for storing computer program code, the computer program code comprising computer instructions; the computer instructions, when executed by the one or more processors, cause the electronic device to perform the method of any of claims 1-12.
14. A computer readable storage medium, characterized in that the computer readable storage medium comprises program instructions which, when run on a terminal device, cause the terminal device to perform the method of any of claims 1 to 11.
CN202211500737.0A 2022-11-28 2022-11-28 File management method and electronic equipment Pending CN118092726A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202211500737.0A CN118092726A (en) 2022-11-28 2022-11-28 File management method and electronic equipment
PCT/CN2023/131103 WO2024114344A1 (en) 2022-11-28 2023-11-10 File management method and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211500737.0A CN118092726A (en) 2022-11-28 2022-11-28 File management method and electronic equipment

Publications (1)

Publication Number Publication Date
CN118092726A true CN118092726A (en) 2024-05-28

Family

ID=91141069

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211500737.0A Pending CN118092726A (en) 2022-11-28 2022-11-28 File management method and electronic equipment

Country Status (2)

Country Link
CN (1) CN118092726A (en)
WO (1) WO2024114344A1 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004303053A (en) * 2003-03-31 2004-10-28 Nippon Digital Kenkyusho:Kk File deletion and recovery method, information processing system thereof, and program therefor
US9536227B2 (en) * 2011-12-19 2017-01-03 Microsoft Technology Licensing, Llc Restoring deleted items with context
US11550467B2 (en) * 2017-05-16 2023-01-10 Apple Inc. Device, method, and graphical user interface for managing data stored on a device
CN110888847B (en) * 2019-12-16 2023-04-21 新华三技术有限公司成都分公司 Recycle bin system and file recycling method
CN114490516A (en) * 2022-01-30 2022-05-13 阿里巴巴(中国)有限公司 File system processing method, recycle bin management method, device and equipment

Also Published As

Publication number Publication date
WO2024114344A1 (en) 2024-06-06

Similar Documents

Publication Publication Date Title
US20220342850A1 (en) Data transmission method and related device
CN111221845A (en) Cross-device information searching method and terminal device
CN114520868B (en) Video processing method, device and storage medium
CN114356258A (en) Electronic device, screen projection method thereof and medium
CN114442969B (en) Inter-equipment screen collaboration method and equipment
EP3886416B1 (en) Image classification method and electronic device
CN116263652A (en) Wallpaper display method and electronic equipment
WO2024114344A1 (en) File management method and electronic device
CN112711636B (en) Data synchronization method, device, equipment and medium
CN114520867B (en) Camera control method based on distributed control and terminal equipment
JP2023539879A (en) Methods and electronic devices for reusing shared libraries
CN115114607A (en) Sharing authorization method, device and storage medium
CN113642010A (en) Method for acquiring data of extended storage device and mobile terminal
CN114513760B (en) Font library synchronization method, device and storage medium
WO2024078337A1 (en) Display-screen selection method, and electronic device
WO2023179682A1 (en) Device collaboration method
WO2023237047A1 (en) Data processing method and electronic device
WO2024104137A1 (en) Data recovery method capable of supporting data fusion and apparatus
WO2023231856A1 (en) Air conditioner control method, and electronic device and system
EP4273680A1 (en) Image deletion operation notification method, device, and storage medium
CN115729406A (en) Screen projection display method and electronic equipment
CN117931745A (en) File sorting method and electronic equipment
CN117130516A (en) Display method and electronic equipment
CN117170534A (en) Application information transfer method and terminal
CN115981573A (en) Data management method, electronic device and computer readable and writable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination