A mixing filtering method, device, equipment and medium based on tensor core

By converting the FPGA radio receiver's filter from serial calculation to parallel calculation, and fusing the mixing and filtering steps into matrix multiplication operations, and using GPU or GPGPU for parallel calculation, the problems of insufficient data processing speed and flexibility of FPGA radio receivers are solved, and efficient and low-power data processing is achieved.

CN119995620BActive Publication Date: 2025-10-03BEIJING YIYUAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510162588.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-14
Publication Date
2025-10-03
Estimated Expiration
2045-02-14

AI Technical Summary

Technical Problem

Existing FPGA radio receivers have shortcomings in data processing speed and flexibility, especially when processing large amounts of data, resulting in low throughput and large system response delays. In addition, high power consumption becomes a bottleneck in scenarios with limited power resources.

Method used

A tensor core-based mixing and filtering method is adopted to convert the serial calculation of the first filter into parallel calculation, and the mixing and filtering steps are integrated into a matrix multiplication operation. GPU or GPGPU is used for parallel calculation to optimize the data processing flow.

Benefits of technology

It improves data processing throughput, reduces processing delay and memory usage, enhances system performance and flexibility, and is suitable for modern high-speed communication systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119995620B_ABST
    Figure CN119995620B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a mixing filtering method, apparatus, device and medium based on tensor cores. The method includes: determining a weight coefficient matrix of the first filter based on a functional relationship between the output signal and the input signal of the first filter, wherein the weight coefficient matrix is ​​used to convert the original one-dimensional convolution operation corresponding to the first filter into a matrix multiplication operation of the weight coefficient and the input signal, wherein the stride of the original one-dimensional convolution operation corresponding to the first filter is greater than 1; performing a matrix-vector dot multiplication operation on the local oscillator signal matrix corresponding to each local oscillator signal by the weight coefficient matrix, and using the obtained matrix as the fusion coefficient matrix after mixing and filtering fusion; performing a matrix multiplication operation on the input signal matrix corresponding to the input signal to be processed and the fusion coefficient matrix to filter the input signal. By adopting the above technical solution, the data processing throughput is improved, and the memory usage and power consumption are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of wireless communication technology, and more specifically, to a tensor kernel-based mixing filtering method, apparatus, device, and medium. Background Art

[0002] The software radio receiver receives radio signals through the antenna. These signals are amplified, mixed and filtered by the RF front end, and then converted into intermediate frequency signals or directly into digital signals.

[0003] Traditional radio receiver architectures, such as FPGAs (Field Programmable Gate Arrays), suffer from significant deficiencies in data processing speed and flexibility. First, FPGAs are based on hardware logic design. While they offer high performance in certain application scenarios, their serial processing approach fails to fully utilize the parallel computing capabilities of modern processors. This is particularly true for applications that require processing large amounts of data, resulting in low data throughput and significant system response latency.

[0004] On the other hand, existing FPGA architectures also suffer from high power consumption. In large-scale data processing, the high data transfer overhead leads to increased overall system power consumption, which becomes a significant bottleneck in power-constrained scenarios (such as mobile devices and IoT devices). Therefore, how to reduce system power consumption while maintaining high processing performance has become a key technical challenge that needs to be addressed in modern communication systems. Summary of the Invention

[0005] Embodiments of the present invention provide a tensor core-based mixing filtering method, apparatus, device, and medium to improve data processing throughput, reduce processing latency, and reduce memory usage and power consumption.

[0006] In a first aspect, the present invention provides a mixing filtering method based on tensor kernels, the method comprising:

[0007] Determining a weight coefficient matrix of the first filter based on a functional relationship between an output signal and an input signal of the first filter, wherein the weight coefficient matrix is ​​used to convert an original one-dimensional convolution operation corresponding to the first filter into a matrix multiplication operation of the weight coefficient and the input signal, wherein a stride of the original one-dimensional convolution operation corresponding to the first filter is greater than 1;

[0008] Perform matrix-vector dot multiplication of the weight coefficient matrix with the local oscillator signal matrix corresponding to each local oscillator signal, and use the obtained matrix as the fusion coefficient matrix after mixing and filtering fusion;

[0009] A matrix multiplication operation is performed on the input signal matrix corresponding to the input signal to be processed and the fusion coefficient matrix to perform filtering processing on the input signal.

[0010] Optionally, determining a weight coefficient matrix of the first filter according to a functional relationship between an output signal and an input signal of the first filter includes:

[0011] Determining the number of weight coefficients by determining the number of input signals associated with each output value of the first filter based on a functional relationship between the output signals and the input signals of each calculation link of the first filter;

[0012] Based on the number of weight coefficients, a weight coefficient matrix of the first filter is obtained, wherein the number of rows of the weight coefficient matrix is ​​the downsampling multiple of the first filter, and the number of columns of the weight coefficient matrix is ​​the order of the first filter.

[0013] Optionally, a matrix-vector dot multiplication operation is performed on the weight coefficient matrix and the local oscillator signal matrix corresponding to each local oscillator signal, and the obtained matrix is ​​used as a fusion coefficient matrix after mixing and filtering fusion, including:

[0014] Based on the periodic characteristics of the local oscillator signal, each local oscillator signal is converted into a local oscillator signal vector, wherein the length of each local oscillator signal vector is the least common multiple of the number of periods of the local oscillator signal and the downsampling factor of the first filter;

[0015] For each local oscillator signal vector, split the local oscillator signal vector into N row vectors, each row vector having the same number of elements, to obtain a submatrix composed of N row vectors, and concatenate the submatrices corresponding to each local oscillator signal vector by column to obtain a local oscillator signal matrix, where N is a positive integer representing the ratio of the least common multiple of the number of mixing common periods and the downsampling factor to the downsampling factor, and the mixing common period is the least common multiple of the periods of each local oscillator signal;

[0016] Perform vector dot multiplication on the local oscillator signal matrix and the weight coefficient matrix, and use the obtained matrix as the fusion coefficient matrix after mixing and filtering fusion.

[0017] Optionally, the input signal matrix corresponding to the input signal to be processed is obtained as follows:

[0018] Converting the input signal to be processed into an original input signal matrix, wherein the number of columns of the original input signal matrix is ​​a downsampling multiple of the first filter;

[0019] Based on the periodic characteristics of the local oscillator signal, a row vector is extracted from every N rows of the original input signal matrix, and a total of M extractions are performed to form an input signal conversion matrix. This process is repeated until the original input signal matrix is ​​traversed to obtain N input signal conversion matrices, where M represents the ratio of the length of the input signal to be processed to N.

[0020] Accordingly, a matrix multiplication operation is performed on the input signal matrix corresponding to the input signal to be processed and the fusion coefficient matrix, including:

[0021] Perform batch matrix multiplication on the N input signal conversion matrices and the fusion coefficient matrix to obtain the product result;

[0022] The product result is convolved with a set convolution kernel to obtain a mixed filtered signal, wherein the number of rows and columns of the convolution kernel are both the number of stages of the first filter, and one of the diagonal elements of the convolution kernel is set to 1, and the other elements are set to 0.

[0023] Optionally, the embodiment of the present invention further includes:

[0024] The signal after mixing and filtering is low-pass filtered to obtain an output signal.

[0025] Optionally, low-pass filtering is performed on the mixed filtered signal, including:

[0026] Converting the mixed filtered signal into a data signal matrix that meets the tensor core size requirements, and converting the second filter coefficient into a second filter coefficient matrix that meets the tensor core size requirements, wherein the row value of the data signal matrix is ​​the ratio of the input signal length value to the number of columns of the second filter coefficient matrix, and the column value of the data signal matrix is ​​equal to the row value of the second filter coefficient matrix. The second filter coefficient matrix is ​​used to convert the original one-dimensional convolution operation corresponding to the second filter into a matrix multiplication operation of the coefficient matrix and the input signal, and the convolution kernel moves one bit each time during the original one-dimensional convolution operation corresponding to the second filter;

[0027] Performing a matrix multiplication operation on the data signal matrix and the coefficient matrix of the second filter, and expanding the obtained result row by row to form a one-dimensional matrix;

