Jump table adjustment method and device, storage medium, and electronic device

By adjusting the weight value of the index node according to the number of accesses in the jump table and performing corresponding addition or deletion operations, the problem of similar hit efficiency of hot data and cold data is solved and the overall performance is improved.

CN118673025BActive Publication Date: 2025-01-24SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411159398.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2025-01-24
Estimated Expiration
2044-08-22

AI Technical Summary

Technical Problem

In the prior art, the hit efficiency of hot and cold data is similar, resulting in an impact on overall performance.

Method used

By determine the weight value of the access to the number of access nodes in each index node in the jump table, and adjust the index node, including adding or deleting the index node to optimize the hit efficiency of the hot data.

Benefits of technology

It improves the hit efficiency of hot data and ensures the indexing rate of hot data, thus improving the overall performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118673025B_ABST
    Figure CN118673025B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a method and device for adjusting a jump list, a storage medium, and an electronic device, wherein the method includes: determining a weight value of each index node in the jump list based on the number of accesses to each index node in the jump list; adjusting the index nodes in the jump list based on the weight value of each index node, wherein adjusting the index nodes in the jump list includes at least one of the following: adding an index node, deleting an index node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computers, and more specifically, to a method and device for adjusting a jump table, a storage medium, and an electronic device. Background Art

[0002] Internet companies usually need to store various data generated by users on storage servers. Storage servers save user data and provide high-speed access services when users access them. Storage servers can usually ensure the security of user data. Even if some hard drives are damaged, user data will not be lost. All of this is usually achieved by hard disk RAID. The RAID card is a key component used to provide RAID services on storage servers.

[0003] The services provided by RAID cards are usually low-latency, all of which are realized by the read cache in the RAID card. The read cache in the RAID card is usually implemented using a red-black tree, but in recent years, as the memory space becomes larger and larger, a jump table is also commonly used to implement the read cache. The jump table is a search data structure similar to the red-black tree, with an average time complexity of O(logn).

[0004] The HOST accesses the data on the hard disk through the RAID card. The RAID card manages the hard disk space in a unified manner and forms the corresponding volume. The HOST needs to provide the LBA logical address and length when accessing the volume. The RAID card usually stores frequently accessed data in the cache to speed up external read and write services. The following is an LBA cache implemented using a jump table. The numbers in the nodes represent the corresponding LBA addresses.

[0005] When data access comes, the LBA address is first used to query in the skip list. The entry node for the query is the node in the upper left corner of the skip list. The search method is to first compare horizontally, find the first node that is greater than or equal to the LBA address to be queried, and then move downward, searching layer by layer, and finally find the corresponding data in the data area at the bottom layer.

[0006] When the skip list is generated, the nodes of the previous layer appear randomly. Usually, in order to achieve the best effect, the probability of upward generation is 1 / 2. However, in most systems, 20% of the data accounts for 80% of the popularity. Therefore, this method of randomly generating indexes upward cannot distinguish between hot data and random data. This will cause the time for each generated index node to access hot data and random data to be similar. This will affect the overall performance.

[0007] With regard to related technologies, no effective solution has been proposed so far to the problem that the hit efficiency of hot data and cold data is similar, which in turn affects the overall performance.

[0008] Therefore, it is necessary to improve the related technology to overcome the above-mentioned defects in the related technology. Summary of the invention

[0009] The embodiments of the present application provide a method and device for adjusting a jump table, a storage medium, and an electronic device, so as to at least solve the problem in the related art that the hit efficiency of hot data and cold data is similar, thereby affecting the overall performance.

[0010] According to one embodiment of the present application, a method for adjusting a skip list is provided, comprising: determining a weight value of each index node in the skip list based on the number of accesses to each index node in the skip list; and adjusting the index nodes in the skip list based on the weight value of each index node, wherein adjusting the index nodes in the skip list comprises at least one of the following: adding an index node, deleting an index node.

[0011] In an exemplary embodiment, the index nodes in the jump list are adjusted according to the weight value of each index node, including: executing an adjustment step: determining the weight value of the index node of the Nth index layer in the jump list, and adjusting the index nodes of the Nth index layer according to the weight value of the index node of the Nth index layer, wherein N is a positive integer, and N is M, M-1, ..., 2, 1 in sequence, the Mth index layer is the bottom index layer in the jump list, and the first index layer is the highest index layer in the jump list; looping the adjustment step until the index nodes in the highest index layer in the jump list are adjusted.

[0012] In an exemplary embodiment, the index nodes of the N-th index layer are adjusted according to the weight values ​​of the index nodes of the N-th index layer, including: determining a first index node with the smallest weight value in the N-th index layer, and determining a second index node with the largest weight value in the N-th index layer; and adjusting the index nodes of the N-th index layer according to the first index node and the second index node.

[0013] In an exemplary embodiment, the index nodes of the Nth index layer are adjusted according to the first index node and the second index node, including: adding a third index node after the second index node, and determining whether the first index node has an upper node; if the first index node does not have an upper node, deleting the first index node; if the first index node has an upper node, deleting the first index node and the upper node.

[0014] In an exemplary embodiment, after adding a third index node after the second index node, the method further includes: determining a first weight value of the second index node, and determining a second weight value and a third weight value based on the first weight value, wherein the sum of the second weight value and the third weight value is the first weight value; updating the first weight value of the second index node to the second weight value, and determining the weight value of the third index node to be the third weight value.

[0015] In an exemplary embodiment, after deleting the first index node, the method further includes: determining a fourth weight value of the first index node, and determining a fifth weight value of a fourth index node, wherein the fourth index node is the index node before the first index node; determining the sum of the fourth weight value and the fifth weight value, and updating the fifth weight value of the fourth index node to the sum of the fourth weight value and the fifth weight value.

