Data processing method and device and data insertion method and device

By designing the leaf nodes of the Trie tree to be consistent with the cache line, using the cache line to load data, and storing key-value pairs and index information in the leaf nodes, the problem of low space utilization of the Trie tree is solved, and the efficiency and performance of data processing are improved. .

CN118760704APending Publication Date: 2024-10-11CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410667718.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-27
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

Trie trees have the problem of low space utilization when processing large amounts of data. In particular, deep-level nodes contain many null pointers, resulting in low memory management efficiency.

Method used

By designing the size of the leaf node to be consistent with the cache line, the cache line is used to load the data in the leaf node at one time, and the data mapping area and data management area are set up in the leaf node to store the initial key-value pair and index information to achieve rapid positioning and Manage target data.

Benefits of technology

It improves system performance, reduces memory access delays, makes full use of hardware cache resources, reduces waste of invalid space, and improves the efficiency of data management and search.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118760704A_ABST
    Figure CN118760704A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data processing method and device and a data insertion method and device.The data processing method comprises the steps that in response to a data processing request, a target prefix tree corresponding to target data is determined according to a target key of the target data carried in the data processing request; a target key is searched from a root node of the target prefix tree, a leaf node corresponding to the target key is determined, the number of bytes used by the leaf node is consistent with the number of bytes of the corresponding cache line, and the leaf node comprises a data mapping area and a data management area; loading the at least one initial key value pair and a cache line corresponding to the index information, and obtaining the at least one initial key value pair and the index information from the cache line; determining target data from the at least one initial key value pair according to the index information and a target key, and performing data processing on the target data according to the data processing request to obtain a data processing result; the cache hit rate and the data access speed are improved, and the target data can be quickly positioned.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present specification relate to the field of computer technology, and in particular, to a data processing method and device, and a data insertion method and device. Background Art

[0002] Trie tree, also known as prefix tree or dictionary tree, is a tree-like index structure for fast indexing of data. Trie tree is usually used to store large amounts of data so that operations such as search, insertion and deletion can be completed quickly. One of the most important features of Trie tree is the shared prefix, which makes it widely used in processing dictionaries, auto-completion, spell checking, IP routing lookup and many other aspects. The data structure and algorithm design that supports multi-threaded concurrency is the core competitiveness of Trie tree.

[0003] Each node in the Trie tree has a pointer array, each pointer either points to the next level node or to a final KV (Key-Value). During the search process, the xth (x=0,1,...) fragment of the Key to be searched is used as the subscript of the node pointer array of the xth layer (the 0th layer is the root node) of the Trie tree, guiding the search to the next level node or the final KV. However, the Trie tree has always had the problem of low space utilization. Nodes with deep levels contain more null pointers. Therefore, solving the problem of space utilization, especially memory management of deep nodes, is the difficulty of the Trie tree. Summary of the invention

[0004] In view of this, an embodiment of the present specification provides a data processing method. One or more embodiments of the present specification also relate to a data insertion method, a data processing device, a data insertion device, a computing device, a computer-readable storage medium, and a computer program product to solve the technical defects existing in the prior art.

[0005] According to a first aspect of an embodiment of this specification, a data processing method is provided, including:

[0006] In response to a data processing request, determining a target prefix tree corresponding to the target data according to a target key of the target data carried in the data processing request;

[0007] Searching for the target key from the root node of the target prefix tree, determining a leaf node corresponding to the target key, wherein the number of bytes used by the leaf node is consistent with the number of bytes of the corresponding cache line, the leaf node comprises a data mapping area and a data management area, the data mapping area stores at least one initial key-value pair, and the data management area stores index information of the initial key-value pair in the data mapping area;

[0008] Loading the at least one initial key-value pair and a cache line corresponding to the index information, and obtaining the at least one initial key-value pair and the index information from the cache line;

[0009] According to the index information and the target key, the target data is determined from the at least one initial key-value pair, and data processing is performed on the target data according to the data processing request to obtain a data processing result.

[0010] According to a second aspect of an embodiment of this specification, a data insertion method is provided, including:

[0011] In response to a data insertion request, determining a target prefix tree corresponding to the target data according to the data to be inserted carried in the data insertion request and a key to be inserted corresponding to the data to be inserted;

[0012] Searching for the key to be inserted from the root node of the target prefix tree, determining a target branch node corresponding to the key to be inserted, and determining a leaf node of the key to be inserted according to the target branch node, wherein the number of bytes used by the leaf node is consistent with the number of bytes of the corresponding cache line, the leaf node includes a data mapping area and a data management area, the data mapping area stores at least one initial key-value pair, and the data management area stores index information of the initial key-value pair in the data mapping area;

[0013] Loading the at least one initial key-value pair and a cache line corresponding to the index information, and obtaining the at least one initial key-value pair and the index information from the cache line;

[0014] According to the index information, the key to be inserted and the data to be inserted are inserted into the data mapping area, and the index information is updated.

[0015] According to a third aspect of an embodiment of this specification, there is provided a data processing device, including:

[0016] A response module, configured to respond to a data processing request and determine a target prefix tree corresponding to the target data according to a target key of the target data carried in the data processing request;

[0017] A determination module is configured to search for the target key from the root node of the target prefix tree, and determine a leaf node corresponding to the target key, wherein the number of bytes used by the leaf node is consistent with the number of bytes of the corresponding cache line, and the leaf node includes a data mapping area and a data management area, the data mapping area stores at least one initial key-value pair, and the data management area stores index information of the initial key-value pair in the data mapping area;

[0018] A loading module, configured to load the at least one initial key-value pair and a cache line corresponding to the index information, and obtain the at least one initial key-value pair and the index information from the cache line;

[0019] The obtaining module is configured to determine the target data from the at least one initial key-value pair according to the index information and the target key, and to perform data processing on the target data according to the data processing request to obtain a data processing result.

[0020] According to a fourth aspect of an embodiment of this specification, there is provided a data insertion device, including:

[0021] A response module is configured to respond to a data insertion request and determine a target prefix tree corresponding to the data to be inserted according to the data to be inserted carried in the data insertion request and a key to be inserted corresponding to the data to be inserted;

[0022] A determination module, configured to search for the key to be inserted from the root node of the target prefix tree, determine the target branch node corresponding to the key to be inserted, and determine the leaf node of the key to be inserted according to the target branch node, wherein the number of bytes used by the leaf node is consistent with the number of bytes of the corresponding cache line, and the leaf node includes a data mapping area and a data management area, the data mapping area stores at least one initial key-value pair, and the data management area stores index information of the initial key-value pair in the data mapping area;

[0023] A loading module, configured to load the at least one initial key-value pair and a cache line corresponding to the index information, and obtain the at least one initial key-value pair and the index information from the cache line;

[0024] The inserting module is configured to insert the key to be inserted and the data to be inserted into the data mapping area according to the index information, and update the index information.

[0025] According to a fifth aspect of an embodiment of this specification, a computing device is provided, including:

[0026] Memory and processor;

[0027] The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the above method are implemented.

[0028] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores a computer program / instruction, and the steps of the above method are implemented when the computer program / instruction is executed by a processor.

[0029] According to a seventh aspect of the embodiments of this specification, a computer program product is provided, comprising a computer program / instruction, which implements the steps of the above method when executed by a processor.

[0030] A data processing method provided by an embodiment of the present specification includes: in response to a data processing request, determining a target prefix tree corresponding to the target data according to a target key of the target data carried in the data processing request; searching for the target key from the root node of the target prefix tree to determine a leaf node corresponding to the target key, wherein the number of bytes used by the leaf node is consistent with the number of bytes of the corresponding cache line, and the leaf node includes a data mapping area and a data management area, the data mapping area stores at least one initial key-value pair, and the data management area stores index information of the initial key-value pair in the data mapping area; loading the cache line corresponding to the at least one initial key-value pair and the index information, and obtaining the at least one initial key-value pair and the index information from the cache line; determining the target data from the at least one initial key-value pair according to the index information and the target key, and performing data processing on the target data according to the data processing request to obtain a data processing result.

[0031] Based on this, the data processing method provided in the embodiment of this specification can quickly locate the corresponding leaf node according to the character sequence of the target key by determining the target key of the target data from the data processing request, and by designing the size of the leaf node to be consistent with the cache line, when obtaining the data in the leaf node from the cache, the data in the leaf node can be taken out all at once through the cache line, and the CPU (Central Processing Unit) cache can be utilized to a large extent to reduce memory access latency. While helping to make full use of hardware cache resources, it also minimizes the waste of invalid space in memory allocation, improves system performance, and sets a data mapping area in the leaf node to store the initial key-value pair, and stores the index information of the initial key-value pair in the data management area, so that the management and search of the target data are more convenient and efficient, and the target data can be quickly located. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 It is a scenario diagram of a data processing method provided by an embodiment of this specification;

