Design method of hierarchical distribution data storage system
By designing a hierarchical distributed data storage system in an embedded system, using local persistent storage components for data cache, and data synchronization is achieved through the network file system, the problem of low file access performance in an embedded system is solved, and efficient and real-time data access is achieved.
Patent Information
- Application Number
- CN202411712727.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-04-18
AI Technical Summary
When the system scale and task complexity of the data storage system in existing embedded systems are expanded, the file access response performance is low, and it cannot meet the client node's needs for low-latency data access.
Design a hierarchical distributed data storage system, and optimize file access paths by configuring local persistent storage components on the client device.
It improves file access efficiency, reduces server load, meets the needs of embedded systems for real-time data access, and improves the overall performance of the system.
Smart Images

Figure CN119848012A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of embedded systems, and in particular relates to a hierarchically distributed data storage system design method. Background Art
[0002] With the continuous development of embedded technology, data sharing needs to be achieved between devices in an embedded system. Traditionally, a network file system with server and client nodes is built in the embedded system. The client node accesses the data on the remote server through the network. A file read operation involves opening the file, reading the file attributes, locating the file read position, accessing the file data and other sub-operations, involving multiple network communications, and in the system scale.
[0003] As the scale of the system increases and the complexity of the tasks increases, this data access mechanism has obvious shortcomings in terms of network file system response performance and system scale expansion:
[0004] As the complexity of tasks increases, the number of client nodes included in the system increases, resulting in an increase in server node load and a decrease in file access response efficiency. Although increasing network bandwidth and server communication / storage performance can solve this problem, the system architecture and economic benefits are poor;
[0005] As the functions and services carried in the system change, client nodes have an urgent need for low-latency data access. Traditional remote file system access methods are difficult to meet application requirements.
[0006] The above shortcomings lead to low operating efficiency of data storage systems in existing embedded systems, which cannot support efficient data sharing in complex environments with multiple devices, because it is necessary to design a hierarchically distributed data storage system to improve data access and sharing performance. Summary of the invention
[0007] In view of this, the present invention provides a hierarchically distributed data storage system design method, which can improve file access efficiency and ensure the real-time operation requirements of the embedded system.
[0008] The technical solution of the present invention:
[0009] A method for designing a hierarchically distributed data storage system, the system comprising a data server and a plurality of data clients, the server and the clients being interconnected via a network bus;
[0010] The client is configured with a local persistent storage component, which is used to implement local caching of data required by the client;
[0011] When the client performs a write operation, it first writes the data to the local storage component and sends the data change mark to the server in real time. After receiving the mark, the server sends the change mark to each client in real time. Then, the client's file system transmits the updated data to the server when the server is idle.
[0012] When a data demand client reads data, it first determines whether the data is in the cache of the local storage component.
[0013] If yes, the data is judged whether it has been updated according to the changed flag. If not, the local cache is read. If updated, the latest data is requested from the data server. The data server sends the updated data in real time according to the request or calls the updated data from other clients that update the data and sends it to the client that needs the data.
[0014] If not, the data-demanding client requests the data from the server. The server determines whether the required data is the latest based on the changed flag. If it is the latest, the required data is sent to the data-demanding client. If not, the updated data is called from other clients that updated the data and sent to the data-demanding client.
[0015] Furthermore, a network file system server-side software resides on the server, and the network file system server-side software receives and parses the client request instruction through the network bus to complete the client's data request.
[0016] Furthermore, a network file system client software resides on the client, and the network file system client software requests file data from the server through the network bus, and updates the storage component according to the obtained data.
[0017] Furthermore, the network file system client software and the network file system server software residing on the client and the server realize dynamic access and dynamic exit of each client through a software heartbeat mechanism.
[0018] Furthermore, after the system is powered on, the server, client device and network switching device in the system start running, and load and run the resident network file system server software and network file system client software to complete the system initialization. The specific process is:
[0019] After the server equipment is powered on and the large-capacity storage components and bus network communication components of the server are initialized, the network file system server software is loaded and run;
[0020] The network switching equipment is powered on, the bus communication network topology initialization and network switching configuration initialization are completed, and the data exchange channel is established;
[0021] Initializing the data client device, after completing the initialization of the storage component and the bus network communication component, loading and running the network file system client software;
[0022] The client device broadcasts a network file system mount request through a bus network periodically, and the request is sent to the server device via a network switching device;
[0023] After receiving the network file system mount request sent by the client, the server device updates the device mount list stored in the server, marks the client device as online, and sends the file storage list in the large-capacity storage component to the client;
[0024] After receiving the file storage list sent by the server, the client stores the file storage list in the local storage component.
[0025] Furthermore, the client periodically sends heartbeat information to the server.
[0026] Furthermore, each of the storage components stores a sub-data set of data in the server.
[0027] Furthermore, the client accesses the data of the storage component in the form of a general file system.
[0028] Furthermore, the server stores all file system data in the form of a general file system, including file attributes and file data; the server is configured to enable sharing of stored data through a network file system, and supports adding, deleting, querying and modifying file system data.
[0029] Furthermore, the client accesses the data of the server through a network file system.
[0030] Beneficial effects of the present invention:
[0031] The present invention introduces the design concept of hierarchical distribution into the network file system to construct a distributed storage system design scheme, which can be flexibly applied to devices with persistent storage. Each device in the system can efficiently access the storage space of the device and the storage space of a remote data server, and realize real-time data synchronization between the storage space data of the device and the remote data server through a distributed consistency mechanism. The present invention can improve file access efficiency and ensure the real-time operation requirements of the embedded system. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0033] Figure 1 Design method architecture diagram for hierarchical distributed data storage system;
[0034] Figure 2 Flowchart for system initialization;
[0035] Figure 3 Create flow charts for files in the system;
[0036] Figure 4 Read the flow chart for the files in the system;
[0037] Figure 5 Write a flow chart for the files in the system;
[0038] Figure 6 Offline flow chart for data client devices in the system;
[0039] Wherein: the small-capacity data storage component in the figure represents the local persistent storage component in the text. DETAILED DESCRIPTION
[0040] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0041] 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 the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.
[0042] 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 the present 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 the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein can be used to implement this device and / or practice this method.
[0043] 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 rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0044] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.
[0045] In one embodiment of the present invention, a method for designing a hierarchical distributed data storage system is provided. Figure 1-Figure 6 ,The system includes a data server and a plurality of data clients, and the server and the clients are interconnected through a network bus;
[0046] The client is configured with a local persistent storage component, which is used to implement local caching of data required by the client;
[0047] When the client performs a write operation, it first writes the data to the local storage component and sends the data change mark to the server in real time. After receiving the mark, the server sends the change mark to each client in real time. Then, the client's file system transmits the updated data to the server when the server is idle.
[0048] When a data demand client reads data, it first determines whether the data is in the cache of the local storage component.
[0049] If yes, the data is judged whether it has been updated according to the changed flag. If not, the local cache is read. If updated, the latest data is requested from the data server. The data server sends the updated data in real time according to the request or calls the updated data from other clients that update the data and sends it to the client that needs the data.
[0050] If not, the data-demanding client requests the data from the server. The server determines whether the required data is the latest based on the changed flag. If it is the latest, the required data is sent to the data-demanding client. If not, the updated data is called from other clients that updated the data and sent to the data-demanding client.
[0051] In this embodiment, a network file system server software resides on the server, and the network file system server software receives and parses the client request instruction through the network bus to complete the client's data request.
[0052] In this embodiment, a network file system client software resides on the client, and the network file system client software requests file data from the server through a network bus, and updates the storage component according to the obtained data.
[0053] In this embodiment, the network file system client software and the network file system server software residing on the client and the server implement dynamic access and dynamic exit of each client through a software heartbeat mechanism.
[0054] In this embodiment, after the system is powered on, the server, client device and network switching device in the system start running, and load and run the resident network file system server software and network file system client software to complete the system initialization. The specific process is as follows:
[0055] After the server equipment is powered on and the large-capacity storage components and bus network communication components of the server are initialized, the network file system server software is loaded and run;
[0056] The network switching equipment is powered on, the bus communication network topology initialization and network switching configuration initialization are completed, and the data exchange channel is established;
[0057] Initializing the data client device, after completing the initialization of the storage component and the bus network communication component, loading and running the network file system client software;
[0058] The client device broadcasts a network file system mount request through a bus network periodically, and the request is sent to the server device via a network switching device;
[0059] After receiving the network file system mount request sent by the client, the server device updates the device mount list stored in the server, marks the client device as online, and sends the file storage list in the large-capacity storage component to the client;
[0060] After receiving the file storage list sent by the server, the client stores the file storage list in the local storage component.
[0061] In this embodiment, the client periodically sends heartbeat information to the server.
[0062] In this embodiment, each of the storage components stores a sub-data set of data in the server.
[0063] In this embodiment, the client accesses the data of the storage component in the form of a general file system.
[0064] In this embodiment, the server stores all file system data in the form of a general file system, including file attributes and file data; the server is configured to be able to share stored data through a network file system and supports adding, deleting, querying and modifying file system data.
[0065] In this embodiment, the client accesses the data of the server through a network file system.
[0066] In this embodiment, in a distributed storage system composed of multiple data client devices, a data server device and a network switching device, a persistent storage component is added to the client node as a cache device of the data server on the data client, and data interaction is completed between the data server and the data client through a bus network. The network file system client software resides on the data client, and the network file system server software resides on the data server. The server software and the client software use maintenance management components to realize dynamic access and exit of the data client, and the consistency of the data stored in the data server and the cached data in the data client is realized through a distributed consistency component.
[0067] The present embodiment provides a method for designing a hierarchically distributed data storage system, which includes a data server device for storing system data and providing data services, a data client device for consuming data (including data reading, data writing, data deletion, etc.), and a network switching device for data exchange.
[0068] in:
[0069] Data server equipment: It consists of a large-capacity data storage component, a bus network communication component, a general computing component, and a network file system server software. The large-capacity data storage component completes the data storage in the system; the network communication component completes the bus communication between the data server device and the data client device; the general computing component is used to load and run the network file system server software, receive data client access requests through the bus network communication component, and complete access control for the large-capacity data storage component;
[0070] Data client device: It consists of a small-capacity data storage component, a bus network communication component, a general computing component, and a network file system client software. The small-capacity data storage component completes the data cache of the data client device; the network communication component completes the bus communication between the data client device and the data server device; the general computing component is used to load and run the network file system client software, send data access requests to the data server device through the bus network communication component, and complete the management and control of the small-capacity data storage component.
[0071] Network switching equipment: data exchange hub within the system, enabling network data exchange between data client devices and data server devices within the system.
[0072] This embodiment builds a hierarchical distributed storage system centered on a data server device in a distributed system. Data is stored hierarchically on data server devices and data client devices. Global data consistency is achieved through cache consistency and other technical solutions. The system architecture is as follows: Figure 1 The details of the present invention are as follows:
[0073] After the system is powered on, the data server equipment, data client equipment and network switching equipment in the system start running, and load and run the resident network file system server software and network file system client software to complete the system initialization. The process is as follows: Figure 2 As shown, the description is as follows:
[0074] 1) The data server device is powered on, and after initializing the large-capacity data storage components and bus network communication components in the device, the network file system server software is loaded and run;
[0075] 2) The network switching equipment is powered on, the bus communication network topology initialization and network switching configuration initialization are completed, and the data exchange channel is established;
[0076] 3) Initialization of the data client device: after the small-capacity data storage components and bus network communication components of the device are initialized, the network file system client software is loaded and run;
[0077] 4) The data client device broadcasts a network file system mount request through the bus network periodically, and the request is sent to the data server device via the network switching device;
[0078] 5) After receiving the network file system mount request sent by the data client, the data server device updates the device mount list stored in the data server device, marks the data client device as online, and sends the file storage list in the large-capacity storage component;
[0079] 6) The data client device receives the file storage list sent by the data server, indicating that the network file system is mounted successfully, and stores the file storage list in the small-capacity data storage component of the device;
[0080] 7) The data client device periodically sends heartbeat information to the data server device.
[0081] During system operation, when a data client device needs to perform a network file system creation operation, it first queries whether there is such a file in the cache of the small-capacity data storage component. If not, it sends a file creation request to the data server device, and then updates the file storage list of each data client device. The file creation operation process is as follows: Figure 3 As shown, the process is as follows:
[0082] 1) When the data client device needs to create a file, it searches the file storage list cached by the small-capacity data storage component of the device to find out whether the corresponding file exists. If it exists, it directly returns success; if it does not exist, it executes step 2);
[0083] 2) The data client device sends a file creation request to the data server device;
[0084] 3) After receiving the instruction, the data server device creates a new file in the large-capacity data storage component and updates the file storage list;
[0085] 4) The data server device sends a file storage list update instruction and an updated file storage list to each data client device in the system;
[0086] 5) After receiving the file storage list update instruction, each data client device updates the file storage list cached in the small-capacity data storage component of the device.
[0087] During system operation, when the data client device needs to perform a network file system read operation, it first queries whether there is data to be read in the cache of the small-capacity data storage component. If not, it reads the data from the data server device and caches it in the small-capacity storage component of the device. The file read operation process is as follows: Figure 4 As shown, the process is as follows:
[0088] 1) When the data client device needs to read data, it needs to perform a file opening operation first. At this time, it searches the file storage list cached by the small-capacity data storage component of the device to find out whether the corresponding file exists. If it does not exist, it returns that there is no such file and exits directly; if it exists, it executes step 2);
[0089] 2) Check the "dirty" data storage flag of the file. If the data flag is "dirty", it indicates that the data file cached by this device has been updated, and jump to step 4);
[0090] 3) Check whether there is a data cache of the file to be read from the small-capacity data storage component of the device, if yes, read the image from the device, if not, jump to step 4) to execute;
[0091] 4) The data client device does not have the latest image of the file to be read in the local cache, and sends a file read request to the data server device;
[0092] 5) After receiving the data read request, the data server device reads the file image from the large-capacity data storage component and records that the data client device has cached the data;
[0093] 6) After receiving the data, the data client device caches it in a small-capacity data storage component of the device.
[0094] During system operation, when a data client device needs to perform a network file system write operation, it first writes the data to the small-capacity data storage component of the device for cache. This data is asynchronously updated to the data server device. At the same time, the data server device sends a file "dirty" data flag to other data client devices that have cached "old" data, thereby achieving global data consistency. The file read operation process is as follows: Figure 5 As shown, the process is as follows:
[0095] 1) When the data client device needs to write data, it needs to perform a file opening operation first. At this time, it searches the file storage list cached by the small-capacity data storage component of the device to find out whether the corresponding file exists. If it does not exist, it returns that there is no such file and exits directly; if it exists, it executes step 2);
[0096] 2) The data to be written is updated to the small-capacity data storage component of the device for caching. The network file system client software on the data client device periodically checks the cache of the device. If there is new written data, a data write request is sent to the data server device;
[0097] 3) After receiving the data write request, the data server device updates the received data into the large-capacity data storage component and sends a write success message to the data client device;
[0098] 4) The data server device checks the data client devices that have cached "old" data in the cache record table maintained, and sends a file "dirty" data flag to these devices;
[0099] 5) After receiving the file "dirty" data flag update instruction, the data client device updates the data status of the file to "dirty" and sends an update completion command to the data server device.
[0100] During the operation of the system, there may be dynamic exits caused by data client device shutdown, etc. At this time, the data server device senses the exit of the corresponding data client device through periodic heartbeats, updates and maintains the online status of the data client device, and deletes the data cache list. Figure 6 As shown, the process is as follows:
[0101] 1) If the data server device fails to receive the periodic heartbeat of a client device for 5 consecutive cycles, it determines that the device is offline;
[0102] 2) The data server device updates the online status table of the data client device and deletes the device from the table;
[0103] 3) The data server device updates the data cache list of the data client device and deletes the data cache record corresponding to the device;
[0104] This embodiment constructs a data storage system, and the system composition includes:
[0105] Two data client devices, each containing a small 128GB storage component;
[0106] A data server device, which contains 6TB of large-capacity storage components
[0107] A network switching device that enables bus data exchange between client devices and server devices within the system.
[0108] In this data storage system, the client device accesses the data stored in the server device through the network file system. The 128GB storage space equipped on the two devices is used as the data cache space of the data server. All file reads and writes prioritize the local cache space. The consistency of global data in the file system is achieved through the data synchronization, consistency management and other components provided by the network file system.
[0109] The above is only a specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present disclosure should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A method for designing a hierarchically distributed data storage system, characterized in that: The system includes a data server and multiple data clients, and the server and the clients are interconnected through a network bus; The client is configured with a local persistent storage component, which is used to implement local caching of data required by the client; When the client performs a write operation, it first writes the data to the local storage component and sends the data change mark to the server in real time. After receiving the data, the server sends the change mark to each client in real time. The client's file system then transmits the updated data to the server when the server is idle; When a data demand client reads data, it first determines whether the data is in the cache of the local storage component. If yes, then determine whether the data has been updated based on the changed flag. If not, read the local cache. If updated, request the latest data from the data server. The data server sends the updated data in real time according to the request or calls the updated data from other clients that update the data and sends it to the client that needs the data; If not, the data-demanding client requests the data from the server. The server determines whether the required data is the latest based on the changed flag. If it is the latest, the required data is sent to the data-demanding client. If not, the updated data is called from other clients that updated the data and sent to the data-demanding client.
2. The hierarchical distributed data storage system design method according to claim 1, characterized in that: The server is resident with a network file system server-side software, which receives and analyzes the client request instruction through a network bus to complete the client's data request.
3. The hierarchical distributed data storage system design method according to claim 2, characterized in that: The client side has a network file system client software resident thereon. The network file system client software requests file data from the server side through the network bus and updates the storage component according to the obtained data.
4. The method for designing a hierarchical distributed data storage system according to claim 3, characterized in that: The network file system client software and network file system server software resident on the client and server realize dynamic access and dynamic exit of each client through a software heartbeat mechanism.
5. The method for designing a hierarchical distributed data storage system according to claim 4, characterized in that: After the system is powered on, the server, client device and network switching device in the system start running, and load and run the resident network file system server software and network file system client software to complete the system initialization. The specific process is as follows: After the server equipment is powered on and the large-capacity storage components and bus network communication components of the server are initialized, the network file system server software is loaded and run; The network switching equipment is powered on, the bus communication network topology initialization and network switching configuration initialization are completed, and the data exchange channel is established; Initializing the data client device, after completing the initialization of the storage component and the bus network communication component, loading and running the network file system client software; The client device broadcasts a network file system mount request through a bus network periodically, and the request is sent to the server device via a network switching device; After receiving the network file system mount request sent by the client, the server device updates the device mount list stored in the server, marks the client device as online, and sends the file storage list in the large-capacity storage component to the client; After receiving the file storage list sent by the server, the client stores the file storage list in the local storage component.
6. The method for designing a hierarchical distributed data storage system according to claim 5, characterized in that: The client periodically sends heartbeat information to the server.
7. The method for designing a hierarchical distributed data storage system according to claim 6, characterized in that: Each of the storage components stores a sub-data set of data in the server.
8. The method for designing a hierarchical distributed data storage system according to claim 7, characterized in that: The client accesses the data of the storage component in the form of a general file system.
9. The method for designing a hierarchical distributed data storage system according to claim 8, characterized in that: The server stores all file system data in the form of a general file system, including file attributes and file data; the server is configured to be able to share stored data through a network file system and supports adding, deleting, querying and modifying file system data.
10. The method for designing a hierarchical distributed data storage system according to claim 9, characterized in that: The client accesses the data of the server through a network file system.