[0016] In an exemplary embodiment, after deleting the first index node and the upper-level node, the method further includes: determining a fourth weight value of the first index node, and determining a fifth weight value of the fourth index node, determining the sum of the fourth weight value and the fifth weight value, and updating the fifth weight value of the fourth index node to the sum of the fourth weight value and the fifth weight value, wherein the fourth index node is the index node before the first index node; determining a sixth weight value of the upper-level node, and determining a seventh weight value of the fifth index node, determining the sum of the sixth weight value and the seventh weight value, and updating the seventh weight value of the fifth index node to the sum of the sixth weight value and the seventh weight value, wherein the fifth index node is the index node before the upper-level node.

[0017] In an exemplary embodiment, after deleting the first index node and the upper node, the method further includes: determining a sixth index node in the Nth index layer; and adding a seventh index node in the N-1th index layer, wherein the seventh index node is an upper node of the sixth index node.

[0018] In an exemplary embodiment, determining the sixth index node in the Nth index layer includes: determining a random number for each index node in the Nth index layer; and determining the sixth index node based on the random number of each index node and a weight value of each index node.

[0019] In an exemplary embodiment, the sixth index node is determined based on the random number of each index node and the weight value of each index node, including: determining the quotient of the random number of each index node and the weight value of each index node; determining the index node with the largest quotient value, and using the index node with the largest quotient value as the sixth index node.

[0020] In an exemplary embodiment, after deleting the first index node, the method further includes: determining the number of nodes deleted from the Nth index layer, and determining the relationship between the number of deleted nodes and a preset threshold; and determining whether to adjust the index nodes in the adjusted Nth index layer based on the relationship.

[0021] In an exemplary embodiment, determining whether to adjust the index nodes in the adjusted Nth index layer is based on the size relationship, including: prohibiting the adjustment of the index nodes in the adjusted Nth index layer when the size relationship indicates that the number of deleted nodes is greater than the preset threshold; and adjusting the index nodes in the adjusted Nth index layer when the size relationship indicates that the number of deleted nodes is less than or equal to the preset threshold.

[0022] In an exemplary embodiment, after prohibiting adjustment of the index nodes in the adjusted Nth index layer, the method further includes: determining whether the Nth index layer is the highest index layer in the jump list; if the Nth index layer is not the highest index layer in the jump list, adjusting the index nodes in the N-1th index layer; if the Nth index layer is the highest index layer in the jump list, determining that the current jump list is the target jump list.

[0023] In an exemplary embodiment, determining the weight value of each index node in the skip list according to the number of accesses to each index node in the skip list includes: determining the product of the number of accesses to each index node in the skip list and a target value; and determining the weight value of each index node according to the product.

[0024] In an exemplary embodiment, the weight value of each index node in the skip list is determined based on the number of times each index node in the skip list is accessed, including: setting a timer, and when the timing duration of the timer is reached, determining the weight value of each index node in the skip list based on the number of times each index node in the skip list is accessed.

[0025] In an exemplary embodiment, before determining the weight value of each index node in the skip list according to the number of accesses to each index node in the skip list, the method further includes: determining the access nodes of the storage server; and establishing the skip list according to the access nodes of the storage server.

[0026] According to another embodiment of the present application, a skip list adjustment device is provided, comprising: a determination module for determining a weight value of each index node in the skip list according to the number of accesses to each index node in the skip list; an adjustment module for adjusting the index nodes in the skip list according to the weight value of each index node, wherein adjusting the index nodes in the skip list comprises at least one of the following: adding an index node, deleting an index node.

[0027] In an exemplary embodiment, an adjustment module is used to perform an adjustment step: determine the weight value of the index node of the Nth index layer in the jump list, and adjust the index node of the Nth index layer according to the weight value of the index node of the Nth index layer, wherein N is a positive integer, and N is M, M-1, ..., 2, 1 in sequence, the Mth index layer is the bottom index layer in the jump list, and the first index layer is the highest index layer in the jump list; the adjustment step is executed in a loop until the index node in the highest index layer in the jump list is adjusted.

[0028] In an exemplary embodiment, the adjustment module is used to determine the first index node with the smallest weight value in the Nth index layer, and determine the second index node with the largest weight value in the Nth index layer; and adjust the index nodes of the Nth index layer according to the first index node and the second index node.

[0029] In an exemplary embodiment, an adjustment module is used to add a third index node after the second index node, and to determine whether the first index node has an upper node; if the first index node does not have an upper node, delete the first index node; if the first index node has an upper node, delete the first index node and the upper node.

[0030] In an exemplary embodiment, an adjustment module is used to determine the first weight value of the second index node, and determine the second weight value and the third weight value based on the first weight value, wherein the sum of the second weight value and the third weight value is the first weight value; update the first weight value of the second index node to the second weight value, and determine the weight value of the third index node to be the third weight value.

[0031] In an exemplary embodiment, an adjustment module is used to determine a fourth weight value of the first index node, and to determine a fifth weight value of a fourth index node, wherein the fourth index node is an index node before the first index node; determine the sum of the fourth weight value and the fifth weight value, and update the fifth weight value of the fourth index node to the sum of the fourth weight value and the fifth weight value.

[0032] In an exemplary embodiment, an adjustment module is used to determine a fourth weight value of the first index node, and to determine a fifth weight value of the fourth index node, to determine the sum of the fourth weight value and the fifth weight value, and to update the fifth weight value of the fourth index node to the sum of the fourth weight value and the fifth weight value, wherein the fourth index node is the index node before the first index node; determine a sixth weight value of the upper-level node, and to determine a seventh weight value of the fifth index node, to determine the sum of the sixth weight value and the seventh weight value, and to update the seventh weight value of the fifth index node to the sum of the sixth weight value and the seventh weight value, wherein the fifth index node is the index node before the upper-level node.

[0033] In an exemplary embodiment, the adjustment module is used to determine a sixth index node in the Nth index layer; and add a seventh index node in the N-1th index layer, wherein the seventh index node is an upper node of the sixth index node.

