Data processing method, device, equipment, system and readable storage medium
Through the combination of the prediction model and the mapping table, the memory overhead problem of the learning index when inserting data is solved, the logical order maintenance of the disordered data discharge is realized, and the performance of the storage system is improved.
Patent Information
- Application Number
- CN202310190073.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-21
- Publication Date
- 2024-08-23
AI Technical Summary
When inserting data, the learning index requires data to be arranged in an orderly manner, which results in large memory overhead and affects the performance of the storage system.
The prediction model is used to predict the logical structural units corresponding to the data identifiers, and the logical order of the data in the memory is maintained through the mapping table, allowing data to be discharged out of order, thereby reducing data movement and memory performance overhead.
It effectively reduces the memory performance overhead during data insertion, improves the performance of the storage system, avoids large amounts of data movement, and achieves high efficiency in operations such as data insertion and deletion.
Smart Images

Figure CN118535076A
Abstract
Description
Technical Field
[0001] The present application relates to the field of storage, and in particular to a data processing method, device, equipment, system and readable storage medium. Background Art
[0002] Learned Index is a technology that uses machine learning models (such as linear regression and neural networks) to accelerate index lookups in data storage systems. Specifically, after the data identifier to be queried is input into the model, the model directly predicts the data storage location corresponding to the data identifier.
[0003] However, learning indexes requires that data be arranged in order, that is, the storage location of data in the memory is ordered. If new data needs to be inserted into the ordered data when writing data, a large amount of data needs to be moved to insert the new data into the memory in the order of arrangement, resulting in large memory overhead (for example, computing overhead, input / output (I / O) overhead). Summary of the invention
[0004] The embodiments of the present application provide a data processing method, apparatus, device, system and readable storage medium, which can solve the problem of large memory overhead when inserting data in a learning index storage system, thereby improving the performance of the storage system.
[0005] In a first aspect, a data processing method is provided. The data processing method comprises: using a prediction model to predict a logical structure unit corresponding to a data identifier, that is, a logical structure unit to which the data corresponding to the data identifier belongs, then querying a storage space storing the logical structure unit in a mapping table, and then reading the data corresponding to the data identifier from the storage space of the logical structure unit. The logical structure unit is used to represent a logical relationship between data. The mapping table comprises at least one mapping entry, each mapping entry being used to indicate a storage space in a memory corresponding to the data of the logical structure unit. The arrangement order of at least one mapping entry is different from the storage order of the data corresponding to the at least one logical structure unit in the memory.
[0006] Based on this data processing method, compared with the prior art that uses a learning index model to directly predict the location of the corresponding data in the memory according to data identifiers such as keys, this embodiment uses a prediction model to predict the logical structure unit corresponding to the data identifier, and then uses a mapping table to determine the storage location of the data corresponding to the logical structure unit in the memory, so as to use the mapping table to maintain the logical order of the data in the memory. In this way, the arrangement order of the mapping entries in the mapping table and the storage order of the data in the memory are decoupled, and even if the data is arranged in a disordered order in the memory, the logical order of the data can be determined based on the mapping table, thereby providing a logical relationship between the data for data operations such as insertion and deletion, avoiding a large amount of data movement in order to maintain the data arrangement order in the memory when writing new data, etc., reducing the memory performance overhead caused by data movement, thereby improving the performance of the storage system.
[0007] In some possible implementations, the execution subject of the data processing method may be a service node in a distributed system, such as a computing node and a storage node. The computing node receives a user operation request sent by a client, such as a data query request, predicts the logical structure unit corresponding to the data identifier in the data query request using a prediction model, queries the storage space storing the logical structure unit in the mapping table, and finally reads the data corresponding to the data identifier from the storage node based on the storage space of the logical structure unit.
[0008] Optionally, the computing node and storage node may be two independent nodes in a distributed system, or may be the same node in a distributed system, such as a storage node having both computing and storage functions.
[0009] In one possible implementation, the prediction model is a machine learning model for predicting the location of data based on the data identifier.
[0010] In a possible implementation, data corresponding to at least one logical structure unit is stored in at least one data block in a memory in a specified order, and the specified order is the order of data from low to high or from high to low. The storage order of the data blocks corresponding to the logical structure units in the memory may be different from the arrangement order of the mapping entries corresponding to the logical structure units in the mapping table, but the data in the data blocks corresponding to each logical structure unit are arranged in the specified order. In this way, while the logical structure and the data structure of the data are decoupled, it is helpful to improve the speed of querying specific data in the data block.
[0011] In a possible implementation, the data processing method further includes an insertion step, that is, when the storage space of the data blocks corresponding to the data to be inserted in the specified order is insufficient, a new data block is added after the last data block of at least one data block in the storage structure of all data, the data to be inserted is stored in the new data block, and then the logical structure unit corresponding to the new data block is inserted into the mapping table in the specified order. In this way, the logical structure of the data is indicated by the arrangement order of the mapping entries in the mapping table, and the storage order of different data blocks in the memory does not need to completely correspond to the arrangement order of the corresponding mapping entries. When inserting new data, it is only necessary to add a new data block at the end of the storage structure, avoiding inserting the data to be inserted into the data block in a fixed order and then shifting the subsequent data blocks as a whole, thereby reducing the memory performance overhead caused by data movement.
[0012] Optionally, after the data to be inserted is stored in the newly added data block, at least one data adjacent to the data to be inserted may be moved to the newly added data block in a specified order, thereby ensuring the balance of data storage.
[0013] In some possible implementations, data is stored in a multi-layer structure, such as segmented storage, etc., and logical structure units at different levels can use separate prediction models to predict the logical structure units at the next level to which the data belongs, and different logical structure units at the same level can also use independent prediction models. In this way, when a certain logical structure unit is modified, only the corresponding single prediction model needs to be adjusted, avoiding the need to retrain the entire prediction model due to the modification of a certain logical structure unit, thereby improving the efficiency of model construction and query.
[0014] For example, the prediction model includes a segment prediction model, the data identifier is the key, the logical structure unit is the segment, and the data corresponding to the data identifier is the segment metadata. The prediction model is used to predict the logical structure unit corresponding to the data identifier. The segment prediction model obtains the predicted segment according to the input key. The predicted segment has an error range. The pivot array is used to correct the predicted segment within the error range of the predicted segment to determine the segment corresponding to the key.
[0015] The pivot array includes the minimum key of each segment, and the keys in the pivot array are arranged in a specified order. In this way, the data volume of the pivot array is reduced, and the consumption of storage space is reduced.
[0016] For another example, each segment includes at least one data block, the prediction model also includes a block prediction model, the data identifier is the key, the logical structure unit is the data block, and the data corresponding to the data identifier is the object value of the key. The block prediction model obtains a prediction block according to the input key, and the prediction block has an error range. A sentinel array is used to correct the prediction block within the error range of the prediction block to determine the data block corresponding to the key.
[0017] The sentinel array includes multiple sentinel keys, each of which is the output of the block prediction model for the minimum key in the data block, has a smaller data volume and retains the order relationship of the keys.
[0018] By performing error correction based on the pivot array and sentinel array, the overall data volume of error correction information is reduced, and error correction by reading data from a memory is avoided, thereby reducing the consumption of memory resources and I / O of the memory.
[0019] In a possible implementation, in the data processing method, the complex identification code in the data identification is converted into a high-precision integer for operation, and the complex identification code includes a character string. In this way, in a scenario involving input / output of a memory, the calculation overhead of the high-precision integer is relatively small, thereby reducing the calculation overhead.
[0020] In a possible implementation, in the data processing method, the encoding range of the character identifier is narrowed according to the data distribution range of the character identifier in the data identifier, and the size of the encoding range is the same as the size of the data distribution range. In this way, the encoding based on the character table converts the character identifier into an integer with a more uniform distribution, which is conducive to improving the accuracy of model training.
[0021] In a second aspect, a data processing device is provided, the device comprising modules for executing the data processing method in the first aspect or any possible implementation manner of the first aspect.
[0022] It should be noted that the data processing device described in the third aspect can be a terminal device or a network device, or it can be a chip (system) or other parts or components that can be set in the terminal device or the network device, or it can be a device that includes a terminal device or a network device, and this application does not limit this.
[0023] In a third aspect, a computing device is provided, comprising a memory and a processor, wherein the memory is used to store a set of computer instructions, and when the processor executes the set of computer instructions, it is used to execute the operating steps of the data processing method in any possible design in the first aspect.
[0024] In a fourth aspect, a computer system is provided, comprising a computing node and a storage node, wherein the computing node is used to execute the operating steps of the data processing method in any possible design in the first aspect above to read the data corresponding to the data identifier from the storage node.
[0025] In addition, the technical effects of the data processing apparatus described in the second aspect, the computing device described in the third aspect, and the computer system described in the fourth aspect can refer to the technical effects of the data processing method described in the first aspect, and will not be repeated here.
[0026] In a fifth aspect, a computer-readable storage medium is provided, comprising: computer software instructions; when the computer software instructions are executed in a computer, the computer executes the operating steps of the method described in any possible implementation manner in the first aspect.
[0027] In a sixth aspect, a computer program product is provided. When the computer program product is run on a computer, the computer is caused to execute the operation steps of the method described in any possible implementation manner of the first aspect.
[0028] Based on the implementations provided in the above aspects, this application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a query principle diagram of B+ tree index in the prior art;
[0030] Figure 2 A query principle diagram of a learning index in the prior art;
[0031] Figure 3 A schematic diagram of the structure of a computer system provided for this application;
[0032] Figure 4 A schematic diagram of the hierarchical structure of a cloud platform provided for this application;
[0033] Figure 5 A flowchart of a data processing method provided in this application;
[0034] Figure 6 A schematic diagram of a mapping table provided for this application;
[0035] Figure 7 A schematic diagram of the module structure of a service node provided for this application;
[0036] Figure 8 A schematic diagram of the structure of a sentinel array provided for this application;
[0037] Fig. 9 A schematic diagram of a flow chart of a segmented query step provided for this application;
[0038] Fig.10 A flowchart of a data insertion step provided in this application;
[0039] Fig.11 A schematic diagram of the structure of a data processing device provided in this application;
[0040] Fig.12 A schematic diagram of the structure of a computing device and system provided in this application. DETAILED DESCRIPTION
[0041] To facilitate understanding, the relevant terms involved in the embodiments of the present application are first introduced below.
[0042] (1) Key-value storage system
[0043] A key-value store system, also known as a key-value database, is a non-relational database. Key-value stores store data in the form of key-value pairs, where the key is used as an index for the element and the value represents the data stored and read, i.e., each unique identifier is stored as a key with an associated value. In a key-value pair, the key is unique, and the value associated with the key can be accessed through the key. The key can be a plain text or a hash value. The value in a key-value pair can be a string, a list, an object, etc. In a key-value store, values are usually treated as opaque objects. For example, if the key is "145" and the value corresponding to the key is "bob", then "bob" can be read based on "145" in the key-value database.
[0044] The key-value storage system can use a single server for key-value storage, that is, the key-value pairs are stored in a hash table. According to the hash table, all key-value operations (also called key-value storage operations) can be performed in a single server. Among them, the hash table is actually called a hash table, which is a data structure. The hash table is essentially an array, but the array stores a single data, and in the key-value storage system, the hash table is used to store key-value pairs. In the key-value storage system, the hash function is used to get the index of the array corresponding to the key, and then the key-value operation is performed on the value at the index position. Key-value operations include operations such as read (Get(key)), associate (Put(key,value)), insert (Insert(key,value)) and delete (Insert(key)).
[0045] Since the amount of data stored in key-value storage usually exceeds the storage capacity of a single machine, the general key-value storage system will divide the data set, and each storage server maintains one of the data shards, that is, a distributed key-value storage system, such as etcd. A distributed key-value storage system can include clients, master nodes, and slave nodes. The client is used to communicate with the master node or slave node to perform key-value operations such as reading and writing. The master node accepts read and update operations (such as inserting and deleting in key-value operations) from the client and spreads the updated data to other nodes. The slave node is used to receive update operations from the master node and read-only operations from the client. In addition, both the master node and the slave node are equipped with independent persistence components to persist the data on the node.
[0046] (2) B+ Tree Index
[0047] B+Tree index is an implementation of B+Tree in database, that is, using B+Tree structure to store index. B+Tree is a tree data structure, usually used in database and operating system file systems. The characteristic of B+Tree is that it can keep data stable and orderly, and its insertion and modification have relatively stable logarithmic time complexity.
[0048] B+ tree is a variation of B tree. Leaf nodes on B+ tree store keywords and addresses of corresponding records, and layers above leaf nodes are used as indexes. An m-order B+ tree is defined as follows: each node has at most m child nodes; except for the root node, each node has at least [m / 2] child nodes, and the root node has at least two child nodes; a node with k children must have k keywords. Nodes in a B+ tree are usually represented as a set of ordered elements and child pointers. The search of B+ tree is different from that of B tree. When the keyword of a node in the index part is equal to the keyword to be searched, the search does not stop, but should continue to go down along the pointer to the left of this keyword until the leaf node where the keyword is located is found.
[0049] like Figure 1 As shown in Figure 1, the key-value storage system of the B+ tree index queries the node corresponding to the key in the B+ tree index to determine the location of the data corresponding to the key. However, the space overhead of the B+ tree index in the persistent database is large, and the larger the amount of data, the more additional I / O overhead will be generated when accessing the index, which will affect the performance of the key-value storage system.
[0050] (3) Machine Learning Model
[0051] A machine learning (ML) model is an expression of an algorithm that combs through large amounts of data to find patterns or make predictions. Specifically, a model is trained with a set of data, which provides the model with an algorithm that the model uses to learn and reason about the data. Once the model is trained, it can be used to reason about data that was not used during training and make predictions about that data.
[0052] Machine learning models include linear regression models, graphical models, decision tree models, deep learning neural network models, etc.
[0053] (4) Learning Index
[0054] Learned Index demonstrates a new method of combining machine learning models with index structures, which can achieve efficient index access and reduce index size. In memory scenarios, learned index has up to 3 times the performance of B+ tree, and the index space occupied can be reduced to 1% of B+ tree. Specifically, given an ordered key-value pair, the machine learning model will use<key,pos> Training is performed to learn the location of each key in the index. Considering that the model may have errors, the learning index also records the minimum error min_err and the maximum error max_err. Figure 2 As shown in the figure, during the query execution, the trained model first predicts the key position, and then a range [pos+min_err, pos+max_err] is obtained based on the minimum error and maximum error. Finally, a simple search (such as binary search, exponential search, etc.) is performed within the error range to find the target data.
[0055] The error of the model is a key factor affecting the search efficiency. Excessive model error will cause the binary search time to increase. Therefore, the learning index also proposed a hierarchical model structure, called Recursive Model Indexes (RMI). The recursive model index is a hierarchical model that determines which model to use in the next layer through the model of the previous layer, and the model at the bottom layer is used to predict the location of the key. Since each sub-model is only responsible for a small part of the data, RMI can effectively improve the accuracy of the model. In the scenario where massive data is stored on the hard disk, the learning index is also expected to become a substitute for the B+ tree index. Ideally, the model is used instead of the intermediate node of the B+ tree, so that part of the index can be completely cached in memory, and the index part does not require additional I / O operations, which can greatly improve the performance of the index.
[0056] However, learning indexes requires that data be arranged in order, that is, the storage location of data is ordered in the memory. If new data needs to be inserted into the ordered data when writing data, a large amount of data needs to be moved to keep the new data and the old data in the memory in the original order, which brings a large overhead (such as computing overhead and I / O overhead) in the persistent storage device.
[0057] The present application provides a data processing method, in particular, a data processing method that uses a mapping table to indicate the logical order of data, that is, using a prediction model to predict the logical structure unit corresponding to the data identifier, that is, the logical structure unit to which the data corresponding to the data identifier belongs, and then querying the storage space storing the logical structure unit in the mapping table that uses the arrangement order of mapping entries to indicate the logical order between data, and then reading the data corresponding to the data identifier from the storage space of the logical structure unit. Among them, the logical structure unit is used to represent the logical relationship between data, and the arrangement order of at least one mapping entry is different from the storage order of the data corresponding to at least one logical structure unit in the memory. In this way, compared with the prior art in which the output of the learning index model is the physical address of the data in the memory corresponding to the data identifier such as the key, the prediction model in this embodiment outputs the logical structure unit corresponding to the data identifier, and a mapping table is added to determine the position of the data in the memory according to the logical structure unit, and the arrangement order of the mapping entries and the storage order of the data in the memory are decoupled, and the decoupling of the arrangement order of the data in the memory and the specified order is also achieved. Even if the data is arranged in disorder in the memory, the logical order of the data can be determined based on the mapping table, thereby providing a logical relationship between data for data operations such as insertion and deletion, avoiding a large amount of data movement in order to maintain the data arrangement order in the memory when writing new data and other operations, reducing the memory performance overhead caused by data movement, thereby improving the performance of the storage system.
[0058] The implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0059] Figure 3 A schematic diagram of the structure of a computer system provided in this application. Figure 3 As shown, the computer system 300 includes a server and a client 340. The server is used to provide services to the client 340 through the network. The number and type of the server are related to the services that the client 340 needs to provide, such as data read / write services. Taking the computer system 300 including a cloud platform as an example, the server in the computer system 300, that is, the cloud platform, includes a computing server cluster 310, a storage server cluster 320, and a network device cluster 330. Among them, the computing server cluster 310 and the storage server cluster 320 communicate with the client 340 through the network device cluster 330 respectively.
[0060] The computing server cluster 310 includes one or more computing servers ( Figure 3 Two computing servers, namely computing server 311 and computing server 312, are shown in FIG. 3 , but are not limited to two computing servers).
[0061] The computing server is a computing resource in the computer system 300, such as a server, a desktop computer, etc., and is used to generate and allocate computing resources according to user needs based on virtualization technology. The computing server is used to send a key-value operation request to a storage server in the storage server cluster 320 to obtain the key-value operation result returned by the storage server.
[0062] For example, when performing a read operation, the computing server uses the prediction model to predict the logical structure unit corresponding to the data identifier, and queries the storage space of the logical structure unit in the mapping table, and then sends a read request to the storage server based on the storage space of the logical structure unit to obtain the data corresponding to the data identifier returned by the storage server.
[0063] For example, when performing a read operation, the computing server sends a read request to the storage server. The storage server uses the prediction model to predict the logical structure unit corresponding to the data identifier, queries the storage space of the logical structure unit in the mapping table, and then returns the data corresponding to the data identifier in the storage space to the computing server.
[0064] In a possible embodiment, the computing server interacts with the storage server through remote direct memory access (RDMA), remote procedure call protocol (RPC), etc. to perform key-value operations.
[0065] At the hardware level, the computing server is equipped with processors and memory ( Figure 3 The computing function of the computing server is realized by the processor running the program in the memory. The computing node server can also read / write data in each storage server in the storage server cluster 320 according to user needs, or perform key value operations such as insertion and deletion.
[0066] The storage server cluster 320 includes one or more storage servers ( Figure 3 Two storage servers, storage server 321 and storage server 322, are shown in the figure, but are not limited to two storage servers).
[0067] The storage server is a storage resource in the computer system 300, such as a server, desktop computer or storage array controller, hard disk frame, etc., which is used to provide logical disk storage, unstructured data storage and integrated backup services for the cloud virtual machines in the computer system 300.
[0068] From a hardware perspective, a storage server includes a processor, a network card, and a memory. The processor in the storage server is used to process data from outside the storage server. The network card is used to control the access process to the memory, such as the control of address signals, data signals, and various command signals, so that the storage server can provide the memory as a storage resource to users. The memory is used to store data and may include memory and / or hard disk. Memory refers to internal storage that directly exchanges data with the processor. The memory can read and write data quickly at any time and serves as a temporary data storage for the operating system or other running programs. Unlike memory, the hard disk reads and writes data more slowly than memory and is usually used to store data persistently.
[0069] In one embodiment of the present application, the computing server uses the prediction model to predict the logical structure unit corresponding to the data identifier, and queries the storage space of the logical structure unit in the mapping table. The prediction model, mapping table, pivot array, sentinel array and other data can be stored in the computing server or in the storage server, and the data to be queried is stored in the storage server.
[0070] In another embodiment of the present application, a computing server sends a request to a storage server to instruct the storage server to use a prediction model to predict a logical structure unit corresponding to a data identifier, and to query a storage space of the logical structure unit in a mapping table. The prediction model, the mapping table, the pivot array, the sentinel array, and the data to be queried are stored in the storage server.
[0071] In another embodiment, the prediction model, mapping table, pivot array and sentinel array may be partially stored in a computing server and may also be partially stored in a storage server. This application does not limit the storage location.
[0072] In addition to the computing server cluster 310 and the storage server cluster 320, the computer system 300 may also include a management server cluster ( Figure 3 The management server cluster includes one or more management servers, which are used to manage all computing services, shared storage, and networks of the entire computer system 300, and provide users or administrators with an application program interface (API) for managing the entire node.
[0073] The network device cluster 330 includes one or more switches and routers, such as Figure 3 As shown, the network device cluster 330 in this embodiment includes a router 331, a switch 332, a switch 333 and a switch 334. Among them, the client 340 is connected to the router 331 through the Internet, the router 331 is connected to the switch 333 through the switch 332, and the switch 333 is connected to each computing server in the computing server cluster 310. The switch 334 is respectively connected to each computing server in the computing server cluster 310 and each storage server in the storage server cluster 320.
[0074] Optionally, the number and type of switches included in the network device cluster 330 can be adjusted according to the needs of the computer system 300, and the switch 332, the switch 333, and the switch 334 can be switches with different functions, for example, the switch 332 is a core switch, and the switch 333 and the switch 334 are switches for managing a specific network segment. For example, the switch 332 can be a core switch, the switch 333 can be an internal and external switching network segment switch, and the switch 334 can be a storage network segment switch.
[0075] Client 340 includes one or more clients ( Figure 3 Two clients, namely client 341 and client 342, are shown in the figure, but are not limited to two clients. The client includes interfaces and applications required for accessing the computer system 300, such as interfaces for key-value operations.
[0076] The client 340 is used to send a user operation request to the computing server cluster 310, so that the computing server in the computing server cluster 310 sends a key-value operation request, such as a read request, to the storage server cluster 320 according to the user operation request. Optionally, the client 340 can send the user operation request to the computing server in the computing server cluster 310 according to the principle of geographical proximity. The computing server that receives the user operation request is called the coordinator of the client to coordinate and schedule the transaction, i.e., one or more tasks of the key-value operation.
[0077] It is worth noting that Figure 3 This is only a schematic diagram and should not be construed as limiting the present application. The computer system 300 may also include other devices. Figure 3 In addition, the storage server and computing server in the computer system 300 may also be the same device or different devices, for example, the computing server 311 and the storage server 321 are arranged in the same server device, the computing resources of the server device are provided to the computing server 311, and the storage resources are provided to the storage server 321.
[0078] The computing servers, storage servers, etc. in the computer system 300 provided in this application may be nodes in a cloud platform. Figure 3 On the basis of the equipment of the computer system 300 shown, the computer system 300 implements the functions of nodes such as computing nodes and storage nodes based on IaaS, PssS and SaaS, and provides services (such as computing services, storage services and network services, etc.) to the client 340 through the node. The node can be a service node (such as computing nodes and storage nodes, etc.) in the cloud obtained by virtualizing the resources (such as computing resources and storage resources, etc.) of the computer system 300. For example, the computing server in the computer system 300 is virtualized as a computing node in the cloud platform, and the storage node is virtualized as a storage node in the cloud platform. In this case, the node and the server can be regarded as equivalent in this application. For another example, the computing server and storage server in the computer system 300 are virtualized as a service node in the cloud platform, and the service node has the functions of a computing node and a storage node.
[0079] Next, combine Figure 4 The computer system 300 is described as a hierarchical structure of a cloud platform.
[0080] like Figure 4 As shown, the IaaS platform 410 is used to virtualize all infrastructure resources in the computer system 300, and provide virtual resources (e.g., computing resources, network resources, and storage resources) to users in a software-defined manner. The infrastructure resources refer to the resources provided by the computing server cluster 310, the storage server cluster 320, and / or the network device cluster 330 in the computer system 300.
[0081] The PaaS platform 420 is used to implement the runtime environment and application support functions of the computer system 300, so users can apply for computing units within the quota instead of virtual resources to run their own services. Optionally, the computing unit can be a container, and the computer system 300 deploys and runs the user's code by scheduling the container. It should be noted that the number of containers in the PaaS platform 420 can be one or more. Figure 4 Only one container is used as an example.
[0082] As a possible implementation, the computer system 300 may inject one or more components into the container to implement code deployment and operation. Optionally, the resources (computing resources or storage resources) used by multiple components in the same container may belong to the same hardware device (such as a computing server or a storage server) in the computer system 300, or may belong to different hardware devices.
[0083] Among them, the components may include database components, message queue components, orchestration components, log components, virtualization components, business database components, configuration database components, permission management components, etc.
[0084] The SaaS application 430 is used to provide services to users by composing user-deployed applications in the form of API responses based on the IaaS platform 410 and the PaaS platform 420. The application and container of the SaaS application 430 can communicate through a web server.
[0085] It is worth noting that Figure 4 This is only a schematic diagram and should not be construed as limiting the present application. The hierarchical structure of the computer system 300 may also include other modules. Figure 4 Not drawn in.
[0086] Next, the data processing method provided by this embodiment is described in detail with reference to the accompanying drawings.
[0087] The steps of the data processing method provided in this embodiment are performed by the service node provided by the computer system 300. Figure 5 , taking the reading operation as an example, the data processing method provided in the embodiment of the present application is explained.
[0088] Step 510: The client 340 sends a user operation request to the service node.
[0089] The user operation request may be a data query request, which is used to instruct the service node to perform a read key-value operation.
[0090] Step 520: The service node uses the prediction model to predict the logical structure unit corresponding to the data identifier of the user operation request.
[0091] The service node inputs the data identifier of the data to be queried included in the user operation request into the prediction model to obtain the logical structure unit output by the prediction model, wherein the prediction model is a machine learning model used to predict the location of the data according to the data identifier.
[0092] As a possible implementation method, a logical structure unit is used to represent a logical relationship between data, and the logical structure unit includes a tablespace, a segment, an extent, a data block, etc.
[0093] For example, the logical structure unit is a segment, the prediction model is a segment prediction model, the data identifier is a key, and the data corresponding to the data identifier is the segment metadata. The service node inputs the key into the segment prediction model, obtains the segment prediction model outputs a prediction segment with an error range, and then searches and corrects the prediction segment within the error range to determine the segment corresponding to the key.
[0094] For another example, the logical structure unit is a block, the prediction model is a block prediction model, the data identifier is a key, and the data corresponding to the data identifier is the object value of the key. The service node inputs the key into the block prediction model, obtains the prediction block with an error range output by the block prediction model, and then searches and corrects the prediction block within the error range to determine the data block corresponding to the key.
[0095] In a possible embodiment of the present application, the logical structure of the data of the service node may include two or more levels of logical structure units, for example, the data is divided into multiple segments, each segment is divided into multiple zones, and each zone is divided into multiple data blocks. In such a case, the overall data, each segment, and each zone can use separate prediction models to predict which logical structure unit of the next level the data corresponding to the data identifier is stored in. For specific steps, please refer to Fig. 9 Steps 910 to 970 in the above will not be described in detail here.
[0096] Step 530: The service node searches the mapping table for storage space for the storage logical structure unit.
[0097] The service node determines a mapping entry in the mapping table based on the identifier of the logical structure unit, and reads the physical address of the storage space storing the logical structure unit from the mapping entry. The identifier of the logical structure unit may be a logical segment number, a logical block number, etc., and the physical address of the storage space storing the data of the logical structure unit may be a physical segment number, a physical block number, etc.
[0098] The mapping table includes at least one mapping entry, each mapping entry is used to indicate the storage space of data corresponding to the logical structure unit in the memory, and the arrangement order of at least one mapping entry is different from the storage order of data corresponding to at least one logical structure unit in the memory.
[0099] by Figure 6For example, the mapping table includes mapping entry 1, mapping entry 2 and mapping entry 3. Mapping entry 1 includes the identifier of the logical structure unit 1, the physical address of the logical structure unit 1 in the memory, and the correspondence between the identifier of the logical structure unit 1 and the physical address. Mapping entry 2 includes the identifier of the logical structure unit 2, the physical address of the logical structure unit 2 in the memory, and the correspondence between the identifier of the logical structure unit 2 and the physical address. Mapping entry 3 includes the identifier of the logical structure unit 3, the physical address of the logical structure unit 3 in the memory, and the correspondence between the identifier of the logical structure unit 3 and the physical address. The mapping entries in the mapping table are arranged in the order of mapping entry 1, mapping entry 3 and mapping entry 2. The storage space of the above logical structure units in the memory is arranged in the order of data block 1, data block 2 and data block 3. Data block 1 stores key 1, key 2 and key 3 in a specified order. Data block 2 stores key 8, key 9 and key 10 in a specified order. Data block 3 stores key 5, key 6 and key 7 in a specified order.
[0100] It can be seen that in this embodiment, a mapping table is used to represent the logical structure of the data block, and the data blocks in the memory do not need to be arranged in an orderly manner strictly according to the specified order.
[0101] Step 540: The service node reads data corresponding to the data identifier from the storage space of the logical structure unit.
[0102] The service node reads data corresponding to the data identifier from the memory according to the physical address in the storage space corresponding to the logical structure unit in the mapping table.
[0103] As a possible implementation method, the logical structure of the service node data includes two or more levels of logical structure units. If the output of the prediction model is the segment number, zone number, etc. of the intermediate level such as segment and zone, the data corresponding to the data identifier is metadata. For example, the output of the prediction model is the prediction segment, and the data corresponding to the data identifier is the segment metadata. The segment metadata includes the mapping table of the prediction segment, the block prediction model, the error correction array, the number of blocks in the segment, and some auxiliary data for model training, so that the service node inputs the data identifier into the block prediction model to read data from the next logical structure. For specific steps, please refer to Fig. 9 Steps 910 to 970 in the above will not be described in detail here.
[0104] As another possible implementation, the prediction model is a model included in the last level in the logical structure of the data, and the output of the prediction model is the physical address of the data corresponding to the data identifier, such as a physical block number.
[0105] Step 550 : The service node returns a user operation response to the client 340 .
[0106] The service node returns a user operation response including data corresponding to the data identifier to the client 340 .
[0107] Based on the data processing method, the service node uses a prediction model to predict the logical structural unit corresponding to the data identifier, rather than the location of the data corresponding to the data identifier in the memory, and then uses a mapping table to determine the location of the data in the memory, thereby maintaining the logical order of the data in the memory. Therefore, the arrangement order of the mapping entries in the mapping table and the storage order of the data in the memory are decoupled, and even if the data is arranged in a disordered order in the memory, the logical order of the data can be determined based on the mapping table, thereby providing a logical relationship between the data for data operations such as insertion and deletion, avoiding a large amount of data movement in order to maintain the data arrangement order in the memory when writing new data, reducing the memory performance overhead caused by data movement, and thus improving the performance of the storage system.
[0108] Combination of the above Figure 3-Figure 6 The steps of the data processing method are explained in general, followed by a detailed explanation of the steps of using the prediction model for segmented query.
[0109] First, the module architecture of the service node is explained, such as Figure 7 As shown, the service node includes a top layer, a middle layer and a bottom layer.
[0110] The top layer includes a root node 710 , which is used to route read requests to the correct segment nodes. The root node 710 includes a segment prediction model 711 , a pivot array 712 , and a segment mapping table 713 .
[0111] Optionally, the pivot array 712 includes the minimum key of each segment, and the segment mapping table 713 is used to indicate the correspondence between the segment and the physical address of the segment metadata.
[0112] The middle layer includes at least one segment node 720, which is used to route the read request to the correct block. Each segment node 720 includes a block prediction model 721, a sentinel array 722 and a block mapping table 723.
[0113] Optionally, the sentinel array 722 is the output of the block prediction model 721 for the minimum key of the blocks contained in the segment, such as a 4-byte floating point number. Figure 8 As shown, the sentinel array includes sentinel keys f(k1), f(k4) and f(k7), f(k1) corresponds to key 1, key 2 and key 3, f(k4) corresponds to key 4, key 5 and key 6, and f(k7) corresponds to key 7, key 8 and key 9.
[0114] Optionally, the sentinel keys included in the sentinel array 722 may be some sentinel keys selected according to the frequency of data access, the accuracy of the model, etc. Thus, the sentinel array 722 is introduced to record the data range managed by the lower-level nodes with low space overhead, and this information is used to reduce the access of erroneous data blocks.
[0115] The bottom layer includes at least one data block 730, which is used to store data. The data in each data block 730 is stored in a specified order, that is, the data is stored in an order from low to high or from high to low.
[0116] Combination Figure 7 The architecture of the service node shown in Fig. 9 As shown, taking the data identifier as the key and the object value corresponding to the data identifier as the value in the key-value pair as an example, the step of the service node using the prediction model to perform segmented query may include steps 910 to 970.
[0117] Step 910, the segment prediction model 711 determines the predicted segment number with error according to the key.
[0118] The service node inputs the key into the segment prediction model 711, and obtains the predicted segment number with error output by the segment prediction model 711. The error includes a minimum error and a maximum error.
[0119] Step 920: The service node uses the pivot array 712 to correct the predicted segment number and obtain the segment number corresponding to the key.
[0120] The service node uses the pivot array 712 to correct the predicted segment number within the error range to obtain the segment number corresponding to the key, wherein the error range is [predicted segment number + minimum error, predicted segment number + maximum error].
[0121] As a possible implementation manner, the service node determines an error range on the pivot array, compares the key with the value of the pivot array within the error range, and obtains a correct segment number corresponding to the key.
[0122] Optionally, the key may be compared with the value of the pivot array using a search algorithm such as a binary search method or an exponential search method.
[0123] Step 930: The service node reads the segment metadata from the memory according to the segment number corresponding to the key and the segment mapping table 713.
[0124] The service node searches for a mapping entry in the segment mapping table 713 according to the segment number corresponding to the key, extracts the physical address of the segment metadata corresponding to the segment number from the mapping entry, and then reads the segment metadata from the memory according to the physical address of the segment metadata.
[0125] Step 940: The service node determines the segment node 720 according to the segment metadata.
[0126] The service node extracts data such as the block prediction model 721 and the sentinel array 722 contained in the segment node 720 in the segment metadata.
[0127] Step 950, the block prediction model 721 of the segment node 720 determines the prediction block number with error.
[0128] The service node inputs the key into the block prediction model 721, and obtains the prediction segment number with error output by the block prediction model 721. The error includes the minimum error and the maximum error.
[0129] Step 960: The service node uses the sentinel array 722 to correct the predicted block number and obtain the block number corresponding to the key.
[0130] The principle of using the sentinel array 722 to correct the predicted block number in this step is similar to the principle of using the pivot array 712 to correct the predicted segment number in step 920, and will not be repeated here.
[0131] Step 970: The service node reads the object value corresponding to the key from the memory according to the block number corresponding to the key and the block mapping table 723.
[0132] The service node queries the mapping entry in the block mapping table 723 according to the block number corresponding to the key, then extracts the physical address corresponding to the block number, that is, the physical block number, from the mapping entry, and then reads the data block corresponding to the key from the memory according to the physical block number, and finally performs a binary search to determine the object value corresponding to the key from the database.
[0133] Based on the above steps 910 to 970, the service node maintains the mapping table of each data block and the mapping table of the segments in the root node, and adopts a hierarchical mapping method to reduce the query delay caused by the excessive amount of information in a single mapping table, thereby reducing the overall maintenance cost of the mapping table. At the same time, the segment mapping table maintained in the root node is small enough when the number of segments is large, and the segment mapping table can be stored in the memory, thereby improving the overall efficiency of key value operations such as reading.
[0134] Steps 910 to 970 above illustrate how to use the prediction model to perform segmented queries after the mapping table is introduced. On the other hand, the mapping table also has an acceleration effect on operations such as data insertion. Fig.10 The data insertion steps provided by the data processing method of the present application are described in detail.
[0135] Step 1010: When the storage space of the data blocks corresponding to the data to be inserted in the specified order is insufficient, the service node adds a new data block at the end of at least one data block.
[0136] When the remaining storage space of the data blocks corresponding to the data to be inserted in the specified order is smaller than the size of the data to be inserted, the service node adds a new data block at the end of at least one data block, that is, after the last data block.
[0137] For example, in Figure 6 Key 4 is inserted into the mapping table shown. Key 4 should be inserted after key 3 according to the specified order, but the remaining storage space of data block 1 is smaller than the data size of key 4. In this case, the service node adds data block 4 after data block 3.
[0138] Step 1020: The service node stores the data to be inserted in the newly added data block.
[0139] The service node stores the data to be inserted in the newly added data block in the specified order.
[0140] Continue to Figure 6 Taking the insertion of key 4 in the mapping table shown as an example, the service node stores key 4 in data block 4 according to the specified order.
[0141] In a possible implementation, after storing the data to be inserted in the newly added data block, the service node also moves at least one adjacent data of the data to be inserted in a specified order to the newly added data block. For example, the service node moves key 3 to data block 4 and arranges key 3 before key 4 in the specified order. In this way, the balance of data storage is improved, which is conducive to the acceleration of data query.
[0142] Step 1030: The service node inserts the logical structure unit corresponding to the newly added data block into the mapping table according to the specified order.
[0143] The service node inserts the logical structure unit corresponding to the newly added data block into the mapping table based on the specified order, that is, from low to high or from high to low, so that the arrangement order of the mapping entries in the mapping table still conforms to the specified order.
[0144] For example, the service node sets mapping entry 4 corresponding to data block 4 between mapping entry 1 and mapping entry 3 according to the specified order of data from low to high bits.
[0145] Optionally, in this embodiment, a fixed number (eg, 512, 1024, etc.) of data blocks are divided into one segment, and the amount of data movement for inserting mapping entries is further reduced by limiting the number of mapping entries that need to be moved.
[0146] In this way, the logical structure of the data is indicated by the arrangement order of the mapping entries in the mapping table, and the storage order of different data blocks in the memory does not need to completely correspond to the arrangement order of the corresponding mapping entries, thereby achieving the decoupling of the storage order and logical order of the data in the memory. When inserting new data, you only need to add a new data block at the end of the storage structure, avoiding inserting the data to be inserted into the data block in a fixed order and then shifting the subsequent data blocks as a whole, reducing the memory performance overhead caused by data movement.
[0147] The data processing method is exemplarily described above using data query and data insertion as examples. In order to further accelerate steps such as data query and data insertion, the data processing method in this embodiment can also optimize the data encoding method when performing data operations such as query, insertion, and deletion.
[0148] As an implementation method, when performing data operations on key-value pairs, the service node converts complex coded keys such as strings in the key into high-precision integers for calculation. In this way, in scenarios involving I / O, the I / O overhead of high-precision integer calculations is small, thereby improving the overall efficiency of data operations.
[0149] As another implementation, when performing data operations on key-value pairs, the service node optimizes the encoding scheme using the known data distribution of the key (such as the character table). For example, a key containing only lowercase letters is encoded as 0-25, rather than encoding all ASCII characters as 0-255. In this way, the encoding based on the character table converts the character key into an integer with a more uniform distribution, thereby improving the training accuracy and prediction accuracy of the prediction model.
[0150] Fig.11 Schematic diagram of the structure of a possible data processing device provided in this embodiment. The data processing device can be used to implement the function of the service node (such as a computing node or a storage node) in the above method embodiment, and thus also has the beneficial effects possessed by the above method embodiment. In this embodiment, the data processing device can be as follows Figure 3 The nodes constituted by the computing server 311, computing server 312, storage server 321, storage server 322 and / or other servers shown may also be modules (such as chips) applied to the servers.
[0151] like Fig.11 As shown, the data processing device 1100 includes a prediction module 1110 , a mapping module 1120 and a reading module 1130 .
[0152] The data processing device 1100 can be used to implement the above Figure 6 In the method embodiment shown in FIG. 1 , the functions of the service node are implemented, and the modules included in the data processing device 1100 are specifically used to implement the following functions.
[0153] A prediction module 1110, configured to predict a logical structure unit corresponding to a data identifier using a prediction model, wherein the prediction model is a machine learning model used to predict a location of data according to the data identifier, and the logical structure unit is used to represent a logical relationship between data;
[0154] A mapping module 1120, configured to query a storage space storing a logical structure unit in a mapping table, wherein the mapping table includes at least one mapping entry, each mapping entry is used to indicate a storage space in a memory corresponding to the logical structure unit, and an arrangement order of at least one mapping entry is different from a storage order in the memory corresponding to the at least one logical structure unit;
[0155] The reading module 1130 is used to read the data corresponding to the data identifier from the storage space of the logical structure unit.
[0156] As a possible implementation manner, data corresponding to at least one logical structure unit are stored in at least one data block in the memory in a specified order, and the specified order is the order of data from low to high or from high to low.
[0157] As a possible implementation method, the data processing device 1100 also includes an insertion module, which is used to: when the storage space of the data blocks corresponding to the data to be inserted in the specified order is insufficient, add a new data block at the end of at least one data block; store the data to be inserted in the new data block; and insert the logical structure unit corresponding to the new data block into the mapping table in the specified order.
[0158] As a possible implementation method, the prediction model includes a segment prediction model, the data identifier is a key, the logical structure unit is a segment, and the data corresponding to the data identifier is the segment metadata. The prediction module 1110 is specifically used to: input the key into the segment prediction model to obtain a predicted segment output by the segment prediction model, and the predicted segment has an error range; use a pivot array to correct the predicted segment within the error range of the predicted segment to determine the segment corresponding to the key.
[0159] As a possible implementation method, each segment includes at least one data block, the prediction model also includes a block prediction model, the data identifier is the key, the logical structure unit is the data block, the data corresponding to the data identifier is the object value of the key, and the prediction module 1110 is specifically used to: input the key into the block prediction model to obtain the prediction block output by the block prediction model, and the prediction block has an error range; use a sentinel array to correct the prediction block within the error range of the prediction block to determine the data block corresponding to the key.
[0160] As a possible implementation, the sentinel array includes at least one sentinel key, and each sentinel key is the output of the block prediction model for the minimum key in the data block.
[0161] As a possible implementation, the data processing device 1100 further includes an encoding module for converting a complex identification code in the data identification into a high-precision integer for calculation, wherein the complex identification code includes a character string.
[0162] As a possible implementation method, the encoding module is also used to: determine the data distribution range of the character identifier in the data identifier; determine the encoding range of the character identifier based on the data distribution range, and the size of the encoding range is the same as the size of the data distribution range.
[0163] It should be understood that the data processing device 1100 of the embodiment of the present invention can be implemented by a CPU, an ASIC, or a programmable logic device (PLD), and the PLD can be a complex programmable logical device (CPLD), an FPGA, a generic array logic (GAL), or any combination thereof. The data processing device 1100 is implemented by software. Figure 5 When the data processing method shown in , the data processing device 1100 and its various modules can also be software modules.
[0164] It should be understood that the computing nodes, storage nodes and other service nodes in the embodiments of the present application may correspond to the data processing device 1100 in the embodiments of the application, and may correspond to the corresponding subjects in the method according to the embodiments of the present application, and the above and other operations and / or functions of each module in the data processing device 1100 are respectively to implement Figure 5 For the sake of brevity, the corresponding process of the method in will not be repeated here.
[0165] The present application also provides a Fig.12 The system shown in the figure includes multiple computing devices 1200, each of which includes a memory 1201, a processor 1202, a communication interface 1203 and a bus 1204. The memory 1201, the processor 1202 and the communication interface 1203 are connected to each other through the bus 1204. The computing device 1200 may be Figure 3 A server such as a computing server or storage server in Figure 4 A service node provided by a computing server and / or a storage server.
[0166] The memory 1201 may be a read-only memory, a static storage device, a dynamic storage device or a random access memory. The memory 1201 may store computer instructions and a data set required to execute the computer instructions. When the computer instructions stored in the memory 1201 are executed by the processor 1202, the processor 1202 and the communication interface 1203 are used to execute the data processing method.
[0167] Processor 1202 may be a general-purpose central processing unit (CPU), an application specific integrated circuit (ASIC), a graphics processing unit (GPU), or any combination thereof. Processor 1202 may include one or more chips. Processor 1202 may include an AI accelerator, such as a neural processing unit (NPU). In addition, Fig.12 The example in which each computing device 1200 includes a processor 1202 is used for explanation. In specific implementation, the number and type of processors 1202 in each computing device 1200 can be set according to business requirements. The same computing device 1200 can include one or more processors. When the same computing device 1200 includes multiple processors, this application does not limit the type of processor.
[0168] The communication interface 1203 uses a transceiver module such as, but not limited to, a transceiver to implement communication between the computing device 1200 and other devices or a communication network. For example, a user operation request may be received or sent through the communication interface 1203 .
[0169] The bus 1204 may include a path for transmitting information between various components of the computing device 1200 (eg, the memory 1201 , the processor 1202 , and the communication interface 1203 ).
[0170] A communication path is established between each of the computing devices 1200 through a communication network. Any computing device 1200 may be a computer (eg, a server) in a distributed storage system, or a computer in an edge data center, or a terminal computing device.
[0171] Each computing device 1200 may be deployed with computing nodes and / or storage nodes and other service node functions, such as executing Figure 5 Any of the steps 510 - 550 shown in the figure, or the functions of the prediction module 1110 , the mapping module 1120 or the reading module 1130 when executing in the data processing device 1100 .
[0172] The method steps in this embodiment can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a terminal device. Of course, the processor and the storage medium can also exist as discrete components in a network device or a terminal device.
[0173] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed on a computer, the process or function described in the embodiment of the present application is executed in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device or other programmable device. The computer program or instruction may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program or instruction may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium, for example, a floppy disk, a hard disk, a tape; it may also be an optical medium, for example, a digital video disc (DVD); it may also be a semiconductor medium, for example, a solid state drive (SSD). The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A data processing method, characterized in that: include: Predicting a logical structure unit corresponding to a data identifier using a prediction model, wherein the prediction model is a machine learning model used to predict a location of data according to the data identifier, and the logical structure unit is used to represent a logical relationship between data; querying a storage space storing the logical structure unit in a mapping table, wherein the mapping table includes at least one mapping entry, each mapping entry is used to indicate a storage space of data corresponding to the logical structure unit in the memory, and an arrangement order of the at least one mapping entry is different from a storage order of the data corresponding to the at least one logical structure unit in the memory; The data corresponding to the data identifier is read from the storage space of the logical structure unit.
2. The method according to claim 1, characterized in that The data corresponding to the at least one logical structure unit are stored in at least one data block in the memory in a specified order, and the specified order is the order of data from low to high or from high to low.
3. The method according to claim 2, characterized in that The method further comprises a data insertion step, comprising: When the storage space of the data blocks corresponding to the data to be inserted in the specified order is insufficient, adding a new data block at the end of the at least one data block; Storing the data to be inserted in the newly added data block; The logical structure units corresponding to the newly added data blocks are inserted into the mapping table according to the specified order.
4. The method according to any one of claims 1 to 3, characterized in that The prediction model includes a segment prediction model, the data identifier is a key, the logical structure unit is a segment, the data corresponding to the data identifier is segment metadata, and the method of using the prediction model to predict the logical structure unit corresponding to the data identifier includes: Inputting the key into the segment prediction model to obtain a predicted segment output by the segment prediction model, wherein the predicted segment has an error range; The predicted segment is corrected within the error range of the predicted segment using a pivot array to determine the segment corresponding to the key.
5. The method according to claim 4, characterized in that Each segment includes at least one data block, the prediction model further includes a block prediction model, the data identifier is a key, the logical structure unit is a data block, the data corresponding to the data identifier is an object value of the key, and the use of the prediction model to predict the logical structure unit corresponding to the data identifier includes: Inputting the key into the block prediction model to obtain a prediction block output by the block prediction model, wherein the prediction block has an error range; The prediction block is corrected within the error range of the prediction block using a sentinel array to determine the data block corresponding to the key.
6. The method according to claim 5, characterized in that The sentinel array includes at least one sentinel key, and each sentinel key is the output of the block prediction model for the minimum key in the data block.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: The complex identification code in the data identification is converted into a high-precision integer for operation, wherein the complex identification code includes a character string.
8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: Determine the range of data distribution of character identifiers in data identifiers; The encoding range of the character identifier is determined based on the range of the data distribution, and the size of the encoding range is the same as the size of the range of the data distribution.
9. A data processing device, characterized in that: include: A prediction module, used to predict the logical structure unit corresponding to the data identifier using a prediction model, wherein the prediction model is a machine learning model used to predict the location of the data according to the data identifier, and the logical structure unit is used to represent the logical relationship between the data; a mapping module, configured to query a storage space storing the logical structure unit in a mapping table, wherein the mapping table includes at least one mapping entry, each mapping entry is configured to indicate a storage space in a memory corresponding to the logical structure unit, and an arrangement order of the at least one mapping entry is different from a storage order of the data corresponding to the at least one logical structure unit in the memory; A reading module is used to read the data corresponding to the data identifier from the storage space of the logical structure unit.
10. A computing device, characterized in that The computing device includes a memory and a processor, wherein the memory is used to store a set of computer instructions; when the processor executes the set of computer instructions, the operation steps of any one of the methods described in claims 1-8 are performed.
11. A computer system, characterized in that: The computer system includes a computing node and a storage node, and the computing node is used to execute the steps of the method described in any one of claims 1 to 8 to read the data corresponding to the data identifier from the storage node.
12. A readable storage medium, characterized in that: The readable storage medium includes a computer program or instructions. When the computer program or instructions are executed on a computer, the computer is caused to execute the operation steps of any one of the methods described in claims 1 to 8.
Citation Information
Cited By
Data query method and device, electronic equipment, storage medium and computer program product
CN120653649A
A data query method and device, electronic equipment, storage medium and computer program product
CN120653649B