[0028] Extract the first set length elements from the one-dimensional matrix as the filtering result, where the set length is the length of the signal after mixing and filtering.

[0029] Optionally, the first filter is any one of the following filters:

[0030] Cascaded integrator comb CIC filter, moving average downsampling filter, weighted sliding average downsampling filter;

[0031] The second filter is: a finite length unit impulse response FIR filter.

[0032] In a second aspect, an embodiment of the present invention further provides a mixing filtering device based on a tensor core, the device comprising:

[0033] a weight coefficient matrix determination module, configured to determine a weight coefficient matrix of the first filter based on a functional relationship between an output signal and an input signal of the first filter, wherein the weight coefficient matrix is ​​used to convert an original one-dimensional convolution operation corresponding to the first filter into a matrix multiplication operation of the weight coefficient and the input signal, wherein a stride of the original one-dimensional convolution operation corresponding to the first filter is greater than 1;

[0034] a fusion coefficient matrix determination module configured to perform a matrix-vector dot multiplication operation on the weight coefficient matrix and the local oscillator signal matrix corresponding to each local oscillator signal, and use the obtained matrix as the fusion coefficient matrix after mixing and filtering;

[0035] The frequency mixing and filtering module is configured to perform a matrix multiplication operation on an input signal matrix corresponding to an input signal to be processed and a fusion coefficient matrix to perform filtering processing on the input signal.

[0036] Optionally, the weight coefficient matrix determination module is specifically configured as follows:

[0037] Determining the number of weight coefficients by determining the number of input signals associated with each output value of the first filter based on a functional relationship between the output signals and the input signals of each calculation link of the first filter;

[0038] Based on the number of weight coefficients, a weight coefficient matrix of the first filter is obtained, wherein the number of rows of the weight coefficient matrix is ​​the downsampling multiple of the first filter, and the number of columns of the weight coefficient matrix is ​​the order of the first filter.

[0039] Optionally, the fusion coefficient matrix determination module is specifically configured as follows:

[0040] Based on the periodic characteristics of the local oscillator signal, each local oscillator signal is converted into a local oscillator signal vector, wherein the length of each local oscillator signal vector is the least common multiple of the number of periods of the local oscillator signal and the downsampling factor of the first filter;

[0041] For each local oscillator signal vector, split the local oscillator signal vector into N row vectors, each row vector having the same number of elements, to obtain a submatrix composed of N row vectors, and concatenate the submatrices corresponding to each local oscillator signal vector by column to obtain a local oscillator signal matrix, where N is a positive integer representing the ratio of the least common multiple of the number of mixing common periods and the downsampling factor to the downsampling factor, and the mixing common period is the least common multiple of the periods of each local oscillator signal;

[0042] Perform vector dot multiplication on the local oscillator signal matrix and the weight coefficient matrix, and use the obtained matrix as the fusion coefficient matrix after mixing and filtering fusion.

[0043] Optionally, the input signal matrix corresponding to the input signal to be processed is obtained as follows:

[0044] Converting the input signal to be processed into an original input signal matrix, wherein the number of columns of the original input signal matrix is ​​the downsampling multiple of the first filter;

[0045] Based on the periodic characteristics of the local oscillator signal, extracting row vectors from every N rows of the original input signal matrix, extracting M times in total, to form an input signal conversion matrix, until the original input signal matrix is ​​traversed to obtain N input signal conversion matrices, where M represents the ratio of the length of the input signal to be processed to N;

[0046] Accordingly, the mixing and filtering module is specifically configured as follows:

[0047] Perform batch matrix multiplication on the N input signal conversion matrices and the fusion coefficient matrix to obtain the product result;

[0048] The product result is convolved with a set convolution kernel to obtain a mixed filtered signal, wherein the number of rows and columns of the convolution kernel are both the number of stages of the first filter, and one of the diagonal elements of the convolution kernel is set to 1, and the other elements are set to 0.

[0049] Optionally, the apparatus provided by the embodiment of the present invention further includes:

[0050] The low-pass filtering module is configured to perform low-pass filtering on the signal after the mixing filter to obtain an output signal.

[0051] Optionally, the low-pass filter module is configured as follows:

[0052] Converting the mixed filtered signal into a data signal matrix that meets the tensor core size requirements, and converting the second filter coefficient into a second filter coefficient matrix that meets the tensor core size requirements, wherein the row value of the data signal matrix is ​​the ratio of the input signal length value to the number of columns of the second filter coefficient matrix, the column value of the data signal matrix is ​​equal to the row value of the second filter coefficient matrix, and the second filter coefficient matrix is ​​used to convert the original one-dimensional convolution operation corresponding to the second filter into a matrix multiplication operation of the coefficient matrix and the input signal, and the convolution kernel moves one bit each time during the original one-dimensional convolution operation corresponding to the second filter;

[0053] Performing a matrix multiplication operation on the data signal matrix and the coefficient matrix of the second filter, and expanding the obtained result row by row to form a one-dimensional matrix;

[0054] Extract the first set length elements from the one-dimensional matrix as the filtering result, where the set length is the length of the signal after mixing and filtering.

[0055] Optionally, the first filter is any one of the following filters:

[0056] Cascaded integrator comb CIC filter, moving average downsampling filter, weighted sliding average downsampling filter;

[0057] The second filter is: a finite length unit impulse response FIR filter.

[0058] In a third aspect, an embodiment of the present invention further provides a computing device, including:

[0059] a memory storing executable program code;

[0060] a processor coupled to the memory;

[0061] The processor calls the executable program code stored in the memory to execute the tensor core-based mixing filtering method provided by any embodiment of the present invention.

[0062] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the tensor core-based mixing filtering method provided by any embodiment of the present invention.

[0063] The technical solution provided by the embodiment of the present invention optimizes the first filter from a serial operation mode to a parallel operation mode through matrix multiplication. The output of each link is only related to part of the input and has nothing to do with the previous output. The output of each link can be calculated simultaneously or separately without relying on the previous output result. This setting accelerates the filtering process of the first filter and meets the needs of high-speed communication. In addition, by integrating the calculation steps of mixing and filtering, the calculation of these two steps can be completed simultaneously in a parallel computing task, avoiding frequent data exchange, thereby further reducing memory requirements and data transmission delays. The parallel processing method provided by the embodiment of the present invention greatly improves the overall performance of the software radio receiver, enabling it to maintain efficient operation in a high-speed, large-capacity data transmission environment.

[0064] The innovative features of the embodiments of the present invention include:

[0065] 1. Determine the weight coefficient matrix of the first filter based on the functional relationship between the output signal and the input signal of the first filter, thereby converting the first filter from a traditional serial calculation method to a parallel calculation method, and further converting it into a matrix multiplication calculation of the input signal and the filter coefficients. This parallel method fully utilizes the parallel acceleration advantage of tensor cores in matrix operations. Utilizing the parallel computing capabilities of processing units such as GPUs or GPGPUs to accelerate the filtering process and meet the requirements of high-speed communication is one of the innovations of the embodiments of the present invention.

[0066] 2. By integrating the calculation steps of mixing and filtering, the two steps can be completed simultaneously in a parallel computing task, avoiding frequent data exchange and further reducing memory requirements and data transmission delays. This is one of the innovations of the embodiment of the present invention.

[0067] 3. By converting the filtering process of the second filter from the original one-dimensional convolution operation to a highly optimized matrix multiplication, the parallel computing advantages of the tensor core can be better utilized, greatly improving the speed of filtering calculation and resource utilization. It is particularly suitable for application in large-scale data processing and real-time signal processing scenarios, which is one of the innovations of the embodiment of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0069] Figure 1a A flowchart of a mixing filtering method based on tensor kernels provided in Example 1 of the present invention;

[0070] Figure 1b A schematic diagram of the structure of a three-stage CIC filter provided in Example 1 of the present invention;

[0071] Figure 1c Schematic diagram of a traditional CIC filter provided in Example 1 of the present invention performing a one-dimensional convolution operation on an input signal;

[0072] Figure 1d Schematic diagram of a conventional CIC filter performing a two-dimensional convolution operation on an input signal provided in the first embodiment of the present invention;

[0073] Figure 1e A schematic diagram of a local oscillator signal vector provided in the first embodiment of the present invention;

[0074] Figure 1fThis is a schematic diagram of a conversion matrix for converting an input signal into N input signals provided by the first embodiment of the present invention;

[0075] Figure 1g A schematic diagram of batch matrix multiplication of 128 input signal matrices and 128 fusion coefficient matrices provided in the first embodiment of the present invention;

[0076] Figure 1h A schematic diagram of restoring the positions of elements in each row of a batch matrix multiplication result provided in the first embodiment of the present invention;

[0077] Figure 1i A schematic diagram of a mixing and filtering result provided in the first embodiment of the present invention;

[0078] Figure 2a A flowchart of a mixing filtering method based on tensor kernels provided in the second embodiment of the present invention;

[0079] Figure 2b A schematic diagram of a process for forming a data signal matrix provided in a second embodiment of the present invention;

[0080] Figure 2c A schematic diagram of another process for forming a data signal matrix provided in the second embodiment of the present invention;

[0081] Figure 3 This is a structural block diagram of a tensor core-based frequency mixing and filtering device provided in the third embodiment of the present invention;

[0082] Figure 4 A schematic diagram of the structure of a computing device provided in Example 4 of the present invention. DETAILED DESCRIPTION

[0083] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without creative work are within the scope of protection of the present invention.

[0084] It should be noted that the terms "including," "having," and any variations thereof in the embodiments of the present invention and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to the process, method, product, or apparatus.

[0085] The embodiments of the present invention disclose a method, apparatus, device, and medium for frequency mixing filtering based on tensor cores. In order to more clearly and clearly explain the contents of the embodiments of the present invention, the implementation principle of the present invention is briefly introduced below.

[0086] First, regarding the mixing mentioned in the embodiment of the present invention, it is a process of multiplying the input signal with the local oscillator signal, which can realize frequency conversion. In software radio, mixing is generally used to down-convert high-frequency signals to intermediate frequencies or baseband. By selecting an appropriate local oscillator frequency, mixing can effectively move the part of interest in the signal spectrum to a frequency range that is easier to process. After mixing, the spectrum of the signal will have a frequency offset, which makes subsequent processing (such as filtering and demodulation) simpler and more efficient. In the mixing process, two mutually orthogonal I (real part) and Q (imaginary part) outputs will be generated for each signal. For example, the traditional mixing process can be expressed by the following formula:

[0087]

[0088] Where n is the time point, I(n) is the real output after mixing, Q(n) represents the virtual output after mixing, and x(n) represents the input signal. is the local oscillator signal, and its period is f c Represents the frequency of the input signal to be processed, f s =RF-IF, represents the mixing frequency, RF represents the center frequency value of the input signal frequency range, and IF represents the desired target frequency value.

[0089] In software-defined radio receivers, since the baseband signal frequency is unknown, multichannel mixing is required. Specifically, the receiver mixes the same input signal with multiple local oscillator signals of different frequencies. This process down-converts the different frequency components of the input signal to different intermediate frequencies or baseband ranges. This multichannel mixing method allows the receiver to process multiple output signals simultaneously, ensuring that all potential baseband signals are effectively captured and processed. This multi-channel parallel frequency conversion method greatly enhances the receiver's flexibility and adaptability, enabling it to handle multi-band signals in complex radio environments.

[0090] As shown in the above formula, the local oscillator signal is a sine wave and a cosine wave of a fixed frequency. In the present invention, based on the periodicity of the sine function and the cosine function, the mixing calculation is integrated into the filter calculation to achieve the optimization of the filtering process.

[0091] Secondly, regarding the first filter mentioned in the embodiment of the present invention, this filter implements high-pass filtering and downsampling of the signal through a one-dimensional convolution operation. The characteristic of this filter is that during the convolution process, the convolution kernel shifts multiple bits to the right each time (downsampling factor R), the number of data points of the input signal is L, and the number of data points of the filtered signal is L / R. This filter can be any one of a CIC (Cascaded Integrator Comb) filter, a moving average downsampling filter, a weighted sliding average downsampling filter, or other filters having the characteristics of the above filters. The embodiment of the present invention does not specifically limit the type of the first filter.

[0092] In an embodiment of the present invention, based on the working principle of the first filter, the first filter is converted from a serial calculation mode to a parallel calculation, and further converted into a matrix multiplication calculation of the input signal and the first filter coefficient. The parallel computing capabilities of processing units such as GPUs (Graphics Processing Units, general-purpose graphics processors) and GPGPUs (General-Purpose Computing OnGraphics Processing Units, general-purpose graphics processors) are utilized to accelerate the filtering process, thereby meeting the needs of high-speed communication.

[0093] In addition, regarding the second filter mentioned in the embodiment of the present invention, the second filter is used to perform low-pass filtering on the filtered signal output by the first filter, remove high-frequency noise in the signal and retain low-frequency components. The characteristics of the second filter are: filtering is achieved through a one-dimensional convolution operation, and during the convolution process, the convolution kernel moves one bit to the right each time, that is, the number of data points of the input signal and the filtered output signal is consistent. Specifically, the filter can be a FIR (Finite Impulse Response) low-pass filter or other filters with the characteristics of the above-mentioned second filter. The embodiment of the present invention does not specifically limit the type of the second filter.

[0094] The second filter has the advantage of linear phase and can ensure the fidelity of the signal, but its computational complexity is high, especially in high-order filters, which require a large number of multiplication and addition operations. The traditional second filter usually adopts a serial calculation method to process signal samples one by one, and the processing speed is slow. In an embodiment of the present invention, by parallelizing the convolution operation of the second filter, the computational efficiency can be significantly improved. Specifically, the input signal and the coefficients of the second filter are matrixed, and the matrix multiplication acceleration operation of GPGPU or GPU is used to accelerate the operation, so that multiple signal samples can be processed simultaneously, which greatly shortens the operation time and improves the filtering efficiency.

[0095] In an embodiment of the present invention, the processing steps of the first filter and the second filter are parallelized and transformed, and the mixing and filtering operations are converted into matrix multiplication, making them suitable for accelerated processing on the tensor cores of processing units such as GPUs or GPGPUs. Traditional filters rely on serial calculations during data processing and fail to fully utilize the parallel computing capabilities of modern processors, resulting in low efficiency when processing large-scale data. The present invention fully utilizes the parallel computing capabilities of tensor cores by parallelizing these filter algorithms, significantly improving the data processing throughput, reducing data processing delays, and solving the bottleneck problem of filtering in the prior art.

[0096] In addition, an embodiment of the present invention also provides an innovative solution for fusing frequency mixing calculations with filtering. In the traditional processing flow, frequency mixing calculations and downsampling filter calculations are performed independently, which leads to frequent data transfer and increases the system's memory requirements and power consumption. By fusing the two, data transfer can be effectively reduced, memory usage and power consumption can be reduced, thereby further improving the overall performance of the system. This technical solution is particularly suitable for modern high-speed communication systems, especially in application scenarios with extremely high power consumption requirements such as mobile communications and the Internet of Things, or in other large-scale data processing scenarios, and can significantly optimize the data processing process.

[0097] The technical solution of this patent not only offers significant advantages in performance optimization, but also greatly enhances system flexibility and scalability. The programmability of GPGPU enables the system to quickly adapt to different communication standards and spectrum requirements, avoiding the drawbacks of traditional FPGA architectures that require hardware redesign when standards are updated. This high flexibility makes the technical solution of this invention have broad application prospects in the development of future communication systems.

[0098] The following is a detailed introduction to the embodiments of the present invention.

[0099] Example 1

[0100] Figure 1a This is a flowchart of a mixing and filtering method based on tensor cores provided in the first embodiment of the present invention. This method can be applied to a scenario where a radio receiver performs mixing and filtering on a received signal. The method provided in this embodiment can be performed by a mixing and filtering device based on tensor cores, which can be implemented in software and / or hardware. Figure 1a As shown, the method provided in this embodiment specifically includes:

[0101] S110 : Determine a weight coefficient matrix of the first filter according to a functional relationship between an output signal and an input signal of the first filter.

[0102] The first filter implements high-pass filtering and downsampling of the signal through a one-dimensional convolution operation. This filter is characterized by a stride greater than 1, meaning that the convolution kernel shifts to the right by multiple bits (downsampling factor R) each time during the convolution process. The number of data points in the input signal is L, and the number of data points in the filtered signal is L / R. This filter can be any of a CIC (Cascaded Integrator Comb) filter, a moving average downsampling filter, a weighted sliding average downsampling filter, or other filters with the aforementioned characteristics. This embodiment of the present invention does not specifically limit the type of the first filter.

[0103] In this embodiment, considering that the traditional first filter usually adopts a serial calculation method, which has low processing efficiency, the first filter is converted from a serial calculation method to a parallel calculation, and further converted into a matrix multiplication calculation of the input signal and the filter coefficient. This parallel form fully utilizes the parallel acceleration advantages of the tensor core in matrix operations, and utilizes the parallel computing capabilities of processing units such as GPU or GPGPU to accelerate the filtering process and meet the needs of high-speed communication.

[0104] In this embodiment, when determining the functional relationship between the output signal and the input signal of the first filter, the functional relationship between the output signal and the input signal of each calculation link in the first filter (such as the integral link and the differential link) can be determined first. Then, the functional relationship between the output signal and the input signal of the first filter can be obtained, that is, which input signals are weighted and summed to form the i-th output and the corresponding weight coefficients. In this way, the first filter can be changed from a serial calculation form to a parallel calculation form. After determining the number of input signals related to each output value of the first filter, that is, the number of weight coefficients, and the specific weight coefficients, for each weight coefficient, some of the weight coefficient values ​​can be filled with 0 to obtain a weight coefficient matrix with the number of rows being the downsampling multiple of the first filter and the number of columns being the number of stages of the first filter;

[0105] The following describes the process of determining the weight coefficient matrix by taking the first filter as a CIC filter as an example.

[0106] The CIC filter is composed of an integral link, a downsampling link, and a differential link. The functional relationship between the input and output of the integral link is:

[0107]

[0108] The functional relationship between the input and output of the subsequent links is:

[0109]

[0110] Among them, I nrepresents the nth output of the integral link; i represents the position of the data point; j represents the accumulated variable, whose value range is 0 to S-2, x n-i represents the ni-th input signal; S represents the downsampling order; y n×R represents the nth output of the CIC filter; k represents another accumulated variable, whose value range is 0 to S, and R represents the downsampling multiple.

[0111] By combining the above two functional relationships into one, the functional relationship between the input signal and the output signal can be obtained, so that the weight coefficient of the filter and the number of input signals related to each output value can be determined.

[0112] Specifically, Figure 1b This is a schematic diagram of the structure of a three-stage CIC filter provided in the first embodiment of the present invention, as shown in FIG. Figure 1b As shown in Figure 1, the CIC filter consists of three integral steps (I), a downsampling step (R), and three differential steps (D). The output of each step is calculated simultaneously. The integral step can be expressed as follows:

[0113]

[0114] For a comb filter with M=1, the relationship between its input and output is:

[0115] (2)y n×R =I n×R -3I (n-1)×R +3I (n-2)×R -I (n-3)×R

[0116] Among them, i represents the position of the data point, starting from 0, x n-i Indicates the ni-th input data, x n Represents the i-th input data, y n×R Represents the nth output, and R represents the downsampling multiple.

[0117] After substituting formula (1) into formula (2), there are 3R-2 non-zero terms x remaining. nR ~x nR-3R+3 :

[0118]

[0119] Through the above formula conversion, each output is obtained by simply adding the weighted sum of the previous inputs, and all outputs can be calculated simultaneously, that is, in parallel.

[0120] Furthermore, the formula shows that for a third-order CIC filter, the n×Rth output is only related to the nR-3R+3th input signal (the subscript of the first summation in the formula) through the nRth input signal (the superscript of the last summation in the formula), that is, only to nR-(nR-3R+3)+1=3R-2 values. Extending this to the first filter with S levels and a downsampling factor of R, each output value is only related to S*R-(S-1) values ​​of the input signal, equivalent to the weighted sum of these S*R-(S-1) values. That is, the CIC filter has S*R-(S-1) weight coefficients. Therefore, the first filter can be converted into a weighted parallel reduction algorithm for parallel accelerated computation. Alternatively, the first filter can be treated as a one-dimensional convolution with a kernel of (1, S*R) and a stride of R, where R is the downsampling factor, S is the number of filter levels, and M = 1.

[0121] Specifically, we still take the CIC filter with a convolution kernel length of 4 and a stride R of 2 as an example. Figure 1c This is a schematic diagram of a conventional CIC filter performing a one-dimensional convolution operation on an input signal provided by the first embodiment of the present invention. Figure 1c As shown in the figure, the length of the input signal is 10. After the convolution operation, the length of the output signal is 5. When the input signal is a multi-channel signal, the CIC one-dimensional convolution can also be regarded as a two-dimensional convolution. Figure 1d Schematic diagram of a conventional CIC filter performing a two-dimensional convolution operation on an input signal provided in the first embodiment of the present invention, as shown in FIG. Figure 1d As shown in Figure 1, multiple input signals of length L form a two-dimensional matrix, the convolution kernel is also a two-dimensional matrix, and the output signal is also a two-dimensional matrix of length L.

[0122] Since the execution efficiency of one-dimensional and two-dimensional convolutions on hardware is not high enough, in order to fully utilize the tensor cores, the first filter can be converted from a convolution operation to a matrix multiplication operation. The specific operation process is as follows:

[0123] 1. Convert the input signal of length L into an original input signal matrix X of M*R, where the number of columns R of the original input signal matrix is ​​the downsampling factor of the first filter, and the number of rows M of the original input signal matrix is ​​L / R.

[0124] 2. Fill the S*R–(S-1) weight coefficients with (S-1) zeros, and then arrange them into a weight coefficient matrix of the first filter of R*S by column, thus obtaining the weight coefficient matrix of the first filter.

[0125] 3. Perform matrix multiplication on the matrix X corresponding to the input signal and the weight coefficient matrix C to obtain the output matrix with L / R rows and S columns, that is, Y = XC

[0126] 4. Add the diagonal elements of the output matrix to get the final output y of the first filter i =Y i,0 +Y i+1,1 +Y i+2,2 +…+Y i+S-1,S-1 , the output signal length is L / R.

[0127] By adopting the above technical solution, the traditional first filter can be optimized, that is, the filtering process of the traditional first filter is converted from the original one-dimensional convolution operation to the matrix multiplication operation based on the tensor kernel. This new filtering method can be applied to the subsequent mixing filtering process, that is, the optimized first filter is first used to filter the local oscillator signal in the mixing process by adopting the matrix multiplication method, and then the processing result is used as the fusion coefficient matrix to filter the input signal to be processed. The filtering processing method also adopts the matrix multiplication operation. For the specific process, please refer to the following steps S120 to S130.

[0128] S120 , performing a matrix-vector dot multiplication operation on the local oscillator signal matrix corresponding to each local oscillator signal using the weight coefficient matrix, and using the obtained matrix as a fusion coefficient matrix after mixing and filtering fusion.

[0129] The local oscillator signal is a fixed frequency sine wave and cosine wave. As can be seen from the above mixing formula, the period of each local oscillator signal is f c / f s , where f c Represents the frequency of the input signal to be processed, f s =RF-IF, representing the mixing frequency, where RF represents the center frequency value of the input signal frequency range, and IF represents the desired target frequency value. In this embodiment, the least common multiple of the periods of the local oscillator signals of each channel is the common mixing period. The ratio N of the least common multiple of the number of common mixing periods and the downsampling factor of the first filter to the downsampling factor means that for the input signal, the local oscillator signal values ​​are the same in every N rows. For example, if the number of common mixing periods is 2560, and the number of columns of the input signal matrix is ​​R=100 (downsampling factor), the least common multiple of 2560 and 100 is 12800=100*128, that is, the mixing signal vectors are the same in every 128 rows of the input signal matrix.

