Information loading method, device, electronic device and storage medium

By loading the target directory to a server with lower load in the distributed file system, it avoids migrating and splitting loaded directory branches, solves the problem of reduced access speed and delayed data update caused by excessive load, and achieves efficient load balancing. Effect.

CN113282539BActive Publication Date: 2024-09-06BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110526403.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-14
Publication Date
2024-09-06
Estimated Expiration
2041-05-14

AI Technical Summary

Technical Problem

When the existing distributed file system loads the directory, the access speed is reduced due to excessive load, the data update is delayed during the migration process, and the migration consumes the performance of the metadata server and affects the read and write performance.

Method used

By receiving access requests from the distributed file system, it is determined that when the current server has not loaded the target directory, obtain a server with low load from multiple servers, load the access cache information of the target directory, and avoid migrating and splitting the loaded directory branches. Achieve load balancing.

Benefits of technology

It improves the access speed of the distributed file system, reduces the data update delay, improves the read and write performance of the server, and achieves efficient load balancing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113282539B
    Figure CN113282539B
Patent Text Reader

Abstract

The present disclosure relates to an information loading method, device, electronic device and storage medium, and belongs to the field of information processing technology. The information loading method includes receiving an access request from a requesting party for a target directory in a distributed file system; wherein the target directory is any directory in the file storage directory tree corresponding to the distributed file system; in response to the access request, when it is determined that the target directory is not loaded in the current server, obtaining a first server with a low current load from multiple servers; loading the access cache information corresponding to the target directory in the first server, so that the requesting party can access the target directory according to the access cache information. The information loading method, device, electronic device and storage medium provided by the present disclosure are adopted to at least solve the problem in the related technology that the cached directory information needs to be migrated, resulting in the access speed of the distributed file system being affected and the data update being delayed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of information processing technology, and in particular to an information loading method, device, electronic device and storage medium. Background Art

[0002] A distributed file system (DFS) refers to a file system that manages physical storage resources that are not necessarily directly connected to local nodes, but are connected to nodes through a computer network; or a complete hierarchical file system formed by combining several different logical disk partitions or volumes. When accessing a file in a directory in a distributed file system, it is necessary to load the directory to be accessed in the metadata server (MDS) to achieve access to the directory or the files in the directory.

[0003] The existing directory loading method is mainly to fixedly assign different levels of directory trees to different metadata servers. When more and more directories are loaded in a certain layer, the load of the MDS storing the directories at this layer will become larger and larger. If it exceeds a certain load, manual intervention is required to migrate one of the directories and its directory branches and files to the new MDS.

[0004] In this way, since migration consumes a lot of the read and write performance of the metadata server, the access speed of the distributed file system will be greatly affected during the migration process. In addition, since some intermediate states cannot update data during migration, data updates need to wait for the migration to complete, which will cause data updates in the distributed file system to be delayed. Summary of the invention

[0005] The present disclosure provides an information loading method, device, electronic device and storage medium to at least solve the problem in the related art that cached directory information needs to be migrated, resulting in the access speed of the distributed file system being affected and data update being delayed. The technical solution of the present disclosure is as follows:

[0006] According to a first aspect of an embodiment of the present disclosure, there is provided an information loading method, which may include:

[0007] Receive a request from a requesting party for accessing a target directory in a distributed file system; wherein the target directory is any directory in a file storage directory tree corresponding to the distributed file system;

[0008] In response to the access request, when it is determined that the target directory is not loaded in any current server, a first server with a low current load is obtained from multiple servers; wherein the server is used to store access cache information, and the access cache information is information required for accessing files and their corresponding directories in the distributed file system;

[0009] The access cache information corresponding to the target directory is loaded into the first server, so that the requesting party accesses the target directory according to the access cache information.

[0010] In one of the embodiments, when the target directory is any directory other than the root directory in the file storage directory tree, before obtaining a first server with a low current load from multiple servers, the method may further include:

[0011] Determine at least one associated directory associated with the target directory; wherein the associated directory is a parent directory or a higher directory of the target directory;

[0012] Traversing the at least one associated directory, and when it is determined that the associated directory is not loaded in any current server, obtaining a second server with a low current load from the multiple servers;