[0034] In an exemplary embodiment, the adjustment module is used to determine a random number of each index node in the Nth index layer; and determine the sixth index node according to the random number of each index node and a weight value of each index node.

[0035] In an exemplary embodiment, the adjustment module is used to determine a quotient value of a random number of each index node and a weight value of each index node; determine an index node with a maximum quotient value, and use the index node with the maximum quotient value as the sixth index node.

[0036] In an exemplary embodiment, the adjustment module is used to determine the number of nodes deleted from the Nth index layer, and determine the relationship between the number of deleted nodes and a preset threshold; and determine whether to adjust the index nodes in the adjusted Nth index layer based on the relationship.

[0037] In an exemplary embodiment, the adjustment module is used to prohibit adjusting the index nodes in the adjusted Nth index layer when the size relationship indicates that the number of deleted nodes is greater than the preset threshold; and to adjust the index nodes in the adjusted Nth index layer when the size relationship indicates that the number of deleted nodes is less than or equal to the preset threshold.

[0038] In an exemplary embodiment, an adjustment module is used to determine whether the Nth index layer is the highest index layer in the jump list; if the Nth index layer is not the highest index layer in the jump list, adjust the index nodes in the N-1th index layer; if the Nth index layer is the highest index layer in the jump list, determine that the current jump list is the target jump list.

[0039] In an exemplary embodiment, the determination module is used to determine the product of the number of accesses of each index node in the skip list and the target value; and determine the weight value of each index node according to the product.

[0040] In an exemplary embodiment, the determination module is used to set a timer, and when the timing duration of the timer is reached, determine the weight value of each index node in the skip list according to the number of accesses to each index node in the skip list.

[0041] In an exemplary embodiment, the determination module is used to determine the access node of the storage server; and establish the jump table according to the access node of the storage server.

[0042] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.

[0043] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0044] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0045] Through the embodiments of the present application, the weight value of each index node in the jump list is determined according to the number of accesses to each index node in the jump list; the index nodes in the jump list are adjusted according to the weight value of each index node, wherein the adjustment of the index nodes in the jump list includes at least one of the following: adding index nodes, deleting index nodes. That is, in the present application, by counting the weights of the index nodes and adjusting the index nodes of the hot data in the cache data based on the weights, the hit efficiency of the hot data can be greatly improved, and the index rate of the hot data is guaranteed by using a regular update method, thereby improving the overall performance, and solving the problem in the related art that the hit efficiency of hot data and cold data is similar, thereby affecting the overall performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The drawings described herein are used to provide further understanding of the present application and constitute a part of the present application. The exemplary embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application.

[0047] Figure 1 It is a hardware structure block diagram of a computer device for a jump table adjustment method according to an embodiment of the present application.

[0048] Figure 2 It is a flowchart of a method for adjusting a jump table according to an embodiment of the present application.

[0049] Figure 3 It is a flowchart of a method for adjusting a jump table according to an optional embodiment of the present application.

[0050] Figure 4 1 is a schematic diagram of a jump table structure according to an optional embodiment of the present application.

[0051] Figure 5 This is a schematic diagram of a jump table structure according to an optional embodiment of the present application (II).

[0052] Figure 6 This is a schematic diagram of a jump table structure according to an optional embodiment of the present application (III).

[0053] Figure 7 This is a schematic diagram of a jump table structure according to an optional embodiment of the present application (IV).

[0054] Figure 8 Schematic diagram of a jump table structure according to an optional embodiment of the present application (V).

[0055] Fig. 9 Schematic diagram of a jump table structure according to an optional embodiment of the present application (VI).

[0056] Fig.10 It is a structural block diagram of a jump table adjustment device according to an embodiment of the present application. DETAILED DESCRIPTION

[0057] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0058] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0059] In this embodiment, a method for adjusting a jump table is also provided. The method embodiment provided in the embodiment of the present application can be executed in a jump table adjustment device, which can be a computer device or a similar computing device. Taking running on a computer device as an example, Figure 1 1 is a hardware structure block diagram of a computer device for adjusting a jump table according to an embodiment of the present application. Figure 1 As shown, the computer device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned computer device may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0060] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the jump table adjustment method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0061] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0062] In this embodiment, a method for adjusting a jump table is provided. Figure 2 is a flow chart of a method for adjusting a jump table according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps.

[0063] Step S202: determining a weight value of each index node in the skip list according to the number of accesses to each index node in the skip list.

[0064] Step S204, adjusting the index nodes in the skip list according to the weight value of each index node, wherein adjusting the index nodes in the skip list includes at least one of the following: adding an index node, deleting an index node.

[0065] Through the above steps, the weight value of each index node in the jump list is determined according to the number of accesses to each index node in the jump list; the index nodes in the jump list are adjusted according to the weight value of each index node, wherein the adjustment of the index nodes in the jump list includes at least one of the following: adding index nodes, deleting index nodes. That is, in this application, by counting the weights of index nodes and adjusting the index nodes of hot data in cache data based on the weights, the hit efficiency of hot data can be greatly improved, and the index rate of hot data is guaranteed by using a regular update method, improving the overall performance, and solving the problem in the related art that the hit efficiency of hot data and cold data is similar, thereby affecting the overall performance.

[0066] Optionally, in order to better understand the above step S204, the above step SS204 can also be implemented in the following way: execute the adjustment step: determine the weight value of the index node of the Nth index layer in the jump list, and adjust the index node of the Nth index layer according to the weight value of the index node of the Nth index layer, wherein N is a positive integer, and N is M, M-1, ..., 2, 1 respectively, the Mth index layer is the bottom index layer in the jump list, and the first index layer is the highest index layer in the jump list; execute the adjustment step in a loop until the index node in the highest index layer in the jump list is adjusted.

[0067] It should be noted that the skip list includes a data layer and an index layer. The Mth index layer is the bottom index layer in the skip list, that is, the index layer closest to the data layer. The first index layer is the highest index layer in the skip list, that is, the index layer farthest from the data layer.

