Database acceleration system
Through the parallel processing and optimization technology of the database acceleration system, the problem that the central processor is difficult to process different types of database tables in parallel is solved, the access speed of the memory database and the reliability of the system are improved, and efficient data processing and consistency control are achieved.
Patent Information
- Application Number
- CN202311533207.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-16
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2043-11-16
AI Technical Summary
When there are a large number of in-memory database access requests, it is difficult for a single central processor to process different types of database tables in parallel, resulting in slow in-memory database access speeds.
By providing a database acceleration system, including an instruction interface module, a database table processing module and a memory interface module, which process hash instructions and array instructions respectively, and use the hash instruction engine sub-module and array instruction engine sub-module to access DDR through the memory interface module memory, implements parallel processing, and optimizes data access and synchronization through cache modules and consistency control modules.
It improves the access speed of the memory database, especially when processing large amounts of data or complex queries. It improves the data processing efficiency through parallel processing and targeted optimization, and avoids the data consistency problems that may exist when the central processor directly accesses the memory, and enhances the System reliability and data integrity.
Smart Images

Figure CN117539844B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of database technology, and in particular to a database acceleration system. Background Art
[0002] The database used in some specific application fields is not large and can reside in the memory, such as small websites and applications with small traffic and relatively small data size. The database is completely loaded into the memory and the memory database is directly accessed through the central processing unit (CPU) to read data in the memory database or write data to the memory database.
[0003] However, when directly accessing the in-memory database through the central processing unit, when there are a large number of in-memory database access requests, it is difficult for a single central processing unit to process different types of database tables in parallel, resulting in a slow access speed to the in-memory database. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a database acceleration system to eliminate or improve one or more defects in the prior art, and can solve the problem of slow access speed of the in-memory database.
[0005] One aspect of the present invention provides a database acceleration system, comprising:
[0006] The instruction interface module is used to receive the data operation instruction of the database table; convert the database table operation request into the internal instruction; based on the type of the database table, send the internal instruction to the database table engine module for processing; the database table includes an array table and a hash table; the internal instruction includes an array instruction and a hash instruction;
[0007] The database table processing module includes a hash instruction engine submodule and a data instruction engine submodule; the hash instruction engine submodule is used to access the DDR memory through the memory interface module and execute hash instructions, and the hash instructions include query instructions, insert instructions or delete instructions for the key-value pair data structure in the hash table; the array instruction engine submodule is used to access the DDR memory through the memory interface module and execute array instructions, and the array instructions include load instructions, storage instructions or read instructions for array table items in the array table;
[0008] The memory interface module is the interface between the database table processing module and the DDR memory, and is used to process the read and write operations of the database table data.
[0009] Optionally, the system further includes a hash calculation module; when the internal instruction is a hash instruction, before sending the internal instruction to the database table engine module for processing,
[0010] The instruction interface module is further used to: send the key value of the hash instruction to the hash calculation module;
[0011] The hash calculation module is used to: upon receiving the key value of the hash instruction, calculate the hash value according to the key value of the hash instruction; and add the hash value to the hash instruction.
[0012] Optionally, the system further includes a first cache module and a second cache module;
[0013] The hash instruction engine submodule is further used to: during the execution of the hash instruction, cache temporary data during the execution of the hash instruction in the first cache module and / or the second cache module;
[0014] Correspondingly, the array instruction engine submodule is further used to: during the process of executing the array instruction, cache temporary data during the execution of the array instruction in the first cache module and / or the second cache module.
[0015] Optionally, the hash instruction engine submodule is further used to: when there is operation data corresponding to the hash instruction in the first cache module and / or the second cache module, access the first cache module and / or the second cache module to execute the hash instruction;
[0016] Correspondingly, the array instruction engine submodule is also used to: when operation data corresponding to the array instruction exists in the first cache module and / or the second cache module, access the first cache module and / or the second cache module to execute the array instruction.
[0017] Optionally, the system further comprises a data packet processing engine interface, which is used to: receive a data access request, and send the data access request to the first cache module;
[0018] The first cache module corresponds one-to-one to the data packet processing engine interface and is used to provide access data corresponding to the data access request for the data packet processing engine interface.
[0019] Optionally, the data packet processing engine interface is also used to: when the data access request does not hit the access data requested in the first cache module, request access data from the second cache module.
[0020] Optionally, the system also includes a consistency control module for sending read and write requests to the first cache module, the second cache module, the hash instruction engine submodule and the array instruction engine submodule to achieve data synchronization between the first cache module, the second cache module, the hash instruction engine submodule and the array instruction engine submodule.
[0021] Optionally, the first cache module and the second cache module independently count the hit rate of statistical data access.
[0022] Optionally, the system further includes a dedicated table module; the data operation instructions further include a creation instruction and a deletion instruction of a database table;
[0023] The instruction interface module is further used to: send the data operation instruction to the dedicated table module when the data operation instruction is a create instruction or a delete instruction;
[0024] The dedicated table module is used to: upon receiving a data operation instruction, create or delete a database table according to the instruction of the data operation instruction.
[0025] Optionally, the system further includes a bus interconnection module for connecting the instruction interface module, the database table processing module, the hash calculation module, the memory interface module, the first cache module, the second cache module and the consistency control module.
[0026] The database acceleration system of the present invention can solve the problem of slow access speed of memory database; the database operation instruction of the database table is received through the instruction interface module, and after the data operation instruction is converted into an internal instruction, it is sent to the hash instruction engine submodule or the array instruction engine submodule for processing according to the type of the database table, and the hash instruction engine submodule or the array instruction engine submodule accesses the DDR memory through the memory interface module, thereby accessing the memory database, without using a central processing unit to access the DDR memory, and assigning different database tables to different modules, and multiple tables can be processed at the same time, thereby realizing parallel processing. In this way, when processing a large amount of data or complex queries, the efficiency of data processing can be improved, thereby improving the access speed of the memory database; at the same time, by processing a specific type of table through the hash instruction engine submodule and the array instruction engine submodule, targeted optimization can be performed, including using a special instruction set, hardware acceleration or a dedicated algorithm, etc., which can improve the processing speed of the specific type of table, thereby further improving the access speed of the memory database.
[0027] Furthermore, temporary data during the execution of hash instructions or array instructions are cached by the first cache module and the second cache module; at the same time, when the required data already exists in the first cache module or the second cache module, it can be read from the first cache module 150 or the second cache module 160 without accessing the DDR memory again, thereby improving the efficiency of accessing data.
[0028] Furthermore, the consistency control module is used to ensure data consistency between the DDR memory and the first cache module and the second cache module, thereby avoiding data consistency problems that may exist when the central processing unit directly accesses the memory, and can improve the reliability of the database acceleration system and the accuracy of database data processing; at the same time, it can avoid data loss, damage or incompleteness and ensure data integrity.
[0029] Additional advantages, purposes, and features of the present invention will be described in part in the following description, and will become apparent to those skilled in the art after studying the following, or may be learned from the practice of the present invention. The purposes and other advantages of the present invention may be achieved and obtained by the structures specifically indicated in the specification and the accompanying drawings.
[0030] Those skilled in the art will appreciate that the objectives and advantages that can be achieved with the present invention are not limited to the above specific description, and the above and other objectives that can be achieved by the present invention will be more clearly understood from the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of this application, and do not constitute a limitation of the present invention. The components in the drawings are not drawn to scale, but are only for illustrating the principles of the present invention. In order to facilitate the illustration and description of some parts of the present invention, the corresponding parts in the drawings may be enlarged, that is, they may become larger relative to other components in the exemplary device actually manufactured according to the present invention. In the drawings:
[0032] Figure 1 It is a structural schematic diagram of a database acceleration system in one embodiment of the present invention;
[0033] Figure 2 is a block diagram of an electronic device in another embodiment of the present invention. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0035] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.
[0036] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.
[0037] It should also be noted that, unless otherwise specified, the term “connection” herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.
[0038] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0039] The following is an introduction to the database acceleration system provided by this application.
[0040] like Figure 1 As shown, this embodiment provides a schematic diagram of the structure of a database acceleration system. The database acceleration system includes: an instruction interface module 110, a database table processing module 120 and a memory interface module 130.
[0041] In this embodiment, the instruction interface module 110 is used to receive data operation instructions of the database table; convert the database table operation request into an internal instruction; and send the internal instruction to the database table engine module 120 for processing based on the type of the database table.
[0042] The database table includes an array table and a hash table; the internal instruction includes an array instruction and a hash instruction. Accordingly, the database table processing module 120 includes a hash instruction engine submodule 1210 and a data instruction engine submodule 1220.
[0043] The memory interface module 130 is an interface between the database table processing module and the DDR memory (Double Data Rate Synchronous Dynamic Random Access Memory), and is used to process the read and write operations of the database table data.
[0044] In this embodiment, the hash instruction engine submodule 1210 is used to access the DDR memory through the memory interface module 130 and execute hash instructions.
[0045] Among them, the hash instruction includes a query instruction, an insert instruction or a delete instruction of the key-value pair data structure in the hash table.
[0046] The query instruction is used to retrieve the value corresponding to a given key. By providing a key as input, the value associated with the key is returned. If the key does not exist, a null value or a specific sentinel value is returned. The insert instruction is used to insert a new key-value pair into a data structure. By providing a key and the corresponding value as input, it is added to the data structure. If the key already exists, the original value may be overwritten or other operations may be performed depending on the specific implementation. The delete instruction is used to delete the specified key-value pair from the data structure. By providing a key as input, its corresponding key-value pair is removed from the data structure. If the key does not exist, the operation may be ignored or an appropriate error message may be returned.
[0047] In actual implementation, the hash instruction also includes update instructions, range query instructions, incremental query instructions or batch processing instructions, and this embodiment does not limit the implementation method of the hash instruction.
[0048] When using a hash table to implement a dictionary or index, the hash value is usually used as the key in the key-value pair to quickly find and access the corresponding value. The hash table uses an array-based data structure to store key-value pairs. It uses a hash function to map the key value to a position in the array, so as to quickly access the corresponding value. Therefore, when using a hash table for data operations, you first need to calculate the hash value of the key, and then find or insert the corresponding key-value pair based on the hash value.
[0049] Based on this, Figure 1 As shown, the database acceleration system also includes a hash calculation module 140. By independently calculating the hash value through the hash calculation module 140, the efficiency and performance of data operations can be improved while ensuring the correctness and integrity of the data.
[0050] In this embodiment, when the database table operation request received by the instruction interface module 110 is a hash table operation request, the database table operation request is converted into a hash instruction, and the instruction interface module 110 sends the key value in the hash instruction to the hash calculation module 140, and the hash calculation module 140 calculates the hash value based on the key value of the hash instruction.
[0051] Specifically, when the internal instruction is a hash instruction, before sending the internal instruction to the database table engine module for processing, the instruction interface module 110 is further used to send the key value of the hash instruction to the hash calculation module 140 .
[0052] Accordingly, the hash calculation module 140 is used to: upon receiving the key value of the hash instruction, calculate the hash value according to the key value of the hash instruction, and add the hash value to the hash instruction.
[0053] In this embodiment, the array instruction engine submodule 1220 is used to access the DDR memory through the memory interface module 130 and execute array instructions.
[0054] The array instruction includes a load instruction, a store instruction or a read instruction of an array table entry in the array table.
[0055] The load instruction is used to load an element in an array table into a register or memory. By providing the index of the array as input, the element value at the corresponding index position is loaded into the specified position. The store instruction is used to store data to a specified position in an array table. By providing the index of the array and the value to be stored as input, the element value at the specified position is updated or replaced. The read instruction is used to get the value of an element from the array table. By providing the index of the array as input, the element value at the corresponding index position is returned, which can be directly used for subsequent calculations or logical operations.
[0056] In actual implementation, array instructions also include initialization instructions, traversal instructions, sorting instructions or search instructions, etc. This embodiment does not limit the implementation method of array instructions.
[0057] In this embodiment, the DDR memory is used as the main memory to store data corresponding to the data operation instruction. When the database table processing module 120 accesses the DDR memory through the memory interface module 130, the data in the DDR memory will be read for processing. According to the instructions of the data operation instruction, the data in the DDR memory may need to be modified or directly read. In the case where the data in the DDR memory needs to be modified, the database table processing module 120 will write the new data back to the DDR memory to update the original data.
[0058] In this embodiment, specific types of tables are processed through the hash instruction engine submodule and the array instruction engine submodule, and targeted optimization can be performed, including the use of special instruction sets, hardware acceleration or dedicated algorithms, etc., which can improve the processing speed of specific types of tables, thereby further improving the access speed of the in-memory database.
[0059] In the process of reading or modifying data in DDR memory, since direct access to DDR memory is slow, there is a possibility that the data needs to be cached in the cache for quick access. Figure 1 As shown, in this embodiment, the database acceleration system further includes a first cache module 150 and a second cache module 160. The first cache module 150 and the second cache module 160 independently count the hit rate of statistical data access.
[0060] Correspondingly, the hash instruction engine submodule 1210 is also used to: cache temporary data during the execution of the hash instruction in the first cache module 150 and / or the second cache module 160 during the execution of the hash instruction.
[0061] The array instruction engine submodule 1220 is further used to: during the process of executing the array instruction, cache temporary data during the execution of the array instruction in the first cache module 150 and / or the second cache module 160.
[0062] When the required data already exists in the first cache module 150 or the second cache module 160, it can be directly read from the first cache module 150 or the second cache module 160 without accessing the DDR memory again, thereby improving the efficiency of accessing data.
[0063] Specifically, in this embodiment, the hash instruction engine submodule 1210 is also used to: when there is operation data corresponding to the hash instruction in the first cache module 150 and / or the second cache module 160, access the first cache module 150 and / or the second cache module 160 to execute the hash instruction.
[0064] Correspondingly, the array instruction engine submodule 1220 is also used to: when there is operation data corresponding to the array instruction in the first cache module 150 and / or the second cache module 160, access the first cache module 150 and / or the second cache module 160 to execute the array instruction.
[0065] In addition, when the data in the DDR memory is updated, the data in the first cache module 150 and the second cache module 160 also need to be updated synchronously to ensure that the data in the first cache module 150 and the second cache module 160 are consistent with the data in the DDR memory.
[0066] Based on this, Figure 1 As shown, in this embodiment, the database acceleration system also includes a consistency control module 170, which is used to send read and write requests to the first cache module 150, the second cache module 160, the hash instruction engine submodule 1210 and the array instruction engine submodule 1220 to achieve data synchronization between the first cache module 150, the second cache module 160, the hash instruction engine submodule 1210 and the array instruction engine submodule 1220.
[0067] Therefore, the table entry request first needs to read and write DDR, and then determine whether the cache needs to be accessed by judging whether the required data already exists in the cache. This process can improve the efficiency and speed of system access to data and reduce the number of accesses to main memory such as DDR, thereby improving the overall system performance.
[0068] In addition, in this embodiment, the database acceleration system further includes a dedicated table module 180, and the dedicated table module 180 is used to create or delete a database table.
[0069] Correspondingly, the data operation instruction also includes a creation instruction and a deletion instruction of a database table. The instruction interface module 110 is further used to send the data operation instruction to the dedicated table module 180 when the data operation instruction is a creation instruction or a deletion instruction.
[0070] The dedicated table module 180 is used to create or delete a database table according to the instructions of the data operation instruction when receiving the data operation instruction.
[0071] In one example, the data operation instruction is a hash table creation instruction. After receiving the hash table creation instruction, the instruction interface module 110 sends the hash table creation instruction to the dedicated table module 180. After receiving the hash table creation instruction, the dedicated table module 180 writes the configuration parameters of the hash table indicated by the hash table creation instruction into the corresponding parameter table, creates the hash table, and completes the creation of the hash table after clearing the hash table.
[0072] Among them, the configuration parameters include obtaining table number resource parameters, specifying table attribute parameters, array table item data length parameters, hash table key value data length parameters, single table item storage space occupancy parameters, total table item quantity parameters, table storage space parameters, base address parameters and cache configuration parameters, etc.
[0073] In another example, the data operation instruction is a hash table deletion instruction. After receiving the hash table deletion instruction, the instruction interface module 110 sends the hash table deletion instruction to the dedicated table module 180. After receiving the hash table deletion instruction, the dedicated table module 180 configures the valid items in the parameter table corresponding to the hash table to be deleted to realize the deletion of the hash table.
[0074] In another example, the data operation instruction is an array table creation instruction. After receiving the array table creation instruction, the instruction interface module 110 sends the array table creation instruction to the dedicated table module 180; after receiving the array table creation instruction, the dedicated table module 180 writes the configuration parameters of the array table indicated by the array table creation instruction into the corresponding parameter table, creates the array table, and completes the creation of the array table after clearing the array table.
[0075] In another example, the data operation instruction is an array table deletion instruction. After receiving the array table deletion instruction, the instruction interface module 110 sends the array table deletion instruction to the dedicated table module 180; after receiving the array table deletion instruction, the dedicated table module 180 configures the valid items in the parameter table corresponding to the array table to be deleted to realize the deletion of the array table.
[0076] In this embodiment, in order to ensure data transmission between various functional modules, the database acceleration system also includes a bus interconnection module 190, which is used to connect the instruction interface module, the database table processing module, the hash calculation module, the memory interface module, the first cache module, the second cache module and the consistency control module.
[0077] like Figure 1As shown, in this embodiment, the bus interconnection module 190 is respectively connected to the instruction interface module 110, the database table engine module 120, the hash calculation module 140, the first cache module 150, the second cache module 160 and the consistency control module 170 to realize data transmission between various functional modules.
[0078] In addition, in this embodiment, the database acceleration system also includes a packet processing engine (PPE) interface, which is used to: receive a data access request and send the data access request to the first cache module 150.
[0079] The first cache module 150 corresponds to the data packet processing engine interface on a one-to-one basis, and is used to provide the data packet processing engine interface with access data corresponding to the data access request.
[0080] When the access data corresponding to the data access request does not exist in the first cache module 150 , it is still necessary to make a data request to the second cache module 160 to ensure that the access data corresponding to the data access request can be obtained.
[0081] Specifically, the data packet processing engine interface is also used to: when the data access request does not hit the access data requested in the first cache module 150, send the data access request to the second cache module 160 to request access to the data.
[0082] In this embodiment, the data access request includes an array table data access request and a hash table data access request. When the data access request is a hash table data access request, the first cache module 150 is further configured to send the key value of the hash table data access request to the hash calculation module 140 .
[0083] Accordingly, the hash calculation module 140 is used to: upon receiving the key value of the hash table data access request, calculate the hash value according to the key value of the hash table data access request; and add the hash value to the hash table data access request.
[0084] In summary, the database acceleration system provided by the present embodiment can solve the problem of slow access speed of the memory database; the database operation instruction of the database table is received through the instruction interface module, and after the data operation instruction is converted into an internal instruction, it is sent to the hash instruction engine submodule or the array instruction engine submodule for processing according to the type of the database table, and the hash instruction engine submodule or the array instruction engine submodule accesses the DDR memory through the memory interface module, thereby accessing the memory database, without using the central processing unit to access the DDR memory, assigning different database tables to different modules, and processing multiple tables at the same time, thereby realizing parallel processing. In this way, when processing a large amount of data or complex queries, the efficiency of data processing can be improved, thereby improving the access speed of the memory database; at the same time, by processing a specific type of table through the hash instruction engine submodule and the array instruction engine submodule, targeted optimization can be performed, including the use of special instruction sets, hardware acceleration or special algorithms, etc., which can improve the processing speed of a specific type of table, thereby further improving the access speed of the memory database.
[0085] Furthermore, temporary data during the execution of hash instructions or array instructions are cached by the first cache module and the second cache module; at the same time, when the required data already exists in the first cache module or the second cache module, it can be read from the first cache module 150 or the second cache module 160 without accessing the DDR memory again, thereby improving the efficiency of accessing data.
[0086] Furthermore, the consistency control module is used to ensure data consistency between the DDR memory and the first cache module and the second cache module, thereby avoiding data consistency problems that may exist when the central processing unit directly accesses the memory, and can improve the reliability of the database acceleration system and the accuracy of database data processing; at the same time, it can avoid data loss, damage or incompleteness and ensure data integrity.
[0087] This embodiment provides an electronic device, such as Figure 2 As shown, the electronic device at least includes a processor 201 and a memory 202 .
[0088] The processor 201 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 201 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 201 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 201 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 201 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0089] The memory 202 may include one or more computer-readable storage media, which may be non-transitory. The memory 202 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 202 is used to store at least one instruction, which is used to be executed by the processor 201 to implement the process of converting a database table operation request into an internal instruction in the above-mentioned embodiment, the process of sending the internal instruction to the database table engine module for processing, the process of the hash instruction engine submodule accessing the DDR memory through the memory interface module and executing the hash instruction, and the process of the array instruction engine submodule accessing the DDR memory through the memory interface module and executing the array instruction.
[0090] In some embodiments, the electronic device may further optionally include: a peripheral device interface and at least one peripheral device. The processor 201, the memory 202 and the peripheral device interface may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface via a bus, a signal line or a circuit board. Schematically, the peripheral devices include but are not limited to: a radio frequency circuit, a touch display screen, an audio circuit, and a power supply.
[0091] Of course, the electronic device may also include fewer or more components, which is not limited in this embodiment.
[0092] Optionally, the present application also provides a computer-readable storage medium, in which a program is stored. The program is loaded and executed by a processor to implement the process of converting a database table operation request into an internal instruction in the above-mentioned embodiment, the process of sending the internal instruction to a database table engine module for processing, the process of a hash instruction engine submodule accessing a DDR memory through a memory interface module to execute a hash instruction, and the process of an array instruction engine submodule accessing a DDR memory through a memory interface module to execute an array instruction.
[0093] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0094] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A database acceleration system, It is characterized in that The system comprises: The instruction interface module is used to receive the data operation instruction of the database table; convert the database table operation request into an internal instruction; based on the type of the database table, send the internal instruction to the database table engine module for processing; the database table includes an array table and a hash table; the internal instruction includes an array instruction and a hash instruction; The database table processing module includes a hash instruction engine submodule and a data instruction engine submodule; the hash instruction engine submodule is used to access the DDR memory through the memory interface module and execute the hash instruction, and the hash instruction includes a query instruction, an insert instruction or a delete instruction of the key-value pair data structure in the hash table; the array instruction engine submodule is used to access the DDR memory through the memory interface module and execute the array instruction, and the array instruction includes a load instruction, a store instruction or a read instruction of an array table item in the array table; The memory interface module is an interface between the database table processing module and the DDR memory, and is used to process the read and write operations of the database table data.
2. The database acceleration system according to claim 1, It is characterized in that The system further comprises a hash calculation module; when the internal instruction is a hash instruction, before sending the internal instruction to the database table engine module for processing, the instruction interface module is further used to: send the key value of the hash instruction to the hash calculation module; The hash calculation module is used to: upon receiving the key value of the hash instruction, calculate a hash value according to the key value of the hash instruction; and add the hash value to the hash instruction.
3. The database acceleration system according to claim 2, It is characterized in that The system also includes a first cache module and a second cache module; The hash instruction engine submodule is further used for: in the process of executing the hash instruction, caching temporary data in the process of executing the hash instruction in the first cache module and / or the second cache module; Correspondingly, the array instruction engine submodule is further used to: during the process of executing the array instruction, cache temporary data during the execution of the array instruction in the first cache module and / or the second cache module.
4. The database acceleration system according to claim 3, It is characterized in that The hash instruction engine submodule is further used to: when the operation data corresponding to the hash instruction exists in the first cache module and / or the second cache module, access the first cache module and / or the second cache module to execute the hash instruction; Correspondingly, the array instruction engine submodule is also used to: when the operation data corresponding to the array instruction exists in the first cache module and / or the second cache module, access the first cache module and / or the second cache module to execute the array instruction.
5. The database acceleration system according to claim 3, It is characterized in that The system further comprises a data packet processing engine interface, which is used to: receive a data access request, and send the data access request to the first cache module; The first cache module corresponds one-to-one to the data packet processing engine interface, and is used to provide the data packet processing engine interface with access data corresponding to the data access request.
6. The database acceleration system according to claim 5, It is characterized in that The data packet processing engine interface is also used to: request the access data from the second cache module when the access data requested by the data access request does not hit the access data requested in the first cache module.
7. The database acceleration system according to claim 3, It is characterized in that The system also includes a consistency control module for sending read and write requests to the first cache module, the second cache module, the hash instruction engine submodule and the array instruction engine submodule to achieve data synchronization among the first cache module, the second cache module, the hash instruction engine submodule and the array instruction engine submodule.
8. The database acceleration system according to claim 3, It is characterized in that The first cache module and the second cache module independently count the hit rate of statistical data access.
9. The database acceleration system according to claim 1, It is characterized in that The system also includes a dedicated table module; the data operation instructions also include a creation instruction and a deletion instruction of a database table; The instruction interface module is further used to: when the data operation instruction is the create instruction or the delete instruction, send the data operation instruction to the dedicated table module; The dedicated table module is used to: upon receiving the data operation instruction, create or delete a database table according to the instruction of the data operation instruction.
10. The database acceleration system according to claim 7, It is characterized in that The system also includes a bus interconnection module for connecting the instruction interface module, the database table processing module, the hash calculation module, the memory interface module, the first cache module, the second cache module and the consistency control module.
Citation Information
Patent Citations
Data management method of embedded memory database, terminal equipment and medium
CN112115150A
Relational memory database system
CN113157692A
