Data management system, data management method, data management program, and data structure

By employing a two-tier container structure with root and leaf binary trees, the data management system effectively addresses the limitations of existing systems, enabling the management of more data records through a binary tree structure.

JP2025072060APending Publication Date: 2025-05-09KOUSOKUYA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2023182561
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-10-24
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

Existing data management systems using binary trees are limited in the number of data records they can manage effectively.

Method used

The system introduces a two-tier container structure, where a root container with a root binary tree manages multiple leaf containers, each with a leaf binary tree connected to a jump node. This allows for the association of new key values with leaf binary trees, enabling the management of more data records.

Benefits of technology

This approach enables the management of a larger number of data records by expanding the binary tree structure with multiple containers, enhancing the system's capacity and efficiency in data management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025072060000001_ABST
    Figure 2025072060000001_ABST
Patent Text Reader

Abstract

To manage much more pieces of data with a binary tree.SOLUTION: A data management system includes at least one processor. The at least one processor generates a root container having a root binary tree, generates one or more leaf containers connected to the root container, where each leaf container includes a leaf binary tree connected to a jump node which is a leaf node ot the root binary tree, generates the one or more leaf containers associated with one or more key values corresponding to one or more pieces of data records, selects one leaf container that can be associated with a new key value in response to acquisition of a new key value of a new data record from one or more leaf containers on the basis of the root binary tree, and associates a new key value with the leaf binary tree of the selected leaf container.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] One aspect of the present disclosure relates to a data management system, a data management method, a data management program, and a data structure. Regarding. [Background technology]

[0002] There is known a data management system that uses a binary tree to manage multiple data records. For example, Patent Document 1 describes a bit string search device that searches for an index key based on a tree data structure in which index keys made up of bit strings that are the search targets are stored using a search key made up of a bit string. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Patent No. 4271214 Summary of the Invention [Problem to be solved by the invention]

[0004] There is a need for a mechanism for managing more data using a binary tree. [Means for solving the problem]

[0005] A data management system according to an aspect of the present disclosure includes at least one processor, which generates a root container having a root binary tree, generates one or more leaf containers connected to the root container, each leaf container having a leaf binary tree connected to a jump node that is a leaf node of the root binary tree, and associated with one or more key values ​​corresponding to one or more data records, and in response to obtaining a new key value of a new data record, selects one leaf container to which the new key value can be associated from the one or more leaf containers based on the root binary tree, and associates the new key value with the leaf binary tree of the selected leaf container.

[0006] In this aspect, multiple key values ​​are managed by one or more leaf containers (leaf binary trees) to which the key values ​​of the data records are associated, and a root container (root binary tree) that manages the one or more leaf containers. Since key values ​​are managed by a binary tree extended by two-level containers, more data can be managed by the binary tree. Effect of the Invention

[0007] According to one aspect of the present disclosure, more data can be managed by a binary tree. [Brief description of the drawings]

[0008] [Figure 1] FIG. 2 is a diagram illustrating an example of a functional configuration of a data management system. [Diagram 2] FIG. 1 is a diagram illustrating an example of a hardware configuration of a computer that functions as a data management system. [Diagram 3] 1A and 1B are diagrams illustrating examples of container and binary tree configurations. [Figure 4] 13 is a flowchart illustrating an example of a data registration process. [Diagram 5] FIG. 2 is a diagram showing the transition of states in a storage device. [Figure 6] FIG. 2 is a diagram showing the transition of states in a storage device. [Figure 7] FIG. 2 is a diagram showing the transition of states in a storage device. [Figure 8] FIG. 2 is a diagram showing the transition of states in a storage device. [Figure 9] FIG. 2 is a diagram showing the transition of states in a storage device. [Figure 10] FIG. 2 is a diagram showing the transition of states in a storage device. [Figure 11] FIG. 2 is a diagram showing the transition of states in a storage device. [Figure 12] FIG. 2 is a diagram showing the transition of states in a storage device. [Figure 13] FIG. 2 is a diagram showing the transition of states in a storage device. [Figure 14] FIG. 2 is a diagram showing the transition of states in a storage device. [Figure 15] FIG. 2 is a diagram showing the transition of states in a storage device. [Figure 16] 13 is a flowchart illustrating an example of a data search process. [Figure 17] 13 is a flowchart illustrating an example of a data deletion process. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0009] [System configuration] A data management system according to the present disclosure is a computer system that manages data stored in a given storage device. For example, the data management system performs registration, search, or deletion of data records in the storage device.

[0010] A data record refers to one row of data. A data record is composed of one or more values ​​corresponding to one or more data items. In one example, a data record includes an index key used for data search and entity data indicating information corresponding to one or more data items. In general, an index key is used to quickly search for specific information represented by the entity data. In this disclosure, the value of the index key is also referred to as a key value. The entity data in one data record is represented by a combination of one or more values ​​corresponding to one or more data items.

[0011] 1 is a diagram showing a functional configuration of a data management system 10 according to an example. In this example, the data management system 10 is connected to one or more user terminals 20 via a communication network. The communication network includes, for example, at least one of the Internet and an intranet.

[0012] The user terminal 20 is a computer used by a user of the data management system 10. The user terminal 20 may be a mobile terminal such as a smartphone, a laptop computer, or a wearable terminal, or may be a stationary terminal such as a desktop computer.

[0013] In one example, the data management system 10 includes a storage device 11, a receiving unit 12, a registration unit 13, a search unit 14, and a deletion unit 15 as functional components. The storage device 11 is a device that stores data. Examples of the storage device 11 include various recording media such as a database, a main memory unit, and an auxiliary memory unit. The storage device 11 may be composed of multiple recording media. The receiving unit 12 is a functional module that receives a request for a data operation on the storage device 11 from a user terminal 20. In one example, the data operation is registration, search, or deletion of a data record. The registration unit 13 is a functional module that stores a data record specified by the user terminal 20 in the storage device 11. The search unit 14 is a functional module that extracts a data record corresponding to a search condition specified by the user terminal 20 from the storage device 11. The deletion unit 15 is a functional module that deletes a data record corresponding to a deletion condition specified by the user terminal 20 from the storage device 11.

