A metadata addressing method, device, medium and product
By screening, calculating and evaluating metadata service paths in the distributed storage system, combined with locality function processing, the cost and time-consuming problems in metadata management are solved, and the locality performance of metadata and the performance of the distributed storage system are improved. IO performance.
Patent Information
- Application Number
- CN202410834385.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-06-26
AI Technical Summary
In a distributed storage system, the metadata management process involves increased overhead costs and frequent requests that take a long time, resulting in reduced local performance of metadata.
By obtaining the target number of metadata service paths in the distributed storage system, using metadata characteristic parameter screening, granular calculation and path optimization strategy evaluation, combined with locality function processing, the locality of the source metadata service to the target metadata service is determined. sex.
Improve local management of metadata within a preset time, optimize metadata service paths, improve IO performance of distributed storage file systems and optimal paths of storage systems.
Smart Images

Figure CN118394848B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of distributed storage technology, and in particular to a metadata addressing method, device, medium and product. Background Art
[0002] Metadata locality plays an important role in distributed storage systems. It can effectively organize and access metadata in storage systems and is crucial to improving the performance scalability of the system.
[0003] Traditional metadata is managed in the following three ways: the first is based on data tables. As metadata and data tables continue to increase, there are problems with dynamic expansion and data movement, which makes it impossible to guarantee metadata locality performance; the second is based on hash partitioning to achieve business load balancing, which causes frequent distributed locks and transactions, thereby introducing lock overhead costs and increasing metadata request processing time; the third uses static and dynamic subtree partitioning, which cannot be accurately migrated and the business load is diverse and frequent, resulting in increased metadata migration overhead. In summary, the increased overhead costs and the long time it takes for frequent requests in the metadata management process lead to reduced metadata locality performance.
[0004] Therefore, how to reduce overhead costs and request time, thereby improving the locality performance of metadata is an urgent problem that technical personnel in this field need to solve. Summary of the invention
[0005] The purpose of the present invention is to provide a metadata addressing method, device, medium and product to solve the problem of increased overhead costs and long time-consuming requests during metadata management, which in turn leads to reduced local performance of metadata.
[0006] In order to solve the above technical problems, the present invention provides a metadata addressing method, which is applied to a distributed storage system, comprising:
[0007] Acquire a target number of metadata service paths in the distributed storage system; wherein the target number of metadata service paths is obtained by screening all metadata service paths in the distributed storage system using metadata characteristic parameters within a preset time;
[0008] Perform granular calculation based on the target number of metadata service paths to obtain a first path result;
[0009] Evaluate and calculate the first path result according to the path optimization strategy to obtain a second path result;
[0010] The second path result is subjected to locality processing according to a locality function to determine the locality of the metadata corresponding to the source metadata service to the target metadata service.
[0011] On the one hand, the metadata characteristic parameters at least include a timestamp parameter; the target number of metadata service paths is obtained by screening all metadata service paths in the distributed storage system using the metadata characteristic parameters within a preset time, including:
[0012] Adding a timestamp parameter to all metadata service paths in the distributed storage system in advance;
[0013] In a case where request information appears in the distributed storage system within a preset time, the metadata service paths corresponding to the request information are screened according to the continuous timestamp parameters of the preset time to obtain a first number of metadata service paths;
[0014] The first number of metadata service paths is used as the target number of metadata service paths.
[0015] On the other hand, after the first number of metadata service paths are obtained through screening, the method further includes:
[0016] Get the preset quantity;
[0017] Determining whether the first quantity is greater than a preset quantity;
[0018] If yes, then sorting the metadata service paths corresponding to the first number from large to small according to the time degree occupied by the timestamp parameter in the request information;
[0019] Taking the metadata service path corresponding to the maximum time degree of occupying the request information as a benchmark, the metadata service paths corresponding to the preset target number before interception are taken as the metadata service paths of the target number;
[0020] If not, the first number of metadata service paths is used as the target number of metadata service paths.
[0021] On the other hand, the metadata characteristic parameters at least include access permission request information; the target number of metadata service paths is obtained by screening all metadata service paths in the distributed storage system using the metadata characteristic parameters within a preset time, including:
[0022] Within a preset time and when request information appears in the distributed storage system, the metadata service paths corresponding to the requested access authority information of the request information are screened to obtain a second number of metadata service paths;
[0023] The second number of metadata service paths is used as the target number of metadata service paths.
[0024] On the other hand, the metadata service path is obtained by the path corresponding to any metadata service of the source node corresponding to the distributed storage system to any metadata service of the target node; wherein, each node of the distributed storage system includes at least one metadata service; if each node of the distributed storage system has multiple metadata services, it includes a primary metadata service and a backup metadata service.
[0025] On the other hand, the first path result is obtained by performing granular calculation based on the target number of metadata service paths, including:
[0026] Obtain the time parameters corresponding to the transmission of the request data under each metadata service path under the target quantity from the source node to the target node and the feedback information;
[0027] Determine corresponding delay information according to the time parameter;
[0028] Get the path length corresponding to each metadata service path under the target quantity;
[0029] Establishing a mapping relationship between the path length and latency information of each metadata service path;
[0030] The target number of metadata service paths are sorted according to the mapping relationship to obtain the first path result.
[0031] On the other hand, evaluating and calculating the first path result according to the path optimization strategy to obtain a second path result includes:
[0032] Using the first path result as the initial output vector;
[0033] Get the number of iterations and the preset number of layers;
[0034] Performing feature calculation on the initial output vector according to a recursive algorithm to obtain an addressing matrix and an addressing feature matrix corresponding to the number of iterations and a preset number of layers;
[0035] The second path result is determined according to the addressing matrix and the addressing feature matrix.
[0036] On the other hand, the initial output vector is subjected to feature calculation according to a recursive algorithm to obtain an addressing matrix and an addressing feature matrix corresponding to the number of iterations and the preset number of layers, including:
[0037] The path addressing information corresponding to the initial output vector is used as the addressing matrix of the first layer;
[0038] Determine an addressing feature matrix of the first layer according to the addressing matrix of the first layer, the number of iterations and the initial output vector;
[0039] Using the addressing feature matrix of the first layer as the initial output vector of the second layer;
[0040] The path addressing information corresponding to the initial output vector of the second layer is used as the addressing matrix of the second layer, and the addressing feature matrix of the third layer is determined according to the addressing matrix of the second layer, the number of iterations and the initial output vector of the second layer; and so on, until the current number of iterations reaches the preset number of iterations, when the current number of layers reaches the preset number of layers, the third layer is output. The addressing matrix of the layer and the The addressing feature matrix of the layer; where is a positive integer greater than or equal to 1.
[0041] On the other hand, evaluating and calculating the first path result according to the path optimization strategy to obtain a second path result includes:
[0042] Obtaining a historical path result and corresponding path access information corresponding to the first path result;
[0043] A machine learning algorithm is called to process the historical path result and the path access information to obtain the second path result.
[0044] On the other hand, performing locality processing on the second path result according to the locality function to determine the locality of the metadata corresponding to the source metadata service to the target metadata service includes:
[0045] Obtaining a path result from the source metadata service to the metadata corresponding to the target metadata service in the second path result;
[0046] Obtaining the number of requests for metadata corresponding to the source metadata service to the target metadata service;
[0047] The locality of the metadata is determined according to the path result, the number of request traversals, the marked path information corresponding to the source metadata service to the target metadata service, and the number of targets.
[0048] On the other hand, the process of determining the number of request traversal times includes:
[0049] Get preset request information;
[0050] Sending preset request information from the source node where the source metadata service is located to other nodes except the source node, and using the other nodes as the target nodes where the target metadata service is located;
[0051] The target node where the target metadata service is located is traversed to obtain the preset request information and the corresponding request traversal times.
[0052] On the other hand, determining the locality of the metadata according to the path result, the number of request traversals, the marked path information corresponding to the source metadata service to the target metadata service, and the number of targets includes:
[0053] Obtaining the number of traversals of each request corresponding to the source metadata service to the target metadata service;
[0054] Subtract the target quantity from the marked path information of the source metadata service to obtain first data;
[0055] Subtract 1 from the first data to obtain second data;
[0056] The target quantity is multiplied by the marking path information of the target metadata service to obtain third data;
[0057] The fourth data is obtained by multiplying the number of request traversals corresponding to the current target metadata service by the second data;
[0058] Dividing the fourth data by the third data to obtain fifth data;
[0059] The fifth data is multiplied by the second path result corresponding to the current target metadata service to obtain the locality corresponding to the current target metadata service;
[0060] The locality corresponding to each target metadata service is added together to obtain the locality of the metadata.
[0061] In order to solve the above technical problems, the present invention further provides a metadata addressing device, comprising:
[0062] Memory for storing computer programs;
[0063] A processor is used to implement the steps of the metadata addressing method as described above when executing the computer program.
[0064] In order to solve the above technical problem, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the metadata addressing method as described above are implemented.
[0065] In order to solve the above technical problem, the present invention also provides a computer program product, including a computer program / instruction, which implements the steps of the metadata addressing method when executed by a processor.
[0066] The present invention provides a metadata addressing method, which is applied to a distributed storage system, comprising: obtaining a target number of metadata service paths in the distributed storage system; wherein the target number of metadata service paths are obtained by screening all metadata service paths in the distributed storage system using metadata characteristic parameters within a preset time; performing granular calculation based on the target number of metadata service paths to obtain a first path result; evaluating and calculating the first path result according to a path optimization strategy to obtain a second path result; and performing local processing on the second path result according to a locality function to determine the locality of metadata corresponding to a source metadata service to a target metadata service.
[0067] The beneficial effect of the present invention is that the target number of metadata service paths obtained by screening metadata characteristic parameters within a preset time enables local management of metadata of a large-scale distributed storage file system, records and counts metadata path information, and improves metadata locality management. At the same time, a granular calculation method is used to obtain the first path result, and the metadata path is selected granularly to improve the time locality of the metadata. At the same time, the second path result is obtained by evaluating and calculating the first path result based on the path optimization strategy, and the second path result is locally processed based on the locality function, so that the metadata locality data structure is changed, the spatial locality of the distributed file system metadata storage path is ensured, and the optimal path of metadata operations in the distributed storage file system and the storage system IO performance are improved.
[0068] Secondly, by recording the metadata service paths of continuous timestamp parameters within a preset time, the temporal locality of metadata is improved; after the first number of metadata service paths are screened, the preset number is added to compare with the first number to ensure that the metadata service paths finally screened are in local management among all metadata service paths, and the metadata service paths are further optimized; the metadata service paths corresponding to the requested access rights information of the requested information are recorded within the preset time to improve the temporal locality of metadata; the path process for access determination between the two metadata services provided is improved to improve the flexibility and diversity of metadata access addressing, so as to ensure the synchronization and consistency verification of data communication; the first path result is to find the metadata service path of the optimal and shortest path to improve the locality and timeliness of metadata in the distributed storage system; the recursive formula is used to calculate the shortest path, and in the construction and optimization of the metadata service path, the recursive idea realizes the practical problem of evaluating and selecting the optimal path node by node.
[0069] In addition, the present invention also provides a metadata addressing device, medium and product, which have the same beneficial effects as the above-mentioned metadata addressing method. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0071] Figure 1 A flowchart of a metadata addressing method provided by an embodiment of the present invention;
[0072] Figure 2 A schematic diagram of the structure of a distributed storage system provided by an embodiment of the present invention;
[0073] Figure 3 A structural diagram of a metadata addressing device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0074] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0075] The core of the present invention is to provide a metadata addressing method, device, medium and product to solve the problem of increased overhead costs and long time-consuming frequent requests in the metadata management process, which in turn leads to reduced metadata locality performance.
[0076] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0077] Distributed storage systems have the characteristics of scalability, high availability, easy management, high performance, data security and low cost. Distributed storage systems can meet different data scale and functional requirements, especially in large-scale data storage and processing, distributed storage systems have obvious advantages. However, distributed storage systems also have some challenges and limitations, such as metadata performance, data security and other management issues.
[0078] Metadata is data that describes data attribute information, including file system directory tree structure, identification number, location information, data size, permissions and other attribute information. Generally speaking, in distributed storage file systems, metadata operations account for about 75% of data access operations, which means that metadata plays an important role in the file system. Distributed storage systems provide file system services to the outside world through metadata servers (MDS). MDS services are usually deployed on distributed storage nodes with multiple masters and multiple backups. The master MDS provides metadata services to the outside world, and the backup MDS does not provide services to the outside world as a switching service in case of failure. Distributed metadata servers MDS have scalability, high availability and consistency. In intensive input and output (IO) storage access, the metadata storage path and client access addressing process restrict the overall performance of distributed storage. Therefore, efficient metadata storage addressing management methods are crucial research objects for distributed storage system performance.
[0079] Metadata locality is the degree of physical or logical proximity between metadata and actual data in a storage system. The principle of locality has a great impact on the design and performance of hardware and software systems. Locality is usually divided into temporal locality and spatial locality. Temporal locality means that a memory location that has been referenced once is likely to be referenced multiple times in the near future; spatial locality means that if a memory location is referenced once, the program is likely to reference a nearby memory location in the near future. In a distributed storage file system, metadata locality is represented by the access path of the distributed file system metadata, that is, the metadata addressing path. Frequently accessed metadata will reference a nearby adjacent metadata in the near future to improve the distributed storage IO performance.
[0080] In traditional distributed storage file systems, metadata is stored in multiple MDS partitions to improve metadata performance, scalability, and high availability. The metadata service MDS manages metadata operations, including metadata path search and operations, namely metadata lookup function, getattr function, creat function, setattr function, etc. The locality of metadata is difficult to accurately predict the rules of metadata access paths due to its high complexity, which is a difficult problem in distributed storage research. Usually, in distributed file system metadata management, methods based on data tables, Hash partitions, static or dynamic subtree partitions, etc. are generally used. The metadata storage path is determined by the metadata partition and location logical structure of the distributed storage MDS service, mainly including:
[0081] 1. Metadata management method based on data tables: Because it needs to perform metadata management according to the data table structure operated in sequence, the distributed metadata service MDS maps the metadata process, that is, when the storage system is just running, the table structure has performance advantages. However, in large-scale file systems, as the metadata continues to increase, the data tables will also continue to increase. There are shortcomings such as performance consumption of dynamic expansion (frequent calls to the malloc function will consume memory) and the need to move data when inserting data, and the performance of metadata locality cannot be guaranteed.
[0082] 2. Metadata management method based on Hash partition. The distribution of Hash partition data is almost random, so the distribution is relatively uniform. It can avoid hot spots to a certain extent and achieve load balancing of the business. However, it lacks metadata locality, resulting in frequent distributed locks and transactions, and introduces large lock overhead to prevent metadata conflicts, which reduces distributed storage performance and increases the time consumption of metadata request processing.
[0083] 3. Based on static or dynamic subtree partitioning: In static subtree partitioning, metadata is divided into different distributed storage metadata MDS services (MDS1, MDS2, ..., MDSw). Because it is impossible to determine the law of data business IO, static subtree partitioning will cause MDS service imbalance. For example, MDS1 has a large number of metadata operations, but MDS2 is in a dormant state, which restricts the performance and scalability of distributed storage. Dynamic subtree partitioning dynamically migrates and adjusts the corresponding subtree according to the load capacity of the file system. The decision of subtree partitioning and migration is a synchronous process. At present, it is impossible to achieve accurate migration and optimal decision-making mechanism for subtree partitioning. When the business load is diverse and changes frequently, it will suffer from high overhead of frequent metadata migration, affecting the overall performance of distributed storage.
[0084] The metadata addressing method provided by the present invention can solve the above technical problems.
[0085] Figure 1 A flowchart of a metadata addressing method provided by an embodiment of the present invention, such as Figure 1 As shown, the method is applied to a distributed storage system, including:
[0086] S11: Obtaining metadata service paths of a target number in the distributed storage system;
[0087] The target number of metadata service paths is obtained by screening all metadata service paths in the distributed storage system using metadata characteristic parameters within a preset time;
[0088] S12: performing granular calculation based on the target number of metadata service paths to obtain a first path result;
[0089] S13: Evaluate and calculate the first path result according to the path optimization strategy to obtain a second path result;
[0090] S14: Perform locality processing on the second path result according to the locality function to determine the locality of the metadata corresponding to the source metadata service to the target metadata service.
[0091] Specifically, the target number in step S11 is smaller than the corresponding number of all metadata service paths in the distributed storage system; that is, this embodiment performs locality management based on the metadata of a large-scale distributed storage file system, and it is necessary to screen all metadata service paths using metadata characteristic parameters based on a specified time period to obtain a target number of metadata service paths, thereby improving the temporal locality of the metadata.
[0092] The specified time period is limited by a preset time in this embodiment. The specific time of the preset time is not limited in this embodiment and can be set according to actual conditions. Metadata feature parameters are mainly based on metadata information (property information of files or objects), such as file name, file size, file permissions, creation and modification time, etc. The metadata feature parameters used here can be based on at least one feature parameter, that is, it can be one feature parameter or a combination of multiple feature parameters for screening. The combined screening of multiple feature parameters here can be based on merging multiple feature parameters into a mixed feature parameter for screening, or all metadata service paths can be screened based on priority order among multiple feature parameters.
[0093] In some embodiments, the metadata characteristic parameters include at least a timestamp parameter; the target number of metadata service paths is obtained by screening all metadata service paths in the distributed storage system using the metadata characteristic parameters within a preset time, including:
[0094] Add timestamp parameters to all metadata service paths in the distributed storage system in advance;
[0095] In a case where request information appears in the distributed storage system within a preset time, the metadata service paths corresponding to the request information are screened according to the continuous timestamp parameters of the preset time to obtain a first number of metadata service paths;
[0096] The first number of metadata service paths is used as the target number of metadata service paths.
[0097] Specifically, when the metadata characteristic parameters include at least a timestamp parameter, the metadata of the large-scale distributed storage file system is locally managed, the path information of the metadata is recorded and counted, and the metadata with the timestamp parameter is recorded in a specified time period. The timestamp parameter here needs to be added to all metadata service paths in advance.
[0098] Within a preset time, when a request message appears in the distributed storage system, the metadata service paths corresponding to the request message are screened based on the continuous timestamp parameters of the preset time to obtain a first number of metadata service paths. Specifically, within a certain preset time, it is checked whether the timestamp parameters of the metadata service paths for the request message are continuous. If they are continuous, the metadata service paths to which the continuous timestamp parameters belong are screened out.
[0099] This implementation improves the temporal locality of metadata by recording the metadata service path of continuous timestamp parameters within a preset time.
[0100] Based on the above embodiment, in some embodiments, after the first number of metadata service paths are obtained through screening, the method further includes:
[0101] Get the preset quantity;
[0102] Determining whether the first quantity is greater than a preset quantity;
[0103] If so, sorting the metadata service paths corresponding to the first quantity from large to small according to the time degree that the timestamp parameter occupies the request information;
[0104] Taking the metadata service path corresponding to the maximum time degree of occupying the request information as a benchmark, the metadata service paths corresponding to the preset target quantity before interception are taken as the metadata service paths of the target quantity;
[0105] If not, the first number of metadata service paths is used as the target number of metadata service paths.
[0106] Specifically, if the number of the first number of metadata service paths is still relatively large, which is not conducive to local management, it is necessary to determine whether the first number is greater than the preset number. If it is greater, it means that the current first number of metadata service paths is relatively large, and therefore, screening is still required.
[0107] Sorting is performed based on the time degree of the timestamp parameter occupying the request information. That is to say, in the above embodiment, the consecutive timestamp parameters within the preset time, the continuous number here is not limited, as long as the preset continuous number is met. In addition, the continuous number of consecutive timestamp parameters in each metadata service path is different. In the case of meeting a continuous number greater than the preset number, based on the time degree of the timestamp parameter occupying the request information, the number of consecutive timestamp parameters is sorted from large to small in the case of the request information, and the metadata service path corresponding to the maximum time degree of occupying the request information is used as the benchmark, and the metadata service path corresponding to the preset target number before interception is used as the metadata service path of the target number. The preset target number here is different from the preset number and the first number.
[0108] If the first number is less than or equal to the preset number, the first number of metadata service paths may be used as the target number of metadata service paths.
[0109] In this embodiment, after the first number of metadata service paths are screened, a preset number is added to perform a comparison process with the first number to ensure that the metadata service paths finally screened are locally managed among all metadata service paths, thereby further optimizing the metadata service paths.
[0110] In some other embodiments, the metadata characteristic parameters at least include requested access permission information; the target number of metadata service paths is obtained by screening all metadata service paths in the distributed storage system using the metadata characteristic parameters within a preset time, including:
[0111] Within a preset time and when a request message appears in the distributed storage system, the metadata service paths corresponding to the requested access authority information of the request message are screened to obtain a second number of metadata service paths;
[0112] The second number of metadata service paths is used as the target number of metadata service paths.
[0113] Specifically, within a preset time and when request information appears in the distributed storage system, the metadata service paths corresponding to the access permission information requested in the request information are screened, that is, the metadata service paths that enable the access permission information requested for the request information are screened out to obtain a second number of metadata service paths so as to serve as the target number of metadata service paths.
[0114] In addition, the second number may be compared with a preset number to determine whether the second number is excessive.
[0115] This embodiment records the metadata service path corresponding to the requested access authority information of the request information within a preset time, so as to improve the time locality of the metadata.
[0116] The metadata service path here is for any metadata service corresponding to each storage node. In some embodiments, the metadata service path is obtained from the path corresponding to any metadata service of the source node corresponding to the distributed storage system to any metadata service of the target node; wherein each node of the distributed storage system includes at least one metadata service; if each node of the distributed storage system has multiple metadata services, it includes a primary metadata service and a backup metadata service.
[0117] Figure 2 A schematic diagram of a distributed storage system provided by an embodiment of the present invention is shown in FIG. Figure 2 As shown, the distributed storage system includes multiple distributed storage nodes, each distributed storage node includes multiple MDS service processes, one of which serves as the main MDS, which is mainly responsible for providing services to the outside world, and the remaining MDS service processes serve as backup MDSs, which are used to provide metadata services during failover. Each distributed storage node is physically connected through a dual 10 Gigabit network link, and data communication synchronization and consistency verification are performed between MDSs through dual 10 Gigabit links.
[0118] Based on the corresponding addressing method between each storage node, the steps are as follows:
[0119] S21: Coarse-grained calculation of a small number of metadata service paths;
[0120] S22: Obtaining metadata service path evaluation results;
[0121] S23: The metadata path optimization calculation unit trains and provides feedback on the evaluation results;
[0122] S24: performing path recommendation addressing through metadata addressing optimization evaluation algorithm;
[0123] S25: Addressing optimization determines metadata locality.
[0124] At this time, the metadata service path is a path formed by any metadata service in a distributed storage node corresponding to the distributed storage system to any metadata service in another distributed storage node. It can be a primary metadata service in a distributed storage node to a backup metadata service in another distributed storage node, or a primary metadata service in a distributed storage node to a primary metadata service in another distributed storage node, or a backup metadata service in a distributed storage node to a backup metadata service in another distributed storage node. There is no limitation here and it can be set according to actual conditions.
[0125] The path process for determining access between two metadata services provided in this embodiment improves the flexibility and diversity of metadata access addressing, thereby ensuring synchronization and consistency verification of data communication.
[0126] In step S12, the metadata service paths based on the target number are granularly calculated to obtain the first path result. The granular calculation here is to design information processing at different granularity levels. The data granularity is based on the degree of data segmentation. It can be aggregated according to different granularities such as year, month, day or hour based on time series analysis. The calculation granularity, in parallel computing and distributed computing, is the task size assigned to a single processing unit. Coarse-grained computing involves larger task units, and fine-grained computing involves smaller task units.
[0127] The specific size of the granularity corresponding to the granularity calculation in this embodiment is not limited, and the main purpose is to determine the regional addressing through coarse-grained calculation to find the shortest and optimal path. The coarse-grained calculation of the present invention can be implemented based on the quantization process between the timestamp and the path to calculate the shortest path.
[0128] In coarse-grained computing, data mapping is the process of allocating data to different processing units in the system to optimize performance and resource utilization. In coarse-grained reconfigurable structures, routing overhead is reduced and efficiency is improved by reusing existing routing paths.
[0129] In some embodiments, performing granular calculation based on the target number of metadata service paths to obtain a first path result includes:
[0130] Obtain the time parameters corresponding to the transmission of the request data under each metadata service path under the target quantity from the source node to the target node and the feedback information;
[0131] Determine corresponding delay information according to the time parameter;
[0132] Get the path length corresponding to each metadata service path under the target quantity;
[0133] Establishing a mapping relationship between the path length and latency information of each metadata service path;
[0134] The target number of metadata service paths are sorted according to the mapping relationship to obtain a first path result.
[0135] Specifically, according to Figure 2The time delay calculated from the time value required for the distributed storage client user's request data to travel from one end of the distributed storage system's network (source node) to the other end (destination node) of the IO path, and then receive confirmation information (feedback information), is the delay information determined based on the time parameters corresponding to the feedback information. The calculation of the time parameters corresponding to this embodiment can determine the corresponding IO path delay based on the time value corresponding to the conventional feedback information, or it can be calculated based on the actual data fed back by each IO path. The conventional calculation method can measure the delay through the Precision Time Protocol (PTP), through Software-Defined Networking (SDN), or through the path management software in the multi-path design to monitor the status of different paths and measure the delay of each path, etc., which is not limited here.
[0136] The path length corresponding to each metadata service path under the target quantity is obtained. It should be noted that the path length in this embodiment can be the number of routers or switches that the request data needs to pass through when transmitting from one node to another, the complexity of the path (such as the number of different types of network devices or services passed on the path), the number of path entries from one node to another recorded in the routing table, the logical distance or the logical steps of the response, and the path overhead on the path, etc., which are not limited here.
[0137] A mapping relationship is established through path length and delay information. The mapping relationship here can be established in a table or matrix manner and can be set according to actual conditions. The target number of metadata service paths are sorted based on the mapping relationship to determine the first path result.
[0138] The first path result of this embodiment is to find the metadata service path of the optimal shortest path to improve the locality and timeliness of the metadata of the distributed storage system.
[0139] In some embodiments, establishing a mapping relationship between the path length and latency information of each metadata service path includes:
[0140] Take path length as the first priority information;
[0141] Sort the metadata service paths from largest to smallest according to the first priority information;
[0142] Determine whether the corresponding latency information exists in a descending order according to the sorted metadata service paths;
[0143] If yes, a mapping relationship between path length and delay information is established;
[0144] Correspondingly, the target number of metadata service paths are sorted according to the mapping relationship to obtain a first path result, including:
[0145] Set decimal thresholds less than 1 in order for each sorted metadata service path, which gradually increase from small to large;
[0146] The data obtained by subtracting each decimal threshold value less than 1 from 1 are respectively used as the first path results corresponding to each sorted metadata service path.
[0147] Specifically, taking path length as the first priority, the metadata service paths are sorted by size based on the first priority information. At the same time, it is checked whether the corresponding delay information after sorting is also sorted by size. If so, the principle of lower delay and shorter path is basically maintained, and a mapping relationship between path length and delay information is established.
[0148] Correspondingly, the sorted metadata service paths are set in sequence with decimal thresholds that gradually increase from small to large and are less than 1. For example, there are 5 metadata service paths (A1, A2, A3, A4 and A5) sorted from large to small, corresponding to decimal thresholds (0.1, 0.2, 0.3, 0.4 and 0.5), respectively. The data obtained by subtracting the decimal thresholds less than 1 from 1 are (0.9, 0.8, 0.7, 0.6, 0.5), respectively, as the first path result. From this, it can be determined that the A1 path has the longest delay and the A5 has the shortest delay.
[0149] The first path result is represented by Ls, Ls=[1-n]. In the value of Ls, n represents the lowest delay and the shortest path, and 1 represents the highest delay and the longest path. Here n corresponds to each path. The data closest to 1 has the highest path delay and the longest path. The data farther away from 1 has the shorter path delay and the shorter path.
[0150] The specific process of the mapping relationship between the recommended path length and delay information provided in this embodiment and the corresponding situation of obtaining the first path result, the path length and delay information are quantified by a method to facilitate finding the shortest path, so as to improve the metadata locality and timeliness of the distributed storage file system.
[0151] In step S13, the first path result is evaluated and calculated by the path optimization strategy to obtain the second path result. The optimization strategy here can be based on a recursive calculation method, or a machine learning algorithm, etc., which is not limited here. The optimization strategy of this embodiment is a fine-grained calculation method, which decomposes the problem into smaller problems to find the shortest path or the optimal path between two nodes. Specifically, the recursive calculation method used may be a depth-first search (Depth-First Search, DFS), a breadth-first search (Breadth-First Search, BFS), etc., which is not limited here. Based on the path optimization strategy, the second path result can be obtained by refining the evaluation on the basis of the first path result.
[0152] The locality function in step S14 performs locality processing on the basis of the second path result to obtain the distribution and corresponding locality of the metadata service path. Its main solution is to quantitatively describe the locality of the distributed storage file system metadata. The locality function is used to measure the local characteristics in the data access pattern, mainly describing the characteristics of the program tending to repeatedly access the same or adjacent data when accessing data.
[0153] It can be understood that the locality function can solve temporal locality, spatial locality, logical locality, sequential locality, etc. Before the locality function is adopted in this embodiment, spatial locality is achieved by changing the data structure (obtaining the second path result). Here, spatial locality and temporal locality are combined to improve the system's IO processing capability, improve the locality of metadata and the total throughput of metadata operations per second.
[0154] The present invention provides a metadata addressing method, which is applied to a distributed storage system, including: obtaining a target number of metadata service paths in the distributed storage system; wherein the target number of metadata service paths is obtained by screening all metadata service paths in the distributed storage system using metadata characteristic parameters within a preset time; performing granular calculation based on the target number of metadata service paths to obtain a first path result; evaluating and calculating the first path result according to a path optimization strategy to obtain a second path result; and performing local processing on the second path result according to a locality function to determine the locality of metadata corresponding to the source metadata service to the target metadata service. The target number of metadata service paths obtained by screening the metadata characteristic parameters within the preset time enables local management of metadata of a large-scale distributed storage file system, and records and counts the path information of the metadata to improve the locality management of the metadata. At the same time, the first path result is obtained by using a granular calculation method, and the metadata path is selected in a granular manner to improve the time locality of the metadata. At the same time, the second path result is obtained by evaluating and calculating the first path result based on the path optimization strategy, and then the second path result is locally processed based on the locality function, so as to change the metadata locality data structure, ensure the spatial locality of the distributed file system metadata storage path, and improve the optimal path of metadata operations in the distributed storage file system and the storage system IO performance.
[0155] In some embodiments, evaluating and calculating the first path result according to the path optimization strategy to obtain the second path result includes:
[0156] The first path result is used as the initial output vector;
[0157] Get the number of iterations and the preset number of layers;
[0158] Perform feature calculation on the initial output vector according to the recursive algorithm to obtain the addressing matrix and addressing feature matrix corresponding to the number of iterations and the preset number of layers;
[0159] A second path result is determined according to the addressing matrix and the addressing characteristic matrix.
[0160] Specifically, the first path result is used as the initial output vector ; Get the number of iterations at the same time and preset number of layers , according to the recursive algorithm, the initial output vector is characterized and calculated to obtain the addressing matrix and addressing feature matrix corresponding to the number of iterations and the preset number of layers; the second path result is determined according to the addressing matrix and the addressing feature matrix. In this recursive algorithm, the output vector of the lowest layer is the input vector of the previous layer, and the distributed metadata service path is first characterized. The input parameters include the metadata service path addressing training feature matrix set X; the output parameters include the metadata service path addressing matrix ;in, , Indicates the parameters, Indicates The layer calculation results are finally outputted as the addressing evaluation results (second path results).
[0161] In some embodiments, the initial output vector is characterized by performing feature calculation according to a recursive algorithm to obtain an addressing matrix and an addressing feature matrix corresponding to the number of iterations and the preset number of layers, including:
[0162] The path addressing information corresponding to the initial output vector is used as the addressing matrix of the first layer;
[0163] Determine an addressing feature matrix of the first layer according to the addressing matrix of the first layer, the number of iterations and the initial output vector;
[0164] The addressing feature matrix of the first layer is used as the initial output vector of the second layer;
[0165] The path addressing information corresponding to the initial output vector of the second layer is used as the addressing matrix of the second layer, and the addressing feature matrix of the third layer is determined according to the addressing matrix of the second layer, the number of iterations and the initial output vector of the second layer; and so on, until the current number of iterations reaches the preset number of iterations, when the current number of layers reaches the preset number of layers, the output of the third layer is The addressing matrix of the layer and the The addressing feature matrix of the layer; where is a positive integer greater than or equal to 1.
[0166] Specifically, the path addressing information corresponding to the initial output vector is used as the addressing matrix of the first layer ; Determine the addressing feature matrix of the first layer according to the addressing matrix, number of iterations and initial output vector of the first layer, and use the addressing feature matrix of the first layer as the initial output vector of the second layer; Use the path addressing information corresponding to the initial output vector of the second layer as the addressing matrix of the second layer, and determine the addressing feature matrix of the third layer according to the addressing matrix, number of iterations and initial output vector of the second layer; And so on, until the current number of iterations reaches the preset number of iterations, when the current number of layers reaches the preset number of layers, output the first layer. The addressing matrix of the layer and the The addressing feature matrix of the layer is as follows:
[0167] ;
[0168] in, is the initial output vector, For the The addressing matrix of the layer, For the The addressing feature matrix of the layer; is the number of iterations.
[0169] According to initialization As input to the second layer addressing calculation, we get and ; For the number of iterations and preset number of layers Calculate and get and .
[0170] At this time, the optimal mds addressing path is obtained through the improved Logistic classification function , the formula is as follows:
[0171] .
[0172] In this embodiment, a recursive formula is used to analogize the calculation of the metadata path, and is regarded as the cumulative cost or cumulative weight to reach a metadata item, and is the initial cost, represents the cost or weight of accessing each metadata item, is the fixed cost or weight of each item.
[0173] is the initial cost, which can represent the cost of accessing the starting point of the metadata path, such as the initialization cost when the client starts to request metadata. , It can represent the cost of accessing the node, which may include network latency, processing time, storage access time, etc. is the fixed cost or weight of each item. This fixed cost may represent the common cost of each node or service on the metadata path, such as the overhead of security checks, logging, data replication, etc. Indicates the path to The cumulative cost of each node can be used to evaluate the performance of the entire metadata service path. By calculating the cumulative cost of different metadata paths, this recursive formula can be used to compare the efficiency of different paths and select the path with the lowest cost.
[0174] This embodiment provides a recursive formula for calculating the shortest path. In the construction and optimization of the metadata service path, the recursive idea is used to solve the practical problem of evaluating and selecting the optimal path node by node.
[0175] In some other embodiments, evaluating and calculating the first path result according to the path optimization strategy to obtain the second path result includes:
[0176] Obtaining a historical path result and corresponding path access information corresponding to the first path result;
[0177] A machine learning algorithm is called to process the historical path results and the path access information to obtain a second path result.
[0178] It is understandable that information on metadata access patterns, storage system structures, access delays, network topologies, and historical access data is collected, i.e., historical path results of the first path results and corresponding path access information. Feature selection is performed based on the two parameters, and the corresponding feature parameters may be file size, access frequency, file type, node load, and network congestion, etc. In the definition process, it is necessary to predict the shortest path, the most reliable path, and / or the path that optimizes specific performance indicators to access metadata. Select a suitable machine learning model according to the nature of the problem. Possible models include decision trees, random forests, gradient boosting machines, neural networks, graph neural networks, etc. Use historical data to train the model so that it can predict the best path for metadata access based on input features. Use a validation set or a test set to evaluate the performance of the model, using appropriate evaluation indicators such as accuracy, F1 score, mean absolute error, etc. It may be necessary to use an integrated learning method to combine the predictions of multiple models to improve accuracy and robustness. If the metadata access pattern changes over time, use an online learning algorithm to update the model to adapt to the new pattern. Use the model to test different metadata path planning strategies in a simulation environment to evaluate their effectiveness.
[0179] The machine learning algorithm provided in this embodiment obtains the second path result. During the implementation process, it is necessary to consider the interpretability, real-time performance, accuracy and dynamic changes of the model. In addition, it is also necessary to ensure that the prediction of the model does not introduce too much additional overhead and can adapt to changes in system load and network conditions. Improve the diversity and flexibility of the optimization strategy and further improve the accuracy of the path.
[0180] In some embodiments, performing locality processing on the second path result according to the locality function to determine the locality of the metadata corresponding to the source metadata service to the target metadata service includes:
[0181] Obtaining the path result from the source metadata service to the metadata corresponding to the target metadata service in the second path result;
[0182] Get the number of requests to traverse the corresponding metadata from the source metadata service to the target metadata service;
[0183] The locality of metadata is determined based on the path result, the number of request traversals, the corresponding marked path information from the source metadata service to the target metadata service, and the number of targets.
[0184] Specifically, the path result of the metadata corresponding to the source metadata service to the target metadata service and the corresponding number of request traversals are obtained in the second path result, and the locality of the metadata is determined based on the path result, the number of request traversals, the marked path information corresponding to the source metadata service to the target metadata service, and the number of targets.
[0185] In some embodiments, the process of determining the number of request traversals includes:
[0186] Get preset request information;
[0187] Sending the preset request information from the source node where the source metadata service is located to the remaining nodes except the source node, and using the remaining nodes as the target nodes where the target metadata service is located;
[0188] Traverse the target node where the target metadata service is located to obtain preset request information and the corresponding request traversal times.
[0189] Specifically, the number of traversals obtained by a source node traversing each target node, for example, there is Each storage node includes two MDS services, one primary MDS service and one backup MDS service. The primary MDS service provides services, while the backup MDS service does not provide services, so as to achieve high availability of MDS services. The storage nodes include metadata MDS service, distributed storage has at least 3 MDS services, using collections It indicates that, ; Define the number of traversal times of the MDS metadata path ; Distributed client request metadata operation processing its path traversal search times , that is, you can obtain the request information by traversing once, or traversing The process of searching for the optimal path for the distributed metadata MDS can quantitatively describe the locality of the metadata of the distributed storage file system.
[0190] In some implementations, determining the locality of metadata based on the path result, the number of request traversals, the corresponding marked path information from the source metadata service to the target metadata service, and the number of targets includes:
[0191] Get the number of traversals of each request from the source metadata service to the target metadata service;
[0192] Subtract the target quantity from the marked path information of the source metadata service to obtain first data;
[0193] Subtract 1 from the first data to obtain the second data;
[0194] The target quantity is multiplied by the marking path information of the target metadata service to obtain third data;
[0195] The fourth data is obtained by multiplying the number of request traversals corresponding to the current target metadata service by the second data;
[0196] Dividing the fourth data by the third data to obtain fifth data;
[0197] The fifth data is multiplied by the second path result corresponding to the current target metadata service to obtain the locality corresponding to the current target metadata service;
[0198] The locality corresponding to each target metadata service is added together to obtain the locality of the metadata.
[0199] Specifically, the locality function adopts It is expressed as follows:
[0200] ;
[0201] in, is the maximum number of MDSs ; At this time here This represents the target number in this embodiment. Here, quantitative statistics are performed based on each path of the metadata service path. For example, 5 metadata service paths correspond to 5 target numbers. The maximum number of MDSs here is the maximum number selected. Tag path information for source metadata services, Tag path information for target metadata services; Indicates The optimal path corresponding to the number of request traversals is connected between distributed cluster MDSs through dual 10G networks. Indicates the number of traversals The smaller the value, the better the locality of the distributed cluster metadata.
[0202] Among them, the first data is ; The second data is ; The third data is ; The fourth data is ; The fifth data is ; The locality corresponding to the current target metadata service is .
[0203] In a large-scale distributed storage system, when the number of MDS services is 8 to 16, the storage IO throughput of the distributed storage system can be increased by more than 35% by using the metadata management method based on the present invention. As the number of MDS services increases, the metadata locality of client hot data requests is significantly improved through the addressing optimization algorithm.
[0204] The locality function-based determination of the locality of the distributed cluster metadata provided in this embodiment improves the locality of the metadata and the total throughput of metadata operations per second, continuously optimizes and iterates the locality of the metadata, and improves the timeliness and scalability of the IO performance of the distributed storage system.
[0205] Through the addressing algorithm, the metadata path and delay are found, the optimal path method is quantified to improve the metadata distribution structure and the optimal path of metadata operation metadata, and a metadata addressing optimization evaluation algorithm and a metadata operation locality method are proposed to select the metadata path. With the increase in the scale of distributed storage file systems, based on the metadata management method of the present invention, compared with existing metadata distribution technologies, such as those based on data tables, Hash partitions, static or dynamic subtree partitions, the present invention can improve the total IO throughput and improve the locality of metadata for distributed storage file systems.
[0206] The above describes in detail various embodiments corresponding to the metadata addressing method. On this basis, the present invention also discloses a metadata addressing device corresponding to the above method. The metadata addressing device includes:
[0207] A first acquisition module is used to acquire a target number of metadata service paths in the distributed storage system; wherein the target number of metadata service paths is obtained by screening all metadata service paths in the distributed storage system using metadata characteristic parameters within a preset time;
[0208] A first calculation module, configured to perform granular calculation based on a target number of metadata service paths to obtain a first path result;
[0209] A second calculation module, configured to evaluate and calculate the first path result according to a path optimization strategy to obtain a second path result;
[0210] The first processing module is used to perform locality processing on the second path result according to a locality function to determine the locality of the metadata corresponding to the source metadata service to the target metadata service.
[0211] In some embodiments, after filtering and obtaining the first number of metadata service paths, the method further includes:
[0212] A first acquisition submodule is used to acquire a preset quantity;
[0213] A first judging submodule is used to judge whether the first number is greater than a preset number; if so, triggering a first sorting submodule, and if not, triggering a first taking submodule;
[0214] A first sorting submodule, used to sort the metadata service paths corresponding to the first quantity from large to small according to the time degree of the timestamp parameter occupying the request information;
[0215] The second submodule is used to intercept the metadata service paths corresponding to the preset target number as the metadata service paths of the target number, based on the metadata service path corresponding to the maximum time degree of occupying the request information;
[0216] The first is a submodule, configured to use the first number of metadata service paths as the target number of metadata service paths.
[0217] Since the embodiments of the device part correspond to the above embodiments, please refer to the description of the embodiments of the method part for the embodiments of the device part, and will not be repeated here.
[0218] For an introduction to a metadata addressing device provided by the present invention, please refer to the above method embodiment, and the present invention will not be repeated here. It has the same beneficial effects as the above metadata addressing method.
[0219] Figure 3 A structural diagram of a metadata addressing device provided by an embodiment of the present invention, such as Figure 3 As shown, the device comprises:
[0220] A memory 21, used for storing computer programs;
[0221] The processor 22 is used to implement the steps of the metadata addressing method when executing a computer program.
[0222] The metadata addressing device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.
[0223] Among them, the processor 22 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 22 may be implemented in at least one hardware form of a digital signal processor (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 22 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 22 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 22 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0224] The memory 21 may include one or more computer-readable storage media, which may be non-transitory. The memory 21 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 21 is at least used to store the following computer program 211, wherein, after the computer program is loaded and executed by the processor 22, it can implement the relevant steps of the metadata addressing method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 21 may also include an operating system 212 and data 213, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 212 may include Windows, Unix, Linux, etc. The data 213 may include, but is not limited to, data involved in the metadata addressing method, etc.
[0225] In some embodiments, the metadata addressing device may further include a display screen 23 , an input / output interface 24 , a communication interface 25 , a power supply 26 , and a communication bus 27 .
[0226] Those skilled in the art can understand that Figure 3 The structure shown in the figure does not constitute a limitation on the addressing device of metadata, and may include more or less components than those shown in the figure.
[0227] The processor 22 implements the metadata addressing method provided by any of the above embodiments by calling instructions stored in the memory 21 .
[0228] For an introduction to a metadata addressing device provided by the present invention, please refer to the above method embodiment, and the present invention will not be repeated here. It has the same beneficial effects as the above metadata addressing method.
[0229] Furthermore, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by the processor 22, the steps of the metadata addressing method as described above are implemented.
[0230] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0231] For an introduction to a computer-readable storage medium provided by the present invention, please refer to the above method embodiment, which will not be described in detail herein. It has the same beneficial effects as the above metadata addressing method.
[0232] Furthermore, the present invention also provides a computer program product, comprising a computer program / instruction, which implements the steps of the metadata addressing method when executed by a processor.
[0233] For an introduction to a computer program product provided by the present invention, please refer to the above method embodiment, which will not be described in detail herein. It has the same beneficial effects as the above metadata addressing method.
[0234] The above is a detailed introduction to a metadata addressing method, device, medium and product provided by the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referenced to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the present invention.
[0235] It should also be noted that, in this specification, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
Claims
1. A metadata addressing method, characterized in that: Applied to distributed storage systems, including: Obtain a target number of metadata service paths in the distributed storage system; wherein the target number of metadata service paths is obtained by screening all metadata service paths in the distributed storage system using metadata characteristic parameters within a preset time; the metadata service path is obtained from a path corresponding to any metadata service of a source node corresponding to the distributed storage system to any metadata service of a target node; each node of the distributed storage system includes at least one metadata service; if each node of the distributed storage system includes multiple metadata services, they include a primary metadata service and a backup metadata service; Perform granular calculation based on the target number of metadata service paths to obtain a first path result; Evaluate and calculate the first path result according to the path optimization strategy to obtain a second path result; Performing locality processing on the second path result according to a locality function to determine the locality of the metadata corresponding to the source metadata service to the target metadata service; Correspondingly, the first path result is obtained by performing granular calculation based on the target number of metadata service paths, including: Obtain the time parameters corresponding to the transmission of the request data under each metadata service path under the target quantity from the source node to the target node and the feedback information; Determine corresponding delay information according to the time parameter; Get the path length corresponding to each metadata service path under the target quantity; Establishing a mapping relationship between the path length and latency information of each metadata service path; Sorting the target number of metadata service paths according to the mapping relationship to obtain the first path result; Correspondingly, evaluating and calculating the first path result according to the path optimization strategy to obtain a second path result includes: Using the first path result as the initial output vector; Get the number of iterations and the preset number of layers; Performing feature calculation on the initial output vector according to a recursive algorithm to obtain an addressing matrix and an addressing feature matrix corresponding to the number of iterations and a preset number of layers; The second path result is determined according to the addressing matrix and the addressing characteristic matrix.
2. The metadata addressing method according to claim 1, characterized in that: The metadata characteristic parameters at least include a timestamp parameter; the target number of metadata service paths is obtained by screening all metadata service paths in the distributed storage system using the metadata characteristic parameters within a preset time, including: Adding a timestamp parameter to all metadata service paths in the distributed storage system in advance; In a case where request information appears in the distributed storage system within a preset time, the metadata service paths corresponding to the request information are screened according to the continuous timestamp parameters of the preset time to obtain a first number of metadata service paths; The first number of metadata service paths is used as the target number of metadata service paths.
3. The metadata addressing method according to claim 2, characterized in that: After the first number of metadata service paths are obtained through screening, the method further includes: Get the preset quantity; Determining whether the first quantity is greater than a preset quantity; If yes, then sorting the metadata service paths corresponding to the first number from large to small according to the time degree occupied by the timestamp parameter in the request information; Taking the metadata service path corresponding to the maximum time degree of occupying the request information as a benchmark, the metadata service paths corresponding to the preset target number before interception are taken as the metadata service paths of the target number; If not, the first number of metadata service paths is used as the target number of metadata service paths.
4. The metadata addressing method according to claim 1, characterized in that: The metadata characteristic parameters at least include access permission request information; the target number of metadata service paths is obtained by screening all metadata service paths in the distributed storage system using the metadata characteristic parameters within a preset time, including: Within a preset time and when request information appears in the distributed storage system, the metadata service paths corresponding to the requested access authority information of the request information are screened to obtain a second number of metadata service paths; The second number of metadata service paths is used as the target number of metadata service paths.
5. The metadata addressing method according to claim 1, characterized in that: The initial output vector is characterized by calculating the number of iterations and the addressing matrix and the addressing characteristic matrix corresponding to the preset number of layers according to the recursive algorithm, including: The path addressing information corresponding to the initial output vector is used as the addressing matrix of the first layer; Determine an addressing feature matrix of the first layer according to the addressing matrix of the first layer, the number of iterations and the initial output vector; Using the addressing feature matrix of the first layer as the initial output vector of the second layer; The path addressing information corresponding to the initial output vector of the second layer is used as the addressing matrix of the second layer, and the addressing feature matrix of the third layer is determined according to the addressing matrix of the second layer, the number of iterations and the initial output vector of the second layer; and so on, until the current number of iterations reaches the preset number of iterations, when the current number of layers reaches the preset number of layers, the addressing matrix of the layer and the addressing feature matrix of the layer are output; wherein, is a positive integer greater than or equal to 1.
6. The metadata addressing method according to claim 1, characterized in that: The first path result is evaluated and calculated according to the path optimization strategy to obtain a second path result, including: Obtaining a historical path result and corresponding path access information corresponding to the first path result; A machine learning algorithm is called to process the historical path result and the path access information to obtain the second path result.
7. The metadata addressing method according to claim 5, characterized in that: Performing locality processing on the second path result according to the locality function to determine the locality of the metadata corresponding to the source metadata service to the target metadata service includes: Obtaining a path result from the source metadata service to the metadata corresponding to the target metadata service in the second path result; Obtaining the number of requests for metadata corresponding to the source metadata service to the target metadata service; The locality of the metadata is determined according to the path result, the number of request traversals, the marked path information corresponding to the source metadata service to the target metadata service, and the number of targets.
8. The metadata addressing method according to claim 7, characterized in that: The process of determining the number of request traversal times includes: Get preset request information; Sending preset request information from the source node where the source metadata service is located to other nodes except the source node, and using the other nodes as the target nodes where the target metadata service is located; The target node where the target metadata service is located is traversed to obtain the preset request information and the corresponding request traversal times.
9. The metadata addressing method according to claim 8, characterized in that: Determining the locality of the metadata according to the path result, the number of request traversals, the marked path information corresponding to the source metadata service to the target metadata service, and the number of targets includes: Obtaining the number of traversals of each request corresponding to the source metadata service to the target metadata service; Subtract the target quantity from the marked path information of the source metadata service to obtain first data; Subtract 1 from the first data to obtain second data; The target quantity is multiplied by the marking path information of the target metadata service to obtain third data; The fourth data is obtained by multiplying the number of request traversals corresponding to the current target metadata service by the second data; Dividing the fourth data by the third data to obtain fifth data; Multiplying the fifth data by the second path result corresponding to the current target metadata service to obtain the locality corresponding to the current target metadata service; The locality corresponding to each target metadata service is added together to obtain the locality of the metadata.
10. A metadata addressing device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the metadata addressing method as claimed in any one of claims 1 to 9 when executing the computer program.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the metadata addressing method according to any one of claims 1 to 9 are implemented.
12. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the metadata addressing method according to any one of claims 1 to 9 are implemented.