[0130] Based on this, this embodiment can convert the input signal into N input signal conversion matrices. The specific conversion method is to first convert the input signal into the original input signal matrix, where the number of columns in the original input signal matrix is ​​equal to the downsampling factor of the first filter. Then, based on the periodic characteristics of the local oscillator signal, row vectors are extracted from every N rows of the original input signal matrix, and extracted M times in total to form an input signal conversion matrix. This process continues until all row vectors of the original input signal matrix are traversed, resulting in N input signal conversion matrices, where M represents the ratio of the length of the input signal to be processed to N.

[0131] In this embodiment, based on the periodic characteristics of the local oscillator signal, the local oscillator signal can also be converted into a local oscillator signal matrix. When converting each local oscillator signal into a local oscillator signal matrix, only the values ​​of some local oscillator signals can be calculated, and the other values ​​can be repeatedly obtained based on the periodic characteristics.

[0132] Specifically, the conversion of each local oscillator signal into a local oscillator signal matrix can be obtained by the following method:

[0133] A. Based on the periodic characteristics of the local oscillator signal, each local oscillator signal is converted into a local oscillator signal vector.

[0134] For example, if there are 100 local oscillator signals, the period of each local oscillator signal is 2560, and the least common multiple of the period 2560 and the downsampling factor R=100 of the first filter=12800=100*128. Figure 1e A schematic diagram of a local oscillator signal vector provided in the first embodiment of the present invention is shown in FIG. Figure 1e As shown, for each local oscillator signal, a periodic signal with a length of 2560 can be repeated 5 times to obtain a local oscillator signal vector with a length of 12800.

[0135] B. For each local oscillator signal vector, split the local oscillator signal vector into N row vectors, where each row vector has the same number of elements, to obtain a submatrix consisting of N row vectors. Then, concatenate the submatrices corresponding to each local oscillator signal vector by column to obtain a local oscillator signal matrix.

[0136] In this embodiment, in order to correspond to N input signal matrices, each local oscillator signal vector can be traversed in sequence, and then a set number of values ​​can be extracted from the current local oscillator signal vector in sequence as row vectors of the local oscillator signal matrix, where the set number is the same as the number of local oscillator signal paths. After N row vectors are extracted, the sub-matrix corresponding to the local oscillator signal of the path is obtained. This process is repeated in this way. After traversing all local oscillator signal vectors, the sub-matrices corresponding to the local oscillator signal vectors of each path are spliced ​​column by column to obtain a local oscillator signal matrix.

[0137] For example, Figure 1eAs shown, the 1st to 100th values ​​are extracted from each local oscillator signal vector with a length of 12800 as the first row of the submatrix, the 101st to 200th values ​​are extracted as the second row of the submatrix, and so on until the 12701st to 12800th values ​​are extracted as the last row of the submatrix. The corresponding submatrices can be obtained by following the above operations for the other local oscillator signal vectors, and then the submatrices are spliced ​​by column to obtain the local oscillator signal matrix.

[0138] In this embodiment, after obtaining the local oscillator signal matrix, a vector dot product is performed between the local oscillator signal matrix and the weight coefficient matrix of the first filter, thereby realizing the filtering processing of the local oscillator signal by the first filter. The obtained result can be used as a fusion coefficient matrix after mixing and filtering fusion, and the fusion coefficient matrix can be used to filter the input signal to be processed.

[0139] Specifically, such as Figure 1e As shown, when the local oscillator signal matrix and the weight coefficient matrix of the first filter are vector-dot multiplied, the N matrices obtained are:

[0140] The first matrix:

[0141] [C1*M 11 , C2*M 11 , C3*M 11 , C1*M 21 , C2*M 21 , C3*M 21 ,…,,C1*M 100_1 , C2*M 100_1 , C3*M 100_1 ],

[0142] The second matrix:

[0143] [C1*M 12 , C2*M 12 , C3*M 12 , C1*M 22 , C2*M 22 , C3*M 22 ,…,C1*M 100_2 , C2*M 100_2 , C3*M 100_2 ],

[0144]

[0145] The 128th matrix:

[0146] [C1*M 1_128 , C2*M 1_128 , C3*M 1_128 , C1*M 2_128 , C2*M 2_128 , C3*M2_128 ,…,C1*M 100_128 , C2*M 100_128 , C3*M1 00_128 ].

[0147] In this embodiment, by fusing mixing and filtering and expressing them as matrix multiplication, the memory requirement is effectively reduced. In the related art, mixing and filtering are calculated separately. For example, for processing multiple signals, taking C = 100 signals, signal frequency 256MHz, signal length L = 256e6, CIC downsampling multiple R = 100, and FP16 storage as an example, the memory requirement = C*L*2 = 100*256e6*2bytes = 51.2GB. In this embodiment, by fusing the local oscillator signal and CIC as operators and merging the calculations, and expressing them as matrix multiplication, the memory requirement = C*L / R*2 = 100*256e4*2bytes = 0.512GB, and the memory requirement is reduced by R = 100 times.

[0148] S130 , performing a matrix multiplication operation on an input signal matrix corresponding to the input signal to be processed and a fusion coefficient matrix to perform filtering processing on the input signal.

[0149] The input signal matrix corresponding to the input signal to be processed can be obtained as follows:

[0150] Converting the input signal to be processed into an original input signal matrix, wherein the number of columns of the original input signal matrix is ​​the downsampling multiple of the first filter, and the number of rows is the ratio of the length of the input signal to be processed to the downsampling multiple of the first filter;

[0151] Based on the periodic characteristics of the local oscillator signal, a row vector is extracted from every N rows of the original input signal matrix, and extracted M times in total to form an input signal conversion matrix. Until the original input signal matrix is ​​traversed, N input signal conversion matrices are formed, where N is a positive integer representing the ratio of the least common multiple of the mixing common period and the downsampling multiple to the downsampling multiple. The mixing common period is the least common multiple of the periods of the local oscillator signals of each channel. M represents the ratio of the length of the input signal to be processed to N.

[0152] For example, Figure 1f The present invention is a schematic diagram of a conversion matrix for converting an input signal into N input signals provided by the first embodiment, as shown in FIG. Figure 1fAs shown, the 0th row, the 128th row, the 256th row, ... are extracted from the original input signal matrix of M*R to form the first input signal conversion matrix; the 1st row, the 129th row, the 257th row, ... are extracted from the original input signal matrix of M*R to form the second input signal conversion matrix; until the 127th row, the 255th row, ... are extracted from the original input signal matrix of M*R to form the 128th input signal conversion matrix.

[0153] After obtaining N input signal conversion matrices, batch matrix multiplication operations can be performed on the N input signal conversion matrices and the N fusion coefficient matrices, that is, matrix multiplication is performed on the first input signal conversion matrix and the first fusion coefficient matrix, and matrix multiplication is performed on the second input signal conversion matrix and the second fusion coefficient matrix... and matrix multiplication is performed on the Nth input matrix and the Nth fusion coefficient matrix to obtain the product result.

[0154] For example, Figure 1g A schematic diagram of batch matrix multiplication operation of 128 input signal matrices and 128 fusion coefficient matrices is provided in the first embodiment of the present invention, as shown in FIG. Figure 1g As shown, after matrix multiplication operation is performed on each input signal matrix and the corresponding fusion coefficient matrix, 128 batch matrix multiplication operation results of [L, R]*[R, S*C] are obtained, that is, 128 result matrices of [L, S*C] are obtained.

[0155] After obtaining the product result of the batch matrix multiplication, the row elements in the product result of the batch matrix multiplication can be rearranged according to the inverse operation of converting the input signal into N input signal conversion matrices, so as to restore the row elements to their positions in the original input signal matrix. For example, Figure 1h As shown, the 0th row of the first matrix of the product result is used as the 0th row of the restored matrix, the 1st row of the first matrix of the product result is used as the 128th row of the restored matrix, the 2nd row of the first matrix of the product result is used as the 256th row of the restored matrix, and so on..., and the 0th row of the second matrix of the product result is used as the 1st row of the restored matrix, the 1st row of the second matrix of the product result is used as the 129th row of the restored matrix, the 2nd row of the second matrix of the product result is used as the 257th row of the restored matrix, and so on, until the 128th matrix in the product result is traversed, and the positions of the elements in each row of these 128 matrices are restored to their positions in the original input signal. Specifically, the above 128 [L, S*C] result matrices are rearranged to obtain a [L*128, S*C] matrix.

