CN110990404B - Index data processing method and device and electronic equipment - Google Patents

Index data processing method and device and electronic equipment Download PDF

Info

Publication number
CN110990404B
CN110990404B CN201911180572.1A CN201911180572A CN110990404B CN 110990404 B CN110990404 B CN 110990404B CN 201911180572 A CN201911180572 A CN 201911180572A CN 110990404 B CN110990404 B CN 110990404B
Authority
CN
China
Prior art keywords
node
index
target
lock
target leaf
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911180572.1A
Other languages
Chinese (zh)
Other versions
CN110990404A (en
Inventor
褚华兴
张智佳
宋凯
曹升东
龚岩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Asiainfo Technologies China Inc
Original Assignee
Asiainfo Technologies China Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Asiainfo Technologies China Inc filed Critical Asiainfo Technologies China Inc
Priority to CN201911180572.1A priority Critical patent/CN110990404B/en
Publication of CN110990404A publication Critical patent/CN110990404A/en
Application granted granted Critical
Publication of CN110990404B publication Critical patent/CN110990404B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2272Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2308Concurrency control
    • G06F16/2336Pessimistic concurrency control approaches, e.g. locking or multiple versions without time stamps
    • G06F16/2343Locking methods, e.g. distributed locking or locking implementation details
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a method and a device for processing index data and electronic equipment, wherein the method comprises the following steps: receiving a data processing request, wherein the data processing request at least comprises: indexing key values; starting from a root node in an index tree, comparing the node in the index tree with the index key value until a target leaf node matched with the index key value is found; in the process of searching the target leaf node in the index tree, adding a read lock to a node for which the comparison is carried out between the starting node and the index key value, and releasing the read lock to a node for which the comparison is carried out between the ending node and the index key value; adding a target lock to the target leaf node, wherein the attribute of the target lock corresponds to the processing attribute of the data processing request; performing data processing operation corresponding to the data processing request on the target leaf node; and releasing the target lock for the target leaf node.

Description

Index data processing method and device and electronic equipment
Technical Field
The present application relates to the technical field of index trees, and in particular, to a method and an apparatus for processing index data, and an electronic device.
Background
When the database supports interval indexes, the b-tree structure and related varieties such as b+tree, r-tree, b-link_tree and the like are mostly adopted. Since the leaf nodes may split when the tree is inserted into the nodes, which may cause splitting of parent nodes, the structure of the tree may need to be recursively adjusted to the root node; when a tree deletes a node, leaf nodes may be merged, which may cause merging of parent nodes, and the structure of the tree may need to be recursively adjusted to the root node.
At present, when the index is read and written, the whole index tree is locked through a read-write lock to ensure the accuracy of the index, the reading and the reading can be concurrent, and once the writing operation exists, other reading and writing operations need to be waited, and the concurrency is extremely low.
Disclosure of Invention
In view of the above, the present application provides a method, an apparatus and an electronic device for processing index data, which are used for solving the technical problem of low concurrency in processing index data of an index tree in the prior art, as follows:
a method of processing index data, comprising:
receiving a data processing request, wherein the data processing request at least comprises: indexing key values;
starting from a root node in an index tree, comparing the node in the index tree with the index key value until a target leaf node matched with the index key value is found; in the process of searching the target leaf node in the index tree, adding a read lock to a node for which the comparison is carried out between the starting node and the index key value, and releasing the read lock to a node for which the comparison is carried out between the ending node and the index key value;
Adding a target lock to the target leaf node, wherein the attribute of the target lock corresponds to the processing attribute of the data processing request;
performing data processing operation corresponding to the data processing request on the target leaf node;
and releasing the target lock for the target leaf node.
In the above method, preferably, at least a first pointer, a second pointer, a third pointer and at least one index marker value are included in a root node and an intermediate node in the index tree, and at least one index marker value is included in a leaf node in the index tree;
the first pointers of nodes in the same layer in the index tree point to right brothers of the nodes, and the first pointers of rightmost nodes in each layer in the index tree point to rightmost nodes in the next layer; a second pointer of the node in the same layer in the index tree points to a left brother node before the nodes are merged, and a third pointer points to a child node of the nodes; each of the nodes has a read lock and a write lock;
when the number of index mark values in a current node in the index tree is larger than a first threshold value, the current node splits a new right brother node of the current node according to the index mark values, a first pointer of the current node points to the new right brother node, the first pointer of the new right brother node points to an original right brother node of the current node, corresponding node data in a father node of the current node in the index tree is subjected to insertion processing, the father node is taken as the current node, and when the number of index mark values in the current node in the index tree is larger than the first threshold value, the current node splits the new right brother node of the current node according to the index mark values until the number of index mark values in the current node is smaller than or equal to the first threshold value;
And when the total number of index mark values of the current node and the left brother node in the index tree is smaller than a second threshold value, merging the current node with the left brother node, wherein a second pointer of the current node points to the left brother node of the current node, deleting corresponding node data of the current node in a father node in the index tree, taking the father node as the current node, and returning to execute the step when the total number of index mark values of the current node and the left brother node in the index tree is smaller than the second threshold value, merging the current node with the left brother node until the total number of index mark values of the current node and the left brother node is larger than or equal to the second threshold value.
The method preferably searches the index tree for the target leaf node, including:
adding a read lock to the root node of the index tree;
the root node is used as a father node, and the index mark value of the father node is compared with the index key value to determine a third pointer corresponding to a child node matched with the index key value;
determining the child node by using a third pointer corresponding to the child node;
Releasing the read lock for the father node and adding the read lock for the child node;
and returning to the step of comparing the index mark value of the parent node with the index key value by taking the child node as the parent node until a target leaf node matched with the index key value is found.
The above method, preferably, after the child node is locked, the method further includes:
judging whether a second pointer in the child node is not null, if not, determining a left brother node of the child node by using the second pointer of the child node, releasing the read lock for the child node, and adding the read lock for the left brother node of the child node.
The above method, preferably, after the child node is locked, the method further includes:
and judging whether the index key value is larger than the maximum index mark value in the child node, if so, determining the right brother node of the child node by using the first pointer of the child node, releasing the read lock for the child node, and locking the read lock for the right brother node of the child node.
The method, preferably, adds a target lock to the target leaf node, including:
Adding a read lock to the target leaf node;
and performing data processing operation corresponding to the data processing request on the target leaf node, wherein the data processing operation comprises the following steps:
and acquiring target data corresponding to the data processing request in the index data corresponding to the target leaf node.
The method, preferably, adds a target lock to the target leaf node, including:
writing a lock to the target leaf node;
and performing data processing operation corresponding to the data processing request on the target leaf node, wherein the data processing operation at least comprises the following steps:
and deleting target data corresponding to the data processing request in the index data corresponding to the target leaf node.
The above method, preferably, before releasing the target lock to the target leaf node, the method further includes:
writing and locking the right brother node of the target leaf node;
judging whether the target leaf node is subjected to node merging with a right brother node of the target leaf node, if so, moving node data of the right brother node of the target leaf node to the target leaf node, and pointing a second pointer in the right brother node of the target leaf node to the target leaf node;
Releasing the write lock to the right sibling node of the target leaf node;
determining a father node corresponding to the target leaf node in the index tree;
writing a lock to the parent node and executing the step of releasing the target lock to the target leaf node;
deleting node data corresponding to the target data in the father node;
judging whether the father node and the right brother node are subjected to node merging or not, if so, moving the node data of the right brother node of the father node to the father node, and pointing a second pointer in the right brother node of the father node to the father node;
the father node is taken as a child node, and the father node corresponding to the child node is determined in the index tree;
and adding a write lock to the father node, releasing the write lock to the child node, and returning to the step of executing the deleting processing to the node data corresponding to the target data in the father node until the father node and the right brother node are not subjected to node merging.
The method, preferably, adds a target lock to the target leaf node, including:
writing a lock to the target leaf node;
And performing processing operation corresponding to the data processing request on the index data corresponding to the target leaf node, wherein the processing operation at least comprises the following steps:
and inserting target data corresponding to the data processing request into the target leaf node.
The above method, preferably, before releasing the target lock to the target leaf node, the method further includes:
judging whether the target leaf node is subjected to node splitting, if so, pointing a first pointer of the target leaf node to a split new right brother node, and pointing the first pointer of the new right brother node to an original right brother node of the target leaf node;
determining a parent node of the target leaf node in the index tree;
writing a lock to the parent node and executing the step of releasing the target lock to the target leaf node;
performing insertion processing on node data corresponding to the target data in the father node;
judging whether the father node is subjected to node splitting, if so, pointing a first pointer of the father node to a split new right brother node, and pointing the first pointer of the new right brother node to an original right brother node of the father node;
The father node is taken as a child node, and the father node corresponding to the child node is determined in the index tree;
and adding a write lock to the father node, releasing the write lock to the child node, and returning to the step of executing the insertion processing of the node data corresponding to the target data in the father node until the father node does not split the node.
An index data processing apparatus, comprising:
a request receiving unit, configured to receive a data processing request, where the data processing request at least includes: indexing key values;
the node searching unit is used for comparing the nodes in the index tree with the index key values from the root node in the index tree until a target leaf node matched with the index key values is searched; in the process of searching the target leaf node in the index tree, adding a read lock to a node for which the comparison between the target leaf node and the index key value is started, and releasing the read lock to a node for which the comparison between the target leaf node and the index key value is ended;
the node locking unit is used for locking the target leaf node, and the attribute of the target lock corresponds to the processing attribute of the data processing request;
The node processing unit is used for performing data processing operation corresponding to the data processing request on the target leaf node;
and the node unlocking unit is used for releasing the target lock for the target leaf node.
An electronic device, comprising:
a memory for storing an application program and data generated by the application program operation;
a processor for executing the application program to realize: receiving a data processing request, wherein the data processing request at least comprises: indexing key values; starting from a root node in an index tree, comparing the node in the index tree with the index key value until a target leaf node matched with the index key value is found; in the process of searching the target leaf node in the index tree, adding a read lock to a node for which the comparison between the target leaf node and the index key value is started, and releasing the read lock to a node for which the comparison between the target leaf node and the index key value is ended; adding a target lock to the target leaf node, wherein the attribute of the target lock corresponds to the processing attribute of the data processing request; performing data processing operation corresponding to the data processing request on the target leaf node; and releasing the target lock for the target leaf node.
According to the technical scheme, after the index data processing request is received, the node hierarchy in the index tree is compared with the index key value from the root node of the index tree until the target leaf node matched with the index key value is found, the node which is compared with the index key value is locked in the process of searching the target leaf node, and correspondingly, the node which is compared with the index key value is unlocked in the process of ending the process of searching the target leaf node, so that the index data processing on other nodes is not influenced, then, a target place corresponding to the processing attribute of the data processing request, such as a read lock or a write lock, is added to the found target leaf node, and the lock of the target leaf node can be released after the data processing is carried out on the target leaf node. Therefore, in the application, for a data processing request, only the searched or processed node is locked in the index tree, but other nodes which are related but not processed currently are not locked, for example, all nodes in the whole index tree or all nodes on the path of the node where the node which is processed currently is located are not locked, thus, the reading and writing of other nodes are not influenced, and the concurrency of the index data processing on the index tree is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for processing index data according to an embodiment of the present application;
FIGS. 2 and 3 are respectively exemplary diagrams of an index tree in an embodiment of the present application;
fig. 4, fig. 5, and fig. 6 are a partial flow chart of a method for processing index data according to a first embodiment of the present application;
fig. 7 is a schematic structural diagram of an index data processing device according to a second embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to a third embodiment of the present application;
FIG. 9 is a schematic diagram of an index tree according to an embodiment of the present application;
FIG. 10 is an exemplary diagram of a node merge caused by index data deletion in an index tree in an embodiment of the present application;
FIG. 11 is a diagram illustrating an example of node splitting caused by index data insertion in an index tree in accordance with an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
As shown in fig. 1, a flowchart of a method for processing index data according to a first embodiment of the present application is provided, and the method in this embodiment may be applied to an electronic device capable of performing data indexing, such as a computer or a server. The method in the embodiment is mainly used for improving concurrency of processing the index data in the index tree.
Specifically, the method in this embodiment may include the following steps:
step 101: a data processing request is received.
Wherein, the data processing request at least comprises an index key value. The index key value may be a real index data value, or may be a data line number corresponding to the index data value or other values where the index data value may be found, 53 or 56 where the index data value may be found, etc.
Specifically, the data processing request in this embodiment refers to a request generated when a processing operation corresponding to a corresponding processing attribute needs to be performed on an index key value, where the request includes an index key value of an index data value that needs to be processed, and the index key value may be the index data value itself or a value that can represent the index data value.
Step 102: starting from the root node of the index tree, comparing the nodes in the index tree with the index key value until a target leaf node matched with the index key value is found.
The index tree may have multiple levels of nodes, as shown in fig. 2, with the topmost node being a root node, the bottommost node being a leaf node, and the nodes between the root node and the leaf node being intermediate nodes. The nodes in the index tree contain one or more index marker values, and the index marker values can be index data values per se or values capable of finding the index data values. The index marker values of the nodes in the same layer of the index tree are distributed according to the order of the values, and in the nodes in different layers of the index tree, all index marker values of the nodes in the upper layer are contained in the nodes in the lower layer, and for a certain index marker value in the nodes in the upper layer, the index marker value greater than the index marker value is in the same node in the lower layer, and the index marker value smaller than the index marker value is placed in the same node in the lower layer, as shown in fig. 2.
Based on the above index tree, in this embodiment, after receiving a data processing request containing an index key value, in the index tree, starting from a root node, nodes in the index tree are respectively compared with the index key value in the data processing request in the order from the upper layer to the lower layer and from left to right in the same layer until a target leaf node with the index key value matched is found.
And in the process of searching the target leaf node in the index tree, adding a read lock to the node for which the comparison is carried out between the starting node and the index key value, and releasing the read lock to the node after the comparison is carried out between the node and the index key value and the end of the comparison. For example, firstly, a root node is locked in a reading mode, index mark values in the root node are matched and compared with index key values to obtain mark value intervals matched with the index key values, then child nodes corresponding to the index key values are determined, then the root node is unlocked in the reading mode, then the child nodes determined in the root node are locked in the reading mode, the index mark values in the child nodes of the root node are matched and compared with the index key values, further the child nodes of the child nodes are determined, the child nodes of the root node are unlocked in the reading mode, then the child nodes of the child nodes are locked in the reading mode, and the like until target leaf nodes matched with the index key values are found.
The index data in this embodiment may be understood as line data in the memory index data.
Step 103: and adding a target lock to the target leaf node.
Wherein the attribute of the target lock corresponds to a processing attribute of the data processing request. For example, when the data processing request is a data searching request, a read lock is added to the target leaf node; when the data processing request is a data insertion request or a data deletion request, writing a lock on a target leaf node; when a data processing request is a data update request, a write lock is applied to the target leaf node, and so on.
Step 104: and performing data processing operation corresponding to the data processing request on the target leaf node.
For example, acquiring target data matched with the index key value in the data processing request from index data corresponding to the target leaf node; or deleting target data matched with the index key value in the data processing request in the index data corresponding to the target leaf node; or, inserting target data matching the index key in the data processing request into the target leaf node, and so on.
Step 105: releasing the target lock for the target leaf node.
After releasing the target lock to the target leaf node, the corresponding data processing request can be completed, and the corresponding operations such as data searching, inserting, deleting or updating can be completed.
It can be seen from the above technical solution that, in the first embodiment of the present application, after receiving an index data processing request, a node hierarchy in an index tree is compared with an index key value from a root node of the index tree until a target leaf node matching with the index key value is found, and in the process of searching the target leaf node, a read lock is added to a node that is compared with the index key value, and correspondingly, the read lock is released from a node that is compared with the index key value, so that index data processing on other nodes is not affected, and then, a target place, such as a read lock or a write lock, corresponding to a processing attribute of the data processing request is added to the found target leaf node, and after the target leaf node is subjected to data processing, the lock of the target leaf node can be released. Therefore, in the application, for a data processing request, only the searched or processed node is locked in the index tree, but other nodes which are related but not processed currently are not locked, for example, all nodes in the whole index tree or all nodes on the path of the node where the node which is processed currently is located are not locked, thus, the reading and writing of other nodes are not influenced, and the concurrency of the index data processing on the index tree is improved.
Specifically, at least a first pointer, a second pointer, a third pointer and at least one index mark value are included in a root node and an intermediate node in the index tree, and at least one index mark value is included in a leaf node in the index tree, and other values capable of finding index data such as index data or line numbers can be included;
wherein, the first pointers of nodes in the same layer in the index tree point to the right brothers of the nodes, as shown in fig. 3, the first pointers of the rightmost nodes in each layer in the index tree point to the rightmost nodes in the next layer; if the node in the same layer in the index tree is merged with the left brother node, a second pointer of the node in the same layer in the index tree points to the left brother node before the node is merged, and a third pointer points to a child node of the node; each node is provided with a read lock and a write lock, wherein the read lock is used for locking the node to only perform the read operation corresponding to the current data processing request, and the write lock is used for locking the node to only perform the write operation corresponding to the current data processing request.
It should be noted that, node splitting and/or node merging may occur in the nodes in the index tree.
Specifically, when the number of index marker values in the current node in the index tree is greater than a first threshold, the current node splits a new right sibling node of the current node according to the index marker values, a first pointer of the current node points to the new right sibling node, a first pointer of the new right sibling node points to an original right sibling node of the current node, and insertion processing is performed on corresponding node data of the current node in a father node in the index tree, such as inserting index marker values corresponding to the new right sibling node in the father node, then the father node is taken as the current node, and when the number of index marker values in the current node in the index tree is greater than the first threshold, the current node splits the new right sibling node of the current node according to the index marker values, and so on until the number of index marker values in the current node is less than or equal to the first threshold, node splitting is not performed any more;
And when the total number of index mark values of the current node and the left brother node in the index tree is smaller than a second threshold value, the current node is combined with the left brother node, the second pointer of the current node points to the left brother node of the current node, and the corresponding node data of the current node in the father node in the index tree is deleted, for example, the index mark value corresponding to the index key value in the data processing request in the father node is deleted, then the father node is taken as the current node, and the current node is combined with the left brother node when the total number of index mark values of the current node and the left brother node in the index tree is smaller than the second threshold value, and so on until the total number of index mark values of the current node and the left brother node is larger than or equal to the second threshold value, and node combination is not performed.
Based on the above implementation, the process of finding the target leaf node in the index tree is as shown in fig. 4:
step 401: adding a read lock to a root node in the index tree;
step 402: the root node is used as a father node, and the index mark value of the father node is compared with the index key value to determine a third pointer corresponding to the child node matched with the index key value;
Step 403: determining the child node by using a third pointer corresponding to the child node;
step 404: releasing the read lock to the parent node;
step 405: adding a read lock to the child node;
step 406: and taking the child node as a parent node, and returning to the step 402 to compare the index mark value of the parent node with the index key value until the target leaf node matched with the index key value is found.
Wherein after releasing the read lock to the parent node, the child node may split or merge before locking the child node, and thus, after step 405, the following steps may be further included:
step 407: judging whether the second pointer in the child node is not empty, if so, executing step 408;
step 408: and determining the left brother node of the child node by using the second pointer of the child node, releasing the read lock on the child node, and locking the read lock on the left brother node of the child node.
Step 409: judging whether the index key value is greater than the maximum index mark value in the child node, if so, executing step 410;
step 410: and determining the right brother node of the child node by using the first pointer of the child node, releasing the read lock on the child node, and locking the read lock on the right brother node of the child node.
It should be noted that, in this embodiment, after step 405, step 407 and step 408 may be performed first, and then step 409 and step 410 may be performed as shown in fig. 4, or step 409 and step 410 may be performed first, and then step 407 and step 408 may be performed, and the specific implementation manner may be set according to the needs, so that the formed technical solutions are all within the scope of the present application.
In one implementation manner, under the condition that the data processing request is a processing attribute for searching and acquiring index data, a read lock is added to a target leaf node, and correspondingly, a data processing operation corresponding to the data processing request is performed on the target leaf node, which specifically includes: obtaining target data matched with index key values in a data processing request in index data corresponding to target leaf nodes;
in another implementation manner, in the case that the data processing request is a processing attribute for deleting the index data, a write lock is added to the target leaf node, and correspondingly, a data processing operation corresponding to the data processing request is performed on the target leaf node, which specifically includes: deleting target data matched with the index key value in the data processing request in the index data corresponding to the target leaf node;
In this case, before releasing the target lock, i.e. the write lock, on the target leaf node, it is further required to determine whether the target leaf node after deleting the target data will merge with its right sibling node, as shown in fig. 5:
step 501: writing and locking a right brother node of the target leaf node;
step 502: judging whether the target leaf node is combined with the right brother node of the target leaf node, if so, executing step 503;
step 503: moving node data of a right sibling node of the target leaf node to the target leaf node, and pointing a second pointer in the right sibling node of the target leaf node to the target leaf node;
step 504: releasing the write lock for the right brother node of the target leaf node;
step 505: determining a father node corresponding to the target leaf node in the index tree;
step 506: writing a lock on the father node, and executing the step 105 to release the target lock on the target leaf node;
step 507: deleting node data corresponding to the target data in the father node;
step 508: judging whether the father node and the right brother node are combined, if so, executing step 509;
step 509: moving node data of a right brother node of the father node to the father node, and pointing a second pointer in the right brother node of the father node to the father node;
Step 510: using a father node as a child node, and determining the father node corresponding to the child node in the index tree;
step 511: writing a lock to the father node;
step 512: releasing the write lock by the child node, and returning to execute the deleting process on the node data corresponding to the target data in the parent node in step 507 until it is determined in step 508 that the parent node and the right brother node do not perform node merging.
In another implementation manner, in the case that the data processing request is a processing attribute for inserting index data, a write lock is added to the target leaf node, and correspondingly, a data processing operation corresponding to the data processing request is performed on the target leaf node, which specifically includes: inserting target data matched with the index key value in the data processing request into the target leaf node;
in this case, before releasing the target lock, i.e. the write lock, on the target leaf node, it is also necessary to determine whether the target leaf node after inserting the target data will split, as shown in fig. 6:
step 601: judging whether the target leaf node performs node splitting or not, and if so, executing step 602;
step 602: directing a first pointer of the target leaf node to the split new right brother node, and directing the first pointer of the new right brother node to the original right brother node of the target leaf node;
Step 603: determining a parent node of the target leaf node in the index tree;
step 604: writing a lock on the father node, and executing the step 105 to release the target lock on the target leaf node;
step 605: inserting node data corresponding to the target data in the father node;
step 606: judging whether the father node is split, if so, executing step 607;
step 607: directing a first pointer of the father node to the split new right brother node, and directing the first pointer of the new right brother node to the original right brother node of the father node;
step 608: using a father node as a child node, and determining the father node corresponding to the child node in the index tree;
step 609: writing a lock to the father node;
step 610: the child node releases the write lock, and returns to step 605 to insert the node data corresponding to the target data in the parent node until it is determined in step 606 that the parent node does not perform node splitting.
Referring to fig. 7, a schematic structural diagram of an index data processing device according to a second embodiment of the present application is provided, where the device in this embodiment may be disposed in an electronic device capable of performing data indexing, such as a computer or a server. The device in this embodiment is mainly used to improve concurrency of processing index data in the index tree.
Specifically, the apparatus in this embodiment may include the following structures:
the request receiving unit 701 is configured to receive a data processing request, where the data processing request includes at least: indexing key values;
a node searching unit 702, configured to compare, starting from a root node in the index tree, a node in the index tree with the index key value until a target leaf node matching the index key value is found; in the process of searching a target leaf node in the index tree, a read lock is added to a node for which the comparison between the starting node and the index key value is performed, and the read lock is released to a node for which the comparison between the ending node and the index key value is performed;
a node locking unit 703, configured to add a target lock to a target leaf node, where an attribute of the target lock corresponds to a processing attribute of the data processing request;
a node processing unit 704, configured to perform a data processing operation corresponding to the data processing request on the target leaf node;
the node unlocking unit 705 is configured to release the target lock on the target leaf node.
It can be seen from the above technical solution that, in the processing device for index data provided in the second embodiment of the present application, after receiving an index data processing request, starting from a root node of an index tree, comparing a node hierarchy in the index tree with an index key value until a target leaf node matched with the index key value is found, and in the process of searching the target leaf node, locking a node that starts to be compared with the index key value, and correspondingly, releasing the lock at a node that ends to be compared with the index key value, thereby not affecting the index data processing on other nodes, and then locking a target place, such as a read lock or a write lock, corresponding to a processing attribute of the data processing request, for the found target leaf node, and after performing data processing on the target leaf node, releasing the lock of the target leaf node. Therefore, in the application, for a data processing request, only the searched or processed node is locked in the index tree, but other nodes which are related but not processed currently are not locked, for example, all nodes in the whole index tree or all nodes on the path of the node where the node which is processed currently is located are not locked, thus, the reading and writing of other nodes are not influenced, and the concurrency of the index data processing on the index tree is improved.
It should be noted that, the specific implementation of each unit in the present embodiment may refer to the corresponding content in the foregoing, which is not described in detail herein.
Referring to fig. 8, a schematic structural diagram of an electronic device according to a third embodiment of the present application may be a device capable of performing data processing, such as a computer or a server.
Specifically, the electronic device in this embodiment may include the following structure:
a memory 801 for storing an application program and data generated by the running of the application program;
a processor 802 for executing an application program to implement: receiving a data processing request, wherein the data processing request at least comprises: indexing key values; starting from a root node in the index tree, comparing the node in the index tree with the index key value until a target leaf node matched with the index key value is found; in the process of searching a target leaf node in the index tree, a read lock is added to a node for which the comparison between the starting node and the index key value is performed, and the read lock is released to a node for which the comparison between the ending node and the index key value is performed; adding a target lock to the target leaf node, wherein the attribute of the target lock corresponds to the processing attribute of the data processing request; performing data processing operation corresponding to the data processing request on the target leaf node; releasing the target lock for the target leaf node.
It can be seen from the above technical solution that, in the electronic device provided in the third embodiment of the present application, after receiving an index data processing request, starting from a root node of an index tree, comparing a node hierarchy in the index tree with an index key value until a target leaf node matched with the index key value is found, and in the process of searching the target leaf node, locking a node that starts to be compared with the index key value, and correspondingly, releasing the lock at a node that ends to be compared with the index key value, thereby not affecting index data processing on other nodes, and then adding a target place, such as a read lock or a write lock, corresponding to a processing attribute of the data processing request, to the found target leaf node, and after performing data processing on the target leaf node, releasing the lock of the target leaf node. Therefore, in the application, for a data processing request, only the searched or processed node is locked in the index tree, but other nodes which are related but not processed currently are not locked, for example, all nodes in the whole index tree or all nodes on the path of the node where the node which is processed currently is located are not locked, thus, the reading and writing of other nodes are not influenced, and the concurrency of the index data processing on the index tree is improved.
It should be noted that, the specific implementation of each unit in the present embodiment may refer to the corresponding content in the foregoing, which is not described in detail herein.
The technical scheme in the application is illustrated by taking an index tree as a b-link tree as an example, and is as follows:
first, the index tree in the present application has the following features, as shown in fig. 9:
1. all nodes of the same hierarchy are strung by using right_link pointers to point to right brothers nodes, and the right_link of the rightmost node of each hierarchy points to the rightmost node of the next hierarchy (the right_link of the rightmost leaf node is empty);
2. each node has an out link pointer for merging, normally NULL, and if the node is merged, out link points to the left sibling node before merging. When a node judges whether to be combined with a right node, the data of the right node is combined to a left node; each node is provided with a read-write lock;
3. the node types are divided into root nodes, intermediate nodes and leaf nodes (the root nodes and the intermediate nodes store keys and pointers pointing to child nodes, the leaf nodes store keys and other marks capable of finding row data such as row numbers, etc.), and all keys on the tree appear in the leaf nodes;
4. The key may be a true index data value, or a line number or other value where the index data value may be found.
In specific implementation, the locking principle in the application is as follows:
if multiple locks need to be held simultaneously, the locking sequence for node access is as follows: since the locking sequence is consistent from left to right and from bottom to top, according to the technical scheme in the application, the concurrent access to the index tree simultaneously occupies the locks of a plurality of nodes without deadlock.
1. Searching index data:
when the data processing request for the index tree is a request for searching the data, a lock is held at most according to the technical scheme in the application, wherein for a given key (index key value in the data processing request), searching is started from a root node, a binary search is used in the node, a child node pointer is found, a child node is found correspondingly, and the like until a correct leaf node is found. The specific checking process is as follows:
A. adding a read lock of a father node to acquire a pointer of a possible child node;
B. releasing the read lock of the father node, adding the read lock of the child node (because the lock of the father node is released first and then the lock of the child node is added, merging or splitting may occur in the child node, after the read lock of the child node is added, judging whether the out_link of the child node is NULL or not, if not, the child node is merged, requiring move_left, acquiring the out_link pointer of the child node, releasing the read lock of the child node, adding the read lock of the left brother node, judging whether the key is larger than the largest key on the child node after judging the out_link, if so, splitting the child node, requiring move_right, acquiring the right_node pointer of the child node, releasing the read lock of the child node, and adding the read lock … … of the right brother node until the correct child node of the layer is acquired;
C. The steps A, B are looped (each layer going to the next layer, whether a move_left or a move_right is needed is checked until a final leaf node is found, whether the searched key exists is judged, and if the specific position exists, the specific position is found (meanwhile, the path of each layer of nodes on the tree is recorded, and later recursion merging adjustment or recursion insertion splitting can be used);
in the application, the searching is performed according to the range of the key, for example, the leaf node of the minimum key is found first, and then the node traverses backwards according to the right brother node.
2. Index data delete and do not merge nodes
Under the condition that the data processing request for the index tree is a request for deleting data and the merging cannot be caused for nodes in the index tree, the technical scheme in the application holds a lock at most at the same time, and the method comprises the following steps:
referring to index data searching in 1, firstly, finding out a final leaf node, wherein the difference is that the final leaf node is written with a lock instead of read-lock, and deleting the designated index data on the leaf node;
3. index data deletion, causing merging
In the case that the data processing request for the index tree is a request for deleting data and merging is caused to nodes in the index tree, the technical scheme according to the application holds two locks at most simultaneously, as follows:
As shown in fig. 10, when a piece of index data a is deleted on a leaf node n, the write lock of the node n is held, and the write lock of a right brother node n ' of n is added, when the two nodes can be combined, the data of the node n ' is moved to a left brother node n, an out_link pointer of the node n ' points to the left brother node n, and then the write lock of the node n ' can be released (if other concurrent operation accesses the node n ', it can be judged that the node is deleted according to the out_link pointer, so that the node n is accessed continuously); meanwhile, according to the node stack of the search record, a father node m of the node n is found, once the write lock of the father node m is added, the write lock of the child node n is released, the pointer and the key on the father node m are adjusted and deleted, meanwhile, whether the layer of the father node needs to be combined or not is judged, and the recursion adjustment is performed until the father node does not need to be combined any more;
in the same layer, the data of the merged node is merged, the out_link pointer points to the left brother node, and the write lock of the out_link pointer can be released; at different levels, once the write lock of the parent node is added, the write lock of the child node can be released; thus, the merging operation, even if the tree is recursively adjusted, holds at most two locks simultaneously, and the locking sequence is from left to right and from bottom to top.
When the nodes are combined and need to be recovered, the maximum transaction number allocated at the moment is recorded, and after all transactions started before are submitted (no thread is put to the node at the moment), the nodes can be safely recovered and the special thread processing is performed.
When the index is deleted, the height of the tree can not be reduced during concurrent access in order to furthest improve the concurrency, ensure the consistency of data and avoid deadlock. For example, 32 keys of each node are inserted with 10 hundred million index data, the height of the tree becomes 6 layers, and then the index data is gradually deleted to 0, the b-link-tree gradually becomes a tree with only one node in each layer, and each node has only one left child node; at this time, the memory occupied by the 6 tree nodes is kept small (if no concurrent data access is performed, the last node of each layer can be recycled, and the memory occupied by the tree can be fully recycled).
4. Index data insertion, does not cause splitting:
under the condition that the data processing request for the index tree is a request for data insertion and no splitting is caused to nodes in the index tree, the technical scheme in the application is used for simultaneously holding a lock at most, and the method comprises the following steps of:
Referring to index data searching in 1, finding out a final leaf node to be inserted, wherein the difference is that the final leaf node is written with a lock instead of a read lock, and the designated index data is inserted into the leaf node;
5. index data insertion, causing splitting:
in the case that the data processing request for the index tree is a request for data insertion and node splitting is caused to a node in the index tree, according to the technical scheme in the application, at most two locks are simultaneously held, and the method comprises the following steps:
the newly split node always serves as the right sibling node of the original node, for example, as shown in fig. 11, after the key on the node n is full, new index data is inserted, and is split into n and n ', one part of data is placed on the node n, and the other part of data is migrated to the right sibling node n'; at this time, the write lock of the node n is held, the father node m of the node n is found according to the previous searching stack, and once the write lock of the father node m is added, the write lock of the child node n is released; then inserting a new key and a pointer pointing to a child node n' on the parent node m, and recursively processing if the parent node m is also split;
6. updating index data:
the updating operation of the index data can be divided into "delete" and "insert", and accordingly, the "delete" and "insert" can refer to the contents in the foregoing 2-5, respectively, for index data processing.
In summary, the technical scheme of the application is based on the principle of high concurrency, and can realize that at most two node locks are occupied for each operation of searching, inserting, deleting and updating, cross locking and deadlock can not occur during concurrency, and meanwhile, the reasons of correctness and consistency of interval index data can be ensured (by introducing right_link and out_link pointers and the access locking sequence and mode in specific implementation).
Therefore, no matter the read-write concurrency or the write-write concurrency is carried out, the whole tree does not need to be locked, cross lock or other deadlock conditions do not occur when the nodes are locked, and various operations need to occupy the number of locks at the same time to be extremely small, so that the concurrency performance of the interval index is obviously higher than that of the prior art. Meanwhile, except for the last node of each layer, other idle nodes can be recycled in concurrent access (the last node of each layer can be recycled if no concurrent access exists), and the memory occupation is reduced along with the reduction of index data, instead of only increasing and decreasing.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (12)

1. A method of processing index data, comprising:
receiving a data processing request, wherein the data processing request at least comprises: indexing key values;
starting from a root node in an index tree, comparing the node in the index tree with the index key value until a target leaf node matched with the index key value is found; in the process of searching the target leaf node in the index tree, adding a read lock to a node for which the comparison is carried out between the starting node and the index key value, and releasing the read lock to a node for which the comparison is carried out between the ending node and the index key value;
adding a target lock to the target leaf node, wherein the attribute of the target lock corresponds to the processing attribute of the data processing request;
performing data processing operation corresponding to the data processing request on the target leaf node;
releasing the target lock for the target leaf node;
the method comprises the steps that a root node and an intermediate node in an index tree at least comprise a first pointer, a second pointer, a third pointer and at least one index mark value, and leaf nodes in the index tree at least comprise index mark values;
The first pointers of nodes in the same layer in the index tree point to right brothers of the nodes, and the first pointers of rightmost nodes in each layer in the index tree point to rightmost nodes in the next layer; a second pointer of the node in the same layer in the index tree points to a left brother node before the nodes are merged, and a third pointer points to a child node of the nodes; each of the nodes has a read lock and a write lock.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
when the number of index marker values in a current node in the index tree is larger than a first threshold value, the current node splits out a new right brother node of the current node according to the index marker values, a first pointer of the current node points to the new right brother node, the first pointer of the new right brother node points to an original right brother node of the current node, corresponding node data in a father node of the current node in the index tree is subjected to insertion processing, the father node is taken as the current node, and when the number of index marker values in the current node in the index tree is larger than the first threshold value, the current node splits out the new right brother node of the current node according to the index marker values until the number of index marker values in the current node is smaller than or equal to the first threshold value;
And when the total number of index mark values of the current node and the left brother node in the index tree is smaller than a second threshold value, merging the current node with the left brother node, wherein a second pointer of the current node points to the left brother node of the current node, deleting corresponding node data of the current node in a father node in the index tree, taking the father node as the current node, and returning to execute the step when the total number of index mark values of the current node and the left brother node in the index tree is smaller than the second threshold value, merging the current node with the left brother node until the total number of index mark values of the current node and the left brother node is larger than or equal to the second threshold value.
3. The method of claim 2, wherein looking up the target leaf node in the index tree comprises:
adding a read lock to the root node of the index tree;
the root node is used as a father node, and the index mark value of the father node is compared with the index key value to determine a third pointer corresponding to a child node matched with the index key value;
determining the child node by using a third pointer corresponding to the child node;
Releasing the read lock for the father node and adding the read lock for the child node;
and returning to the step of comparing the index mark value of the parent node with the index key value by taking the child node as the parent node until a target leaf node matched with the index key value is found.
4. A method according to claim 3, wherein after locking the child node, the method further comprises:
judging whether a second pointer in the child node is not null, if not, determining a left brother node of the child node by using the second pointer of the child node, releasing the read lock for the child node, and adding the read lock for the left brother node of the child node.
5. A method according to claim 3, wherein after locking the child node, the method further comprises:
and judging whether the index key value is larger than the maximum index mark value in the child node, if so, determining the right brother node of the child node by using the first pointer of the child node, releasing the read lock for the child node, and locking the read lock for the right brother node of the child node.
6. The method of claim 1, wherein adding a target lock to the target leaf node comprises:
adding a read lock to the target leaf node;
and performing data processing operation corresponding to the data processing request on the target leaf node, wherein the data processing operation comprises the following steps:
and acquiring target data corresponding to the data processing request in the index data corresponding to the target leaf node.
7. The method of claim 2, wherein adding a target lock to the target leaf node comprises:
writing a lock to the target leaf node;
and performing data processing operation corresponding to the data processing request on the target leaf node, wherein the data processing operation at least comprises the following steps:
and deleting target data corresponding to the data processing request in the index data corresponding to the target leaf node.
8. The method of claim 7, wherein prior to releasing the target lock for the target leaf node, the method further comprises:
writing and locking the right brother node of the target leaf node;
judging whether the target leaf node is subjected to node merging with a right brother node of the target leaf node, if so, moving node data of the right brother node of the target leaf node to the target leaf node, and pointing a second pointer in the right brother node of the target leaf node to the target leaf node;
Releasing the write lock to the right sibling node of the target leaf node;
determining a father node corresponding to the target leaf node in the index tree;
writing a lock to the parent node and executing the step of releasing the target lock to the target leaf node;
deleting node data corresponding to the target data in the father node;
judging whether the father node and the right brother node are subjected to node merging or not, if so, moving the node data of the right brother node of the father node to the father node, and pointing a second pointer in the right brother node of the father node to the father node;
the father node is taken as a child node, and the father node corresponding to the child node is determined in the index tree;
and adding a write lock to the father node, releasing the write lock to the child node, and returning to the step of executing the deleting processing to the node data corresponding to the target data in the father node until the father node and the right brother node are not subjected to node merging.
9. The method of claim 2, wherein adding a target lock to the target leaf node comprises:
Writing a lock to the target leaf node;
and performing processing operation corresponding to the data processing request on the index data corresponding to the target leaf node, wherein the processing operation at least comprises the following steps:
and inserting target data corresponding to the data processing request into the target leaf node.
10. The method of claim 9, wherein prior to releasing the target lock for the target leaf node, the method further comprises:
judging whether the target leaf node is subjected to node splitting, if so, pointing a first pointer of the target leaf node to a split new right brother node, and pointing the first pointer of the new right brother node to an original right brother node of the target leaf node;
determining a parent node of the target leaf node in the index tree;
writing a lock to the parent node and executing the step of releasing the target lock to the target leaf node;
performing insertion processing on node data corresponding to the target data in the father node;
judging whether the father node is subjected to node splitting, if so, pointing a first pointer of the father node to a split new right brother node, and pointing the first pointer of the new right brother node to an original right brother node of the father node;
The father node is taken as a child node, and the father node corresponding to the child node is determined in the index tree;
and adding a write lock to the father node, releasing the write lock to the child node, and returning to the step of executing the insertion processing of the node data corresponding to the target data in the father node until the father node does not split the node.
11. An index data processing device, comprising:
a request receiving unit, configured to receive a data processing request, where the data processing request at least includes: indexing key values;
the node searching unit is used for comparing the nodes in the index tree with the index key values from the root node in the index tree until a target leaf node matched with the index key values is searched; in the process of searching the target leaf node in the index tree, adding a read lock to a node for which the comparison between the target leaf node and the index key value is started, and releasing the read lock to a node for which the comparison between the target leaf node and the index key value is ended;
the node locking unit is used for locking the target leaf node, and the attribute of the target lock corresponds to the processing attribute of the data processing request;
The node processing unit is used for performing data processing operation corresponding to the data processing request on the target leaf node;
the node unlocking unit is used for releasing the target lock for the target leaf node;
the method comprises the steps that a root node and an intermediate node in an index tree at least comprise a first pointer, a second pointer, a third pointer and at least one index mark value, and leaf nodes in the index tree at least comprise index mark values; the first pointers of nodes in the same layer in the index tree point to right brothers of the nodes, and the first pointers of rightmost nodes in each layer in the index tree point to rightmost nodes in the next layer; a second pointer of the node in the same layer in the index tree points to a left brother node before the nodes are merged, and a third pointer points to a child node of the nodes; each of the nodes has a read lock and a write lock.
12. An electronic device, comprising:
a memory for storing an application program and data generated by the application program operation;
a processor for executing the application program to realize: receiving a data processing request, wherein the data processing request at least comprises: indexing key values; starting from a root node in an index tree, comparing the node in the index tree with the index key value until a target leaf node matched with the index key value is found; in the process of searching the target leaf node in the index tree, adding a read lock to a node for which the comparison between the target leaf node and the index key value is started, and releasing the read lock to a node for which the comparison between the target leaf node and the index key value is ended; adding a target lock to the target leaf node, wherein the attribute of the target lock corresponds to the processing attribute of the data processing request; performing data processing operation corresponding to the data processing request on the target leaf node; releasing the target lock for the target leaf node;
The method comprises the steps that a root node and an intermediate node in an index tree at least comprise a first pointer, a second pointer, a third pointer and at least one index mark value, and leaf nodes in the index tree at least comprise index mark values;
the first pointers of nodes in the same layer in the index tree point to right brothers of the nodes, and the first pointers of rightmost nodes in each layer in the index tree point to rightmost nodes in the next layer; a second pointer of the node in the same layer in the index tree points to a left brother node before the nodes are merged, and a third pointer points to a child node of the nodes; each of the nodes has a read lock and a write lock.
CN201911180572.1A 2019-11-27 2019-11-27 Index data processing method and device and electronic equipment Active CN110990404B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911180572.1A CN110990404B (en) 2019-11-27 2019-11-27 Index data processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911180572.1A CN110990404B (en) 2019-11-27 2019-11-27 Index data processing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN110990404A CN110990404A (en) 2020-04-10
CN110990404B true CN110990404B (en) 2023-09-05

Family

ID=70087435

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911180572.1A Active CN110990404B (en) 2019-11-27 2019-11-27 Index data processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN110990404B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111522814A (en) * 2020-04-14 2020-08-11 西云图科技(北京)有限公司 Information management method of water affair system
CN111597193B (en) * 2020-04-28 2023-09-26 广东亿迅科技有限公司 Tree data locking and unlocking method
CN111581839B (en) * 2020-05-15 2023-06-23 北京世冠金洋科技发展有限公司 Method and device for processing nesting relationship of model and electronic equipment
CN111782669B (en) * 2020-06-28 2023-12-12 百度在线网络技术(北京)有限公司 Method and device for realizing distributed lock and electronic equipment
CN114328500A (en) * 2020-09-29 2022-04-12 北京金山云网络技术有限公司 Data access method, device, equipment and computer readable storage medium
CN112328732A (en) * 2020-10-22 2021-02-05 上海艾融软件股份有限公司 Sensitive word detection method and device and sensitive word tree construction method and device
CN113609344B (en) * 2021-09-29 2022-01-14 北京泰迪熊移动科技有限公司 Method and device for constructing byte stream state machine, electronic equipment and storage medium
CN114238704B (en) * 2022-02-21 2022-10-04 北京金山云网络技术有限公司 Tree index splitting method, data access method and device and electronic equipment
CN114282074B (en) * 2022-03-04 2022-08-16 阿里云计算有限公司 Database operation method, device, equipment and storage medium
CN117131050B (en) * 2023-08-28 2024-05-28 中国科学院软件研究所 Spatial index method based on magnetic disk and oriented to workload and query sensitivity

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105389360A (en) * 2015-11-05 2016-03-09 浪潮(北京)电子信息产业有限公司 AVL tree-based data writing method and apparatus
CN109582677A (en) * 2018-12-03 2019-04-05 东北大学 The R tree optimiged index method of more size distribution formula Read-Write Locks based on child nodes
CN109582678A (en) * 2018-12-03 2019-04-05 东北大学 The R tree optimiged index method of more size distribution formula Read-Write Locks based on leaf node
CN110399383A (en) * 2019-07-29 2019-11-01 中国工商银行股份有限公司 Applied to the data processing method of server, device, calculate equipment, medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101947503B1 (en) * 2017-03-20 2019-02-14 주식회사 티맥스데이터 Computer device for providing tree index

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105389360A (en) * 2015-11-05 2016-03-09 浪潮(北京)电子信息产业有限公司 AVL tree-based data writing method and apparatus
CN109582677A (en) * 2018-12-03 2019-04-05 东北大学 The R tree optimiged index method of more size distribution formula Read-Write Locks based on child nodes
CN109582678A (en) * 2018-12-03 2019-04-05 东北大学 The R tree optimiged index method of more size distribution formula Read-Write Locks based on leaf node
CN110399383A (en) * 2019-07-29 2019-11-01 中国工商银行股份有限公司 Applied to the data processing method of server, device, calculate equipment, medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李园园等.面向不同数据模式的测试用例检索方法.《计算机科学》.2017,第44卷(第11期),全文. *

Also Published As

Publication number Publication date
CN110990404A (en) 2020-04-10

Similar Documents

Publication Publication Date Title
CN110990404B (en) Index data processing method and device and electronic equipment
KR920000395B1 (en) Method for fetching, insertion, and deletion key record
US7577658B2 (en) Hierarchical locking in B-tree indexes
EP0336035B1 (en) Tree structure database system
US6105025A (en) Method for using an index as a workspace for deferred enforcement of uniqueness constraints
US5276872A (en) Concurrency and recovery for index trees with nodal updates using multiple atomic actions by which the trees integrity is preserved during undesired system interruptions
US8190591B2 (en) Bit string searching apparatus, searching method, and program
US8224861B2 (en) Coupled node tree splitting/conjoining method and program
CN112269786B (en) Method for creating KV storage engine index of memory database
US6647386B2 (en) Method, system, and program for reverse index scanning
US20100042596A1 (en) Bit string search apparatus, search method, and program
US6484172B1 (en) Concurrency control method for high-dimensional index structure using latch and lock
Lomet Simple, robust and highly concurrent B-trees with node deletion
US7650352B2 (en) System and method for increasing availability of an index
US7565217B2 (en) Traversal of empty regions in a searchable data structure
Jaluta et al. Recoverable B+-trees in centralized database management systems
Krishna et al. Using Cuckoo Filters to Improve Performance in Object Store-based Very Large Databases
KR100349667B1 (en) A concurrency control method for high-dimensional index structures
US20100287193A1 (en) Bit string search apparatus, search method, and program
KR102568662B1 (en) Zipper compaction method and apparatus for compacting the plural of skiplists
Huang et al. A Primer on Database Indexing
CN115757433A (en) Method for realizing unique constraint of AO table meeting ACID characteristics on MPP database
Chen et al. Signature files and signature file construction
CN116860768A (en) Database transaction processing method, device, equipment and storage medium
Ng et al. Concurrent access to point data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant