Data processing method, device and equipment

By using the prefetcher of the global and local feature fusion transformer GL-Transformer, the problem of low efficiency of the prefetch mechanism in the table lookup scheme is solved, parallel computing and fast prefetching of data are achieved, and the table lookup efficiency is improved.

CN120653299APending Publication Date: 2025-09-16CHINA MOBILE COMM LTD RES INST +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410284320.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-13
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

The prefetch mechanism of the table lookup solution in the prior art is inefficient and difficult to adapt to applications with complex access patterns, resulting in useless prefetching and high latency.

Method used

A prefetcher based on the global and local feature fusion transformer GL-Transformer is used to obtain the global features and local features of the data to be processed, obtain processing information from the cache, and use the multi-head attention mechanism and cross-attention mechanism to realize parallel computing of data.

Benefits of technology

The efficiency of the prefetch mechanism is improved, supporting fast prefetch operations, effectively speeding up the table lookup process, and reducing the probability of cache access failure and latency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120653299A_ABST
    Figure CN120653299A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method, device and equipment, and the method comprises the steps: obtaining to-be-processed data sent by a CPU; acquiring a global feature and a local feature corresponding to the data to be processed by using a prefetcher based on a GL-Transform; obtaining processing information corresponding to the to-be-processed data from a Cache according to the global features and the local features; the processing information comprises information required for processing the to-be-processed data. According to the scheme, fusion of global features and local features can be supported, so that the prefetcher is better at capturing internal correlation of the data or the features and correlation of the local features of the data and a global sequence; the multi-head attention mechanism and the cross attention mechanism of the Transformer can be utilized to realize the parallel calculation of the data; therefore, quick prefetching operation is better supported, the efficiency of a prefetching mechanism is improved, and the problem of low prefetching mechanism efficiency of a table lookup scheme in the prior art is well solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a data processing method, device and equipment. Background Art

[0002] Traditional table lookup acceleration solutions based on a combination of software and hardware mostly rely on hash tables and binary trees, resulting in slow lookup efficiency. With the development of multi-threading technology, access requests to storage devices have become more interleaved, making traditional prefetching techniques less adaptable to applications with complex access patterns and prone to unnecessary prefetching. Deep learning techniques can be applied to prefetching mechanisms to effectively avoid unnecessary prefetching. However, cache prefetching acceleration solutions based on recurrent neural networks (RNNs) suffer from the disadvantage that as the input length increases, the current hidden layer loses its memory of the previous input information. Cache prefetching acceleration solutions based on long-short-term memory (LSTM) networks also suffer from the problem that recursive structures are difficult to parallelize, and inference latency increases linearly with the input time step. Consequently, existing solutions all suffer from inefficient prefetching mechanisms for table lookups. Summary of the Invention

[0003] The object of the present invention is to provide a data processing method, apparatus and device to solve the problem of low efficiency of the prefetch mechanism of the table lookup solution in the prior art.

[0004] In order to solve the above technical problems, an embodiment of the present invention provides a data processing method, including:

[0005] Get the data to be processed sent by the central processing unit CPU;

[0006] A prefetcher based on a global and local feature fusion transformer GL-Transformer is used to obtain global features and local features corresponding to the data to be processed; and based on the global features and local features, processing information corresponding to the data to be processed is obtained from a cache Cache; the processing information includes: information required for performing processing operations on the data to be processed.

[0007] Optionally, a GL-Transformer-based prefetcher includes: an encoding layer, a global and local feature fusion GL perception network layer, and a prefetch instruction generation layer;

[0008] The method comprises: obtaining global features and local features corresponding to the data to be processed by using a prefetcher based on a global and local feature fusion transformer (GL-Transformer); and obtaining processing information corresponding to the data to be processed from a cache memory according to the global features and the local features, including:

[0009] Using the coding layer, obtaining a segmentation vector corresponding to the data to be processed; performing position coding on the segmentation vector to obtain an encoded segmentation vector; and obtaining global features and local features corresponding to the data to be processed based on the encoded segmentation vector;

[0010] Utilizing the GL perception network layer, obtaining global fusion local features according to the global features and the local features;

[0011] Utilizing the prefetch instruction generation layer, according to the global fusion of local features, obtains a prefetch instruction corresponding to the data to be processed;

[0012] The prefetch instruction is used to obtain processing information corresponding to the data to be processed from the cache.

[0013] Optionally, performing position encoding on the segment vector to obtain an encoded segment vector includes:

[0014] Performing weighted processing on the segmented vector to obtain the weighted segmented vector;

[0015] Position encoding is performed on the weighted segment vector to obtain an encoded segment vector.

[0016] Optionally, obtaining a global fusion local feature based on the global feature and the local feature includes:

[0017] A weighted average operation is performed on the global features and the local features to obtain a global fusion local feature.

[0018] Optionally, the using the prefetch instruction to obtain processing information corresponding to the to-be-processed data from a cache includes:

[0019] The prefetch instruction is used to perform a table lookup operation in a cache memory to obtain processing information corresponding to the data to be processed.

[0020] An embodiment of the present invention further provides a data processing device, including:

[0021] The first acquisition module is used to acquire the data to be processed sent by the central processing unit CPU;

[0022] The first processing module is used to use a prefetcher based on a global and local feature fusion transformer GL-Transformer to obtain global features and local features corresponding to the data to be processed; and based on the global features and local features, obtain processing information corresponding to the data to be processed from a cache Cache; the processing information includes: information required for performing processing operations on the data to be processed.

[0023] Optionally, a GL-Transformer-based prefetcher includes: an encoding layer, a global and local feature fusion GL perception network layer, and a prefetch instruction generation layer;

[0024] The method comprises: obtaining global features and local features corresponding to the data to be processed by using a prefetcher based on a global and local feature fusion transformer (GL-Transformer); and obtaining processing information corresponding to the data to be processed from a cache memory according to the global features and the local features, including:

[0025] Using the coding layer, obtaining a segmentation vector corresponding to the data to be processed; performing position coding on the segmentation vector to obtain an encoded segmentation vector; and obtaining global features and local features corresponding to the data to be processed based on the encoded segmentation vector;

[0026] Utilizing the GL perception network layer, obtaining global fusion local features according to the global features and the local features;

[0027] Utilizing the prefetch instruction generation layer, according to the global fusion of local features, obtains a prefetch instruction corresponding to the data to be processed;