[0156] The product of the restored positions of the row elements is then convolved with a set convolution kernel to obtain a mixed filtered signal, where the number of rows and columns of the convolution kernel is set to the number of stages of the first filter, and one of the diagonal elements of the convolution kernel is set to 1, while all other elements are set to 0. Conventional element-by-element addition cannot fully utilize the computational performance of tensor cores. This embodiment maximizes the efficient computational capability of tensor cores by designing a diagonal convolution kernel with all 1s and performing a diagonal summation operation through convolution.

[0157] Specifically, Figure 1i A schematic diagram of a mixing filtering result provided by the first embodiment of the present invention is shown in FIG. Figure 1h As shown, a convolution kernel with diagonal elements of 1 is designed, and the batch matrix product results after the position of each row element is restored are filled with S-1 rows of 0, and then Figure 1h The convolution kernel shown in the figure is convolved to perform diagonal summation to obtain the final mixing and filtering result. That is, each column in the matrix obtained after the convolution operation is the filtering result of each signal. For example, the above rearranged matrix [L*128, S*C] is converted into Figure 1i Perform diagonal convolution in the manner shown to obtain the result matrix [L*128,C].

[0158] In the related art, the first filter uses a serial operation method, and each output is related to the previous output. In this embodiment, by optimizing the first filter from a serial operation method to a parallel operation method through matrix multiplication, the output of each link is only related to part of the input and is independent of the previous output. The output of each link can be calculated simultaneously or separately without relying on the previous output result. This setting accelerates the filtering process of the first filter and meets the needs of high-speed communication. In addition, by integrating the calculation steps of mixing and filtering, the calculation of these two steps can be completed simultaneously in a parallel computing task, avoiding frequent data exchange, thereby further reducing memory requirements and data transmission delays. The parallel processing method provided by this embodiment greatly improves the overall performance of the software radio receiver, enabling it to maintain efficient operation in a high-speed, large-capacity data transmission environment.

[0159] Furthermore, after the input signal to be processed undergoes mixing, filtering, and fusion processing, the mixed and filtered signal can also be subjected to low-pass filtering to effectively remove unnecessary frequency components from the signal, thereby improving signal quality and ensuring the accuracy of subsequent processing. For details, please refer to the following embodiment 2.

[0160] Example 2

[0161] Figure 2aThis is a flow chart of a mixing filtering method based on tensor kernels provided in the second embodiment of the present invention. Based on the above embodiment, this embodiment further performs low-pass filtering on the filtering result obtained in the above embodiment through an improved second filter, such as Figure 2a As shown, the method provided in the second embodiment of the present invention includes:

[0162] S210 : Determine a weight coefficient matrix of the first filter according to a functional relationship between an output signal and an input signal of the first filter.

[0163] S220 , performing a matrix-vector dot multiplication operation on the local oscillator signal matrix corresponding to each local oscillator signal using the weight coefficient matrix, and using the obtained matrix as a fusion coefficient matrix after mixing and filtering fusion.

[0164] S230 , performing a matrix multiplication operation on the input signal matrix corresponding to the input signal to be processed and the fusion coefficient matrix to perform filtering processing on the input signal.

[0165] Among them, steps S210 to S230 can refer to the description of the above embodiment and will not be repeated here.

[0166] S240 , converting the mixed and filtered signal into a data signal matrix that meets the tensor core size requirement.

[0167] This embodiment further filters the signal after the mixing and filtering of the above embodiment through the optimized second filter. The characteristic of the traditional second filter is that it is filtered through one-dimensional convolution. During the convolution process, the convolution kernel moves one position to the right each time, that is, the number of data points of the input signal and the output signal after filtering is the same. Since the traditional one-dimensional convolution cannot achieve the best computing efficiency on the tensor core, this embodiment is optimized based on its characteristics. In order to improve the computing performance, the one-dimensional convolution operation is converted into a highly optimized matrix multiplication by rearranging the input signal, that is, the signal after the mixing and filtering of the above embodiment, and the second filter coefficient (convolution kernel). This method can better utilize the parallel computing advantages of the tensor core, greatly improve the speed and resource utilization of the filtering calculation, and is particularly suitable for application in large-scale data processing and real-time signal processing scenarios. Among them, when converting the second filter coefficient into a second filter coefficient matrix that meets the tensor core size requirements, the functional relationship between the input signal and the output signal of the second filter can be determined first, so that the coefficient of the second filter can be obtained. For example, taking an FIR filter as an example, the output signal of the FIR filter can be calculated by the following convolution formula:

[0168]

[0169] Where y[n] represents the output signal of the filter, x[n] represents the input signal, h[k] represents the impulse response (coefficient) of the filter, N represents the order of the filter, n represents the nth output of the filter, and k represents the index variable of the summation, which is used to traverse from 0 to N-1, representing the calculation at different time points in the input signal and impulse response.

[0170] In the above formula, the coefficients before the input signal x are the coefficients of the FIR filter. The FIR coefficients can be designed and obtained by Matlab (a commercial mathematical software used for data analysis, wireless communication, deep learning, image processing and computer vision) according to requirements, or can also be obtained by the filter coefficient calculation function signal.firwin(fir_taps, cutoff_freq, window = "hamming", fs_fir) of Python (a cross-platform computer programming language), where fir_taps is the filter order, cutoff_freq is the cutoff frequency, window is the window function, and fs_fir is the frequency of the input signal during the FIR filtering process, that is, the frequency of the signal after mixing filtering in the above embodiment. Specifically, fs_fir = fc / R, which represents the ratio of the frequency of the input signal during CIC mixing filtering to the downsampling multiple of the CIC filter.

[0171] For the second filter with an order of T, its filter coefficients are arranged in columns into a second filter coefficient matrix, where the specific number of matrix columns FIR_COL is D (D is a multiple of the tensor core size), the number of rows FIR_ROW is = D+T-1, and the remaining positions are filled with 0. The function of the second filter coefficient matrix is ​​to convert the original one-dimensional convolution operation corresponding to the second filter into a matrix multiplication operation of the coefficient matrix and the input signal. It should be noted that the FIR involved in this embodiment is illustrated by taking the second filter as an FIR filter as an example. The second filter can also be other filters that meet the characteristics of the above-mentioned second filter, and this embodiment does not specifically limit this.

[0172] In addition, the signal after mixing and filtering is converted into a data signal matrix that meets the tensor core size requirements. The row value X_row is the ratio of the length of the FIR input signal (i.e., the length of the signal output after mixing and filtering) to the number of columns of the second filter coefficient matrix, rounded up to an integer, i.e., X_row = math.ceil(L_fir / FIR_col). Specifically, L_fir = L / R, where L is the signal length before mixing and filtering, and R is the CIC filter downsampling factor. The column value X_col of the data signal matrix is ​​equal to the row value of the second filter coefficient matrix, i.e., X_col = FIR_row. The specific conversion process of the data signal matrix can be implemented as follows: Please refer to Figure 2b.

[0173] When the number of rows of the second filter coefficient matrix is ​​greater than or equal to 2*T-2, the mixed filtered signal is converted into a data signal matrix that meets the tensor core size requirements through the following steps A1 to A4, where T represents the order of the second filter coefficient.

[0174] A1. Expanding the mixed and filtered signal into a one-dimensional first intermediate matrix row by row;

[0175] A2. Fill the starting position of the first intermediate matrix with a value of 0 so that the matrix after filling with 0 can be rearranged into a second intermediate matrix X1, where the number of rows of the second intermediate matrix is ​​X_row+1, and the number of columns is the number of columns of the second filter coefficient matrix, where X_row represents the number of rows of the matrix corresponding to the signal after mixing and filtering;