[0033] Figure 2 is a flow chart of a data processing method provided by an embodiment of this specification;

[0034] Figure 3 is a structural diagram of a leaf node data structure provided by an embodiment of this specification;

[0035] Figure 4 is a flow chart of a data insertion method provided by an embodiment of this specification;

[0036] Figure 5 This is a schematic diagram of a data deletion process provided by an embodiment of this specification;

[0037] Figure 6 This is another schematic diagram of a data deletion process provided by an embodiment of this specification;

[0038] Figure 7 This is a schematic diagram of a data insertion process provided by an embodiment of this specification;

[0039] Figure 8 is another schematic diagram of a data insertion process provided by an embodiment of this specification;

[0040] Fig. 9 is a structural schematic diagram of a data processing device provided by an embodiment of this specification;

[0041] Fig.10 is a structural schematic diagram of a data insertion device provided by an embodiment of this specification;

[0042] Fig.11 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION

[0043] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0044] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0045] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0046] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0047] First, the terms involved in one or more embodiments of this specification are explained.

[0048] Index: In computer science and information retrieval, an index usually refers to a data structure used to speed up data retrieval. The purpose of an index is to allow data items to be found or accessed quickly without traversing the entire data set. Indexes are widely used in various occasions, such as database systems, search engines, file systems, and other applications that require fast data retrieval. However, creating and maintaining indexes requires additional storage space, and when data is updated, the index also needs to be updated accordingly, which may affect the performance of data writing. Therefore, when designing an index, it is necessary to weigh the retrieval speed and maintenance cost to achieve a better performance balance.

[0049] Trie tree: also known as dictionary tree or prefix tree, is a tree structure used to efficiently store and retrieve strings (but not limited to strings); the core idea of ​​​​the Trie tree is to use the common prefix of the string to reduce the query time, thereby improving the query efficiency.

[0050] Branch node of the Trie tree: Branch Node. In the context of the Trie tree, a branch node refers to an internal node with at least one child node; these nodes act as bifurcation points in the tree, and each child node represents a different character selection, so that different string paths can be taken starting from this node.

[0051] The leaf node of the Trie tree: Leaf Node, represents the end of the string, and the search process ends at the leaf node.

[0052] Cache Line: The basic unit of data transfer in a computer processor's cache. Cache is a small, fast memory located between the processor and main memory (RAM). Its purpose is to reduce latency when accessing main memory and increase data access speed. Since main memory is usually accessed much slower than the processor, cache improves performance by storing recently or frequently accessed data.

[0053] The conventional design of the Trie tree has thread safety issues, so it can only be executed serially under the protection of a lock. Although there are various lock-free or micro-lock designs, they generally have performance bottlenecks or are difficult to implement due to complex designs. The embodiments of this specification provide a simple Trie tree design that is simple to implement and exhibits good performance, thereby effectively improving the efficiency and reliability of data processing services.

[0054] In this specification, a data processing method is provided. This specification also relates to a data processing device, a data insertion method and device, a computing device, a computer-readable storage medium and a computer program product, which are described in detail one by one in the following embodiments.

[0055] See also Figure 1 , Figure 1 A scenario diagram of a data processing method provided according to an embodiment of the present specification is shown.

[0056] Specifically, the data processing method is implemented by an end-side device 102 and a server 104. The end-side device 102 is used to send a data processing request to the server 104. For example, the data processing request is a data query request. The current server 104 can receive the data processing request sent by the end-side device, and can also receive the data processing request sent by other servers, which is not limited here.

[0057] The database in the server 104 uses an index structure such as a Trie tree to assist in storing and retrieving data; thus, when the server 104 receives a data processing request sent by the end-side device 102, it obtains the target key of the target data carried in the data processing request, determines the target prefix tree corresponding to the target data based on the target key, and searches from the root node of the target prefix tree to determine the leaf node corresponding to the target key. When the number of bytes used by the leaf node is consistent with the number of bytes of the cache line, the data of the leaf node can be loaded into the cache line all at once, and by loading the cache line corresponding to the leaf node, at least one initial key-value pair in the data mapping area and the index information of the data management area in the leaf node can be obtained from the cache line at one time. Through the index information of the data management area in the leaf node, according to the index information and the target key, the target key-value pair is determined from the initial key-value pair of the data mapping area, thereby determining the target data, and then processing the target data according to the data processing request to obtain the data processing result.

[0058] For example, when the data processing request is a data query request, a message indicating successful query and the queried target data is returned to the end-side device 102; when the data processing request is a data deletion request, a data deletion operation is performed on the target data, and a message indicating successful deletion is returned to the end-side device 102.

[0059] The end-side device 102 may include a browser, an APP (Application), or a web application such as an H5 (Hyper Text Markup Language 5, version 5 of Hypertext Markup Language) application, or a light application (also known as a mini-program, a lightweight application) or a cloud application, etc. The end-side device may be based on the software development kit (SDK, Software Development Kit) of the corresponding service provided by the server, such as based on the real-time communication (RTC, Real Time Communication) SDK development and acquisition, etc. The end-side device may be deployed in an electronic device and needs to rely on the device to run or some APPs in the device to run, etc. The electronic device may have a display screen and support information browsing, etc., such as a personal mobile terminal such as a mobile phone, a tablet computer, a personal computer, etc. Various other types of applications may also be configured in the electronic device, such as human-computer dialogue applications, model training applications, data processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0060] Server 104 can be understood as a server that provides various services, including physical servers and cloud servers, such as a server that provides communication services to multiple clients, a server for background training that provides support for models used on clients, and a server that processes data sent by clients. It should be noted that server 104 can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. Server 104 can also be a server for a distributed system, or a server combined with a blockchain. Server 104 can also be a cloud server for basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDN, Content De l ivery Network), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.

[0061] It is worth noting that the data processing method provided in the embodiments of this specification can be executed by the server 104. In other embodiments of this specification, the database can be deployed in the terminal device 102, so that the terminal device 102 can also have similar functions as the server 104, thereby executing the data processing method provided in the embodiments of this specification; in other embodiments, the data processing method provided in the embodiments of this specification can also be executed jointly by the terminal device 102 and the server 104.

[0062] The data processing method provided in the embodiments of the present specification can quickly locate the corresponding leaf node according to the character sequence of the target key by determining the target key of the target data from the data processing request, and can design the size of the leaf node to be consistent with the cache line. When obtaining the data in the leaf node from the cache, the data in the leaf node can be taken out all at once through the cache line, and the CPU cache can be utilized to a large extent to reduce memory access latency. While helping to make full use of hardware cache resources, it also minimizes the waste of invalid space in memory allocation, improves system performance, and sets a data mapping area in the leaf node to store the initial key-value pair, and stores the index information of the initial key-value pair in the data management area, so that the management and search of the target data are more convenient and efficient, and the target data can be quickly located.

[0063] See also Figure 2 , Figure 2 A flow chart of a data processing method provided by an embodiment of the present specification is shown, which specifically includes the following steps.

[0064] Step 202: In response to a data processing request, a target prefix tree corresponding to the target data is determined according to a target key of the target data carried in the data processing request.

[0065] Among them, a data processing request can be understood as an instruction or request issued by an application or system to a data storage or computing service to perform a certain operation on specific data, such as a data query request, a data deletion request, a data update request, etc.

[0066] The target key can be understood as a field or a group of fields that uniquely identify a record or a group of related data; in a data structure such as a Trie tree, the target key is usually in the form of a string, which is used to guide the search and operation of the target data in the Trie tree; the target data can be understood as the specific data unit or object to be operated according to the data processing request, for example, in a data processing request, the target data can be the object to be queried, the new value to be updated, the new record to be inserted, or the old record to be deleted; in the application of the Trie tree, the target data can be any type of value associated with the target key, for example, in a dictionary query, the target data can be information such as explanations and examples related to the word.

[0067] A prefix tree can be understood as a pre-built tree data structure with a string prefix as the index path. Each internal node of the prefix tree represents a common prefix, and the leaf node represents the end of the string and stores key-value pairs.

[0068] Specifically, when a data processing request is received from a client or other server, the target key of the target data carried in the data processing request is obtained. The target key can be represented by a string, so as to determine the target prefix tree corresponding to the target data, search for the target data from the target prefix tree, and then process the target data.

[0069] In one or more embodiments of the present specification, the initial prefix tree may be one or more. In the case where there are multiple initial prefix trees, the target prefix tree can be accurately determined according to the attribute information of the target key. The specific implementation is as follows:

[0070] The step of responding to the data processing request and determining a target prefix tree corresponding to the target data according to a target key of the target data carried in the data processing request includes:

[0071] When it is determined that the number of the initial prefix tree is one, determining the initial prefix tree as a target prefix tree corresponding to the target data according to a target key of the target data carried in the data processing request; or

[0072] When it is determined that the number of the initial prefix trees is multiple, the attribute information of the target key is determined according to the target key of the target data carried in the data processing request, and the target prefix tree corresponding to the target data is determined from the multiple initial prefix trees according to the attribute information of the target key.

[0073] Among them, the initial prefix tree can be understood as a pre-built, existing Trie tree; the target prefix tree can be understood as a Trie tree in the initial prefix tree that is associated with the target data and target key in the data processing request.

[0074] Specifically, when there is only one initial prefix tree, no additional decision steps are required, and the unique prefix tree is directly used as the target prefix tree for target data search and processing, which simplifies the search process and improves the efficiency of processing target data; when there are multiple initial prefix trees, the target prefix tree related to the target data is screened out according to the attribute information of the target key (such as a specific prefix, label, classification or other key features), so as to better adapt to diversified data organization forms and complex query requirements; by executing queries in a specific target prefix tree in a targeted manner, the system load is reduced and the data processing performance and accuracy are improved.

[0075] The data processing method provided in the embodiments of this specification directly locates the existing initial prefix tree through the target key when there is only one prefix tree, thereby simplifying the search process and achieving fast and accurate access and processing of the target data; when there are multiple initial prefix trees, the target prefix tree can be accurately selected according to the attribute information of the target key, thereby ensuring that the data processing request can be efficiently completed in a complex multivariate data environment.

[0076] Step 204: Search for the target key from the root node of the target prefix tree, and determine the leaf node corresponding to the target key, wherein the number of bytes used by the leaf node is consistent with the number of bytes of the corresponding cache line, and the leaf node includes a data mapping area and a data management area, the data mapping area stores at least one initial key-value pair, and the data management area stores index information of the initial key-value pair in the data mapping area.

[0077] The root node can be understood as the starting point of the tree structure. It has no parent node, and all other nodes are directly or indirectly connected to the root node. The cache line can be understood as the data unit processed in computer hardware (especially CPU cache). The size of the data block read or written from the memory at one time is usually 64 bytes or larger.

[0078] The data mapping area can be understood as an area inside a leaf node for storing initial key-value pairs, wherein the data mapping area can manage multiple slots, each slot storing the address of a KV.

[0079] The data management area can be understood as another area inside the leaf node, which is used to store index information or management information of each key-value pair in the data mapping area, including but not limited to the offset table (OffsetTab le), Trie Key table (Trie Key Table le, used to store prefix information of key-value pairs, Trie Key refers to the string key used for insertion and search), last offset (Last Offset), last index (Last Index), etc.

[0080] Specifically, in the Trie tree, starting from the root node, search downward along the branch nodes of the Trie tree according to each character of the target key until a leaf node matching the target key is found. Taking the number of bytes of a cache line as 64 as an example, the number of bytes used by the leaf node is consistent with the number of bytes of the cache line, which is also 64 bytes. This design can optimize memory access efficiency and try to load all the data of a leaf node into the CPU cache line at once, thereby reducing the number of main memory accesses and improving data processing speed.

[0081] The interior of a leaf node is divided into two areas: a data mapping area and a data management area. The data mapping area stores at least one initial key-value pair, that is, a leaf node can be associated with multiple initial key-value pairs, and the data management area is responsible for storing the index information of these initial key-value pairs, which helps to quickly locate and manage the data structure of the initial key-value pairs. Through such a design, the system can not only quickly locate the leaf node where the target key is located, but also efficiently manage and access the target data related to the target key in the leaf node, thereby achieving effective processing of the target data.

[0082] Step 206: Load the at least one initial key-value pair and the cache line corresponding to the index information, and obtain the at least one initial key-value pair and the index information from the cache line.

[0083] Specifically, the data in the leaf node, that is, the cache line address of at least one initial key-value pair and index information, is determined. Since the cache reads and writes data in units of cache lines, by loading at least one initial key-value pair and the cache line corresponding to the index information into the cache, at least one initial key-value pair and index information can be obtained from the cache line at one time, that is, all the data of the leaf node in the cache line can be obtained at one time.

[0084] In actual applications, when the cache line has not been loaded into the cache (i.e., a cache miss), a further request is made to read data from the next layer of memory (usually the main memory), that is, the cache line containing at least one initial key-value pair and the index information in the determined leaf node is loaded into the cache. Thus, the required data can be directly accessed from the cache line. Since the speed of the cache is much higher than that of the main memory, this process greatly speeds up the data processing.

[0085] When at least one initial key-value pair and index information are obtained in a cache line, data processing can be performed based on the at least one initial key-value pair and index information. By precisely controlling the loading and access of data and utilizing the high-speed access characteristics of the cache, direct access to the main memory is reduced, thereby significantly improving the efficiency of data processing.

[0086] In one or more embodiments of the present specification, the data management area may include a first data management area and a second data management area, so that the data in the data mapping area can be processed only when the leaf node version identifiers corresponding to the two data management areas are consistent. The specific implementation method is as follows:

[0087] The data management area includes a first data management area and a second data management area, the first data management area stores first index information of the initial key-value pair in the data mapping area, the first index information includes a first leaf node version identifier, and the second data management area stores second index information of the initial key-value pair in the data mapping area, the second index information includes a second leaf node version identifier;

[0088] The step of determining the target data from the at least one initial key-value pair according to the index information and the target key includes:

[0089] Acquire the first leaf node version identifier from the first index information, and acquire the second leaf node version identifier from the second index information;

[0090] The target data is determined from the at least one initial key-value pair according to the first leaf node version identifier, the second leaf node version identifier, the first index information, the second index information, and the target key.

[0091] The index information is composed of the first index information and the second index information; the first leaf node version identifier can be understood as the version information recorded in the first data management area, which is an identifier used to track changes in leaf nodes. Whenever the data of a leaf node changes (such as adding, deleting or modifying a key-value pair), the version identifier will change, which can be used to detect and control data consistency in a concurrent environment. The second leaf node version identifier corresponds to the first leaf node version identifier, and is the version information recorded in the second data management area in the same leaf node; before data processing, the data consistency of the leaf node is determined by comparing the two version identifiers, so as to decide whether it is necessary to re-acquire the latest leaf node information.

[0092] Specifically, when the data management area is divided into a first data management area and a second data management area, it is necessary to ensure data consistency when processing data; therefore, the first leaf node version identifier of the first data management area and the second leaf node version identifier of the second data management area are used for judgment, so as to determine the target data from the at least one initial key-value pair based on the first index information, the second index information and the target key.

[0093] The data processing method provided in the embodiments of this specification, when the data management area is divided, can process the data in the data mapping area only when the version identifiers of each data management area are consistent, through the version identifiers contained in each data management area, thereby achieving accurate acquisition of data in the data mapping area, and based on the index information of each data management area and through the target key, it can quickly index and locate the target data corresponding to the target key in the data mapping area.

[0094] In one or more embodiments of this specification, in order to ensure data security and effectively guarantee data consistency in a concurrent environment, data processing is performed only when the first leaf node version identifier is consistent with the second leaf node version identifier. The specific implementation method is as follows:

[0095] The step of determining the target data from the at least one initial key-value pair according to the index information and the target key includes:

[0096] In a case where the first leaf node version identifier is consistent with the second leaf node version identifier, determining the target data from the at least one initial key-value pair according to the index information and the target key;

[0097] When the first leaf node version identifier is inconsistent with the second leaf node version identifier, continue to execute the steps of obtaining the first leaf node version identifier from the first index information and obtaining the second leaf node version identifier from the second index information.

[0098] Specifically, in a concurrent environment, the system first compares whether the version identifier of the first leaf node and the version identifier of the second leaf node are consistent. If the two are consistent, it means that the data of the leaf node has not changed during the comparison period. At this time, the target data can be directly located and obtained from the initial key-value pair of the leaf node according to the index information and the target key for processing.

[0099] When the first leaf node version identifier is inconsistent with the second leaf node version identifier, it means that the data of the leaf node has been updated by other threads or processes during this period; in this case, in order to avoid using expired data, the system needs to re-acquire the index information of the latest data management area in the leaf node until the first leaf node version identifier and the second leaf node version identifier are consistent, and then search for the target data according to the target key and perform subsequent data processing operations. This can ensure data consistency and correctness of operations in a concurrent environment.

[0100] The data processing method provided in the embodiments of this specification effectively solves the problem of data consistency in a concurrent environment by comparing version identifiers, ensures that there will be no inconsistencies due to data updates when reading and operating data, improves the system's concurrent processing capabilities and data security, effectively ensures data consistency in a concurrent environment, reduces invalid operations, and improves the efficiency of data search and processing.

