A multi-level cache network file system management method

By combining multi-level cache and rsync algorithm, the read and write performance issues of the network file system in the airborne environment are solved, efficient file data transmission and cache consistency are achieved, and system performance is improved.

CN114443515BActive Publication Date: 2025-10-03XIAN AVIATION COMPUTING TECH RES INST OF AVIATION IND CORP OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111636706.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-29
Publication Date
2025-10-03
Estimated Expiration
2041-12-29

AI Technical Summary

Technical Problem

Existing network file systems have high read and write overhead when frequently accessing infrequently changed files in an airborne environment, cannot meet high performance requirements, and lack effective cache management.

Method used

Multi-level caching technology is used in combination with the rsync algorithm to reduce the number of synchronization interactions between the client and the server, and incremental transmission of file data is implemented on the client to ensure the correctness and consistency of the cache.

Benefits of technology

It improves the read and write performance of the airborne system, reduces the number of synchronous interactions, improves the transmission efficiency and consistency of file data, and meets the high performance requirements in the airborne environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114443515B_ABST
    Figure CN114443515B_ABST
Patent Text Reader

Abstract

The present invention provides a multi-level caching network file system management method, comprising: an application software requests a file from a client, and the client searches a local cache; if the client's local cache misses the file, the client reads the file from a server, obtains a time attribute of the last modification to the file, returns the file to the application software, and simultaneously saves the file and the time attribute of the last modification to the local cache. The present invention utilizes multi-level caching technology to reduce the number of synchronous interactions between the client and the server, thereby improving the read and write performance of the onboard system; and efficiently implements incremental transmission of cached file data between the server and the client through the rsync algorithm, thereby ensuring the correctness and consistency of the cached file data between the server and the client to a certain extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of computer system software, and in particular to a multi-level cache network file system management method. Background Art

[0002] With the application and development of network file systems in embedded devices, the scale of access nodes they provide has increased significantly. Network file systems based on the standard NFSv3 protocol typically lack cache management or employ only a single-level cache management approach to improve client read and write performance. This approach, for airborne environments where infrequently modified files are frequently accessed, still incurs significant read and write overhead for application software, failing to meet the high-performance requirements of the airborne sector. Therefore, multi-level cache management technology is needed to improve network file system performance. Summary of the Invention

[0003] In light of this, embodiments of the present disclosure provide a multi-level caching network file system management method that at least partially addresses the problems existing in the prior art. By utilizing multi-level caching technology, the method reduces the number of synchronization interactions between the client and the server, improving the read and write performance of the onboard system. Furthermore, based on the rsync algorithm, the method efficiently implements incremental transfer of cached file data between the server and the client, ensuring the correctness and consistency of the cached file data on both the server and the client to a certain extent.

[0004] In order to achieve the above object, the present invention provides the following technical solutions:

[0005] A multi-level cache network file system management method, applied to a client, comprising:

[0006] Step 1: The application software requests the file from the client, and the client searches the local cache;

[0007] Step 2: If the client's local cache does not match the file, the client reads the file from the server and obtains the time attribute of the last modification of the file. The client returns the file to the application software and saves the file and the time attribute of the last modification of the file to the local cache.

[0008] If the client's local cache hits, the client obtains the time attribute of the last modification of the file from the server and compares it with the time attribute of the last modification of the file in the client's cache record table. When the comparison results are consistent, the file in the local cache is returned to the application software; when the comparison results are inconsistent, the client reads the file from the server and obtains the time attribute of the last modification of the file, returns the file to the application software, and saves the file and the time attribute of the last modification of the file to the local cache.

[0009] Furthermore, in step 2, the execution strategy when the client's local cache misses includes the following steps:

[0010] Step 2.1: The application software requests a file from the client. The client reads the file from the server and obtains the last modification time of the file from the server using the stat function in the NFSv3 protocol.

[0011] Step 2.2: The client stores the obtained file in the client's memory cache and returns the read content to the application software;

[0012] Step 2.3: The client writes the obtained file into the client's local file system cache;

[0013] Step 2.4: The client records the acquired time attribute of the last modification of the file in the cache record table of the local file system cache area.

[0014] Furthermore, in step 2, the execution strategy when the client's local cache hits includes the following steps:

[0015] Step 3.1: Obtain the last modification time of the file from the server using the stat function in the NFSv3 protocol;

[0016] Step 3.2: The client compares the last modification time attribute of the file returned by the server with the last modification time attribute of the file in the cache record table of the local file system cache area;

