Indexing Structure for Increment-Only Featured Data and Apparatus and Method for Concurrency Control of Increment-Only Featured Data
Patent Information
- Application Number
- KR1020250048032
- Authority / Receiving Office
- KR · KR
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2026-10-21
Smart Images

Figure PAT00001_ABST
Abstract
Description
Technology Field
[0001] The described embodiment relates to an index structure for improving query processing performance for data having increment-only characteristics, such as blockchain time-series information, and a concurrency control technology for efficiently providing multiple users / processes for said structure. Background Technology
[0002] Information management services characterized by continuously increasing values, such as time-series information like blockchain transactions, various event processing, and sensor-based stream processing like IoT, are on the rise.
[0003] Information management systems that manage data, such as traditional database management systems, generally use B-tree-based indexes to provide efficient information retrieval. However, since standard B-tree indexes do not reflect the increment-only nature of the key values indexed in them—where values continuously increase—indexing increment-only data into existing B-tree indexes results in the following typical performance degradation and reduced efficiency of index storage space.
[0004] First, performance may be degraded by searching for leaf nodes to store added index key values. In other words, when a new key value is added to a B-tree index, the process of traversing from the index root to locate the leaf node where the new key value is added is involved, resulting in performance degradation for the addition of the new key value.
[0005] Second, in a multi-user / process environment, when operations such as adding new key values to an index and searching within the index occur simultaneously, waiting occurs until one operation is completed, resulting in a degradation of index search performance.
[0006] Third, in the case of a node split that occurs when there is no space to add a new key value to an index in a leaf or internal node, the node split leaves space for future key values to be added. In this case, if the number of added key values continues to increase, the space left for future key values will never be used, resulting in a decrease in storage efficiency. The problem to be solved
[0007] The described embodiment is intended to provide an index structure for indexing data with increment-only features, for effectively storing and retrieving data having increment-only features such as blockchain time series information, and to enable indexing of data with increment-only features.
[0008] The described embodiment is intended to control concurrency for improving search performance in an index structure that indexes data of increment-only features in a multi-user / process environment. means of solving the problem
[0009] An index structure for increment-only feature data according to an embodiment may include a B-tree compatible index, a last leaf node having the same structure as the leaf node of the B-tree compatible index, an index pointer indicating the B-tree compatible index, a key value recording the first index key value of the last leaf node, and a leaf node pointer indicating the last leaf node, and an increment-only feature index root composed of these components.
[0010] In this case, for a B-tree compatible index, the rightmost leaf node can be connected to the last leaf node via an interconnection pointer.
[0011] In this case, the B-tree compatible index may include an internal node composed of n pairs of index keys and child node pointers, and a leaf node composed of m pairs of index keys and key-value pairs, a left link pointer connecting to a left leaf node, and a right link pointer connecting to a right leaf node.
[0012] An index concurrency control method for increment-only feature data controls the addition of increment-only data to an increment-only feature index according to an embodiment, wherein the increment-only feature index may include a B-tree compatible index, a last leaf node having the same structure as the leaf node of the B-tree compatible index, an index pointer indicating the B-tree compatible index, a key value recording the first index key value of the last leaf node, and a leaf node pointer indicating the last leaf node.
[0013] In this case, for a B-tree compatible index, the rightmost leaf node can be connected to the last leaf node via an interconnection pointer.
[0014] In this case, the B-tree compatible index may include an internal node composed of n pairs of index keys and child node pointers, and a leaf node composed of m pairs of index keys and key-value pairs, a left link pointer connecting to a left leaf node, and a right link pointer connecting to a right leaf node.
[0015] At this time, when a new key value is first added to an increment-only feature index, the method may further include the steps of allocating memory of a leaf node structure from the system, setting the added key value to the first key value of the allocated leaf node and the key value of the root of the increment-only feature index, and setting the leaf node pointer of the root of the increment-only feature index to the last leaf node pointer of the allocated leaf node.
[0016] At this time, when adding a new key value to an increment-only feature index, the method may further include a step of checking whether the last leaf node is fully filled, and if the last leaf node is not filled, a step of adding a new key to the last leaf node indicated by the leaf node pointer.
[0017] At this time, if the last leaf node is full, the method may further include the steps of adding the last leaf node to a B-tree compatible index, allocating memory for the new leaf node, setting the new key value as the key value of the root of the increment-only feature index, setting the leaf node pointer to the allocated leaf node, and adding the new key to the last leaf node pointed to by the leaf node pointer.
[0018] At this time, the step of adding the last leaf node to the B-tree compatible index may include, if the B-tree compatible index does not exist, the step of setting the index pointer of the root of the increment-only feature index as the last leaf node.
[0019] At this time, the step of adding the last leaf node to the B-tree compatible index may include, if the B-tree compatible index exists, setting the last leaf node as the current node to be added; if the parent nodes of the left node of the current node are not all filled, adding the minimum key value of the current node to the parent node; and setting the child node of the key value added to the parent node as the current node.
[0020] At this time, the step of adding the last leaf node to the B-tree compatible index may further include the steps of allocating a new internal node and setting it as the new parent node if the parent nodes of the left node of the current node are all filled, adding the minimum value of the current node to the new parent node, setting the child node of the key value added to the parent node as the current node, and setting the parent node as the current node.
[0021] An index concurrency control method for increment-only feature data according to an embodiment controls the search for a specific key in an increment-only feature index, wherein the increment-only feature index comprises a B-tree compatible index, a last leaf node having the same structure as the leaf node of the B-tree compatible index, an index pointer pointing to the B-tree compatible index, a key value recording the first index key value of the last leaf node, and a leaf node pointer pointing to the last leaf node, and an increment-only feature index root composed of these components, and when the key to be searched is smaller than the key value of the increment-only feature index root, the search may be allowed by traversing the B-tree compatible index pointed to by the index pointer, regardless of whether other operations are being processed in the index.
[0022] An index concurrency control device for increment-only feature data according to an embodiment includes a memory on which at least one program is recorded, and a processor that executes the program, wherein the program controls the addition of increment-only data to an increment-only feature index or the retrieval of increment-only data from an increment-only feature index, wherein the increment-only feature index may include an increment-only feature index root composed of a B-tree compatible index, a last leaf node having the same structure as the leaf node of the B-tree compatible index, an index pointer indicating the B-tree compatible index, a key value recording the first index key value of the last leaf node, and a leaf node pointer indicating the last leaf node.
[0023] In this case, for a B-tree compatible index, the rightmost leaf node can be connected to the last leaf node via an interconnection pointer.
[0024] In this case, the B-tree compatible index may include an internal node composed of n pairs of index keys and child node pointers, and a leaf node composed of m pairs of index keys and key-value pairs, a left link pointer connecting to a left leaf node, and a right link pointer connecting to a right leaf node.
[0025] In this case, when a new key value is first added to an increment-only feature index, the program may allocate memory for a leaf node structure from the system, set the added key value to the first key value of the allocated leaf node and the key value of the root of the increment-only feature index, and set the leaf node pointer of the root of the increment-only feature index to the allocated last leaf node pointer.
[0026] In this case, when adding a new key value to an increment-only feature index, the program checks whether the last leaf node is fully filled, and if the last leaf node is not filled, it can add the new key to the last leaf node pointed to by the leaf node pointer.
[0027] At this time, if the last leaf node is full, the program can add the last leaf node to the B-tree compatible index, allocate memory for the new leaf node, set the new key value to the key value of the root of the increment-only feature index, set the leaf node pointer to the allocated leaf node, and add the new key to the last leaf node pointed to by the leaf node pointer.
[0028] In this case, when adding the last leaf node to a B-tree compatible index, if the B-tree compatible index does not exist, the program may set the index pointer of the root of the increment-only feature index as the last leaf node.
[0029] In this case, when adding the last leaf node to the B-tree compatible index, the program can set the last leaf node as the current node to be added if the B-tree compatible index exists, and if the parent nodes of the left node of the current node are not all filled, add the minimum key value of the current node to the parent node and set the child node of the key value added to the parent node as the current node.
[0030] In this case, when adding the last leaf node to the B-tree compatible index, if the parent nodes of the left node of the current node are all filled, the program may allocate a new internal node and set it as the new parent node, add the minimum value of the current node to the new parent node, set the child node of the key value added to the parent node as the current node, and set the parent node as the current node.
[0031] In this case, when the program searches for a specific key in an increment-only feature index, if the key to be searched is smaller than the key value at the root of the increment-only feature index, it may allow the search by traversing the B-tree compatible index pointed to by the index pointer. Effects of the invention
[0032] According to the described embodiment, data having increment-only features, such as blockchain time series information, can be effectively stored and managed to solve the performance degradation problem that occurs during the process of indexing data with increment-only features in a general B-tree compatible index.
[0033] According to the described embodiments, the problem of reduced storage space efficiency and the problem of reduced search performance in a multi-user / process environment can be resolved.
[0034] According to the described embodiments, it can be utilized in various information retrieval environments due to the efficient index configuration for data having additional dedicated features, such as various event processing and sensor-based stream processing, in addition to blockchain time series information. Brief explanation of the drawing
[0035] FIG. 1 is an example diagram of an index structure for a data index having an increment-only feature according to an embodiment. FIG. 2 is an example diagram of the internal node and leaf node structures that constitute a B-tree compatible index according to an embodiment. Figure 3 is an example of the initial value of an increase-only feature index root according to an embodiment. FIG. 4 is a flowchart illustrating the process of initially adding a new key value to an increment-only feature index according to an embodiment. FIG. 5 is a flowchart illustrating the process of adding a new key value to an increment-only feature index, rather than the case where the first key value is added according to an embodiment. FIG. 6 is a flowchart illustrating the process of adding the last leaf node to a B-tree compatible index according to an embodiment. FIG. 7 is a lock compatibility example diagram of an index for a data index having an increment-only feature according to an embodiment. FIG. 8 is a diagram showing the configuration of a computer system according to an embodiment. Specific details for implementing the invention
[0036] The advantages and features of the present invention and the methods for achieving them will become clear by referring to the embodiments described below in detail together with the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below but may be implemented in various different forms. These embodiments are provided merely to ensure that the disclosure of the present invention is complete and to fully inform those skilled in the art of the scope of the invention, and the present invention is defined only by the scope of the claims. Throughout the specification, the same reference numerals refer to the same components.
[0037] Although terms such as "first" or "second" are used to describe various components, these components are not limited by such terms. Such terms may be used merely to distinguish one component from another. Accordingly, the first component mentioned below may be the second component within the technical scope of the present invention.
[0038] The terms used herein are for describing embodiments and are not intended to limit the invention. In this specification, the singular form includes the plural form unless specifically stated otherwise in the text. As used in this specification, "comprises" or "comprising" implies that the mentioned component or step does not exclude the presence or addition of one or more other components or steps.
[0039] Unless otherwise defined, all terms used in this specification may be interpreted in a sense that is commonly understood by those skilled in the art to which the present invention pertains. Additionally, terms defined in commonly used dictionaries are not to be interpreted ideally or excessively unless explicitly and specifically defined otherwise.
[0040] FIG. 1 is an example diagram of an index structure for a data index having an increment-only feature according to an embodiment.
[0041] Referring to FIG. 1, an index for a data index having an increment-only feature according to an embodiment may be composed of an increment-only feature index root (100), a B-tree compatible index (110), and a last leaf node (120) having the same structure as the leaf node of the B-tree compatible index.
[0042] At this time, the increment-only feature index root (100) may be composed of an index pointer pointing to a B-tree compatible index (110), a key value having the first index key value of the last leaf node, and a leaf node pointer pointing to the last leaf node.
[0043] Additionally, the rightmost leaf node constituting the B-tree compatible index can be connected to the last leaf node (120) by an interconnection pointer.
[0044] FIG. 2 is an example diagram of the internal node and leaf node structures that constitute a B-tree compatible index according to an embodiment.
[0045] Referring to FIG. 2, an internal node (200) having n fan-outs can be composed of n index keys and child node pointer pairs.
[0046] In this case, the i-th index key (Keyi) of the internal node holds the first value of the child node pointed to by the i-th child node pointer (i.e., the smallest value in the current node).
[0047] And, a leaf node (210) having m fan-outs consists of m index keys and key value pairs (Pair) and pointers for connecting left and right leaf nodes.
[0048] Figure 3 is an example of the initial value of an increase-only feature index root according to an embodiment.
[0049] Referring to FIG. 3, the index pointer (310) constituting the increment-only feature index root (300) is set to NIL as the initial value, the key value (320) is set to NULL as the initial value, and the leaf node pointer (330) is set to NIL as the initial value.
[0050] FIG. 4 is a flowchart for explaining the process of adding a new key value to an increment-only feature index for the first time according to an embodiment, and FIG. 5 is a flowchart for explaining the process of adding a new key value to an increment-only feature index for the first time, not in the case of adding a key value for the first time according to an embodiment.
[0051] Referring to FIG. 4, when a new key value is first added to an increment-only feature index, that is, when the leaf node pointer of the root of the increment-only feature index is NIL (S410), memory for the leaf node structure is allocated from the system (S420).
[0052] Then, the additional key value is set to the first key value of the assigned leaf node and the key value of the increment-only feature index root (S430), and the leaf node pointer of the increment-only feature index root is set to the assigned last leaf node pointer (S440).
[0053] On the other hand, if the leaf pointer of the root of the increment-only feature index is not NIL (S410), that is, if the first index key is not added to the increment-only feature index, the process of adding the non-first index key as shown in FIG. 5 is performed.
[0054] Referring to FIG. 5, when a new key value is added to an increment-only feature index, rather than the first key value, that is, when the leaf node pointer of the root of the increment-only feature index is not NIL, a new key is added to the last leaf node pointed to by the leaf node pointer (S560).
[0055] At this time, if the last leaf node is full (S510), the last leaf node is added to the B-tree compatible index (S520), and a new leaf node is allocated from the system (S530).
[0056] Then, the new key value is set as the key value of the root of the increment-only feature index (S540), and the leaf node pointer is set to the assigned leaf node (S550). Finally, the new key value is added to the assigned leaf node, i.e., the last leaf node (S560).
[0057] FIG. 6 is a flowchart illustrating the process of adding the last leaf node to a B-tree compatible index with delay according to an embodiment.
[0058] Referring to FIG. 6, according to the embodiment, the last leaf node is delayed and not added to the B-tree compatible index until the last leaf node becomes full, and when the last leaf node becomes full, it is added to the B-tree compatible index.
[0059] If a B-tree compatible index has not been created, that is, if the index pointer of the root of the increment-only feature index is checked for NIL (S610) and is NIL, the index pointer of the root of the increment-only feature index is set to the last leaf node (S620) and the process terminates. In other words, the last leaf node becomes the root of the B-tree compatible index.
[0060] On the other hand, if a B-tree compatible index exists (S610), the last leaf node is set as the current node to be added (S630), and the parent node of the current node's left node is checked to see if it is full (S640).
[0061] If the result of checking in S640 is not Full, the minimum key value of the current node is added to the parent node (S650), and the child node of the key value added to the parent node is set as the current node (S660).
[0062] On the other hand, if the parent node of the left node of the current node is full (S640), a new internal node is allocated from the system and set as the new parent node (S670), the minimum value of the current node is added to the new parent node (S680), and the child node of the key value added to the parent node is set as the current node (S690), and then the parent node is set as the current node in order to add the created parent node as a child node of the parent node (S700).
[0063] S670 through S700 can be repeated until the parent node is not in a Full state.
[0064] Figure 7 is a lock compatibility table for an index for a data index having an increment-only feature.
[0065] Referring to Fig. 7, when searching for a specific key in an index with increment-only features, it is determined whether the key to be searched is smaller than the key value of the index root with increment-only features.
[0066] Based on the judgment, if the key to be searched is smaller than the key value of the index root with the increment-only characteristic, concurrency is improved by allowing a search by traversing the B-tree compatible index pointed to by the index pointer, regardless of whether a new key is being added to the index simultaneously.
[0067] In other words, if the key to be searched is smaller than the key value of the index root, the search can proceed regardless of changes such as the addition of new values because it is guaranteed that there will be no changes in any of the nodes traversed to find the key in a B-tree compatible index.
[0068] FIG. 8 is a diagram showing the configuration of a computer system according to an embodiment.
[0069] An index concurrency control device for increment-only feature data according to an embodiment can be implemented in a computer system (1000), such as a computer-readable recording medium.
[0070] A computer system (1000) may include one or more processors (1010), memory (1030), user interface input device (1040), user interface output device (1050), and storage (1060) that communicate with each other via a bus (1020). Additionally, the computer system (1000) may further include a network interface (1070) connected to a network (1080). The processor (1010) may be a semiconductor device that executes programs or processing instructions stored in a central processing unit, memory (1030), or storage (1060). The memory (1030) and storage (1060) may be storage media comprising at least one of a volatile medium, a non-volatile medium, a removable medium, a non-removable medium, a communication medium, or an information transfer medium. For example, the memory (1030) may include a ROM (1031) or a RAM (1032).
[0071] Although embodiments of the present invention have been described above with reference to the attached drawings, those skilled in the art will understand that the present invention may be implemented in other specific forms without changing its technical concept or essential features. Therefore, the embodiments described above should be understood as illustrative in all respects and not restrictive.
Claims
Claim 1 A method for controlling index concurrency for increment-only feature data, wherein the increment-only feature index comprises: a B-tree compatible index; a last leaf node having the same structure as the leaf node of the B-tree compatible index; and an increment-only feature index root composed of an index pointer indicating the B-tree compatible index, a key value recording the first index key value of the last leaf node, and a leaf node pointer indicating the last leaf node. Claim 2 In claim 1, the B-tree compatible index is an index concurrency control method for increment-only feature data, wherein the rightmost leaf node is connected to the last leaf node by an interconnection pointer. Claim 3 A method for controlling index concurrency for increment-only feature data, wherein the B-tree compatible index comprises: an internal node composed of n index keys and child node pointer pairs; and a leaf node composed of m index keys, key value pairs, a left link pointer connecting to a left leaf node, and a right link pointer connecting to a right leaf node. Claim 4 A method for controlling index concurrency for increment-only feature data according to claim 1, comprising: allocating memory of a leaf node structure from a system when a new key value is first added to an increment-only feature index; setting the added key value to the first key value of the allocated leaf node and the key value of the root of the increment-only feature index; and setting the leaf node pointer of the root of the increment-only feature index to the last leaf node pointer of the allocated leaf node. Claim 5 A method for controlling index concurrency for increment-only feature data according to claim 1, wherein when adding a new key value to an increment-only feature index, the step of checking whether the last leaf node is fully filled; and when the last leaf node is not filled, the step of adding a new key to the last leaf node indicated by the leaf node pointer. Claim 6 A method for controlling index concurrency for increment-only feature data, further comprising, in claim 5, the step of adding the last leaf node to a B-tree compatible index when the last leaf node is full; the step of allocating memory for the new leaf node; the step of setting the new key value as the key value of the root of the increment-only feature index; the step of setting the leaf node pointer to the allocated leaf node; and the step of adding the new key to the last leaf node indicated by the leaf node pointer. Claim 7 A method for controlling index concurrency for increment-only feature data, wherein, in claim 6, the step of adding a last leaf node to a B-tree compatible index includes the step of setting the index pointer of the root of the increment-only feature index to the last leaf node when the B-tree compatible index does not exist. Claim 8 In claim 6, the step of adding a last leaf node to a B-tree compatible index comprises: a step of setting the last leaf node as the current node to be added if the B-tree compatible index exists; a step of adding the minimum key value of the current node to the parent node if the parent nodes of the left node of the current node are not all filled; and a step of setting the child node of the key value added to the parent node as the current node, in a method for controlling index concurrency for increment-only feature data. Claim 9 A method for controlling index concurrency for increment-only feature data, wherein the step of adding a last leaf node to a B-tree compatible index further comprises: a step of allocating a new internal node and setting it as the new parent node when the parent nodes of the left node of the current node are all filled; a step of adding the minimum value of the current node to the new parent node; a step of setting the child node of the key value added to the parent node as the current node; and a step of setting the parent node as the current node. Claim 10 A method for controlling index concurrency for increment-only feature data according to claim 1, wherein the search for a specific key in an increment-only feature index is controlled, and when the key to be searched is smaller than the key value of the root of the increment-only feature index, the search is allowed by traversing a B-tree compatible index pointed to by an index pointer. Claim 11 An index concurrency control device for increment-only feature data, comprising: memory on which at least one program is recorded; and a processor that executes the program, wherein the program controls the addition of increment-only data to an increment-only feature index or the retrieval of increment-only data from an increment-only feature index, wherein the increment-only feature index comprises: a B-tree compatible index; a last leaf node having the same structure as a leaf node of the B-tree compatible index; and an increment-only feature index root comprising an index pointer indicating the B-tree compatible index, a key value recording the first index key value of the last leaf node, and a leaf node pointer indicating the last leaf node. Claim 12 In claim 11, the B-tree compatible index is an index concurrency control unit for increment-only feature data, wherein the rightmost leaf node is connected to the last leaf node by an interconnection pointer. Claim 13 An index concurrency control device for increment-only feature data, wherein, in claim 11, when a new key value is first added to an increment-only feature index, the program allocates memory of a leaf node structure from the system, sets the added key value to the first key value of the allocated leaf node and the key value of the root of the increment-only feature index, and sets the leaf node pointer of the root of the increment-only feature index to the allocated last leaf node pointer. Claim 14 An index concurrency control device for increment-only feature data, wherein, in claim 11, the program checks whether the last leaf node is fully filled when adding a new key value to an increment-only feature index, and if the last leaf node is not fully filled, adds the new key to the last leaf node pointed to by the leaf node pointer, and if the last leaf node is fully filled, adds the last leaf node to a B-tree compatible index, allocates memory for the new leaf node, sets the new key value as the key value of the root of the increment-only feature index, sets the leaf node pointer to the allocated leaf node, and adds the new key to the last leaf node pointed to by the leaf node pointer. Claim 15 An index concurrency control device for increment-only feature data, wherein, in adding the last leaf node to a B-tree compatible index, the program sets the index pointer of the root of the increment-only feature index as the last leaf node if the B-tree compatible index does not exist, and if the B-tree compatible index exists, sets the last leaf node as the current node to be added, and if the parent nodes of the left node of the current node are not all filled, adds the minimum key value of the current node to the parent node and sets the child node of the key value added to the parent node as the current node. Claim 16 In claim 15, the program, when adding the last leaf node to a B-tree compatible index, if the parent nodes of the left node of the current node are all filled, allocates a new internal node and sets it as the new parent node, adds the minimum value of the current node to the new parent node, sets the child node of the key value added to the parent node as the current node, and sets the parent node as the current node, an index concurrency control device for increment-only feature data. Claim 17 An index concurrency control unit for increment-only feature data, wherein, in claim 11, the program allows searching by traversing a B-tree compatible index pointed to by an index pointer when searching for a specific key in an increment-only feature index, if the key to be searched is smaller than the key value of the root of the increment-only feature index. Claim 18 An index structure for increment-only feature data comprising: a B-tree compatible index; a last leaf node having the same structure as the leaf node of the B-tree compatible index; and an increment-only feature index root comprising an index pointer pointing to the B-tree compatible index, a key value recording the first index key value of the last leaf node, and a leaf node pointer pointing to the last leaf node. Claim 19 In claim 18, the B-tree compatible index is an index structure for increment-only feature data, wherein the rightmost leaf node is connected to the last leaf node by an interconnection pointer. Claim 20 In claim 18, the B-tree compatible index comprises an internal node composed of n index keys and child node pointer pairs (Pair); and a leaf node composed of m index keys, key value pairs (Pair), a left link pointer connecting to a left leaf node, and a right link pointer connecting to a right leaf node, an index structure for increment-only feature data.