[0101] See also Figure 3 , Figure 3 A structural diagram of a leaf node data structure provided by an embodiment of the present specification is shown.

[0102] Based on the principles of cache friendliness and memory pool standardization, the branch nodes and leaf nodes of the Trie tree all use a cache line, that is, 64 bytes as the memory block size of a node. In order to make full use of the memory, a 32-bit integer offset is selected to identify the address of the next layer of nodes or the address of the user KV, and the highest bit is used to identify the type: the highest bit is 0, indicating that this slot in the current node stores the address of the next layer of nodes, and the slot value 0 indicates the end; the highest bit is 1, indicating that this slot in the current node stores the address of the KV.

[0103] Specifically, each leaf node uses a CacheLine-friendly 64-byte memory block to manage 12 32-bit integer slots, which occupy a total of 48 bytes. Of course, the number of slots and the number of bits occupied by the slots can be set according to actual conditions, and are not limited here. Each slot uses AppendOnly (append write, a data recording strategy, that is, the new data item does not overwrite the old data item, but is appended on the basis of the original data) to store the address of the KV, that is, the data in the slot is only allowed to be appended, not modified or deleted, and each slot points to a value node (Va lue Node, a node for storing actual data, including key-value pairs). This design is to ensure data consistency and correctness, and avoid data loss or damage in a multi-threaded environment. The remaining 16 bytes maintain the index information of the slot through two 64-bit integers High / Low (H and L in the figure) that support atomic operations.

[0104] The index information includes version information (Version), an offset table (ie, the target offset table mentioned above), a prefix information table (ie, the target prefix table mentioned above, also known as a Trie Key table), a last offset, a last index (Last Index), and a lock (Lock).

[0105] The version information is used to indicate the version number of the leaf node; the offset table is used to quickly locate the location of the target data, and the prefix information table is used to store the prefix information of the key-value pairs to help quickly find and classify the key-value pairs; the last offset is used to indicate the offset of the last data item; the last index is used to indicate the index position of the last data item; the lock is used to synchronize operations that modify the data structure; among them, the number of initial key-value pairs can be obtained by determining the last index.

[0106] In practical applications, because some 64-bit systems cannot guarantee the atomicity of 128 bits, version information is introduced to divide the data management area into a first data management area (High part) and a second data management area (Low part). Both the first data management area and the second data management area include version information (that is, the version information of the High part is the above-mentioned first leaf node version identifier, and the version information of the Low part is the above-mentioned second leaf node version identifier). The system can operate the High and Low parts atomically separately, and when the version information of the two parts is consistent, the High and Low parts are considered to belong to two parts of a 128-bit atomic operation, and other index information except the version information can be randomly distributed in the High and Low parts; of course, when the system can guarantee the atomicity of 128 bits, it is not necessary to divide the data management area into two parts. On this basis, the version identifier does not need to be included in the index information.

[0107] In scenarios with better randomness, nodes close to the root node in the Trie tree generally have a relatively high loading rate, with little memory waste and relatively high storage efficiency. Different Trie tree design schemes are basically the same for such nodes, but the closer to the leaf node, the higher the probability of the slot being vacant, resulting in memory waste. At the same time, if the depth increases, the probability of cache miss (when the computer system executes instructions or reads data, the required data is not in the cache, causing the processor to have to search for the required data in the slower main memory (RAM) or even lower-level storage devices (such as hard disks)) will be higher, and performance will also be affected.

[0108] Therefore, the leaf node data structure provided in the embodiment of this specification reduces the impact of cache miss on Trie performance by using CacheLine-friendly byte memory blocks, and has the effects of high space utilization, good performance and simple design.

[0109] Step 208: Determine the target data from the at least one initial key-value pair according to the index information and the target key, and perform data processing on the target data according to the data processing request to obtain a data processing result.

[0110] The data processing result can be understood as the result after performing corresponding operations on the target data, such as the result of a query, a new value after an update, or the success or failure of a deletion operation.

[0111] Specifically, according to the index information and the target key, the target data is found in the leaf node, and the target data is processed according to the requirements of the data processing request to obtain a data processing result that meets the request requirements.

[0112] In one or more embodiments of the present specification, the index information includes the number of the initial key-value pairs, the target offset table, and the target prefix table; thus, the target key-value pairs can be quickly determined from the data mapping area according to the specific data and the target key in the index information. The specific implementation method is as follows:

[0113] The determining the target data from the at least one initial key-value pair according to the index information and the target key comprises:

[0114] Determine a target key-value pair from the at least one initial key-value pair according to the number of the initial key-value pairs, the target offset table, the target prefix table, and the target key;

[0115] When the key in the target key-value pair is consistent with the target key, the value in the target key-value pair is determined as the target data.

[0116] Specifically, based on the number of initial key-value pairs stored in the data management area in the leaf node (determined by the last index), the target offset table, and the target prefix table, the target key-value pair that matches the target key is located in the initial key-value pair of the leaf node. When the target key-value pair is determined (that is, the key is the same as the target key), the value in the target key-value pair is extracted and determined as the target data.

[0117] The data processing method provided in the embodiments of the present specification can quickly locate the target key-value pair through the target offset table and the target prefix table, greatly improving the speed of finding the specified target key in a large number of key-value pairs, reducing unnecessary traversal and comparison, and ensuring that the acquired target data strictly corresponds to the target key in the request by comparing the target key and the key in the target key-value pair, avoiding the possibility of mismatching, and improving the accuracy and reliability of data processing. It also utilizes the characteristics of the Trie tree to effectively organize key-value pairs with the same prefix, reducing storage redundancy and improving space utilization; utilizing the target offset table makes memory access more continuous, which helps to improve the cache hit rate, thereby improving the overall performance of the system.

[0118] In one or more embodiments of the present specification, by comparing the prefix information of the determined reference key-value pair with the prefix information of the target key, the target key-value pair value can be accurately screened out. The specific implementation method is as follows:

[0119] The step of determining a target key-value pair from the at least one initial key-value pair according to the number of the initial key-value pairs, the target offset table, the target prefix table, and the target key comprises:

[0120] Determining a reference key-value pair from the at least one initial key-value pair according to the number of the initial key-value pairs and the target offset table, wherein the reference key-value pair is a key-value pair in a middle position after the at least one initial key-value pair is sorted according to the number of the initial key-value pairs and the target offset table;

[0121] Determining prefix information of the reference key-value pair according to the reference key-value pair and the target prefix table;

[0122] When the prefix information is consistent with the prefix information of the target key, the reference key-value pair is determined as the target key-value pair.

[0123] The reference key-value pair may be understood as a key-value pair in the middle position determined after at least one initial key-value pair is sorted according to the number of initial key-value pairs and the target offset table when searching in a binary search manner.

[0124] Specifically, the search operation can be performed through binary search. First, the subscript of the last ordered KV pair of the current leaf node is obtained through the last index, and then the slot position of the midpoint KV is located through the target offset table and the last index. According to the slot position, the prefix information (Tr ie Key) of the reference key-value pair is obtained through the target prefix table, and the prefix information is compared with the prefix information of the target key. If they are consistent, the reference key-value pair is determined as the target key-value pair.

[0125] In one or more embodiments of the present specification, by adjusting the position of the reference key-value pair, the search range can be gradually narrowed down to get closer to the target key-value pair, thus avoiding unnecessary full-volume search and greatly improving the efficiency of searching for the target key-value pair in large-scale data. The specific implementation method is as follows:

[0126] After determining the prefix information of the reference key-value pair according to the reference key-value pair and the target prefix table, the method further includes:

[0127] In the case where the prefix information is inconsistent with the prefix information of the target key, determining a next reference key-value pair according to the number of the at least one initial key-value pair, the target offset table, and the position of the reference key-value pair in the at least one initial key-value pair after sorting;

[0128] The next reference key-value pair is determined as the reference key-value pair, and the step of determining prefix information of the reference key-value pair according to the reference key-value pair and the target prefix table is continued.

[0129] Specifically, first compare the prefix information of the reference key-value pair with the prefix information of the target key. If the two are consistent, the reference key-value pair is considered to be the target key-value pair. If they are inconsistent, the next search direction is determined according to the comparison result (the prefix information is greater than or less than the target key prefix information): continue searching on the right or left side of the position of the reference key-value pair in at least one initial key-value pair after sorting. For example, when the prefix information is greater than the prefix information of the target key, continue searching on the left side of the reference key-value pair position.

[0130] Next, based on the new search direction, combined with the number of initial key-value pairs, the target offset table and the position of the reference key-value pairs, locate the position of the next reference key-value pair to be checked, and then obtain the prefix information of the new reference key-value pair based on the target prefix table again, and compare it with the target key prefix information; repeat this iteration until a target key-value pair is found whose prefix information is consistent with the prefix information of the target key.

[0131] In practical applications, taking a data processing request as a data query request as an example, the data processing method is described in detail; through the 64-bit atomic acqui re (a memory order mark, which is used to define the memory visibility characteristics of atomic operations; when performing atomic operations, operations with acqui re semantics ensure that the memory operations before it are visible to all threads except the current thread, that is, after executing the acqui re read operation, the current thread can observe the results of the previous write operations) read and obtain the High and Low 8 bytes of the leaf node, parse the index information in the data management area, if the version information recorded therein is different, retry, if the version information of the two parts is consistent, perform the data query operation.

[0132] Because in addition to the index information of the data management area composed of High and Low, which will change dynamically, the slots that record the KV addresses in the leaf nodes are appended, so the insertion and deletion operations will not affect the validity of the index information obtained by the read operation. According to the index information, the search operation can be performed through binary search. First, the subscript of the last ordered KV pair of the current node is obtained through the last index, and then the slot of the midpoint KV is located through the offset table and the last index. The Trie key of the corresponding slot position in the prefix information table and the Trie key of the target key are compared. If they are consistent, the real key is compared. From a probability perspective, the Trie key that occupies 5 bits can exclude most of the false identicals, thereby improving the performance of Trie; then according to the comparison result of the Trie key, the range of the binary search is adjusted, and the search operation can be completed through at most four comparisons.

[0133] When adding a new KV each time, the Appendonly method is used to append the address of the KV to the empty slot, and the content of the deletion operation slot remains unchanged. In this case, the KV addresses in each slot are unordered. To improve the search efficiency, an ordered index of the data mapping area is constructed through index information. For example, in a leaf node composed of three KV pairs A(key1), B(key2), and C(key3), if key1 < key2 < key3, the offset table is 00 01 02; if key2 < key3 < key1, the offset table is 01 02 00. Through this design, we can complete the comparison operations of addition, deletion, modification, and query through binary search, with at most 4 comparisons. To make full use of memory, 4-bit or 5-bit Trie keys of the current layer are reserved for the KV of each slot. There are a total of 12 slots, that is, at most 5-bit × 12 = 60 bits are used to cache the Trie key table (prefix information table) formed by the Trie keys of all slot KVs. Through this index, the acquisition of the Trie Key can be completed in one cache line. In terms of probability, only the truly matching keys will access the content of the KV, and the KVs of other slots can be excluded through the Trie key table, thereby reducing the impact of cache misses on Trie performance.

[0134] In addition, the last index of 4 bits is used to record the subscript of the last ordered KV pair of the current node, that is, the last bit subscript of the offset table and the prefix information table. For example, when the last index = 2, the larger subscript is 2; at most two comparisons are required to complete addition, deletion, modification, and query, and the last offset can be used to quickly locate the insertion position when adding nodes using Appendonly.

[0135] The data processing method provided in the embodiments of this specification can quickly narrow the search range through prefix matching by utilizing the structural characteristics of the prefix tree, thereby improving the efficiency of data retrieval; and the target key-value pair can be locked through a limited number of iterations. Compared with exhaustive search, it can make better use of computing resources, especially in distributed storage and cloud computing environments, which can reduce network transmission and computing costs.

[0136] In one or more embodiments of this specification, the specific implementation method during data insertion is as follows:

[0137] In response to a data insertion request, determine the target prefix tree corresponding to the target data according to the data to be inserted carried in the data insertion request and the key to be inserted corresponding to the data to be inserted;

[0138] Searching for the key to be inserted from the root node of the target prefix tree, determining a target branch node corresponding to the key to be inserted, and determining a leaf node of the key to be inserted according to the target branch node, wherein the number of bytes used by the leaf node is consistent with the number of bytes of the corresponding cache line, the leaf node includes a data mapping area and a data management area, the data mapping area stores at least one initial key-value pair, and the data management area stores index information of the initial key-value pair in the data mapping area;

[0139] Loading the at least one initial key-value pair and a cache line corresponding to the index information, and obtaining the at least one initial key-value pair and the index information from the cache line;

[0140] According to the index information, the key to be inserted and the data to be inserted are inserted into the data mapping area, and the index information is updated.

[0141] Among them, the data insertion request can be understood as a request from an external system or user, requesting to add a new key-value pair (the data to be inserted and its corresponding key to be inserted) to the data structure (here is the Trie tree); the data to be inserted can be understood as the specific data content to be added to the Trie tree, which forms a key-value pair with the key to be inserted; the key to be inserted can be understood as the identifier of the data to be inserted, through which the appropriate position in the Trie tree can be located for data insertion; the target branch node can be understood as the node obtained by searching from the root node along the character sequence of the key to be inserted, which reflects the prefix information of the key to be inserted.

[0142] Specifically, when a data insertion request is received, the target prefix tree where the data should be inserted in the existing Trie tree is first determined based on the data to be inserted and its corresponding key to be inserted. Starting from the root node of the target prefix tree, the key to be inserted is searched layer by layer to determine its corresponding target branch node, and then the corresponding leaf node of the key to be inserted is determined. Since the leaf node is designed to be consistent with the number of bytes in the cache line, memory access efficiency is ensured.

[0143] According to the index information provided by the data management area in the leaf node, the key and data to be inserted are inserted into the data mapping area, and the index information of the data management area is updated accordingly to reflect that the new key-value pair has been successfully added to the Trie tree, thereby ensuring the validity and consistency of the entire data structure.

[0144] The data processing method provided in the embodiments of this specification can directly insert the key-value pairs to be inserted into the appropriate position when the data mapping area is not full, and update the index information in time, so as to realize fast and direct insertion operation and improve the efficiency of data insertion; when the data mapping area is full, the original nodes are split by creating new branch nodes and leaf nodes, which effectively expands the data storage capacity. At the same time, the key-value pairs are reasonably classified and distributed to achieve the effect of load balancing, thus avoiding the performance bottleneck caused by a single node being too large.

[0145] The data processing method provided in the embodiments of the present specification can quickly locate the corresponding leaf node according to the character sequence of the target key by determining the target key of the target data from the data processing request. By designing the size of the leaf node to be consistent with the cache line, the CPU cache can be utilized to a large extent, and the memory access delay can be reduced. While helping to fully utilize the hardware cache resources, the waste of invalid space in memory allocation is minimized as much as possible. In addition, a data mapping area is set in the leaf node to store the initial key-value pair, and the index information of the initial key-value pair is stored in the data management area, so that the management and search of the target data are more convenient and efficient, and not only the target data can be quickly located,

[0146] See also Figure 4 , Figure 4 A flow chart of a data insertion method provided by an embodiment of the present specification is shown, which specifically includes the following steps.

[0147] Step 402: In response to a data insertion request, a target prefix tree corresponding to the data to be inserted is determined according to the data to be inserted carried in the data insertion request and the key to be inserted corresponding to the data to be inserted.

[0148] Step 404: Search for the key to be inserted from the root node of the target prefix tree, determine the target branch node corresponding to the key to be inserted, and determine the leaf node of the key to be inserted according to the target branch node, wherein the number of bytes used by the leaf node is consistent with the number of bytes of the corresponding cache line, and the leaf node includes a data mapping area and a data management area, the data mapping area stores at least one initial key-value pair, and the data management area stores index information of the initial key-value pair in the data mapping area.

[0149] Step 406: Load the at least one initial key-value pair and the cache line corresponding to the index information, and obtain the at least one initial key-value pair and the index information from the cache line.

[0150] Step 408: According to the index information, insert the key to be inserted and the data to be inserted into the data mapping area, and update the index information.

[0151] For details, please refer to the above embodiments, which will not be described again here.

[0152] In one or more embodiments of the present specification, inserting the key to be inserted and the data to be inserted into the data mapping area according to the index information, and updating the index information includes:

[0153] In the case where it is determined according to the index information that the data mapping area is not fully occupied, inserting the key to be inserted and the data to be inserted into the data mapping area according to the index information, and updating the index information;

[0154] In the case where it is determined according to the index information that the data mapping area is full, a new branch node is created, and the at least one initial key-value pair is classified into a target key-value pair and other key-value pairs according to the prefix information table in the index information, wherein the other key-value pairs are key-value pairs in the at least one initial key-value pair except the target key-value pair;

[0155] Create a target leaf node under the new branch node, store the other key-value pairs in the target branch node, store the target key-value pair, the key to be inserted, and the data to be inserted in the new leaf node, and update the index information of the data management area in the new branch node and the new leaf node.

