Tensioning heterogeneous data processing method and device, equipment and storage medium

By mapping relational algebra operators to tensor execution operators and dynamically scheduling them to the CPU or DPU for execution, the memory bandwidth and data movement overhead problems of OLAP systems are solved, achieving efficient data processing and performance improvement.

CN122019588APending Publication Date: 2026-05-12SHANGHAI JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI JIAOTONG UNIV
Filing Date
2025-12-24
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing online analytical processing (OLAP) systems suffer from performance bottlenecks due to memory bandwidth and data movement overhead, which prevent them from effectively utilizing the CPU's computing power. As a result, the overall performance is limited by the data transfer rate between main memory and CPU cache.

Method used

The tensor heterogeneous data processing method is adopted to map relational algebra operators to tensor execution operators, and dynamically schedule them to the CPU or DPU for execution through the tensor execution engine. This utilizes the high bandwidth and parallelism of PIM while retaining the global control and complex computing capabilities of the CPU.

Benefits of technology

By using dynamic scheduling and heterogeneous execution, data transfer between the host and memory is reduced, improving the overall throughput and data processing efficiency of the system, and achieving true parallel computing and performance acceleration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122019588A_ABST
    Figure CN122019588A_ABST
Patent Text Reader

Abstract

The invention provides a tensorized heterogeneous data processing method and device, equipment and a storage medium. The method comprises the steps of obtaining a high-level query statement corresponding to data in a to-be-processed database table; the advanced query statement is analyzed, a logic execution plan corresponding to the advanced query statement is obtained, and the logic execution plan comprises a relational algebraic operator; mapping the relational algebraic operator into a tensor execution operator based on a query planner; the tensor execution operator is dynamically scheduled to a CPU or a DPU end for execution through a tensor execution engine, in the method, a relational algebraic operator is mapped into the tensor execution operator based on a query planner, the tensor execution operator is dynamically scheduled to the CPU or the DPU end for execution through scheduling of the tensor execution engine, high bandwidth and parallelism in the PIM can be fully utilized, and the performance of the PIM is improved. And meanwhile, the global control and complex calculation capability of the CPU is reserved, and the data processing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of data processing technology and relates to a tensor heterogeneous data processing method, apparatus, device, and storage medium. Background Technology

[0002] Currently, mainstream Online Analytical Processing (OLAP) systems are generally built on a general computing paradigm centered around a central processing unit (CPU). Systems such as MonetDB, Vectorwise, ClickHouse, and DuckDB share highly similar technology stacks: they generally employ columnar storage models to optimize data compression rates and sequential I / O efficiency, and combine vectorized execution engines with multi-threaded parallelism to maximize CPU throughput, thereby handling the analytical query load of large-scale data.

[0003] However, the performance bottleneck of such systems primarily stems from memory bandwidth and data movement overhead, rather than the CPU's computing power itself. Despite the powerful computing capabilities of modern CPUs, the overall system performance remains constrained by the data transfer rate between main memory and CPU cache, given the continuous expansion of data volume and increasingly complex query loads. This phenomenon, known as the "memory wall" problem, profoundly reveals the fundamental imbalance caused by the rate of increase in processor computing speed far exceeding the rate of increase in memory access speed.

[0004] Therefore, how to reduce data transfer between the host and memory and improve the overall system throughput has become an urgent technical problem to be solved. Summary of the Invention

[0005] This application provides a tensor heterogeneous data processing method, apparatus, device, and storage medium for dynamically executing data processing tasks on a CPU or DPU, thereby improving data processing efficiency.

[0006] In a first aspect, this application provides a tensor-based heterogeneous data processing method, the method comprising: obtaining a high-level query statement corresponding to data in a database table to be processed; parsing the high-level query statement to obtain a logical execution plan corresponding to the high-level query statement, the logical execution plan including relational algebra operators; mapping the relational algebra operators to tensor execution operators based on a query planner; and dynamically scheduling the tensor execution operators to the CPU or DPU for execution through a tensor execution engine.

[0007] In this application, a set of heterogeneous execution tensor operators suitable for both CPU and PIM are defined by mapping relational algebra operators to tensor execution operators based on a query planner. This innovation enables the unification of data representation and computational semantics between CPU and PIM. This technological innovation shields the hardware details of the PIM side, simplifies the programming complexity of upper-layer applications, and provides a solid foundation for subsequent SQL mapping and execution. The tensor execution operators are dynamically scheduled to the CPU or DPU for execution through the scheduling of the tensor execution engine, which can make full use of the high bandwidth and parallelism within the PIM while retaining the CPU's ability to perform global control and complex calculations.