[0028] The prefetch instruction is used to obtain processing information corresponding to the data to be processed from the cache.

[0029] Optionally, performing position encoding on the segment vector to obtain an encoded segment vector includes:

[0030] Performing weighted processing on the segmented vector to obtain the weighted segmented vector;

[0031] Position encoding is performed on the weighted segment vector to obtain an encoded segment vector.

[0032] Optionally, obtaining a global fusion local feature based on the global feature and the local feature includes:

[0033] A weighted average operation is performed on the global features and the local features to obtain a global fusion local feature.

[0034] Optionally, the using the prefetch instruction to obtain processing information corresponding to the to-be-processed data from a cache includes:

[0035] The prefetch instruction is used to perform a table lookup operation in a cache memory to obtain processing information corresponding to the data to be processed.

[0036] An embodiment of the present invention further provides a data processing device, comprising: a processor;

[0037] The processor is used to obtain the data to be processed sent by the central processing unit CPU;

[0038] A prefetcher based on a global and local feature fusion transformer GL-Transformer is used to obtain global features and local features corresponding to the data to be processed; and based on the global features and local features, processing information corresponding to the data to be processed is obtained from a cache Cache; the processing information includes: information required for performing processing operations on the data to be processed.

[0039] Optionally, a GL-Transformer-based prefetcher includes: an encoding layer, a global and local feature fusion GL perception network layer, and a prefetch instruction generation layer;

[0040] The method comprises: obtaining global features and local features corresponding to the data to be processed by using a prefetcher based on a global and local feature fusion transformer (GL-Transformer); and obtaining processing information corresponding to the data to be processed from a cache memory according to the global features and the local features, including:

[0041] Using the coding layer, obtaining a segmentation vector corresponding to the data to be processed; performing position coding on the segmentation vector to obtain an encoded segmentation vector; and obtaining global features and local features corresponding to the data to be processed based on the encoded segmentation vector;

[0042] Utilizing the GL perception network layer, obtaining global fusion local features according to the global features and the local features;

[0043] Utilizing the prefetch instruction generation layer, according to the global fusion of local features, obtains a prefetch instruction corresponding to the data to be processed;

[0044] The prefetch instruction is used to obtain processing information corresponding to the data to be processed from the cache.

[0045] Optionally, performing position encoding on the segment vector to obtain an encoded segment vector includes:

[0046] Performing weighted processing on the segmented vector to obtain the weighted segmented vector;

[0047] Position encoding is performed on the weighted segment vector to obtain an encoded segment vector.

[0048] Optionally, obtaining a global fusion local feature based on the global feature and the local feature includes:

[0049] A weighted average operation is performed on the global features and the local features to obtain a global fusion local feature.

[0050] Optionally, the using the prefetch instruction to obtain processing information corresponding to the to-be-processed data from a cache includes:

[0051] The prefetch instruction is used to perform a table lookup operation in a cache memory to obtain processing information corresponding to the data to be processed.

[0052] An embodiment of the present invention further provides a data processing device, comprising a memory, a processor, and a program stored in the memory and executable on the processor; the processor implements the above-mentioned data processing method when executing the program.

[0053] An embodiment of the present invention further provides a readable storage medium on which a program is stored. When the program is executed by a processor, the steps in the above-mentioned data processing method are implemented.

[0054] An embodiment of the present invention further provides a computer program product, comprising computer instructions, which implement the steps of the above-mentioned data processing method when executed by a processor.

[0055] The beneficial effects of the above technical solution of the present invention are as follows:

[0056] In the above scheme, the data processing method obtains the data to be processed sent by the central processing unit CPU; uses a prefetcher based on the global and local feature fusion transformer GL-Transformer to obtain the global features and local features corresponding to the data to be processed; and obtains the processing information corresponding to the data to be processed from the cache Cache based on the global features and local features; the processing information includes: information required for processing the data to be processed; it can support the fusion of global features and local features, so that the prefetcher is better at capturing the internal correlation of data or features and the correlation between the local features of the data and the global sequence; and the multi-head attention mechanism and cross-attention mechanism of the prefetcher (Transformer) can be used to realize parallel calculation of data; thereby better supporting the rapid prefetching operation, improving the efficiency of the prefetching mechanism, and then supporting the effective acceleration of the table lookup process, which well solves the problem of low efficiency of the prefetching mechanism of the table lookup scheme in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 Schematic diagram of a data processing method according to an embodiment of the present invention;

[0058] Figure 2 Schematic diagram of the specific implementation process of the data processing method of the embodiment of the present invention Figure 1 ;

[0059] Figure 3Schematic diagram of the specific implementation process of the data processing method of the embodiment of the present invention Figure 2 ;

[0060] Figure 4 A schematic diagram showing comparison of prefetch accuracy according to an embodiment of the present invention;

[0061] Figure 5 Schematic diagram of speedup comparison according to an embodiment of the present invention;

[0062] Figure 6 Schematic diagram of the structure of a data processing device according to an embodiment of the present invention;

[0063] Figure 7 Schematic diagram of the data processing device structure according to an embodiment of the present invention. DETAILED DESCRIPTION

[0064] In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0065] The following first introduces the relevant contents of this plan.

[0066] Future wireless networks are developing towards universal and cloud-based development. New base stations based on general-purpose hardware and cloud-based technologies will play a key role in future wireless networks. These new base stations are often built on general-purpose servers (such as central processing units (CPUs)). Because wireless networks require extremely high real-time data processing, heterogeneous accelerators such as FPGAs (field programmable gate arrays), GPUs (graphics processing units), and ASICs (application-specific integrated circuits) are often used in conjunction with the CPU. The CPU-FPGA collaborative architecture offers excellent flexibility and performance, enabling not only high-speed real-time communication processing but also meeting the multi-functional requirements of future wireless networks, including converged communications, computing, AI (artificial intelligence), and perception. This architecture holds broad application prospects in future wireless networks.

[0067] In future wireless networks, table lookups will often be required for data packets or frames, such as packet identification and classification, user identification, and load balancing. Data volumes will continue to grow, latency requirements will continue to rise, and multiple functions (communication, perception, AI, computing, etc.) and protocols (such as the Address Resolution Protocol (ARP) and the Internet Content Access Protocol (ICAP)) will be involved. A single data packet or frame will often require multiple table lookups to process, making it crucial to accelerate table lookup efficiency.

