A data processing method and device, electronic equipment and storage medium

By splitting 3D convolutional data into slices along the depth dimension and processing them using 2D convolutional sub-operators, the problems of mathematical equivalence and low efficiency of 3D convolutional data on hardware platforms are solved, achieving efficient and accurate data processing.

CN123160982APending Publication Date: 2026-11-24北京凌川科技有限公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611353463.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-02
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing technologies struggle to guarantee the mathematical equivalence of convolution operations within the existing computing capabilities of hardware platforms when processing 3D convolutional data, resulting in poor data processing accuracy and low efficiency.

Method used

The input image data is split into multiple depth slices along the depth dimension and compressed to the channel dimension. The intermediate image data is split into multiple sub-image data using the splitting information of the preset dimension. Sub-convolution operations are performed through multiple two-dimensional convolution sub-operators, and finally the output feature data is obtained by combining them.

Benefits of technology

With the existing computing power of the hardware platform, a convolution operation equivalent to the original 3D convolution operation was achieved, improving the accuracy and efficiency of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123160982A_ABST
    Figure CN123160982A_ABST
Patent Text Reader

Abstract

This disclosure relates to a data processing method, apparatus, electronic device, and storage medium. The method involves splitting input image data into a first number of depth slices along the depth dimension; for each depth slice, compressing its depth dimension to its channel dimension to obtain intermediate image data; based on a preset dimension of splitting information, splitting each intermediate image data into multiple sub-image data along the preset dimension; performing sub-convolution operations on the multiple sub-image data based on multiple two-dimensional convolution sub-operators to obtain corresponding sub-convolution results; and combining the preset dimension and depth dimension based on each sub-convolution result to obtain output feature data. The preset dimension of splitting information corresponds to the splitting method of the two-dimensional convolution operator constructed based on the three-dimensional convolution operator, and the two-dimensional convolution operator is split into multiple two-dimensional convolution sub-operators, thereby enabling equivalent convolution operations while adapting to the original computing power of the hardware platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to a data processing method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the widespread application of deep learning in the field of computer vision, convolutional neural networks (CNNs) have become the mainstream model for tasks such as image recognition, object detection, and image segmentation.

[0003] However, the data processing methods based on convolutional neural networks in related technologies are difficult to guarantee the mathematical equivalence of convolution operations when dealing with large input data (such as 3D convolutional data) while adapting to the original computing power of the hardware platform. This results in poor data processing accuracy and low processing efficiency. Summary of the Invention

[0004] This disclosure provides a data processing method, apparatus, electronic device, and storage medium to at least solve the problem in related technologies where, for large input data (such as 3D convolutional data), it is difficult to guarantee the mathematical equivalence of convolution operations while adapting to the existing computing power of the hardware platform, resulting in poor data processing accuracy and low processing efficiency. The technical solution of this disclosure is as follows: According to a first aspect of the present disclosure, a data processing method is provided, comprising: The input image data to be processed is obtained. If the input image data includes data with a depth dimension, the input image data is split into a first number of depth slices along the depth dimension of the input image data. The first number is consistent with the depth of the output feature data of the neural network model constructed based on the three-dimensional convolution operator. For each of the depth slice data, the depth dimension of the depth slice data is compressed to the channel dimension to obtain the corresponding intermediate image data; Based on the splitting information of a preset dimension, each intermediate image data is split into multiple sub-image data along the preset dimension. Sub-convolution operations are then performed on each of the multiple sub-image data using multiple two-dimensional convolution sub-operators to obtain the sub-convolution result corresponding to each sub-image data. The splitting information of the preset dimension corresponds to the splitting method of the two-dimensional convolution operator. The two-dimensional convolution operator is constructed based on the three-dimensional convolution operator and is split into the multiple two-dimensional convolution sub-operators. The preset dimension includes a channel dimension and / or a spatial dimension. Based on the sub-convolution results corresponding to each of the sub-image data, the preset dimension and the depth dimension are combined to obtain the output feature data corresponding to the input image data.

[0005] In some exemplary embodiments, the method further includes: In the case where the input image data does not include the depth dimension, the input image data is used as the intermediate image data, and the splitting information based on the preset dimension is executed to split the intermediate image data into multiple sub-image data along the preset dimension. The steps are as follows: the multiple two-dimensional convolution sub-operators are used to perform sub-convolution operations on the multiple sub-image data respectively to obtain the sub-convolution results corresponding to each sub-image data. Based on the sub-convolution results corresponding to each of the sub-image data, the preset dimensions are combined to obtain the output feature data corresponding to the input image data.

[0006] In some exemplary embodiments, when the preset dimension includes a spatial dimension, the splitting information based on the preset dimension, which splits each intermediate image data into multiple sub-image data along the preset dimension, includes: For each of the intermediate image data, the size of each output feature block in the spatial dimension is determined according to the number of splits in the spatial dimension; Based on the size of each output feature block in the spatial dimension and the preset convolution parameters of the two-dimensional convolution operator, determine the start and end position information of the input sub-region corresponding to each output feature block on the intermediate image data; Based on the start and end position information, corresponding spatial sub-image data are extracted from the intermediate image data to obtain multiple sub-image data.

[0007] In some exemplary embodiments, when the preset dimension includes a channel dimension, the splitting information based on the preset dimension, which splits each intermediate image data into multiple sub-image data along the preset dimension, includes: Based on the number of splits in the channel dimension, the intermediate image data is divided into multiple channel subgroups according to the total number of channels in the channel dimension; Along the channel dimension, based on the division of each channel subgroup, the corresponding channel sub-image data is extracted from the intermediate image data to obtain multiple sub-image data.

[0008] In some exemplary embodiments, when the preset dimension includes a channel dimension and a spatial dimension, the splitting information based on the preset dimension, which splits each intermediate image data into multiple sub-image data along the preset dimension, includes: Based on the number of splits in the channel dimension and the number of splits in the spatial dimension, the intermediate image data is split into multiple sub-image data according to a preset splitting order; each sub-image data corresponds to a combination of a channel subgroup and an input sub-region, wherein the channel subgroup is determined by the splitting in the channel dimension and the input sub-region is determined by the splitting in the spatial dimension. The preset splitting order includes first splitting along the channel dimension, and then splitting each channel sub-image data obtained from the splitting along the spatial dimension; or, first splitting along the spatial dimension, and then splitting each spatial sub-image data obtained from the splitting along the channel dimension.

[0009] In some exemplary embodiments, splitting the input image data into a first number of depth slices along the depth dimension of the input image data includes: Based on the sliding window parameters of the 3D convolution operator in the depth direction, a first number of sliding steps of the 3D convolution operator in the depth dimension and a set of depth indices corresponding to each sliding position are determined; each depth index in the set of depth indices indicates a depth position in the depth dimension. Based on the depth index set corresponding to each sliding position, the corresponding depth slice data is extracted from the input image data.

[0010] In some exemplary embodiments, before acquiring the input image data to be processed, the method further includes: Obtain the neural network model to be deployed; Based on the parameters of the three-dimensional convolution operator in the neural network model, an equivalent two-dimensional convolution operator is constructed, wherein the number of input channels of the two-dimensional convolution operator is the product of the number of input channels of the three-dimensional convolution operator and the size of the convolution kernel in the depth direction; Based on the preset dimension of the splitting information, the two-dimensional convolution operator is split into the plurality of two-dimensional convolution sub-operators; The multiple two-dimensional convolution operators are loaded into multiple computing units of the target chip.