[0068] In an embodiment of the present application, the index nodes in the bottom index layer, the second to last index layer, ..., and the top index layer are adjusted in sequence. The adjusted jump table can greatly improve the hit efficiency of hot data, and use a regular update method to ensure the indexing rate of hot data, thereby greatly increasing the LBA cache performance in the RAID card and improving the product's ability to provide external services.

[0069] Optionally, in the embodiment of the present application, taking the Nth index layer as an example, the index nodes of the Nth index layer are adjusted.

[0070] Specifically: determining a first index node with the smallest weight value in the Nth index layer, and determining a second index node with the largest weight value in the Nth index layer; adjusting the index nodes of the Nth index layer according to the first index node and the second index node.

[0071] Among them, the index nodes of the Nth index layer are adjusted according to the first index node and the second index node, including: adding a third index node after the second index node, and determining whether the first index node has an upper node; if the first index node does not have an upper node, deleting the first index node; if the first index node has an upper node, deleting the first index node and the upper node.

[0072] In an embodiment of the present application, an index node is added after the index node with the largest weight value in the Nth index layer, and when the index node with the smallest weight value in the Nth index layer does not have an upper node, the index node with the smallest weight value in the Nth index layer is deleted; when the index node with the smallest weight value in the Nth index layer has an upper node, the index node with the smallest weight value in the Nth index layer and the corresponding upper node are deleted.

[0073] It should be noted that before adding the third index node after the second index node, it is also necessary to determine whether the third index node can be added after the second index node. If the third index node can be added after the second index node, the third index node is added after the second index node; if the third index node cannot be added after the second index node, it is prohibited to add the third index node after the second index node.

[0074] Optionally, after adding the third index node after the second index node, it also includes: determining the first weight value of the second index node, and determining the second weight value and the third weight value based on the first weight value, wherein the sum of the second weight value and the third weight value is the first weight value; updating the first weight value of the second index node to the second weight value, and determining the weight value of the third index node to be the third weight value.

[0075] That is to say, after the index nodes of the Nth index layer are adjusted once, it is necessary to assign weights to the index nodes of the adjusted Nth index layer. Specifically, when adding index nodes, the first weight value of the second index node is divided into a second weight value and a third weight value, and the second weight value is assigned to the second index node, and the third weight value is assigned to the third index node, that is, the newly added index node.

[0076] Optionally, the first weight value is equally divided between the second index node and the third index node, and in this case, the second weight value is the same as the third weight value.

[0077] Optionally, after deleting the first index node, it also includes: determining a fourth weight value of the first index node, and determining a fifth weight value of the fourth index node, wherein the fourth index node is the index node before the first index node; determining the sum of the fourth weight value and the fifth weight value, and updating the fifth weight value of the fourth index node to the sum of the fourth weight value and the fifth weight value.

[0078] That is to say, when the first index node is deleted, the weight value of the first index node is assigned to the fourth index node before the first index node. At this time, the weight value of the fourth index node is the sum of the weight value of the first index node and the weight value before the fourth index node.

[0079] Optionally, after deleting the first index node and the upper-level node, it also includes: determining the fourth weight value of the first index node, and determining the fifth weight value of the fourth index node, determining the sum of the fourth weight value and the fifth weight value, and updating the fifth weight value of the fourth index node to the sum of the fourth weight value and the fifth weight value, wherein the fourth index node is the index node before the first index node; determining the sixth weight value of the upper-level node, and determining the seventh weight value of the fifth index node, determining the sum of the sixth weight value and the seventh weight value, and updating the seventh weight value of the fifth index node to the sum of the sixth weight value and the seventh weight value, wherein the fifth index node is the index node before the upper-level node.

[0080] That is to say, when the first index node and the upper node of the first index node are deleted, the weight value of the first index node is assigned to the fourth index node before the first index node. At this time, the weight value of the fourth index node is the sum of the weight value of the first index node and the weight value before the fourth index node; and the weight value of the upper node is assigned to the fifth index node before the upper node. At this time, the weight value of the fifth index node is the sum of the weight value of the upper node and the weight value before the fifth index node.

[0081] Furthermore, after deleting the first index node and the upper node, the following steps need to be performed: determining a sixth index node in the Nth index layer; adding a seventh index node in the N-1th index layer, wherein the seventh index node is an upper node of the sixth index node.

[0082] Wherein, determining the sixth index node in the Nth index layer includes: determining a random number of each index node in the Nth index layer; and determining the sixth index node according to the random number of each index node and a weight value of each index node.

[0083] Among them, determining the sixth index node according to the random number of each index node and the weight value of each index node includes: determining the quotient value of the random number of each index node and the weight value of each index node; determining the index node with the largest quotient value, and using the index node with the largest quotient value as the sixth index node.

[0084] That is to say, in the case where the deleted index node includes the corresponding upper-level node, it is necessary to add another upper-level node, specifically: randomly assign a random number to each index node in the Nth index layer, and determine the quotient of the random number of each index node and the weight value of each index node, determine the index node with the quotient as the sixth index node, and add an upper-level node (i.e., the seventh index node) to the sixth index node, where the upper-level node of the sixth index node is the index node of the N-1th index layer.

[0085] In an exemplary embodiment, after deleting the first index node, it also includes: determining the number of nodes deleted from the Nth index layer, and determining the relationship between the number of deleted nodes and a preset threshold; and determining whether to adjust the index nodes in the adjusted Nth index layer based on the relationship.

[0086] Among them, when the size relationship indicates that the number of deleted nodes is greater than the preset threshold, it is prohibited to adjust the index nodes in the adjusted N-th index layer; when the size relationship indicates that the number of deleted nodes is less than or equal to the preset threshold, the index nodes in the adjusted N-th index layer are adjusted.