[0068] Acceleration solutions for table lookups are primarily divided into CPU-based software acceleration and CPU+GPU (or FPGA or ASIC)-based hardware-software acceleration. Software acceleration primarily uses multi-core concurrency to accelerate the table lookup process for data packets or data frames, offering flexibility and scalability. Hardware-software acceleration offloads data packets or data frames and protocols to hardware, effectively leveraging the high concurrency and low latency of hardware accelerators to complete table lookups. Comparing the two solutions, while CPU-based software acceleration offers high flexibility, it suffers from high latency and high CPU load. Hardware-software-based acceleration can leverage the value of heterogeneous hardware accelerators in future wireless networks, reduce CPU resource overhead, and effectively accelerate table lookups.

[0069] As mentioned above, hardware-software collaborative architectures typically fall into the categories of CPU+GPU, CPU+FPGA, and CPU+ASIC. Compared to ASICs and GPUs, FPGAs offer significant advantages, including shorter development cycles, pipeline and data parallelism, and the fact that registers and on-chip registers in FPGAs have their own control logic, eliminating the need for arbitration. Furthermore, as mentioned above, FPGAs can achieve microsecond latency to meet the high-speed communication processing requirements of future wireless networks. Therefore, the CPU-FPGA collaborative architecture is widely applicable in future wireless networks, ideal for achieving hardware-software collaborative acceleration.

[0070] There are many table lookup methods based on software and hardware collaboration, such as those based on hashing and TCAM (Ternary Content Addressable Memory), and lookup algorithms based on balanced binary trees and Bloom filters. These methods all share a common characteristic: slow lookup speed. Binary tree lookups require traversing most nodes in the tree, and their speed is significantly affected by the tree's depth. Hash table lookups, while faster, can generate hash collisions when the data volume is large, and these collisions become increasingly pronounced as the data size increases. Excessive hash collisions reduce the overall hash algorithm's efficiency. Furthermore, TCAM consumes significantly more energy than SRAM (Static Random Access Memory), and with the diverse and often large nature of today's protocol tables, TCAM table lookup acceleration solutions cannot meet the high-speed, low-latency requirements of modern data communications.

[0071] Based on the above, a high-speed cache acceleration solution combined with prefetching technology has been proposed under the framework of software and hardware collaboration. Among them, cache technology uses the principle of locality to make the faster cache a buffer for the memory; in order to improve the cache hit rate, prefetching technology issues prefetch requests before the cache is likely to fail by overlapping calculations and memory accesses, so that the data can be stored in the cache in advance when it is actually used, thereby avoiding the delay caused by cache failure. In recent years, with the development of multi-threading technology, access requests in storage devices have become more interleaved, which makes it difficult for existing prefetchers (such as sequential prefetchers and stride prefetchers) to adapt to applications with complex access patterns. They may not be able to accurately predict subsequent access behaviors, resulting in invalid or wasted prefetched data.

[0072] With the development of deep learning, neural network models have been applied to data prefetching to address the aforementioned issues. Key cache prefetch acceleration solutions include those based on RNNs (Recurrent Neural Networks) and LSTMs (Long Short-Term Memory Networks). Specifically, RNN-based cache prefetch acceleration utilizes RNNs to directly learn and predict main memory access patterns. By tracking the contextual information between main memory accesses, it discovers relationships or patterns between memory accesses. This contextual information can include neural network input data, intermediate computation results, and control flow information, transforming the cache prefetching problem into a sequence prediction problem. The LSTM-based cache prefetch acceleration solution addresses the drawback that when the RNN input length increases, the current hidden layer loses memory of previous input information. To address this issue, a value called the cell state is added to delete unnecessary memory and select what to remember.

[0073] In addition, the Transformer is a deep learning model based on a self-attention mechanism and a feedforward network. It has the ability to find potential recognition patterns in existing data. It can overcome the limitations of RNN cache prefetching schemes and LSTM cache prefetching schemes that cannot be calculated in parallel. It can also understand the relationship between sequence elements that are far apart. The number of operations required to calculate the association between two positions does not increase with the distance. Furthermore, the Transformer can also produce a more interpretable model, from which the attention distribution can be examined, and each attention head can learn to perform different tasks. Therefore, the Transformer-based cache prefetching acceleration scheme can achieve better performance than the RNN-based cache prefetching acceleration scheme and the LSTM-based cache prefetching acceleration scheme.

[0074] As can be seen from the above, with the future development of wireless networks, data volumes and processing requirements will explode and diversify. The types of (data) packets and the number of protocols will also continue to increase. During the transmission of data packets or data frames, user identification, packet classification, and load balancing will be required, all of which require table lookups. While software acceleration, a table lookup acceleration solution, offers high flexibility, it suffers from high latency and high CPU (central processing unit) load, making it inferior to hardware-software coordinated acceleration.

[0075] Among the frameworks for hardware-software collaborative acceleration, ASICs (Application-Specific Integrated Circuits) offer high parallelism and energy efficiency, but their hardware is completely fixed, lacks programmability, and results in a long development cycle. GPUs, with their von Neumann architecture, are data-parallel and require decoding for execution. This results in a low degree of parallelism, requiring multiple steps and complex control logic for instruction execution. In comparison, FPGAs offer a shorter development cycle, pipeline and data parallelism, and low latency, making them well-suited for wireless communications. Therefore, a CPU + FPGA combination is a more suitable choice.

[0076] In addition, the Transformer-based cache prefetch acceleration solution is good at capturing the internal correlation of data or features and has the ability to find potential recognition patterns in existing data. It breaks through the limitations of RNN-based cache prefetch acceleration solutions and LSTM-based cache prefetch acceleration solutions that cannot be calculated in parallel, as well as the problem of gradient explosion in long sequence calculations. Its parallel computing architecture is very suitable for implementation in FPGAs.

[0077] Based on the above, the present invention provides a data processing method to solve the problem of low efficiency of the prefetch mechanism of the table lookup solution in the existing technology, such as Figure 1 Shown, including:

[0078] Step 11: Obtain the data to be processed sent by the central processing unit CPU;

[0079] Step 12: Utilize a prefetcher based on the global and local feature fusion transformer GL-Transformer to obtain the global features and local features corresponding to the data to be processed; and obtain processing information corresponding to the data to be processed from the cache Cache based on the global features and local features; the processing information includes: information required for performing processing operations on the data to be processed.