[0011] According to a second aspect of the present disclosure, a data processing apparatus is provided, comprising: The input data splitting unit is configured to acquire input image data to be processed, and, if the input image data includes data with a depth dimension, split the input image data into a first number of depth slices along the depth dimension of the input image data; the first number is consistent with the depth of the output feature data of the neural network model constructed based on the three-dimensional convolution operator; The depth channel fusion unit is configured to perform, for each of the depth slice data, compress the depth dimension of the depth slice data to the channel dimension to obtain the corresponding intermediate image data; The intermediate data splitting convolution unit is configured to perform splitting information based on a preset dimension, splitting each intermediate image data into multiple sub-image data along the preset dimension, and performing sub-convolution operations on the multiple sub-image data based on multiple two-dimensional convolution sub-operators to obtain the sub-convolution result corresponding to each sub-image data; the splitting information of the preset dimension corresponds to the splitting method of the two-dimensional convolution operator; the two-dimensional convolution operator is constructed based on the three-dimensional convolution operator and is split into the multiple two-dimensional convolution sub-operators; the preset dimension includes channel dimension and / or spatial dimension; The first sub-convolution result combination unit is configured to perform a combination of the preset dimension and the depth dimension based on the sub-convolution results corresponding to each of the sub-image data to obtain the output feature data corresponding to the input image data.

[0012] In some exemplary embodiments, the apparatus further includes: The data determination unit is configured to perform the following steps when the input image data is data that does not include the depth dimension: taking the input image data as the intermediate image data, executing the splitting information based on the preset dimension to split the intermediate image data into multiple sub-image data along the preset dimension, and performing sub-convolution operations on the multiple sub-image data based on the multiple two-dimensional convolution sub-operators to obtain the sub-convolution result corresponding to each sub-image data. The second sub-convolution result combination unit is configured to perform a combination of the preset dimensions based on the sub-convolution results corresponding to each of the sub-image data to obtain the output feature data corresponding to the input image data.

[0013] In some exemplary embodiments, when the preset dimension includes a spatial dimension, the intermediate data splitting convolutional unit includes a spatial sub-image data splitting unit. The spatial sub-image data splitting unit is configured to perform the following operations for each intermediate image data: determine the size of each output feature block in the spatial dimension based on the number of splits in the spatial dimension; determine the start and end position information of the input sub-region corresponding to each output feature block in the intermediate image data based on the size of each output feature block in the spatial dimension and the preset convolution parameters of the two-dimensional convolution operator; and extract the corresponding spatial sub-image data from the intermediate image data according to each start and end position information to obtain multiple sub-image data.

[0014] In some exemplary embodiments, when the preset dimension includes a channel dimension, the intermediate data splitting convolutional unit includes a channel sub-image data splitting unit. The channel sub-image data splitting unit is configured to perform the following: divide the total number of channels in the intermediate image data in the channel dimension into multiple channel subgroups according to the number of splits in the channel dimension; and extract the corresponding channel sub-image data from the intermediate image data along the channel dimension based on the division of each channel subgroup to obtain multiple sub-image data.

[0015] In some exemplary embodiments, when the preset dimension includes a channel dimension and a spatial dimension, the intermediate data splitting convolutional unit includes a sequential data splitting unit. The sequential data splitting unit is configured to split the intermediate image data into multiple sub-image data according to a preset splitting order based on the number of splits in the channel dimension and the number of splits in the spatial dimension. Each sub-image data corresponds to a combination of a channel subgroup and an input subregion. The channel subgroup is determined by the splitting in the channel dimension, and the input subregion is determined by the splitting in the spatial dimension. The preset splitting order includes first splitting along the channel dimension, and then splitting each channel sub-image data obtained from the splitting along the spatial dimension; or, first splitting along the spatial dimension, and then splitting each spatial sub-image data obtained from the splitting along the channel dimension.

[0016] In some exemplary embodiments, when the input data splitting unit splits the input image data into a first number of depth slices along the depth dimension, it is specifically configured to perform: determining, based on the sliding window parameters of the 3D convolution operator in the depth direction, a first number of sliding steps of the 3D convolution operator in the depth dimension and a set of depth indices corresponding to each sliding position; each depth index in the set of depth indices indicates a depth position in the depth dimension; and extracting the corresponding depth slice data from the input image data based on the set of depth indices corresponding to each sliding position.

[0017] In some exemplary embodiments, the apparatus further includes: The model acquisition unit is configured to acquire the neural network model to be deployed; A two-dimensional convolution operator construction unit is configured to construct an equivalent two-dimensional convolution operator based on the parameters of the three-dimensional convolution operator in the neural network model, wherein the number of input channels of the two-dimensional convolution operator is the product of the number of input channels of the three-dimensional convolution operator and the size of the convolution kernel in the depth direction; The two-dimensional convolution operator splitting unit is configured to execute splitting information based on the preset dimension to split the two-dimensional convolution operator into the plurality of two-dimensional convolution sub-operators; The sub-operator loading unit is configured to load the plurality of two-dimensional convolution sub-operators into the plurality of computation units of the target chip.

[0018] According to a third aspect of the present disclosure, an electronic device is provided, comprising: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the data processing method of the first aspect described above.

[0019] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein when instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the data processing method of the first aspect described above.

[0020] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the data processing method of the first aspect described above.

[0021] In this embodiment of the invention, when the input image data is five-dimensional data including a depth dimension, the input image data is divided into a first number of depth slices along its depth dimension. This first number corresponds to the depth of the output feature data of the neural network model constructed based on a three-dimensional convolution operator. For each depth slice, its depth dimension is compressed to its channel dimension to obtain corresponding intermediate image data, making the intermediate image data four-dimensional. Then, based on a preset dimension of splitting information, each intermediate image data is divided into multiple sub-image data along that preset dimension. Sub-convolution operations are then performed on these multiple sub-image data using multiple two-dimensional convolution operators. The sub-convolution results corresponding to each sub-image data are obtained; wherein, the preset dimension splitting information corresponds to the splitting method of the two-dimensional convolution operator, which is constructed based on the aforementioned three-dimensional convolution operator and is split into multiple two-dimensional convolution sub-operators, and the preset dimension includes the channel dimension and / or spatial dimension; finally, based on the sub-convolution results corresponding to each sub-image data, the preset dimension and the depth dimension are combined to obtain the output feature data corresponding to the input image data, so that for large input data such as three-dimensional convolution data, convolution operations equivalent to the original three-dimensional convolution operations can be achieved under the premise of adapting to the original computing power of the hardware platform, thereby improving the accuracy and efficiency of data processing.

[0022] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0023] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.

[0024] Figure 1 This is a flowchart illustrating a data processing method according to an exemplary embodiment; Figure 2 This is a flowchart illustrating another data processing method according to an exemplary embodiment; Figure 3 This is a flowchart example illustrating a data processing method according to an exemplary embodiment; Figure 4 This is a flowchart illustrating another data processing method according to an exemplary embodiment; Figure 5 This is a structural block diagram of a data processing apparatus according to an exemplary embodiment; Figure 6 This is a structural block diagram of an electronic device according to an exemplary embodiment. Detailed Implementation

[0025] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0026] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0027] It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.