[0008] In one implementation of the first aspect, before obtaining the advanced query statement corresponding to the data in the database table to be processed, the method further includes: determining the database table to be processed; and loading the data in the database table to the CPU and DPU respectively.

[0009] In one implementation of the first aspect, the query planner is also responsible for synchronizing data across devices, ensuring data consistency and coordination between the CPU and DPU ends, and guaranteeing the correct execution of tensor operators on heterogeneous hardware.

[0010] In one implementation of the first aspect, the tensor execution operator is dynamically scheduled to be executed on the CPU or DPU by the tensor execution engine, including: marking the tensor execution operator with an operator category according to the execution characteristics of the tensor execution operator, the operator category including CPU-friendly, DPU-friendly, and CPU-DPU hybrid execution; the tensor execution engine dynamically schedules the tensor execution operator to be executed on the CPU or DPU based on the operator category.

[0011] In one implementation of the first aspect, the tensor execution engine dynamically schedules the tensor execution operator to be executed on the CPU or DPU based on the operator category, including: if the operator category is CPU-friendly, the tensor execution engine statically offloads the tensor execution operator corresponding to the operator category to the CPU for execution; if the operator category is DPU-based, the tensor execution engine statically offloads the tensor execution operator corresponding to the operator category to the DPU for execution; if the operator category is a CPU-DPU hybrid execution, the tensor execution engine dynamically adjusts the execution flow of the tensor execution operator corresponding to the operator category to be executed on the CPU or DPU.

[0012] In one implementation of the first aspect, the method further includes: mapping columnar data in the database table to be processed into a unified tensor structure; the tensor execution operator performs corresponding data processing on the CPU or DPU based on the tensor structure.

[0013] In one implementation of the first aspect, the relational algebra operator includes at least one of Agg, Join, and Filter.

[0014] Secondly, this application provides a tensor heterogeneous data processing device, the device comprising: an advanced query statement acquisition module, used to acquire advanced query statements corresponding to database tables to be processed; a logical execution plan determination module, used to parse and process the advanced query statements to obtain logical execution plans corresponding to the advanced query statements, the logical execution plans including relational algebra operators; a mapping module, used to map the relational algebra operators to tensor execution operators based on a query planner; and an execution module, used to dynamically schedule the tensor execution operators to the CPU or DPU for execution through a tensor execution engine.

[0015] Thirdly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the tensor quantization heterogeneous data processing method described in any one of the first aspects of embodiments of this application.

[0016] Fourthly, embodiments of this application provide an electronic device, the electronic device comprising: a memory storing a computer program; and a processor communicatively connected to the memory, which executes the tensor quantization heterogeneous data processing method as described in any one of the first aspects of this application when the computer program is invoked.

[0017] As described above, the tensor quantization heterogeneous data processing method, apparatus, device, and storage medium described in this application have the following beneficial effects:

[0018] 1) The query planner provided in this application maps relational algebra operators to tensor execution operators, defining a set of heterogeneous execution tensor operators applicable to both CPU and PIM. This innovation unifies data representation and computational semantics between CPU and PIM. This technological innovation shields the hardware details of the PIM, simplifies the programming complexity of upper-layer applications, and provides a solid foundation for subsequent SQL mapping and execution. The tensor execution operators are dynamically scheduled to the CPU or DPU for execution through the scheduling of the tensor execution engine, which can fully utilize the high bandwidth and parallelism within the PIM while retaining the CPU's ability to perform global control and complex calculations.

[0019] 2) In this embodiment of the application, the data in the database table is loaded onto the CPU and DPU respectively. After the CPU and DPU have copies of the data, the CPU and DPU can perform different tasks on the data simultaneously to form a pipeline or parallel processing, realize true parallel computing, and provide a sufficient data foundation to accelerate data processing.

[0020] 3) In this embodiment of the application, tensor execution operators are categorized into CPU-friendly, DPU-friendly, and CPU-DPU hybrid execution types by marking the tensor execution operators. Based on the operator categories of the different tensor execution operators, the tensor execution engine implements dynamic scheduling at the operator level, which allows computationally intensive operators to be preferentially offloaded to the PIM for execution, making full use of the high bandwidth and parallelism within the PIM, while retaining the CPU's ability to perform global control and complex calculations, reducing data transfer between the host and memory and improving the overall system throughput.

[0021] 4) This embodiment of the application maps the columnar data in the database table to be processed into a unified tensor structure. The tensor execution operator performs corresponding data processing on the CPU or DPU based on the tensor structure, which ensures the uniformity of the tensor execution operator and the tensor structure corresponding to the columnar data in the database table, and greatly improves the processing efficiency of various data in the database table. Attached Figure Description

[0022] Figure 1 The flowchart shown is a process for processing heterogeneous tensor data provided in an embodiment of this application.