[0014] FIG. 2 is a diagram showing an example of a hardware configuration of a computer 100 functioning as the data management system 10. For example, the computer 100 includes a processor 101, a main memory unit 102, an auxiliary memory unit 103, a communication control unit 104, an input device 105, and an output device 106. The processor 101 executes an operating system and an application program. The main memory unit 102 is composed of, for example, a ROM and a RAM. The auxiliary memory unit 103 is composed of, for example, a hard disk or a flash memory, and generally stores a larger amount of data than the main memory unit 102. The communication control unit 104 is composed of, for example, a network card or a wireless communication module. The input device 105 is composed of, for example, a keyboard, a mouse, a touch panel, etc. The output device 106 is composed of, for example, a monitor and a speaker.

[0015] Each functional module of the data management system 10 is realized by a data management program 110 pre-stored in the auxiliary storage unit 103. Specifically, each functional module is realized by loading the data management program 110 onto the processor 101 or the main storage unit 102 and having the processor 101 execute the data management program 110. The processor 101 operates the communication control unit 104, the input device 105, or the output device 106 in accordance with the data management program 110, and reads and writes data in the main storage unit 102 or the auxiliary storage unit 103. Data or a database required for processing may be stored in the main storage unit 102 or the auxiliary storage unit 103.

[0016] The data management program 110 may be provided by being non-temporarily recorded on a tangible recording medium such as a CD-ROM, a DVD-ROM, a semiconductor memory, etc. Alternatively, the data management program 110 may be provided via a communication network as a data signal superimposed on a carrier wave.

[0017] The data management system 10 may be configured with one computer 100 or may be configured with multiple computers 100. When multiple computers 100 are used, these computers 100 are connected via a communication network such as the Internet or an intranet to logically construct a single data management system 10.

[0018] [Data Structure] The data management system 10 uses a binary tree as a data structure to manage multiple index keys (key values). A binary tree is a tree structure in which every parent node has two or less child nodes. In a binary tree, in a structure in which one or more nodes branch out hierarchically from the root node at the apex, every parent node has two or less child nodes. A node that has no children is called a leaf node.

[0019] The number of index keys that can be managed by one binary tree is limited by certain constraints on various elements such as the number of hierarchical levels of the binary tree, the bit strings of the key values, etc. In order to exceed this limit and manage more index keys, the data management system 10 introduces the concept of a container that houses a binary tree, and expands the binary tree by using multiple containers. This mechanism makes it possible to manage more index keys, and as a result, more data can be managed by the binary tree.

[0020] The data management system 10 generates one or more leaf containers associated with one or more key values ​​corresponding to one or more data records, and one root container for managing the one or more leaf containers in an integrated manner. Each leaf container is connected to the root container. Each container has one binary tree. In this disclosure, the binary tree of the root container is referred to as the "root binary tree" and the binary tree of the leaf container is referred to as the "leaf binary tree." The leaf nodes of the root binary tree are connected to the root nodes of the leaf binary tree, and thus the root container is connected to the leaf container. In this disclosure, the leaf nodes of the root binary tree are referred to as the "jump nodes." In the leaf binary tree, key values ​​are associated with the leaf nodes.

[0021] In one example, the data records are stored in a data container, which is another type of container than the root container and the leaf container, and each data record stored in the data container is associated with a leaf node of a leaf binary tree.

[0022] In one example, the data management system 10 stores the root container (root binary tree), the leaf container (leaf binary tree), and the data container in the storage device 11 .

[0023] 3 is a diagram showing an example of a configuration of containers and a binary tree. This example shows a root container 91 and three leaf containers 92, 93, and 94.

[0024] The root container 91 has a root binary tree 910. In the root binary tree 910, a branch node 911 is set as the root node, and a branch node 912 and a jump node 913 are connected as child nodes to the branch node 911. Jump nodes 914 and 915 are connected to the branch node 912 as child nodes.

[0025] The leaf container 92 has a leaf binary tree 920 connected to a jump node 914. In the leaf binary tree 920, a branch node 921 is set as the root node, and a branch node 922 and a leaf node 923 are connected as child nodes to the branch node 921. Leaf nodes 924 and 925 are connected to the branch node 922 as child nodes.

[0026] The leaf container 93 has a leaf binary tree 930 connected to a jump node 915. In the leaf binary tree 930, a branch node 931 is set as the root node, and branch nodes 932 and 933 are connected to this branch node 931 as child nodes. Leaf nodes 934 and 935 are connected to the branch node 932 as child nodes. Branch nodes 936 and 937 are connected to the branch node 933 as child nodes. Each of the branch nodes 936 and 937 has two child nodes.

[0027] The leaf container 94 has a leaf binary tree 940 connected to the jump node 913. The root node of the leaf binary tree 940 is a leaf node 941.

[0028] [System Operation] (Data registration) As an example of a data processing method according to the present disclosure, a data registration process by the data management system 10 will be described with reference to Fig. 4. Fig. 4 is a flowchart showing the data registration process as a process flow S1.

[0029] In step S101, the receiving unit 12 receives a new data record from the user terminal 20. The user terminal 20 generates or acquires a new data record including a new key value based on a user operation, and transmits a registration request, which is a data signal including the data record, to the data management system 10. The receiving unit 12 receives the registration request and acquires the new data record.

[0030] As shown in step S102, the subsequent processing differs depending on whether the data record is the first data record stored in storage device 11. If it is the first data record (YES in step S102), the processing proceeds to step S103. If it is the second or subsequent data record (NO in step S102), the processing proceeds to step S106.

[0031] When the process proceeds to step S103, the data container and the root container in the storage device 11 are empty, and no leaf containers exist in the storage device 11.

[0032] In step S103, the registration unit 13 generates a jump node in the root container. The registration unit 13 generates a jump node indicating a reference to a leaf container to be newly generated as a root node of the root container.

[0033] In step S104, the registration unit 13 creates a leaf container connected to the jump node in the storage device 11. The registration unit 13 creates a leaf node as the root node of the leaf binary tree of this leaf container.