[0028] In practical applications of convolutional neural networks, especially in scenarios involving 3D convolution input data, efficient inference or training often needs to be achieved on limited hardware computing resources. However, existing convolution operation optimization schemes present a contradiction between mathematical equivalence and data processing efficiency, making it difficult to simultaneously meet the following two requirements: first, strictly maintaining mathematical equivalence with the original convolution operation to ensure the accuracy of data processing; and second, fully adapting to the computing power of the target hardware platform to improve processing efficiency.

[0029] Specifically, current data processing methods based on depthwise separable convolution decompose the standard convolution into channel-wise convolution and pointwise convolution, which can reduce the number of parameters and computational cost. However, this introduces an additional computational layer, and the decomposed results are not entirely equivalent to the original convolution, resulting in precision loss and affecting the accuracy of the output. Current data processing methods based on grouped convolutions group the input and output channels and perform independent convolution operations on each group. This allows for parallel computation and improves computational efficiency, but it requires ensuring the compatibility of input and output channels. The computational results are not entirely equivalent to the original convolution, and multiple parallel computations may introduce additional synchronization overhead at the hardware level, increasing the overall computational complexity. Current data processing methods based on im2col and general matrix multiplication convert the convolution operation into matrix multiplication, theoretically achieving results completely equivalent to the original convolution. However, this approach suffers from high computational complexity, large memory consumption, and poor portability, making it difficult to achieve high-performance convolution operations in practical deployments.

[0030] In view of this, embodiments of this disclosure provide a data processing method to at least solve the problem that, when dealing with large input data such as 3D convolutional data, related technologies struggle to guarantee the mathematical equivalence of convolution operations while adapting to the existing computing power of the hardware platform, resulting in poor data processing accuracy and low processing efficiency. The data processing method of this disclosure embodiments will be described in detail below.

[0031] It should be noted that the data processing method of this disclosure can be applied to the data processing device of this disclosure. This data processing device can be deployed in an electronic device, which may include a terminal and / or a server. Terminals include, but are not limited to, mobile phones, computers, smart voice interaction devices, smart home appliances, vehicle terminals, and aircraft. Client software with interactive functions, such as an application (App), can be installed on the terminal. This application can be a standalone application or a subroutine within an application.

[0032] A server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0033] Figure 1 This is a flowchart illustrating a data processing method according to an exemplary embodiment, such as... Figure 1 As shown, the method may include the following steps S101 to S107: In step S101, input image data to be processed is obtained. If the input image data includes data with a depth dimension, the input image data is split into a first number of depth slices along the depth dimension of the input image data. The first number is consistent with the depth of the output feature data of the neural network model constructed based on the three-dimensional convolution operator.

[0034] The data processing method of this disclosure can be applied to various computer vision application scenarios, such as image recognition, target detection, and image segmentation. The input image data to be processed is the image data to be processed in the specific application scenario.

[0035] Specifically, the input image data may or may not include a depth dimension. When the input image data includes a depth dimension, it is a five-dimensional tensor, with dimensions including batch dimension (B), channel dimension (C), depth dimension (D), height dimension (H), and width dimension (W). In other words, the input image data can be represented as three-dimensional convolutional data [B, C_in, D, H, W]. When the input image data does not include a depth dimension, it is a four-dimensional tensor, with dimensions including batch dimension (B), channel dimension (C), height dimension (H), and width dimension (W). In other words, the input image data can be represented as two-dimensional convolutional data [B, C_in, H, W].

[0036] In this embodiment of the disclosure, when the input image data is a five-dimensional tensor including a depth dimension, the input image data is split into a first number of depth slices along the depth dimension of the input image data, and the first number is consistent with the depth of the output feature data of the neural network model constructed based on the three-dimensional convolution operator. Each depth slice includes data from multiple depth positions of the input image data.

[0037] Optionally, the neural network model built based on the three-dimensional convolution operator is called a convolutional neural network (CNN).

[0038] In specific implementation, before splitting the input image data into a first number of depth slices along the depth dimension of the input image data, the depth dimension boundary of the input image data can be filled according to the depth direction padding amount (padding_depth) of the three-dimensional convolution operator to ensure that the edge position data of the input image data is not lost.

[0039] In some exemplary embodiments, step S101 above, when splitting the input image data into a first number of depth slices along the depth dimension of the input image data, may include: Based on the sliding window parameters of the 3D convolution operator in the depth direction, a first number of sliding steps of the 3D convolution operator in the depth dimension and a set of depth indices corresponding to each sliding position are determined; each depth index in the set of depth indices indicates a depth position in the depth dimension. Based on the depth index set corresponding to each sliding position, the corresponding depth slice data is extracted from the input image data.

[0040] Specifically, the sliding window parameters of the 3D convolution operator in the depth direction may include the depth direction convolution kernel size (hereinafter also referred to as k_d), the depth direction stride (hereinafter also referred to as stride_depth), the depth direction padding amount (hereinafter also referred to as padding_depth), and other depth direction hyperparameters, such as the depth direction dilation rate (hereinafter also referred to as dilation_depth).

[0041] The first quantity can be calculated based on the total depth dimension of the input image data in the depth dimension, as well as the depth-direction convolution kernel size, depth-direction stride, depth-direction fill amount, and depth-direction dilation of the 3D convolution operator. For example, the first quantity can be calculated using the following formula:

[0042] in, This represents the depth of the output feature data of a convolutional neural network model constructed based on a three-dimensional convolution operator. In this embodiment of the disclosure, the first quantity is equal to this depth. ; This represents the total depth dimension of the input image data in the depth dimension; This represents the effective kernel size of the 3D convolution operator in the depth direction. .

[0043] Through calculation Determining the first number facilitates the subsequent equivalent transformation of the three-dimensional convolution operation on the input image data for the five-dimensional tensor into that first number of times. This is a two-dimensional convolution operation.

[0044] Specifically, the depth index set corresponding to each sliding position can be determined based on the depth direction step size (stride_depth) and the depth direction hole rate (dilation_depth). Through each depth index set, the corresponding depth slice data can be extracted from the input image data, thus obtaining the first number of... Each depth slice contains data at depths of k_d.

[0045] In specific implementation, for the i-th (i=0,1,…, -1) depth slice data, the corresponding depth index set can be determined as follows: calculate i and the depth direction step size. The product of the two is used to obtain the starting depth index; based on the starting depth index, k_d depth indices are obtained sequentially with the depth direction hole rate as the interval. The k_d depth indices are the depth index set corresponding to the i-th depth slice data. The i-th depth slice data can be extracted from the input image data using the depth index set.

[0046] In some examples, to improve data processing efficiency, before extracting the corresponding depth slice data from the input image data based on the depth index set corresponding to each sliding position, the input image data [B, C_in, D, H, W] can be dimensionally permuted so that the first dimension of the input image data is the channel dimension and the second dimension is the depth dimension, i.e., the dimension-permutated input image data is [C_in, D, B, H, W]. Subsequently, when extracting the depth slice data corresponding to each depth index set from the dimension-permutated input image data, efficient vectorized slicing operations can be performed according to the depth index. It can be understood that each depth slice data can be represented as a five-dimensional tensor [C_in, k_d, B, H, W].

[0047] In the above embodiments, by utilizing the sliding window parameters of the three-dimensional convolution operator in the depth direction, the depth index set corresponding to each sliding position is accurately determined, thereby achieving accurate splitting of the depth dimension of the input image data. This ensures that each depth slice data obtained from the splitting is completely consistent with the receptive field of the original three-dimensional convolution operator at the corresponding sliding position, thus ensuring mathematical equivalence in subsequent data processing and avoiding information loss or feature distortion caused by improper data splitting.

