A nas remote cache acceleration method

By using LAN channels and mesh networking between NAS devices and user devices, and dynamically adjusting transmission and storage strategies, the problem of data transmission speed and stability of NAS devices when wireless network conditions are poor is solved, achieving more efficient file storage and access.

CN120825499BActive Publication Date: 2026-02-03JIANGSU SANAI NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511324382.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-17
Publication Date
2026-02-03
Estimated Expiration
2045-09-17

AI Technical Summary

Technical Problem

When existing NAS devices transmit data via wireless communication networks, poor network conditions on user devices result in low read and write speeds. How can we improve data transmission speed and stability?

Method used

The communication connection is established by exchanging handshake information with the target user equipment through the local area network channel. When the coverage conditions do not meet the preset conditions, the file to be transferred is obtained through mesh networking. The accelerated storage strategy is determined according to the file attributes, and the file is stored using caching and accelerated storage strategies.

Benefits of technology

Dynamically adjust transmission and storage methods to improve the robustness and storage stability of the NAS system, optimize file access efficiency, avoid signaling storms and protocol overhead, and reduce fragmented file storage waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120825499B_ABST
    Figure CN120825499B_ABST
Patent Text Reader

Abstract

The application relates to the field of network communication, and provides a NAS remote cache acceleration method, which is applied to a NAS device and comprises the following steps: exchanging handshake information with a target user equipment through a local area network channel, establishing a communication connection with the target user equipment according to the handshake information, and obtaining a to-be-transmitted file sent by the target user equipment through the local area network channel; obtaining backup communication information of each user equipment, and sending the backup communication information to the target user equipment, so that the target user equipment establishes a mesh networking with other user equipments through a backup channel according to the backup communication information; when the coverage condition of the target user equipment does not meet a preset condition, obtaining the to-be-transmitted file sent by the target user equipment through the mesh networking; and when the to-be-transmitted file is obtained, determining an acceleration storage strategy corresponding to the to-be-transmitted file according to a file attribute of the to-be-transmitted file, and storing the to-be-transmitted file based on the acceleration storage strategy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network communication, and in particular to a method for accelerating remote caching of NAS. Background Technology

[0002] Network Attached Storage (NAS) is a storage solution implemented via wireless communication networks, providing file storage and sharing services to at least multiple user devices within the same local area network. NAS devices can serve as a home data center for centralized storage of photos, videos, and other files, supporting shared access across multiple devices; or they can provide centralized file storage and access control for small and medium-sized enterprises, acting as a private "cloud drive" for the business. Existing NAS devices typically achieve data transmission via wireless communication networks. However, NAS relies on a network, and if the user device's network connection is poor, read and write speeds will be slow. Therefore, improving the speed and stability of data transmission between user devices and NAS devices through wireless communication networks has become a pressing issue. Summary of the Invention

[0003] The main purpose of this application is to provide a NAS remote caching acceleration method, which aims to improve the speed and stability of data transmission between user devices and NAS devices through wireless communication networks.

[0004] In a first aspect, this application provides a NAS remote caching acceleration method, the method comprising the following steps:

[0005] The system exchanges handshake information with the target user equipment through a local area network channel, and establishes a communication connection with the target user equipment based on the handshake information, so as to obtain the file to be transmitted sent by the target user equipment through the local area network channel;

[0006] Obtain backup communication information for each user device and send the backup communication information to the target user device, so that the target user device can establish a mesh network with other user devices through the backup channel based on the backup communication information;

[0007] If the coverage conditions of the target user equipment do not meet the preset conditions, the target user equipment's file to be transmitted is obtained through the mesh network.

[0008] When the file to be transferred is obtained, an accelerated storage strategy corresponding to the file to be transferred is determined according to the file attributes of the file to be transferred, and the file to be transferred is stored based on the accelerated storage strategy.

[0009] In some implementations, the step of exchanging handshake information with the target user equipment via a local area network channel and establishing a communication connection with the target user equipment based on the handshake information includes:

[0010] The handshake information is parsed to obtain the coverage conditions of the target user equipment in the local area network.