[0013] The access cache information corresponding to the associated directory is loaded in the second server.

[0014] Based on this, in one embodiment, after loading the access cache information corresponding to the target directory in the first server, the method may further include:

[0015] updating a directory relationship table corresponding to the target directory in the first server, and updating a directory relationship table corresponding to the associated directory in the second server;

[0016] The directory relationship table is used to track a server loaded with a first directory, where the first directory is a parent directory of a directory corresponding to the target relationship table.

[0017] In addition, in one of the embodiments, after loading the access cache information corresponding to the target directory in the first server, the method further includes:

[0018] When the target server is restarted, releasing all directories loaded in the target server, including the second directory; wherein the target server is any server among the multiple servers, and the second directory includes the directory being accessed;

[0019] When the target server is restarted, the second directory is reloaded in the target server.

[0020] In one of the embodiments, the access cache information may include metadata of the target directory.

[0021] In one of the embodiments, when the access request is an access request for a target file in the target directory, the access cache information may include metadata of the target directory and cache data of the target file.

[0022] According to a second aspect of an embodiment of the present disclosure, there is provided an information loading device, which may include:

[0023] A first receiving module is configured to execute and receive a request from a requesting party for accessing a target directory in a distributed file system; wherein the target directory is any directory in a file storage directory tree corresponding to the distributed file system;

[0024] A first acquisition module is configured to execute, in response to the access request, acquiring a first server with a low current load from multiple servers when it is determined that the target directory is not loaded in any current server; wherein the server is used to store access cache information, and the access cache information is the access cache information required when accessing files and their corresponding directories in the distributed file system;

[0025] The first loading module is configured to execute loading of access cache information corresponding to the target directory in the first server, so that the requesting party accesses the target directory according to the access cache information.

[0026] In one of the embodiments, when the target directory is any directory other than the root directory in the file storage directory tree, the device may further include:

[0027] an association determination module, configured to determine at least one associated directory associated with the target directory before acquiring a first server with a low current load from a plurality of servers; wherein the associated directory is a parent directory or a directory above the target directory;

[0028] A second acquisition module is configured to perform traversal of the at least one associated directory, and when it is determined that the associated directory is not loaded in any current server, acquire a second server with a low current load from the multiple servers;

[0029] The first loading module is configured to execute loading of access cache information corresponding to the associated directory in the second server.

[0030] Based on this, in one embodiment, the device may further include:

[0031] a relationship table updating module, configured to update a directory relationship table corresponding to the target directory in the first server after loading the access cache information corresponding to the target directory in the first server, and to update a directory relationship table corresponding to the associated directory in the second server;

[0032] The directory relationship table is used to track a server loaded with a first directory, where the first directory is a parent directory of a directory corresponding to the target relationship table.

[0033] In addition, in one embodiment, the device may further include:

[0034] a directory release module, configured to release all directories loaded in the target server including the second directory after loading the access cache information corresponding to the target directory in the first server, when the target server is restarted; wherein the target server is any server among the multiple servers, and the second directory includes the directory being accessed;

[0035] The reloading module is configured to reload the second directory in the target server when the target server is restarted.

[0036] In one of the embodiments, the access cache information may include metadata of the target directory.

[0037] In one of the embodiments, when the access request is an access request for a target file in the target directory, the access cache information may include metadata of the target directory and cache data of the target file.

[0038] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, which may include:

[0039] processor;

[0040] a memory for storing instructions executable by the processor;

[0041] The processor is configured to execute the instructions to implement the information loading method as shown in any one of the embodiments of the first aspect.

[0042] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an information loading device, the information loading device is enabled to implement the information loading method as shown in any one of the embodiments of the first aspect.

[0043] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, which includes a computer program stored in a computer-readable storage medium, and at least one processor of a device reads and executes the computer program from the computer-readable storage medium, so that the device executes the information loading method shown in any one of the embodiments of the first aspect.

[0044] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:

[0045] The disclosed embodiment loads information in units of directories, and loads the newly added directory to be loaded, that is, the target directory, into the first server with a lower current load. Since only the target directory is loaded, it has nothing to do with the loaded directory branches. Moreover, since the directory is loaded to the first server with a relatively lower current load each time, there is no need to split and migrate the loaded directory branches, and the read and write performance of the server will not be affected, thereby improving the access speed of the distributed file system, reducing the delay in data updating, and achieving the effect of efficient load balancing.

[0046] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0048] Figure 1 is a schematic diagram of an application scenario of existing directory loading according to an exemplary embodiment;

[0049] Figure 2 is a flow chart of an information loading method according to an exemplary embodiment;

[0050] Figure 3 is a flow chart showing another information loading method according to an exemplary embodiment;

[0051] Figure 4 is a schematic diagram of an application scenario of directory loading according to an exemplary embodiment;

[0052] Figure 5 is a schematic diagram of an application scenario of adding a new directory loading according to an exemplary embodiment;

[0053] Figure 6 is a structural block diagram of an information loading device according to an exemplary embodiment;

[0054] Figure 7 The present invention is a structural block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0055] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0056] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0057] The information loading method provided by the present disclosure can be applied to the application scenario of accessing a distributed file system. Specifically, when the requesting party accesses any directory or file under a directory in a distributed file system, the directory to be accessed needs to be loaded through the metadata server. At present, the main way of loading directories is to fixedly assign different levels of directory trees to different metadata servers, such as Figure 1 As shown, the root directory 111 (root) is loaded on the first server 11, and two subdirectories (Fragments) of the root directory, such as the first subdirectory 112 and the second subdirectory 121, and their corresponding directory branches are used as two subtrees (subtrees), wherein the first subtree 110 corresponding to the first subdirectory 112 is statically configured on the first server 11, and the second subtree 120 corresponding to the second subdirectory 121 is statically configured on the second server 12. As the number of subdirectories in the second subtree 120 continues to increase, the load of the second server 12 becomes larger and larger, and a third server 13 needs to be added, and a subdirectory of the second subtree 120, such as the third subdirectory 131 and its corresponding directory branch are manually configured as a new subtree, that is, the third subtree 130, to the third server 13. During the configuration process, all subdirectories and files under the third subdirectory 131 cached in the second server 12 need to be migrated from the second server 12 to the third server 13. Since the data migration process consumes a lot of metadata server performance, the read and write performance of the distributed file system will be greatly affected during this process. In addition, the data cannot be updated in certain intermediate states of the system during migration, resulting in data update delays.

[0058] In response to the above problems, an embodiment of the present disclosure provides an information loading method, namely, receiving an access request from a requesting party for a target directory in a distributed file system; in response to the access request, when it is determined that the target directory is a directory that is not loaded in the current server, obtaining a first server with a low current load from multiple servers; and loading access cache information corresponding to the target directory in the first server, so that the requesting party accesses the target directory according to the access cache information.

[0059] In this way, on the one hand, since only the target directory is loaded and the loaded directory branch corresponding to the target directory is irrelevant, there is no need to migrate the entire directory subtree corresponding to the target directory; on the other hand, since the directory is loaded to the first server with the lowest current load each time, there is no need to split and migrate the loaded directory branch. In this way, since the migration of old directories will not occur, the read and write performance of the server will not be affected, thereby improving the access speed of the distributed file system, reducing the delay of data update, and achieving the effect of efficient load balancing.

[0060] According to the above application scenarios, the following Figure 2-Figure 5 The information loading method provided in the embodiment of the present disclosure is described in detail. The information loading method can be executed by a service device of a distributed file system.

[0061] Figure 2 The figure is a flow chart of an information loading method according to an exemplary embodiment.

[0062] like Figure 2 As shown, the information loading method may specifically include the following steps:

[0063] First, in step 210, an access request from a requesting party for a target directory in a distributed file system is received.

[0064] Next, in step 220, in response to the access request, if it is determined that the target directory is not loaded in any current server, a first server with a low current load is obtained from the multiple servers.

[0065] Then, in step 230, access cache information corresponding to the target directory is loaded into the first server, so that the requesting party can access the target directory according to the access cache information.