[0023] Figure 2 The flowchart shown is a data transmission method for a database table provided in an embodiment of this application.

[0024] Figure 3 The flowchart shown is a dynamic scheduling method of the tensor execution operator provided in the embodiments of this application through the tensor execution engine.

[0025] Figure 4 The flowchart shown is a dynamic scheduling method of a tensor execution operator provided in an embodiment of this application through a tensor execution engine.

[0026] Figure 5 The flowchart shown is a data processing method based on tensor structures and tensor execution operators provided in an embodiment of this application.

[0027] Figure 6 The diagram shows the execution flow framework flowchart of the analysis and processing provided in the embodiments of this application.

[0028] Figure 7 The diagram shows a comparison between the technology of this application and the prior art, as provided in the embodiments of this application.

[0029] Figure 8 The diagram shown is a structural diagram of the Zhang Quantization heterogeneous data processing device provided in an embodiment of this application.

[0030] Figure 9 The diagram shown is a structural diagram of an electronic device provided in an embodiment of this application.

[0031] Component designation explanation

[0032] S11~S14 step 83 Mapping module S21~S22 step 84 Execution module S31~S32 step 90 electronic devices S41~S43 step 91 processor S51~S52 step 92 Non-volatile storage media 80 Zhang Quantitative Heterogeneous Data Processing Device 93 System bus 81 Advanced query statement retrieval module 94 Internal memory 82 Logical execution plan determination module 95 Network interface Detailed Implementation

[0033] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.

[0034] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. Therefore, the drawings only show the components related to this application and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0035] The technical solutions in the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0036] like Figure 1 As shown in the flowchart, this application provides a method for processing heterogeneous tensor data. Figure 1 As shown, the tensor quantization heterogeneous data processing method provided in this application includes the following steps S11 to S14.

[0037] S11, retrieve the advanced query statement corresponding to the data in the database table to be processed.

[0038] For example, the database tables to be processed can be salary tables, product information tables, order tables, etc.

[0039] It should be noted that the types of database tables to be processed listed in the above examples are only for illustrative purposes. In actual applications, any suitable database table can be selected according to specific application requirements, and this application does not impose any restrictions on this.

[0040] Examples of advanced query statements include SQL queries.

[0041] S12, the advanced query statement is parsed and processed to obtain the logical execution plan corresponding to the advanced query statement, the logical execution plan including relational algebra operators.

[0042] For example, the process of transforming a high-level query statement into a logical execution plan is the cornerstone of database query optimization. It transforms a declarative request ("What do I want?") into a procedural, relational algebra-based, equivalent logical execution plan ("What steps should the system take to retrieve this information?").

[0043] In some embodiments, the relational algebra operator includes at least one of Agg, Join, and Filter.

[0044] It should be noted that the multiple relational algebra operators listed in the above examples are merely illustrative. In practical applications, other suitable relational algebra operators can be selected according to specific application requirements, and this application does not impose any restrictions on this.

[0045] S13, based on the query planner, the relational algebra operators are mapped to tensor execution operators.

[0046] Specifically, the query planner maps the relational algebra operators to tensor execution operators. Through this mapping process, the query planner can transform traditional relational queries into a unified tensor computation graph representation, thereby achieving consistent expression of operator semantics across heterogeneous hardware. The generated tensor execution plan is provided as input to the execution engine module, which is responsible for the actual operator scheduling and execution location allocation (CPU or PIM). This design decouples the query logic from the underlying execution environment, giving the system good scalability and hardware portability.

[0047] It should be noted that the PIM terminal consists of multiple embedded computing units (Data Processing Units, DPUs), which can perform parallel computations on data directly within the storage chip, handling the execution of data-intensive tensor operators. Communication between the host and the PIM terminal is achieved through a DDR4 interface or memory bus, enabling instruction issuance and cross-device data transfer.

[0048] In some embodiments, the query planner is also responsible for synchronizing data across devices, ensuring data consistency and coordination between the CPU and DPU, and guaranteeing the correct execution of tensor operators on heterogeneous hardware.

[0049] Specifically, tensor execution describes operator dependencies, tensor data flow, and the distribution characteristics of operators on heterogeneous devices.

[0050] S14, the tensor execution operator is dynamically scheduled to the CPU or DPU for execution by the tensor execution engine.

[0051] Specifically, the tensor execution engine module is responsible for dynamically scheduling and managing the execution of tensor operators between the CPU and PIM, as well as the memory management of table data. On the PIM device side, the execution engine adopts a unified device kernel entry point and data layout, calling the corresponding PIM-side operator kernel through a function ID mapping mechanism. This reduces frequent program loading and initialization overhead, thereby significantly improving system execution efficiency. On the CPU side, the memory pool is responsible for the unified management of host-side data replicas, ensuring data consistency and efficient access, and supporting data collaboration and caching optimization between PIM and the host.