[0017] Step 3.3: If the last modification time attribute of the file is consistent, the client directly reads the file from the local file system cache area and returns it to the application software.

[0018] Furthermore, in step 3.3: if the last modification time attribute of the file is inconsistent, the server and the client synchronize the file. After completion, the client returns the file to the application software and writes the file into the local file system cache area.

[0019] Furthermore, in step 3.3: if the last modification time attribute of the file is inconsistent, it also includes: obtaining the last modification time attribute of the file from the server based on the stat function in the NFSv3 protocol, and updating the last modification time attribute of the file in the cache record table of the local file system cache area.

[0020] Furthermore, the rsync algorithm is used to synchronize files between the server and the client.

[0021] Because infrequently modified files require frequent access in airborne environments, and network file systems based on the NFSv3 protocol typically lack cache management or employ only a single-level cache, the read and write overhead of application software remains significant. Therefore, this paper proposes a multi-level cache network file system management method to improve application read and write performance. This method is characterized by comprising a client and a server, with cache management applied to the client. Its beneficial effects include:

[0022] (1) Using multi-level caching technology to reduce the number of synchronous interactions between the client and the server, especially for frequently accessed but unchanged files, directly reading from the local file system can improve the system's read and write performance;

[0023] (2) Based on the rsync algorithm, the incremental transmission of cached file data between the server and the client is realized efficiently, which ensures the correctness and consistency of the cached file data between the server and the client to a certain extent, and also improves the efficiency. Ultimately, the network file system can meet the requirements of the airborne field in terms of supporting high performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0025] Figure 1 A schematic diagram of the structure of a multi-level cache network file system management method of the present invention;

[0026] Figure 2 This is a diagram of the composition of the local no-cache method in the present invention;

[0027] Figure 3 This is a diagram of the composition of the method for maintaining local cache unchanged in the present invention;

[0028] Figure 4 A diagram showing the composition of a method for changing the local cache in the present invention;

[0029] Figure 5 This is a schematic diagram of the structure of the method in Example 1 of the present invention;

[0030] Figure 6 This is a schematic diagram of the structure of the method in Example 2 of the present invention. DETAILED DESCRIPTION

[0031] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0032] The following describes the embodiments of the present disclosure through specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.

[0033] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein can be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on this disclosure, it should be understood by those skilled in the art that an aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects described herein can be used to implement an apparatus and / or practice a method. In addition, other structures and / or functionalities other than one or more of the aspects described herein can be used to implement this apparatus and / or practice this method.

[0034] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The illustrations only show components related to the present disclosure and are not drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component can be changed at will, and the component layout type may also be more complicated.

[0035] Additionally, in the following description, specific details are provided to provide a thorough understanding of the examples. However, one skilled in the art will appreciate that the aspects described can be practiced without these specific details.

[0036] like Figure 1 As shown, the embodiment of the present disclosure provides a multi-level cache network file system management method, which consists of a client and a server, and cache management is applied to the client. The method includes:

[0037] Step 1: The application software requests the file from the client, and the client searches the local cache;

[0038] Step 2: If the local cache does not hit, it means that the file is loaded and read for the first time. In this case, the client does not have a local file cache. The specific processing includes the following steps: Figure 2As shown:

[0039] Step 2.1: The application software requests a file from the client. The client reads the file from the server and obtains the last modification time of the file from the server using the stat function in the NFSv3 protocol.

[0040] Step 2.2: The client stores the obtained file in the client's memory cache and returns the read content to the application software;

[0041] Step 2.3: The client writes the obtained file to the client's local file system cache.

[0042] Step 2.4: The client records the acquired time attribute of the last modification of the file in the cache record table of the local file system cache area.

[0043] If the local cache hits, in this case the client has a local file cache, the specific processing includes the following steps, such as Figure 3 As shown:

[0044] Step 3.1: Obtain the last modification time of the file from the server using the stat function in the NFSv3 protocol;

[0045] Step 3.2: The client compares the last modification time attribute of the file returned by the server with the last modification time attribute of the file in the cache record table of the local file system cache area;

[0046] Step 3.3: If the last modification time attribute of the file is consistent, the client directly reads the file from the local file system cache area and returns it to the application software.

[0047] If the last modification time attributes of the file are inconsistent, the server and the client will synchronize the file. After completion, the client will return the file to the application software and write the file into the local file system cache area.