[0034] In step S105, the registration unit 13 associates the new key value of the new data record with the leaf binary tree of the generated leaf container, and stores the new data record in the data container. The registration unit 13 determines a record ID that is an identifier that uniquely identifies the data record, and sets the record ID in the leaf node. The registration unit 13 associates the new data record with the record ID, and stores the data record in the data container. The key value of the data record is associated with the leaf node via the record ID.

[0035] At the time when the process proceeds to step S106, in the storage device 11, the data container stores one or more data records, the root container has one or more jump nodes, and one or more leaf containers exist.

[0036] In step S106, the registration unit 13 selects a leaf binary tree to which the new key value is to be associated. The registration unit 13 converts the new key value into a binary number, and based on the binary number representation, searches the root binary tree from the root node toward lower layers, and reaches one jump node. Then, the registration unit 13 moves to a leaf container connected to the jump node. In this disclosure, the leaf container is also referred to as a "target leaf container." The registration unit 13 determines whether or not a new leaf node to which the new key value is to be associated can be added to the leaf binary tree of the target leaf container. For example, the registration unit 13 performs the determination by referring to a predetermined constraint on the leaf container or the leaf binary tree. If it is determined that the new leaf node can be added, the registration unit 13 selects the leaf binary tree, i.e., the target leaf container. If it is determined that the new leaf node cannot be added, the registration unit 13 does not select the leaf binary tree (target leaf container).

[0037] As shown in step S107, the subsequent processing differs depending on whether or not a leaf binary tree (i.e., a target leaf container) for associating a new key value can be selected. If a target leaf container can be selected (YES in step S107), the processing proceeds to step S108, and if the selection fails (NO in step S107), the processing proceeds to step S109.

[0038] In step S108, the registration unit 13 associates the new key value of the new data record with the leaf binary tree of the target leaf container and stores the new data record in the data container. The registration unit 13 edits the leaf binary tree of the target leaf container based on the binary representation of the new key value to generate a leaf node to associate the new key value with. The registration unit 13 determines a record ID of the new data record and sets the record ID in the generated leaf node. The registration unit 13 associates the new data record with the record ID and stores the data record in the data container. The key value of the data record is associated with the leaf node via the record ID.

[0039] As shown in steps S106 to S108, in response to acquiring a new key value of a new data record, the registration unit 13 selects one leaf container to which the new key value can be associated based on the root binary tree from one or more leaf containers, and then associates the new key value with the leaf binary tree of the selected leaf container.

[0040] In step S109, the registration unit 13 generates a new jump node in the root container as an additional jump node. The registration unit 13 edits the root binary tree based on the binary representation of the new key value, and adds an additional jump node indicating a reference to the leaf container to be newly generated to the root binary tree.

[0041] In step S110, the registration unit 13 generates in the storage device 11 a leaf container to be connected to the additional jump node as an additional leaf container.

[0042] In step S111, the registration unit 13 at least edits the leaf binary tree of the additional leaf container such that each leaf binary tree of the multiple leaf containers including the additional leaf container is associated with at least one key value.

[0043] In one example, the registration unit 13 determines whether to split the leaf binary tree based on the binary representation of the new key and the leaf binary tree of the target leaf container.

[0044] When performing the split, the registration unit 13 splits the leaf binary tree of the target leaf container into a left subtree located to the left of the root node of the leaf binary tree and a right subtree located to the right of the root node. Next, the registration unit 13 moves one of the left subtree and the right subtree from the target leaf container to the additional leaf container, and connects the root node of the moved subtree to the additional jump node. The registration unit 13 sets the leaf binary tree of the additional leaf container by this process. The registration unit 13 replaces the leaf binary tree of the target leaf container with the other subtree of the left subtree and the right subtree, i.e., the remaining subtree. The registration unit 13 sets the leaf binary tree of the target leaf container by this process. The registration unit 13 searches the root binary tree based on the binary representation of the new key value to identify a leaf container to which the new key value is to be associated. The identified leaf container is one of the target leaf container and the additional leaf container. The registration unit 13 edits the leaf binary tree of the identified leaf container to generate a leaf node to which the new key value is to be associated.

[0045] On the other hand, if no split is performed, the registration unit 13 maintains the leaf binary tree of the target leaf container as is, and generates a leaf node as the root node of the leaf binary tree of the additional leaf container. In this case, the new key value is associated with that leaf node.

[0046] In this way, the registration unit 13 can execute a process of moving a subtree in the target leaf container to the additional leaf container, or a process of generating a leaf node as the root node of the additional leaf container, as editing of the leaf binary tree of the additional leaf container.

[0047] In step S112, the registration unit 13 associates the new key value of the new data record with the leaf binary tree of one leaf container and stores the new data record in the data container. The registration unit 13 associates the new key value with a leaf node prepared in one of the target leaf container and the additional leaf container. The registration unit 13 determines a record ID of the new data record and sets the record ID in the prepared leaf node. The registration unit 13 associates the new data record with the record ID and stores the data record in the data container. The key value of the data record is associated with the leaf node via the record ID.

[0048] As described by steps S109 to S112, when the registration unit 13 cannot select one leaf container to which a new key value can be associated, the registration unit 13 generates a new leaf container as an additional leaf container and executes an adding process of associating the new key value with the leaf binary trees of the additional leaf container and one of the one or more other leaf containers. This adding process includes a step of generating a new jump node as an additional jump node in the root binary tree, a step of generating an additional leaf container corresponding to the additional jump node, a step of at least editing the leaf binary tree of the additional leaf container so that the leaf binary trees of the additional leaf container and one or more other leaf containers are associated with at least one key value, and a step of associating the new key value with the leaf binary tree of the additional leaf container and one of the one or more other leaf containers.

[0049] As illustrated by process flow S1, the registration unit 13 associates a record ID with the new data record and stores the new data record in a data container. The registration unit 13 sets the record ID in the leaf node of a particular one of the leaf binary trees, thereby associating the new key value of the new data record with the leaf binary tree.

