Method and device for determining far-end index node, equipment and medium
By building a scope index cache in a distributed architecture and directly retrieving target data from the cache, the problem of poor performance in accessing storage nodes under the distributed architecture is solved, and the data access performance is significantly improved.
Patent Information
- Application Number
- CN202310785150.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-29
- Publication Date
- 2024-12-31
AI Technical Summary
Under a distributed architecture, the range index performance of accessing storage nodes is low, resulting in a degradation in data access performance.
By building a range index cache in the computing node, we search for whether there is a target cache node covering the scope of the request, and determine the remote inode node in the storage node based on the target cache node, reducing the index structure of recursive access to the storage node, and directly from the cache Search target data.
It effectively reduces the overhead of accessing range indexes in remote storage nodes and improves overall data access performance.
Smart Images

Figure CN119226284A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of distributed storage, and in particular to a method for determining a remote index node, an apparatus for determining a remote index node, a device for determining a remote index node, and a computer-readable storage medium. Background Art
[0002] At present, with the rise of cloud services, more and more database systems and storage systems are trying to be deployed in a distributed environment to expand performance. In this architecture, some servers are computing nodes, which are mainly responsible for computing tasks in system operation; the other part of the servers are storage nodes, which are mainly responsible for storing data and its corresponding range index structure. When the computing node needs to read the target data, it needs to use a high-performance network to recursively access the nodes at each level of the index structure in the storage node until the target data is retrieved. It can be seen that the entire access process involves a large number of network transmission operations, which can easily lead to a decrease in data access performance. Summary of the invention
[0003] The main purpose of the present application is to provide a method for determining a remote index node, a device for determining a remote index node, and a computer-readable storage medium, aiming to solve the technical problem of poor performance of range indexes for accessing storage nodes under the current distributed architecture.
[0004] To achieve the above object, the present application provides a method for determining a remote index node, the method being applied to a computing node, the method comprising:
[0005] In response to a determination request of a remote index node, searching in cache index nodes whether there is a target cache node covering a range of the determination request;
[0006] After determining that there is a target cache node that covers the range of the determined request, a remote index node in the storage node is determined based on the target cache node, wherein the remote index node is an index node in the index node layer of the storage node located above the leaf node layer.
[0007] The present application also provides a device for determining a remote index node, the device being applied to a computing node, and comprising:
[0008] A retrieval module, configured to respond to a determination request of a remote index node and to retrieve in the cache index node whether there is a target cache node covering the range of the determination request;
[0009] A determination module is used to determine a remote index node in a storage node based on the target cache node after determining that there is a target cache node covering the range of the determined request, wherein the remote index node is an index node in the index node layer of the storage node located above the leaf node layer.
[0010] The present application also provides a device for determining a remote index node, the device for determining a remote index node comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the method for determining a remote index node as described above when executed by the processor.
[0011] The present application 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 method for determining a remote index node as described above are implemented.
[0012] The present application discloses a method for determining a remote index node, an apparatus for determining a remote index node, a device for determining a remote index node, and a computer-readable storage medium, wherein the method is applied to a computing node, and in response to a determination request of a remote index node, searches in a cache index node whether there is a target cache node that covers the range of the determination request; after determining that there is a target cache node that covers the range of the determination request, determines a remote index node in a storage node based on the target cache node, wherein the remote index node is an index node in an index node layer of the storage node located above a leaf node layer.
[0013] In the present application, a range index cache is constructed for a computing node under a distributed architecture, and a cache index node is constructed in the range index cache. A target cache node that covers a determined request range of a remote index node is determined by retrieval, and a remote index node in a storage node is determined according to the target cache node, wherein the remote index node is an index node in an index node layer of the storage node located above a leaf node layer, that is, the remote index node is an index node at the bottom of the index node layer of the storage node.
[0014] Therefore, there is no need to recursively access nodes at each level of the index structure in the storage node until the target data is retrieved. Instead, it is only necessary to retrieve the target cache node that covers the determined request range of the remote index node in the range index cache, and then directly determine the remote index node in the storage node according to the target cache node to retrieve the target data. In this way, the overhead of accessing the range index in the remote storage node is reduced, thereby improving the overall data access performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1It is a structural diagram of an operating device of a hardware operating environment involved in an embodiment of the present application;
[0016] Figure 2 This is a typical range index diagram;
[0017] Figure 3 A schematic diagram of an application environment of an embodiment of a system for determining a remote index node according to an embodiment of the present application;
[0018] Figure 4 It is a schematic diagram of an organizational block diagram of an embodiment of a system for determining a remote index node involved in an embodiment of the present application;
[0019] Figure 5 This is a flow chart of an embodiment of a system for determining a remote index node according to an embodiment of the present application;
[0020] Figure 6 A schematic diagram of a range search of an embodiment of a system for determining a remote index node according to an embodiment of the present application;
[0021] Figure 7 A schematic diagram of heat management of an embodiment of a system for determining a remote index node according to an embodiment of the present application;
[0022] Figure 8 This is an example diagram of range search and heat update of an embodiment of a system for determining remote index nodes according to an embodiment of the present application;
[0023] Fig. 9 A schematic diagram of a remote index node determination device involved in an embodiment of the present application.
[0024] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0025] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0026] Reference Figure 1 , Figure 1 This is a schematic diagram of the operating equipment structure of the hardware operating environment involved in the embodiment of the present application.
[0027] like Figure 1As shown, the operating device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0028] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the operating device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0029] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a data storage module, a network communication module, a user interface module and a computer program.
[0030] exist Figure 1 In the running device shown, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the running device of the present application can be set in the running device, and the running device calls the computer program stored in the memory 1005 through the processor 1001, and performs the following operations:
[0031] In response to a determination request of a remote index node, searching in cache index nodes whether there is a target cache node covering a range of the determination request;
[0032] After determining that there is a target cache node that covers the range of the determined request, a remote index node in the storage node is determined based on the target cache node, wherein the remote index node is an index node in the index node layer of the storage node located above the leaf node layer.
[0033] In one embodiment, the processor 1001 may call a computer program stored in the memory 1005 and further perform the following operations:
[0034] The step of searching in the cache index node whether there is a target cache node covering the range of the determined request includes:
[0035] Based on the node start value in the range index cache structure, it is searched in the cache index node whether there is a target cache node covering the range of the determined request, wherein the range index cache structure is organized based on the node start value of the cache index node.
[0036] In one embodiment, the processor 1001 may call a computer program stored in the memory 1005 and further perform the following operations:
[0037] The step of determining a remote index node in a storage node according to the target cache node comprises:
[0038] After determining that the node start value of the target cache node is different from the node start value of the remote index node, the node start value of the target cache node is updated to be the node start value of the remote index node.
[0039] In one embodiment, the processor 1001 may call a computer program stored in the memory 1005 and further perform the following operations:
[0040] The step of determining a remote index node in a storage node according to the target cache node comprises:
[0041] After determining that the node start value of the target cache node is the same as the node start value of the remote index node, the storage data corresponding to the actual storage address of the remote index node is accessed and read from the leaf node layer of the storage node.
[0042] In one embodiment, the processor 1001 may call a computer program stored in the memory 1005 and further perform the following operations:
[0043] The method further comprises:
[0044] Counting the access frequency of the remote index node;
[0045] The remote index node whose access frequency is greater than a preset frequency threshold is determined as a new cache index node.
[0046] In one embodiment, the processor 1001 may call a computer program stored in the memory 1005 and further perform the following operations:
[0047] The method further comprises:
[0048] After determining the new cache index node, the new cache index node is sorted in the existing hot node list based on the access frequency to obtain a new hot node list, and a new range index cache structure is obtained based on the node starting value of the cache index node in the new hot node list.
[0049] In one embodiment, the processor 1001 may call a computer program stored in the memory 1005 and further perform the following operations:
[0050] The method further comprises:
[0051] After determining that the storage space of the range index cache structure of the cache index node is greater than a preset space threshold, the cache index node at the tail of the linked list queue of the hot node linked list is deleted until the storage space is less than or equal to the preset space threshold.
[0052] Reference Figure 2 ,Index is one of the necessary structures in data management systems (for example, database systems and storage systems), and is the most common means to support high-performance queries. Common index structures can be divided into key-value indexes (for example, HashTable) and range indexes. For example, Figure 2 In the key value index, the corresponding target value Value can be quickly found according to the input key value Key. In the range index, a set of target value Value storage locations that meet the conditions can be quickly found according to the input range key value [Key1, Key2]. Figure 2 As shown in the figure, the range index structure can be divided into two parts: the index node layer and the leaf node layer. In essence, the index node layer of the range index can be regarded as a regression tree model, which ensures that the input key value range is mapped to one or more leaf nodes under the premise of limited error, and then reads the corresponding target value Value from the storage through the address information in the leaf node.
[0053] Reference Figure 3, the heat-aware range index caching solution of this application is deployed in a typical distributed environment. The servers in the distributed environment can be divided into two categories, which can be computing nodes and storage nodes respectively, and the two are connected to each other through high-performance networks, such as RDMA (Remote Direct Memory Access) and CXL (Compute Express Link, a high-speed serial protocol). Each computing node provides a system interface (for example, Put, Get, and Scan) to help applications obtain data from remote storage nodes. The storage node is mainly responsible for storing various data blocks and building range indexes based on these data blocks (for example, Figure 2 Therefore, when the client of the computing node needs to access a specific data block in the storage node, it needs to access the index structure in the storage node from top to bottom multiple times (the minimum number of times is the index structure layer height) until the target data block is returned. Figure 3 For example, when facing a storage node based on a B-Tree index, for data <1> The search needs to first access the remote L2 layer root node <30> Then visit the root node at L1 layer <30> The left child node <8,25>, and finally find the left child node database <1,3,7> of the L0 layer, and find the corresponding data <1> Similarly, when facing a storage node based on the SkipList index, the computing node also needs to access multiple layers of index nodes. The specific process is not described here. It can be seen that in the existing distributed environment, multiple remote communications need to be designed for access to target data, resulting in a high overall access latency.
[0054] In order to solve the performance problem of accessing range indexes in storage nodes under a distributed architecture, this application proposes a heat-aware range index caching solution. Figure 4 , through the index cache module, heat statistics module and heat management module to cache the range index in the remote storage node, and at the same time meet the three requirements of hot spot tracking, range search and data consistency, thereby effectively reducing the number of index accesses in the process of computing nodes querying remote storage nodes, thereby improving data access performance.
[0055] Among them, index cache module: First, the index cache module is introduced inside the computing node to temporarily store the frequently accessed hot nodes (for example, Figure 4L1 layer nodes <20,30,35>,<40,50>,<60,65>,<80,90>). It is worth noting that the index node in the cache only needs to record the starting value of the node and the actual storage address (for example, Figure 4 Index cache <20> , <40> , <60> , <80> ). For access to any cache node, it is still necessary to read the actual remote data according to the actual storage address. If the starting value of the remote index node read does not match the starting value in the cache, it proves that the cache node is invalid (that is, a split or update has occurred) and needs to be updated immediately. Then, in the next retrieval after the update, the remote index node is read again according to the cache index node after the updated starting value. In addition, the module will organize the cache index nodes according to their starting values to form a specific range index structure (for example, SkipList or B-Tree), thereby reducing remote access while meeting the range search requirements. In this way, it is only necessary to directly access the hotspot nodes of the L1 layer of the storage node from the index cache of the computing node according to the starting value of the cache index node, without the need to traverse from L3 to L2 to L1. In addition, the subsequent heat statistics module and heat management module serve the index cache module and its swap-in and swap-out operations.
[0056] Heat Statistics Module: The compute node also uses Count-Min Sketch to construct a heat statistics module, so as to count the access frequency of L1 layer index nodes in real time. The access statistics include cache index nodes that hit the cache index nodes, cache index nodes that miss the cache index nodes, and access to L1 layer index nodes. When the access frequency (heat) of an index node reaches the set threshold, it will be considered a hot index node and should be reported to the index cache module for organization and management. For example, Figure 4 The middle L1 layer index nodes <20,30,35>, <40,50>, <60,65>, <80,90> are selected as hot index nodes and need to be cached on the computing nodes, while the L1 index nodes <5,10,15> do not need to be cached.
[0057] Heat management module: Finally, a heat management module is further introduced inside the computing node to record the heat changes of the cache index nodes. In essence, the heat management module is a one-way linked list, each of which corresponds to a cache index node, and the linked list represents the heat from high to low from the beginning to the end. For example, Figure 4The index nodes of the four caches are sorted from left to right according to the level of heat. When facing the heat index node reported by the sample, the existing index node will be moved to the head of the linked list, and the new node will be inserted into the head of the linked list and then inserted into the index module. When the cache space is insufficient, the cache index node corresponding to the tail of the linked list will be deleted. Based on the cooperation of the statistical module and the heat module, this caching solution meets the heat tracking needs. Among them, considering that the cost of completely real-time sorting is too high, approximate sorting can be used, roughly referring to the heat level for sorting. In this way, based on the node heat in the one-way linked list, the cache nodes in the index structure of the index cache module are managed, that is, through Figure 2 Swapping in and out is used to add and delete cache nodes in the index structure.
[0058] In the above, by constructing a range index cache for the computing nodes under the distributed architecture, the overhead of accessing the range index in the remote storage node is reduced, thereby improving the overall data access performance. In order to realize the range index cache, (1) Hot spot tracking: The computing node has limited memory space, so it can only cache some hot index nodes. In the face of ever-changing access loads, the present application tracks the hot nodes in the range index in real time, caches the hotter index data in time, and removes the cooler index data. (2) Range search: In order to enable the cached index nodes to still support range search, the present application organizes them according to specific range search data structures (for example, B-Tree and SkipList). (3) Consistency guarantee: The range index often changes with the update of data. In order to timely perceive the changes in the range index in the storage node, the present application adopts a cache address strategy to ensure that the cache in the computing node is consistent with the storage node, thereby avoiding reading erroneous data from the cache.
[0059] The present application embodiment provides a method for determining a remote index node, referring to Figure 5 In one embodiment of a method for determining a remote index node, the method is applied to a computing node, and the method includes:
[0060] Step S10 , in response to a determination request of a remote index node, searching in cache index nodes whether there is a target cache node covering a range of the determination request.
[0061] The method for determining the remote index node in the present application is applicable to scenarios where computing and storage are separated and memory is decoupled under a distributed architecture, and is also applicable to scenarios where virtualization and easy access to cloud storage are required.
[0062] Reference Figure 6In order to avoid frequent access to the index structure in the remote storage node, in this embodiment, the interaction with the index cache module is introduced in the existing range search process. When a range search request is received, the computing node will first search the index cache module and search for a cache index node that can cover the determined request range of the remote index node from the corresponding range index cache structure (SkipList or B-Tree).
[0063] Step S20, after determining that there is a target cache node covering the range of the determined request, determine the remote index node in the storage node according to the target cache node, wherein the remote index node is an index node in the index node layer of the storage node located above the leaf node layer.
[0064] If the index cache module provides a cache index node that meets the range search condition, the computing node will read all L1 layer remote index nodes that meet the condition from the storage node in sequence according to their corresponding positions. If there is no cache index node that meets the range condition, the computing node will choose to directly traverse the range index of the storage node according to the original process. Figure 8 As shown, when the computing node receives a search request for the range [65,80], it directly searches the Skiplist in the index cache module to obtain the cached index nodes 60 and 80.
[0065] Exemplarily, the step of searching in the cache index node whether there is a target cache node covering the range of the determined request includes:
[0066] Based on the node start value in the range index cache structure, it is searched in the cache index node whether there is a target cache node covering the range of the determined request, wherein the range index cache structure is organized based on the node start value of the cache index node.
[0067] In one embodiment, the cache index nodes are organized according to the starting values of the cache index nodes to form a specific range index structure (e.g., SkipList or B-Tree), and the cache index nodes are searched based on the node starting values in the range index cache structure to see whether there is a target cache node that covers the determined request range of the remote index node. This reduces remote access while meeting the range search requirements. In this way, it is only necessary to directly access the hotspot nodes of the L1 layer of the storage node from the index cache of the computing node according to the starting value of the cache index node, without the need to traverse from L3 to L2 to L1.
[0068] Exemplarily, the step of determining a remote index node in a storage node according to the target cache node includes:
[0069] After determining that the node start value of the target cache node is different from the node start value of the remote index node, the node start value of the target cache node is updated to be the node start value of the remote index node.
[0070] Reference Figure 6 If the read index node and the cached index node have different starting values, it means that the corresponding index node in the storage node has been split or merged, and the cached index node is invalid. It should be updated to the latest value read, and then the query process should be re-initiated. Otherwise, it is considered that the correct L1 layer index node has been read, and the corresponding L0 layer data is further read.
[0071] Exemplarily, the step of determining a remote index node in a storage node according to the target cache node includes:
[0072] After determining that the node start value of the target cache node is the same as the node start value of the remote index node, the storage data corresponding to the actual storage address of the remote index node is accessed and read from the leaf node layer of the storage node.
[0073] After determining that the node start values of the target cache node and the remote index node are the same, the storage data corresponding to the actual storage address of the remote index node can be read from the leaf node layer L0 of the storage node.
[0074] In this embodiment, the method is applied to a computing node, and in response to a determination request of a remote index node, it is retrieved in the cache index node whether there is a target cache node that covers the range of the determination request; after determining that there is a target cache node that covers the range of the determination request, the remote index node in the storage node is determined based on the target cache node, wherein the remote index node is an index node in the index node layer of the storage node located above the leaf node layer.
[0075] In this embodiment, a range index cache is constructed for computing nodes under a distributed architecture, and a cache index node is constructed in the range index cache. A target cache node that covers the range of the determined request of the remote index node is determined by searching, and a remote index node in the storage node is determined according to the target cache node, wherein the remote index node is an index node in the index node layer of the storage node located above the leaf node layer, that is, the remote index node is the bottommost index node in the index node layer of the storage node.
[0076] Therefore, there is no need to recursively access nodes at each level of the index structure in the storage node until the target data is retrieved. Instead, it is only necessary to retrieve the target cache node that covers the determined request range of the remote index node in the range index cache, and then directly determine the remote index node in the storage node according to the target cache node to retrieve the target data. In this way, the overhead of accessing the range index in the remote storage node is reduced, thereby improving the overall data access performance.
[0077] In another embodiment of the method for determining a remote index node of the present application, the method further includes:
[0078] Counting the access frequency of the remote index node;
[0079] The remote index node whose access frequency is greater than a preset frequency threshold is determined as a new cache index node.
[0080] The compute node also uses Count-Min Sketch to build a heat statistics module to count the frequency of access to L1 layer index nodes in real time. The access statistics include cache index node hits, cache index node misses, and access to L1 layer index nodes. When the access frequency (heat) of an index node reaches the set threshold, it will be considered a cache index node (hot index node) and will be reported to the index cache module for organization and management.
[0081] Exemplarily, the method further includes:
[0082] After determining the new cache index node, the new cache index node is sorted in the existing hot node list based on the access frequency to obtain a new hot node list, and a new range index cache structure is obtained based on the node starting value of the cache index node in the new hot node list.
[0083] A heat management module is further introduced inside the computing node to record the heat changes of the cache index nodes. In essence, the heat management module is a one-way linked list, each of which corresponds to a cache index node, and the linked list represents the heat from high to low from the beginning to the end. For example, Figure 4 The four cached index nodes are sorted from left to right according to the heat level. When facing the hot index node reported by the sample, the existing index node will be moved to the head of the linked list, and the new node will be inserted into the head of the linked list and then inserted into the index module. In this way, the new range index cache structure can be further organized according to the node start value of the cache index node in the new hot node linked list.
[0084] Exemplarily, the method further includes:
[0085] After determining that the storage space of the range index cache structure of the cache index node is greater than a preset space threshold, the cache index node at the tail of the linked list queue of the hot node linked list is deleted until the storage space is less than or equal to the preset space threshold.
[0086] When the cache space is insufficient, the cache index node corresponding to the tail of the linked list will be deleted. Based on the cooperation of the statistics module and the heat module, this cache solution meets the heat tracking requirements. In this way, based on the node heat in the one-way linked list, the cache nodes in the index structure of the index cache module are managed, that is, through Figure 2 Swapping in and out is used to add and delete cache nodes in the index structure.
[0087] In this embodiment, a cache management method for range index in a distributed system is proposed, which requires that when caching all nodes, hot nodes in the range index can be cached in real time according to changes in index access popularity.
[0088] Reference Figure 7 In order to cache hot index nodes in real time, heat sampling and heat management are required after the range search process is completed. When data is successfully read from a storage node, its corresponding L1 layer index node will be accessed. This module will randomly select a part of the index nodes and use a variety of hash functions in the Count-Min Sketch (such as Figure 4 The minimum value is calculated using the four hash functions H1, H2, H3 and H4 in the Count-Min Sketch, and then filled into the corresponding array index position in the Count-Min Sketch. When a certain index of all arrays in the Count-Min Sketch is filled, the index node corresponding to the index is considered to be a hotspot, which should be reported to the heat management module and the index cache module. If the heat management and index cache modules do not contain the node, it should be inserted. It is worth noting that the heat management module also needs to move the reported hotspot to the head of the linked list. For example, Figure 8 The middle L1 layer index nodes 60 and 80 are moved to the head of the linked list after being accessed. Finally, if the index cache module does not have enough space, the heat management module will continue to report the index node with the lowest current heat (i.e., the tail of the linked list) to the index cache module, allowing the index cache module to delete the node until the space threshold is met.
[0089] In this way, a cache mechanism is introduced into the determination method of remote index nodes under the existing distributed architecture, thereby reducing the number of remote accesses during index search and enabling the cache to be updated in real time according to changes in access load.
[0090] Reference Fig. 9In addition, the embodiment of the present application further provides a device for determining a remote index node, and the device for determining a remote index node includes:
[0091] A search module M1 is used to search in cache index nodes whether there is a target cache node covering the range of the determination request in response to a determination request of a remote index node;
[0092] Determination module M2 is used to determine the remote index node in the storage node according to the target cache node after determining that there is a target cache node covering the range of the determined request, wherein the remote index node is an index node in the index node layer of the storage node located above the leaf node layer.
[0093] Exemplarily, the retrieval module is further used for:
[0094] Based on the node start value in the range index cache structure, it is searched in the cache index node whether there is a target cache node covering the range of the determined request, wherein the range index cache structure is organized based on the node start value of the cache index node.
[0095] Exemplarily, the determining module is further used for:
[0096] After determining that the node start value of the target cache node is different from the node start value of the remote index node, the node start value of the target cache node is updated to be the node start value of the remote index node.
[0097] Exemplarily, the determining module is further used for:
[0098] After determining that the node start value of the target cache node is the same as the node start value of the remote index node, the storage data corresponding to the actual storage address of the remote index node is accessed and read from the leaf node layer of the storage node.
[0099] Exemplarily, the remote index node determination device further includes a statistical module, which is used to:
[0100] Counting the access frequency of the remote index node;
[0101] The remote index node whose access frequency is greater than a preset frequency threshold is determined as a new cache index node.
[0102] Exemplarily, the remote index node determination device further includes a sorting module, which is used to:
[0103] After determining the new cache index node, the new cache index node is sorted in the existing hot node list based on the access frequency to obtain a new hot node list, and a new range index cache structure is obtained based on the node starting value of the cache index node in the new hot node list.
[0104] Exemplarily, the remote index node determination device further includes a deletion module, which is used to:
[0105] After determining that the storage space of the range index cache structure of the cache index node is greater than a preset space threshold, the cache index node at the tail of the linked list queue of the hot node linked list is deleted until the storage space is less than or equal to the preset space threshold.
[0106] The remote index node determination device provided by the present application adopts the remote index node determination method in the above-mentioned embodiment to solve the technical problem of low performance of range indexing of accessing storage nodes under the current distributed architecture. Compared with the prior art, the beneficial effects of the remote index node determination device provided by the embodiment of the present application are the same as the beneficial effects of the remote index node determination method provided by the above-mentioned embodiment, and other technical features in the remote index node determination device are the same as the features disclosed in the above-mentioned embodiment method, which will not be repeated here.
[0107] In addition, an embodiment of the present application also provides a remote index node determination device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the computer program is executed by the processor, the steps of the remote index node determination method as described above are implemented.
[0108] In addition, an embodiment of the present application further 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 method for determining a remote index node as described above are implemented.
[0109] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system 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 system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0110] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0111] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for determining a remote index node, characterized in that: The method is applied to a computing node, and the method comprises: In response to a determination request of a remote index node, searching in cache index nodes whether there is a target cache node covering a range of the determination request; After determining that there is a target cache node that covers the range of the determined request, a remote index node in the storage node is determined based on the target cache node, wherein the remote index node is an index node in the index node layer of the storage node located above the leaf node layer.
2. The method for determining a remote index node according to claim 1, wherein: The step of searching in the cache index node whether there is a target cache node covering the range of the determined request includes: Based on the node start value in the range index cache structure, it is searched in the cache index node whether there is a target cache node covering the range of the determined request, wherein the range index cache structure is organized based on the node start value of the cache index node.
3. The method for determining a remote index node according to claim 1, wherein: The step of determining a remote index node in a storage node according to the target cache node comprises: After determining that the node start value of the target cache node is different from the node start value of the remote index node, the node start value of the target cache node is updated to be the node start value of the remote index node.
4. The method for determining a remote index node according to claim 1, wherein: The step of determining a remote index node in a storage node according to the target cache node comprises: After determining that the node start value of the target cache node is the same as the node start value of the remote index node, the storage data corresponding to the actual storage address of the remote index node is accessed and read from the leaf node layer of the storage node.
5. The method for determining a remote index node according to claim 2, wherein: The method further comprises: Counting the access frequency of the remote index node; The remote index node whose access frequency is greater than a preset frequency threshold is determined as a new cache index node.
6. The method for determining a remote index node according to claim 5, characterized in that: The method further comprises: After determining the new cache index node, the new cache index node is sorted in the existing hot node list based on the access frequency to obtain a new hot node list, and a new range index cache structure is obtained based on the node starting value of the cache index node in the new hot node list.
7. The method for determining a remote index node according to claim 6, wherein: The method further comprises: After determining that the storage space of the range index cache structure of the cache index node is greater than a preset space threshold, the cache index node at the tail of the linked list queue of the hot node linked list is deleted until the storage space is less than or equal to the preset space threshold.
8. A device for determining a remote index node, characterized in that: The device is applied to a computing node, and comprises: A retrieval module, configured to respond to a determination request of a remote index node and to retrieve in the cache index node whether there is a target cache node covering the range of the determination request; A determination module is used to determine a remote index node in a storage node based on the target cache node after determining that there is a target cache node covering the range of the determined request, wherein the remote index node is an index node in the index node layer of the storage node located above the leaf node layer.
9. A device for determining a remote index node, characterized in that: The remote index node determination device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the remote index node determination method as described in any one of claims 1 to 7.
10. 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 method for determining a remote index node according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Method and apparatus for determining remote index node, device, and medium
EP4722939A1
