File management method, device and computer program product
By using network penetration and virtual file management, the storage management and data privacy issues of edge IoT devices are solved, enabling cross-device file access and operation, which is suitable for smart home and IoT fields.
Patent Information
- Application Number
- CN202410293382.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-14
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2044-03-14
AI Technical Summary
Existing technologies cannot meet the needs for network penetration and distributed storage management of edge IoT devices, and are insufficient to solve the problem of data privacy.
By employing network penetration technology and virtual file management methods, file management commands are generated through the control terminal to enable file transfer and operation result interaction on the device side, establish point-to-point connections, virtualize the file system of multiple devices, and provide a unified file access interface.
It enables cross-device file access and operation, freeing users from the constraints of centralized storage, protecting user data privacy, and is suitable for flexible management of edge IoT devices.
Smart Images

Figure CN118802895B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of document management, and more particularly to a document management method, apparatus, and computer program product. Background Technology
[0002] Currently, most network file sharing solutions fall into several categories. One is the client-server (C / S) architecture with a central server, such as Server Messages Block (Samba), File Transfer Protocol (FTP), and cloud storage services. In this architecture, the server shares its stored content with various clients according to a specific protocol, and the clients read and manipulate files on the server according to the same protocol. Another type is a distributed file management system, which stores files across multiple computers or storage nodes and provides a unified file access interface. These existing technologies cannot meet the needs of network penetration and distributed storage management for edge-side Internet of Things (IoT) devices, nor are they sufficient to solve the problem of data privacy. Summary of the Invention
[0003] This application provides a file management method, apparatus, and computer program product to address the problem that related technologies cannot meet the needs of network-penetrating and distributed storage management for IoT devices.
[0004] In a first aspect, embodiments of this application provide a file management method applied to a control terminal, the method comprising:
[0005] Upon receiving a user's access request, generate file management commands based on the access request;
[0006] Send the file management command to the device side so that the device side can perform file transfer based on the file management command;
[0007] Receive the operation results returned by the device.
[0008] Secondly, embodiments of this application provide a file management method applied to the device side, the method comprising:
[0009] Receive file management commands sent from the control terminal;
[0010] The file management command is distributed to multiple second devices, so that the multiple second devices execute the file management command;
[0011] The operation results are sent to the control terminal.
[0012] Thirdly, embodiments of this application provide a file management device applied to a control terminal, the device comprising:
[0013] The generation module is used to generate file management commands based on a user's access request upon receiving the user's access request;
[0014] The first sending module is used to send the file management command to the device side, so that the device side can perform file transfer based on the file management command;
[0015] The first receiving module is used to receive the operation results returned by the device side.
[0016] Fourthly, embodiments of this application provide a file management device applied on the device side, the device comprising:
[0017] The second receiving module is used to receive file management commands sent by the control terminal;
[0018] The distribution module is used to distribute the file management command to multiple second devices, so that the multiple second devices execute the file management command;
[0019] The second sending module is used to send the operation result to the control terminal.
[0020] Fifthly, embodiments of this application provide a terminal device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the method described in the first aspect, or implements the steps of the method described in the second aspect.
[0021] In a sixth aspect, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method described in the first aspect, or implements the steps of the method described in the second aspect.
[0022] In a seventh aspect, embodiments of this application provide a computer program product, the computer program product including a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, which, when executed by a computer, implement the steps of the method described in the first aspect, or implement the steps of the method described in the second aspect.
[0023] In this embodiment, upon receiving a user's access request, the control terminal first generates a file management command based on the request, then sends the file management command to the device side, enabling the device side to perform file transfer based on the command. Finally, the control terminal receives the operation result returned by the device side. This embodiment, by implementing network traversal and virtual file management, can meet users' needs for cross-device file access and operation. Attached Figure Description
[0024] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0025] Figure 1 This is a flowchart of the file management method provided in the embodiments of this application;
[0026] Figure 2 This is a schematic diagram of the star-shaped file management model provided in the embodiments of this application;
[0027] Figure 3 This is a schematic diagram of the symmetric file management mode provided in the embodiments of this application;
[0028] Figure 4 This is a flowchart of another file management method provided in an embodiment of this application;
[0029] Figure 5 This is a schematic diagram of the file management device provided in the embodiments of this application;
[0030] Figure 6 This is a schematic diagram of another file management device provided in an embodiment of this application;
[0031] Figure 7 This is a schematic diagram of the structure of the terminal device provided in the embodiments of this application. Detailed Implementation
[0032] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0033] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0034] The following is in conjunction with the appendix Figures 1 to 7 This application provides a detailed description of a file management method, apparatus, and computer program product through specific embodiments and application scenarios. This embodiment offers a file management method based on Network Address Translation (NAT), which overcomes the limitations of local area networks and allows for access anytime, anywhere via the external network, freeing users from the constraints of centralized storage servers and protecting user private data and privacy. The file management apparatus of this application is compact and flexible, requiring minimal space and resources, making it easy to deploy on edge IoT devices.
[0035] like Figure 1 The diagram shown is a flowchart of a file management method provided in an embodiment of this application. Figure 1 As shown, the file management method is applied to the control terminal, and the file management method may include the contents shown in S101 to S103.
[0036] In S101, upon receiving a user's access request, a file management command is generated based on the access request.
[0037] In S102, a file management command is sent to the device side so that the device side can perform file transfer based on the file management command.
[0038] It's worth noting that peer-to-peer (P2P) networking or other network traversal technologies can be used to interconnect and connect multiple devices. By establishing point-to-point connections, multiple devices can communicate directly without the involvement of a central server, creating a virtual file system underlying the network across different network environments. A virtual file system is deployed on each device, which virtually combines the file systems and directory structures of multiple devices into a single, unified file system. Based on user requests, file operations are transmitted to the appropriate device using network traversal technology, and the results are returned to the user.
[0039] In S103, the operation result returned by the receiving device is received.
[0040] In this embodiment, upon receiving a user's access request, the control terminal first generates a file management command based on the request, then sends the file management command to the device side, enabling the device side to perform file transfer based on the command. Finally, the control terminal receives the operation result returned by the device side. This embodiment, by implementing network traversal and virtual file management, can meet users' needs for cross-device file access and operation.
[0041] like Figure 2 and 3 The diagram shown illustrates the underlying network penetration and network interconnection.
[0042] in, Figure 2 It is a star topology, meaning that the mobile device (i.e., the first device) and the IoT device (i.e., the second device) are connected separately, and there is no connection between the IoT devices. Figure 3 It is a symmetrical mode, meaning that mobile devices and IoT devices are connected, and IoT devices are also interconnected.
[0043] In one possible implementation of this application, before generating a file management command based on the access request upon receiving a user's access request, the file management method may further include: establishing a connection between a first device corresponding to the control terminal and multiple second devices corresponding to the device side; through the connection, the first device communicates directly with the multiple second devices.
[0044] The connection in this embodiment can include two types: one is a star topology, such as... Figure 2 As shown; one is a symmetrical pattern, such as Figure 3 As shown.
[0045] In other words, the first step is to achieve network traversal and interconnection. Specifically, existing P2P technology or other network traversal technologies can be used to enable interconnection and connection between multiple devices. By establishing point-to-point connections, multiple devices can communicate directly without the involvement of a central server. This allows the creation of a virtual file system underlying network in different network environments.
[0046] A virtual file system is deployed on each device, which can virtualize the file systems and directory structures of multiple devices into a single, unified file system. The first device controlling the terminal (e.g., ...) Figure 2 and Figure 3 A virtual file system server is deployed on mobile devices (such as mobile devices in the device), and various second devices on the device side (such as mobile devices in the device) Figure 2 and Figure 3A virtual file system client is deployed on IoT devices 1, 2, 3, etc. The virtual file system server can, based on user requests at the application layer, pass file operations to the corresponding second devices using network traversal technology and return the results to the user. In this way, users can access and manipulate files on multiple devices (i.e., second devices) from the external network using the file system and directory structure of one device (i.e., the first device).
[0047] In one possible implementation of this application, establishing a connection between the first device corresponding to the control terminal and a plurality of second devices corresponding to the device side may include: establishing a connection between the first device corresponding to the control terminal and a plurality of second devices corresponding to the device side respectively, wherein the connection relationship between the plurality of second devices includes mutual connection and non-connection.
[0048] In other words, the connection mode between devices can be either a star topology or a symmetric topology. This frees users from the constraints of centralized storage servers and protects their private data and privacy.
[0049] In one possible implementation of this application, file management commands may include at least one of file moving, file copying, and file deletion.
[0050] like Figure 4 The diagram shown is a flowchart of a file management method provided in an embodiment of this application. Figure 4 As shown, the file management method is applied to the device side, and the file management method may include the contents shown in S401 to S403.
[0051] In S401, file management commands sent by the control terminal are received.
[0052] In S402, file management commands are distributed to multiple second devices so that the multiple second devices can execute the file management commands.
[0053] In S403, the operation result is sent to the control terminal.
[0054] In this embodiment, a file management command is first received from a control terminal. Then, the file management command is distributed to multiple second devices, enabling the second devices to execute the file management command. Finally, the operation result is sent back to the control terminal. This embodiment allows the control terminal to manage file transfers across multiple second devices, satisfying users' needs for cross-device file access and operation.
[0055] In one possible implementation of this application, multiple second devices are interconnected, and the execution of file management commands by the multiple second devices may include: file transfer between the various second devices based on the file management commands, and the file transfer includes at least one of file moving, file copying, and deletion.
[0056] In one possible implementation of this application, the multiple second devices are not connected to each other. The execution of file management commands by the multiple second devices may include: based on the file management commands, the second devices transfer files through the first device corresponding to the control terminal. The file transfer includes at least one of file moving and file copying.
[0057] The following is an example using a single mobile device (e.g., a smartphone) and multiple IoT devices (e.g., device 1, device 2, device 3):
[0058] The mobile device creates a service instance server in the virtual file system;
[0059] 1) Create a service instance client in each of Device 1, Device 2, and Device 3;
[0060] 2) The server service instance is responsible for requesting the file list from each device client, and then organizing, combining, sorting, paginating, etc. according to the database logic, and providing it to the application layer for invocation;
[0061] 3) The server service instance receives access from the application layer, distributes commands for different operations, and coordinates various device clients to perform operations such as reading files, transferring files, and modifying files;
[0062] 4) The client service instance is responsible for reading and manipulating the physical file systems of device 1, device 2, and device 3;
[0063] 5) The client service instance is responsible for receiving commands from the server and transferring files between devices;
[0064] 6) Copying and moving operations between Device 1, Device 2, and Device 3. For a star topology, this operation can be forwarded through the mobile device server. For example, if Device 1 copies a file to Device 2, Device 1's client first divides the file into chunks, uploads the chunks to the mobile device server, and then the server forwards them to Device 2's client. For a symmetric topology, the command is issued by the mobile device server, and the data does not need to be forwarded; it is directly transmitted between the two IoT devices. For example, if Device 1 copies a file to Device 2, Device 1's client receives the instruction from the mobile device server and directly sends the file to Device 2's client.
[0065] In higher-level applications, users can access and manipulate files through the interfaces provided by the virtual file system. Users can read, write, copy, and move files in the virtual file system just like they would local files. The virtual file system forwards these operations to the appropriate devices and returns the results to the user.
[0066] On mobile devices, you can display all files and folders of Device 1, Device 2, and Device 3; select multiple files to copy and move to a folder of Device 1, Device 2, and Device 3; modify and delete files and folders of Device 1, Device 2, and Device 3; and copy, move, or delete files and folders between Device 1, Device 2, and Device 3.
[0067] This application's embodiment is based on a decentralized solution using network penetration. Its software design logic is simple, it consumes few resources, and it is suitable for file storage management on edge IoT devices. It has horizontal scalability, allowing for the dynamic addition of more IoT devices to meet greater storage needs. This embodiment can be applied in smart homes, the Internet of Things, and other fields, enabling data sharing and interoperability between devices.
[0068] like Figure 5 The diagram shown is a schematic representation of a file management device provided in an embodiment of this application. Figure 5 As shown, the file management device is applied to the control terminal, and the file management device may include: a generation module 501, a first sending module 502, and a first receiving module 503.
[0069] The generation module 501 is used to generate a file management command based on the access request received from the user; the first sending module 502 is used to send the file management command to the device side so that the device side can perform file transfer based on the file management command; and the first receiving module 503 is used to receive the operation result returned by the device side.
[0070] In this embodiment, upon receiving a user's access request, the generation module 501 first generates a file management command based on the access request. Then, the first sending module 502 sends the file management command to the device side, enabling the device side to perform file transfer based on the file management command. Finally, the first receiving module 503 receives the operation result returned by the device side. This embodiment, by implementing network traversal and virtual file management, can meet users' needs for cross-device file access and operation.
[0071] In one possible embodiment of this application, the file management device may further include: an establishment module and a communication module.
[0072] The module establishes a connection between the first device corresponding to the control terminal and multiple second devices corresponding to the device side; the communication module enables the first device to communicate directly with the multiple second devices through the connection.
[0073] In one possible implementation of this application, an establishment module is used to establish connections between a first device corresponding to the control terminal and a plurality of second devices corresponding to the device side, wherein the connection relationship between the plurality of second devices includes mutual connection and non-connection.
[0074] In one possible implementation of this application, the file management commands include at least one of file moving, file copying, and file deletion.
[0075] The document management device in this application already has the functionality of... Figure 1-3 The method embodiments shown are described in detail. Therefore, for any parts not covered in detail in this embodiment, please refer to the relevant descriptions in the foregoing embodiments, which will not be repeated here.
[0076] like Figure 6 The diagram shown is a schematic representation of a file management device provided in an embodiment of this application. Figure 6 As shown, the file management device is applied to the device side and may include: a second receiving module 601, a distribution module 602, and a second sending module 603.
[0077] The second receiving module 601 is used to receive file management commands sent by the control terminal; the distribution module 602 is used to distribute the file management commands to multiple second devices so that the multiple second devices can execute the file management commands; and the second sending module 603 is used to send the operation results to the control terminal.
[0078] In this embodiment, a file management command is first received from a control terminal. Then, the file management command is distributed to multiple second devices, enabling the second devices to execute the file management command. Finally, the operation result is sent back to the control terminal. This embodiment allows the control terminal to manage file transfers across multiple second devices, satisfying users' needs for cross-device file access and operation.
[0079] In one possible implementation of this application, multiple second devices are interconnected, and a distribution module is used to: transfer files between the various second devices based on file management commands, wherein the file transfer includes at least one of file moving, file copying, and deletion.
[0080] In one possible implementation of this application, the multiple second devices are not connected to each other. The distribution module is used to: based on file management commands, the second devices transfer files through the first device corresponding to the control terminal. The file transfer includes at least one of file moving and file copying.
[0081] The document management device in this application already has the functionality of... Figure 2-4 The method embodiments shown are described in detail. Therefore, for any parts not covered in detail in this embodiment, please refer to the relevant descriptions in the foregoing embodiments, which will not be repeated here.
[0082] like Figure 7 As shown, this application embodiment also provides a terminal device 700, including a processor 701, a memory 702, and a program or instructions stored in the memory 702 and executable on the processor 701. When the program or instructions are executed by the processor 701, they implement the various processes of the above-described file management processing method embodiment and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0083] Optionally, embodiments of this application also provide a terminal device, including a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described file management method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0084] Optionally, embodiments of this application also provide a computer-readable storage medium storing a computer program. When executed by a processor, this computer program implements the various processes of the above-described file management method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0085] Optionally, this application also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, which, when executed by a computer, implement the various processes of the above-described file management method embodiments and achieve the same technical effects. To avoid repetition, they will not be described again here.
[0086] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0087] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0088] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A file management method, characterized in that, Applied to a control terminal, the method includes: A connection is established between the first device corresponding to the control terminal and a plurality of second devices corresponding to the device side. A virtual file system is deployed on the first device of the control terminal and on each of the second devices on the device side. Through this connection, the first device communicates directly with a plurality of the second devices; Upon receiving a user's access request, generate file management commands based on the access request; Send the file management command to the device side so that the device side can perform file transfer based on the file management command; Receive the operation result returned by the device side; The step of establishing a connection between the first device corresponding to the control terminal and the multiple second devices corresponding to the device side includes: The first device corresponding to the control terminal establishes a connection with a plurality of second devices corresponding to the device side, wherein the connection relationship between the plurality of second devices includes mutual connection and non-connection.
2. The method according to claim 1, characterized in that, The file management commands include at least one of file moving, file copying, and file deletion.
3. A file management method, characterized in that, Applied to the device side, the method includes: The system receives file management commands sent by a control terminal. The first device corresponding to the control terminal establishes a connection with multiple second devices corresponding to the device side. Through the connection, the first device communicates directly with the multiple second devices. A virtual file system is deployed on the first device of the control terminal, and a virtual file system is deployed on each of the second devices on the device side. The file management command is distributed to multiple second devices, so that the multiple second devices execute the file management command, and the multiple second devices are either connected to each other or not connected to each other; The operation results are sent to the control terminal.
4. The file management method according to claim 3, characterized in that, The plurality of second devices are interconnected, and the plurality of second devices execute the file management command, including: Based on the file management command, file transfer is performed between the various second devices, and the file transfer includes at least one of file moving, file copying, and deletion.
5. The file management method according to claim 3, characterized in that, The plurality of second devices are not connected to each other, and the plurality of second devices execute the file management command, including: Based on the file management command, the second device performs file transfer through the first device corresponding to the control terminal, and the file transfer includes at least one of file moving and file copying.
6. A document management device, characterized in that, The device, used in a control terminal, includes: A connection establishment module is provided to establish a connection between a first device corresponding to a control terminal and multiple second devices corresponding to the device side. A virtual file system is deployed on the first device of the control terminal and on each of the second devices on the device side. A communication module is used to enable the first device to communicate directly with a plurality of second devices via a connection; The generation module is used to generate file management commands based on a user's access request upon receiving the user's access request; The first sending module is used to send the file management command to the device side, so that the device side can perform file transfer based on the file management command; The first receiving module is used to receive the operation result returned by the device side; The module is used to establish connections between the first device corresponding to the control terminal and a plurality of second devices corresponding to the device side, wherein the connection relationship between the plurality of second devices includes mutual connection and no connection between them.
7. A document management device, characterized in that, Applied to the equipment side, the device includes: The second receiving module is used to receive file management commands sent by the control terminal. The first device corresponding to the control terminal establishes a connection with multiple second devices corresponding to the device side. Through the connection, the first device communicates directly with the multiple second devices. A virtual file system is deployed on the first device of the control terminal, and a virtual file system is deployed on each of the second devices on the device side. The distribution module is used to distribute the file management command to multiple second devices, so that the multiple second devices can execute the file management command, wherein the multiple second devices are connected to each other or are not connected to each other; The second sending module is used to send the operation result to the control terminal.
8. A computer program product, characterized in that, The computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions that, when executed by a computer, implement the steps of the method as claimed in claim 1 or 2, or implement the steps of the method as claimed in any one of claims 3-5.
Citation Information
Patent Citations
Cross-terminal file synchronization method and device
CN113992652A
File transmission method and related equipment
CN114356195A