[0066] Therefore, by loading information in units of directories, the newly added directory that needs to be loaded, that is, the target directory, is loaded into the first server with a lower current load. Since only the target directory is loaded, it has nothing to do with the loaded directory branches. Moreover, since the directory is loaded to the first server with a relatively low current load each time, there is no need to split and migrate the loaded directory branches, and the read and write performance of the server will not be affected, thereby improving the access speed of the distributed file system, reducing the delay in data updates, and achieving the effect of efficient load balancing.

[0067] The above steps are described in detail below:

[0068] First, involving step 210, the distributed file system in the embodiment of the present disclosure can provide a logical tree file system structure for resources distributed at any location on the network, that is, the distributed file system corresponds to a file storage directory tree, and corresponding file data can be stored under any directory node corresponding to the file storage directory tree.

[0069] Here, the target directory can be any directory in the file storage directory tree corresponding to the distributed file system. The target directory can be the root directory in the file storage directory tree, or a directory at another level in the file storage directory tree except the root directory. For example, in the directory path a / b / c, the target directory can be the root directory, i.e., directory a, or a subdirectory of the root directory, i.e., directory b, or a subdirectory of directory b, i.e., directory c.

[0070] In addition, the requester may be any client that has the right to access the distributed file system. For example, when the requester needs to access a target directory or a file under the target directory in the distributed file system, the requester may initiate an access request to the target directory.

[0071] Secondly, in step 220, the server can be used to store access cache information, which can be information required for accessing files and their corresponding directories in the distributed file system, such as a metadata server for caching metadata of a directory. Multiple servers can be set here, and the load of each server can be dynamically changed. Among them, the first server can be the server with the lowest current load among the multiple servers set by the system, or the server with a current load lower than a preset threshold.

[0072] Exemplarily, after receiving the access request sent by the requester, it can be first determined whether the target directory to be accessed is a directory loaded in any server among all the current servers. If all servers have not loaded the target directory, the first server with the lowest current load can be obtained from all the set servers to load the target directory to the first server.

[0073] Finally, in step 230, after obtaining the first server with a low current load, the access cache information corresponding to the target directory can be loaded to the first server, thereby making full use of the load resources of each server and achieving a load balancing effect between the servers.

[0074] In the disclosed embodiment, once a directory is loaded into a metadata server, the directory can be bound to the metadata server, and files accessed under the directory can be loaded into the metadata server until the directory is released from the cache of the metadata server. However, when loading subdirectories under the directory, it is necessary to reselect a metadata server, and like the directory, select a metadata server with a lower load for loading.

[0075] In an optional implementation, the access cache information may include metadata of the target directory.

[0076] Exemplarily, when the requester only accesses the target directory in the distributed file system, the corresponding access cache information loaded into the first server may include metadata corresponding to the target directory. Metadata, also known as intermediary data or relay data, is data about data, mainly information describing data properties, used to support functions such as indicating storage location, historical data, resource search, and file records. Metadata is an electronic directory. In order to achieve the purpose of compiling a directory, it is necessary to describe and collect the content or characteristics of the data, thereby achieving the purpose of assisting data retrieval.

[0077] In this way, by loading the metadata of the target directory in a server with a relatively low load, the requesting party can access the target directory or files under the target directory based on the metadata of the target directory.

[0078] In another optional implementation, when the access request is an access request for a target file in a target directory, the access cache information may include metadata of the target directory and cache data of the target file.

[0079] Exemplarily, when the requesting party accesses a target file in a target directory in a distributed file system, the corresponding access cache information loaded into the first server may include metadata corresponding to the target directory and cache data corresponding to the target file.

[0080] In this way, by loading the metadata of the target directory and the cache data of the target file, the requesting party can access the target file based on the metadata of the target directory and the cache data of the target file.

[0081] In addition, in an optional implementation manner, after step 230, the above-mentioned information loading method may further include:

[0082] When the target server is restarted, all directories loaded in the target server, including the second directory, are released; wherein the target server is any server among the multiple servers, and the second directory includes the directory being accessed;

[0083] When the target server is restarted, the second directory is reloaded in the target server.

[0084] Exemplarily, the binding relationship between the directory and the metadata server is dynamic, and the binding relationship is stored in the memory of the metadata server. Once a metadata server is restarted, the directory cached in the restarted metadata server is released, and the binding relationship is also released. In addition to the directory being accessed in the disk log, the directory loaded in the restarted metadata server, that is, the second directory, included in its corresponding directory tree will be reloaded after the metadata server is started. Other directories will be loaded when they are needed next time, and new binding relationships will be determined based on the load during loading.

[0085] In this way, by dynamically binding the directory and the server, the server load can be made more flexible, thereby improving the flexibility of the server load while ensuring that the distributed file system can be accessed normally.

[0086] In addition, in addition to the above steps 210-230, in a possible embodiment, Figure 3 As shown, before obtaining the first server with a low current load from multiple servers in step 220, the information loading method provided by the embodiment of the present disclosure may further include: steps 2401-2403, and accordingly, step 220 corresponds to step 2201, which is specifically as follows:

[0087] Step 210: Receive an access request from a requesting party for a target directory in a distributed file system.

[0088] Step 2401: In response to an access request, when it is determined that the target directory is not loaded in any current server, determine at least one associated directory associated with the target directory.

[0089] Here, when the target directory is any directory other than the root directory in the file storage directory tree, the target directory may be associated with at least one associated directory, wherein the associated directory is the parent or higher directory of the target directory, for example, the associated directory may be the upper directory of the target directory, i.e., the parent directory, or a higher directory, i.e., the parent or higher directory.

[0090] In a specific example, for a directory path a / b / c, if the target directory is the c directory, its associated directories may include the a directory and the b directory.

[0091] Step 2402: traverse at least one associated directory, and when it is determined that the associated directory is not loaded in any current server, obtain a second server with a low current load from multiple servers.

[0092] Here, the second server may be a server with the lowest current load among multiple servers set by the system, or a server with a current load lower than a preset threshold. Since the time for judging the load is different, the second server may be a server different from the first server. Of course, the second server may also be the same server as the first server, which may be determined according to the load of each server at different judgment times.

[0093] In a specific example, for directory path a / b / c, if the target directory is directory c, directory a can be judged first to determine whether any of all current servers has directory a loaded. If so, directory b can be judged. If not, a server with the lowest current load is obtained from multiple servers, such as server a, and the access cache information corresponding to directory a is loaded in server a. Then, directory b is judged to determine whether any of all current servers has directory b loaded. If so, directory c can be judged. If not, a server with the lowest current load is obtained from multiple servers, such as server b, and the access cache information corresponding to directory b is loaded in server b. Finally, directory c is judged again, which will not be repeated here.

[0094] Step 2403: Load access cache information corresponding to the associated directory in the second server.

[0095] Here, the access cache information may include metadata, that is, metadata corresponding to the associated directory is loaded in the second server.

[0096] Step 2201, obtaining a first server with a low current load from multiple servers.

[0097] Step 230: Load access cache information corresponding to the target directory in the first server, so that the requesting party can access the target directory according to the access cache information.

[0098] Based on this, in an optional implementation manner, after step 230, the method further includes:

[0099] Updating the directory relationship table corresponding to the target directory in the first server, and updating the directory relationship table corresponding to the associated directory in the second server;

[0100] The directory relationship table is used to track the server loaded with the first directory, and the first directory is the parent directory of the directory corresponding to the target relationship table.

[0101] Here, the directory relationship table may be a subtrees map. After the target directory is loaded in the first server, the directory relationship table corresponding to the target directory needs to be updated to record the relevant information of its parent directory, such as loading location information. Through the directory relationship table, the server corresponding to the access cache information of the parent directory of the target directory can be traced back.

[0102] Exemplarily, each metadata server records a subtrees map, and each directory records its parent directory information in the subtrees map. By combining the subtrees map, it is possible to know which metadata server needs to be used to access its parent directory information.

[0103] In this way, by recording and updating the directory relationship table, the integrity of the directory tree structure can be guaranteed in the directory-granularity load balancing mechanism, so that the loading server of any directory can know which server needs to be used to access the information under its parent directory.