[0048] In step S103, for each depth slice data, the depth dimension of the depth slice data is compressed to the channel dimension to obtain the corresponding intermediate image data.

[0049] Specifically, the first quantity can be obtained through the aforementioned step 101. A five-dimensional tensor of depth slice data [C_in, k_d, B, H, W]. In step 103, for each depth slice data, the depth dimension of the depth slice data is compressed to the channel dimension, thereby combining the two dimensions [C_in, k_d] to obtain the intermediate image data corresponding to the depth slice data. The intermediate image data is a four-dimensional tensor, and its channel dimension (also known as the number of channels) is the product of the number of channels of the input image data C_in and the number of channels of the depth slice data (equal to k_d). Then the corresponding intermediate image data can be represented as [C_in... k_d,B,H,W].

[0050] It is understood that the depth slice data and intermediate image data in the embodiments of this disclosure are in one-to-one correspondence.

[0051] In step S105, based on the splitting information of the preset dimension, each intermediate image data is split into multiple sub-image data along the preset dimension, and sub-convolution operations are performed on the multiple sub-image data based on multiple two-dimensional convolution sub-operators to obtain the sub-convolution result corresponding to each sub-image data.

[0052] The preset dimension splitting information corresponds to the splitting method of the two-dimensional convolution operator. The two-dimensional convolution operator is constructed based on the three-dimensional convolution operator and is split into the multiple two-dimensional convolution sub-operators. The preset dimension includes channel dimension and / or spatial dimension.

[0053] Based on this, in some exemplary embodiments, such as Figure 2 As shown, before acquiring the input image data to be processed, the method may further include: In step S201, a neural network model to be deployed, constructed based on a three-dimensional convolution operator, is obtained.

[0054] In step S203, an equivalent two-dimensional convolution operator is constructed based on the parameters of the three-dimensional convolution operator in the neural network model.

[0055] Wherein, the number of input channels of the two-dimensional convolution operator is the product of the number of input channels of the three-dimensional convolution operator and the size of the convolution kernel in the depth direction, and the remaining parameters of the two-dimensional convolution operator are the parameters of the spatial dimension of the extracted three-dimensional convolution operator.

[0056] In this embodiment, a two-dimensional convolution operator equivalent to the three-dimensional convolution operator is constructed based on the parameters of the three-dimensional convolution operator. Specifically, assuming the parameters of the three-dimensional convolution operator are {number of input channels C_in, number of output channels C_out, depth direction kernel size k_d, spatial direction kernel size (k_h, k_w), spatial direction stride (stride_h, stride_w), spatial direction padding (padding_h, padding_w), spatial direction dilation (dilation_h, dilation_w)}, where h represents the height of the spatial dimension and w represents the width of the spatial dimension, the parameters of the constructed two-dimensional convolution operator are as follows: number of input channels C_2d_in = C_in k_d; Number of output channels C_2d_out = C_out; 2D convolution kernel size (k_h, k_w); 2D convolution stride (stride_h, stride_w); 2D convolution dilation rate (dilation_h, dilation_w); 2D convolution padding (padding_h, padding_w).

[0057] It should be noted that when the parameters of the 3D convolution operator include grouping parameters and bias terms, the constructed 2D convolution operator uses the same grouping parameters and bias terms. That is, if the original 3D convolution operator is a grouped convolution, then this grouping attribute will be passed to the constructed 2D convolution operator unchanged, thereby enabling this disclosure to cover all types of 3D convolution operators, such as grouped convolution and depthwise separable convolution, and improving the versatility of the embodiments of this disclosure.

[0058] By setting the parameters as described above, the constructed two-dimensional convolution operator is made to have completely consistent convolution operations in the spatial dimension with the original three-dimensional convolution operator. Furthermore, by expanding the number of input channels, the depth-dimensional convolution operation is implicitly encoded into the channel-dimensional calculation. In this embodiment, the constructed two-dimensional convolution operator will be further decomposed into multiple two-dimensional convolution sub-operators in step S205.

[0059] In step S205, based on the preset dimension splitting information, the two-dimensional convolution operator is split into the plurality of two-dimensional convolution sub-operators.

[0060] Specifically, the preset dimensions include channel dimensions and / or spatial dimensions, and the splitting information includes the number of splits for each preset dimension. Channel dimensions can include input channel dimensions and / or output channel dimensions, and spatial dimensions can include height dimensions and / or width dimensions. Therefore, the preset dimensions can be any one or more combinations of input channel dimensions, output channel dimensions, height dimensions, and width dimensions. The splitting information for the preset dimensions includes the number of splits for each preset dimension.

[0061] Among them, splitting the two-dimensional convolution operator in the channel dimension is a splitting at the operator parameter level. The channel dimension splitting divides the weight tensor of the constructed two-dimensional convolution operator along the channel direction to obtain multiple sub-operators with different weight parameters, i.e., multiple two-dimensional convolution sub-operators. Each sub-operator is responsible for processing the mapping relationship from part of the input channel to part of the output channel, and the weight parameters of different sub-operators are different.

[0062] In the spatial dimension, splitting the two-dimensional convolution operator is a splitting at the operator instance level. Spatial dimension splitting creates multiple sub-operator copies with the same parameters to obtain multiple two-dimensional convolution operators. Each sub-operator copy shares the same weight parameters, that is, the parameters of each two-dimensional convolution sub-operator are consistent with the constructed two-dimensional convolution operator, but different spatial regions of the input feature map are processed separately during the inference stage. Thus, for a large two-dimensional convolution data, it is divided into multiple smaller spatial sub-blocks along the height and / or width directions, and each sub-block is processed by an independent two-dimensional convolution sub-operator.

[0063] In specific implementation, when the preset dimension includes the input channel dimension, assuming the number of input channel dimension splits is N_cin, the number of input channels for each 2D convolutional operator after splitting is C_2d_in / N_cin, where C_2d_in is the number of input channels of the constructed 2D convolutional operator. When the preset dimension does not include the input channel dimension, the number of input channels for each 2D convolutional operator after splitting remains unchanged at C_2d_in. When the preset dimension includes the output channel dimension, assuming the number of output channel dimension splits is N_cout, the number of output channels for each 2D convolutional operator after splitting is C_2d_out / N_cout, where C_2d_out is the number of output channels of the constructed 2D convolutional operator. When the preset dimension does not include the output channel dimension, the number of output channels for each 2D convolutional operator after splitting remains unchanged at C_2d_out. It is understandable that the kernel size, stride, padding, and dilation of each two-dimensional convolution sub-operator obtained by splitting the two-dimensional convolution operator in the channel dimension should be consistent with the original two-dimensional convolution operator.

[0064] When the preset dimension includes a height dimension, the parameters of the height-direction convolution kernel size, stride, padding, and dilation of each 2D convolutional operator obtained after splitting are consistent with the constructed 2D convolutional operator. However, during the inference phase, each 2D convolutional operator only processes the input data of the corresponding height block. When the preset dimension does not include a height dimension, each 2D convolutional operator processes the input data of the entire height direction. When the preset dimension includes a width dimension, the parameters of the width-direction convolution kernel size, stride, padding, and dilation of each 2D convolutional operator obtained after splitting are consistent with the constructed 2D convolutional operator. However, during the inference phase, each 2D convolutional operator only processes the input data of the corresponding width block. When the preset dimension does not include a width dimension, each 2D convolutional operator processes the input data of the entire width direction.