[0052] This application provides a tensor-based heterogeneous data processing method, comprising: obtaining a high-level query statement corresponding to data in a database table to be processed; parsing the high-level query statement to obtain a logical execution plan corresponding to the high-level query statement, wherein the logical execution plan includes relational algebra operators; mapping the relational algebra operators to tensor execution operators based on a query planner; and dynamically scheduling the tensor execution operators to the CPU or DPU for execution through a tensor execution engine. This method, based on the query planner mapping relational algebra operators to tensor execution operators, defines a set of heterogeneous execution tensor operators applicable to both CPU and PIM. This innovation unifies data representation and computational semantics between CPU and PIM. This technological innovation shields the hardware details of the PIM, simplifies the programming complexity of upper-layer applications, and provides a solid foundation for subsequent SQL mapping and execution. The tensor execution operators are dynamically scheduled to the CPU or DPU for execution through the scheduling of the tensor execution engine, which can fully utilize the high bandwidth and parallelism within the PIM while retaining the CPU's ability to perform global control and complex calculations.

[0053] like Figure 2 As shown, this application embodiment provides a flowchart of a data transmission method for a database table, as follows: Figure 2 As shown, the data transmission method for the database table provided in this application embodiment includes the following steps S21 to S22.

[0054] S21, Determine the database table to be processed.

[0055] For example, the database table to be processed could also be an inventory table, an employee information table, etc.

[0056] It should be noted that the specific types of database tables to be processed listed in the above examples are only for illustrative purposes. In actual applications, any suitable database table can be selected according to specific application requirements, and this application does not impose any restrictions on this.

[0057] S22, load the data from the database table to the CPU and DPU respectively.

[0058] For example, data from the database table can be loaded onto the CPU and DPU respectively by reading offline data from the disk. The purpose is to ensure that there is no additional I / O overhead caused by frequent disk reads during execution.

[0059] It should be noted that the methods of loading data from the database table to the CPU and DPU respectively as illustrated in the above examples are merely for illustrative purposes. In actual applications, any other suitable methods can be used to load data from the database table to the CPU and DPU respectively based on specific application requirements. This application does not impose any restrictions on this.

[0060] This application provides a method for data transmission of a database table. In this method, the database table to be processed is determined. The data in the database table is loaded onto the CPU and DPU respectively. Loading the data into the CPU and DPU before obtaining the high-level query statement corresponding to the data in the database table ensures that there is no additional I / O overhead due to frequent disk reads during execution. This avoids situations where the DPU cannot process the data in a timely manner when the data in the database table is only located on the CPU, or where the CPU cannot process the data in a timely manner when the tensor execution operator is dynamically scheduled to the CPU by the tensor execution engine. In this method, having copies of the data on both the CPU and DPU provides a sufficient data foundation for the CPU and DPU to simultaneously execute different tasks on this data, forming a pipeline or parallel processing, achieving true parallel computing, and accelerating data processing.

[0061] like Figure 3 As shown, this application embodiment provides a flowchart of a dynamic scheduling method for tensor execution operators through a tensor execution engine, as follows: Figure 3 As shown, the data transmission method for the database table provided in this application embodiment includes the following steps S31 to S32.

[0062] S31, Based on the execution characteristics of the tensor execution operator, label the tensor execution operator with an operator category.

[0063] The operator categories include CPU-friendly, DPU-friendly, and CPU-DPU hybrid execution.

[0064] For example, tensor execution operators with low data locality, random access mode, and cross-tuple dependencies are statically offloaded to the CPU for execution, and the operator category corresponding to the tensor execution operator is CPU friendly.

[0065] For example, tensor execution operators with good data locality, rule-based access patterns, and no excessive data dependencies are statically unloaded to the DPU. The operator category corresponding to this tensor execution operator is DPU-friendly.

[0066] For example, the tensor execution engine dynamically adjusts the execution flow on the CPU or DPU side based on the tensor characteristics of the operator execution (such as the size of the intermediate tensor cardinality and whether it is ordered). The operator category corresponding to this tensor execution operator is CPU-DPU hybrid execution.

[0067] S32, the tensor execution engine dynamically schedules the tensor execution operator to the CPU or DPU for execution based on the operator category.