[0176] A3. Extract the elements from row 0 to the second-to-last row and the last T-1 columns from the second intermediate matrix to form a third intermediate matrix X2. Also extract the elements from row 1 to the last row of the second intermediate matrix to form a fourth intermediate matrix.

[0177] A4. Concatenate the third intermediate matrix and the fourth intermediate matrix by column to obtain a data signal matrix that meets the tensor core size requirements;

[0178] Alternatively, see Figure 2c When the number of rows of the FIR coefficient matrix is ​​greater than the preset 2*T-2, the mixed filtered signal is converted into a data signal matrix that meets the tensor core size requirements through the following steps B1 to B5:

[0179] B1. Expanding the mixed and filtered signal into a one-dimensional first intermediate matrix row by row;

[0180] B2. Fill the starting position and the ending position of the first intermediate matrix with 0s, respectively, so that the matrix after filling with 0s can be rearranged into a fifth intermediate matrix X_left by row, wherein the number of rows of the fifth intermediate matrix is ​​X_row, the number of columns is the number of columns of the second filter coefficient matrix FIR_col, the number of 0s filled in the starting position is (T-1) / 2, and the number of 0s filled in the ending position is max(0,X_row*FIR_col-L-(T-1) / 2); and,

[0181] B3. Fill the starting position and the ending position of the first intermediate matrix with 0s, respectively, so that the matrix after filling with 0s can be rearranged row by row into a sixth intermediate matrix X_right, where the number of rows of the sixth intermediate matrix is ​​X_row+1, the number of columns is FIR_col, the number of 0s filled at the starting position is FIR_col, and the number of 0s filled at the ending position is X_row*FIR_col-L;

[0182] B4. Extract the elements from the 0th row to the second-to-last row and the last (T-FIR_col-1) columns of the sixth intermediate matrix to form a seventh intermediate matrix X_right_1. Also, extract the elements from the 1st row to the last row of the sixth intermediate matrix to form an eighth intermediate matrix X_right_2.

[0183] B5. Concatenate the fifth intermediate matrix, the seventh intermediate matrix, and the eighth intermediate matrix by column to obtain a data signal matrix that meets the tensor core size requirements.

[0184] S250 , performing a matrix multiplication operation on the data signal matrix and the coefficient matrix of the second filter, and expanding the obtained result row by row to form a one-dimensional matrix, and extracting elements of the first set length from the one-dimensional matrix as the filtering result.

[0185] The set length is the length of the signal after mixing and filtering.

[0186] In this embodiment, the coefficient matrix of the second filter and the signal after mixing filtering are respectively converted into matrices that meet the size requirements of the tensor core, and the filtering process of the second filter is converted from the original one-dimensional convolution operation to a highly optimized matrix multiplication, which can better utilize the parallel computing advantages of the tensor core and greatly improve the speed of filtering calculation and resource utilization. It is particularly suitable for application in large-scale data processing and real-time signal processing scenarios.

[0187] Example 3

[0188] Figure 3 A structural block diagram of a mixing filter device based on tensor cores provided in the third embodiment of the present invention is shown in FIG. Figure 3 As shown, the device includes: a weight coefficient matrix determination module 310, a fusion coefficient matrix determination module 320 and a mixing filter module 330, wherein,

[0189] a weight coefficient matrix determination module 310 configured to determine a weight coefficient matrix of the first filter based on a functional relationship between an output signal and an input signal of the first filter, wherein the weight coefficient matrix is ​​used to convert an original one-dimensional convolution operation corresponding to the first filter into a matrix multiplication operation of the weight coefficient and the input signal, wherein the stride of the original one-dimensional convolution operation corresponding to the first filter is greater than 1;

[0190] The fusion coefficient matrix determination module 320 is configured to perform a matrix-vector dot multiplication operation on the weight coefficient matrix and the local oscillator signal matrix corresponding to each local oscillator signal, and use the obtained matrix as the fusion coefficient matrix after mixing and filtering fusion;

[0191] The frequency mixing and filtering module 330 is configured to perform a matrix multiplication operation on an input signal matrix corresponding to the input signal to be processed and a fusion coefficient matrix, so as to perform filtering processing on the input signal.

[0192] Optionally, the weight coefficient matrix determination module 310 is specifically configured to:

[0193] Determining the number of weight coefficients by determining the number of input signals associated with each output value of the first filter based on a functional relationship between the output signals and the input signals of each calculation link of the first filter;

[0194] Based on the number of weight coefficients, a weight coefficient matrix of the first filter is obtained, wherein the number of rows of the weight coefficient matrix is ​​the downsampling multiple of the first filter, and the number of columns of the weight coefficient matrix is ​​the order of the first filter.

[0195] Optionally, the fusion coefficient matrix determination module 320 is specifically configured to:

[0196] Based on the periodic characteristics of the local oscillator signal, each local oscillator signal is converted into a local oscillator signal vector, wherein the length of each local oscillator signal vector is the least common multiple of the number of periods of the local oscillator signal and the downsampling factor of the first filter;

[0197] For each local oscillator signal vector, split the local oscillator signal vector into N row vectors, each row vector having the same number of elements, to obtain a submatrix composed of N row vectors, and concatenate the submatrices corresponding to each local oscillator signal vector by column to obtain a local oscillator signal matrix, where N is a positive integer representing the ratio of the least common multiple of the number of mixing common periods and the downsampling factor to the downsampling factor, and the mixing common period is the least common multiple of the periods of each local oscillator signal;

[0198] Perform vector dot multiplication on the local oscillator signal matrix and the weight coefficient matrix, and use the obtained matrix as the fusion coefficient matrix after mixing and filtering fusion.

[0199] Optionally, the input signal matrix corresponding to the input signal to be processed is obtained in the following manner:

[0200] Converting the input signal to be processed into an original input signal matrix, wherein the number of columns of the original input signal matrix is ​​the downsampling multiple of the first filter;

[0201] Based on the periodic characteristics of the local oscillator signal, extracting row vectors from every N rows of the original input signal matrix, extracting M times in total, to form an input signal conversion matrix, until the original input signal matrix is ​​traversed to obtain N input signal conversion matrices, where M represents the ratio of the length of the input signal to be processed to N;

[0202] Accordingly, the mixing and filtering module 330 is specifically configured as follows:

[0203] Perform batch matrix multiplication on the N input signal conversion matrices and the fusion coefficient matrix to obtain the product result;

[0204] The product result is convolved with a set convolution kernel to obtain a mixed filtered signal, wherein the number of rows and columns of the convolution kernel are both the number of stages of the first filter, and one of the diagonal elements of the convolution kernel is set to 1, and the other elements are set to 0.

[0205] Optionally, the apparatus provided by the embodiment of the present invention further includes:

[0206] The low-pass filtering module is configured to perform low-pass filtering on the signal after the mixing filter to obtain an output signal.

[0207] Optionally, the low-pass filter module is configured as follows:

[0208] Converting the mixed filtered signal into a data signal matrix that meets the tensor core size requirements, and converting the second filter coefficient into a second filter coefficient matrix that meets the tensor core size requirements, wherein the row value of the data signal matrix is ​​the ratio of the input signal length value to the number of columns of the second filter coefficient matrix, the column value of the data signal matrix is ​​equal to the row value of the second filter coefficient matrix, and the second filter coefficient matrix is ​​used to convert the original one-dimensional convolution operation corresponding to the second filter into a matrix multiplication operation of the coefficient matrix and the input signal, and the convolution kernel moves one bit each time during the original one-dimensional convolution operation corresponding to the second filter;

[0209] Performing a matrix multiplication operation on the data signal matrix and the coefficient matrix of the second filter, and expanding the obtained result row by row to form a one-dimensional matrix;

[0210] Extract the first set length elements from the one-dimensional matrix as the filtering result, where the set length is the length of the signal after mixing and filtering.

[0211] Optionally, the first filter is any one of the following filters:

[0212] Cascaded integrator comb CIC filter, moving average downsampling filter, weighted sliding average downsampling filter;

[0213] The second filter is: a finite length unit impulse response FIR filter.