[0065] In practical applications, the total number of two-dimensional convolution operators obtained after splitting can be expressed as N_total = N_cin N_cout N_h N_w, where N_cin represents the number of splits in the input channel dimension, and N_cout This indicates the number of splits in the output channel dimension. N_h represents the number of splits in the height dimension, and N_w represents the number of splits in the width dimension. When a certain dimension is not in the preset dimensions, its corresponding number of splits can be set to 1, that is, the dimension is not split.

[0066] In this embodiment of the disclosure, the preset dimension splitting information can be configured according to the computing power and storage resources of the hardware platform. Specifically, when the resources of a single computing unit of the hardware platform are limited, a larger number of splits can be selected to split the two-dimensional convolution operator into more and smaller two-dimensional convolution sub-operators to adapt to the processing power of a single computing unit. In addition, the selection of the number of splits is also affected by the size of the input feature map. For larger feature maps, the number of splits in the spatial dimension can be increased, and for a larger number of channels, the number of splits in the channel dimension can be increased.

[0067] In step S207, the plurality of two-dimensional convolution operators are loaded into the plurality of computing units of the target chip.

[0068] Specifically, the multiple two-dimensional convolution operators obtained from the decomposition are loaded into multiple computing units of the target chip, so that the target chip can call them in parallel during inference. For example, the target chip includes, but is not limited to, a graphics processing unit (GPU), a neural network processor (NPU), a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), or an embedded processor.

[0069] In the above embodiments, by constructing an equivalent two-dimensional convolution operator based on the parameters of the three-dimensional convolution operator during the model deployment stage, and then splitting it into multiple two-dimensional convolution sub-operators along a preset dimension and loading them into multiple computing units of the target chip, the three-dimensional convolution operation that the target chip cannot directly support is transformed into multiple two-dimensional convolution sub-operators that can be executed in parallel by the computing units. This allows the target chip to efficiently perform data processing and obtain computational results equivalent to the three-dimensional convolution operation without modifying the hardware architecture.

[0070] In this embodiment of the disclosure, the aforementioned step S105, which splits each intermediate image data into multiple sub-image data along the preset dimension based on the preset dimension splitting information, can vary depending on the preset dimension.

[0071] In some specific implementations, when the preset dimension includes a spatial dimension, the step of splitting each intermediate image data into multiple sub-image data along the preset dimension based on the splitting information of the preset dimension may include: for each intermediate image data, determining the size of each output feature block in the spatial dimension according to the number of splits in the spatial dimension; determining the start and end position information of the input sub-region corresponding to each output feature block in the intermediate image data according to the size of each output feature block in the spatial dimension and the preset convolution parameters of the two-dimensional convolution operator; and extracting the corresponding spatial sub-image data from the intermediate image data according to each start and end position information to obtain multiple sub-image data.

[0072] Specifically, the spatial dimension includes the height dimension and / or the width dimension. The preset convolution parameters of the two-dimensional convolution operator can include the stride of the spatial dimension and the effective convolution kernel size. The effective convolution kernel size of the spatial dimension can be calculated based on the convolution kernel size and dilatation rate of the two-dimensional convolution operator.

[0073] Since the splitting process for the height and width dimensions is similar, the following explanation will focus on the height dimension as the spatial dimension.

[0074] Assume that the output feature map obtained after the intermediate image data undergoes a 2D convolution operation by a 2D convolution operator has a height dimension of H_out and a width dimension of W_out; the number of segments in the height direction is N_h. Then, the height dimension of each output feature block is: block_h = H_out / N_h. Where, when H_out is not divisible by N_h, the height dimension of the first N_h-1 output feature blocks is the integer part of H_out / N_h, and the height dimension of the last output feature block is: H_out / N_h + H_out % N_h.

[0075] Therefore, for the height direction, the start and end position information (including start and end positions) of the input sub-region corresponding to the i-th (i = 0, 1, …, N_h-1) output feature block can be calculated in the following way: Starting position start_h_i=max(i block_h stride_h,0); End position: end_h_i = start_h_i + (block_h_i - 1) stride_h+effective_k_h.

[0076] Where stride_h represents the stride in the height direction, effective_k_h represents the effective kernel size in the height direction, and block_h_i represents the height size of the i-th output feature block.

[0077] For example, the effective kernel size, effective_k_h, can be calculated based on the kernel size in the height direction and the dilation rate, i.e., effective_k_h = (k_h - 1). dilation_h+1, where k_h represents the kernel size in the height direction and dilation_h represents the hole ratio in the height direction.

[0078] After obtaining the start and end position information of the input sub-region corresponding to each output feature block on the intermediate image data, the corresponding spatial sub-image data can be extracted from the intermediate image data according to each start and end position information, thereby obtaining multiple spatial sub-image data, which are the multiple sub-image data.

[0079] In practical applications, before splitting the intermediate image data, the intermediate image data can be filled with the fill amount in a preset dimension according to the two-dimensional convolution operator, and then the intermediate image data after boundary filling can be split.

[0080] In the above implementation, the size of the output feature block is determined according to the number of spatial dimension splits, and the start and end position information of the corresponding input sub-region on the intermediate image data is accurately calculated by combining the preset convolution parameters of the two-dimensional convolution operator. This allows for the extraction of multiple spatial sub-image data, ensuring that the receptive field of each spatial sub-image data obtained from the split is completely consistent with the corresponding region in the original convolution operation. This guarantees the mathematical accuracy of the spatial dimension split and avoids deviations in calculation results caused by splitting errors. Furthermore, the large-size two-dimensional feature map is accurately split into multiple small-size sub-blocks along the spatial dimension, allowing each sub-block to be independently processed by the corresponding two-dimensional convolution operator. This reduces the computational power requirement of a single operation unit and enables parallel computation of multiple operation units, thereby improving data processing efficiency.

[0081] In some specific implementations, when the preset dimension includes a channel dimension, the step of splitting each intermediate image data into multiple sub-image data along the preset dimension based on the splitting information of the preset dimension may include: dividing the total number of channels of the intermediate image data in the channel dimension into multiple channel subgroups according to the number of splits in the channel dimension; and extracting the corresponding channel sub-image data from the intermediate image data along the channel dimension based on the division of each channel subgroup to obtain multiple sub-image data.

[0082] Specifically, the channel dimension includes the input channel dimension.

[0083] Assuming the total number of channels in the intermediate image data is C_mid and the number of splits in the input channel dimension is N_cin, then the number of channels contained in each channel subgroup is C_mid / N_cin. Therefore, based on the division of each channel subgroup, the corresponding channel sub-image data can be extracted from the intermediate image data along the channel dimension to obtain multiple channel sub-image data, which are then used as multiple sub-image data.

[0084] In the above implementation, by splitting the intermediate image data into multiple channel subgroups along the channel dimension, the total number of channels in the channel dimension is divided into multiple channel subgroups. The corresponding channel sub-image data is extracted along the channel dimension, thereby uniformly splitting the feature data with a high number of channels into multiple low number of channels along the channel dimension. This allows each sub-block to be independently processed by the corresponding two-dimensional convolution operator, which reduces the computational power requirement of a single computing unit and enables parallel computing of multiple computing units, thus improving data processing efficiency. Furthermore, each channel sub-image data contains a portion of channel data in a complete spatial region. The sub-image data do not overlap with each other along the channel dimension and cover all channels, ensuring the accuracy of the final calculation results.