[0050] An example of data registration processing will be described with reference to Figs. 5 to 15. Figs. 5 to 15 are diagrams showing the transition of states in the storage device 11. In these figures, "CJMP" indicates a jump node, and "JumpID(n)" indicates the identifier of the jump node. "Branch(n)" indicates that the nth digit of the binary representation of the key value determines which of two child nodes to proceed to. "NodeID(n)" indicates the identifier of a branch node in one container. "LEAF" indicates a leaf node, and RawID(n) indicates a record ID. Figs. 5 to 15 show two child nodes connected to a parent node by a node pair consisting of a left node and a right node. In addition, these figures show the root node as the left node of the node pair, and the right node of the node pair as an unused node.

[0051] In the examples of Figures 5 to 14, the key value is expressed by a four-digit binary number, and therefore the range of key values ​​is 0 to 15. In this disclosure, the rightmost digit in the binary representation is referred to as the 0th digit, and from the 0th digit to the left, the 1st and 2nd digits are referred to, and the leftmost digit is referred to as the 3rd digit. When the binary representation is "1010," the 0th and 2nd digits are "0," and the 1st and 3rd digits are "1."

[0052] 5 shows the initial state of the storage device 11. In state ST1, the data container 200 and the root container 300 are empty, and there are no leaf containers.

[0053] In state ST2 shown in FIG. 6, the registration unit 13 stores a data record including a key value "1" as the first data record in the storage device 11. In state ST2, the registration unit 13 generates a jump node 311 with a jump ID of "0" as the root node of the root binary tree 310 (step S103). The registration unit 13 generates a leaf container 400 connected to the jump node 311, and generates a leaf node 411 as the root node of the leaf binary tree 410 of the leaf container 400 (step S104). The registration unit 13 sets the record ID "0" to the leaf node 411 (step S105). The registration unit 13 associates the record ID "0" with the first data record, and stores the data record in the data container 200 (step S105). As a result, the key value "1" is associated with the leaf node 411.

[0054] In state ST3 shown in FIG. 7, the registration unit 13 stores a data record including a key value "3" as a second data record in the storage device 11. In state ST3, the registration unit 13 converts the key value "3" into a binary number "0011" and reaches one jump node based on the binary representation "0011". In state ST3, since the root node of the root binary tree 310 is the jump node 311, the registration unit 13 reaches the jump node 311 and moves from the jump node 311 to the leaf container 400. The registration unit 13 determines whether or not a new leaf node for storing the key value "3" can be added to the leaf binary tree 410. The above process corresponds to step S106. Here, the registration unit 13 determines that the addition is possible and selects the leaf binary tree 410 (leaf container 400) (YES in step S107).

[0055] The registration unit 13 edits the leaf binary tree 410 based on the binary representation of the key value "3" to generate a leaf node for associating the key value "3". The registration unit 13 sets the branch node 412 identified by the Node ID "1" as the root node of the leaf binary tree 410. The binary representations of the key values ​​"1" and "3" are "0001" and "0011", respectively. Therefore, in the branch node 412, the second and third digits of the binary representation are "0", and which of the two child nodes to proceed to is determined by the value of the first digit of the binary representation of the key value. The registration unit 13 manages the function of such a branch node 412 by the binary representation "00XX". The first digit of the binary representation of the key value "1" is "0", and the first digit of the binary representation of the key value "3" is "1". Therefore, the registration unit 13 sets leaf node 411 as the left child node, generates a new leaf node 413 as the right child node, and sets the record ID "1" to the leaf node 413. The registration unit 13 associates the record ID "1" with the second data record and stores the data record in the data container 200. As a result, the key value "3" is associated with the leaf node 413. The above process corresponds to step S108.

[0056] In state ST4 shown in FIG. 8, the registration unit 13 stores a data record including a key value "5" as the third data record in the storage device 11. In state ST4, the registration unit 13 converts the key value "5" into a binary number "0101" and reaches one jump node based on the binary number representation "0101". In state ST4, since the root node of the root binary tree 310 is the jump node 311, the registration unit 13 reaches the jump node 311 and moves from the jump node 311 to the leaf container 400. The registration unit 13 determines whether or not a new leaf node for storing the key value "5" can be added to the leaf binary tree 410. The above process corresponds to step S106. Here, the registration unit 13 determines that the addition is possible and selects the leaf binary tree 410 (leaf container 400) (YES in step S107).

[0057] The registration unit 13 edits the leaf binary tree 410 based on the binary representation of the key value "5" and generates a leaf node for associating the key value "5". The binary representation "00XX" of the branch node 412 and the binary representation "0101" of the key value "5" differ in the second digit. Therefore, the registration unit 13 sets the branch node 414 identified by the Node ID "2" as the root node of the leaf binary tree 410, and manages the function of this branch node 414 by the binary representation "0XXX". The second digit of the binary representation of the branch node 412 is "0", and the second digit of the binary representation of the key value "5" is "1". Therefore, the registration unit 13 sets the branch node 412 as the left child node of the branch node 414, generates a new leaf node 415 as the right child node, and sets the record ID "2" to the leaf node 415. The registration unit 13 associates the record ID "2" with the third data record and stores the data record in the data container 200. As a result, the key value "5" is associated with the leaf node 415. The above process corresponds to step S108.

[0058] In state ST5 shown in FIG. 9, the registration unit 13 stores a data record including a key value "7" as the fourth data record in the storage device 11. In state ST5, the registration unit 13 converts the key value "7" into a binary number "0111" and reaches one jump node based on the binary representation "0111". In state ST5, since the root node of the root binary tree 310 is the jump node 311, the registration unit 13 reaches the jump node 311 and moves from the jump node 311 to the leaf container 400. The registration unit 13 determines whether or not a new leaf node for storing the key value "7" can be added to the leaf binary tree 410. The above process corresponds to step S106. Here, the registration unit 13 determines that the addition is possible and selects the leaf binary tree 410 (leaf container 400) (YES in step S107).