[0156] Specifically, there are two situations when inserting a new key-value pair in the Trie tree: if there is remaining space in the data mapping area of ​​the current leaf node, the key-value pair to be inserted is directly inserted, and the index information is updated; if the data mapping area is full, a split operation is taken. First, the initial key-value pairs are classified according to the prefix information of the key-value pairs. When there are at least two KV pairs corresponding to the prefix information, it is determined as the target key-value pair, and a new branch node and leaf node are created, and the target key-value pair and other key-value pairs are stored in the new leaf node and new branch node respectively; the index information of the data management area in the created branch node and leaf node is updated to ensure that the subsequent search and management of these key-value pairs are still efficient and accurate.

[0157] The data insertion method provided in the embodiments of this specification can directly insert the key-value pairs to be inserted into the appropriate position when the data mapping area is not full, and update the index information in time, so as to realize fast and direct insertion operation and improve the efficiency of data insertion; when the data mapping area is full, the original nodes are split by creating new branch nodes and leaf nodes, which effectively expands the data storage capacity. At the same time, the key-value pairs are reasonably classified and distributed to achieve the effect of load balancing, thus avoiding the performance bottleneck caused by a single node being too large.

[0158] See also Figure 5 , Figure 5 A schematic diagram of a data deletion process provided by an embodiment of the present specification is shown, which specifically includes the following steps.

[0159] When deleting a leaf node with at least two valid KV pairs, the following process is followed:

[0160] Among them, because the Appendon ly method is used to append the KV address to the vacant slot, the slot content is not modified during the deletion operation. This method does not perform traditional physical deletion operations, that is, it does not directly erase the KV pair from the storage medium, but manages the validity of the data at the logical level; therefore, valid KV pairs refer to those key-value pairs that are still recognized as valid by the system and have not been marked as deleted or expired.

[0161] First, use atomic operations in "acqui re" mode to read the High and Low 8 bytes of the leaf node. These two parts together constitute the index information of the data management area. This index information contains the version information of the leaf node. If the version information read from the two parts is inconsistent, the program will retry to read the High and Low 8 bytes of the leaf node until the consistent version information is read, and then perform the following operations.

[0162] After obtaining consistent version information, the next step is to try to acquire the lock of the leaf node. This lock is implemented based on the lock bit in the index information. Only the thread that successfully acquires the lock can become the only writer of the current leaf node. Once the leaf node is successfully locked, a binary search is used to search for the key to be deleted in the leaf node. If the key to be deleted cannot be found, the lock is released and the result of the deletion operation failure is returned.

[0163] If the key to be deleted is found and its specific position in the leaf node index information is obtained, a new, updated index information will be constructed. In the new version of the index information, the version information is incremented to indicate that this is an updated version of the index information, and the last valid index is reduced by one, reflecting that a key-value pair has been deleted. Then, the data item corresponding to the index returned by the binary search is removed from the offset table and prefix information table, but the last offset is kept unchanged because it reflects the end position of the data area.

[0164] The updated index information is encoded as two unsigned 64-bit integers and written back to the High and Low 8-byte fields of the leaf node using the atomic operation "re lease (atomic update through re lease means telling the compiler and processor that this operation is not only atomic, but also should "release" the memory effects of all previous operations so that other threads can perceive these changes. In concurrent programming, it is often used in conjunction with the acqui re operation to form a "publish-acquire" (re lease-acqui re) synchronization mechanism to ensure data consistency and synchronization. The index information of the leaf node is updated in re lease mode, ensuring that other threads can see the latest and correct values ​​when reading this information, and will not affect other threads and concurrent search operations on user data in the value node)" mode.

[0165] In this way, during the entire deletion process, only the part of the leaf node used for metadata storage is atomically modified, while the value node area that actually stores user data remains unchanged. Therefore, even in a concurrent environment, other threads performing search operations will not be affected by the deletion operation.

[0166] The data deletion method provided in the embodiments of this specification uses a lightweight lock mechanism to become the only writer of the current leaf node after successful locking, which limits the number of threads that simultaneously write to the same leaf node, protects operations in key areas, but maintains a high degree of concurrency; the deletion operation updates the index information part, and implements logical deletion of key-value pairs by modifying corresponding items in the offset table and prefix information table, without moving user data, thus reducing space overhead and the number of modifications to existing data; it effectively solves data competition and consistency issues in a high-concurrency environment, while ensuring efficient search and update of data structures, and improving the performance and stability of the overall system.

[0167] See also Figure 6 , Figure 6 A schematic diagram of another data deletion process provided by an embodiment of the present specification is shown, which specifically includes the following steps.

[0168] In the scenario where only two valid KVs remain in the leaf node, the deletion process is as follows: Figure 6 As shown:

[0169] Similarly, atomic operations are used to read the High and Low 8 bytes of the leaf node in "acqui re" mode. These two parts together constitute the index information of the data management area. This index information contains the version information of the leaf node. If the version information read from the two parts is inconsistent, the program will retry to read the High and Low 8 bytes of the leaf node until the consistent version information is read, and then the following operations will be performed.

[0170] The lock of the leaf node is obtained through the lock part of the index information. Successful locking indicates that the thread is the only writer of the current leaf node. After successful locking, if the number of remaining nodes is equal to 2 and the deletion is successful, the leaf node recycling process is enabled.

[0171] The key to be deleted is searched through binary search. If not found, the lock is released and the deletion failure is returned. Otherwise, the index of the key to be deleted in the index information is obtained, and new index information is generated, in which the version information is set to 0x0F, indicating that the current leaf node is about to be recycled and can be used for query, but cannot be modified. It is then encoded into two unsigned 64-bit integers and updated to the High and Low fields of the leaf node through re lease. After that, the address of the remaining KV after the deletion is saved in the corresponding slot of the upper-level branch node through CAS (Compare and Swap, a lock-free programming technology mainly used to implement atomic operations in a multi-threaded environment). During the whole process, the query operation either sees the leaf node to be recycled or sees the modified result through the CAS operation. This operation only atomically modifies the two 8 bytes of the High and Low parts. The value in the slot used to store user data will not be modified as long as it is visible on Trie, thus not affecting concurrent search operations.

[0172] See also Figure 7 , Figure 7 A schematic diagram of a data insertion process provided by an embodiment of the present specification is shown, which specifically includes the following steps.

[0173] When there are still slots left in the leaf node, the insertion process is as follows Figure 7 As shown:

[0174] Similarly, atomic operations are used to read the High and Low 8 bytes of the leaf node in "acqui re" mode. These two parts together constitute the index information of the data management area. This index information contains the version information of the leaf node. If the version information read from the two parts is inconsistent, the program will retry to read the High and Low 8 bytes of the leaf node until the consistent version information is read, and then the following operations will be performed.

[0175] Through the lock part of the index information, the lock of the leaf node is obtained. Successful locking indicates that the thread is the only writer of the current leaf node. Because the write operation in this operation is very light, only a one-bit spin lock is used. After the lock is successfully acquired, a binary search is performed to locate whether the key to be inserted already exists in the leaf node. If it does, the lock is released and the insertion failure is returned; otherwise, during the search process, the position index of the first existing key-value pair that is greater than the key to be inserted is returned. The address of the KV is saved in the slot of the last offset of the current leaf node plus 1, and new index information is generated at the same time, mainly including incrementing version information (to ensure the uniqueness of each operation), incrementing the last offset (pointing to the newly inserted KV address), incrementing the last index, inserting the last offset and the Trie Key of the new node at the appropriate position of the offset table and prefix information table (the index position returned by the binary search), and then encoding them into two unsigned 64-bit integers, which are updated to the High and Low fields of the leaf node through the lease method. During the entire process, only the two 8 bytes of the High and Low parts are atomically modified. The value stored in the slot for storing the user KV address will not be modified as long as it is visible on Trie, thus not affecting concurrent query operations.

[0176] See also Figure 8 , Figure 8 A schematic diagram of another data insertion process provided by an embodiment of the present specification is shown, which specifically includes the following steps.

[0177] When the leaf nodes are full, the insertion process is as follows Figure 8 As shown:

[0178] Similarly, atomic operations are used to read the High and Low 8 bytes of the leaf node in "acqui re" mode. These two parts together constitute the index information of the data management area. This index information contains the version information of the leaf node. If the version information read from the two parts is inconsistent, the program will retry to read the High and Low 8 bytes of the leaf node until the consistent version information is read, and then the following operations will be performed.

[0179] The lock of the leaf node is obtained through the lock part of the index information. Successful locking indicates that the thread is the only writer of the current leaf node. After successful locking, if it is found that the last offset is already a large number of slots, it means that the current leaf node has no free slots to accept the newly inserted node. At this time, the node splitting function needs to be started.