[0011] Based on the coverage conditions, the retransmission indication duration and connection release duration corresponding to the user equipment are determined, wherein the connection release duration is longer than the retransmission indication duration.

[0012] If the waiting time for the NAS device to wait for the file to be transferred is longer than the retransmission instruction time, a retransmission instruction is sent to instruct the user equipment to retransmit the file to be transferred.

[0013] If the NAS device waits for a longer period of time for the file to be transferred than the connection release period, the connection channel with the user equipment is released.

[0014] In some implementations, the step of obtaining the file to be transmitted sent by the target user equipment through the mesh network when the coverage conditions of the target user equipment do not meet the preset conditions includes:

[0015] If the first coverage condition of the target user device does not meet the preset condition, the second coverage condition of each other user device in the local area network is obtained through the mesh networking.

[0016] The relay device is determined from the other user equipment based on the second coverage condition and the mesh network.

[0017] The file to be transferred is transmitted to the relay device through the mesh network, wherein the mesh network includes at least a Bluetooth mesh network.

[0018] In some implementations, when the file to be transferred is obtained, determining the corresponding accelerated storage strategy based on the file attributes of the file to be transferred, and storing the file to be transferred based on the accelerated storage strategy, includes:

[0019] Obtain the storage path of the file to be transferred, and determine the path depth of the storage path based on the number of levels in the storage path;

[0020] If the path depth is greater than the preset depth, the file to be transmitted will be stored in the preset path;

[0021] When generating the metadata of the file to be transferred, the storage path is saved into the metadata.

[0022] In some embodiments, the method further includes:

[0023] Receive a file read instruction, parse the read path of the file read instruction, and determine the path depth of the read path;

[0024] If the path depth is greater than a preset depth, a virtual directory table for recording the path structure is obtained.

[0025] Based on the virtual directory table, a virtual hierarchical view is generated and displayed, along with the metadata in the preset path and the files corresponding to the read path.

[0026] In some implementations, when the file to be transferred is obtained, determining the corresponding accelerated storage strategy based on the file attributes of the file to be transferred, and storing the file to be transferred based on the accelerated storage strategy, includes:

[0027] Files whose size is less than a preset threshold in the files to be transmitted are identified as fragmented files.

[0028] If the current number of fragmented files in the received file to be transmitted is greater than a first preset number, an inquiry message is sent to the target user equipment, and the response message corresponding to the inquiry message is obtained.

[0029] The received fragmented file is stored in the cache area according to the response information, and the fragmented file is moved from the cache area to the storage area when the completion information is received.

[0030] In some implementations, storing the received fragmented file in a cache area based on the response information, and moving the fragmented file from the cache area to the storage area when completion information is received, includes:

[0031] Parse the response information to obtain the remaining number of fragmented files in the response information;

[0032] If the remaining number of fragmented files is greater than the second preset number, the received fragmented files will be stored in the cache area.

[0033] When the completion information is received, the received fragment files are spliced ​​together to obtain a spliced ​​file;

[0034] The index information corresponding to the assembled file is generated based on the fragment files in the assembled file. The index information includes the file name of the fragment file and its offset in the assembled file.

[0035] In some implementations, the preset threshold is determined according to the following formula:

[0036] ;

[0037] in, The preset base threshold, The number of files currently less than T(t−1) This represents the total number of files. For disk I / O utilization, CPU utilization .

[0038] In some implementations, when the storage medium is an HDD, the base threshold is the physical sector size of the HDD; when the storage medium is an SSD, the base threshold is the flash page size of the SSD.

[0039] In some embodiments, the method further includes:

[0040] Upon receiving a read instruction for the fragmented file, the file name of the fragmented file is searched in the index information;

[0041] Obtain the target offset corresponding to the file name, and parse the fragment file from the concatenated file based on the target offset.

[0042] Secondly, this application also provides a NAS remote caching acceleration device, the device comprising:

[0043] The communication connection module is used to exchange handshake information with the target user equipment through a local area network channel, and establish a communication connection with the target user equipment based on the handshake information, so as to obtain the file to be transmitted sent by the target user equipment through the local area network channel;

[0044] The mesh networking module is used to obtain backup communication information of each user device and send the backup communication information to the target user device, so that the target user device can establish a mesh network with other user devices through the backup channel based on the backup communication information;

[0045] The file transfer module is used to obtain the file to be transferred sent by the target user device through the mesh network when the coverage conditions of the target user device do not meet the preset conditions.

[0046] The storage acceleration module is used to determine the acceleration storage strategy corresponding to the file to be transferred based on the file attributes of the file to be transferred when the file to be transferred is obtained, and to store the file to be transferred based on the acceleration storage strategy.

[0047] Thirdly, this application also provides a computer device, the computer device including a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, it implements the NAS remote caching acceleration method as described above.

[0048] Fourthly, this application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the NAS remote caching acceleration method described above.

[0049] This application provides a NAS remote caching acceleration method, applied to a NAS device, comprising: exchanging handshake information with a target user device via a local area network (LAN) channel, and establishing a communication connection with the target user device based on the handshake information, so as to obtain a file to be transferred sent by the target user device through the LAN channel; obtaining backup communication information of each user device, and sending the backup communication information to the target user device, so that the target user device can establish a mesh network with other user devices through a backup channel based on the backup communication information; if the coverage conditions of the target user device do not meet preset conditions, obtaining the file to be transferred sent by the target user device through the mesh network; when the file to be transferred is obtained, determining the corresponding acceleration storage strategy based on the file attributes of the file to be transferred, and storing the file to be transferred based on the acceleration storage strategy. This method can dynamically adjust the transmission and storage methods according to network conditions and file characteristics, improving the robustness and storage stability of the NAS system. Attached Figure Description

[0050] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0051] Figure 1 A use case diagram of a NAS remote caching acceleration method provided in an embodiment of this application.

[0052] Figure 2 A flowchart illustrating a NAS remote caching acceleration method provided in an embodiment of this application;

[0053] Figure 3 A schematic block diagram of a NAS remote caching acceleration device provided in an embodiment of this application;

[0054] Figure 4 This is a schematic block diagram of the structure of a computer device according to an embodiment of this application. Detailed Implementation

[0055] 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.

[0056] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.

[0057] This application provides a method for accelerating remote caching in a NAS.

[0058] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0059] This NAS remote caching acceleration method can be used in terminals or servers. The terminals can be electronic devices such as mobile phones, tablets, laptops, desktop computers, personal digital assistants, and wearable devices. The servers can be standalone servers, server clusters, or cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0060] Please refer to Figure 1 , Figure 1 This is a usage scenario diagram provided by an embodiment of this application. For example... Figure 1 As shown, the User Equipment (UE) can be various types of terminal devices, and the NAS device can be a server, but it is not limited to these. Figure 1 As shown, all user equipment (UE) and NAS devices are located on the same local area network, for example, connected to the same router.

[0061] Please refer to Figure 2 , Figure 2 This is a flowchart illustrating a NAS remote caching acceleration method provided in an embodiment of this application.

[0062] like Figure 2As shown, the NAS remote caching acceleration method includes steps S101 to S104.

[0063] Step S101: Exchange handshake information with the target user equipment through the local area network channel, and establish a communication connection with the target user equipment according to the handshake information, so as to obtain the file to be transmitted sent by the target user equipment through the local area network channel;

[0064] Step S102: Obtain the backup communication information of each user equipment and send the backup communication information to the target user equipment so that the target user equipment can establish a mesh network with other user equipment through the backup channel according to the backup communication information;

[0065] Step S103: If the coverage conditions of the target user device do not meet the preset conditions, obtain the file to be transmitted sent by the target user device through the mesh network.

[0066] Step S104: When the file to be transferred is obtained, determine the acceleration storage strategy corresponding to the file to be transferred according to the file attributes of the file to be transferred, and store the file to be transferred based on the acceleration storage strategy.

[0067] For example, user devices and NAS devices can send and receive information via a local area network (LAN) or a mesh network. Specifically, if the coverage conditions of the target user device meet preset conditions, the NAS device obtains the file to be transferred sent by the target user device through the LAN; if the coverage conditions of the target user device do not meet the preset conditions, the NAS device obtains the file to be transferred sent by the target user device through a mesh network. The mesh network can be Bluetooth networking or Zigbee networking, etc., and is not limited here.

[0068] Understandably, user devices forming a mesh network with the target user device should also be located on the same local area network as the NAS device in order to transfer files from the target user device to the NAS device if the coverage conditions of the target user device do not meet the preset conditions.

[0069] For example, in order to ensure that other user devices in the mesh network are all located in the same local area network as the NAS device, when the target user device connects to the NAS device, the NAS device will send the backup communication information of each connected user device to the target user device, so that the target user device can establish a communication connection with each user device according to the backup communication information to form a mesh network, thereby avoiding the user devices in the mesh network being outside the local area network.

[0070] In some implementations, the step of exchanging handshake information with the target user equipment via a local area network channel and establishing a communication connection with the target user equipment based on the handshake information includes:

[0071] The handshake information is parsed to obtain the coverage conditions of the target user equipment in the local area network.

[0072] Based on the coverage conditions, the retransmission indication duration and connection release duration corresponding to the user equipment are determined, wherein the connection release duration is longer than the retransmission indication duration.

[0073] If the waiting time for the NAS device to wait for the file to be transferred is longer than the retransmission instruction time, a retransmission instruction is sent to instruct the user equipment to retransmit the file to be transferred.

[0074] If the NAS device waits for a longer period of time for the file to be transferred than the connection release period, the connection channel with the user equipment is released.

[0075] For example, a "handshake" is the process of establishing a connection in a wireless communication network, and handshake information represents the information sent during this process. By exchanging handshake information with the target user equipment, the network conditions of the target user equipment can be determined, such as the transmission duration of the handshake information and signal strength, thereby obtaining the coverage conditions of the user equipment.

[0076] For example, a NAS device may send a retransmission signal to the target user device if the waiting time for the file to be transferred is longer than the retransmission instruction duration. If the retransmission instruction duration is set too short, the NAS will send too many retransmission signals, causing the target user device to be caught in a signaling storm. The NAS device may also release the connection with the target user device if the waiting time for the file to be transferred is longer than the connection release duration. If the connection release duration is set too short, the target user device will need to repeatedly re-establish communication connections with the NAS, increasing protocol overhead.

[0077] The embodiments of this application dynamically determine the retransmission indication duration and connection release duration based on coverage conditions, so that the retransmission indication duration and connection release duration are adapted to the network conditions of the user equipment, thereby avoiding the risks of signaling storms and increased protocol overhead.

[0078] For example, the retransmission indication duration and connection release duration can be determined based on the average transmission duration of the handshake information. For instance, the retransmission indication duration can be twice the average transmission duration of the handshake information, and the connection release duration can be 20 times the average transmission duration of the handshake information. However, this is not the only possibility; coverage conditions can also be divided into multiple levels such as weak coverage, normal coverage, and strong coverage, with corresponding retransmission indication durations and connection release durations pre-set for each level.

[0079] In some implementations, the step of obtaining the file to be transmitted sent by the target user equipment through the mesh network when the coverage conditions of the target user equipment do not meet the preset conditions includes:

[0080] If the first coverage condition of the target user device does not meet the preset condition, the second coverage condition of each other user device in the local area network is obtained through the mesh networking.

[0081] The relay device is determined from the other user equipment based on the second coverage condition and the mesh network.

[0082] The file to be transferred is transmitted to the relay device through the mesh network, wherein the mesh network includes at least a Bluetooth mesh network.

[0083] For example, when the network conditions of the target user device deteriorate, causing its own first coverage condition to be insufficient to meet the requirement of data transmission to the NAS device, a relay device is used by another user device in the mesh network with better second coverage conditions. Specifically, a relay device is determined from the other user devices in the mesh network, for example, the user device with the best second coverage condition is determined as the relay device; the file to be transferred is first transferred to the relay device through the mesh network, and then the relay device transfers the file to the NAS device.

[0084] Mesh networking can be achieved through Bluetooth, Zigbee, physical connections, etc. Figure 1 As shown, the dashed lines represent mesh networking between user devices.

[0085] For example, if the coverage conditions of UE1 do not meet the preset conditions, the file to be transferred is transferred to UE2 via Bluetooth, and UE2 then transfers the file to be transferred to the NAS device via the router.