[0087] It should be noted that the number of nodes that can be deleted in each index layer is determined in advance, for example, a fixed value or a target ratio of the total number of index nodes in each index layer; when it exceeds a preset threshold, the index layer of the N-1th layer is adjusted; when it does not exceed the preset threshold, the index layer of the Nth layer continues to be adjusted.

[0088] Optionally, after prohibiting adjustment of the index nodes in the adjusted Nth index layer, the method further includes: determining whether the Nth index layer is the highest index layer in the jump list; if the Nth index layer is not the highest index layer in the jump list, adjusting the index nodes in the N-1th index layer; if the Nth index layer is the highest index layer in the jump list, determining that the current jump list is the target jump list.

[0089] That is, if the Nth layer is the last layer, the adjustment is terminated and the update of the next cycle is waited for; if the Nth layer is not the last layer, the index nodes in the N-1th index layer are continuously adjusted.

[0090] In an exemplary embodiment, determining the weight value of each index node in the skip list according to the number of accesses to each index node in the skip list includes: determining the product of the number of accesses to each index node in the skip list and a target value; and determining the weight value of each index node according to the product.

[0091] For example, when the target value is 1, the weight value increases by 1 each time the index node is visited; when the target value is 2, the weight value increases by 2 each time the index node is visited.

[0092] In an exemplary embodiment, the weight value of each index node in the skip list is determined based on the number of times each index node in the skip list is accessed, including: setting a timer, and when the timing duration of the timer is reached, determining the weight value of each index node in the skip list based on the number of times each index node in the skip list is accessed.

[0093] In the embodiment of the present application, the index structure is optimized and adjusted regularly through weights, which can greatly improve the indexing speed of hot data and the cache search speed.

[0094] In an exemplary embodiment, before determining the weight value of each index node in the skip list according to the number of accesses to each index node in the skip list, the method further includes: determining the access nodes of the storage server; and establishing the skip list according to the access nodes of the storage server.

[0095] In order to ensure the accuracy of the skip list, all visited nodes need to be added to the skip list.

[0096] Obviously, the above described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. In order to better understand the above jump table adjustment method, the above process is described below in conjunction with the embodiments, but is not intended to limit the technical solutions of the embodiments of the present application.

[0097] In the embodiment of the present application, a method for adjusting a jump table is also provided, such as Figure 3 As shown, Figure 3 It is a flowchart of a method for adjusting a jump table according to an optional embodiment of the present application, and the specific steps are as follows.

[0098] Step S301: Start.

[0099] Step S302: Add all visited nodes to the skip list.

[0100] Step S303: Generate an index node upward in the skip list with a probability of 1 / 2.

[0101] like Figure 4 As shown, Figure 4 For the jump table structure that caches some LBA data, it should be noted that: Figure 4 The corresponding LBA address is set within 1000. In actual situations, the address range of LBA will be very large.

[0102] Step S304: Update the index node.

[0103] Specifically, the index nodes with small weights in the index layer are deleted, and a new index node is generated behind the index node with the largest weight.

[0104] Step S305: Determine whether the deleted node has an upper node. If so, execute step S306; otherwise, execute step S307.

[0105] Step S306: determine a random number for each index node of the current layer, the random value*weight is the node score, and add an upper layer node for the index node with the highest score.

[0106] Step S307: Continue adjusting the index nodes of this layer.

[0107] Step S308: Determine whether the number of nodes deleted in this layer reaches a preset ratio. If so, execute step S309; ​​otherwise, execute step S310.

[0108] Step S309: Determine whether the current layer is the last layer. If the current layer is the last layer, execute step S311; otherwise, execute step S310.

[0109] Step S310: Adjust the index node of the previous layer.

[0110] Step S311: Wait for the next cycle update.

[0111] Step S312: End.

[0112] In the embodiment of the present application, if the location corresponding to LBA20 to LBA400 in the RAID stores the template for personal tax payment, the weight of the index node in the current jump table is 1 by default, and the weight increases by 1 each time it is accessed. If some people have already downloaded the template for personal tax payment, then there may be something like Figure 5 The weight distribution is shown.

[0113] like Figure 5 As shown in the figure, the weight of the dark index node is obviously higher than that of other index nodes. This is because the corresponding personal tax template file data is just in the bottom layer of data nodes, and the probability of these nodes being accessed is very high. At this time, the index nodes of each layer are added and deleted from bottom to top. The node with the smallest weight is deleted, and a new node is generated after the node with the highest weight, and its weight is divided by 2. After one operation, the corresponding structure changes as shown below. Figure 6 shown.

[0114] like Figure 6As shown in the figure, the LBA930 node of index layer 1 is deleted, and a new node is generated after the LBA1 node with the largest weight, and the weight of LBA1 is halved, and half of the weight is divided into the new LBA20. The operation continues, and the maximum weight of this layer is 150. However, no new nodes can be generated after LBA1 and LBA20, so the second deletion operation is added.

[0115] like Figure 7 As shown in , index node 650 is deleted, and its weight is added to the corresponding LBA460 node. A new LBA100 index node is added after LBA30, and the new node obtains a weight of 75.

[0116] Continue to operate as Figure 8 As shown in , index node LBA720 is deleted, and a new node LBA320 is generated. Since LBA720 node has an upper node, when LBA720 node is deleted, the corresponding upper layer index node is also deleted. At this time, it is necessary to randomly select a node in this layer to generate an upper node. Determine a random number for each index node in the current layer, and the random value * weight is the node score. Add an upper node to the index node with the highest score. Suppose at this time, LBA30 node obtains the highest score. Then the index changes as follows Fig. 9 shown.

[0117] Through the adjusted skip table, the index of the area with high probability of access is more dense, and the index nodes with low probability of access are deleted. This can greatly optimize the LBA access rate of the high probability area.

[0118] This application adjusts the index nodes of hot data in the cache data through customized weight statistics and update methods, which can greatly improve the hit efficiency of hot data, and uses a regular update method to ensure the index rate of hot data, thereby greatly increasing the LBA cache performance in the RAID card and improving the product's ability to provide external services.