[0068] This application provides a method for dynamically scheduling tensor execution operators through a tensor execution engine. In this method, tensor execution operators are categorized based on their execution characteristics. These operator categories include CPU-friendly, DPU-friendly, and CPU-DPU hybrid execution. The tensor execution engine dynamically schedules the tensor execution operators to the CPU or DPU for execution based on the operator category. By categorizing tensor execution operators into CPU-friendly, DPU-friendly, and CPU-DPU hybrid execution types, the tensor execution engine achieves operator-level dynamic scheduling based on these different operator categories. This allows computationally intensive operators to be preferentially offloaded to the PIM (Personal Memory Instance) for execution, fully utilizing the high bandwidth and parallelism within the PIM, while preserving the CPU's ability for global control and complex calculations. This reduces data transfer between the host and memory and improves overall system throughput.

[0069] like Figure 4 As shown in the figure, this application embodiment provides a flowchart of another dynamic scheduling method for tensor execution operators through a tensor execution engine, as follows: Figure 4 As shown, another tensor execution operator provided in this application embodiment uses a dynamic scheduling method of a tensor execution engine, which includes the following steps S41 to S43.

[0070] S41, if the operator category is CPU-friendly, the tensor execution engine statically unloads the tensor execution operator corresponding to the operator category to the CPU for execution.

[0071] S42, if the operator category is executed on the DPU side, then the tensor execution engine statically unloads the tensor execution operator corresponding to the operator category to the DPU side for execution.

[0072] S43, if the operator category is CPU-DPU hybrid execution, then the tensor execution engine will dynamically adjust the execution flow of the tensor execution operator corresponding to the operator category to be executed on the CPU or DPU side.

[0073] This application provides another method for dynamically scheduling tensor execution operators through a tensor execution engine. In this method, if the operator category is CPU-friendly, the tensor execution engine statically offloads the tensor execution operator corresponding to the operator category to the CPU for execution; if the operator category is DPU-based, the tensor execution engine statically offloads the tensor execution operator corresponding to the operator category to the DPU for execution; if the operator category is a CPU-DPU hybrid execution, the tensor execution engine dynamically adjusts the execution flow of the tensor execution operator corresponding to the operator category to execute on the CPU or DPU. Through the operator category corresponding to the tensor execution operator, the tensor execution engine can accurately allocate tensor execution operators.

[0074] like Figure 5 As shown, this application provides a flowchart of a data processing method based on tensor structures and tensor execution operators, as illustrated in the following embodiment. Figure 5 As shown, the data processing method based on tensor structure and tensor execution operator provided in this application embodiment includes the following steps S51 to S52.

[0075] S51 maps columnar data in the database table to be processed into a unified tensor structure.

[0076] Specifically, mapping database tables to tensors is a systematic project that physicalizes logical relational data into numerical matrices. Its core implementation path is: extraction (reading columns from database tables) -> cleaning (handling missing values) -> transformation (numerization, scaling, encoding) -> assembly (constructing tensor structures).

[0077] S52, the tensor execution operator performs corresponding data processing on the CPU or DPU based on the tensor structure.

[0078] For example, the data processing includes aggregation (Agg), joining, etc.

[0079] This application provides a data processing method based on tensor structures and tensor execution operators. In this method, columnar data in a database table to be processed is mapped to a unified tensor structure. The tensor execution operators perform corresponding data processing on the CPU or DPU based on the tensor structure, ensuring the uniformity between the tensor execution operators and the tensor structures corresponding to the columnar data in the database table. The multidimensional array structure of tensors is naturally suitable for parallelization. Once data is mapped to tensors, both CPU vector instructions and multiple cores of the DPU can process it in batches using the same method. Compared to the traditional database processing, which is a serial logic of "taking a row and processing it row by row," tensor operators are a parallel logic of "taking a matrix and processing it all at once." This paradigm shift brings orders of magnitude performance improvements, greatly enhancing the processing efficiency of various data in the database table.

[0080] like Figure 6 As shown in the figure, this application embodiment provides an execution flow framework flowchart for analysis and processing, as follows: Figure 6 As shown, the flowchart includes: query parsing and optimization, physical planning, and tensor operator hardware execution.

[0081] in, Figure 6 The leftmost sections (Parsing & Binding) and (Logical Planning) represent query parsing and optimization. This part belongs to the general process of analysis and processing, where incoming high-level query statements, such as SQL queries, are parsed into a logical execution plan and optimized by upper-level software.

[0082] Figure 6 The leftmost step, Physical Planning, builds upon the logical plan. The system calls the Tensor-Aware Query Planner to map relational algebra operators (such as Aggregation, Join, and Filter) in the logical plan to tensor operators. Furthermore, the query planner is responsible for synchronizing data across devices, ensuring data consistency and coordination between the CPU and PIM ends, thereby guaranteeing the correct execution of tensor operators on heterogeneous hardware. This stage outputs a tensor-quantized physical execution plan, describing operator dependencies, tensor data flow, and the distribution characteristics of operators across heterogeneous devices.

