Distributed key-value storage method and device based on homogeneous adaptive learning index
By building a isomorphic adaptive learning index model on the client and server, and using RDMA operations to process distributed key value read and write requests, the problems of low index construction efficiency and high CPU pressure in the existing technology are solved, and high throughput is achieved. and low-latency key-value storage systems.
Patent Information
- Application Number
- CN202111426893.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-28
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2041-11-28
AI Technical Summary
Existing technology makes it difficult to build isomorphic learning indexes on the client and server and efficiently process distributed key-value read and write requests. This results in high server CPU pressure and high communication costs, and cannot meet the needs of high throughput and low latency.
Using the isomorphic adaptive learning index model, the client obtains the index parameters and node parameters of the server, reconstructs the isomorphic index through the desequence model, uses RDMA operations to accelerate read and write requests, and dynamically adjusts the index structure to adapt to the insertion and query of key-value pairs. .
Without increasing communication costs, the server CPU pressure is reduced, the system's high throughput and low latency requirements are met, and the efficiency and accuracy of key-value pair storage are improved.
Smart Images

Figure CN114138780B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of distributed storage technology, and in particular relates to a distributed key-value storage method and device based on isomorphic adaptive learning index. Background Art
[0002] The performance of key-value storage systems is still very important, because modern key-value storage has become a key infrastructure to support distributed main memory computing. For these distributed network-based applications, such as blockchain systems, which generally adopt key-value database storage architectures, CPU and communication overhead are important factors in determining overall performance, and with the explosive growth of data, the demand for high-performance systems has increased significantly.
[0003] Remote Direct Memory access (RDMA) is a new high-performance, low-latency network hardware that allows network cards to directly access the memory of remote servers, which inspires new designs that use RDMA to reduce system costs. Currently, there are two types of RDMA operations. One is bidirectional RDMA operation, which fully utilizes the high bandwidth and low latency advantages of RDMA. However, when the server encounters high concurrent requests from multiple clients, the server CPU will become a bottleneck that seriously affects system performance. The other is unidirectional RDMA operation, which bypasses the remote CPU and directly accesses data in the server memory. Therefore, it transfers the CPU workload from the server to the client. However, when read and write requests require multiple RDMA round trips and the amount of communication increases, the network will become a bottleneck of the system. Based on the above observations, this motivates us to combine the advantages of unidirectional and bidirectional RDMA and perform hybrid RDMA operations for read and write requests.
[0004] The machine learning model is used as the index structure, that is, the location of the key-value pair storage is predicted by the machine learning model, and the model structure is adaptively adjusted according to the insertion of the key-value pair to support the processing of static read requests and dynamic write requests. The machine learning index has better search performance and lower space cost, which is more conducive to combining the advantages of RDMA and reducing communication costs.
[0005] Although there are adaptive learning indexes that support read and write requests, they are all oriented towards single-machine loads. How to efficiently design a method based on hybrid RDMA operations and build homogeneous learning indexes on the client and server to implement a distributed key-value read and write storage system is still an urgent problem that technical personnel in this field need to solve. Summary of the invention
[0006] The present invention overcomes one of the shortcomings of the prior art and provides a key-value pair storage method and device based on a homogeneous adaptive learning index model. By adopting homogeneous adaptive learning indexes on the client and the server to support the processing of static read requests and dynamic write requests, and adopting hybrid RDMA operations, the server CPU pressure is effectively reduced without increasing the communication cost, and the requirements of small system footprint, high throughput and low latency are met.
[0007] According to one aspect of the present disclosure, the present invention provides a distributed key-value storage method based on homogeneous adaptive learning index, the method comprising:
[0008] The client obtains the index parameters and node parameters of the adaptive learning index model on the server;
[0009] Based on the index model parameters of the adaptive learning index model, the client reconstructs the isomorphic adaptive learning index model through the de-sequence model;
[0010] Rebuilding the address mapping data structure of the leaf nodes of the adaptive learning index model on the server side;
[0011] The client predicts the server-side address corresponding to the user's read / write request key according to the address mapping data structure of the leaf node and the isomorphic adaptive learning index model, and uses RDMA to accelerate the storage of user read / write request key-value pairs.
[0012] In a possible implementation, before the client obtains the index parameters and node parameters of the adaptive learning on the server, the method further includes constructing an adaptive learning index model on the server;
[0013] The constructing of the server-side adaptive learning index model includes: using a machine learning index model to predict the position of a key value, and dynamically constructing the machine learning index model according to the predicted position of the key value;
[0014] The index model structure is adaptively adjusted based on the capacity of the leaf nodes of the index model and the predicted position of the key value to obtain an adaptive learning index model.
[0015] In a possible implementation, the index parameters include an address, a memory size, and a total number of nodes of the adaptive learning index model;
[0016] The node parameters include the linear model parameters of each node, the number of pointers of its child nodes and the number of its child nodes;
[0017] The address mapping data structure of the leaf node includes the leaf node number, model version number, data capacity, actual location of the key-value pair and the corresponding key-value pair cache address.
[0018] In a possible implementation, the adaptively adjusting the index model based on the capacity of the leaf nodes of the index model and the predicted position of the key-value pair to obtain the adaptive learning index model includes:
[0019] When the capacity of the leaf nodes of the index model is full, if the key value prediction position is correct, the capacity of the leaf nodes of the index model is expanded; if the key value prediction position is incorrect, the leaf nodes of the index model are split; the adaptive learning index model is obtained by adaptively adjusting the expansion and splitting of the leaf nodes of the index model.
[0020] In one possible implementation, the index parameters and node parameters of the adaptive learning index model, the address mapping data structure of the leaf node and the corresponding key-value pairs are saved in the RDMA area, and the RDMA area is the memory allocated by the server for RDMA read / write operations.
[0021] In a possible implementation, the server address corresponding to the user's read request key is predicted according to the address mapping data structure of the leaf node and the isomorphic adaptive learning index model, and the RDMA method is used to accelerate the user's read / write request key value storage, including:
[0022] The client predicts the location range of the read request key using the isomorphic adaptive learning index model;
[0023] Obtain the server-side address of the predicted position range of the read request key according to the address mapping data structure of the leaf node, and obtain the leaf node, leaf node address and model version number V corresponding to the read request key in the homogeneous adaptive learning index model ck ;
[0024] When the predicted position range error of the read request key is less than the preset threshold, the client uses a one-way RDMA method to pull the key-value pairs within the position range of the read request key, the key-value pairs in the key-value pair cache corresponding to the leaf node, and the model version number V of the leaf node from the server according to the obtained server address. sk ;
[0025] When the version number model V of the leaf node ck The version number model V of the leaf node service on the server side sk If the leaf node is equal, the client searches for the value of the read request key in the key-value pair pulled locally from the server; otherwise, the client pulls the latest leaf node model from the server according to the leaf node address and updates the client's isomorphic adaptive learning index model;
[0026] When the predicted position range error of the read request key is greater than a preset threshold, the client sends the read request key to the server using a bidirectional RDMA method, obtains the read request key value using an adaptive learning index model on the server side, and then sends the value to the client.
[0027] In a possible implementation, the server address corresponding to the user's write request key is predicted according to the address mapping data structure of the leaf node and the isomorphic adaptive learning index model, and the RDMA method is used to accelerate the user's read / write request key value storage, including:
[0028] The client predicts the location range of the write request key using the isomorphic adaptive learning index model;
[0029] Obtain the leaf node corresponding to the write request key, and the address and version number V of the leaf node according to the address mapping data structure of the leaf node and the predicted position range of the write request key ck ;
[0030] The leaf node corresponding to the write request key value, and the address and version number V of the leaf node are sent to the write request key value by using a bidirectional RDMA method. ck Sent to the server, and based on the server's adaptive learning index model, the server-side version number V of the leaf node is obtained. sk ;
[0031] When the client version number of the leaf node V ck The version number V of the leaf node service on the server side sk If the write request key-value pair is equal and the capacity of the leaf node on the server side is not full, the write request key-value pair is written into the key-value pair cache of the leaf node; otherwise, the write request key value is inserted into the actual position re-predicted according to the adaptive learning index model on the server side, the adaptive learning index model is adjusted and the version number of the leaf node is increased by 1.
[0032] According to another aspect of the present disclosure, a distributed key-value storage device based on homogeneous adaptive learning index is proposed, the device comprising:
[0033] A parameter acquisition unit, used to acquire index model parameters and leaf node parameters of the adaptive learning index model on the server side;
[0034] A homogeneous adaptive learning index model creation unit, the client is used to create a homogeneous adaptive learning index model through a deserialization model based on the index parameters and node parameters of the adaptive learning index model;
[0035] A leaf node address mapping data structure reconstruction unit, the client is used to reconstruct the leaf node address mapping data structure of the adaptive learning index model of the server;
[0036] The read / write request key value processing unit is used by the client to predict the server-side address corresponding to the user's read / write request key according to the address mapping data structure of the leaf node and the isomorphic adaptive learning index model, and adopts RDMA to accelerate the user's read / write request key value storage.
[0037] The distributed key-value storage method and device based on homogeneous adaptive learning index disclosed in the present invention obtains the index parameters and node parameters of the adaptive learning index model on the server side; reconstructs the homogeneous adaptive learning index model through the deserialization model based on the index parameters and node parameters of the adaptive learning index model; reconstructs the address mapping data structure of the leaf nodes of the adaptive learning index model on the server side; predicts the server-side address corresponding to the user's read / write request key according to the address mapping data structure of the leaf node and the homogeneous adaptive learning index model, and accelerates the storage of the user's read / write request key-value pairs using the RDMA method. It can effectively reduce the pressure on the server CPU without increasing the communication cost, and meet the requirements of small system footprint, high throughput and low latency. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings are used to provide a further understanding of the technical solution of the present application or the prior art, and constitute a part of the specification. Among them, the accompanying drawings expressing the embodiments of the present application are used together with the embodiments of the present application to explain the technical solution of the present application, but do not constitute a limitation on the technical solution of the present application.
[0039] Figure 1 A flow chart of distributed key-value storage based on homogeneous adaptive learning index according to an embodiment of the present disclosure is shown;
[0040] Figure 2 A structural block diagram of a distributed key-value read and write request based on a homogeneous adaptive learning index according to an embodiment of the present disclosure is shown;
[0041] Figure 3 The hardware and software architecture diagram of a distributed key-value storage system based on homogeneous adaptive learning index according to an embodiment of the present disclosure is shown;
[0042] Figure 4 A schematic diagram of a distributed key-value read and write request based on a homogeneous adaptive learning index according to an embodiment of the present disclosure is shown;
[0043] Figure 5 A principle block diagram of a distributed key pair storage device based on homogeneous adaptive learning index according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0044] The following will describe the implementation methods of the present invention in detail with reference to the accompanying drawings and embodiments, so that the implementation process of how the present invention applies technical means to solve technical problems and achieve corresponding technical effects can be fully understood and implemented accordingly. The embodiments of the present application and the various features in the embodiments can be combined with each other without conflict, and the technical solutions formed are all within the protection scope of the present invention.
[0045] In addition, the steps shown in the flowchart of the accompanying drawings can be executed in a computer such as a set of computer executable instructions. Also, although a logical sequence is shown in the flowchart, in some cases, the steps shown or described can be performed in a sequence different from that here.
[0046] Figure 1 The following is a flow chart of a distributed key-value storage based on isomorphic adaptive learning index according to an embodiment of the present disclosure. The method can be used in a distributed storage system, such as Figure 1 As shown, the method may include:
[0047] Step S1: The client obtains the index parameters and node parameters of the adaptive learning index model on the server side. The index parameters include the address, memory size and total number of nodes of the adaptive learning index model, and the node parameters include the linear model parameters of each node, the number of pointers of its child nodes and the number of its child nodes.
[0048] In one example, before step S1, a server-side adaptive learning index model is constructed on the server side. The method may include:
[0049] The machine learning index model is used to predict the position of the key value, and the machine learning index model is dynamically constructed according to the predicted position of the key value.
[0050] Among them, the machine learning index model is a tree structure model and a recursive model index structure. Only the leaf node model can directly access the key-value pairs, and the internal node model determines the search path from the root node to the leaf node.
[0051] The index model structure is adaptively adjusted based on the capacity of the leaf nodes of the index model and the predicted position of the key value to obtain an adaptive learning index model. For example, when the capacity of the leaf nodes of the index model is full, if the predicted position of the key value is correct, the capacity of the leaf nodes of the index model is expanded; if the predicted position of the key value is incorrect, the leaf nodes of the index model are split; the adaptive learning index model is obtained by adaptively adjusting the expansion and splitting of the leaf nodes of the index model.
[0052] The above method is used to construct an adaptive learning index model on the server side. The server side performs a layer-by-layer traversal of the trained adaptive learning index model and adds a number to each node in sequence; creates an address mapping data structure, and puts the numbers, version numbers, data capacity, actual locations of all leaf nodes and the cache corresponding to the leaf nodes into the data structure; registers an RDMA area (the memory allocated by the server for RDMA read / write operations), and puts each leaf node address mapping data structure and its corresponding key value into the RDMA area; saves each node parameter of the adaptive learning index model into the RDMA area, and the node parameters may include the linear model parameters a and b of the node, the number of its child node pointers and the numbers of all its child nodes; creates a communication callback function, and the output of the callback function contains a data structure, which is used to record the index parameters of the adaptive learning index model, wherein the index parameters include the address of the adaptive learning index model (the position in the RDMA area), the total size of the memory occupied and the total number of nodes.
[0053] By constructing an adaptive learning index model on the server side and processing the data of the adaptive learning index model, the corresponding parameters used by the client to reconstruct the isomorphic adaptive learning index model are obtained and saved.
[0054] Step S2: Based on the index parameters and node parameters of the adaptive learning index model, the client reconstructs the isomorphic adaptive learning index model through the deserialization model.
[0055] For example, after the client and the server are established, an RPC read communication is used to obtain the index parameters of the server's adaptive learning index model to obtain the address of the adaptive learning index model, the total size of the occupied memory, and the total number of nodes; a buffer is created locally on the client, and an RDMA is used to obtain the node parameters of the server's adaptive learning index model (the linear model parameters of the leaf node, the number of pointers of its child nodes, and the numbers of all its child nodes) according to the address of the adaptive learning index model; then, through the deserialization model, a tree data structure is created to reconstruct a complete isomorphic adaptive learning index model.
[0056] Step S3: Reconstruct the address mapping data structure of the leaf nodes of the adaptive learning index model on the server side.
[0057] Step S4: predicting the server-side address corresponding to the user's read / write request key according to the address mapping data structure of the leaf node and the client isomorphic adaptive learning index model, and using RDMA to accelerate the storage of user read / write request key-value pairs.
[0058] Figure 2A structural block diagram of a distributed key-value read and write request based on a homogeneous adaptive learning index according to an embodiment of the present disclosure is shown.
[0059] In one example, when the client processes a user's read operation request, the server address corresponding to the user's read request key is predicted based on the address mapping data structure of the leaf node and the isomorphic adaptive learning index model, and the RDMA method is used to accelerate the user's read / write request key value storage, such as Figure 2 As shown, it may include:
[0060] Step P1: For Figure 2 For the user read request with sequence number 1, the client performs the operation with sequence number 2 and uses the homogeneous adaptive learning index model to predict the position range of the read request key;
[0061] Step P2: Obtain the server-side address of the predicted position range of the read request key according to the address mapping data structure of the leaf node, and obtain the leaf node, leaf node address and model version number V corresponding to the read request key in the homogeneous adaptive learning index model ck ;
[0062] Step P3: When the predicted position range error of the read request key is less than the preset threshold, the client executes operations No. 4 and No. 6, and uses a one-way RDMA method (RDMA read() operation) to pull the key-value pairs within the position range of the read request key, the key-value pairs in the key-value pair cache corresponding to the leaf node, and the model version number V of the leaf node from the server according to the obtained server address. sk ;
[0063] Step P4: When the model version number V of the leaf node ck The model version number V of the leaf node service on the server side sk If the leaf node is equal, the client searches for the value of the read request key in the key-value pair pulled locally from the server; otherwise, the leaf node address pulls the latest leaf node model from the server, updates the client's isomorphic adaptive learning index model, and jumps to step P3;
[0064] Step P5: When the predicted position range error of the read request key is greater than the preset threshold, the client executes operations 5 and 7, and uses a bidirectional RDMA method (RDMA send() and recv() operations) to send the read request key to the server, and uses the adaptive learning index model on the server to obtain the value corresponding to the read request key, and returns the read request key-value pair to the client for storage, thereby realizing the storage of the read request key-value pair.
[0065] In one example, when the client processes a user's write operation request, the server address corresponding to the user's write request key is predicted based on the address mapping data structure of the leaf node and the isomorphic adaptive learning index model, and the RDMA method is used to accelerate the user's read / write request key value storage, such as Figure 2 As shown, it may include:
[0066] Step L1: For the user write request of sequence number 8, the client performs the operation of sequence number 9 and uses the homogeneous adaptive learning index model to predict the location range of the write request key;
[0067] Step L2: Obtain the leaf node corresponding to the write request key, the address of the leaf node and the model version number V according to the leaf node address mapping data structure and the predicted position range of the write request key ck ;
[0068] Step L3: The client executes operations 11 and 12, and uses a bidirectional RDMA method (RDMA send() and recv() operations) to write the leaf node corresponding to the request key value, the leaf node address and the model version number V ck Sent to the server; the server executes operations 13 and 14, and obtains the model version number V of the leaf node on the server side based on the server's adaptive learning index model sk , and the server determines the client model version number V of the leaf node ck The model version number V on the leaf node server sk whether they are equal;
[0069] Step L4: When the client model version number of the leaf node is V ck The model version number V of the leaf node service on the server side sk If the capacity of the leaf node is equal, the server executes operation No. 15 to determine whether the key-value cache corresponding to the leaf node is full. When the capacity of the leaf node on the server is not full, the write request key-value pair is stored in the key-value cache corresponding to the leaf node. Otherwise, the server executes operation No. 16 to insert the write request key value into the actual position re-predicted by the adaptive learning index model on the server, adjust and train the adaptive learning index model according to the expansion and splitting of the leaf node, and increase the model version number of the leaf node by 1, so as to realize the write operation key-value pair in the key-value cache corresponding to the leaf node of the adaptive learning index model on the server.
[0070] Application Examples
[0071] Figure 3 The hardware and software architecture diagram of a distributed key-value storage system based on homogeneous adaptive learning index according to an embodiment of the present disclosure is shown; Figure 4A schematic diagram of a distributed key-value read and write request based on a homogeneous adaptive learning index according to an embodiment of the present disclosure is shown.
[0072] Figure 3 The diagram shows the system hardware and software architecture provided by the present invention. The system hardware architecture is based on the traditional client-server architecture, in which the server stores a key-value pair database, and the client interacts with the server through hybrid RDMA operations to perform read and write requests. The system software architecture adopts an adaptive learning index model, supports processing static read requests and dynamic write operations, and the model structure is adaptively adjusted and trained according to the written data. Unlike traditional methods, the present invention maintains an isomorphic adaptive learning model on the server and client, and is the latest design that completely replaces traditional index structures (such as B+ trees).
[0073] like Figure 4 As shown in the figure, the key-value pair inserted by the user write request may cause the leaf node model of the adaptive learning index to expand or split, which will destroy the accuracy of the leaf node model prediction and lead to the retraining of the leaf node model. For the expanded or split leaf nodes, since the corresponding address mapping determines the correctness of the key-value pairs pulled by the client from the server, the client's write requests A and B respectively cause a leaf node model of the adaptive learning index model in the server to expand and split. The adjustment of the address mapping after retraining and the impact on other leaf node read requests are analyzed, as shown in the figure. Figure 4 As shown in the client's read request C. For write request A, Figure 2 The position range corresponding to the key predicted in step 9 in is within leaf node 0. According to the address mapping data structure, the client can obtain the actual address of the leaf node in the server as 1000. Assuming that the leaf model is expanded, the server reallocates a larger memory and re-updates the first address 5832 of the area to the address mapping data structure, and the version number of leaf node 0 is updated. Similarly, for write request B, the write operation causes the model split of leaf node 2 in the server, then leaf node 2 becomes an internal node, and the two new leaf nodes 2 and 3 are respectively allocated the first addresses of the new memory area as 8240 and 8648, and all the key-value pairs of the original leaf node 2 are evenly distributed to the two new leaf nodes in the order of the keys. For read request C, although the predicted node is 3 in the client, and the server changes the number of the leaf node to 4 after retraining, their actual address has not changed and is still 4224. Therefore, even if write requests A and B cause the adjustment of the adaptive learning index model structure on the server, this does not affect the correctness of the predicted read and write requests on other leaf nodes.
[0074] Figure 5 A principle block diagram of a distributed key-value storage device based on homogeneous adaptive learning index according to an embodiment of the present disclosure is shown.
[0075] According to another aspect of the present disclosure, a distributed key-value storage device based on homogeneous adaptive learning index is proposed, and the device 40 includes:
[0076] A parameter acquisition unit 41 is used to acquire index parameters and node parameters of the adaptive learning index model on the server side;
[0077] A homogeneous adaptive learning index model creation unit 42, configured to create a homogeneous adaptive learning index model through a de-sequence model based on index parameters and node parameters of the adaptive learning index model;
[0078] The leaf node address mapping data structure reconstruction unit 43 is used to reconstruct the leaf node address mapping data structure of the adaptive learning index model on the server side;
[0079] The read / write request key value processing unit 44 is used to predict the server-side address corresponding to the user's read / write request key based on the address mapping data structure of the leaf node and the client isomorphic adaptive learning index model, and use RDMA to accelerate the user's read / write request key value storage.
[0080] The distributed key-value storage method and device based on isomorphic adaptive learning index of the present invention adopts isomorphic adaptive learning index on the client and server to support the processing of static read requests and dynamic write requests, and adopts hybrid RDMA operation to effectively reduce the server CPU pressure without increasing the communication cost, and meet the requirements of small system space occupation, high throughput and low latency. Among them, since the storage of key-value pairs on the server side is inserted according to the prediction of the adaptive learning index model, the index client and server maintain isomorphic adaptive learning index, which can improve the accuracy of the prediction of client read and write requests; since the communication volume between the client and the server affects the throughput of the system, the isomorphic optimization design and the proposed hybrid RDMA operation can further improve the throughput of the system; since the update frequency of the adaptive learning index model will also affect the performance of the system, the leaf node version control and leaf node key-value pair cache used in the present invention can avoid frequent pulling of the entire model and retraining; at the same time, the present invention attempts to maximize the use of the CPU computing power of the client. When the server is in contention, the server CPU quickly becomes the bottleneck of the system. In order to ensure the robustness of the system, the client fully utilizes the CPU of the client to maximize the support of the prediction of the client's read and write requests.
[0081] Although the embodiments disclosed in the present invention are as above, the above contents are only embodiments adopted for facilitating the understanding of the present invention and are not intended to limit the present invention. Any technician in the technical field to which the present invention belongs can make any modifications and changes in the form and details of the implementation without departing from the spirit and scope disclosed in the present invention, but the patent protection scope of the present invention shall still be subject to the scope defined in the attached claims.
Claims
1. A distributed key-value storage method based on homogeneous adaptive learning index, characterized in that: The method comprises: The client obtains the index parameters and node parameters of the adaptive learning index model on the server; The adaptive learning index model is obtained by adaptively adjusting the structure of the machine learning index model based on the capacity of the leaf nodes of the machine learning index model and the predicted position of the key value; the machine learning index model is a tree structure model and a recursive model index structure, only the leaf node model can directly access the key-value pair, and the internal node model determines the search path from the root node to the leaf node; The index parameters include the address, memory size and total number of nodes of the adaptive learning index model; The node parameters include the linear model parameters of each node, the number of pointers of its child nodes and the number of its child nodes; The address mapping data structure of the leaf node includes the leaf node number, model version number, data capacity, actual location of the key-value pair and the corresponding key-value pair cache address; Based on the index parameters and node parameters of the adaptive learning index model, the client reconstructs the isomorphic adaptive learning index model through the deserialization model; Reconstructing the address mapping data structure of the leaf nodes of the adaptive learning index model on the server side; The client predicts the server address corresponding to the user's read request key according to the address mapping data structure of the leaf node and the isomorphic adaptive learning index model, and accelerates the storage of the user's read request key-value pair using RDMA; Predicting the server-side address corresponding to the user's read request key according to the address mapping data structure of the leaf node and the isomorphic adaptive learning index model, and accelerating the user's read request key value storage in an RDMA manner, including: The client predicts the location range of the read request key using the isomorphic adaptive learning index model; Obtaining the server-side address of the predicted position range of the read request key according to the address mapping data structure of the leaf node, and obtaining the leaf node, leaf node address and model version number Vck corresponding to the read request key in the homogeneous adaptive learning index model; When the predicted position range error of the read request key is less than a preset threshold, the client uses a one-way RDMA method to pull the key-value pairs within the position range of the read request key, the key-value pairs in the key-value pair cache corresponding to the leaf node, and the model version number Vsk of the leaf node from the server according to the acquired server address; When the model version number Vck of the leaf node is equal to the model version number Vsk of the leaf node on the server side, the client searches for the value of the read request key in the key-value pair pulled locally from the server; otherwise, the latest leaf node model is pulled from the server according to the leaf node address, and the isomorphic adaptive learning index model of the client is updated; When the predicted position range error of the read request key is greater than a preset threshold, the client sends the read request key to the server using a bidirectional RDMA method, obtains the read request key value using an adaptive learning index model on the server side, and then sends the value to the client.
2. The key-value pair storage method according to claim 1, characterized in that: Before the client obtains the index parameters and node parameters of the adaptive learning index model on the server, the method further includes constructing an adaptive learning index model on the server; The constructing of the server-side adaptive learning index model includes: using a machine learning index model to predict the position of a key value, and dynamically constructing the machine learning index model according to the predicted position of the key value; The index model structure is adaptively adjusted based on the capacity of the leaf nodes of the index model and the predicted position of the key value to obtain an adaptive learning index model.
3. The key-value pair storage method according to claim 1, characterized in that: The client predicts the server address corresponding to the user's write request key according to the address mapping data structure of the leaf node and the isomorphic adaptive learning index model, and accelerates the storage of the user's write request key-value pair using RDMA; Among them, predicting the server-side address corresponding to the user's write request key according to the address mapping data structure of the leaf node and the isomorphic adaptive learning index model, and accelerating the user's write request key value in an RDMA manner, including: The client uses the isomorphic adaptive learning index model to predict the location range of the write request key; Acquire the leaf node corresponding to the write request key, and the address and model version number Vck of the leaf node according to the address mapping data structure of the leaf node and the predicted position range of the write request key; The write request key-value pair, the address of the leaf node and the model version number Vck are sent to the server by using a bidirectional RDMA method, and the model version number Vsk of the leaf node on the server side is obtained based on the adaptive learning index model of the server; When the model version number Vck of the leaf node client is equal to the model version number Vsk of the leaf node server, and the capacity of the leaf node on the server is not full, the write request key-value pair is written into the key-value pair cache of the leaf node; otherwise, the write request key value is inserted into the actual position re-predicted according to the adaptive learning index model on the server, and the adaptive learning index model is adjusted and the version number of the leaf node is increased by 1.
4. The key-value pair storage method according to claim 1, characterized in that: The adaptively adjusting the index model based on the capacity of the leaf nodes of the index model and the predicted position of the key-value pair to obtain an adaptive learning index model includes: When the capacity of the leaf nodes of the index model is full, if the key value prediction position is correct, the capacity of the leaf nodes of the index model is expanded; if the key value prediction position is incorrect, the leaf nodes of the index model are split; the adaptive learning index model is obtained by adaptively adjusting the expansion and splitting of the leaf nodes of the index model.
5. The key-value pair storage method according to claim 3, characterized in that: The index parameters and node parameters of the adaptive learning index model, the address mapping data structure of the leaf node and the key-value pairs corresponding thereto are saved in the RDMA area, where the RDMA area is the memory allocated by the server for RDMA read / write operations.
6. A key-value pair storage device based on a homogeneous adaptive learning index model, characterized in that: The device comprises: A parameter acquisition unit, which is used by the client to acquire index parameters and node parameters of the adaptive learning index model on the server side; The adaptive learning index model is obtained by adaptively adjusting the structure of the machine learning index model based on the capacity of the leaf nodes of the machine learning index model and the predicted position of the key value; the machine learning index model is a tree structure model and a recursive model index structure, only the leaf node model can directly access the key-value pair, and the internal node model determines the search path from the root node to the leaf node; The index parameters include the address, memory size and total number of nodes of the adaptive learning index model; The node parameters include the linear model parameters of each node, the number of pointers of its child nodes and the number of its child nodes; The address mapping data structure of the leaf node includes the leaf node number, model version number, data capacity, actual location of the key-value pair and the corresponding key-value pair cache address; A homogeneous adaptive learning index model creation unit, the client is used to create a homogeneous adaptive learning index model through a deserialization model based on the index parameters and node parameters of the adaptive learning index model; A leaf node address mapping data structure reconstruction unit, the client is used to reconstruct the leaf node address mapping data structure of the adaptive learning index model of the server; A read request key value processing unit, the client is used to predict the server-side address corresponding to the user's read request key according to the address mapping data structure of the leaf node and the isomorphic adaptive learning index model, and accelerate the user's read request key value storage by using RDMA; Predicting the server-side address corresponding to the user's read request key according to the address mapping data structure of the leaf node and the isomorphic adaptive learning index model, and accelerating the user's read request key value storage in an RDMA manner, including: The client predicts the location range of the read request key using the isomorphic adaptive learning index model; Obtaining the server-side address of the predicted position range of the read request key according to the address mapping data structure of the leaf node, and obtaining the leaf node, leaf node address and model version number Vck corresponding to the read request key in the homogeneous adaptive learning index model; When the predicted position range error of the read request key is less than a preset threshold, the client uses a one-way RDMA method to pull the key-value pairs within the position range of the read request key, the key-value pairs in the key-value pair cache corresponding to the leaf node, and the model version number Vsk of the leaf node from the server according to the acquired server address; When the model version number Vck of the leaf node is equal to the model version number Vsk of the leaf node on the server side, the client searches for the value of the read request key in the key-value pair pulled locally from the server; otherwise, the latest leaf node model is pulled from the server according to the leaf node address, and the isomorphic adaptive learning index model of the client is updated; When the predicted position range error of the read request key is greater than a preset threshold, the client sends the read request key to the server using a bidirectional RDMA method, obtains the read request key value using an adaptive learning index model on the server side, and then sends the value to the client.
7. The key-value pair storage device according to claim 6, characterized in that: The client predicts the server address corresponding to the user's write request key according to the address mapping data structure of the leaf node and the isomorphic adaptive learning index model, and accelerates the storage of the user's write request key-value pair using RDMA; Among them, predicting the server-side address corresponding to the user's write request key according to the address mapping data structure of the leaf node and the isomorphic adaptive learning index model, and accelerating the user's write request key value in an RDMA manner, including: The client uses the isomorphic adaptive learning index model to predict the location range of the write request key; Acquire the leaf node corresponding to the write request key, and the address and model version number Vck of the leaf node according to the address mapping data structure of the leaf node and the predicted position range of the write request key; The write request key-value pair, the address of the leaf node and the model version number Vck are sent to the server by using a bidirectional RDMA method, and the model version number Vsk of the leaf node on the server side is obtained based on the adaptive learning index model of the server; When the model version number Vck of the leaf node client is equal to the model version number Vsk of the leaf node server, and the capacity of the leaf node on the server is not full, the write request key-value pair is written into the key-value pair cache of the leaf node; otherwise, the write request key value is inserted into the actual position re-predicted according to the adaptive learning index model on the server, and the adaptive learning index model is adjusted and the version number of the leaf node is increased by 1.