[0104] In this way, metadata load balancing at the directory granularity is achieved through the above mechanism. During the growth of the directory tree, the newly added sub-directories will be loaded to the metadata server with lower load. There is no need to split the directory tree or migrate the directory sub-tree across metadata servers. This eliminates the performance impact caused by the need to split the directory tree and migrate the directory sub-tree in the prior art, and achieves load balancing at the directory granularity. It can ensure that there is no performance loss during directory growth and horizontal expansion of the metadata server, and will not cause hot data migration bottlenecks, thereby improving the metadata access speed.

[0105] Based on the above embodiments, Figure 4 , a specific example is given to facilitate a better understanding of the information loading method provided by the embodiment of the present disclosure.

[0106] like Figure 4 As shown, a directory tree 40 corresponding to a distributed file system is provided with three metadata servers. In the embodiment of the present disclosure, the metadata corresponding to different directories in the directory tree 40 are loaded to multiple metadata servers, namely, a first metadata server 41, a second metadata server 42 and a third metadata server 43, with each small grid representing a directory, and directories with the same shaded pattern have been loaded to the same server. On this basis, Figure 5As shown, for example, in addition to the first metadata server 41, the second metadata server 42 and the third metadata server 43, if a new metadata server, namely the fourth metadata server 44, is added, the requesting party sequentially requests to access the three subdirectories under the a directory 50, namely, b 1 Directory 51, b 2 Record 52 and b 3 Directory 53, and these three directories are all newly added directories. At this time, according to the load balancing mechanism, these three directories can be loaded into the fourth metadata server 44 with the lowest load in sequence.

[0107] It should be noted that the application scenarios described in the above-mentioned embodiments of the present disclosure are intended to more clearly illustrate the technical solutions of the embodiments of the present disclosure, and do not constitute a limitation on the technical solutions provided by the embodiments of the present disclosure. Ordinary technicians in this field can know that with the emergence of new application scenarios, the technical solutions provided by the embodiments of the present disclosure are also applicable to similar technical problems.

[0108] Based on the same inventive concept, the present disclosure also provides an information loading device. Figure 6 Provide detailed explanation.

[0109] Figure 6 It is a schematic structural diagram of an information loading device according to an exemplary embodiment.

[0110] like Figure 6 As shown, the information loading device 60 may specifically include:

[0111] The request receiving module 601 is configured to execute and receive a request from a requesting party for accessing a target directory in a distributed file system; wherein the target directory is any directory in a file storage directory tree corresponding to the distributed file system;

[0112] A first acquisition module 602 is configured to execute, in response to the access request, acquiring a first server with a low current load from multiple servers when it is determined that the target directory is not loaded in any current server; wherein the server is used to store access cache information, and the access cache information is information required for accessing files and their corresponding directories in the distributed file system;

[0113] The first loading module 603 is configured to execute loading of access cache information corresponding to the target directory in the first server, so that the requesting party accesses the target directory according to the access cache information.

[0114] The information loading device 60 is described in detail below, as follows:

[0115] In one embodiment, when the target directory is any directory other than the root directory in the file storage directory tree, the information loading device 60 may further include:

[0116] an association determination module, configured to determine at least one associated directory associated with the target directory before acquiring a first server with a low current load from a plurality of servers; wherein the associated directory is a parent directory or a directory above the target directory;

[0117] A second acquisition module is configured to perform traversal of the at least one associated directory, and when it is determined that the associated directory is not loaded in any current server, acquire a second server with a low current load from the multiple servers;

[0118] The first loading module is configured to execute loading of access cache information corresponding to the associated directory in the second server.

[0119] Based on this, in one embodiment, the information loading device 60 may further include:

[0120] a relationship table updating module, configured to update a directory relationship table corresponding to the target directory in the first server after loading the access cache information corresponding to the target directory in the first server, and to update a directory relationship table corresponding to the associated directory in the second server;

[0121] The directory relationship table is used to track a server loaded with a first directory, where the first directory is a parent directory of a directory corresponding to the target relationship table.

[0122] In addition, in one embodiment, the information loading device 60 may further include:

[0123] a directory release module, configured to release all directories loaded in the target server including the second directory after loading the access cache information corresponding to the target directory in the first server, when the target server is restarted; wherein the target server is any server among the multiple servers, and the second directory includes the directory being accessed;