[0119] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment 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 this understanding, the technical solution of the present application, 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), 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.

[0120] In the present embodiment, a jump table adjustment device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.

[0121] Fig.10 is a structural block diagram of a jump table adjustment device according to an embodiment of the present application, such as Fig.10 As shown, the device includes.

[0122] The determination module 1002 is used to determine the weight value of each index node in the skip list according to the number of accesses to each index node in the skip list.

[0123] The adjustment module 1004 is used to adjust the index nodes in the skip list according to the weight value of each index node, wherein adjusting the index nodes in the skip list includes at least one of the following: adding an index node and deleting an index node.

[0124] Through the device of the present application, the weight value of each index node in the jump list is determined according to the number of accesses to each index node in the jump list; the index nodes in the jump list are adjusted according to the weight value of each index node, wherein the adjustment of the index nodes in the jump list includes at least one of the following: adding index nodes, deleting index nodes. That is, in the present application, by counting the weights of the index nodes and adjusting the index nodes of the hot data in the cache data based on the weights, the hit efficiency of the hot data can be greatly improved, and the index rate of the hot data is guaranteed by using a regular update method, improving the overall performance, and solving the problem in the related art that the hit efficiency of hot data and cold data is similar, thereby affecting the overall performance.

[0125] In an exemplary embodiment, the adjustment module 1004 is used to perform an adjustment step: determine the weight value of the index node of the Nth index layer in the jump list, and adjust the index node of the Nth index layer according to the weight value of the index node of the Nth index layer, wherein N is a positive integer, and N is M, M-1, ..., 2, 1 in sequence, the Mth index layer is the bottom index layer in the jump list, and the first index layer is the highest index layer in the jump list; the adjustment step is executed in a loop until the index node in the highest index layer in the jump list is adjusted.

[0126] It should be noted that the skip list includes a data layer and an index layer. The Mth index layer is the bottom index layer in the skip list, that is, the index layer closest to the data layer. The first index layer is the highest index layer in the skip list, that is, the index layer farthest from the data layer.

[0127] In an embodiment of the present application, the index nodes in the bottom index layer, the second to last index layer, ..., and the top index layer are adjusted in sequence. The adjusted jump table can greatly improve the hit efficiency of hot data, and use a regular update method to ensure the indexing rate of hot data, thereby greatly increasing the LBA cache performance in the RAID card and improving the product's ability to provide external services.

[0128] In an exemplary embodiment, the adjustment module 1004 is used to determine the first index node with the smallest weight value in the Nth index layer, and to determine the second index node with the largest weight value in the Nth index layer; and to adjust the index nodes of the Nth index layer according to the first index node and the second index node.

[0129] In an exemplary embodiment, the adjustment module 1004 is used to add a third index node after the second index node, and to determine whether the first index node has an upper node; if the first index node does not have an upper node, delete the first index node; if the first index node has an upper node, delete the first index node and the upper node.

[0130] In an embodiment of the present application, an index node is added after the index node with the largest weight value in the Nth index layer, and when the index node with the smallest weight value in the Nth index layer does not have an upper node, the index node with the smallest weight value in the Nth index layer is deleted; when the index node with the smallest weight value in the Nth index layer has an upper node, the index node with the smallest weight value in the Nth index layer and the corresponding upper node are deleted.

[0131] It should be noted that before adding the third index node after the second index node, it is also necessary to determine whether the third index node can be added after the second index node. If the third index node can be added after the second index node, the third index node is added after the second index node; if the third index node cannot be added after the second index node, it is prohibited to add the third index node after the second index node.

[0132] In an exemplary embodiment, the adjustment module 1004 is used to determine the first weight value of the second index node, and determine the second weight value and the third weight value based on the first weight value, wherein the sum of the second weight value and the third weight value is the first weight value; update the first weight value of the second index node to the second weight value, and determine the weight value of the third index node to be the third weight value.

[0133] That is to say, after the index nodes of the Nth index layer are adjusted once, it is necessary to assign weights to the index nodes of the adjusted Nth index layer. Specifically, when adding index nodes, the first weight value of the second index node is divided into a second weight value and a third weight value, and the second weight value is assigned to the second index node, and the third weight value is assigned to the third index node, that is, the newly added index node.

[0134] Optionally, the first weight value is equally divided between the second index node and the third index node, and in this case, the second weight value is the same as the third weight value.

[0135] In an exemplary embodiment, the adjustment module 1004 is used to determine a fourth weight value of the first index node, and to determine a fifth weight value of the fourth index node, wherein the fourth index node is an index node before the first index node; determine the sum of the fourth weight value and the fifth weight value, and update the fifth weight value of the fourth index node to the sum of the fourth weight value and the fifth weight value.

[0136] That is to say, when the first index node is deleted, the weight value of the first index node is assigned to the fourth index node before the first index node. At this time, the weight value of the fourth index node is the sum of the weight value of the first index node and the weight value before the fourth index node.

[0137] In an exemplary embodiment, the adjustment module 1004 is used to determine the fourth weight value of the first index node, and to determine the fifth weight value of the fourth index node, to determine the sum of the fourth weight value and the fifth weight value, and to update the fifth weight value of the fourth index node to the sum of the fourth weight value and the fifth weight value, wherein the fourth index node is the index node before the first index node; determine the sixth weight value of the upper-level node, and to determine the seventh weight value of the fifth index node, to determine the sum of the sixth weight value and the seventh weight value, and to update the seventh weight value of the fifth index node to the sum of the sixth weight value and the seventh weight value, wherein the fifth index node is the index node before the upper-level node.

[0138] That is to say, when the first index node and the upper node of the first index node are deleted, the weight value of the first index node is assigned to the fourth index node before the first index node. At this time, the weight value of the fourth index node is the sum of the weight value of the first index node and the weight value before the fourth index node; and the weight value of the upper node is assigned to the fifth index node before the upper node. At this time, the weight value of the fifth index node is the sum of the weight value of the upper node and the weight value before the fifth index node.