[0080] The data processing method provided by the embodiment of the present invention obtains the data to be processed sent by the central processing unit CPU; uses a prefetcher based on a global and local feature fusion transformer GL-Transformer to obtain the global features and local features corresponding to the data to be processed; and obtains processing information corresponding to the data to be processed from a cache Cache based on the global features and local features; the processing information includes: information required for processing the data to be processed; it can support the fusion of global features and local features, so that the prefetcher is better at capturing the internal correlation of data or features and the correlation between the local features of the data and the global sequence; and can use the multi-head attention mechanism and cross-attention mechanism of the prefetcher (Transformer) to realize parallel computing of data; thereby better supporting the rapid prefetching operation, improving the efficiency of the prefetching mechanism, and then supporting the effective acceleration of the table lookup process, which well solves the problem of low efficiency of the prefetching mechanism of the table lookup solution in the prior art.

[0081] Among them, the GL-Transformer-based prefetcher includes: a coding layer, a global and local feature fusion GL perception network layer and a prefetch instruction generation layer; the prefetcher based on the global and local feature fusion transformer GL-Transformer is used to obtain the global features and local features corresponding to the data to be processed; and according to the global features and local features, the processing information corresponding to the data to be processed is obtained from the cache Cache, including: using the coding layer to obtain the segmentation vector corresponding to the data to be processed; and position encoding the segmentation vector to obtain the encoded segmentation vector; obtaining the global features and local features corresponding to the data to be processed according to the encoded segmentation vector; using the GL perception network layer, according to the global features and local features, obtaining the global fusion local features; using the prefetch instruction generation layer, according to the global fusion local features, obtaining the prefetch instruction corresponding to the data to be processed; using the prefetch instruction, obtaining the processing information corresponding to the data to be processed from the Cache.

[0082] In this way, the above-mentioned processing information can be accurately obtained. Among them, "obtaining the prefetch instruction corresponding to the data to be processed based on the global fusion of local features" may include: performing a classification operation on the global fusion of local features, and obtaining the prefetch instruction corresponding to the data to be processed based on the classification result; but is not limited to this.

[0083] In this embodiment of the present invention, performing position encoding on the segment vector to obtain the encoded segment vector includes: performing weighting on the segment vector to obtain the weighted segment vector; and performing position encoding on the weighted segment vector to obtain the encoded segment vector. This allows for obtaining the encoded segment vector and also allows for highlighting features of different sequences in subsequent classification.

[0084] The step of obtaining the global fusion local feature based on the global feature and the local feature includes performing a weighted average operation on the global feature and the local feature to obtain the global fusion local feature. In this way, the global fusion local feature can be accurately obtained.

[0085] In an embodiment of the present invention, using the prefetch instruction to obtain the processing information corresponding to the data to be processed from the cache includes: using the prefetch instruction to perform a table lookup operation in the cache to obtain the processing information corresponding to the data to be processed. In this way, the processing information corresponding to the data to be processed can be obtained.

[0086] The process of performing a table lookup in a cache to obtain processing information corresponding to the data to be processed includes: determining, based on the prefetch instruction, whether the cache contains complete processing information for the data to be processed; if so, obtaining the processing information for the data to be processed directly from the cache; and if not, accessing a field programmable gate array (FPGA) memory to obtain the processing information for the data to be processed. This ensures that the processing information corresponding to the data to be processed is obtained as much as possible.

[0087] In this embodiment of the present invention, accessing the field programmable gate array (FPGA) memory to obtain processing information for the data to be processed includes deleting information based on the weight of each piece of information cached in the cache, and obtaining the processing information for the data to be processed from the FPGA memory and caching it in the cache. This ensures that the processing information for the data to be processed is obtained from the FPGA memory and stored in the cache as much as possible to facilitate subsequent operations.

[0088] Furthermore, the data processing method further includes: processing the data to be processed according to the processing information, so as to support the final processing of the data to be processed.

[0089] The data processing method provided by an embodiment of the present invention is described below with examples. The information required for performing the processing operation on the data to be processed is taken as an example of protocol table information.

[0090] In response to the above technical problems, an embodiment of the present invention provides a data processing method, which can be specifically implemented as a table lookup acceleration solution based on a CPU (central processing unit)-FPGA (field programmable gate array) collaborative architecture and GL-Transformer (Global and local feature fusion-Transformer) cache prefetching. It mainly involves: the GL-Transformer prefetcher proposed in this solution fuses global features and local features, making it better at capturing the internal correlation of data or features and the correlation between the local features of data packets and the global sequence, and utilizing the Transformer's multi-head attention mechanism and cross-attention mechanism to achieve parallel computing of data packets or data frames, giving full play to the advantages of FPGA parallel processing, thereby effectively accelerating the table lookup process. Among them:

[0091] This solution can offload tables to the FPGA processor memory for storage; and utilizes a prefetcher based on the GL-Transformer that fuses global and local features to extract the required protocol table information based on local features. In addition, based on the results of the global and local feature fusion, the memory access methods of different processors can be learned, thereby quickly classifying data packets or data frame sequences from different processors (to clearly determine which table to query for the data packet and provide prefetch notifications), and issuing effective prefetch instructions to the cache, allowing the data packet or data frame to directly access the high-speed cache instead of the slow memory (i.e., perform table lookups on the data packet and determine candidate operations for the data packet, such as forwarding or processing). This also reduces the probability of cache access failure and the latency of waiting to retrieve data after a cache access failure.

[0092] Specifically, the overall architecture of the table lookup acceleration solution based on the CPU-FPGA architecture and GL-Transformer cache prefetching can be as follows: Figure 2 (Overall solution architecture and table lookup process) as shown in the figure, where:

[0093] The GL-Transformer-based prefetcher and cache are both deployed in the FPGA. The CPU can transfer the data packets or data frame sequences to be processed to the GL-Transformer-based prefetcher. The prefetcher sends prefetch instructions to the cache based on the trained model, and the cache determines whether there is a miss (for example, whether the cached content is incomplete). If there is a miss, the cache accesses the FPGA memory to obtain the corresponding protocol table (corresponding to Figure 2The cache determines whether the cache data is missing according to the instruction. If it is missing, it accesses the FPGA memory to obtain the protocol table); after the cache is updated, the data packet or data frame sequence can access the cache to read the protocol and return it to the CPU (corresponding to Figure 2 After the cache update is completed, the data packet or data frame sequence accesses the cache to read the protocol table; after the data packet or data frame sequence completes the table lookup and protocol reading, it returns to the CPU for subsequent processing); in addition, when the prefetcher finds that the data packet or data frame comes from different processors or the access address is different, the prefetcher can issue a new prefetch instruction (for example, sending different prefetch instructions for different CPUs; corresponding Figure 2 Step 2 in the previous step).