[0180] Create a new branch node, classify each KV pair according to the prefix information table in the current index information, and directly record it in the slot corresponding to the new branch Trie Key if there is only one KV pair for a Trie Key. If there are more than one KV pairs sharing the same Trie Key, create a new leaf node for these key-value pairs and store them in the new leaf node in order.

[0181] Since the original leaf node has been locked during the splitting process, the thread holding the lock is the only executor that can make modifications. At this time, the pointer in the parent node (Branch Node) pointing to the original leaf node will not be changed by other query operations during the splitting process; therefore, after the leaf node is split, the CAS operation can be used to atomically change the pointer in the parent node pointing to the old leaf node to point to the newly created branch node, thereby smoothly completing the splitting of the leaf node and the insertion of the new node without blocking any query operations.

[0182] Corresponding to the above method embodiment, this specification also provides a data processing device embodiment, Fig. 9 FIG. 1 is a schematic diagram showing the structure of a data processing device provided by an embodiment of the present specification. Fig. 9 As shown, the device comprises:

[0183] A response module 902 is configured to respond to a data processing request and determine a target prefix tree corresponding to the target data according to a target key of the target data carried in the data processing request;

[0184] A determination module 904 is configured to search for the target key from the root node of the target prefix tree, and determine a leaf node corresponding to the target key, wherein the number of bytes used by the leaf node is consistent with the number of bytes of the corresponding cache line, and the leaf node includes a data mapping area and a data management area, the data mapping area stores at least one initial key-value pair, and the data management area stores index information of the initial key-value pair in the data mapping area;

[0185] A loading module 906 is configured to load the at least one initial key-value pair and the cache line corresponding to the index information, and obtain the at least one initial key-value pair and the index information from the cache line;

[0186] The acquisition module 908 is configured to determine the target data from the at least one initial key-value pair according to the index information and the target key, and perform data processing on the target data according to the data processing request to obtain a data processing result.

[0187] Optionally, the obtaining module 908 is further configured to:

[0188] Acquire the first leaf node version identifier from the first index information, and acquire the second leaf node version identifier from the second index information;

[0189] The target data is determined from the at least one initial key-value pair according to the first leaf node version identifier, the second leaf node version identifier, the first index information, the second index information, and the target key.

[0190] Optionally, the obtaining module 908 is further configured to:

[0191] In a case where the first leaf node version identifier is consistent with the second leaf node version identifier, determining the target data from the at least one initial key-value pair according to the index information and the target key;

[0192] When the first leaf node version identifier is inconsistent with the second leaf node version identifier, continue to execute the steps of obtaining the first leaf node version identifier from the first index information and obtaining the second leaf node version identifier from the second index information.

[0193] Optionally, the obtaining module 908 is further configured to:

[0194] Determine a target key-value pair from the at least one initial key-value pair according to the number of the initial key-value pairs, the target offset table, the target prefix table, and the target key;

[0195] When the key in the target key-value pair is consistent with the target key, the value in the target key-value pair is determined as the target data.

[0196] Optionally, the obtaining module 908 is further configured to:

[0197] Determining a reference key-value pair from the at least one initial key-value pair according to the number of the initial key-value pairs and the target offset table, wherein the reference key-value pair is a key-value pair in a middle position after the at least one initial key-value pair is sorted according to the number of the initial key-value pairs and the target offset table;

[0198] Determining prefix information of the reference key-value pair according to the reference key-value pair and the target prefix table;

[0199] When the prefix information is consistent with the prefix information of the target key, the reference key-value pair is determined as the target key-value pair.

[0200] The device further comprises:

[0201] A search module configured to determine a next reference key-value pair according to the number of the at least one initial key-value pair, the target offset table, and the position of the reference key-value pair in the at least one initial key-value pair after sorting, if the prefix information is inconsistent with the prefix information of the target key;

[0202] The next reference key-value pair is determined as the reference key-value pair, and the step of determining prefix information of the reference key-value pair according to the reference key-value pair and the target prefix table is continued.

[0203] Optionally, the response module 902 is further configured to:

[0204] When it is determined that the number of the initial prefix tree is one, determining the initial prefix tree as a target prefix tree corresponding to the target data according to a target key of the target data carried in the data processing request; or

[0205] When it is determined that the number of the initial prefix trees is multiple, the attribute information of the target key is determined according to the target key of the target data carried in the data processing request, and the target prefix tree corresponding to the target data is determined from the multiple initial prefix trees according to the attribute information of the target key.

[0206] The device further comprises:

[0207] An insertion module is configured to respond to a data insertion request, determine a target prefix tree corresponding to the target data according to the data to be inserted carried in the data insertion request and the key to be inserted corresponding to the data to be inserted; search for the key to be inserted from the root node of the target prefix tree, determine the target branch node corresponding to the key to be inserted, and determine the leaf node of the key to be inserted according to the target branch node, wherein the number of bytes used by the leaf node is consistent with the number of bytes of the corresponding cache line, and the leaf node includes a data mapping area and a data management area, the data mapping area stores at least one initial key-value pair, and the data management area stores index information of the initial key-value pair in the data mapping area; load the cache line corresponding to the at least one initial key-value pair and the index information, and obtain the at least one initial key-value pair and the index information from the cache line; insert the key to be inserted and the data to be inserted into the data mapping area according to the index information, and update the index information.

[0208] The above is a schematic scheme of a data processing device of this embodiment. It should be noted that the technical scheme of the data processing device and the technical scheme of the above data processing method belong to the same concept, and the details of the technical scheme of the data processing device that are not described in detail can be referred to the description of the technical scheme of the above data processing method.

[0209] Corresponding to the above method embodiment, this specification also provides a data insertion device embodiment, Fig.10 FIG. 1 shows a schematic diagram of a data insertion device provided by an embodiment of the present specification. Fig.10 As shown, the device comprises:

[0210] The response module 1002 is configured to respond to the data insertion request and determine the target prefix tree corresponding to the data to be inserted according to the data to be inserted carried in the data insertion request and the key to be inserted corresponding to the data to be inserted;

[0211] The determination module 1004 is configured to search the key to be inserted from the root node of the target prefix tree, and determine the leaf node corresponding to the key to be inserted, wherein the number of bytes used by the leaf node is consistent with the number of bytes of the corresponding cache line, and the leaf node includes a data mapping area and a data management area, the data mapping area stores at least one initial key-value pair, and the data management area stores index information of the initial key-value pair in the data mapping area;

[0212] The loading module 1006 is configured to load the at least one initial key-value pair and the cache line corresponding to the index information, and obtain the at least one initial key-value pair and the index information from the cache line.

[0213] The inserting module 1008 is configured to insert the key to be inserted and the data to be inserted into the data mapping area according to the index information, and update the index information.

[0214] Optionally, the inserting module 1008 is further configured to:

[0215] When it is determined according to the index information that the data mapping area is not fully occupied, the key to be inserted and the data to be inserted are inserted into the data mapping area according to the index information, and the index information is updated.

[0216] Optionally, the inserting module 1008 is further configured to:

[0217] In the case where it is determined according to the index information that the data mapping area is full, a new branch node is created, and the at least one initial key-value pair is classified into a target key-value pair and other key-value pairs according to the prefix information table in the index information, wherein the other key-value pairs are key-value pairs in the at least one initial key-value pair except the target key-value pair;

[0218] Create a target leaf node under the new branch node, store the other key-value pairs in the target branch node, store the target key-value pair, the key to be inserted, and the data to be inserted in the new leaf node, and update the index information of the data management area in the new branch node and the new leaf node.

[0219] The above is a schematic scheme of a data insertion device of this embodiment. It should be noted that the technical scheme of the data insertion device and the technical scheme of the above data insertion method belong to the same concept, and the details not described in detail in the technical scheme of the data insertion device can be referred to the description of the technical scheme of the above data insertion method.

[0220] Fig.11 The block diagram of a computing device 1100 according to one embodiment of the present specification is shown. The components of the computing device 1100 include but are not limited to a memory 1110 and a processor 1120. The processor 1120 is connected to the memory 1110 via a bus 1130, and a database 1150 is used to store data.

[0221] The computing device 1100 also includes an access device 1140 that enables the computing device 1100 to communicate via one or more networks 1160. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 1140 may include one or more of any type of network interface, wired or wireless (e.g., a network interface card (NIC)), such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, and a Near Field Communication (NFC).

[0222] In one embodiment of the present specification, the above components of the computing device 1100 and Fig.11Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Fig.11 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0223] The computing device 1100 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 1100 may also be a mobile or stationary server.

[0224] The processor 1120 is used to execute the following computer program / instructions, which implement the steps of the above-mentioned data processing method when executed by the processor.

[0225] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the computing device embodiment, since it is basically similar to the data processing method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the data processing method embodiment.