[0083] Figure 6The leftmost tensor operator hardware execution (Execution Engine): The tensor execution operator is finally dynamically scheduled to be executed on the CPU (i.e., Host CPU) or PIM (DPU) through the scheduling of the Tensor-Based Execution Engine.

[0084] This application embodiment was experimentally verified on a dual-socket server platform. The host side used two Intel Xeon Silver 4316 processors (2.3 GHz, 20 cores / 40 threads), 256 GB of DDR4 memory, and the operating system was Ubuntu 22.04 LTS. The PIM side adopted the UPMEM DIMM architecture, configured with 16 8 GB PIM DIMMs, each containing 128 Data Processing Units (DPUs), for a total of 2048 DPU cores, with a DPU clock speed of approximately 350 MHz. The host and PIM communicated through the DDR4 channel. The PIM internally contained a tiered storage structure of 64 MB MRAM and 64 KB WRAM. The software environment was based on UPMEM SDK version 2024.2.0, the compiler used the LLVM 14 toolchain, and the host-side program was implemented in C++, using the memory channel to complete the control interaction with the PIM.

[0085] To verify the effectiveness and generality of this application, the widely adopted TPC-H benchmark suite was selected for performance evaluation. TPC-H is a standardized test suite for decision support and online analytical processing (OLAP), containing 22 complex queries (Query 1–22) covering various typical analytical operations such as selection, aggregation, join, and nested subqueries, which can comprehensively reflect the system's performance in data-intensive computing and multi-table analysis scenarios.

[0086] In this embodiment, the system executed all 22 TPC-H queries on the commercial UPMEM PIM platform, with a test data size of SF=100 (approximately 100 GB of data). The experimental results are as follows... Figure 7 As shown. Figure 7As shown in (a), among 22 TPC-H queries, this application achieved an overall speedup of up to 13.1 times and an average of 2.58 times compared to DuckDB. Specifically, data-intensive aggregation and scanning queries (such as Q10, Q13, Q15, and Q19) showed the most significant speedup on the PIM platform; while for queries with lower computational density or global dependencies (such as Q2, Q14, and Q17), the overall speedup was relatively smaller because some operators needed to be executed on the CPU. Figure 7 (b) shows the time composition of different execution phases.

[0087] In summary, this application effectively overcomes the "memory wall" limitation of traditional CPU-dominated OLAP systems through tensor abstraction, operator-level heterogeneous scheduling, and unified data layout design, achieving end-to-end query acceleration on the real UPMEM PIM hardware platform and significantly improving the system's bandwidth utilization, operator execution efficiency, and overall throughput performance.

[0088] The tensor-based heterogeneous data processing method provided in this application can be applied to e-commerce and personalized recommendation systems. The database table data consists of user behavior logs and product feature tables, containing discrete structured data such as user ID, product ID, click timestamp, product category, and price. Tensor execution operators include: Embedding Lookup, Feature Hashing, and Dot Product.

[0089] The specific processing flow includes: Advanced query statement: The system receives a request, such as "query the top 10 products with the highest similarity to those viewed by user A in the past 24 hours". Logical execution plan: Parser generates plan: Scan user log table -> Filter time range -> Join product feature table -> Rank (sorting). Mapping (core step): The query planner recognizes that the ranking criterion is "similarity", which requires the intervention of a deep learning model (such as DeepFM or DIN). The Join operation is mapped to the Embedding Lookup operator, directly retrieving the vectors of User and Item from the memory-mapped tensor table. The similarity calculation logic is mapped to a series of MatMul (matrix multiplication) tensor execution operators of Dot Product or Multilayer Perceptron (MLP). Dynamic scheduling execution: DPU side: Processes massive Embedding Lookups and vector dot products. The DPU utilizes its high-bandwidth memory to directly access feature tensors and calculates the matching scores of users with tens of thousands of candidate products in parallel. CPU side: Responsible for handling metadata filtering, Top-K ranking of the final results, and returning HTTP responses. It greatly reduces recommendation latency and achieves "search and recommendation instantly".

[0090] The tensor-based heterogeneous data processing method provided in this application can also be applied to the fields of intelligent transportation and urban brain. The corresponding database table is: road traffic sensor data table, relational algebra operators: grouping aggregation, sorting. Tensor execution operators: 3D Convolution, GNN Cell, LSTM / GRU.