[0059] The registration unit 13 edits the leaf binary tree 410 based on the binary representation of the key value "7" and generates a leaf node to associate with the key value "7". The registration unit 13 reaches the right child node of the branch node 414 based on the binary representation "0XXX" of the branch node 414 and the binary representation "0111" of the key value "7". The registration unit 13 generates a branch node 416 identified by a Node ID "3" as the child node, and manages the function of the branch node 416 by the binary representation "01XX". The registration unit 13 sets a leaf node 415 as the left child node of the branch node 416, generates a new leaf node 417 as the right child node, and sets a record ID "3" to the leaf node 417. The registration unit 13 associates the record ID "3" with the fourth data record and stores the data record in the data container 200. As a result, the key value "7" is associated with the leaf node 417. The above process corresponds to step S108.

[0060] In state ST6 shown in FIG. 10, the registration unit 13 attempts to store a data record including a key value "2" in the storage device 11 as the fifth data record. In state ST6, the registration unit 13 converts the key value "2" to a binary number "0010" and reaches one jump node based on the binary representation "0010". In state ST6, since the root node of the root binary tree 310 is the jump node 311, the registration unit 13 reaches the jump node 311 and moves from the jump node 311 to the leaf container 400. The registration unit 13 determines whether or not a new leaf node for storing the key value "2" can be added to the leaf binary tree 410. The above process corresponds to step S106. Here, the registration unit 13 determines that an overflow has occurred in the leaf binary tree 410 and the addition is impossible, and the selection fails (NO in step S107).

[0061] In response to the failure, the registration unit 13 controls the storage device 11 so that the storage device 11 transitions from state ST6 to state ST7 shown in FIG. 11. In state ST7, the registration unit 13 edits the root binary tree 310 based on the binary representation "0010" of the key value "2" to generate an additional jump node indicating a reference to the additional leaf container. The registration unit 13 generates a copy of the branch node 414, which is the root node of the leaf container 400, as a branch node 312 identified by a Node ID "1", and sets the branch node 312 as the root node of the root binary tree 310. The registration unit 13 sets a jump node 311 to the leaf container 400 as the left child node of the branch node 312, and generates a jump node 313 with a jump ID of "1" as the right child node of the branch node 312 as an additional jump node. The above process corresponds to step S109. The registration unit 13 generates a leaf container 500 to be connected to the jump node 313 (step S110).

[0062] Next, the registration unit 13 controls the storage device 11 so that the storage device 11 transitions from state ST7 to state ST8 shown in Fig. 12. The registration unit 13 divides the leaf binary tree 410 of the leaf container 400 into a left subtree located to the left of the branch node 414, which is the root node, and a right subtree located to the right of the branch node 414. The registration unit 13 moves the right subtree to the leaf container 500 and sets the right subtree as the leaf binary tree 510. The branch node 416, the leaf node 415, and the leaf node 417 that constituted the right subtree are changed to the branch node 511, the leaf node 512, and the leaf node 513 of the leaf binary tree 510, respectively. The registration unit 13 also replaces the leaf binary tree 410 with the left subtree. The above process corresponds to step S111.

[0063] Next, the registration unit 13 controls the storage device 11 so that the storage device 11 moves from state ST8 to state ST9 shown in FIG. 13. The registration unit 13 searches the root binary tree 310 from the branch node 312 based on the binary representation "0010" of the key value "2", reaches the jump node 311, and identifies the leaf container 400. The registration unit 13 edits the leaf binary tree 410 to generate a leaf node for associating the key value "2". The registration unit 13 reaches the right child node of the branch node 412 based on the binary representation "00XX" of the branch node 412 and the binary representation "0010" of the key value "2". The registration unit 13 generates a branch node 421 identified by a NodeID "2" as the child node, and indicates the function of this branch node 421 by the binary representation "001X". The registration unit 13 generates a leaf node 422 as the left child node of the branch node 421, and sets the leaf node 413 as the right child node. The above process corresponds to step S111.

[0064] The registration unit 13 sets the record ID "4" in the leaf node 422. The registration unit 13 also associates the record ID "4" with the fifth data record and stores the data record in the data container 200. As a result, the key value "2" is associated with the leaf node 422. These processes correspond to step S112.

[0065] 14, the registration unit 13 attempts to store a data record including a key value "8" in the storage device 11 as the sixth data record. In state ST10, the registration unit 13 converts the key value "8" to a binary number "1000" and searches the root binary tree 310 from the branch node 312 based on the binary number representation "1000". However, since the third digit of the binary number representation of the branch node 312 and the key value "8" is different, even if the lower layers are traced from the branch node 312, there is no leaf container (leaf binary tree) to which the key value "8" can be associated. Therefore, the registration unit fails to select a leaf binary tree (leaf container) to which the key value "8" can be associated (NO in step S107).

[0066] In response to the failure, the registration unit 13 controls the storage device 11 so that the storage device 11 transitions from state ST10 to state ST11 shown in FIG. 15. In state ST11, the registration unit 13 edits the root binary tree 310 based on the binary representation "1000" of the key value "8" to generate an additional jump node indicating a reference to the additional leaf container. The registration unit 13 generates a branch node 314 identified by a Node ID "2" and sets the branch node 314 as the root node of the root binary tree 310. The registration unit 13 indicates the function of the branch node 314 by a binary representation "XXXX". The registration unit 13 sets the branch node 312 as the left child node of the branch node 314, and generates a jump node 315 with a jump ID of "2" as the right child node of the branch node 314 as an additional jump node. The above process corresponds to step S109. The registration unit 13 generates a leaf container 600 connected to the jump node 315 as an additional leaf container (step S110), and generates a leaf node 611 as a root node of a leaf binary tree 610 of the leaf container 600 (step S111). The registration unit 13 sets a record ID "5" in the leaf node 611. The registration unit 13 also associates the record ID "5" with the sixth data record and stores the data record in the data container 200. As a result, the key value "8" is associated with the leaf node 611. These processes correspond to step S112.

[0067] (Data Search) As an example of a data processing method according to the present disclosure, a data search process by the data management system 10 will be described with reference to Fig. 16. Fig. 16 is a flowchart showing the data search process as a process flow S2.