[0085] In some specific implementations, when the preset dimension includes both a channel dimension and a spatial dimension, the step of splitting each intermediate image data into multiple sub-image data along the preset dimension based on the splitting information of the preset dimension includes: splitting the intermediate image data into multiple sub-image data according to a preset splitting order based on the number of splits in the channel dimension and the number of splits in the spatial dimension; each sub-image data corresponds to a combination of a channel subgroup and an input sub-region, wherein the channel subgroup is determined by the splitting of the channel dimension, and the input sub-region is determined by the splitting of the spatial dimension; wherein the preset splitting order includes first splitting along the channel dimension, and then splitting each channel sub-image data obtained by splitting along the spatial dimension; or, first splitting along the spatial dimension, and then splitting each spatial sub-image data obtained by splitting along the channel dimension.

[0086] In specific implementation, assuming the number of partitions in the channel dimension is N_cin, and the number of partitions in the height dimension is N_h, and the number of partitions in the width dimension is N_w, then when the preset partitioning order is to first partition along the channel dimension, and then partition each channel sub-image data obtained from the partitioning along the spatial dimension, firstly, according to the number of partitions in the channel dimension N_cin, the intermediate image data is uniformly partitioned along the channel dimension into N_cin channel sub-image data, each channel sub-image data containing all channel data within a channel subgroup, while the spatial dimension remains unchanged; then, for each channel sub-image data, according to the number of partitions in the height dimension N_h and the number of partitions in the width dimension N_w, it is further partitioned along the height direction and the width direction into N_h... N_w spatial sub-image data, thus obtaining a total of N_cin N_h N_w sub-image data, each sub-image data includes all channel data within the corresponding channel subgroup, as well as data within the square spatial region defined by the corresponding height sub-region and width sub-region.

[0087] When the preset splitting order is to first split along the spatial dimension, and then split each resulting spatial sub-image data along the channel dimension, the intermediate image data is first split into N_h segments along the height and width directions according to the number of splits in the height dimension N_h and the number of splits in the width dimension N_w. There are N_w spatial sub-image data points, each corresponding to an input sub-region, with the channel dimension remaining unchanged. Then, for each spatial sub-image data point, based on the channel-dimension split data N_cin, it is further split along the channel dimension into N_cin channel sub-image data points, thus obtaining N_cin... N_h N_w sub-image data, each sub-image data includes all channel data within the corresponding channel subgroup, as well as data within the square spatial region defined by the corresponding height sub-region and width sub-region.

[0088] Understandably, the two splitting orders above result in the same set of sub-image data, and the data content contained in each sub-image data is also the same. In practical applications, a suitable splitting order can be selected based on the memory access mode of the target chip and the scheduling strategy of the computing unit to optimize data reading efficiency and computing performance.

[0089] The above implementation achieves multi-dimensional splitting of intermediate image data simultaneously in both channel and spatial dimensions. This allows the resulting sub-image data to be precisely matched with the two-dimensional convolutional operators of the multi-dimensional splitting, providing a data foundation for subsequent multi-dimensional parallel convolution calculations to improve data processing efficiency. Furthermore, it allows for flexible selection of the optimal splitting order based on the memory access characteristics and computation scheduling strategies of different hardware platforms, enhancing adaptability to various hardware platforms. For example, when the target chip's memory access mode tends towards continuous channel access, a channel-first, then spatial splitting order can be selected; when the target chip's memory access mode tends towards continuous spatial access, a spatial-first, then channel splitting order can be selected.

[0090] In step S107, based on the sub-convolution results corresponding to each of the sub-image data, the preset dimension and the depth dimension are combined to obtain the output feature data corresponding to the input image data.

[0091] Specifically, each intermediate image data is divided into multiple sub-image data. These sub-image data are convolved by multiple two-dimensional convolution operators to obtain the sub-convolution results corresponding to each sub-image data. In other words, each intermediate image data corresponds to a sub-convolution result set. For each sub-convolution result set, the sub-convolution results are combined according to the preset dimension to obtain the two-dimensional convolution result corresponding to the corresponding intermediate image data. Since there is a one-to-one correspondence between the depth slice data and the intermediate image data, the two-dimensional convolution result corresponding to the corresponding depth slice data can also be obtained. Then, the two-dimensional convolution results of all depth slice data are stacked along the depth dimension to obtain the output feature data that is completely equivalent to the original three-dimensional convolution operation result.

[0092] Understandably, the combination process in step S107 above is the reverse process of splitting. For example, when splitting, the channel is split first and then the space is split, so when combining, the space is assembled first and then the channel is assembled.

[0093] Taking a scenario where the preset dimensions include both channel and spatial dimensions, and spatial dimensions are split first and then channel dimensions, the sub-convolution results corresponding to different spatial sub-regions within the same channel subgroup can be concatenated according to their original positions in the spatial dimension. Then, the concatenated sub-convolution results corresponding to different channel subgroups can be concatenated according to their original order in the channel dimension. When the spatial dimensions include both height and width dimensions, for spatial concatenation, the sub-convolution results of different width sub-regions within the same height sub-region can be concatenated first in the width dimension. Then, the concatenated results of different height sub-regions can be concatenated in the height dimension.

[0094] Understandably, after combining all the depth slice data within the preset dimensions, we can obtain the first number of two-dimensional convolution results, namely d_out. Stacking these d_out two-dimensional convolution results along the depth dimension will yield output feature data that is completely equivalent to the original three-dimensional convolution operation results.

[0095] like Figure 3 The diagram illustrates a flow example of a data processing method provided in this disclosure. This flow example includes n processing units, among which are methods based on the aforementioned... Figure 2 The method embodiment shown loads n two-dimensional convolution sub-operators. Specifically, the input image data is three-dimensional convolutional data including the depth dimension (i.e., a five-dimensional tensor); based on the aforementioned steps S103 and S105 of this embodiment, the three-dimensional convolutional data can obtain multiple sub-image data corresponding to each intermediate image data; then, for each intermediate image data, the two-dimensional convolution sub-operators loaded in the n operation units are called to perform sub-convolution operations in parallel on the multiple sub-image data to obtain the sub-convolution results output by each operation unit; then, based on the aforementioned step S107 of this embodiment, the results can be combined to obtain the stitching result and restore the output shape of the original three-dimensional convolution operation result to obtain the corresponding output feature data.

[0096] This disclosure, for large input data such as 3D convolutional data, can achieve convolution operations equivalent to the original 3D convolution operation while adapting to the existing computing power of the hardware platform, thus improving the accuracy and efficiency of data processing. It enables hardware platforms that originally did not support 3D convolution operations to successfully support them without redesign; for hardware platforms that do not support large feature maps / large convolution kernels, they can successfully support them and obtain correct results without redesign. Furthermore, based on the operator decomposition optimization algorithm, customized hardware can be designed to decompose the convolution operator into multiple parallel sub-operators, utilizing multi-core processors for parallel computation, thereby accelerating the convolution operation.