[0091] The specific processing steps are as follows: Advanced query statement: The analyst initiates a query: "Predict the congestion situation in the core business district for the next 30 minutes and identify intersections with congestion risk exceeding the threshold." Logical execution plan: The parser generates a plan: Scan sensor table -> Group By intersections and time -> Aggregate to calculate average traffic flow -> Select prediction logic. Mapping (core step): The planner converts the prediction logic into a graph neural network (GNN) model. The Group By and Aggregate operations are rewritten as tensor reshape operations, transforming the table data into a spatiotemporal traffic flow tensor. The prediction logic is mapped to GNN Cell (capturing the topological connections between intersections) and LSTM (capturing temporal trends) operators.

[0092] Dynamic scheduling execution: DPU side: Performs computationally intensive 3D Convolution and GNN operations. The parallel computing architecture of the DPU is well-suited for processing graph structures and spatiotemporal sequence data. CPU side: Responsible for collecting the raw data streams from each intersection and generating traffic light control commands based on the prediction results returned by the DPU, which are then sent to the intersection control unit.

[0093] It should be noted that the tensor-based heterogeneous data processing method provided in this application embodiment can also be applied to any other suitable scenario, such as: the field of industrial Internet of Things and predictive maintenance, where the corresponding database table contains time-series sampling data from device sensors; the field of enterprise human resources and intelligent payroll planning, where the corresponding database table contains a salary table; the field of new retail and multimodal product search, where the corresponding database table contains a product information table; and the field of smart logistics and supply chain optimization, where the corresponding database table contains an order table, etc., to improve the data processing efficiency in the corresponding scenario. This application will not elaborate further on this.

[0094] The scope of protection of the Zhang Quantization heterogeneous data processing method described in this application is not limited to the execution order of the steps listed in this embodiment. Any solution implemented by adding, subtracting, or replacing steps in the prior art based on the principles of this application is included within the scope of protection of this application.

[0095] This application also provides a tensor quantization heterogeneous data processing device, which can implement the tensor quantization heterogeneous data processing method described in this application. However, the implementation device of the tensor quantization heterogeneous data processing method described in this application includes, but is not limited to, the structure of the tensor quantization heterogeneous data processing device listed in this embodiment. All structural modifications and substitutions of the prior art made based on the principles of this application are included within the protection scope of this application.

[0096] like Figure 8 As shown, in one embodiment, the Zhang quantitative heterogeneous data processing device 80 of this application includes an advanced query statement acquisition module 81, a logical execution plan determination module 82, a mapping module 83, and an execution module 84.

[0097] The advanced query statement acquisition module 81 is used to acquire the advanced query statements corresponding to the database tables to be processed.

[0098] The logical execution plan determination module 82 is used to parse and process the advanced query statement to obtain the logical execution plan corresponding to the advanced query statement. The logical execution plan includes relational algebra operators.

[0099] The mapping module 83 is used to map the relational algebra operators to tensor execution operators based on the query planner.

[0100] The execution module 84 is used to dynamically schedule the tensor execution operator to the CPU or DPU for execution through the tensor execution engine.

[0101] The structure and principle of the advanced query statement acquisition module 81, the logical execution plan determination module 82, the mapping module 83, and the execution module 84 correspond one-to-one with the steps in the above-mentioned tensor quantization heterogeneous data processing method, so they will not be described in detail here.

[0102] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, or methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules / units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or units may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of apparatuses or modules or units may be electrical, mechanical, or other forms.

[0103] The modules / units described as separate components may or may not be physically separate. The components shown as modules / units may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules / units can be selected to achieve the objectives of the embodiments of this application, depending on actual needs. For example, the functional modules / units in the various embodiments of this application may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.

[0104] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0105] This application also provides an electronic device. Figure 9 The diagram shown is a structural schematic of an electronic device 90 in one embodiment of this application. The tensor quantization heterogeneous data processing method provided in this embodiment can be applied to... Figure 9 The electronic device shown is 90, but it is not limited to this. For example... Figure 9 As shown, the electronic device 90 includes a processor 91, a memory, a system bus 93, and a network interface 95. The memory may include a non-volatile storage medium 92 and internal memory 94.

[0106] The non-volatile storage medium 92 can store an operating system and a computer program. The computer program includes program instructions that, when executed, cause the processor to perform any of the tensor-based heterogeneous data processing methods provided in the embodiments of this application.

[0107] The processor provides computing and control capabilities, supporting the operation of the entire computer device.

[0108] The internal memory 94 provides an environment for the execution of computer programs in non-volatile storage media. When the computer program is executed by the processor, it enables the processor to execute any of the tensor heterogeneous data processing methods provided in the embodiments of this application.

[0109] This network interface 95 is used for network communication, such as sending assigned tasks. Those skilled in the art will understand that... Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0110] It should be understood that processor 91 can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, the general-purpose processor can be a microprocessor or any conventional processor.