[0068] In step S201, the receiving unit 12 receives a search key from the user terminal 20. The search key is a value corresponding to an index key. The user terminal 20 generates or acquires the search key based on a user operation, and transmits a search request, which is a data signal including the search key, to the data management system 10. The receiving unit 12 receives the search request and acquires the search key.

[0069] In step S202, the search unit 14 searches the root binary tree based on the search key to identify one leaf container. The search unit 14 converts the search key into a binary number, and searches the root binary tree from the root node toward lower layers based on the binary number representation to identify one leaf container.

[0070] In step S203, the search unit 14 searches the leaf binary tree of the identified leaf container based on the search key to identify one leaf node. The search unit 14 searches from the root node of the leaf binary tree toward lower layers based on the binary representation of the search key to identify one leaf node.

[0071] In step S204, the search unit 14 refers to the data record corresponding to the identified leaf node. The search unit 14 accesses the data container based on the record ID indicated by the leaf node, and refers to the data record associated with the record ID.

[0072] In step S205, the search unit 14 compares the search key with the key value of that data record. If the search key matches the key value (YES in step S205), the process proceeds to step S206. In step S206, the search unit 14 extracts the referenced data record. This means that the search unit 14 has succeeded in the search. On the other hand, if the search key does not match the key value (NO in step S205), the process proceeds to step S207. In step S207, the search unit 14 determines that the search has failed.

[0073] In step S208, the search unit 14 transmits the search results to the user terminal 20. If the search is successful, the search unit 14 transmits the acquired data records as the search results. If the search is unsuccessful, the search unit 14 transmits search results indicating that no data records corresponding to the search key exist.

[0074] As described above, the data structure stored in the storage device 11 includes a root container having a root binary tree and one or more leaf containers connected to the root container. Each leaf container has a leaf binary tree connected to a jump node that is a leaf node of the root binary tree, and is associated with one or more key values ​​corresponding to one or more data records. As shown by the process flow S2, the data management system 10 (computer 100) executes a search using the data structure as follows. That is, the data management system 10 searches the root binary tree based on the search key and selects one leaf container from one or more leaf containers. The data management system 10 then searches the leaf binary tree of the selected leaf container based on the search key to identify one leaf node. Then, the data management system 10 extracts a data record corresponding to the key value when the key value associated with the identified leaf node matches the search key.

[0075] An example of data search will be described assuming that the storage device 11 is in state ST11. As an example, when a search key "3" is received, the search unit 14 searches the root binary tree 310 based on the binary representation of the search key "0011". The search unit 14 traces the branch node 314, the branch node 312, and the jump node 311 in this order to identify the leaf container 400 (step S202). Next, the search unit 14 traces the leaf binary tree 410 based on the binary representation in the order of the branch node 412, the branch node 421, and the leaf node 413 to identify the leaf node 413 (step S203). The search unit 14 refers to the data record corresponding to the leaf node 413 (step S204) and determines that the search key matches the key value of the data record (YES in step S205). The search unit 14 extracts the data record from the data container 200 (step S206) and transmits the data record to the user terminal 20 as a search result (step S208).

[0076] As another example, when the search key "6" is received, the search unit 14 searches the root binary tree 310 based on the binary representation of the search key "0110". The search unit 14 traces the branch node 314, the branch node 312, and the jump node 313 in this order to identify the leaf container 500 (step S202). Next, the search unit 14 traces the leaf binary tree 510 based on the binary representation in the order of the branch node 511 and the leaf node 513 to identify the leaf node 513 (step S203). The search unit 14 refers to the data record corresponding to the leaf node 513 (step S204) and determines that the search key does not match the key value "7" of the data record (NO in step S205). The search unit 14 determines that the search has failed (step S207), and transmits a search result indicating that no data record corresponding to the search key "6" exists to the user terminal 20 (step S208).

[0077] (DATA EXPUNGED) As an example of a data processing method according to the present disclosure, a data deletion process by the data management system 10 will be described with reference to Fig. 17. Fig. 17 is a flowchart showing the data deletion process as a process flow S3.

[0078] In step S301, the receiving unit 12 receives a deletion key from the user terminal 20. The deletion key is a value corresponding to an index key. The user terminal 20 generates or acquires the deletion key based on a user operation, and transmits a deletion request, which is a data signal including the deletion key, to the data management system 10. The receiving unit 12 receives the deletion request and acquires the deletion key.

[0079] In step S302, the deletion unit 15 searches the root binary tree based on the deletion key to identify one leaf container. The deletion unit 15 converts the deletion key into a binary number, and searches the root binary tree from the root node toward lower layers based on the binary number representation to identify one leaf container.

[0080] In step S303, the deletion unit 15 searches the leaf binary tree of the identified leaf container based on the deletion key to identify one leaf node. The deletion unit 15 searches the leaf binary tree from the root node toward lower layers based on the binary representation of the deletion key to identify one leaf node.

[0081] In step S304, the deletion unit 15 refers to the data record corresponding to the identified leaf node. The deletion unit 15 accesses the data container based on the record ID indicated by the leaf node, and refers to the data record associated with the record ID.

[0082] In step S305, the deletion unit 15 compares the deletion key with the key value of the data record. If the deletion key matches the key value (YES in step S305), the process proceeds to step S306. In step S306, the deletion unit 15 deletes the referenced data record from the data container. In step S307, the deletion unit 15 edits the leaf binary tree so as to delete the identified leaf node. The deletion unit 15 deletes the leaf node, and, if necessary, replaces the branch node that is the parent node of the leaf node with the leaf node or branch node that formed a node pair with the leaf node. If the leaf node is a root node, the deletion unit 15 deletes the leaf node and changes the leaf container to an empty state. Steps S306 and S307 mean that the deletion unit 15 has succeeded in the deletion. On the other hand, if the deletion key does not match the key value (NO in step S305), the process proceeds to step S308. In step S308, the deletion unit 15 determines that the deletion has failed.