[0139] In an exemplary embodiment, the adjustment module 1004 is used to determine a sixth index node in the Nth index layer; and add a seventh index node in the N-1th index layer, wherein the seventh index node is an upper node of the sixth index node.

[0140] In an exemplary embodiment, the adjustment module 1004 is used to determine a random number of each index node in the Nth index layer; and determine the sixth index node according to the random number of each index node and a weight value of each index node.

[0141] In an exemplary embodiment, the adjustment module 1004 is used to determine a quotient value of the random number of each index node and the weight value of each index node; determine the index node with the largest quotient value, and use the index node with the largest quotient value as the sixth index node.

[0142] That is to say, in the case where the deleted index node includes the corresponding upper-level node, it is necessary to add another upper-level node, specifically: randomly assign a random number to each index node in the Nth index layer, and determine the quotient of the random number of each index node and the weight value of each index node, determine the index node with the quotient as the sixth index node, and add an upper-level node (i.e., the seventh index node) to the sixth index node, where the upper-level node of the sixth index node is the index node of the N-1th index layer.

[0143] In an exemplary embodiment, the adjustment module 1004 is used to determine the number of nodes deleted from the Nth index layer, and determine the relationship between the number of deleted nodes and a preset threshold; and determine whether to adjust the index nodes in the adjusted Nth index layer based on the relationship.

[0144] In an exemplary embodiment, the adjustment module 1004 is used to prohibit adjustment of the index nodes in the adjusted Nth index layer when the size relationship indicates that the number of deleted nodes is greater than the preset threshold; and to adjust the index nodes in the adjusted Nth index layer when the size relationship indicates that the number of deleted nodes is less than or equal to the preset threshold.

[0145] It should be noted that the number of nodes that can be deleted in each index layer is determined in advance, for example, a fixed value or a target ratio of the total number of index nodes in each index layer; when it exceeds a preset threshold, the index layer of the N-1th layer is adjusted; when it does not exceed the preset threshold, the index layer of the Nth layer continues to be adjusted.

[0146] In an exemplary embodiment, the adjustment module 1004 is used to determine whether the Nth index layer is the highest index layer in the jump list; if the Nth index layer is not the highest index layer in the jump list, adjust the index nodes in the N-1th index layer; if the Nth index layer is the highest index layer in the jump list, determine that the current jump list is the target jump list.

[0147] That is, if the Nth layer is the last layer, the adjustment is terminated and the update of the next cycle is waited for; if the Nth layer is not the last layer, the index nodes in the N-1th index layer are continuously adjusted.

[0148] In an exemplary embodiment, the determination module 1002 is used to determine the product of the number of accesses of each index node in the skip list and the target value; and determine the weight value of each index node according to the product.

[0149] For example, when the target value is 1, the weight value increases by 1 each time the index node is visited; when the target value is 2, the weight value increases by 2 each time the index node is visited.

[0150] In an exemplary embodiment, the determination module 1002 is used to set a timer, and when the timing duration of the timer is reached, determine the weight value of each index node in the skip list according to the number of accesses to each index node in the skip list.

[0151] In the embodiment of the present application, the index structure is optimized and adjusted regularly through weights, which can greatly improve the indexing speed of hot data and the cache search speed.

[0152] In an exemplary embodiment, the determination module 1002 is used to determine the access node of the storage server; and establish the jump table according to the access node of the storage server.

[0153] In order to ensure the accuracy of the skip list, all visited nodes need to be added to the skip list.

[0154] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0155] Optionally, in this embodiment, the above-mentioned storage medium may be configured to store a computer program for executing the following steps.

[0156] Step S1, determining a weight value of each index node in the skip list according to the number of accesses to each index node in the skip list.

[0157] Step S2, adjusting the index nodes in the skip list according to the weight value of each index node, wherein adjusting the index nodes in the skip list includes at least one of the following: adding an index node, deleting an index node.

[0158] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0159] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0160] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program.

[0161] Step S1, determining a weight value of each index node in the skip list according to the number of accesses to each index node in the skip list.

[0162] Step S2, adjusting the index nodes in the skip list according to the weight value of each index node, wherein adjusting the index nodes in the skip list includes at least one of the following: adding an index node, deleting an index node.

[0163] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0164] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.

[0165] Optionally, in this embodiment, the above-mentioned computer program product may be configured to execute the following steps through a computer program.

[0166] Step S1, determining a weight value of each index node in the skip list according to the number of accesses to each index node in the skip list.

[0167] Step S2, adjusting the index nodes in the skip list according to the weight value of each index node, wherein adjusting the index nodes in the skip list includes at least one of the following: adding an index node, deleting an index node.

[0168] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0169] The embodiments of the present application also provide a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps in any one of the above method embodiments.

[0170] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0171] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0172] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for adjusting a jump table, characterized in that: include: Determine a weight value of each index node in the skip list according to the number of accesses to each index node in the skip list; Adjusting the index nodes in the skip list according to the weight value of each index node, wherein adjusting the index nodes in the skip list includes at least one of the following: adding an index node, deleting an index node; Wherein, adjusting the index nodes in the skip list according to the weight value of each index node comprises: executing an adjustment step: determining the weight value of the index node of the Nth index layer in the skip list, and adjusting the index node of the Nth index layer according to the weight value of the index node of the Nth index layer, wherein N is a positive integer, and N is M, M-1, ..., 2, 1 in sequence, the Mth index layer is the bottom index layer in the skip list, and the first index layer is the highest index layer in the skip list; loopingly executing the adjustment step until the index node in the highest index layer in the skip list is adjusted; The step of adjusting the index nodes of the N-th index layer according to the weight values ​​of the index nodes of the N-th index layer comprises: determining a first index node having the smallest weight value in the N-th index layer, and determining a second index node having the largest weight value in the N-th index layer; and adjusting the index nodes of the N-th index layer according to the first index node and the second index node; The step of adjusting the index nodes of the Nth index layer according to the first index node and the second index node includes: adding a third index node after the second index node, and determining whether the first index node has an upper node; if the first index node does not have an upper node, deleting the first index node; if the first index node has an upper node, deleting the first index node and the upper node; Among them, determining the weight value of each index node in the skip list according to the number of visits to each index node in the skip list includes: determining the product of the number of visits to each index node in the skip list and the target value; and determining the weight value of each index node according to the product.