[0094] based on Figure 2 The overall workflow of table lookup based on CPU-FPGA architecture and GL-Transformer cache prefetching can include the following steps:

[0095] Step 1: The CPU sends a data packet or a data frame sequence to a GL-Transformer-based prefetcher in the FPGA; this corresponds to the above-mentioned acquisition of the data to be processed sent by the central processing unit CPU.

[0096] Step 2: The GL-Transformer-based prefetcher determines the protocol table required for the data packet or data frame according to the trained model and issues a prefetch instruction; corresponding to the above-mentioned prefetcher based on the global and local feature fusion transformer GL-Transformer, the global features and local features corresponding to the data to be processed are obtained; and based on the global features and local features, the processing information corresponding to the data to be processed is obtained from the cache Cache; the processing information includes: information required for processing the data to be processed.

[0097] Step 3: The cache determines whether the required protocol table is missing. If so, the corresponding stored data in the cache (which may be data corresponding to low or high weight) can be deleted according to the weight calculation model, and the FPGA memory can be accessed to store the required new protocol table in the cache. It can correspond to the prefetch instruction to determine whether the cache has cached complete processing information for the data to be processed; if not, the information is deleted according to the weight of each information cached in the cache, and the processing information for the data to be processed is obtained from the FPGA memory and cached in the cache.

[0098] Step 4: The data packet or data frame accesses the cached table entry, completes the table lookup and protocol reading, and then sends the data packet or data frame to the CPU for subsequent processing based on the protocol content.

[0099] More specifically, regarding the GL-Transformer based prefetcher, a GL-Transformer model is provided inside the prefetcher, which can be Figure 3 As shown, where:

[0100] The input of the model is a one-dimensional sequence of data packets or data frames (corresponding to Figure 3 The one-dimensional data packet or data frame sequence in the data packet or data frame is input into the data packet or data frame framework (A packet or sequence of data frames). First, a single data packet or data frame is segmented non-overlappingly, and the data packet or data frame is converted into a segment vector (corresponding to Figure 3 Embedding Vector in ), and position encoding (corresponding to Figure 3 The position-encoded segment vector maintains the correlation between the previous and next data points, facilitating the extraction of more distinguishable features. The segment vector (after position encoding) is input into a Transformer Encoder containing L layers to obtain N+1 feature vectors, including N local features Q and 1 global feature G; where L refers to the number of network layers in the encoder. This section may correspond to the above-mentioned use of the encoding layer to obtain the segment vector corresponding to the data to be processed; position encoding the segment vector to obtain the encoded segment vector; and obtaining the global and local features corresponding to the data to be processed based on the encoded segment vector.

[0101] Among them, the Transformer encoder includes a multi-head attention mechanism (Multi-Head Attention) and a cross attention mechanism (Cross Attention); the multi-head self-attention mechanism allows the model to focus on interactive information at different positions in multiple feature spaces: for data packets or data frame sequences, it mainly focuses on segmentation vectors such as source IP address, destination IP address, source port number, destination port number and protocol. More weights can be assigned to these segmentation vectors, and less weight can be assigned to the data part of the data packet or data frame (which can correspond to the above-mentioned weighted processing of the segmentation vector to obtain the weighted segmentation vector; position encoding of the weighted segmentation vector to obtain the encoded segmentation vector), thereby making the features of different sequences more prominent in subsequent classification. The cross-attention mechanism can focus on different sequences, including internal sequences from the same processor and sequences from different processors, so that the model learns deeper features of the sequence, improves prediction accuracy and accelerates model convergence. Specifically, if Figure 3 As shown, the embedded vectors (EmbeddedVectors) are normalized (Norm), cross-attention processed, multi-head attention processed, and processed using MLP (Multi-layer Perceptron), and then finally output. For details, please refer to the current method and will not be repeated here. Among them, Norm can be a normalization process for each feature dimension of each sample.

[0102] Furthermore, this solution performs a weighted average of global and local features (i.e., G and Q) at the feature-aware network layer (i.e., the global and local feature fusion-aware network layer), resulting in a globally fused local feature GL (corresponding to the weighted average operation performed on the global and local features described above to obtain the globally fused local feature). The local features (in GL) can be used to extract the protocol table required for the data packet or data frame. Fusion of local and global features can be used to distinguish data packets from other data packets or data frames (for example, data packets or data frames from different processors have different features, and here it can be used to distinguish whether the input data packet or data frame sequence all originates from the same processor). This allows the dependency between a single data packet or data frame and the entire input sequence to be determined, as well as the protocol information and the sequence information carried (such as the source IP address, destination IP address, source port number, destination port number, etc.). Furthermore, the globally fused local feature GL can be used to learn and model the memory access methods of different processors (for example, learning the links and physical addresses traversed by different processors). Specifically, regarding "taking weighted average of global features and local features (i.e. G and Q) to obtain global fusion local features GL", it can be as follows Figure 3 As shown in FIG, the weight of G is set to λ1, the weight of Q is set to λ2, and then the formula (λ1G + λ2Q) / (G + Q) is used to obtain GL (i.e., GLFF). This section corresponds to the above-mentioned use of the GL perception network layer to obtain global fused local features based on the global features and local features.

[0103] Then, GL is fed to the classification network FC Classifier (GL contains memory access methods, etc., which can be classified in the classification network), and the output feature embedding y1, y2, y3...y 13 、y 14 ; Using Softmax (normalized exponential function) + argmax (the variable value that makes the function take the maximum value), according to the feature embedding y1, y2, y3...y 13 、y 14, get the prefetch instruction, and output the prefetch instruction. Specifically, regarding "feeding GL to the classification network FCClassifier (GL contains memory access methods, etc., which can be classified in the classification network), output feature embedding y1, y2, y3...y 13 、y 14 ", which may include: inputting the averaged GLFF into the FC layer (FC Layer, fully connected layer), processing it through two FC layers, processing it using the linear rectification function RELU, and finally performing batch normalization to obtain feature embeddings y1, y2, y3...y 13 、y 14 ; but it is not limited to this. This paragraph may correspond to the above-mentioned use of the prefetch instruction generation layer to obtain the prefetch instructions corresponding to the data to be processed according to the global fusion of local features. Among them, Batch Norm (i.e. Batch Normalization) can normalize the data of each batch; FC can perform a linear transformation of the input data through the weight matrix, and then perform a nonlinear transformation through the activation function to generate the output. FC classifier can classify the output of the transformer, thereby realizing the model's classification prediction of the input data, but it is not limited to this.

[0104] In addition, this solution can also classify data packets or data frame sequences according to the sequence information and the required protocol (corresponding to the above protocol information) obtained by GL during the model training process (to facilitate the subsequent search for the corresponding category table); then, during the model testing process, feature embedding (such as y1, y2, y3, etc.) is generated according to the above sequence information and the required protocol. 13 、y 14 ), but is not limited thereto.

[0105] Furthermore, the prefetcher can issue prefetch instructions to the Cache (corresponding to Figure 2Step 2 in the previous section can indicate the required protocol table. The cache can then determine whether the protocol table is missing. If so, it accesses the FPGA memory to obtain the required protocol table and write it into the cache. If the cache is full, the cache can be updated. Specifically, the cache can be updated based on weight. For example, a larger weight indicates that the cached data is more valuable during application execution. Compared with blocks with higher weight values, blocks with smaller values ​​are more likely to be evicted (e.g., deleted). The weight calculation model can be: weight = number of data references × (1 + frequency) / occupied space. In this solution, the cache can delete the corresponding data (e.g., data with low weight) based on the weight calculation model, and then store the pre-fetched data (e.g., data obtained from the FPGA memory) in the cache. Subsequent data packets or data frames can access the cached table entries, complete the table lookup and protocol read, and then send the data packets or data frames to the CPU for subsequent processing based on the protocol content. This paragraph of content may correspond to the above-mentioned use of the prefetch instruction to obtain the processing information corresponding to the data to be processed from the Cache; processing the data to be processed based on the processing information; the use of the prefetch instruction to obtain the processing information corresponding to the data to be processed from the Cache includes: using the prefetch instruction to perform a table lookup operation in the cache to obtain the processing information corresponding to the data to be processed.

[0106] It is to be noted that the above-mentioned "data packets or data frames can access the cached entries in the Cache" can be similarly understood as: accessing the cached entries in the Cache according to the data packets or data frames, but is not limited thereto. Figure 3 The architecture before the GL-aware network layer (on the left) may correspond to the encoding layer, and the architecture after the GL-aware network layer (on the right) may correspond to the prefetch instruction generation layer.

[0107] The following is a specific example of this solution:

[0108] Assume that the hardware platform running the FPGA framework in this solution consists of a Type 1 acceleration development board and a general-purpose host computer equipped with a Type 2 CPU, as shown in Table 1. The FPGA board operates at a standard frequency of 300 MHz, and the CPU operates at a standard frame rate of 3 GHz. The host computer and FPGA board are connected via a PCI-e 2.0×8 interface. The deep learning framework used is Pytorch. Training is performed using a GL-Transformer network with 100 epochs and a cross-entropy loss function. Since the data prefetcher runs online, the GL-Transformer model for the prefetcher can be trained offline. The trained parameters are then imported into the online model for online performance evaluation. This solution uses two datasets released by the Computer Network Technology Center (CERNET20150222 and CERNET20150903) as samples and uses Gem5 (a software simulator for computer architecture) to evaluate the performance of the prefetcher based on the CPU-FPGA architecture and Transformer.

[0109] Table 1 Architecture parameter configuration

[0110]

[0111] Based on the configuration in Table 1, this solution evaluates the performance of the prefetcher using two indicators: prefetch accuracy and speedup ratio. All tests are performed within the CPU-FPGA framework. The speedup ratio is measured in terms of binary tree search speed, and the prefetch accuracy mainly compares the cache prefetching solution based on GL-Transformer with the cache prefetching solution based on LSTM and the cache prefetching solution based on RNN. Figure 4 and Figure 5 As shown:

[0112] The GL-Transformer-based prefetcher has a prefetching accuracy of 91.03%, while the LSTM-based prefetcher and RNN-based prefetcher have prefetching accuracy of only 86.27% and 72.69% respectively. In terms of speed, it is 25.08 times faster than the binary tree search solution. It can be seen that the CPU-FPGA and GL-Transformer-based table lookup acceleration solution has obvious advantages.

[0113] Based on the above, the solution provided by the embodiment of the present invention involves the following contents:

[0114] 1. Use CPU-FPGA collaborative architecture to accelerate table lookups;

[0115] 2. A cache prefetch mechanism is used to improve table lookup efficiency;

[0116] 3. The cache prefetch mechanism uses GL-Transformer acceleration that fuses global and local features;

[0117] 4. In the cache update mechanism of Cache, the concept of weight is used to increase the consideration of cache data size. It can be understood that cache updates are performed based on weight and cache data size.

[0118] In summary, the embodiments of the present invention provide a cache prefetch acceleration solution based on a CPU-FPGA collaborative architecture and GL-Transformer. Compared to RNN-based and LSTM-based cache prefetch acceleration solutions, this solution can better support parallel computing and long-sequence processing of data packets or data frames. It can also fuse global and local features to better capture internal sequence correlations, facilitate learning the memory access methods of different processors, improve prefetch accuracy and speed, and combine the parallel computing, low latency, and low power consumption characteristics of FPGAs to achieve table lookup acceleration. Specifically, this solution adopts a cache prefetch mechanism to reduce memory accesses and leverages the high concurrency and low latency characteristics of FPGAs, making it faster than traditional hash table and binary tree-based search methods.

[0119] In addition, this solution can be applied to future wireless communication network base stations as a core solution for table lookup acceleration to meet the future wireless network's demand for large data volumes and high real-time performance, and improve the operating efficiency of future wireless communication network base stations.

[0120] The embodiment of the present invention further provides a data processing device, such as Figure 6 Shown, including:

[0121] A first acquisition module 61 is used to acquire the data to be processed sent by the central processing unit CPU;

[0122] The first processing module 62 is used to use a prefetcher based on a global and local feature fusion transformer GL-Transformer to obtain global features and local features corresponding to the data to be processed; and based on the global features and local features, obtain processing information corresponding to the data to be processed from a cache Cache; the processing information includes: information required for performing processing operations on the data to be processed.

[0123] The data processing device provided by the embodiment of the present invention obtains the data to be processed sent by the central processing unit CPU; uses a prefetcher based on a global and local feature fusion transformer GL-Transformer to obtain the global features and local features corresponding to the data to be processed; and obtains processing information corresponding to the data to be processed from a cache Cache based on the global features and local features; the processing information includes: information required for processing the data to be processed; it can support the fusion of global features and local features, so that the prefetcher is better at capturing the internal correlation of data or features and the correlation between the local features of the data and the global sequence; and can use the multi-head attention mechanism and cross-attention mechanism of the prefetcher (Transformer) to realize parallel computing of data; thereby better supporting the rapid prefetching operation, improving the efficiency of the prefetching mechanism, and then supporting the effective acceleration of the table lookup process, which well solves the problem of low efficiency of the prefetching mechanism of the table lookup scheme in the prior art.

[0124] Among them, the GL-Transformer-based prefetcher includes: a coding layer, a global and local feature fusion GL perception network layer and a prefetch instruction generation layer; the prefetcher based on the global and local feature fusion transformer GL-Transformer is used to obtain the global features and local features corresponding to the data to be processed; and according to the global features and local features, the processing information corresponding to the data to be processed is obtained from the cache Cache, including: using the coding layer to obtain the segmentation vector corresponding to the data to be processed; and position encoding the segmentation vector to obtain the encoded segmentation vector; obtaining the global features and local features corresponding to the data to be processed according to the encoded segmentation vector; using the GL perception network layer, according to the global features and local features, obtaining the global fusion local features; using the prefetch instruction generation layer, according to the global fusion local features, obtaining the prefetch instruction corresponding to the data to be processed; using the prefetch instruction, obtaining the processing information corresponding to the data to be processed from the Cache.

[0125] In an embodiment of the present invention, position encoding the segmented vector to obtain the encoded segmented vector includes: weighting the segmented vector to obtain the weighted segmented vector; and position encoding the weighted segmented vector to obtain the encoded segmented vector.

[0126] The step of obtaining the global fused local features based on the global features and the local features includes: performing a weighted average operation on the global features and the local features to obtain the global fused local features.

[0127] In an embodiment of the present invention, the using of the prefetch instruction to obtain the processing information corresponding to the data to be processed from the cache includes: using the prefetch instruction to perform a table lookup operation in the cache to obtain the processing information corresponding to the data to be processed.

[0128] Among them, the implementation embodiments of the above-mentioned data processing method are all applicable to the embodiments of the data processing device and can achieve the same technical effects.

[0129] The embodiment of the present invention also provides a data processing device, such as Figure 7 As shown, it includes: a processor 71;

[0130] The processor 71 is used to obtain the data to be processed sent by the central processing unit CPU;

[0131] A prefetcher based on a global and local feature fusion transformer GL-Transformer is used to obtain global features and local features corresponding to the data to be processed; and based on the global features and local features, processing information corresponding to the data to be processed is obtained from a cache Cache; the processing information includes: information required for performing processing operations on the data to be processed.

[0132] In the embodiment of the present invention, the data processing device may further include: a transceiver 72 capable of communicating with the processor 71, which is not limited here.

[0133] The data processing device provided by the embodiment of the present invention obtains the data to be processed sent by the central processing unit CPU; uses a prefetcher based on a global and local feature fusion transformer GL-Transformer to obtain the global features and local features corresponding to the data to be processed; and obtains processing information corresponding to the data to be processed from a cache Cache based on the global features and local features; the processing information includes: information required for processing the data to be processed; it can support the fusion of global features and local features, so that the prefetcher is better at capturing the internal correlation of data or features and the correlation between the local features of the data and the global sequence; and can use the multi-head attention mechanism and cross-attention mechanism of the prefetcher (Transformer) to realize parallel calculation of data; thereby better supporting the rapid prefetching operation, improving the efficiency of the prefetching mechanism, and then supporting the effective acceleration of the table lookup process, which well solves the problem of low efficiency of the prefetching mechanism of the table lookup solution in the prior art.

[0134] Among them, the GL-Transformer-based prefetcher includes: a coding layer, a global and local feature fusion GL perception network layer and a prefetch instruction generation layer; the prefetcher based on the global and local feature fusion transformer GL-Transformer is used to obtain the global features and local features corresponding to the data to be processed; and according to the global features and local features, the processing information corresponding to the data to be processed is obtained from the cache Cache, including: using the coding layer to obtain the segmentation vector corresponding to the data to be processed; and position encoding the segmentation vector to obtain the encoded segmentation vector; obtaining the global features and local features corresponding to the data to be processed according to the encoded segmentation vector; using the GL perception network layer, according to the global features and local features, obtaining the global fusion local features; using the prefetch instruction generation layer, according to the global fusion local features, obtaining the prefetch instruction corresponding to the data to be processed; using the prefetch instruction, obtaining the processing information corresponding to the data to be processed from the Cache.

[0135] In an embodiment of the present invention, position encoding the segmented vector to obtain the encoded segmented vector includes: weighting the segmented vector to obtain the weighted segmented vector; and position encoding the weighted segmented vector to obtain the encoded segmented vector.

[0136] The step of obtaining the global fusion local feature based on the global feature and the local feature includes: performing a weighted average operation on the global feature and the local feature to obtain the global fusion local feature.

[0137] In an embodiment of the present invention, the using of the prefetch instruction to obtain the processing information corresponding to the data to be processed from the cache includes: using the prefetch instruction to perform a table lookup operation in the cache to obtain the processing information corresponding to the data to be processed.

[0138] Among them, the implementation embodiments of the above-mentioned data processing method are all applicable to the embodiments of the data processing device and can achieve the same technical effects.

[0139] An embodiment of the present invention further provides a data processing device, comprising a memory, a processor, and a program stored in the memory and executable on the processor; the processor implements the above-mentioned data processing method when executing the program.

[0140] Among them, the implementation embodiments of the above-mentioned data processing method are all applicable to the embodiments of the data processing device and can achieve the same technical effects.

[0141] An embodiment of the present invention further provides a readable storage medium on which a program is stored. When the program is executed by a processor, the steps in the above-mentioned data processing method are implemented.

[0142] Among them, the implementation embodiments of the above-mentioned data processing method are all applicable to the embodiments of the readable storage medium and can achieve the same technical effects.

[0143] An embodiment of the present invention further provides a computer program product, comprising computer instructions, which implement the steps of the above-mentioned data processing method when executed by a processor.

[0144] Among them, the implementation embodiments of the above-mentioned data processing method are all applicable to the embodiments of the computer program product and can achieve the same technical effects.

[0145] It should be noted that many functional components described in this specification are referred to as modules in order to more particularly emphasize the independence of their implementation methods.

[0146] In embodiments of the present invention, modules can be implemented in software so that they can be executed by various types of processors. For example, an identified executable code module can include one or more physical or logical blocks of computer instructions, for example, which can be constructed as objects, procedures, or functions. Nevertheless, the executable code of the identified module does not need to be physically located together, but can include different instructions stored in different locations, which, when logically combined together, constitute the module and achieve the specified purpose of the module.

[0147] In fact, executable code module can be a single instruction or many instructions, and can even be distributed on a plurality of different code segments, distributed in the middle of different programs, and distributed across a plurality of memory devices.Similarly, operating data can be identified in the module, and can be implemented and organized in the data structure of any appropriate type according to any appropriate form.Described operating data can be collected as a single data set, or can be distributed in different locations (including on different storage devices), and can only be present on a system or network as an electronic signal at least in part.

[0148] When a module can be implemented using software, given the current state of hardware technology, those skilled in the art can build corresponding hardware circuits to implement the corresponding functions of the module, regardless of cost. The hardware circuits may include conventional very large scale integration (VLSI) circuits or gate arrays, as well as existing semiconductors such as logic chips and transistors, or other discrete components. Modules may also be implemented using programmable hardware devices, such as field programmable gate arrays, programmable array logic, or programmable logic devices.

[0149] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary personnel in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A data processing method, characterized in that: include: Get the data to be processed sent by the central processing unit CPU; Obtaining global features and local features corresponding to the data to be processed by using a prefetcher based on a global and local feature fusion transformer GL-Transformer; And according to the global characteristics and local characteristics, the processing information corresponding to the data to be processed is obtained from the cache; the processing information includes: information required for performing a processing operation on the data to be processed.

2. The data processing method according to claim 1, wherein: The GL-Transformer-based prefetcher consists of an encoding layer, a GL perception network layer that fuses global and local features, and a prefetch instruction generation layer. The method comprises: obtaining global features and local features corresponding to the data to be processed by using a prefetcher based on a global and local feature fusion transformer (GL-Transformer); and obtaining processing information corresponding to the data to be processed from a cache memory according to the global features and the local features, including: Using the coding layer, obtaining a segmentation vector corresponding to the data to be processed; performing position coding on the segmentation vector to obtain an encoded segmentation vector; and obtaining global features and local features corresponding to the data to be processed based on the encoded segmentation vector; Utilizing the GL perception network layer, obtaining global fusion local features according to the global features and the local features; Utilizing the prefetch instruction generation layer, according to the global fusion of local features, obtains a prefetch instruction corresponding to the data to be processed; The prefetch instruction is used to obtain processing information corresponding to the data to be processed from the cache.

3. The data processing method according to claim 2, characterized in that: The performing position encoding on the segment vector to obtain the encoded segment vector includes: Performing weighted processing on the segmented vector to obtain the weighted segmented vector; Position encoding is performed on the weighted segment vector to obtain an encoded segment vector.

4. The data processing method according to claim 2, wherein: The step of obtaining a global fusion local feature based on the global feature and the local feature includes: A weighted average operation is performed on the global features and the local features to obtain a global fusion local feature.

5. The data processing method according to claim 2, wherein: The using the prefetch instruction to obtain processing information corresponding to the to-be-processed data from the cache includes: The prefetch instruction is used to perform a table lookup operation in a cache memory to obtain processing information corresponding to the data to be processed.

6. A data processing device, characterized in that: include: The first acquisition module is used to acquire the data to be processed sent by the central processing unit CPU; A first processing module is configured to obtain global features and local features corresponding to the data to be processed by using a prefetcher based on a global and local feature fusion transformer GL-Transformer; And according to the global characteristics and local characteristics, the processing information corresponding to the data to be processed is obtained from the cache; the processing information includes: information required for performing a processing operation on the data to be processed.

7. The data processing device according to claim 6, characterized in that The GL-Transformer-based prefetcher consists of an encoding layer, a GL perception network layer that fuses global and local features, and a prefetch instruction generation layer. The method comprises: obtaining global features and local features corresponding to the data to be processed by using a prefetcher based on a global and local feature fusion transformer (GL-Transformer); and obtaining processing information corresponding to the data to be processed from a cache memory according to the global features and the local features, including: Using the coding layer, obtaining a segmentation vector corresponding to the data to be processed; performing position coding on the segmentation vector to obtain an encoded segmentation vector; and obtaining global features and local features corresponding to the data to be processed based on the encoded segmentation vector; Utilizing the GL perception network layer, obtaining global fusion local features according to the global features and the local features; Utilizing the prefetch instruction generation layer, according to the global fusion of local features, obtains a prefetch instruction corresponding to the data to be processed; The prefetch instruction is used to obtain processing information corresponding to the data to be processed from the cache.

8. The data processing device according to claim 7, characterized in that The performing position encoding on the segment vector to obtain the encoded segment vector includes: Performing weighted processing on the segmented vector to obtain the weighted segmented vector; Position encoding is performed on the weighted segment vector to obtain an encoded segment vector.

9. The data processing device according to claim 7, characterized in that The step of obtaining a global fusion local feature based on the global feature and the local feature includes: A weighted average operation is performed on the global features and the local features to obtain a global fusion local feature.

10. The data processing device according to claim 7, wherein: The using the prefetch instruction to obtain processing information corresponding to the to-be-processed data from the cache includes: The prefetch instruction is used to perform a table lookup operation in a cache memory to obtain processing information corresponding to the data to be processed.

11. A data processing device, characterized in that: include: processor; The processor is used to obtain the data to be processed sent by the central processing unit CPU; Obtaining global features and local features corresponding to the data to be processed by using a prefetcher based on a global and local feature fusion transformer GL-Transformer; And according to the global characteristics and local characteristics, the processing information corresponding to the data to be processed is obtained from the cache; the processing information includes: information required for performing a processing operation on the data to be processed.

12. A data processing device comprising a memory, a processor, and a program stored in the memory and executable on the processor; When the processor executes the program, the data processing method according to any one of claims 1 to 5 is implemented.

13. A readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the steps of the data processing method according to any one of claims 1 to 5 are implemented.

14. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the data processing method according to any one of claims 1 to 5.