[0124] The reloading module is configured to reload the second directory in the target server when the target server is restarted.

[0125] In one of the embodiments, the access cache information may include metadata of the target directory.

[0126] In one of the embodiments, when the access request is an access request for a target file in the target directory, the access cache information may include metadata of the target directory and cache data of the target file.

[0127] Therefore, by loading information in units of directories, the newly added directory that needs to be loaded, that is, the target directory, is loaded into the first server with a lower current load. Since only the target directory is loaded, it has nothing to do with the loaded directory branches. Moreover, since the directory is loaded to the first server with a relatively low current load each time, there is no need to split and migrate the loaded directory branches, and the read and write performance of the server will not be affected, thereby improving the access speed of the distributed file system, reducing the delay in data updates, and achieving the effect of efficient load balancing.

[0128] Based on the same inventive concept, the embodiment of the present disclosure further provides an electronic device, specifically combined with Figure 7 Provide detailed explanation.

[0129] Figure 7 The present invention is a structural block diagram of an electronic device according to an exemplary embodiment.

[0130] like Figure 7 As shown, the electronic device 70 is a structural diagram of an exemplary hardware architecture of an electronic device that can implement the information loading method and information loading device in the embodiments of the present disclosure.

[0131] The electronic device 70 may include a processor 701 and a memory 702 storing computer program instructions.

[0132] Specifically, the processor 701 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0133] The memory 702 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 702 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 702 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 702 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 702 is a non-volatile solid-state memory. In a particular embodiment, the memory 702 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM) or a flash memory, or a combination of two or more of these.

[0134] The processor 701 reads and executes the computer program instructions stored in the memory 702 to perform the following steps:

[0135] Processor 701 executes receiving an access request from a requesting party for a target directory in a distributed file system; wherein the target directory is any directory in a file storage directory tree corresponding to the distributed file system; in response to the access request, when it is determined that the target directory is not loaded in any current server, obtaining a first server with a low current load from multiple servers; wherein the server is used to store access cache information, the access cache information being access cache information required for accessing files in the distributed file system and their corresponding directories; and loading the access cache information corresponding to the target directory in the first server, so that the requesting party accesses the target directory according to the access cache information.

[0136] In one embodiment, the processor 701 specifically executes determining at least one associated directory associated with the target directory; wherein the associated directory is a parent or above directory of the target directory; traversing the at least one associated directory, and when it is determined that the associated directory is not loaded in the current server, obtaining a second server with a low current load from the multiple servers; and loading access cache information corresponding to the associated directory in the second server.

[0137] Based on this, in one embodiment, the processor 701 mentioned above also executes updating the directory relationship table corresponding to the target directory in the first server, and updating the directory relationship table corresponding to the associated directory in the second server; wherein the directory relationship table is used to track the server loaded with the first directory, and the first directory is the parent directory of the directory corresponding to the target relationship table.

[0138] In addition, in one of the embodiments, the processor 701 also executes, when the target server is restarted, releasing all directories loaded in the target server, including the second directory; wherein the target server is any server among the multiple servers, and the second directory includes the directory being accessed; when the target server is restarted, reloading the second directory in the target server.

[0139] In one example, the electronic device 70 may further include a transceiver 703 and a bus 704. Figure 7 As shown, the processor 701, the memory 702 and the transceiver 703 are connected via a bus 704 and communicate with each other.

[0140] Bus 704 includes hardware, software or both.For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industry standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industry standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral control interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 704 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.

[0141] The embodiment of the present disclosure further provides a computer-readable storage medium, in which computer-executable instructions are stored. The computer-executable instructions are used to implement the information loading method recorded in the embodiment of the present disclosure.

[0142] In some possible implementations, various aspects of the method provided by the present disclosure may also be implemented in the form of a program product, which includes a program code. When the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of the method according to various exemplary embodiments of the present disclosure described above in this specification. For example, the computer device may execute the information loading method recorded in the embodiments of the present disclosure.