[0048] If the last modification time of the file is inconsistent, it means that the file version has changed, such as Figure 4 As shown, the rsync algorithm is used to efficiently synchronize files between the server and the client. Based on the stat function in the NFSv3 protocol, the time attribute of the last modification of the file is obtained from the server, and the last modification time of the file in the client's local cache record table is updated.

[0049] The present invention is described in further detail below with reference to the accompanying drawings and embodiments.

[0050] Example 1

[0051] (1) Typical operating environment

[0052] A distributed avionics platform includes three physical nodes: module 1, module 2, and module 3. The underlying network uses FC communication, the local file system uses FAT32, and a partitioned operating system is deployed on each physical node, which has a debugging serial port.

[0053] Module 1 and Module 2 deploy the network file system client, and Module 3 deploys the network file system server.

[0054] (2) Configuration and generation and loading of configuration data

[0055] The node ID of module 1 is configured as 1, the role is CLNT, and the local cache directory is under the local file system B:\\CLNT1\\.

[0056] The node ID of module 2 is configured as 2, the role is CLNT, and the local cache directory is in the local file system B:\\CLNT2\\.

[0057] Module 3 configures node ID 3 and the role is SERV.

[0058] Configuration data generation and loading method: Generate a set of configuration data nfscfg.dat for the three nodes and load it into the local file system A:\\ of module 1, module 2, and module 3.

[0059] (3) Application effect

[0060] a. Power on modules 1, 2, and 3. Module 1 passes node ID 1 through the initialization interface, module 2 passes node ID 2 through the initialization interface, and module 3 passes node ID 3 through the initialization interface. Each module then loads A:\\nfscfg.dat from its local file system and completes initialization.

[0061] b. Module 2 loads the test program and reads a file named test.txt, the content of which is "TESTOK!" Figure 5 As shown in the figure. Module 2 does not have a test.txt file in the cache management directory B:\\CLNT2\\ in the local file system. Therefore, the client directly accesses the server to read test.txt and obtains the last modification time of test.txt from the server. The read content is returned to the application and written to the local file system cache management directory B:\\CLNT2\\. The last modification time of the file is recorded in the local cache record table. The client serial port prints the following information:

[0062] CLNT READ test.txt FROM SERVER

[0063] CLNT READ DATA:TESTOK,CNT:8

[0064] test.txt HAS BEEN SAVED AT B:\\CLNT2\\IN LOCAL FS

[0065] Example 2

[0066] (1) Typical operating environment

[0067] A distributed avionics platform includes three physical nodes: module 1, module 2, and module 3. The underlying network uses FC communication, the local file system uses FAT32, and a partitioned operating system is deployed on each physical node, which has a debugging serial port.

[0068] Module 1 and Module 2 deploy the network file system client, and Module 3 deploys the network file system server.

[0069] (2) Configuration and generation and loading of configuration data

[0070] The node ID of module 1 is configured as 1, the role is CLNT, and the local cache directory is under the local file system B:\\CLNT1\\.

[0071] The node ID of module 2 is configured as 2, the role is CLNT, and the local cache directory is in the local file system B:\\CLNT2\\.

[0072] Module 3 configures node ID 3 and the role is SERV.

[0073] Configuration data generation and loading method: Generate a set of configuration data nfscfg.dat for the three nodes and load it into the local file system A:\\ of module 1, module 2, and module 3.

[0074] (3) Application effect

[0075] a. Power on modules 1, 2, and 3. Module 1 passes node ID 1 through the initialization interface, module 2 passes node ID 2 through the initialization interface, and module 3 passes node ID 3 through the initialization interface. Each module then loads A:\\nfscfg.dat from its local file system and completes initialization.

[0076] b. Module 1 loads the test program and reads a file named test.txt with the content "TESTOK!" Figure 6As shown in the figure, the test.txt file is cached in the cache management directory B:\\CLNT1\\ in the local file system of module 1. Therefore, the client accesses the server to obtain the last modification time of test.txt. The last modification time of the file is the same as that obtained in the client's local cache record table. The client directly reads test.txt from the cache management directory B:\\CLNT1\\ in the local file system. The client serial port prints the following information:

[0077] CLNT READ test.txt FROM LOCAL FS

[0078] CLNT READ DATA:TESTOK,CNT:8

[0079] Example 3

[0080] (1) Typical operating environment