[0086] In some implementations, when the file to be transferred is obtained, determining the corresponding accelerated storage strategy based on the file attributes of the file to be transferred, and storing the file to be transferred based on the accelerated storage strategy, includes:

[0087] Obtain the storage path of the file to be transferred, and determine the path depth of the storage path based on the number of levels in the storage path;

[0088] If the path depth is greater than the preset depth, the file to be transmitted will be stored in the preset path;

[0089] When generating the metadata of the file to be transferred, the storage path is saved into the metadata.

[0090] For example, a deep path refers to a path structure with many levels in a file system or data structure. NAS devices need to manage a large number of complex files or data, which can easily lead to an endless increase in path depth. Deep paths may cause the system to need to parse the path layer by layer when accessing files, increasing the overhead of path resolution and thus reducing the efficiency of file access, especially during backup and recovery.

[0091] To avoid this situation, the NAS remote caching acceleration provided in this application, when the path depth is greater than a preset depth, saves the path of the file to be transferred as metadata and stores the file to be transferred in a shallower preset path instead of the actual storage path. A virtual directory table is used to simulate the storage path, thereby avoiding the path resolution overhead and low file access efficiency problems caused by storing files with a large number of levels in a storage path. The path depth of the storage path is the number of levels; the preset depth can be, for example, 6, and the preset path can be, for example, a path under a meta folder.

[0092] In some embodiments, the method further includes:

[0093] Receive a file read instruction, parse the read path of the file read instruction, and determine the path depth of the read path;

[0094] If the path depth is greater than a preset depth, a virtual directory table for recording the path structure is obtained.

[0095] Based on the virtual directory table, a virtual hierarchical view is generated and displayed, along with the metadata in the preset path and the files corresponding to the read path.

[0096] For example, when a file read command from a target user device requires reading a path with significant depth, this read path is simulated using a pre-defined virtual directory table. Specifically, the virtual directory table records the inclusion relationships between paths; for instance, folder A contains folder B, folder B contains folder C, and so on. When the path depth of the file read command exceeds a preset depth, a virtual hierarchical view within this read path is determined based on the virtual directory table. This view reflects the parent and child paths of this read path. The file whose metadata corresponds to the read path is then located within the preset path. The virtual hierarchical view and the file whose metadata corresponds to the read path are then displayed to the user device, thereby achieving flattening of the deep path.

[0097] In some implementations, when the file to be transferred is obtained, determining the corresponding accelerated storage strategy based on the file attributes of the file to be transferred, and storing the file to be transferred based on the accelerated storage strategy, includes:

[0098] Files whose size is less than a preset threshold in the files to be transmitted are identified as fragmented files.

[0099] If the current number of fragmented files in the received file to be transmitted is greater than a first preset number, an inquiry message is sent to the target user equipment, and the response message corresponding to the inquiry message is obtained.

[0100] The received fragmented file is stored in the cache area according to the response information, and the fragmented file is moved from the cache area to the storage area when the completion information is received.

[0101] For example, when the files to be transferred are a large number of fragmented small files, there may be unused space between each file. Furthermore, since the file system needs metadata to describe the storage status of each file, as the amount of metadata increases, the storage space required to store the metadata also increases, which can easily lead to a metadata explosion problem caused by a large number of fragmented files.

[0102] To avoid this situation, fragmented files smaller than a preset threshold can be stored in the cache area first. After the fragmented files have been sent, they can be merged into a single file and moved to the storage area.

[0103] Specifically, if the current number of fragment files in the file to be transmitted sent by the target user equipment is greater than a first preset number, an inquiry message is sent to the target user equipment, and a response message is received from the target user equipment based on the inquiry message. The received fragment files are stored in a cache area until a completion message is received, at which point the fragment files are moved from the cache area to the storage area. The completion message is sent by the user equipment to indicate that the transmission of the fragment files has been completed.

[0104] For example, the size of the preset threshold can be set according to the actual situation, such as 4KB.

[0105] In some implementations, storing the received fragmented file in a cache area based on the response information, and moving the fragmented file from the cache area to the storage area when completion information is received, includes:

[0106] Parse the response information to obtain the remaining number of fragmented files in the response information;

[0107] If the remaining number of fragmented files is greater than the second preset number, the received fragmented files will be stored in the cache area.

[0108] When the completion information is received, the received fragment files are spliced ​​together to obtain a spliced ​​file;

[0109] The index information corresponding to the assembled file is generated based on the fragment files in the assembled file. The index information includes the file name of the fragment file and its offset in the assembled file.

[0110] For example, the query information includes a preset threshold. The target user device determines the number of fragmented files whose file size is smaller than the preset threshold among the files that have not yet been sent based on the preset threshold in the query information, and returns response information. The response information includes the number of files whose file size is smaller than the preset threshold among the files to be sent, i.e. the remaining number. If the remaining number is greater than a certain number, the received fragmented files are stored in the cache area until the completion information is received, at which point the fragmented files are moved from the cache area to the storage area.

[0111] For example, multiple fragmented files are concatenated into a single concatenated file to avoid the space waste and metadata explosion problems caused by storing small files. To facilitate reading the fragmented files in the concatenated file, index information is generated to represent the fragmented files within the concatenated file.

[0112] In some implementations, the preset threshold is determined according to the following formula:

[0113] ;

[0114] in, The preset base threshold, The number of files currently less than T(t−1) This represents the total number of files. For disk I / O utilization, CPU utilization .

[0115] For example, to optimize the storage performance of fragmented small files, a preset threshold can be dynamically determined based on a preset base threshold. and The ratio of T(t) to T(t) determines the degree of file fragmentation; a higher ratio indicates severe fragmentation, requiring a reduction in T(t) to expand the packing range. System load is calculated based on disk I / O usage and CPU usage; under high load, T(t) is increased to avoid additional packing overhead. These are the preset weights.

[0116] In some implementations, when the storage medium is an HDD, the base threshold is the physical sector size of the HDD; when the storage medium is an SSD, the base threshold is the flash page size of the SSD.

[0117] For example, the size of the base threshold can be determined based on the physical characteristics of the storage medium. If the physical sector size of an HDD is 4KB, the base threshold size can be 4. Similarly, if the flash page size of an SSD is 4KB, the base threshold size can also be 4.

[0118] In some embodiments, the method further includes:

[0119] Upon receiving a read instruction for the fragmented file, the file name of the fragmented file is searched in the index information;

[0120] Obtain the target offset corresponding to the file name, and parse the fragment file from the concatenated file based on the target offset.

[0121] For example, to facilitate users in reading fragment files from the assembled file, the offset and filename of each fragment file are stored in the index information. The offset indicates the starting position of the fragment file within the assembled file.

[0122] The NAS remote caching acceleration method provided in the above embodiments exchanges handshake information with the target user equipment through a local area network (LAN) channel, and establishes a communication connection with the target user equipment based on the handshake information, so as to obtain the file to be transmitted sent by the target user equipment through the LAN channel; obtains backup communication information of each user equipment, and sends the backup communication information to the target user equipment, so that the target user equipment can establish a mesh network with other user equipment through the backup channel based on the backup communication information; if the coverage conditions of the target user equipment do not meet the preset conditions, the method obtains the file to be transmitted sent by the target user equipment through the mesh network; when the file to be transmitted is obtained, the method determines the corresponding acceleration storage strategy based on the file attributes of the file to be transmitted, and stores the file to be transmitted based on the acceleration storage strategy. This method can dynamically adjust the transmission and storage methods according to network conditions and file characteristics, improving the robustness and storage stability of the NAS system.

[0123] Please see Figure 3 , Figure 3 This is a schematic diagram of a NAS remote caching acceleration device provided in an embodiment of this application. The NAS remote caching acceleration device can be configured in a server or terminal to execute the aforementioned NAS remote caching acceleration method.

[0124] like Figure 3 As shown, the NAS remote caching acceleration device includes: a communication connection module 110, a mesh networking module 120, a file transfer module 130, and a storage acceleration module 140.

[0125] The communication connection module 110 is used to exchange handshake information with the target user equipment through a local area network channel, and to establish a communication connection with the target user equipment according to the handshake information, so as to obtain the file to be transmitted sent by the target user equipment through the local area network channel;