[0226] An embodiment of the present specification further provides a computer-readable storage medium storing a computer program / instruction, which implements the steps of the above-mentioned data processing method when executed by a processor.

[0227] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the computer-readable storage medium embodiment, since it is basically similar to the data processing method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the data processing method embodiment.

[0228] An embodiment of the present specification also provides a computer program product, including a computer program / instruction, which implements the steps of the above data processing method when executed by a processor.

[0229] The above is a schematic scheme of a computer program product of this embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the above data processing method belong to the same concept, and the details not described in detail in the technical scheme of the computer program product can be referred to the description of the technical scheme of the above data processing method.

[0230] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0231] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0232] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0233] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0234] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can understand and use this specification well. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A data processing method, comprising: In response to a data processing request, determining a target prefix tree corresponding to the target data according to a target key of the target data carried in the data processing request; Searching for the target key from the root node of the target prefix tree, determining a leaf node corresponding to the target key, wherein the number of bytes used by the leaf node is consistent with the number of bytes of the corresponding cache line, the leaf node comprises a data mapping area and a data management area, the data mapping area stores at least one initial key-value pair, and the data management area stores index information of the initial key-value pair in the data mapping area; Loading the at least one initial key-value pair and a cache line corresponding to the index information, and obtaining the at least one initial key-value pair and the index information from the cache line; According to the index information and the target key, the target data is determined from the at least one initial key-value pair, and data processing is performed on the target data according to the data processing request to obtain a data processing result.

2. The data processing method according to claim 1, wherein the data management area comprises a first data management area and a second data management area, the first data management area stores first index information of the initial key-value pair in the data mapping area, the first index information comprises a first leaf node version identifier, and the second data management area stores second index information of the initial key-value pair in the data mapping area, the second index information comprises a second leaf node version identifier; The step of determining the target data from the at least one initial key-value pair according to the index information and the target key includes: Acquire the first leaf node version identifier from the first index information, and acquire the second leaf node version identifier from the second index information; The target data is determined from the at least one initial key-value pair according to the first leaf node version identifier, the second leaf node version identifier, the first index information, the second index information, and the target key.

3. The data processing method according to claim 2, wherein determining the target data from the at least one initial key-value pair according to the index information and the target key comprises: In a case where the first leaf node version identifier is consistent with the second leaf node version identifier, determining the target data from the at least one initial key-value pair according to the index information and the target key; When the first leaf node version identifier is inconsistent with the second leaf node version identifier, continue to execute the steps of obtaining the first leaf node version identifier from the first index information and obtaining the second leaf node version identifier from the second index information.

4. The data processing method according to claim 1, wherein the index information includes the number of the initial key-value pairs, a target offset table, and a target prefix table; The step of determining the target data from the at least one initial key-value pair according to the index information and the target key includes: Determine a target key-value pair from the at least one initial key-value pair according to the number of the initial key-value pairs, the target offset table, the target prefix table, and the target key; When the key in the target key-value pair is consistent with the target key, the value in the target key-value pair is determined as the target data.

5. The data processing method according to claim 4, wherein determining a target key-value pair from the at least one initial key-value pair according to the number of the initial key-value pairs, the target offset table, the target prefix table, and the target key comprises: Determining a reference key-value pair from the at least one initial key-value pair according to the number of the initial key-value pairs and the target offset table, wherein the reference key-value pair is a key-value pair in a middle position after the at least one initial key-value pair is sorted according to the number of the initial key-value pairs and the target offset table; Determining prefix information of the reference key-value pair according to the reference key-value pair and the target prefix table; When the prefix information is consistent with the prefix information of the target key, the reference key-value pair is determined as the target key-value pair.

6. The data processing method according to claim 5, after determining the prefix information of the reference key-value pair according to the reference key-value pair and the target prefix table, further comprising: In the case where the prefix information is inconsistent with the prefix information of the target key, determining a next reference key-value pair according to the number of the at least one initial key-value pair, the target offset table, and the position of the reference key-value pair in the at least one initial key-value pair after sorting; The next reference key-value pair is determined as the reference key-value pair, and the step of determining prefix information of the reference key-value pair according to the reference key-value pair and the target prefix table is continued.

7. The data processing method according to claim 1, wherein in response to a data processing request, determining a target prefix tree corresponding to the target data according to a target key of the target data carried in the data processing request comprises: When it is determined that the number of the initial prefix tree is one, determining the initial prefix tree as a target prefix tree corresponding to the target data according to a target key of the target data carried in the data processing request; or When it is determined that the number of the initial prefix trees is multiple, the attribute information of the target key is determined according to the target key of the target data carried in the data processing request, and the target prefix tree corresponding to the target data is determined from the multiple initial prefix trees according to the attribute information of the target key.

8. The data processing method according to any one of claims 1 to 7, wherein the data processing request comprises any one of the following requests: Data query requests, data deletion requests, and data modification requests.

9. A data insertion method, comprising: In response to a data insertion request, determining a target prefix tree corresponding to the data to be inserted according to the data to be inserted carried in the data insertion request and a key to be inserted corresponding to the data to be inserted; Searching for the key to be inserted from the root node of the target prefix tree, determining a target branch node corresponding to the key to be inserted, and determining a leaf node of the key to be inserted according to the target branch node, wherein the number of bytes used by the leaf node is consistent with the number of bytes of the corresponding cache line, the leaf node includes a data mapping area and a data management area, the data mapping area stores at least one initial key-value pair, and the data management area stores index information of the initial key-value pair in the data mapping area; Loading the at least one initial key-value pair and a cache line corresponding to the index information, and obtaining the at least one initial key-value pair and the index information from the cache line; According to the index information, the key to be inserted and the data to be inserted are inserted into the data mapping area, and the index information is updated.

10. The data insertion method according to claim 9, wherein the step of inserting the key to be inserted and the data to be inserted into the data mapping area according to the index information and updating the index information comprises: When it is determined according to the index information that the data mapping area is not fully occupied, the key to be inserted and the data to be inserted are inserted into the data mapping area according to the index information, and the index information is updated.

11. The data insertion method according to claim 9, wherein the step of inserting the key to be inserted and the data to be inserted into the data mapping area according to the index information and updating the index information comprises: In the case where it is determined according to the index information that the data mapping area is full, a new branch node is created, and the at least one initial key-value pair is classified into a target key-value pair and other key-value pairs according to the prefix information table in the index information, wherein the other key-value pairs are key-value pairs in the at least one initial key-value pair except the target key-value pair; Create a target leaf node under the new branch node, store the other key-value pairs in the target branch node, store the target key-value pair, the key to be inserted, and the data to be inserted in the new leaf node, and update the index information of the data management area in the new branch node and the new leaf node.

12. A data processing device, comprising: A response module, configured to respond to a data processing request and determine a target prefix tree corresponding to the target data according to a target key of the target data carried in the data processing request; A determination module is configured to search for the target key from the root node of the target prefix tree, and determine a leaf node corresponding to the target key, wherein the number of bytes used by the leaf node is consistent with the number of bytes of the corresponding cache line, and the leaf node includes a data mapping area and a data management area, the data mapping area stores at least one initial key-value pair, and the data management area stores index information of the initial key-value pair in the data mapping area; A loading module, configured to load the at least one initial key-value pair and a cache line corresponding to the index information, and obtain the at least one initial key-value pair and the index information from the cache line; The obtaining module is configured to determine the target data from the at least one initial key-value pair according to the index information and the target key, and to perform data processing on the target data according to the data processing request to obtain a data processing result.

13. A data insertion device, comprising: A response module is configured to respond to a data insertion request and determine a target prefix tree corresponding to the data to be inserted according to the data to be inserted carried in the data insertion request and a key to be inserted corresponding to the data to be inserted; A determination module, configured to search for the key to be inserted from the root node of the target prefix tree, determine the target branch node corresponding to the key to be inserted, and determine the leaf node of the key to be inserted according to the target branch node, wherein the number of bytes used by the leaf node is consistent with the number of bytes of the corresponding cache line, and the leaf node includes a data mapping area and a data management area, the data mapping area stores at least one initial key-value pair, and the data management area stores index information of the initial key-value pair in the data mapping area; A loading module, configured to load the at least one initial key-value pair and a cache line corresponding to the index information, and obtain the at least one initial key-value pair and the index information from the cache line; The inserting module is configured to insert the key to be inserted and the data to be inserted into the data mapping area according to the index information, and update the index information.

14. A computing device comprising: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the method described in any one of claims 1 to 11 are implemented.

15. A computer-readable storage medium storing a computer program / instruction, wherein the computer program / instruction, when executed by a processor, implements the steps of the method according to any one of claims 1 to 11.

16. A computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 11.