[0111] The electronic device 90 in this application embodiment may include terminal devices such as tablet computers, laptop computers, mobile phones, supercomputers, and smart wearable devices. It can also be applied to databases, servers, and service response systems based on terminal artificial intelligence. This application embodiment does not impose any restrictions on the specific type of electronic device.

[0112] For example, electronic devices can be stations (STAION, ST) in WLANs, cellular phones, cordless phones, Session Initiation Protocol (SIP) phones, Wireless Local Loop (WLL) stations, handheld devices with wireless communication capabilities, computing devices or other processing devices connected to a wireless modem, computers, laptops, handheld communication devices, handheld computing devices, and / or other devices for communicating over wireless systems, as well as next-generation communication systems, such as mobile terminals in 5G networks, mobile terminals in future evolved Public Land Mobile Networks (PLMNs), or mobile terminals in future evolved Non-terrestrial Networks (NTNs).

[0113] This application also provides a computer-readable storage medium. Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing a processor. The program can be stored in a computer-readable storage medium, which is a non-transitory medium, such as random access memory, read-only memory, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof. The storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., solid-state drive (SSD)).

[0114] This application embodiment may also provide a computer program product comprising one or more computer instructions. When the computer instructions are loaded and executed on a computing device, all or part of the processes or functions described in this application embodiment are generated. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0115] When the computer program product is executed by a computer, the computer performs the method described in the foregoing method embodiments. The computer program product can be a software installation package; when the foregoing method is required, the computer program product can be downloaded and executed on the computer.

[0116] The descriptions of the processes or structures corresponding to the above figures each have their own emphasis. For parts of a process or structure that are not described in detail, please refer to the relevant descriptions of other processes or structures.

[0117] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.

Claims

1. A method for processing heterogeneous tensor data, characterized in that, The method includes: Retrieve the advanced query statement corresponding to the data in the database table to be processed; The advanced query statement is parsed to obtain the logical execution plan corresponding to the advanced query statement, and the logical execution plan includes relational algebra operators; The relational algebra operators are mapped to tensor execution operators based on the query planner; The tensor execution operator is dynamically scheduled to be executed on the CPU or DPU by the tensor execution engine.

2. The method according to claim 1, characterized in that, Before retrieving the advanced query statement corresponding to the data in the database table to be processed, the method further includes: Identify the database tables to be processed; The data in the database table is loaded onto the CPU and DPU respectively.

3. The method according to claim 1, characterized in that: The query planner is also responsible for synchronizing data across devices, ensuring data consistency and coordination between the CPU and DPU, and guaranteeing the correct execution of tensor operators on heterogeneous hardware.

4. The method according to claim 1, characterized in that, The tensor execution operator is dynamically scheduled to the CPU or DPU for execution via the tensor execution engine, including: Based on the execution characteristics of the tensor execution operator, the tensor execution operator is categorized into operator types, including CPU-friendly, DPU-friendly, and CPU-DPU hybrid execution. The tensor execution engine dynamically schedules the tensor execution operator to the CPU or DPU for execution based on the operator category.

5. The method according to claim 4, characterized in that, The tensor execution engine dynamically schedules the tensor execution operator to the CPU or DPU for execution based on the operator category, including: If the operator category is CPU-friendly, the tensor execution engine statically unloads the tensor execution operator corresponding to the operator category to the CPU for execution; If the operator category is executed on the DPU side, then the tensor execution engine statically unloads the tensor execution operator corresponding to the operator category to the DPU side for execution; If the operator category is CPU-DPU hybrid execution, the tensor execution engine will dynamically adjust the execution flow of the tensor execution operator corresponding to the operator category to be executed on the CPU or DPU side.

6. The method according to claim 1, characterized in that, The method further includes: Map columnar data in the database tables to be processed into a unified tensor structure; The tensor execution operator performs corresponding data processing on the CPU or DPU based on the tensor structure.

7. The method according to claim 1, characterized in that, The relational algebra operators include at least one of Agg, Join, and Filter.

8. A tensor-based heterogeneous data processing device, characterized in that, The device includes: The advanced query statement acquisition module is used to obtain the advanced query statements corresponding to the database tables to be processed. The logical execution plan determination module is used to parse and process the advanced query statement to obtain the logical execution plan corresponding to the advanced query statement, wherein the logical execution plan includes relational algebra operators; The mapping module is used to map the relational algebra operators to tensor execution operators based on the query planner; The execution module is used to dynamically schedule the tensor execution operator to the CPU or DPU for execution via the tensor execution engine.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.

10. An electronic device, characterized in that, The electronic device includes: A memory that stores a computer program; The processor, which is communicatively connected to the memory, executes the method of any one of claims 1 to 7 when the computer program is invoked.