Database query heterogeneous acceleration method based on Internet-on-chip
By using on-chip Internet-based 2D-Mesh network and NoC interconnection in database queries, the frequent data interaction problems caused by multi-operation fusion tasks in traditional heterogeneous platforms are solved, the computing efficiency of database queries is improved, and flexible expansion and Rapid deployment.
Patent Information
- Application Number
- CN202411068243.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-12-06
AI Technical Summary
When traditional heterogeneous platforms handle multi-operation converged database query tasks, due to the independence of computing units, the host and device terminals frequently interact with data, which reduces the acceleration performance of query operations.
Using 2D-Mesh network based on the on-chip Internet network, the computing unit and storage unit are used as nodes to form an efficient computing system, and efficient data access and forwarding between computing units is achieved through the NoC Internet network, supporting single-task and multi-task fusion operations. Mode, using CPU+FPGA heterogeneous platform to perform database query heterogeneous acceleration.
It effectively avoids the acceleration performance degradation caused by frequent data exchange between the host and the device, improves the computing efficiency of database query operations, and supports flexible expansion and rapid deployment and version iteration.
Smart Images

Figure CN119088544A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of database query, on-chip interconnection network and heterogeneous acceleration, and in particular to a database query heterogeneous acceleration method based on an on-chip interconnection network. Background Art
[0002] In recent years, the database industry has developed rapidly. Database systems have become the integration of the three basic technologies of computing, storage, and network. How to introduce high-performance computing chips into existing database systems and build a new database system with computer processors as the main and new chips as the auxiliary has gradually received more and more attention from academia and industry, and has become the development trend of database systems. Therefore, database systems are developing in the direction of sending data-intensive operations and computing-intensive operations to heterogeneous platforms for computing. Traditional heterogeneous platforms have obvious computing performance improvements for single operations in database query operations, but when a query task contains multiple basic operations, due to the independence of computing units in traditional heterogeneous platforms, when processing multi-operation fusion tasks, data needs to frequently interact between the host and the device to complete data access between computing units. This data access method greatly reduces the acceleration performance of query operations. Therefore, how to avoid frequent data interaction between the host and the device when processing multi-operation fusion tasks has become a key research direction for database query heterogeneous acceleration. Summary of the invention
[0003] In order to solve the above technical problems, the present invention provides a database query heterogeneous acceleration method based on an on-chip interconnect network.
[0004] The technical solution of the present invention is:
[0005] A database query heterogeneous acceleration method based on an on-chip interconnect network uses the interconnect network to take computing units and storage units as nodes to form a computing system through 2D-Mesh networking. When processing multi-operation fusion tasks, the computing system selects corresponding computing units from the network nodes to form a pipeline for operation according to the basic operations contained in the query task, and the intermediate results generated are cached in the storage units in the network nodes.
[0006] The present invention is based on a CPU+FPGA heterogeneous platform. Compared with the traditional heterogeneous platform, the computing units are independent of each other. When processing multi-operation fusion tasks, data needs to be frequently forwarded between the host and the device to complete the data interaction between the computing units. This solution adopts a 2D-Mesh network topology and uses the computing units and storage units as network nodes based on the NoC interconnection network to form an efficient computing system, thereby realizing efficient data access and forwarding between different computing units through different memory units.
[0007] The basic computing units of database query operations include sorting computing units, aggregation computing units, filtering computing units, and connection computing units. The computing system supports single-task and multi-task fusion computing modes, and supports efficient parallel pipeline computing. Single tasks include F, S, A, and J, and fusion tasks include F+S, F+J, F+S+J, F+A, S+A, and S+J, where S (Sort) represents sorting operations, A (Aggregation) represents aggregation operations, F (Filter) represents filtering operations, and J (Join) represents connection operations.
[0008] The computing system composed of the on-chip network includes a task parsing unit, a task queue, a task scheduling unit, a sorting computing unit, an aggregation computing unit, a filtering computing unit, a connection computing unit, a node interconnection unit, a NoC protocol conversion unit and different types of memory units. The NoC protocol conversion unit includes a data encoding unit, a transceiver packet buffer unit, a state control unit and a data decoding unit. After receiving parameters or data to be processed, the data encoding unit encodes them into a data format supported by the NoC protocol and caches them in the sending buffer unit. When the state control unit is in a ready-to-send state, the data is sent to the node interconnection unit. On the contrary, when the state control unit is in a ready-to-receive state, the data from the node interconnection unit is received first, and the NoC protocol decoding is completed by the data decoding unit and the data is cached in the receiving buffer unit, waiting for the computing unit in the node to process.
[0009] When the host sends a single acceleration task and the data to be processed to the acceleration card, the task parsing unit analyzes the task type and caches the task to be calculated in the task queue, and the data to be processed is cached in the global memory unit G. When the task scheduling unit detects that there are active tasks in the task queue, the control parameters will be encoded and packaged into a data format supported by the NoC protocol through the NoC protocol conversion unit and forwarded to the node interconnection unit. Assuming that there is a J operation in the task queue, the interconnection unit will send it to the node where the connected computing unit is located. At the same time, the computing unit sends a memory access request to the global memory unit G through the node interconnection unit according to the parameter information. After that, the connected computing unit starts to build and detect operations based on the read data, and the intermediate results are stored in the local memory unit P4 of the computing unit. When the operation is completed, the final connection result is returned to the global memory G and read back by the host.
[0010] When the host sends a fusion task, the task parsing unit obtains the task type through analysis. Assuming the task type is F+S, that is, the F operation is executed first and then the S operation is executed. Then the task type is cached in the task queue, and the data to be processed is cached in the global storage unit G. The task scheduling unit first sends the task to the filtering calculation unit according to the task type in the queue. The calculation unit reads data from the global memory unit G for calculation, and caches the intermediate results of the calculation in the shared memory unit L. Then the sorting calculation unit is activated, and the intermediate data in the shared memory unit L is indirectly accessed through the directly connected node interconnection unit and sorting operation is performed. The result is cached in the shared memory unit L. During this period, multiple data iterations occur according to the sorting algorithm and are finally merged and output to the global memory unit G and read back by the host.
[0011] Beneficial Effects
[0012] It effectively avoids the problem of frequent data exchange between the host and device sides in traditional heterogeneous platforms, which leads to decreased acceleration performance. It makes the data exchange between various computing units and storage units more unified and efficient, greatly improving the computational efficiency of database query operations. At the same time, the Internet network supports flexible expansion, rapid deployment and version iteration. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 A schematic diagram of the working platform of the present invention;
[0014] Figure 2 This is a schematic diagram of a database heterogeneous acceleration framework based on NoC;
[0015] Figure 3 It is a schematic diagram of the NoC protocol conversion unit framework. DETAILED DESCRIPTION
[0016] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0017] In view of the problem that the computing units of traditional heterogeneous platforms are independent of each other, when processing multi-operation fusion tasks, data needs to frequently interact between the host and the device, which leads to a significant decrease in acceleration performance. The present invention proposes a database query heterogeneous acceleration method based on NoC (Network-on-Chip). This method uses the Internet to use computing units and storage units as nodes to perform 2D-Mesh networking to form a computing system.
[0018] When processing multi-operation fusion tasks, the computing system selects corresponding computing units from the network nodes to form a pipeline for calculation according to the basic operations contained in the query task, and caches the intermediate results in the storage units in the network nodes, effectively avoiding the problem of frequent data exchange between the host and device ends in traditional heterogeneous platforms leading to reduced acceleration performance, making the data exchange between each computing unit and storage unit more unified and efficient, greatly improving the computational efficiency of database query operations. At the same time, the Internet supports flexible expansion, rapid deployment and version iteration.
[0019] The present invention is based on a heterogeneous platform of CPU+FPGA, adopts a 2D-Mesh network topology, and interconnects computing units and storage units as network nodes based on NoC to form a computing system, so as to achieve efficient access and forwarding of data between different computing units through storage units. The specific process is as follows:
[0020] S1) The host generates a database application task, calls the kernel API function integrated in OpenCL, transfers the relevant register parameters to the heterogeneous accelerator card on the device side through XDMA, transfers the data to be calculated from the host memory to the global memory unit G on the device side, and generates a start signal through the Xilinx Runtime API.
[0021] S2) The relevant register parameters are sent to the task parsing unit through XDMA, and the operation type contained in the task is obtained through parsing, and the operation type is cached in the task queue, and the task scheduling unit is notified to process. The task scheduling unit indexes the relevant computing unit through the interconnection unit according to the operation type cached in the queue and starts the relevant operation.
[0022] S3) Assuming that the task only contains a single operation J, the task scheduling unit encodes the relevant parameters through the NoC protocol conversion unit, and then forwards them to the node interconnection unit. The interconnection unit indexes the corresponding connection calculation unit node according to the parameter information and starts the operation. The connection calculation unit reads data from the global memory unit G through the node interconnection network to build and detect the connection. The intermediate results are not returned to the global memory unit G but cached in the local memory unit P4 in the node. The final connection result generated after multiple iterations is cached in the global memory unit G through the interconnection network via the NoC protocol conversion unit.
[0023] S4) Assuming that the task is of fusion type and includes two operations F+S, the task scheduling unit forwards the parameters to the node interconnection unit through the NoC protocol conversion unit, and then the interconnection unit activates the corresponding filtering calculation unit and sorting calculation unit nodes according to the parameter information and starts related operations. The filtering calculation unit reads data from the global memory unit G through the interconnection unit for calculation. The intermediate results generated are not cached in the local memory unit P2 inside the node, but forwarded to the shared memory unit L through the node interconnection unit. After that, the sorting calculation unit receives the data ready flag of the filtering calculation unit and the starting address information of the data, and starts to read the intermediate results of the filtering calculation unit operation from the shared memory unit L for sorting operations, forming a pipeline. The intermediate results generated by the sorting calculation unit are cached in the local memory unit P1 in the node. After multiple iterative operations, the final sorting results generated are cached in the global memory unit G through the interconnection unit via the NoC protocol conversion unit.
[0024] S5) After completing the above S3) or S4), the host detects the flag signal indicating that the task operation is completed, accesses the global memory unit G through XDMA, synchronizes the final operation result stored therein to the host memory, and finally terminates the kernel and releases the allocated related computing resources, waiting for the next computing task.
[0025] The above description is only a preferred embodiment of the present invention, which is only used to illustrate the technical solution of the present invention, and is not used to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A database query heterogeneous acceleration method based on an on-chip interconnect network, characterized in that: The computing units and storage units are used as nodes in the interconnected network to form a computing system through 2D-Mesh networking. When processing multi-operation fusion tasks, the computing system selects corresponding computing units from the network nodes to form a pipeline for calculation according to the basic operations contained in the query task, and the intermediate results are cached in the storage units in the network nodes.
2. The method according to claim 1, characterized in that The computing units for database query operations include sorting computing units, aggregation computing units, filtering computing units, and connection computing units. The computing system supports single-task and multi-task fusion computing modes, and supports efficient parallel pipeline computing. Single tasks include F, S, A, and J, and fusion tasks include F+S, F+J, F+S+J, F+A, S+A, and S+J, where S stands for Sort, A stands for Aggregation, F stands for Filter, and J stands for Join.
3. The method according to claim 1, characterized in that The computing system includes a task parsing unit, a task queue, a task scheduling unit, a sorting computing unit, an aggregation computing unit, a filtering computing unit, a connection computing unit, a node interconnection unit, a NoC protocol conversion unit and different types of memory units.
4. The method according to claim 3, characterized in that The NoC protocol conversion unit includes a data encoding unit, a packet receiving and sending buffer unit, a state control unit and a data decoding unit. After receiving parameters or data to be processed, the data encoding unit encodes them into a data format supported by the NoC protocol and buffers them in the sending buffer unit. When the state control unit is in a ready-to-send state, the data is sent to the node interconnection unit. On the contrary, when the state control unit is in a ready-to-receive state, data from the node interconnection unit is received first, and the NoC protocol decoding is completed by the data decoding unit and the data is buffered in the receiving buffer unit, waiting for processing by the computing unit in the node.
5. The method according to claim 4, characterized in that When the host sends a single acceleration task and the data to be processed to the acceleration card, the task parsing unit analyzes the task type and caches the task to be calculated into the task queue, and the data to be processed is cached into the global memory unit G; When the task scheduling unit detects that there are active tasks in the task queue, the control parameters will be packaged into a data format supported by the NoC protocol through the NoC protocol conversion unit and forwarded to the node interconnection unit.
6. The method according to claim 5, characterized in that If there is only a single operation in the task queue, the interconnection unit will send it to the node where the connection computing unit is located. At the same time, the connection computing unit sends a memory access request to the global memory unit G through the node interconnection unit according to the parameter information. After that, the connection computing unit starts to build and detect operations based on the read data. The intermediate results are stored in the local memory unit P4 of the computing unit. When the operation is completed, the final connection result is returned to the global memory unit G and read back by the host.
7. The method according to claim 4, characterized in that When the host sends a fusion task, the task parsing unit obtains the task type through analysis, and then caches the task type in the task queue. At the same time, the data to be processed is cached in the global storage unit G. The task scheduling unit first sends the task to the filtering calculation unit according to the task type in the queue. The filtering calculation unit reads data from the global memory unit G for calculation, and caches the intermediate results of the calculation in the shared memory unit L. Then the sorting calculation unit is activated, and the intermediate data in the shared memory unit L is indirectly accessed through the directly connected node interconnection unit and sorting is performed. The results are cached in the shared memory unit L. During this period, several data iterations occur according to the sorting algorithm and are finally merged and output to the global memory unit G and read back by the host.
8. The method according to claim 6 or 7, characterized in that: The host detects the flag signal indicating that the task operation is completed, accesses the global memory unit G through XDMA, synchronizes the final operation result stored in it to the host memory, and finally terminates the kernel and releases the allocated related computing resources, waiting for the next computing task.