[0097] In some exemplary implementations, such as Figure 4As shown, the method may further include: In step S401, when the input image data is data that does not include the depth dimension, the input image data is used as the intermediate image data, and the splitting information based on the preset dimension is executed to split the intermediate image data into multiple sub-image data along the preset dimension. The sub-convolution operation is then performed on the multiple sub-image data based on multiple two-dimensional convolution sub-operators to obtain the sub-convolution result corresponding to each sub-image data. In step S403, based on the sub-convolution results corresponding to each of the sub-image data, the preset dimension is combined to obtain the output feature data corresponding to the input image data.

[0098] Specifically, after obtaining the input image data to be processed, it is first determined whether the input image data includes a depth dimension. If it includes a depth dimension, the input image data is a five-dimensional tensor. In this case, steps S101 to S107 are executed. If it does not include a depth dimension, the input image data is a four-dimensional tensor. In this case, the input image data can be directly used as the aforementioned intermediate image data, and step S105 is executed to obtain multiple sub-convolution results.

[0099] After obtaining multiple sub-convolution results, they are combined according to a preset dimension to obtain the output image data corresponding to the input image data. The combination of preset dimensions can be found in the explanation of the preset dimension combination in step S107 above, and will not be repeated here.

[0100] The above-described embodiments enable the technical solutions of this disclosure to be compatible with data processing scenarios for both three-dimensional and two-dimensional convolutional data. There is no need to design and implement different processing schemes for different types of convolution. While ensuring the accuracy of convolution operation results, the complexity of data processing is reduced, and the reliability and stability of data processing are improved.

[0101] Figure 5 This is a structural block diagram of a data processing apparatus according to an exemplary embodiment. (Refer to...) Figure 5 The data processing device 500 includes: The input data splitting unit 510 is configured to acquire input image data to be processed, and, if the input image data includes data with a depth dimension, split the input image data into a first number of depth slices along the depth dimension of the input image data; the first number is consistent with the depth of the output feature data of the neural network model constructed based on the three-dimensional convolution operator; The depth channel fusion unit 520 is configured to perform, for each of the depth slice data, compress the depth dimension of the depth slice data to the channel dimension to obtain the corresponding intermediate image data; The intermediate data splitting convolution unit 530 is configured to perform splitting information based on a preset dimension, splitting each intermediate image data into multiple sub-image data along the preset dimension, and performing sub-convolution operations on the multiple sub-image data based on multiple two-dimensional convolution sub-operators to obtain the sub-convolution result corresponding to each sub-image data; the splitting information of the preset dimension corresponds to the splitting method of the two-dimensional convolution operator; the two-dimensional convolution operator is constructed based on the three-dimensional convolution operator and is split into the multiple two-dimensional convolution sub-operators; the preset dimension includes channel dimension and / or spatial dimension; The first sub-convolution result combination unit 540 is configured to perform a combination of the preset dimension and the depth dimension based on the sub-convolution results corresponding to each of the sub-image data to obtain the output feature data corresponding to the input image data.

[0102] In some exemplary embodiments, the device 500 further includes: The data determination unit is configured to perform the following steps when the input image data is data that does not include the depth dimension: taking the input image data as the intermediate image data, executing the splitting information based on the preset dimension to split the intermediate image data into multiple sub-image data along the preset dimension, and performing sub-convolution operations on the multiple sub-image data based on the multiple two-dimensional convolution sub-operators to obtain the sub-convolution result corresponding to each sub-image data. The second sub-convolution result combination unit is configured to perform a combination of the preset dimensions based on the sub-convolution results corresponding to each of the sub-image data to obtain the output feature data corresponding to the input image data.

[0103] In some exemplary embodiments, when the preset dimension includes a spatial dimension, the intermediate data splitting convolutional unit 530 includes a spatial sub-image data splitting unit. The spatial sub-image data splitting unit is configured to perform the following operations for each intermediate image data: determine the size of each output feature block in the spatial dimension based on the number of splits in the spatial dimension; determine the start and end position information of the input sub-region corresponding to each output feature block in the intermediate image data based on the size of each output feature block in the spatial dimension and the preset convolution parameters of the two-dimensional convolution operator; and extract the corresponding spatial sub-image data from the intermediate image data according to each start and end position information to obtain multiple sub-image data.

[0104] In some exemplary embodiments, when the preset dimension includes a channel dimension, the intermediate data splitting convolutional unit 530 includes a channel sub-image data splitting unit. The channel sub-image data splitting unit is configured to perform the following: divide the total number of channels in the intermediate image data in the channel dimension into multiple channel subgroups according to the number of splits in the channel dimension; and extract the corresponding channel sub-image data from the intermediate image data along the channel dimension based on the division of each channel subgroup to obtain multiple sub-image data.

[0105] In some exemplary embodiments, when the preset dimension includes a channel dimension and a spatial dimension, the intermediate data splitting convolutional unit 530 includes a sequential data splitting unit. The sequential data splitting unit is configured to split the intermediate image data into multiple sub-image data according to a preset splitting order based on the number of splits in the channel dimension and the number of splits in the spatial dimension. Each sub-image data corresponds to a combination of a channel subgroup and an input sub-region. The channel subgroup is determined by the splitting in the channel dimension, and the input sub-region is determined by the splitting in the spatial dimension. The preset splitting order includes first splitting along the channel dimension, and then splitting each channel sub-image data obtained from the splitting along the spatial dimension; or, first splitting along the spatial dimension, and then splitting each spatial sub-image data obtained from the splitting along the channel dimension.

[0106] In some exemplary embodiments, the input data splitting unit 510, when splitting the input image data into a first number of depth slices along the depth dimension, is specifically configured to perform: determining, based on the sliding window parameters of the three-dimensional convolution operator in the depth direction, a first number of sliding steps of the three-dimensional convolution operator in the depth dimension and a set of depth indices corresponding to each sliding position; each depth index in the set of depth indices indicates a depth position in the depth dimension; and extracting the corresponding depth slice data from the input image data based on the set of depth indices corresponding to each sliding position.

[0107] In some exemplary embodiments, the device 500 further includes: The model acquisition unit is configured to acquire the neural network model to be deployed; A two-dimensional convolution operator construction unit is configured to construct an equivalent two-dimensional convolution operator based on the parameters of the three-dimensional convolution operator in the neural network model, wherein the number of input channels of the two-dimensional convolution operator is the product of the number of input channels of the three-dimensional convolution operator and the size of the convolution kernel in the depth direction; The two-dimensional convolution operator splitting unit is configured to execute splitting information based on the preset dimension to split the two-dimensional convolution operator into the plurality of two-dimensional convolution sub-operators; The sub-operator loading unit is configured to load the plurality of two-dimensional convolution sub-operators into a plurality of computational units of the target chip.

[0108] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0109] Furthermore, the device provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0110] In one exemplary embodiment, an electronic device is also provided, including a processor; a memory for storing processor-executable instructions; wherein, when the processor is configured to execute the instructions stored in the memory, it implements the data processing method provided in any of the above embodiments.

[0111] The electronic device can be a terminal, a server, or a similar computing device. Figure 6 This is a hardware structure block diagram of an electronic device that runs a data processing method according to an embodiment of this disclosure, such as... Figure 6 As shown, the electronic device 60 includes at least one processor 61 and a memory, such as a read-only memory (ROM) 62 and a random access memory (RAM) 63, communicatively connected to the at least one processor 61. The memory stores computer programs executable by the at least one processor. The processor 61 can perform various appropriate actions and processes based on the computer program stored in the ROM 62 or loaded from storage unit 68 into the RAM 63. The RAM 63 can also store various programs and data required for the operation of the electronic device 60. The processor 61, ROM 62, and RAM 63 are interconnected via a bus 64. An input / output (I / O) interface 65 is also connected to the bus 64.