2. The method according to claim 1, characterized in that After adding a third index node after the second index node, the method further includes: Determine a first weight value of the second index node, and determine a second weight value and a third weight value according to the first weight value, wherein the sum of the second weight value and the third weight value is the first weight value; The first weight value of the second index node is updated to the second weight value, and the weight value of the third index node is determined to be the third weight value.

3. The method according to claim 1, characterized in that After deleting the first index node, the method further includes: Determining a fourth weight value of the first index node, and determining a fifth weight value of a fourth index node, wherein the fourth index node is an index node before the first index node; The sum of the fourth weight value and the fifth weight value is determined, and the fifth weight value of the fourth index node is updated to the sum of the fourth weight value and the fifth weight value.

4. The method according to claim 1, characterized in that After deleting the first index node and the upper node, the method further includes: Determine a fourth weight value of the first index node, determine a fifth weight value of a fourth index node, determine the sum of the fourth weight value and the fifth weight value, and update the fifth weight value of the fourth index node to the sum of the fourth weight value and the fifth weight value, wherein the fourth index node is an index node before the first index node; Determine the sixth weight value of the upper node, and determine the seventh weight value of the fifth index node, determine the sum of the sixth weight value and the seventh weight value, and update the seventh weight value of the fifth index node to the sum of the sixth weight value and the seventh weight value, wherein the fifth index node is the index node before the upper node.

5. The method according to claim 1, characterized in that After deleting the first index node and the upper node, the method further includes: Determining a sixth index node in the Nth index layer; A seventh index node is added in the N-1th index layer, wherein the seventh index node is an upper node of the sixth index node.

6. The method according to claim 5, characterized in that Determining a sixth index node in the Nth index layer includes: Determine a random number for each index node in the Nth index layer; The sixth index node is determined according to the random number of each index node and the weight value of each index node.

7. The method according to claim 6, characterized in that Determining the sixth index node according to the random number of each index node and the weight value of each index node includes: Determine a quotient value of the random number of each index node and the weight value of each index node; An index node with a maximum quotient value is determined, and the index node with the maximum quotient value is used as the sixth index node.

8. The method according to claim 1, characterized in that After deleting the first index node, the method further includes: Determine the number of nodes deleted from the Nth index layer, and determine the relationship between the number of deleted nodes and a preset threshold; It is determined whether to adjust the index nodes in the adjusted Nth index layer according to the size relationship.

9. The method according to claim 8, characterized in that Determining whether to adjust the index nodes in the adjusted Nth index layer according to the size relationship includes: If the size relationship indicates that the number of deleted nodes is greater than the preset threshold, prohibiting adjustment of index nodes in the adjusted Nth index layer; When the size relationship indicates that the number of deleted nodes is less than or equal to the preset threshold, the index nodes in the adjusted Nth index layer are adjusted.

10. The method according to claim 9, characterized in that After prohibiting adjustment of the index nodes in the adjusted Nth index layer, the method further includes: Determine whether the Nth index layer is the highest index layer in the skip list; When the Nth index layer is not the highest index layer in the skip list, adjusting the index nodes in the N-1th index layer; In the case that the Nth index layer is the highest index layer in the skip table, the current skip table is determined to be the target skip table.

11. The method according to claim 1, characterized in that: Determining a weight value of each index node in the skip list according to the number of accesses to each index node in the skip list includes: A timer is set, and when the timing duration of the timer is reached, a weight value of each index node in the skip list is determined according to the number of accesses to each index node in the skip list.

12. The method according to claim 11, characterized in that Before determining the weight value of each index node in the skip list according to the number of accesses to each index node in the skip list, the method further includes: Determine the access node of the storage server; The jump table is established according to the access node of the storage server.

13. A jump table adjustment device, characterized in that: include: A determination module, used to determine a weight value of each index node in the skip list according to the number of accesses to each index node in the skip list; An adjustment module, configured to adjust the index nodes in the skip list according to the weight value of each index node, wherein adjusting the index nodes in the skip list includes at least one of the following: adding an index node, deleting an index node; Wherein, the adjustment module is further used to perform an adjustment step: determine the weight value of the index node of the Nth index layer in the skip list, and adjust the index node of the Nth index layer according to the weight value of the index node of the Nth index layer, wherein N is a positive integer, and N is M, M-1, ..., 2, 1 in sequence, the Mth index layer is the bottom index layer in the skip list, and the first index layer is the highest index layer in the skip list; the adjustment step is performed in a loop until the index node in the highest index layer in the skip list is adjusted; The adjustment module is further used to determine the first index node with the smallest weight value in the Nth index layer, and determine the second index node with the largest weight value in the Nth index layer; and adjust the index nodes of the Nth index layer according to the first index node and the second index node; The adjustment module is further configured to add a third index node after the second index node, and determine whether the first index node has an upper node; if the first index node does not have an upper node, delete the first index node; if the first index node has an upper node, delete the first index node and the upper node; Wherein, the determination module is further used to determine the product of the number of accesses of each index node in the jump list and the target value; and determine the weight value of each index node according to the product.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method according to any one of claims 1 to 12 when executed by a processor.

15. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 12 are implemented.

16. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.

Citation Information

Patent Citations

  • Memory data reading and writing method and device

    CN108280229A

  • Systems and methods for performing a range query on a skiplist data structure

    CN109643309A