[0126] Mesh networking module 120 is used to obtain backup communication information of each user device and send the backup communication information to the target user device, so that the target user device can establish a mesh network with other user devices through the backup channel according to the backup communication information;

[0127] The file transfer module 130 is used to obtain the file to be transferred sent by the target user device through the mesh network when the coverage conditions of the target user device do not meet the preset conditions.

[0128] The storage acceleration module 140 is used to determine the acceleration storage strategy corresponding to the file to be transferred based on the file attributes of the file to be transferred when the file to be transferred is obtained, and to store the file to be transferred based on the acceleration storage strategy.

[0129] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the above-described apparatus and its modules and units can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0130] The methods and apparatus of this application can be used in a wide variety of general-purpose or special-purpose computing system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0131] For example, the above-described method and apparatus can be implemented as a computer program, which can be used in, for example... Figure 4 It runs on the computer device shown.

[0132] Please see Figure 4 , Figure 4 This is a schematic block diagram illustrating the structure of a computer device provided in an embodiment of this application. The computer device may be a server or a terminal.

[0133] like Figure 4 As shown, the computer device includes a processor, memory, and network interface connected via a system bus, wherein the memory may include storage media and internal memory.

[0134] The storage medium can store an operating system and computer programs. These computer programs include program instructions that, when executed, cause the processor to perform any NAS remote caching acceleration method.

[0135] The processor provides computing and control capabilities, supporting the operation of the entire computer device.

[0136] Internal memory provides an environment for the execution of computer programs stored in the storage medium. When these computer programs are executed by the processor, the processor can perform any NAS remote caching acceleration method.

[0137] This network interface is used for network communication, such as sending assigned tasks. Those skilled in the art will understand that... Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0138] It should be understood that the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.

[0139] In one embodiment, the processor is configured to run a computer program stored in memory to perform the following steps:

[0140] The system exchanges handshake information with the target user equipment through a local area network channel, and establishes a communication connection with the target user equipment based on the handshake information, so as to obtain the file to be transmitted sent by the target user equipment through the local area network channel;

[0141] Obtain backup communication information for each user device and send the backup communication information to the target user device, so that the target user device can establish a mesh network with other user devices through the backup channel based on the backup communication information;

[0142] If the coverage conditions of the target user equipment do not meet the preset conditions, the target user equipment's file to be transmitted is obtained through the mesh network.

[0143] When the file to be transferred is obtained, an accelerated storage strategy corresponding to the file to be transferred is determined according to the file attributes of the file to be transferred, and the file to be transferred is stored based on the accelerated storage strategy.

[0144] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of NAS remote caching acceleration described above can be referred to the corresponding process in the aforementioned NAS remote caching acceleration control method embodiment, and will not be repeated here.

[0145] This application also provides a computer-readable storage medium storing a computer program, the computer program including program instructions, and the method implemented when the program instructions are executed can refer to various embodiments of the NAS remote caching acceleration method of this application.

[0146] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiments, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, SmartMedia Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the computer device.

[0147] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0148] It should also be understood that the term "and / or" as used in this specification and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations. It should be noted that, herein, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system 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 system. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0149] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. The above descriptions are merely specific implementations of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A NAS remote caching acceleration method, characterized in that, The method is applied to NAS devices and includes: The system exchanges handshake information with the target user equipment through a local area network channel, and establishes a communication connection with the target user equipment based on the handshake information, so as to obtain the file to be transmitted sent by the target user equipment through the local area network channel; Obtain backup communication information for each user device and send the backup communication information to the target user device, so that the target user device can establish a mesh network with other user devices through the backup channel based on the backup communication information; If the coverage conditions of the target user equipment do not meet the preset conditions, the target user equipment's file to be transmitted is obtained through the mesh network. When the file to be transferred is obtained, the accelerated storage strategy corresponding to the file to be transferred is determined according to the file attributes of the file to be transferred, and the file to be transferred is stored based on the accelerated storage strategy. Upon obtaining the file to be transferred, determining the corresponding accelerated storage strategy based on the file attributes of the file to be transferred, and storing the file to be transferred based on the accelerated storage strategy, includes: Files whose size is less than a preset threshold in the files to be transmitted are identified as fragmented files. If the current number of fragmented files in the received file to be transmitted is greater than a first preset number, an inquiry message is sent to the target user equipment, and the response message corresponding to the inquiry message is obtained. The received fragmented file is stored in the cache area according to the response information, and the fragmented file is moved from the cache area to the storage area when the completion information is received. The step of storing the received fragmented file in the cache area according to the response information, and moving the fragmented file from the cache area to the storage area when the completion information is received, includes: Parse the response information to obtain the remaining number of fragmented files in the response information; If the remaining number of fragmented files is greater than the second preset number, the received fragmented files will be stored in the cache area. When the completion information is received, the received fragment files are spliced ​​together to obtain a spliced ​​file; The index information corresponding to the assembled file is generated based on the fragment files in the assembled file. The index information includes the file name of the fragment file and its offset in the assembled file.