[0081] A distributed avionics platform includes three physical nodes: module 1, module 2, and module 3. The underlying network uses FC communication, the local file system uses FAT32, and a partitioned operating system is deployed on each physical node, which has a debugging serial port.

[0082] Module 1 and Module 2 deploy the network file system client, and Module 3 deploys the network file system server.

[0083] (2) Configuration and generation and loading of configuration data

[0084] The node ID of module 1 is configured as 1, the role is CLNT, and the local cache directory is under the local file system B:\\CLNT1\\.

[0085] The node ID of module 2 is configured as 2, the role is CLNT, and the local cache directory is in the local file system B:\\CLNT2\\.

[0086] Module 3 configures node ID 3 and role SERV.

[0087] Configuration data generation and loading method: Generate a copy of configuration data nfscfg.dat for the three nodes and load it into the local file system A:\\ of module 1, module 2, and module 3.

[0088] (3) Application effect

[0089] a. Power on modules 1, 2, and 3. Module 1 passes node ID 1 through the initialization interface, module 2 passes node ID 2 through the initialization interface, and module 3 passes node ID 3 through the initialization interface. Each module then loads A:\\nfscfg.dat from its local file system and completes initialization.

[0090] b. Module 1 loads the test program and reads a file named test.txt with the content "TESTOK!". The test.txt file is cached in the cache management directory B:\\CLNT1\\ in the local file system of Module 1. Therefore, the client accesses the server to obtain the last modification time of test.txt. The last modification time of the file is different from the last modification time of the file obtained in the client's local cache record table, indicating that the file version has changed. The rsync algorithm is then used to efficiently synchronize the server and client files. After completion, the client returns the file to the application and writes it to the local file system cache management directory B:\\CLNT2\\. The last modification time of the file is recorded in the local cache record table. The client serial port prints the following information:

[0091] CLNT READ test.txt FROM SERVER

[0092] CLNT READ DATA:TESTOK,CNT:8

[0093] test.txt HAS BEEN SAVED AT B:\\CLNT2\\IN LOCAL FS

[0094] The above description is merely a specific embodiment of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this disclosure should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be based on the scope of protection of the claims.

Claims

1. A multi-level cache network file system management method, applied to a client, characterized in that: The method comprises: Step 1: The application software requests the file from the client, and the client searches the local cache; Step 2: If the client's local cache does not match the file, the client reads the file from the server and obtains the time attribute of the last modification of the file. The client returns the file to the application software and saves the file and the time attribute of the last modification of the file to the local cache. If the client's local cache hits, the client obtains the time attribute of the last modification of the file from the server and compares it with the time attribute of the last modification of the file in the client's cache record table. If the comparison results are consistent, the file in the local cache is returned to the application software; if the comparison results are inconsistent, the client reads the file from the server and obtains the time attribute of the last modification of the file, returns the file to the application software, and saves the file and the time attribute of the last modification of the file to the local cache. In step 2, the execution strategy when the client's local cache misses includes the following steps: Step 2.1: The application software requests a file from the client. The client reads the file from the server and obtains the last modification time of the file from the server using the stat function in the NFSv3 protocol. Step 2.2: The client stores the obtained file in the client's memory cache and returns the read content to the application software; Step 2.3: The client writes the obtained file into the client's local file system cache; Step 2.4: The client records the acquired time attribute of the last modification of the file in the cache record table of the local file system cache area; In step 2, the execution strategy when the client's local cache hits includes the following steps: Step 3.1: Obtain the last modification time of the file from the server using the stat function in the NFSv3 protocol; Step 3.2: The client compares the last modification time attribute of the file returned by the server with the last modification time attribute of the file in the cache record table of the local file system cache area; Step 3.3: If the last modification time attribute of the file is consistent, the client directly reads the file from the local file system cache and returns it to the application software; In step 3.3: if the last modification time attributes of the file are inconsistent, the server and the client synchronize the file, and after completion, the client returns the file to the application software and writes the file to the local file system cache area; In the step 3.3: if the last modification time attribute of the file is inconsistent, it also includes: obtaining the last modification time attribute of the file from the server based on the stat function in the NFSv3 protocol, and updating the last modification time attribute of the file in the cache record table of the local file system cache area.

2. The multi-level cache network file system management method according to claim 1, characterized in that: The rsync algorithm is used to synchronize files between the server and the client.

Citation Information

Patent Citations

  • Webview rapid loading method, display terminal and computer readable storage medium

    CN110377360A