[0083] An example of data deletion will be described assuming that the storage device 11 is in state ST11. As an example, when a deletion key "8" is received, the deletion unit 15 searches the root binary tree 310 based on the binary representation of the deletion key "1000". The deletion unit 15 traces the branch node 314 and the jump node 315 in this order to identify the leaf container 600 (step S302). Next, the deletion unit 15 searches the leaf binary tree 610 based on the binary representation to identify the leaf node 611 (step S303). The deletion unit 15 refers to the data record corresponding to the leaf node 611 (step S304) and determines that the deletion key matches the key value of the data record (YES in step S305). The deletion unit 15 deletes the data record from the data container 200 (step S306), and deletes the leaf node 611 (step S307). As a result, the leaf container 600 becomes empty.

[0084] As another example, when a deletion key "4" is received, the deletion unit 15 traverses the root binary tree 310 through the branch node 314, the branch node 312, and the jump node 313 in this order based on the binary representation of the deletion key "0100" to identify the leaf container 500 (step S302). Next, the deletion unit 15 traverses the leaf binary tree 510 through the branch node 511 and the leaf node 512 in this order based on the binary representation to identify the leaf node 512. The deletion unit 15 refers to the data record corresponding to the leaf node 512 (step S304) and determines that the deletion key does not match the key value "5" of the data record (NO in step S305). The deletion unit 15 determines that the deletion has failed (step S308).

[0085] [Variations] The present disclosure has been described in detail above based on the embodiments. However, the present disclosure is not limited to the above examples. Various modifications are possible without departing from the gist of the present disclosure.

[0086] In the above example, the data management system 10 comprises a storage device 11, however the storage device may be external to the data management system.

[0087] The data management system 10 described above is constructed as a client-server system. However, the data management system may be implemented in a stand-alone computer or in a user terminal that can access a storage device.

[0088] The processing procedure of the method executed by at least one processor is not limited to the examples in the above embodiment. For example, some of the steps or processes described above may be omitted, or each step may be executed in a different order. In addition, any two or more steps among the steps described above may be combined, or some of the steps may be modified or deleted. Alternatively, other steps may be executed in addition to each of the steps described above.

[0089] In the present disclosure, when comparing the magnitude relationship of two numerical values, either of the two criteria of "greater than or equal to" and "greater than" may be used, or either of the two criteria of "less than or equal to" and "less than" may be used.

[0090] In this disclosure, the expression "at least one processor executes a first process, executes a second process, ... executes an nth process" or a corresponding expression indicates a concept including a case where the processor that executes the n processes from the first process to the nth process changes midway. In other words, this expression indicates a concept including both a case where all of the n processes are executed by the same processor and a case where the processor changes among the n processes according to an arbitrary policy.

[0091] [Note] As can be seen from the various examples above, the present disclosure includes the following aspects. (Appendix 1) at least one processor; the at least one processor: generating a root container having a root binary tree; generating one or more leaf containers connected to the root container, each leaf container having a leaf binary tree connected to a jump node that is a leaf node of the root binary tree, and associated with one or more key values ​​corresponding to one or more data records; in response to obtaining a new key value for a new data record, selecting, from the one or more leaf containers based on the root binary tree, a leaf container to which the new key value can be associated; Associating the new key value with the leaf binary tree of the selected leaf container. Data management system. (Appendix 2) the at least one processor: if it is not possible to select the one leaf container to which the new key value can be associated, a new leaf container is generated as an additional leaf container, and an addition process is performed to associate the new key value with the leaf binary tree of the additional leaf container and one of the one or more leaf containers; The additional processing is generating a new jump node as an additional jump node in the root binary tree; generating the additional leaf container corresponding to the additional jump node; editing at least the leaf binary tree of the one or more leaf containers and the additional leaf container such that the leaf binary tree of each of the one or more leaf containers and the additional leaf container is associated with at least one of the key values; associating the new key value with the leaf binary tree of the additional leaf container and the one of the one or more leaf containers; Including, 2. A data management system according to claim 1. (Appendix 3) the at least one processor executes the adding process when the new key value cannot be associated with a target leaf container that is one of the one or more leaf containers; said step of editing at least said leaf binary tree of said additional leaf container further comprising: splitting the leaf binary tree of the target leaf container into a left subtree located to the left of a root node of the leaf binary tree and a right subtree located to the right of the root node; moving one of the left subtree and the right subtree from the target leaf container to the additional leaf container and connecting the one subtree to the additional jump node; replacing the leaf binary tree of the target leaf container with the other of the left subtree and the right subtree; Including, the step of associating the new key value with the leaf binary tree of the one leaf container comprises the step of associating the new key value with the leaf binary tree of one of the target leaf container and the additional leaf container; 3. A data management system according to claim 2. (Appendix 4) the at least one processor associates a record ID that uniquely identifies the data record with the new data record, stores the new data record in a data container, and sets the record ID to a leaf node of the leaf binary tree, thereby associating the new key value with the leaf binary tree. 4. A data management system according to any one of claims 1 to 3. (Appendix 5) 1. A method of data management implemented by a data management system including at least one processor, comprising: generating a root container having a root binary tree; generating one or more leaf containers connected to the root container, each leaf container having a leaf binary tree connected to a jump node that is a leaf node of the root binary tree, and associated with one or more key values ​​corresponding to one or more data records; in response to obtaining a new key value for a new data record, selecting, from the one or more leaf containers based on the root binary tree, a leaf container to which the new key value can be associated; associating the new key value with the leaf binary tree of the selected leaf container; A data management method including: (Appendix 6) generating a root container having a root binary tree; generating one or more leaf containers connected to the root container, each leaf container having a leaf binary tree connected to a jump node that is a leaf node of the root binary tree, and associated with one or more key values ​​corresponding to one or more data records; in response to obtaining a new key value for a new data record, selecting, from the one or more leaf containers based on the root binary tree, a leaf container to which the new key value can be associated; associating the new key value with the leaf binary tree of the selected leaf container; A data management program that causes a computer to execute the above. (Appendix 7) A data structure stored on a storage device accessed by a computer, comprising: a root container having a root binary tree; one or more leaf containers connected to the root container, each leaf container having a leaf binary tree connected to a jump node that is a leaf node of the root binary tree, and associated with one or more key values ​​corresponding to one or more data records; Equipped with The computer Searching the root binary tree based on a search key to select a leaf container from the one or more leaf containers; searching the leaf binary tree of the selected leaf container based on the search key to identify a leaf node; extracting the data record corresponding to a key value associated with the identified leaf node if the key value matches the search key; Used in processing, Data structure.