2. The NAS remote caching acceleration method according to claim 1, characterized in that, The step of exchanging handshake information with the target user equipment via a local area network channel and establishing a communication connection with the target user equipment based on the handshake information includes: The handshake information is parsed to obtain the coverage conditions of the target user equipment in the local area network. Based on the coverage conditions, the retransmission indication duration and connection release duration corresponding to the user equipment are determined, wherein the connection release duration is longer than the retransmission indication duration. If the waiting time for the NAS device to wait for the file to be transferred is longer than the retransmission instruction time, a retransmission instruction is sent to instruct the user equipment to retransmit the file to be transferred. If the NAS device waits for a longer period of time for the file to be transferred than the connection release period, the connection channel with the user equipment is released.

3. The NAS remote caching acceleration method according to claim 1, characterized in that, When the coverage conditions of the target user equipment do not meet the preset conditions, the method of obtaining the file to be transmitted sent by the target user equipment through the mesh network includes: If the first coverage condition of the target user equipment does not meet the preset condition, the second coverage condition of each other user equipment in the local area network is obtained through the mesh networking. Based on the second coverage condition and the mesh networking, a relay device is determined from the other user equipment; The file to be transferred is transmitted to the relay device through the mesh network, wherein the mesh network includes at least a Bluetooth mesh network.

4. The NAS remote caching acceleration method according to claim 1, characterized in that, Upon obtaining the file to be transferred, determining the corresponding accelerated storage strategy based on the file attributes of the file to be transferred, and storing the file to be transferred based on the accelerated storage strategy, includes: Obtain the storage path of the file to be transferred, and determine the path depth of the storage path based on the number of levels in the storage path; If the path depth is greater than the preset depth, the file to be transmitted will be stored in the preset path; When generating the metadata of the file to be transferred, the storage path is saved into the metadata.

5. The NAS remote caching acceleration method according to claim 4, characterized in that, The method further includes: Receive a file read instruction, parse the read path of the file read instruction, and determine the path depth of the read path; If the path depth is greater than a preset depth, a virtual directory table for recording the path structure is obtained. Based on the virtual directory table, a virtual hierarchical view is generated and displayed, along with the metadata in the preset path and the files corresponding to the read path.

6. The NAS remote caching acceleration method according to claim 1, characterized in that, The preset threshold is determined according to the following formula: ; in, The preset base threshold, The number of files currently less than T(t-1) This represents the total number of files. For disk I / O utilization, CPU utilization .

7. The NAS remote caching acceleration method according to claim 6, characterized in that, When the storage medium is an HDD, the basic threshold is the physical sector size of the HDD; when the storage medium is an SSD, the basic threshold is the flash page size of the SSD.

8. The NAS remote caching acceleration method according to claim 1, characterized in that, The method further includes: Upon receiving a read instruction for the fragmented file, the file name of the fragmented file is searched in the index information; Obtain the target offset corresponding to the file name, and parse the fragment file from the concatenated file based on the target offset.

Citation Information

Patent Citations

  • Service management system, service management method, device and storage medium

    US20250063098A1

  • Multi-core storage processor assigning other cores to process requests of core-affined streams

    US9485310B1