[0143] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0144] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices and computer program products according to the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable information processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable information processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0145] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable information processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0146] These computer program instructions can also be loaded onto a computer or other programmable information processing device so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0147] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0148] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. An information loading method, characterized in that: include: Receive a request from a requesting party for accessing a target directory in a distributed file system; wherein the target directory is any directory in a file storage directory tree corresponding to the distributed file system; In response to the access request, when it is determined that the target directory is not loaded in any current server, a first server with a low current load is obtained from multiple servers; wherein the server is used to store access cache information, and the access cache information is information required for accessing files and their corresponding directories in the distributed file system; Loading access cache information corresponding to the target directory in the first server, so that the requesting party accesses the target directory according to the access cache information, wherein the access cache information includes metadata of the target directory; When the target server is restarted, releasing all directories loaded in the target server, including the second directory; wherein the target server is any server among the multiple servers, and the second directory includes the directory being accessed; When the target server is restarted, the second directory is reloaded in the target server, and other directories are loaded when they are needed next time; In the case where the target directory is any directory other than the root directory in the file storage directory tree, before obtaining a first server with a low current load from multiple servers, the method further includes: Determine at least one associated directory associated with the target directory; wherein the associated directory is a parent directory or a higher directory of the target directory; Traversing the at least one associated directory, and when it is determined that the associated directory is not loaded in any current server, acquiring a second server with a low current load from the multiple servers; The access cache information corresponding to the associated directory is loaded in the second server.

2. The method according to claim 1, characterized in that: After loading the access cache information corresponding to the target directory in the first server, the method further includes: updating a directory relationship table corresponding to the target directory in the first server, and updating a directory relationship table corresponding to the associated directory in the second server; The directory relationship table is used to track a server loaded with a first directory, where the first directory is a parent directory of a directory corresponding to the target relationship table.

3. The method according to claim 1, characterized in that In a case where the access request is an access request for a target file in the target directory, the access cache information includes metadata of the target directory and cache data of the target file.

4. An information loading device, characterized in that: include: A request receiving module, configured to execute and receive an access request from a requesting party to a target directory in a distributed file system; wherein the target directory is any directory in a file storage directory tree corresponding to the distributed file system; A first acquisition module is configured to execute, in response to the access request, acquiring a first server with a low current load from multiple servers when it is determined that the target directory is not loaded in any current server; wherein the server is used to store access cache information, and the access cache information is information required for accessing files and their corresponding directories in the distributed file system; a first loading module configured to execute loading of access cache information corresponding to the target directory in the first server, so that the requesting party accesses the target directory according to the access cache information, wherein the access cache information includes metadata of the target directory; a directory release module, configured to release all directories loaded in the target server including the second directory after loading the access cache information corresponding to the target directory in the first server, when the target server is restarted; wherein the target server is any server among the multiple servers, and the second directory includes the directory being accessed; a reloading module configured to reload the second directory in the target server when the target server is restarted, and to load other directories when they are needed next time; In the case where the target directory is any directory other than the root directory in the file storage directory tree, the device further includes: an association determination module, configured to determine at least one associated directory associated with the target directory before acquiring a first server with a low current load from a plurality of servers; wherein the associated directory is a parent directory or a directory above the target directory; A second acquisition module is configured to perform traversal of the at least one associated directory, and when it is determined that the associated directory is not loaded in any current server, acquire a second server with a low current load from the multiple servers; The first loading module is configured to execute loading of access cache information corresponding to the associated directory in the second server.

5. The device according to claim 4, characterized in that The device also includes: a relationship table updating module, configured to update a directory relationship table corresponding to the target directory in the first server after loading the access cache information corresponding to the target directory in the first server, and to update a directory relationship table corresponding to the associated directory in the second server; The directory relationship table is used to track a server loaded with a first directory, where the first directory is a parent directory of a directory corresponding to the target relationship table.

6. The device according to claim 4, characterized in that In a case where the access request is an access request for a target file in the target directory, the access cache information includes metadata of the target directory and cache data of the target file.

7. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the information loading method according to any one of claims 1 to 3.

8. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the information loading method as claimed in any one of claims 1 to 3.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the information loading method according to any one of claims 1 to 3 is implemented.