[0112] Multiple components in electronic device 60 are connected to I / O interface 65, including: input unit 66, such as keyboard, mouse, etc.; output unit 67, such as various types of monitors, speakers, etc.; storage unit 68, such as disk, optical disk, etc.; and communication unit 69, such as network card, modem, wireless transceiver, etc. Communication unit 69 allows electronic device 60 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0113] Processor 61 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 61 include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), field-programmable gate arrays (FPGAs), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 61 performs the various methods and processes described above, such as the data processing methods of embodiments of this disclosure.

[0114] Those skilled in the art will understand that Figure 6 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, electronic device 60 may also include components that are more... Figure 6 The more or fewer components shown, or having the same Figure 6 The different configurations shown.

[0115] In one exemplary embodiment, a computer-readable storage medium is also provided, which, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the data processing method provided in any of the above embodiments.

[0116] In one exemplary embodiment, a computer program product is also provided, including a computer program that, when executed by a processor, implements the data processing method provided in any of the above embodiments.

[0117] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0118] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A data processing method, characterized in that, include: The input image data to be processed is obtained. If the input image data includes data with a depth dimension, the input image data is split into a first number of depth slices along the depth dimension of the input image data. The first number is consistent with the depth of the output feature data of the neural network model constructed based on the three-dimensional convolution operator. For each of the depth slice data, the depth dimension of the depth slice data is compressed to the channel dimension to obtain the corresponding intermediate image data; Based on the splitting information of a preset dimension, each intermediate image data is split into multiple sub-image data along the preset dimension. Sub-convolution operations are then performed on each of the multiple sub-image data using multiple two-dimensional convolution sub-operators to obtain the sub-convolution result corresponding to each sub-image data. The splitting information of the preset dimension corresponds to the splitting method of the two-dimensional convolution operator. The two-dimensional convolution operator is constructed based on the three-dimensional convolution operator and is split into the multiple two-dimensional convolution sub-operators. The preset dimension includes a channel dimension and / or a spatial dimension. Based on the sub-convolution results corresponding to each of the sub-image data, the preset dimension and the depth dimension are combined to obtain the output feature data corresponding to the input image data.

2. The method according to claim 1, characterized in that, The method further includes: In the case where the input image data does not include the depth dimension, the input image data is used as the intermediate image data, and the splitting information based on the preset dimension is executed to split the intermediate image data into multiple sub-image data along the preset dimension. The steps are as follows: the sub-convolution operation is performed on the multiple sub-image data based on multiple two-dimensional convolution sub-operators to obtain the sub-convolution result corresponding to each sub-image data. Based on the sub-convolution results corresponding to each of the sub-image data, the preset dimensions are combined to obtain the output feature data corresponding to the input image data.

3. The method according to claim 1 or 2, characterized in that, When the preset dimension includes a spatial dimension, the splitting information based on the preset dimension, which splits each intermediate image data into multiple sub-image data along the preset dimension, includes: For each of the intermediate image data, the size of each output feature block in the spatial dimension is determined according to the number of splits in the spatial dimension; Based on the size of each output feature block in the spatial dimension and the preset convolution parameters of the two-dimensional convolution operator, determine the start and end position information of the input sub-region corresponding to each output feature block on the intermediate image data; Based on the start and end position information, corresponding spatial sub-image data are extracted from the intermediate image data to obtain multiple sub-image data.

4. The method according to claim 1 or 2, characterized in that, When the preset dimension includes a channel dimension, the splitting information based on the preset dimension, which splits each intermediate image data into multiple sub-image data along the preset dimension, includes: Based on the number of splits in the channel dimension, the intermediate image data is divided into multiple channel subgroups according to the total number of channels in the channel dimension; Along the channel dimension, based on the division of each channel subgroup, the corresponding channel sub-image data is extracted from the intermediate image data to obtain multiple sub-image data.

5. The method according to claim 3 or 4, characterized in that, When the preset dimension includes a channel dimension and a spatial dimension, the splitting information based on the preset dimension, which splits each intermediate image data into multiple sub-image data along the preset dimension, includes: Based on the number of splits in the channel dimension and the number of splits in the spatial dimension, the intermediate image data is split into multiple sub-image data according to a preset splitting order; each sub-image data corresponds to a combination of a channel subgroup and an input sub-region, wherein the channel subgroup is determined by the splitting in the channel dimension and the input sub-region is determined by the splitting in the spatial dimension. The preset splitting order includes first splitting along the channel dimension, and then splitting each channel sub-image data obtained from the splitting along the spatial dimension; or, first splitting along the spatial dimension, and then splitting each spatial sub-image data obtained from the splitting along the channel dimension.

6. The method according to claim 1, characterized in that, The step of splitting the input image data into a first number of depth slices along the depth dimension includes: Based on the sliding window parameters of the 3D convolution operator in the depth direction, a first number of sliding steps of the 3D convolution operator in the depth dimension and a set of depth indices corresponding to each sliding position are determined; each depth index in the set of depth indices indicates a depth position in the depth dimension. Based on the depth index set corresponding to each sliding position, the corresponding depth slice data is extracted from the input image data.

7. The method according to any one of claims 1 to 6, characterized in that, Before acquiring the input image data to be processed, the method further includes: Obtain the neural network model to be deployed; Based on the parameters of the three-dimensional convolution operator in the neural network model, an equivalent two-dimensional convolution operator is constructed, wherein the number of input channels of the two-dimensional convolution operator is the product of the number of input channels of the three-dimensional convolution operator and the size of the convolution kernel in the depth direction; Based on the preset dimension of the splitting information, the two-dimensional convolution operator is split into the plurality of two-dimensional convolution sub-operators; The multiple two-dimensional convolution operators are loaded into multiple computing units of the target chip.

8. A data processing apparatus, characterized in that, include: The input data splitting unit is configured to acquire input image data to be processed, and, if the input image data includes data with a depth dimension, split the input image data into a first number of depth slices along the depth dimension of the input image data; the first number is consistent with the depth of the output feature data of the neural network model constructed based on the three-dimensional convolution operator; The depth channel fusion unit is configured to perform, for each of the depth slice data, compress the depth dimension of the depth slice data to the channel dimension to obtain the corresponding intermediate image data; The intermediate data splitting convolution unit is configured to perform splitting information based on a preset dimension, splitting each intermediate image data into multiple sub-image data along the preset dimension, and performing sub-convolution operations on the multiple sub-image data based on multiple two-dimensional convolution sub-operators to obtain the sub-convolution result corresponding to each sub-image data; the splitting information of the preset dimension corresponds to the splitting method of the two-dimensional convolution operator, the two-dimensional convolution operator is constructed based on the three-dimensional convolution operator and split into the multiple two-dimensional convolution sub-operators; the preset dimension includes channel dimension and / or spatial dimension; The first sub-convolution result combination unit is configured to perform a combination of the preset dimension and the depth dimension based on the sub-convolution results corresponding to each of the sub-image data to obtain the output feature data corresponding to the input image data.

9. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the data processing method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the data processing method as described in any one of claims 1 to 7.

11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the data processing method as described in any one of claims 1 to 7.