[0214] Example 4

[0215] See also Figure 4 , Figure 4 This is a schematic diagram of the structure of a computing device provided in the fourth embodiment of the present invention. Figure 4As shown, the computing device may include:

[0216] A memory 701 storing executable program code;

[0217] a processor 702 coupled to the memory 701;

[0218] The processor 702 calls the executable program code stored in the memory 701 to execute the tensor core-based mixing filtering method provided by any embodiment of the present invention.

[0219] An embodiment of the present invention discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the tensor core-based mixing filtering method provided by any embodiment of the present invention.

[0220] In various embodiments of the present invention, it should be understood that the size of the serial numbers of the above-mentioned processes does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0221] In the embodiments provided herein, it should be understood that "B corresponding to A" means that B is associated with A and B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B based solely on A; B can also be determined based on A and / or other information.

[0222] In addition, the functional units in the embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0223] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-accessible memory. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several requests for causing a computer device (which can be a personal computer, server, or network device, specifically a processor in the computer device) to execute some or all of the steps of the above-mentioned methods of various embodiments of the present invention.

[0224] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program. The program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.

[0225] Those skilled in the art will appreciate that the accompanying drawings are merely schematic diagrams of an embodiment, and the modules or processes in the accompanying drawings are not necessarily required to implement the present invention.

[0226] Those skilled in the art will appreciate that the modules in the apparatuses of the embodiments may be distributed in the apparatuses of the embodiments as described in the embodiments, or may be located in one or more apparatuses different from the embodiments with corresponding changes. The modules in the above embodiments may be combined into one module or further divided into multiple sub-modules.

[0227] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A mixing filtering method based on tensor kernel, characterized in that: include: Determining a weight coefficient matrix of the first filter based on a functional relationship between an output signal and an input signal of the first filter, wherein the weight coefficient matrix is ​​used to convert an original one-dimensional convolution operation corresponding to the first filter into a matrix multiplication operation of the weight coefficient and the input signal, wherein a stride of the original one-dimensional convolution operation corresponding to the first filter is greater than 1; Performing a matrix-vector dot multiplication operation on the local oscillator signal matrix corresponding to each local oscillator signal by using the weight coefficient matrix, and using the obtained matrix as a fusion coefficient matrix after mixing and filtering fusion; Performing a matrix multiplication operation on an input signal matrix corresponding to an input signal to be processed and the fusion coefficient matrix to perform filtering processing on the input signal; The step of determining the weight coefficient matrix of the first filter according to the functional relationship between the output signal and the input signal of the first filter includes: Determining the number of weight coefficients by determining the number of input signals associated with each output value of the first filter based on a functional relationship between the output signals and the input signals of each calculation link of the first filter; Based on the number of weight coefficients, a weight coefficient matrix of the first filter is obtained, wherein the number of rows of the weight coefficient matrix is ​​the downsampling multiple of the first filter, and the number of columns of the weight coefficient matrix is ​​the order of the first filter.

2. The method according to claim 1, characterized in that The step of performing a matrix-vector dot multiplication operation on the local oscillator signal matrix corresponding to each local oscillator signal by using the weight coefficient matrix and using the obtained matrix as a fusion coefficient matrix after mixing and filtering fusion includes: Based on the periodic characteristics of the local oscillator signal, each local oscillator signal is converted into a local oscillator signal vector, wherein the length of each local oscillator signal vector is the least common multiple of the number of periods of the local oscillator signal and the downsampling factor of the first filter; For each local oscillator signal vector, split the local oscillator signal vector into N row vectors, each row vector having the same number of elements, to obtain a submatrix consisting of the N row vectors, and concatenate the submatrices corresponding to the local oscillator signal vectors by column to obtain a local oscillator signal matrix, where N is a positive integer representing the ratio of the least common multiple of the number of mixing common periods and the downsampling factor to the downsampling factor, and the mixing common period is the least common multiple of the periods of the local oscillator signals; A vector dot multiplication operation is performed on the local oscillator signal matrix and the weight coefficient matrix, and the obtained matrix is ​​used as a fusion coefficient matrix after mixing and filtering fusion.

3. The method according to claim 2, characterized in that The input signal matrix corresponding to the input signal to be processed is obtained as follows: Converting the input signal to be processed into an original input signal matrix, wherein the number of columns of the original input signal matrix is ​​the downsampling multiple of the first filter; Based on the periodic characteristics of the local oscillator signal, extracting row vectors from every N rows of the original input signal matrix, extracting M times in total, to form an input signal conversion matrix, until all row vectors of the original input signal matrix are traversed to obtain N input signal conversion matrices, where M represents the ratio of the length value of the input signal to be processed to N; Accordingly, performing a matrix multiplication operation on the input signal matrix corresponding to the input signal to be processed and the fusion coefficient matrix includes: Performing batch matrix multiplication operations on N input signal conversion matrices and the fusion coefficient matrix to obtain a product result; The product result is convolved with a set convolution kernel to obtain a mixed filtered signal, wherein the number of rows and columns of the set convolution kernel are both the order of the first filter, and one of the diagonal elements of the set convolution kernel is 1, and the other elements are all 0.

4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: The signal after the mixing and filtering is subjected to low-pass filtering to obtain an output signal.

5. The method according to claim 4, characterized in that The low-pass filtering of the mixed and filtered signal comprises: Converting the mixed filtered signal into a data signal matrix that meets the tensor core size requirements, and converting the second filter coefficient into a second filter coefficient matrix that meets the tensor core size requirements, wherein the number of rows of the data signal matrix is ​​the ratio of the input signal length value to the number of columns of the second filter coefficient matrix, the number of columns of the data signal matrix is ​​equal to the number of rows of the second filter coefficient matrix, and the second filter coefficient matrix is ​​used to convert the original one-dimensional convolution operation corresponding to the second filter into a matrix multiplication operation of the coefficient matrix and the input signal, and the convolution kernel moves one bit each time during the original one-dimensional convolution operation corresponding to the second filter; Performing a matrix multiplication operation on the data signal matrix and the coefficient matrix of the second filter, and expanding the obtained result row by row to form a one-dimensional matrix; The first set length elements are extracted from the one-dimensional matrix as filtering results, wherein the set length is the length of the signal after mixing and filtering.

6. The method according to claim 5, characterized in that The first filter is any one of the following filters: Cascaded integrator comb CIC filter, moving average downsampling filter, weighted sliding average downsampling filter; The second filter is a finite-length unit impulse response (FIR) filter.

7. A mixing filter device based on tensor kernel, characterized in that: include: a weight coefficient matrix determination module, configured to determine a weight coefficient matrix of the first filter based on a functional relationship between an output signal and an input signal of the first filter, wherein the weight coefficient matrix is ​​used to convert an original one-dimensional convolution operation corresponding to the first filter into a matrix multiplication operation of the weight coefficient and the input signal, wherein a stride of the original one-dimensional convolution operation corresponding to the first filter is greater than 1; a fusion coefficient matrix determination module configured to perform a matrix-vector dot multiplication operation on the weight coefficient matrix and the local oscillator signal matrix corresponding to each local oscillator signal, and use the obtained matrix as the fusion coefficient matrix after mixing and filtering; a mixing and filtering module configured to perform a matrix multiplication operation on an input signal matrix corresponding to an input signal to be processed and the fusion coefficient matrix to perform filtering processing on the input signal; The weight coefficient matrix determination module is specifically configured as follows: Determining the number of weight coefficients by determining the number of input signals associated with each output value of the first filter based on a functional relationship between the output signals and the input signals of each calculation link of the first filter; Based on the number of weight coefficients, a weight coefficient matrix of the first filter is obtained, wherein the number of rows of the weight coefficient matrix is ​​the downsampling multiple of the first filter, and the number of columns of the weight coefficient matrix is ​​the order of the first filter.

8. A computing device, characterized in that The computing device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the tensor core-based mixing filtering method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the mixing filtering method based on tensor cores according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Data processing method and device, electronic equipment and computer readable storage medium

    CN118152713A

  • Information processing device, signal processing method, and program

    JP2016103089A