[0092] According to Supplementary Notes 1, 5, and 6, multiple key values ​​are managed by one or more leaf containers (leaf binary trees) to which the key values ​​of a data record are associated, and a root container (root binary tree) that manages the one or more leaf containers. Since key values ​​are managed by a binary tree extended by two-level containers, more data can be managed by the binary tree.

[0093] According to Supplementary Note 2, if a new key value cannot be associated with an existing leaf container, an additional leaf container is generated and a new key value is associated with the leaf binary tree of one of the leaf containers. By adding a leaf container in this way and associating a new key value, more data can be managed by the binary tree.

[0094] According to Supplementary Note 3, the size of the leaf binary tree of the target leaf container is reduced by moving the left half or the right half of the leaf binary tree of the target leaf container to the additional leaf container. Therefore, it becomes possible to associate a new key value with the leaf binary tree of the target leaf container again. In addition, since the sizes of the leaf binary trees are balanced between the target leaf container and the additional leaf container, it becomes possible to distribute and manage key values ​​in a balanced manner among the leaf containers.

[0095] According to Supplementary Note 4, key values ​​are not directly set in leaf nodes, but are associated with leaf nodes via record IDs. This mechanism allows the leaf binary tree to be managed separately from key values, which can lead to more efficient data management.

[0096] According to Supplementary Note 7, multiple key values ​​are managed by one or more leaf containers (leaf binary trees) to which the key values ​​of a data record are associated, and a root container (root binary tree) that manages the one or more leaf containers. Since key values ​​are managed by a binary tree extended by two-level containers, it is possible to provide data search based on a search key while managing more data by the binary tree. [Explanation of symbols]

[0097] 10...data management system, 11...storage device, 12...receiving unit, 13...registration unit, 14...search unit, 15...deletion unit, 20...user terminal, 91,300...root container, 92-94,400,500,600...leaf container, 110...data management program, 200...data container, 310,910...root binary tree, 410,510,610,920,930,940...leaf binary tree.

Claims

1. at least one processor; the at least one processor: generating a root container having a root binary tree; generating one or more leaf containers connected to the root container, each leaf container having a leaf binary tree connected to a jump node that is a leaf node of the root binary tree, and associated with one or more key values ​​corresponding to one or more data records; in response to obtaining a new key value for a new data record, selecting, from the one or more leaf containers based on the root binary tree, a leaf container to which the new key value can be associated; Associating the new key value with the leaf binary tree of the selected leaf container. Data management system.

2. the at least one processor: if it is not possible to select the one leaf container to which the new key value can be associated, a new leaf container is generated as an additional leaf container, and an additional process is performed to associate the new key value with the leaf binary tree of the additional leaf container and one of the one or more leaf containers; The additional processing is generating a new jump node as an additional jump node in the root binary tree; generating the additional leaf container corresponding to the additional jump node; editing at least the leaf binary tree of the one or more leaf containers and the further leaf container such that the leaf binary tree of each of the one or more leaf containers and the further leaf container is associated with at least one of the key values; associating the new key value with the leaf binary tree of the additional leaf container and the one of the one or more leaf containers; Including, The data management system according to claim 1 .

3. the at least one processor performs the adding process when the new key value cannot be associated with a target leaf container that is one of the one or more leaf containers; said step of editing at least said leaf binary tree of said additional leaf container further comprising: splitting the leaf binary tree of the target leaf container into a left subtree located to the left of a root node of the leaf binary tree and a right subtree located to the right of the root node; moving one of the left subtree and the right subtree from the target leaf container to the additional leaf container and connecting the one subtree to the additional jump node; replacing the leaf binary tree of the target leaf container with the other of the left subtree and the right subtree; Including, the step of associating the new key value with the leaf binary tree of the one leaf container comprises the step of associating the new key value with the leaf binary tree of one of the target leaf container and the additional leaf container; The data management system according to claim 2.

4. the at least one processor associates a record ID with the new data record that uniquely identifies the data record, stores the new data record in a data container, and sets the record ID to a leaf node of the leaf binary tree, thereby associating the new key value with the leaf binary tree. The data management system according to any one of claims 1 to 3.

5. 1. A method of data management implemented by a data management system including at least one processor, comprising: generating a root container having a root binary tree; generating one or more leaf containers connected to the root container, each leaf container having a leaf binary tree connected to a jump node that is a leaf node of the root binary tree, and associated with one or more key values ​​corresponding to one or more data records; in response to obtaining a new key value for a new data record, selecting, based on the root binary tree, from the one or more leaf containers, a leaf container to which the new key value can be associated; associating the new key value with the leaf binary tree of the selected leaf container; A data management method including:

6. generating a root container having a root binary tree; generating one or more leaf containers connected to the root container, each leaf container having a leaf binary tree connected to a jump node that is a leaf node of the root binary tree, and associated with one or more key values ​​corresponding to one or more data records; in response to obtaining a new key value for a new data record, selecting, based on the root binary tree, from the one or more leaf containers, a leaf container to which the new key value can be associated; associating the new key value with the leaf binary tree of the selected leaf container; A data management program that causes a computer to execute the above.

7. A data structure stored on a storage device accessed by a computer, comprising: a root container having a root binary tree; one or more leaf containers connected to the root container, each leaf container having a leaf binary tree connected to a jump node that is a leaf node of the root binary tree, and associated with one or more key values ​​corresponding to one or more data records; Equipped with The computer Searching the root binary tree based on a search key to select a leaf container from the one or more leaf containers; searching the leaf binary tree of the selected leaf container based on the search key to identify a leaf node; extracting the data record corresponding to a key value associated with the identified leaf node if the key value matches the search key; Used in processing, Data structure.

Citation Information

Patent Citations

  • BIT STRING SEARCH DEVICE, SEARCH METHOD AND PROGRAM

    JP4271214B2