Information processing method and device, storage medium and electronic device

By first performing matrix multiplication and then performing row splitting operations in the target processing device, the problem of low utilization of computing resources in the prior art is solved, and more efficient utilization of computing resources is achieved.

CN115729517BActive Publication Date: 2025-08-15TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111015908.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-31
Publication Date
2025-08-15
Estimated Expiration
2041-08-31

AI Technical Summary

Technical Problem

In the prior art, the information processing method performs too little operations per resource call, resulting in low utilization of computing resources.

Method used

In the target processing device, the matrix multiplication operation is performed on the pre-input matrix and the post-input matrix, and then the row split operation is performed on the target output matrix, thereby improving the utilization rate of the computing resources.

Benefits of technology

It realizes that matrix multiplication operation can be completed in just one operation resource call, making full use of operation resources, and improving the utilization rate of operation resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115729517B_ABST
    Figure CN115729517B_ABST
Patent Text Reader

Abstract

The present application discloses an information processing method and device, a storage medium and an electronic device, which are applied to the field of vehicle networking, such as target recognition in the vehicle networking. The method includes: when it is detected that a row splitting operation needs to be performed on the front input matrix, and a matrix multiplication operation needs to be performed on each splitting matrix in the first group of splitting matrices and the rear input matrix respectively, a matrix multiplication operation is performed on the front input matrix and the rear input matrix in the target processing device to obtain a target output matrix, the first group of splitting matrices includes the splitting matrix obtained by performing a row splitting operation on the front input matrix, the front input matrix is the first input in the matrix multiplication operation, and the rear input matrix is the second input in the matrix multiplication operation; a row splitting operation is performed on the target output matrix to obtain a second group of splitting matrices. The present application solves the problem of low utilization of computing resources in the information processing method due to too little computing performed on each resource call.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and more specifically, to an information processing method and device, a storage medium, and an electronic device. Background Art

[0002] Currently, when performing image recognition, the image can be input into a recognition model, which can be a neural network model. The recognition model extracts features from the image and generates a predicted recognition result. Within the recognition model, if tensor data flow analysis is involved, only element-by-element operations are supported. For tensor fusion calculations, a large tensor input can be split into multiple smaller tensor inputs. Element-by-element operations are then performed on each smaller tensor input to produce multiple smaller tensor outputs.

[0003] The above information processing process involves element-by-element operations on multiple small tensors. If matrix multiplication is involved, multiple matrix multiplication operations will be performed, requiring multiple calls to computing resources, such as a GPU (Graphics Processing Unit), through multiple instructions. Because the matrix multiplication operation for each small tensor requires relatively small computational effort, each resource call cannot fully utilize the resource, resulting in low resource utilization.

[0004] It can be seen that the information processing method in the related art has a technical problem of low utilization of computing resources due to too little computing volume performed in each resource call. Summary of the Invention

[0005] The embodiments of the present application provide an information processing method and device, a storage medium, and an electronic device to at least solve the technical problem of low utilization of computing resources due to too little computing performed in each resource call in the information processing method in the related art.

[0006] According to one aspect of an embodiment of the present application, an information processing method is provided, comprising: obtaining a front input matrix and a rear input matrix; upon detecting that a row splitting operation needs to be performed on the front input matrix, and a matrix multiplication operation needs to be performed on each splitting matrix in a first group of splitting matrices and the rear input matrix respectively, performing a matrix multiplication operation on the front input matrix and the rear input matrix in a target processing device to obtain a target output matrix, wherein the first group of splitting matrices includes a splitting matrix obtained by performing the row splitting operation on the front input matrix, the front input matrix is the first input in the matrix multiplication operation, and the rear input matrix is the second input in the matrix multiplication operation; performing the row splitting operation on the target output matrix to obtain a second group of splitting matrices.

[0007] According to another aspect of an embodiment of the present application, an information processing device is also provided, including: an acquisition unit, configured to acquire a front input matrix and a rear input matrix; a first execution unit, configured to, upon detecting that a row splitting operation needs to be performed on the front input matrix and a matrix multiplication operation needs to be performed on each splitting matrix in the first group of splitting matrices and the rear input matrix respectively, perform a matrix multiplication operation on the front input matrix and the rear input matrix in a target processing device to obtain a target output matrix, wherein the first group of splitting matrices includes the splitting matrices obtained by performing the row splitting operation on the front input matrix, the front input matrix is the first input in the matrix multiplication operation, and the rear input matrix is the second input in the matrix multiplication operation; and a second execution unit, configured to perform the row splitting operation on the target output matrix to obtain a second group of splitting matrices.

[0008] As an optional implementation scheme, the first execution unit includes: a first execution module, and the second execution unit includes: a second execution module, wherein the first execution module is used to perform the matrix multiplication operation on the matrix of dimension A×B and the matrix of dimension B×C when the front input matrix is a matrix of dimension A×B and the rear input matrix is a matrix of dimension B×C to obtain the target output matrix, wherein the target output matrix is a matrix of dimension A×C, A is a natural number greater than 1, and B and C are natural numbers; the second execution module is used to perform the row splitting operation on the matrix of dimension A×C to obtain a first splitting matrix and a second splitting matrix, wherein the second group of splitting matrices includes the first splitting matrix and the second splitting matrix, the first splitting matrix is a matrix of dimension a1×C, the second splitting matrix is a matrix of dimension a2×C, and A=a1+a2.

[0009] As an optional embodiment, the device also includes: a third execution unit, which is used to perform the row splitting operation on the front input matrix to obtain the first group of splitting matrices when it is detected that the first preset operation needs to be performed on at least one splitting matrix in the first group of splitting matrices; and a fourth execution unit, which is used to perform the first preset operation on at least one splitting matrix in the first group of splitting matrices.

[0010] As an optional implementation scheme, the third execution unit includes: a third execution module, which is used to perform the row splitting operation on the matrix with dimension A×B when the previous input matrix is a matrix with dimension A×B, to obtain a third splitting matrix and a fourth splitting matrix, wherein the first group of splitting matrices includes the third splitting matrix and the fourth splitting matrix, the third splitting matrix is a matrix with dimension a1×B, the fourth splitting matrix is a matrix with dimension a2×B, and A=a1+a2.

[0011] As an optional implementation scheme, the device also includes: a fifth execution unit, which is used to perform the matrix multiplication operation on the front input matrix and the rear input matrix in the target processing device to obtain the target output matrix when it is detected that a column splitting operation needs to be performed on the rear input matrix and the matrix multiplication operation needs to be performed on the front input matrix and each split matrix in the third group of split matrices respectively, wherein the third group of split matrices includes the split matrix obtained by performing the column splitting operation on the rear input matrix; and a sixth execution unit, which is used to perform the column splitting operation on the target output matrix to obtain a fourth group of split matrices.

[0012] As an optional implementation scheme, the fifth execution unit includes: a fourth execution module, and the sixth execution unit includes: a fifth execution module, wherein the fourth execution module is used to perform the matrix multiplication operation on the matrix of dimension A×B and the matrix of dimension B×C when the front input matrix is a matrix of dimension A×B and the rear input matrix is a matrix of dimension B×C, to obtain the target output matrix, wherein the target output matrix is a matrix of dimension A×C, C is a natural number greater than 1, and A and B are natural numbers; the fifth execution module is used to perform the row splitting operation on the matrix of dimension A×C to obtain a fifth splitting matrix and a sixth splitting matrix, wherein the fourth group of splitting matrices includes the fifth splitting matrix and the sixth splitting matrix, the fifth splitting matrix is a matrix of dimension A×c1, the sixth splitting matrix is a matrix of dimension A×c2, and C=c1+c2.

[0013] As an optional implementation, the device further includes: a seventh execution unit, for performing the column splitting operation on the post-input matrix to obtain the third group of splitting matrices when it is detected that the second preset operation needs to be performed on at least one splitting matrix in the third group of splitting matrices; and an eighth execution unit, for performing the second preset operation on at least one splitting matrix in the third group of splitting matrices.

[0014] As an optional implementation scheme, the seventh execution unit includes: a sixth execution module, which is used to perform the column splitting operation on the matrix with a dimension of B×C when the post-input matrix is a matrix with a dimension of B×C, to obtain a seventh splitting matrix and an eighth splitting matrix, wherein the third group of splitting matrices includes the seventh splitting matrix and the eighth splitting matrix, the seventh splitting matrix is a matrix with a dimension of B×c1, and the eighth splitting matrix is a matrix with a dimension of B×c2, C=c1+c2.

[0015] As an optional implementation scheme, the first execution unit includes: a seventh execution module, used to perform the matrix multiplication operation on the front input matrix and the rear input matrix in the image processor GPU to obtain a target output matrix, wherein the target processing device includes the GPU.

[0016] As an optional implementation scheme, the acquisition unit includes: an acquisition module, used to obtain the front input matrix in the first multidimensional matrix to be processed in the target prediction model, and to obtain the rear input matrix in the second multidimensional matrix to be processed in the target prediction model, wherein the target prediction model is used to determine the predicted target object based on the first multidimensional matrix and the second multidimensional matrix.

[0017] As an optional implementation scheme, the acquisition module includes: an acquisition submodule, and the first execution unit includes: an eighth execution module, wherein the acquisition submodule is used to obtain D pre-input matrices with dimensions of A×B in the first multidimensional matrix and D post-input matrices with dimensions of B×C in the second multidimensional matrix when the first multidimensional matrix is a matrix with dimensions of D×A×B and the second multidimensional matrix is a matrix with dimensions of D×B×C, wherein D is a natural number greater than 1; the eighth execution module is used to perform the matrix multiplication operation on the D pre-input matrices and the D post-input matrices in sequence in the target processing device to obtain D target output matrices with dimensions of A×C, wherein each target output matrix is a matrix obtained by performing the matrix multiplication operation on one pre-input matrix and one post-input matrix.

[0018] As an optional embodiment, the device also includes: a first adjustment unit, which is used to adjust the model structure in the first prediction model to obtain a second prediction model when it is detected that the model structure in the first prediction model is used to perform the row splitting operation on the front input matrix, and perform the matrix multiplication operation on each splitting matrix in the first group of splitting matrices and the rear input matrix respectively to obtain the second group of splitting matrices, wherein the model structure in the second prediction model is used to perform the matrix multiplication operation on the front input matrix and the rear input matrix to obtain the target output matrix, and perform the row splitting operation on the target output matrix to obtain the second group of splitting matrices; wherein the target processing device is used to perform the matrix multiplication operation on the front input matrix and the rear input matrix in the second prediction model to obtain the target output matrix.

[0019] As an optional implementation scheme, the device also includes: a second adjustment unit, which is used to adjust the model structure in the third prediction model to obtain a fourth prediction model when it is detected that the model structure in the third prediction model is used to perform the column splitting operation on the post-input matrix, and perform the matrix multiplication operation on the pre-input matrix and each splitting matrix in the third group of splitting matrices to obtain the fourth group of splitting matrices, wherein the model structure in the fourth prediction model is used to perform the matrix multiplication operation on the pre-input matrix and the post-input matrix to obtain the target output matrix, and perform the column splitting operation on the target output matrix to obtain the fourth group of splitting matrices; wherein the target processing device is used to perform the matrix multiplication operation on the pre-input matrix and the post-input matrix in the fourth prediction model to obtain the target output matrix.

[0020] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the above-mentioned information processing method when it is run.

[0021] According to another aspect of the embodiments of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the information processing method through the computer program.

[0022] According to another aspect of the embodiments of the present application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the above-described information processing method.

[0023] In an embodiment of the present application, a matrix multiplication operation is first performed on the tensor, followed by a splitting operation. If it is detected that a row splitting operation needs to be performed on the front input matrix (i.e., the first input in the matrix multiplication operation), and a matrix multiplication operation needs to be performed on each split matrix obtained by the splitting with the rear input matrix (i.e., the second input in the matrix multiplication operation), a matrix multiplication operation can be first performed on the front input matrix and the rear input matrix in the target processing device (e.g., a GPU) to obtain a target output matrix, and then a row splitting operation is performed on the target output matrix to obtain a second set of split matrices. Since only the matrix multiplication of the front input matrix and the rear input matrix needs to be performed, the matrix multiplication operation can be completed with only one computing resource call. In addition, the matrix multiplication operation of a large tensor (i.e., the matrix before splitting) has a larger computational complexity than the matrix multiplication operation of a small tensor (the matrix after splitting). Therefore, the computing resources can be fully utilized, achieving the technical effect of improving the utilization of computing resources, thereby solving the technical problem of low computing resource utilization caused by too little computation performed in each resource call in the information processing method in the related art. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0025] Figure 1 is a schematic diagram of an application environment of an optional information processing method according to an embodiment of the present application;

[0026] Figure 2 is a schematic diagram of a process of an optional information processing method according to an embodiment of the present application;

[0027] Figure 3 is a schematic diagram of an optional information processing method according to an embodiment of the present application;

[0028] Figure 4 is a schematic diagram of another optional information processing method according to an embodiment of the present application;

[0029] Figure 5 is a schematic diagram of another optional information processing method according to an embodiment of the present application;

[0030] Figure 6 is a schematic diagram of another optional information processing method according to an embodiment of the present application;

[0031] Figure 7 is a schematic diagram of another optional information processing method according to an embodiment of the present application;

[0032] Figure 8 is a schematic diagram of another optional information processing method according to an embodiment of the present application;

[0033] Figure 9 is a schematic diagram of another optional information processing method according to an embodiment of the present application;

[0034] Figure 10 is a schematic diagram of another optional information processing method according to an embodiment of the present application;

[0035] Figure 11 is a schematic diagram of another optional information processing method according to an embodiment of the present application;

[0036] Figure 12 is a schematic diagram of another optional information processing method according to an embodiment of the present application;

[0037] Figure 13 is a schematic diagram of an optional information processing device according to an embodiment of the present application;

[0038] Figure 14 It is a schematic structural diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0039] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0040] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0041] According to one aspect of the embodiments of the present application, an information processing method is provided. Optionally, as an optional implementation, the information processing method can be applied to, but is not limited to, Figure 1 In the environment shown, the environment may include, but is not limited to: a user device 102 , which may include, but is not limited to, a memory 104 , a processor 106 , and a display 108 , a network 110 , and a server 112 .

[0042] Exemplarily, the above information processing method may include the following steps:

[0043] Step S102: The user device 102 obtains an image to be identified. The image to be identified may be an image to be identified as containing an identification target of a predetermined type.

[0044] Steps S104 to S106 , the user device 102 sends the image to be recognized to the server 112 via the network 110 ;

[0045] In step S108 , the server 112 inputs the image to be identified into a neural network model for target recognition through the database 114 and the processing engine 116 to obtain a recognition result of the target recognition.

[0046] The image to be identified may be an image obtained from the Internet of Vehicles, for example, an image obtained from a map of the Internet of Vehicles, and what needs to be identified is a specific target in the map (for example, a landmark building, an arbitrary target, a vehicle target, etc.). During the process of the neural network model processing the input image to be identified, if it is detected that a row splitting operation needs to be performed on the front input matrix, and a matrix multiplication operation needs to be performed on each split matrix obtained by the split with the rear input matrix, the target processing device may first perform a matrix multiplication operation on the front input matrix and the rear input matrix to obtain a target output matrix, and then perform a row splitting operation on the target output matrix to obtain a second set of split matrices.

[0047] It should be noted that matrix multiplication operations are involved in the process of processing the image to be recognized. For example, when performing convolution between feature maps using a convolution kernel, or when performing fusion between feature maps, matrix multiplication operations are involved. For example, the convolution layer in the neural network model can perform matrix multiplication operations on the feature maps extracted from the image to be recognized to obtain the multiplication result.

[0048] Here, the pre-input matrix and the post-input matrix are the two inputs to the matrix multiplication operation. The pre-input matrix is the first input of the two inputs, and the post-input matrix is the second input of the two inputs. The number of rows in the pre-input matrix is the same as the number of columns in the post-input matrix. For example, in the matrix multiplication operation A×B, A is the pre-input matrix and B is the post-input matrix.

[0049] In steps S110 - S114 , the server 112 sends the target recognition result to the user device 102 via the network 110 , and the processor 106 in the user device 102 identifies the target in the image to be recognized based on the target recognition result.

[0050] Apart from Figure 1 In addition to the examples shown, the above steps can be independently completed by the user device 102, that is, the user device 102 performs steps such as matrix multiplication and splitting operations, thereby reducing the processing pressure on the server. The user device 102 includes but is not limited to handheld devices (such as mobile phones), laptops, desktop computers, intelligent voice interaction devices, smart home appliances, and in-vehicle devices. This application does not limit the implementation of the user device 102.

[0051] Optionally, as an optional implementation, Figure 2 is a flow chart of an optional information processing method according to an embodiment of the present application, such as Figure 2 As shown, the process of the information processing method may include the following steps:

[0052] Step S202: Obtain a front input matrix and a rear input matrix.

[0053] The information processing method in this embodiment can be applied in the field of Internet of Vehicles, for example, in the field of maps in the Internet of Vehicles, and can be applied to scenarios of tensor data flow (tensorflow) analysis, for example, scenarios of image recognition using neural network models, and the engine applied can be a tensor graph optimization engine, which can be a graph optimization engine in deep learning (for example, the Grappler computational graph optimization engine in Tensorflow), and can be integrated into an AI (Artificial Intelligence) platform or AI framework. The core of a tensor is a data container, which can be a multidimensional array. Scalars, vectors, matrices, etc. are tensors of different orders. This embodiment is explained using matrices as an example.

[0054] The server can obtain the pre-input matrix and the post-input matrix, and detect the processing logic of the input matrix. The detection performed may include: detecting whether row splitting of matrix multiplication is involved, for example, the split (Split) operation can be found, and its output is checked whether it is the first input (pre-input) of the matrix multiplication, and whether it is split along the "row" dimension. It can also be checked whether the second input (post-input) of all matrix multiplications is the same tensor input. If so, the tensor before the split (i.e., the pre-input matrix) can be used as the first input (pre-input) of the matrix multiplication and the above second input (i.e., the post-input matrix) for matrix multiplication; then the result of the above new matrix multiplication is split according to the order of the original split operation.

[0055] Here, the split operation is a common tensor operation, which means dividing a tensor into multiple tensors; the matrix multiplication operation (Matmul) is a common tensor operation, which multiplies each element of the i-th row of the first tensor (prefix) and each element of the k-th column of the second tensor (postfix) one by one and accumulates them, and records them as the result of the i-th row and j-th column of the output tensor.

[0056] For example, it is possible to detect whether a row splitting operation needs to be performed on the preceding input matrix. The split matrix obtained after the row splitting operation is the first group of split matrices (at this time, the actual row splitting operation is not performed), and it is necessary to perform matrix multiplication operations on each split matrix in the first group of split matrices and the subsequent input matrix respectively.

[0057] Step S204: When it is detected that a row splitting operation needs to be performed on the front input matrix and a matrix multiplication operation needs to be performed on each splitting matrix in the first group of splitting matrices and the rear input matrix respectively, a matrix multiplication operation is performed on the front input matrix and the rear input matrix in the target processing device to obtain a target output matrix.

[0058] If it is detected that a row splitting operation needs to be performed on the preceding input matrix, and a matrix multiplication operation needs to be performed on each splitting matrix in the first group of splitting matrices with the following input matrix, the server may first control the execution of the matrix multiplication operation on the preceding input matrix and the following input matrix. The above matrix multiplication operation may be performed within the target processing device. The target processing device may be a processing unit (e.g., a GPU) for performing matrix multiplication operations, which may be located inside or outside the server, and this embodiment is not limited to this.

[0059] Step S206: Perform a row splitting operation on the target output matrix to obtain a second set of splitting matrices.

[0060] For the obtained target output matrix, based on the row splitting rule of the previous input matrix, the server can perform a row splitting operation on the target output matrix, thereby obtaining a second set of split matrices. The above-mentioned row splitting rule can be used to indicate which rows are split into the same splitting matrix. In combination with the operation rules of matrix operations, the result obtained by first performing the row splitting operation and then performing the matrix multiplication operation is consistent with the result obtained by first performing the matrix multiplication operation and then performing the row splitting operation. The number of matrices included in the second set of splitting matrices is the same as the number of matrices included in the first set of splitting matrices, and can be at least two.

[0061] For example, Figure 3 As shown in the figure, during the tensor data flow analysis, a split operation can be performed to output a tensor, and then matrix multiplication can be performed with the same tensor: a split operation can be performed on a large tensor input to obtain small tensor inputs 1 to small tensor inputs N; then, an element-by-element operation (i.e., element-by-element operation 1 to element-by-element operation N) is performed on the small tensor input and the same tensor to obtain small tensor outputs 1 to small tensor outputs N. Here, element-by-element operation 1 to element-by-element operation N are similar operations, such as square root operations. The above method makes multiple calls to computing resources and has low utilization of computing resources.

[0062] In order to overcome the above problems, Figure 4 As shown in the figure, the matrix multiplication operations of multiple small tensors can be aggregated into a large tensor matrix multiplication operation, and then efficiently aggregated on computing resources: first, perform element-by-element operations on the large tensor input to obtain a large tensor output, and then perform a split operation on the large tensor output to obtain small tensor output 1 to small tensor output N. The above method can only call computing resources once, improving computing resource utilization.

[0063] Through the embodiments provided by the present application, a front input matrix and a rear input matrix are obtained; when it is detected that a row splitting operation needs to be performed on the front input matrix, and a matrix multiplication operation needs to be performed on each splitting matrix in the first group of splitting matrices and the rear input matrix respectively, a matrix multiplication operation is performed on the front input matrix and the rear input matrix in a target processing device to obtain a target output matrix, wherein the first group of splitting matrices includes the splitting matrices obtained by performing a row splitting operation on the front input matrix, the front input matrix is the first input in the matrix multiplication operation, and the rear input matrix is the second input in the matrix multiplication operation; a row splitting operation is performed on the target output matrix to obtain a second group of splitting matrices, thereby solving the technical problem of low utilization of computing resources due to too little computing performed on each resource call in the information processing method in the related art, thereby improving the utilization of computing resources.

[0064] For example, the pre-input matrix is a 64×64 matrix, and the post-input matrix is a 64×32 matrix. If it is detected that a row split operation is required on the pre-input matrix, it is split into two 32×64 matrices, and then matrix multiplication is performed on each of the matrices with the post-input matrix to obtain two 32×32 matrices. A call instruction can be used to invoke GPU resources to perform a matrix multiplication operation on the pre-input matrix and the post-input matrix on the GPU to obtain a 64×32 matrix. After obtaining the 64×32 matrix, a row split operation can be performed on the 64×32 matrix based on the row splitting rule of the pre-input matrix to obtain two 32×32 matrices.

[0065] As an optional implementation scheme, performing a matrix multiplication operation on a front input matrix and a rear input matrix to obtain a target output matrix includes: when the front input matrix is a matrix with a dimension of A×B and the rear input matrix is a matrix with a dimension of B×C, performing a matrix multiplication operation on the matrix with a dimension of A×B and the matrix with a dimension of B×C to obtain a target output matrix, wherein the target output matrix is a matrix with a dimension of A×C, A is a natural number greater than 1, and B and C are natural numbers.

[0066] If both the pre-input matrix and the post-input matrix are two-dimensional matrices, wherein the pre-input matrix is a matrix of dimensions A×B (i.e., a matrix with A rows and B columns) and the post-input matrix is a matrix of dimensions B×C (i.e., a matrix with B rows and C columns), a matrix multiplication operation can be performed on the matrix of dimensions A×B and the matrix of dimensions B×C in the target processing device. When performing the matrix multiplication, the multiplication operation can be performed row by row, i.e., each row of the matrix of dimensions A×B is multiplied with each column of the matrix of dimensions B×C. The matrix obtained after performing the matrix multiplication operation is the target output matrix.

[0067] Correspondingly, performing a row splitting operation on the target output matrix to obtain a second set of split matrices can include: performing a row splitting operation on a matrix of dimension A×C to obtain a first splitting matrix and a second splitting matrix, wherein the second set of splitting matrices includes the first splitting matrix and the second splitting matrix, the first splitting matrix is a matrix of dimension a1×C, the second splitting matrix is a matrix of dimension a2×C, and A=a1+a2.

[0068] The splitting matrix obtained by performing the row splitting operation on the target output matrix is the second splitting matrix, which contains at least two splitting matrices. If there are two splitting matrices, the server can perform the row splitting operation on a matrix of dimension A×C to obtain a first splitting matrix and a second splitting matrix. Here, the first splitting matrix is a matrix of dimension a1×C, and the second splitting matrix is a matrix of dimension a2×C, where A = a1+a2.

[0069] Optionally, when performing a row splitting operation, a1 rows corresponding to the first splitting matrix and a2 rows corresponding to the second splitting matrix in the target output matrix may be first determined. The a1 rows corresponding to the first splitting matrix may be a plurality of continuous rows or a plurality of discontinuous rows, and the a2 rows corresponding to the second splitting matrix may be a plurality of continuous rows or a plurality of discontinuous rows. This is not limited in this embodiment.

[0070] For example, the rows corresponding to the first splitting matrix may be the first a1 rows in the target input matrix, and the rows corresponding to the second splitting matrix may be the last a2 rows in the target input matrix. For another example, the rows corresponding to the first splitting matrix may be the last a1 rows in the target input matrix, and the rows corresponding to the second splitting matrix may be the first a2 rows in the target input matrix. For another example, the rows corresponding to the first splitting matrix may be the a1 rows in the target input matrix that are not all consecutive, and the rows corresponding to the second splitting matrix may be the rows of the target input matrix excluding the a1 rows corresponding to the first splitting matrix.

[0071] For example, Figure 5As shown, the pre-input is [A, B] (i.e., a matrix with row A and column B), and the post-input is [B, C]. First, the pre-input is split to obtain pre-input 1 [a1, B] (i.e., a matrix with row a1 and column B) and pre-input 2 [a2, B] (i.e., a matrix with row a2 and column B). Then, matrix multiplication is performed on pre-input 1 and pre-input 2 processed according to parameter 1 (the first parameter) and post-input [B, C] processed according to parameter 2 (the second parameter), respectively, to obtain output results 1 [a1, C] and 2 [a2, C]. In the above information processing method, two matrix multiplications of small matrices are performed, resulting in two hardware overheads, requiring the issuance of two call instructions. In addition, since two matrix multiplications of small matrices are performed, the utilization of computing resources for each call is low.

[0072] In order to optimize the processing flow, such as Figure 6 As shown, matrix multiplication can be performed on the pre-input [A, B] processed according to parameter 1 and the post-input [B, C] processed according to parameter 2, resulting in the output [A, C] (i.e., a matrix with row A and column C). Row splitting is then performed on this output to obtain output 1 [a1, C] and output 2 [a2, C]. After optimization, a single large-matrix matrix multiplication is performed, resulting in a single hardware overhead (only one instruction is required). Furthermore, performing a single large-matrix matrix multiplication improves the utilization of computing resources for each call.

[0073] Through this optional embodiment, by first performing a matrix multiplication operation on a two-dimensional input matrix and then performing a matrix row splitting operation, the applicability of tensor fusion calculations can be improved and the utilization rate of the called computing resources can be improved.

[0074] As an optional implementation scheme, the above method further includes:

[0075] S1, when it is detected that a first preset operation needs to be performed on at least one splitting matrix in the first group of splitting matrices, performing a row splitting operation on the preceding input matrix to obtain a first group of splitting matrices;

[0076] S2: Perform a first preset operation on at least one splitting matrix in the first group of splitting matrices.

[0077] In addition to performing matrix multiplication operations, the split results of the preceding input matrix can be the input of other operations. For example, Figure 7 As shown, in addition to performing matrix multiplication operations on the front input 1 [a1, B] and the front input 2 [a2, B], it is also necessary to perform other operations 1 on the front input 1 [a1, B] and other operations 2 on the front input 2 [a2, B].

[0078] If it is detected that the first preset operation needs to be performed on at least one splitting matrix in the first group of splitting matrices (the first preset operations performed on different splitting matrices can be the same or different), that is, the splitting result of the previous input matrix is the input of other operations, then the tensor obtained by the original splitting can be retained, and the row splitting operation is performed on the previous input matrix to obtain the first group of splitting matrices.

[0079] After obtaining the first set of splitting matrices, the server may perform a first preset operation on at least one splitting matrix in the first set of splitting matrices. If the at least one splitting matrix includes multiple splitting matrices, the server may perform a corresponding first preset operation on each splitting matrix in the at least one splitting matrix.

[0080] Optionally, in this embodiment, if the at least one splitting matrix is part of the first group of splitting matrices, a row splitting operation may be performed on the preceding input matrix to obtain at least one splitting matrix; and the first preset operation may be performed on the at least one splitting matrix.

[0081] For example, Figure 8 As shown, in addition to performing matrix multiplication, a split operation can be performed on the pre-input [A, B] to obtain pre-input 1 [a1, B] and pre-input 2 [a2, B], and then other operation 1 is performed on pre-input 1 [a1, B], and other operation 2 is performed on pre-input 2 [a2, B].

[0082] Through this optional embodiment, by performing a row splitting operation on the front input matrix and performing other operations on the split matrix obtained by the splitting, it can adapt to scenarios with other operation requirements and improve the compatibility of tensor fusion calculations.

[0083] As an optional implementation, a row splitting operation is performed on the front input matrix to obtain a first group of splitting matrices including:

[0084] When the preceding input matrix is a matrix with a dimension of A×B, a row splitting operation is performed on the matrix with a dimension of A×B to obtain a third splitting matrix and a fourth splitting matrix, wherein the first group of splitting matrices includes the third splitting matrix and the fourth splitting matrix.

[0085] If the pre-input matrix is a two-dimensional matrix of dimensions A×B, the splitting matrix obtained by performing a row splitting operation on the pre-input matrix is the first group of splitting matrices, which contains at least two splitting matrices. If there are two splitting matrices, the server can perform a row splitting operation on the matrix of dimensions A×B to obtain third and fourth splitting matrices. Here, the third splitting matrix is a matrix of dimensions a1×B, and the fourth splitting matrix is a matrix of dimensions a2×B, where A = a1+a2. The first group of splitting matrices includes the third classification matrix and the fourth splitting matrix.

[0086] Optionally, when performing the row splitting operation, a1 rows corresponding to the third splitting matrix and a2 rows corresponding to the fourth splitting matrix in the preceding input matrix may be first determined. The a1 rows corresponding to the third splitting matrix may be a plurality of continuous rows or a plurality of discontinuous rows, and the a2 rows corresponding to the fourth splitting matrix may be a plurality of continuous rows or a plurality of discontinuous rows. This is not limited in this embodiment.

[0087] Through this optional embodiment, by performing a row splitting operation on a two-dimensional input matrix to obtain two corresponding split matrices, the applicability of tensor fusion calculations can be improved.

[0088] As an optional implementation scheme, the above method further includes:

[0089] S1, when it is detected that a column splitting operation needs to be performed on the post-input matrix and a matrix multiplication operation needs to be performed on the pre-input matrix and each splitting matrix in the third group of splitting matrices, performing a matrix multiplication operation on the pre-input matrix and the post-input matrix in a target processing device to obtain a target output matrix, wherein the third group of splitting matrices includes the splitting matrices obtained by performing the column splitting operation on the post-input matrix;

[0090] S2, performs a column splitting operation on the target output matrix to obtain the fourth set of split matrices.

[0091] After obtaining the pre-input matrix and the post-input matrix, the server can test the processing logic of the input matrix. The detection performed may include: detecting whether column splitting of matrix multiplication is involved. For example, the split operation can be found to check whether its output is the second input (post-input) of the matrix multiplication, and whether it is split along the "column" dimension. It can also be checked whether the first input (pre-input) of all matrix multiplications is the same tensor input. If so, the tensor before the split (i.e., the post-input matrix) can be used as the second input of the matrix multiplication and the above first input (i.e., the pre-input matrix) for matrix multiplication; then the result of the above new matrix multiplication is split in the order of the original split operation.

[0092] For example, it is possible to detect whether a column splitting operation needs to be performed on the subsequent input matrix. The split matrix obtained after the column splitting operation is the third group of split matrices (at this time, the actual column splitting operation is not performed), and matrix multiplication operations need to be performed on the previous input matrix and each split matrix in the third group of split matrices respectively.

[0093] If it is detected that the above operation needs to be performed, the server may first control the execution of a matrix multiplication operation of the leading input matrix and the trailing input matrix. The above matrix multiplication operation may be performed within the target processing device. The target processing device may be a processing component (e.g., a GPU) for performing the matrix multiplication operation, which may be located inside or outside the server, and this embodiment is not limited to this.

[0094] For the target output matrix obtained, based on the column splitting rule of the post-input matrix, the server can perform a column splitting operation on the target output matrix, thereby obtaining a fourth set of split matrices. The above-mentioned column splitting rule can be used to indicate which columns are split into the same splitting matrix. Combined with the operation rules of matrix operations, the result obtained by first performing the column splitting operation and then performing the matrix multiplication operation is consistent with the result obtained by first performing the matrix multiplication operation and then performing the column splitting operation. The number of matrices included in the fourth set of split matrices is the same as the number of matrices included in the third set of split matrices, and can be at least two.

[0095] For example, if the pre-input matrix is a 32×64 matrix and the post-input matrix is a 64×64 matrix, and if it is detected that a column splitting operation needs to be performed on the post-input matrix first, splitting it into two 64×32 matrices, then performing matrix multiplication operations on each of the two matrices with the pre-input matrix to obtain two 32×32 matrices, the server can invoke instructions to invoke GPU resources and perform matrix multiplication on the pre-input matrix and post-input matrix on the GPU to obtain a 32×64 matrix. After obtaining the 32×64 matrix, the server can perform a column splitting operation on the 32×64 matrix based on the column splitting rule of the post-input matrix to obtain two 32×32 matrices.

[0096] Through this optional embodiment, by first performing a matrix multiplication operation on an input matrix and then performing a column splitting operation on the matrix, the utilization rate of computing resources can be improved.

[0097] As an optional implementation scheme, performing a matrix multiplication operation on a front input matrix and a rear input matrix to obtain a target output matrix includes: when the front input matrix is a matrix with a dimension of A×B and the rear input matrix is a matrix with a dimension of B×C, performing a matrix multiplication operation on the matrix with a dimension of A×B and the matrix with a dimension of B×C to obtain a target output matrix, wherein the target output matrix is a matrix with a dimension of A×C, C is a natural number greater than 1, and A and B are natural numbers.

[0098] If both the pre-input matrix and the post-input matrix are two-dimensional matrices, wherein the pre-input matrix is a matrix of dimensions A×B and the post-input matrix is a matrix of dimensions B×C, a matrix multiplication operation can be performed on the matrix of dimensions A×B and the matrix of dimensions B×C within the target processing device. When performing the matrix multiplication operation, the multiplication operation can be performed row by row, that is, each row of the matrix of dimensions A×B is multiplied with each column of the matrix of dimensions B×C. The matrix obtained after performing the matrix multiplication operation is the target output matrix.

[0099] Correspondingly, performing a column splitting operation on the target output matrix to obtain a fourth group of split matrices may include: performing a row splitting operation on a matrix of dimension A×C to obtain a fifth splitting matrix and a sixth splitting matrix, wherein the fourth group of splitting matrices includes the fifth splitting matrix and the sixth splitting matrix, the fifth splitting matrix is a matrix of dimension A×c1, the sixth splitting matrix is a matrix of dimension A×c2, and C=c1+c2.

[0100] The splitting matrix obtained by performing the column splitting operation on the target output matrix is the fourth splitting matrix, which contains at least two splitting matrices. If there are two splitting matrices, the server can perform the column splitting operation on matrices of dimension A×C to obtain fifth and sixth splitting matrices. Here, the fifth splitting matrix is a matrix of dimension A×c1, and the sixth splitting matrix is a matrix of dimension A×c2, where C = c1 + c2.

[0101] Optionally, when performing the column splitting operation, c1 columns corresponding to the fifth splitting matrix and c2 columns corresponding to the sixth splitting matrix in the target output matrix may be first determined. The c1 columns corresponding to the fifth splitting matrix may be continuous or discontinuous, and the c2 columns corresponding to the sixth splitting matrix may be continuous or discontinuous. This is not limited in this embodiment.

[0102] For example, the columns corresponding to the fifth splitting matrix may be the first c1 columns in the target input matrix, and the columns corresponding to the sixth splitting matrix may be the last c2 columns in the target input matrix. For another example, the columns corresponding to the fifth splitting matrix may be the last c1 columns in the target input matrix, and the columns corresponding to the sixth splitting matrix may be the first c2 columns in the target input matrix. For another example, the columns corresponding to the fifth splitting matrix may be the c1 columns in the target input matrix that are not all continuous, and the columns corresponding to the sixth splitting matrix may be the columns in the target input matrix other than the c1 columns corresponding to the fifth splitting matrix.

[0103] For example, Figure 9As shown, the leading input is [A, B] and the trailing input is [B, C]. First, the trailing input is split, resulting in trailing input 1 [B, c1] (i.e., a matrix with B rows and c1 columns) and trailing input 2 [B, c1] (i.e., a matrix with B rows and c2 columns). Then, matrix multiplication is performed on trailing input 1 and trailing input 2, processed according to parameter 2, and the leading input [A, B], processed according to parameter 1, respectively, to obtain output results 1 [A, c1] and 2 [A, c2]. The above information processing method performs two matrix multiplications of small matrices, resulting in two hardware overheads, requiring the issuance of two call instructions. Furthermore, since two matrix multiplications of small matrices are performed, the utilization of computing resources for each call is low.

[0104] In order to optimize the processing flow, such as Figure 10 As shown, matrix multiplication can be performed on the pre-input [A, B] processed according to parameter 1 and the post-input [B, C] processed according to parameter 2, resulting in the output [A, C]. This output is then split to produce output 1 [A, c1] and output 2 [A, c2]. After optimization, a single large-matrix matrix multiplication operation incurs minimal hardware overhead, requiring only one instruction. Furthermore, this single large-matrix matrix multiplication improves the utilization of computing resources per call.

[0105] Through this optional embodiment, by first performing a matrix multiplication operation on a two-dimensional input matrix and then performing a matrix column splitting operation, the applicability of tensor fusion calculations can be improved and the utilization rate of the called computing resources can be improved.

[0106] As an optional implementation scheme, the above method further includes:

[0107] S1, when it is detected that a second preset operation needs to be performed on at least one splitting matrix in the third group of splitting matrices, performing a column splitting operation on the post-input matrix to obtain a third group of splitting matrices;

[0108] S2: Perform a second preset operation on at least one splitting matrix in the third group of splitting matrices.

[0109] In addition to performing matrix multiplication operations, the split results of the post-input matrix can be the input of other operations. For example, Figure 11 As shown, in addition to performing matrix multiplication operations on post-input 1[B,c1] and post-input 2[B,c2], another operation 3 is performed on post-input 1[B,c1], and another operation 4 is performed on post-input 2[B,c2].

[0110] If it is detected that a second preset operation needs to be performed on at least one splitting matrix in the third group of splitting matrices, that is, the splitting result of the post-input matrix is the input of other operations, the tensor obtained by the original splitting can be retained, and a column splitting operation can be performed on the post-input matrix to obtain the third group of splitting matrices.

[0111] After obtaining the third set of splitting matrices, the server may perform a second preset operation on at least one splitting matrix in the third set of splitting matrices. If the at least one splitting matrix includes multiple splitting matrices, the server may perform a corresponding second preset operation on each splitting matrix in the at least one splitting matrix.

[0112] Optionally, in this embodiment, if at least one splitting matrix is part of the third group of splitting matrices, a column splitting operation may be performed on the post-input matrix to obtain at least one splitting matrix; and a second preset operation may be performed on the at least one splitting matrix.

[0113] For example, Figure 12 As shown, in addition to performing matrix multiplication, a split operation can be performed on the post-input [B, C] to obtain post-input 1 [B, c1] and post-input 2 [B, c2], and then other operations 3 are performed on post-input 1 [B, c1] and other operations 4 are performed on post-input 2 [B, c2].

[0114] Through this optional embodiment, by performing a column splitting operation on the front and back input matrices and performing other operations on the split matrices obtained by the splitting, it can be adapted to scenarios with other operation requirements and improve the compatibility of tensor fusion calculations.

[0115] As an optional implementation, a column splitting operation is performed on the post-input matrix to obtain a third set of split matrices including:

[0116] When the post-input matrix is a matrix of dimension B×C, a column splitting operation is performed on the matrix of dimension B×C to obtain a seventh splitting matrix and an eighth splitting matrix, wherein the third group of splitting matrices includes the seventh splitting matrix and the eighth splitting matrix, the seventh splitting matrix is a matrix of dimension B×c1, the eighth splitting matrix is a matrix of dimension B×c2, and C=c1+c2.

[0117] If the post-input matrix is a two-dimensional matrix of dimension B×C, the splitting matrix obtained by performing a column splitting operation on the post-input matrix is the third group of splitting matrices, which contains at least two splitting matrices. If there are two splitting matrices, the server can perform a column splitting operation on the matrix of dimension B×C to obtain the seventh splitting matrix and the eighth splitting matrix. Here, the seventh splitting matrix is a matrix of dimension B×c1, and the eighth splitting matrix is a matrix of dimension B×c2, where C = c1 + c2. The third group of splitting matrices includes the seventh and eighth splitting matrices.

[0118] Optionally, when performing the column-by-column splitting operation, c1 columns corresponding to the seventh splitting matrix and c2 columns corresponding to the eighth splitting matrix in the post-input matrix may be first determined. The c1 columns corresponding to the seventh splitting matrix may be a plurality of continuous columns or a plurality of discontinuous columns, and the c2 columns corresponding to the eighth splitting matrix may be a plurality of continuous columns or a plurality of discontinuous columns. This is not limited in this embodiment.

[0119] Through this optional embodiment, by performing a column splitting operation on a two-dimensional input matrix to obtain two corresponding split matrices, the applicability of tensor fusion calculations can be improved.

[0120] As an optional implementation, performing a matrix multiplication operation on the front input matrix and the rear input matrix in the target processing device to obtain a target output matrix includes:

[0121] A matrix multiplication operation is performed on a front input matrix and a rear input matrix in a GPU to obtain a target output matrix, wherein the target processing device includes the GPU.

[0122] The target processing device may include a GPU. The CPU may be deployed on a server and may be a multi-core GPU. The matrix multiplication operation may be performed by the GPU. When performing matrix processing, a processor or other control component on the server may issue a call instruction to the GPU, instructing the GPU to perform the corresponding matrix multiplication operation.

[0123] When performing tensor fusion calculations, if you first perform a matrix split operation (for example, row split or column split) and then perform a matrix multiplication operation, you need to issue multiple call instructions to the GPU to perform the matrix multiplication operations separately. If there is only one GPU, the matrix multiplication operations must be performed sequentially, and each execution cannot fully utilize the GPU resources. If there are multiple GPU cores, although different GPU cores can be used to perform different matrix multiplication operations, the GPU resources cannot be fully utilized for each call.

[0124] In this embodiment, a single call instruction can be used to call GPU resources. A matrix multiplication operation is then performed on the called GPU on the preceding and following input matrices to obtain a target output matrix. Since only one GPU call is made, only one call instruction is required. Furthermore, since a single GPU is used to perform the matrix multiplication operation on a large matrix, GPU resource utilization can be improved.

[0125] For example, if row splitting of matrix multiplication is performed, the front input is split into two split matrices, and two GPU cores need to be called to perform the corresponding matrix multiplication operations respectively. The resource utilization rate of each GPU core is 30%. If the matrix multiplication operation of the matrix is performed first, only one GPU core needs to be called to perform the corresponding matrix multiplication operation, and the resource utilization rate of the GPU core is 60%.

[0126] Through this embodiment, by calling the GPU to perform matrix multiplication operations, the advantage of the fast computing speed of the GPU can be utilized, the speed of tensor fusion calculation is improved, and at the same time, the utilization rate of GPU resources is also improved.

[0127] As an optional implementation, obtaining a front input matrix and a rear input matrix includes:

[0128] A front input matrix is obtained from a first multidimensional matrix to be processed in a target prediction model, and a rear input matrix is obtained from a second multidimensional matrix to be processed in the target prediction model, wherein the target prediction model is used to determine a predicted target object based on the first multidimensional matrix and the second multidimensional matrix.

[0129] The pre-input matrix and the post-input matrix may be matrices obtained from a target prediction model, which may be deployed on a server and used to determine a predicted target object based on the first multidimensional matrix and the second multidimensional matrix. The target prediction model may be a neural network model, whose input may be an image to be recognized. The first multidimensional matrix and the second multidimensional matrix may be inputs to a target convolution layer (or other layers involving matrix multiplication) of the neural network model.

[0130] When processing the first multidimensional matrix and the second multidimensional matrix, a pre-input matrix can be obtained from the first multidimensional matrix, and a post-input matrix can be obtained from the second multidimensional matrix. The pre-input matrix and the post-input matrix can be processed using the information processing method shown in the aforementioned embodiment. This has already been described and will not be repeated here.

[0131] It should be noted that the fusion calculation scheme for multiplying multiple split tensors by the same tensor provided in this embodiment can be applied to tensor calculations of higher dimensions, that is, batched-matmul (batch matrix multiplication). When other dimensions are batch dimensions, the other dimensions can be kept unchanged. It can also be extended to other operations that can be expressed using the Einstein accumulation protocol, such as transpose operations and diagonal operations. Among them, the Einstein summation operation is a common tensor operation. It refers to the scalar multiplication of two tensor elements one by one, and then the accumulation and contraction along certain specified dimensions. Matrix multiplication is an example of the Einstein summation operation.

[0132] The number of pre-input matrices to be processed in the first multidimensional matrix can be multiple, and the number of post-input matrices to be processed in the second multidimensional matrix can also be multiple. The server can process different pre-input matrices and post-input matrices serially or in parallel. The processing flows for different pre-input matrices and post-input matrices can be similar or differ based on different processing objectives, which is not limited in this embodiment.

[0133] Through this embodiment, by obtaining the input matrix from the multidimensional matrix to be processed in the prediction model of the prediction target for fusion calculation, the efficiency of target object prediction can be improved and the applicability of tensor fusion calculation can be improved.

[0134] As an optional implementation scheme, a pre-input matrix is obtained from a first multidimensional matrix to be processed in a target prediction model, and a post-input matrix is obtained from a second multidimensional matrix to be processed in the target prediction model, including: when the first multidimensional matrix is a matrix with a dimension of D×A×B and the second multidimensional matrix is a matrix with a dimension of D×B×C, D pre-input matrices with a dimension of A×B are obtained in the first multidimensional matrix, and D post-input matrices with a dimension of B×C are obtained in the second multidimensional matrix, where D is a natural number greater than 1.

[0135] The first multidimensional matrix and the second multidimensional matrix may both be three-dimensional matrices. The first multidimensional matrix may be a matrix of dimensions D×A×B, which may be considered to contain D two-dimensional matrices of dimensions A×B. Correspondingly, obtaining a pre-input matrix from the first multidimensional matrix to be processed in the target prediction model may include: obtaining D pre-input matrices of dimensions A×B in the first multidimensional matrix. The second multidimensional matrix may be a matrix of dimensions D×B×C, which may be considered to contain D two-dimensional matrices of dimensions B×C. Correspondingly, obtaining a post-input matrix from the second multidimensional matrix to be processed in the target prediction model may include: obtaining D post-input matrices of dimensions B×C in the second multidimensional matrix.

[0136] The D front input matrices in the first multidimensional matrix and the D rear input matrices in the second multidimensional matrix can be in a one-to-one correspondence, for example, one front input matrix is only allowed to be associated with one rear input matrix, and one rear input matrix is also only allowed to be associated with one front input matrix; it can also be a one-to-many relationship, that is, one front input matrix is allowed to be associated with one or more rear input matrices, and one rear input matrix is only allowed to be associated with one front input matrix; it can also be a many-to-many relationship, that is, one front input matrix is allowed to be associated with one or more rear input matrices, and one rear input matrix is also allowed to be associated with one or more front input matrices.

[0137] Optionally, performing a matrix multiplication operation on the front input matrix and the rear input matrix in the target processing device to obtain a target output matrix includes: performing matrix multiplication operations on D front input matrices and D rear input matrices in sequence in the target processing device to obtain D target output matrices with dimensions of A×C.

[0138] In a scenario where the D pre-input matrices and the D post-input matrices are in a one-to-one correspondence, when performing a matrix multiplication operation, the target processing device can sequentially perform a matrix multiplication operation on each pre-input matrix and the corresponding post-input matrix to obtain D target output matrices of dimension A×C. Different matrix multiplication operations can be performed serially or in parallel, which is not limited in this embodiment.

[0139] Optionally, for a scenario in which a matrix multiplication operation is performed on each front input matrix and each rear input matrix, performing a matrix multiplication operation on the front input matrix and the rear input matrix in the target processing device to obtain a target output matrix may also include: performing a matrix multiplication operation on each of the D front input matrices and the D rear input matrices in sequence in the target processing device to obtain D×D target output matrices with dimensions A×C.

[0140] Through this embodiment, by performing matrix multiplication operations on each front input matrix in the multidimensional matrix and the corresponding rear input matrix respectively, the process of tensor fusion calculation on the multidimensional matrix can be simplified and the efficiency of tensor fusion calculation can be improved.

[0141] As an optional implementation scheme, the above method further includes:

[0142] When it is detected that the model structure in the first prediction model is used to perform a row splitting operation on the front input matrix, and matrix multiplication operations are performed on each splitting matrix in the first group of splitting matrices and the rear input matrix respectively to obtain a second group of splitting matrices, the model structure in the first prediction model is adjusted to obtain a second prediction model, wherein the model structure in the second prediction model is used to perform matrix multiplication operations on the front input matrix and the rear input matrix to obtain a target output matrix, and a row splitting operation is performed on the target output matrix to obtain a second group of splitting matrices.

[0143] In this embodiment, if it is detected that the model structure in the first prediction model is configured to perform a row splitting operation on the preceding input matrix and to perform a matrix multiplication operation on each splitting matrix in the first set of splitting matrices with the following input matrix to obtain a second set of splitting matrices, the server may adjust the model structure in the first prediction model to obtain a second prediction model. The adjustment is to adjust the model structure in the first prediction model to perform a matrix multiplication operation on the preceding input matrix and the following input matrix to obtain a target output matrix, and to perform a row splitting operation on the target output matrix to obtain a second set of splitting matrices.

[0144] The aforementioned adjustment can be achieved by adjusting the execution logic of the first prediction model. A structure adjustment program for the first prediction model can be pre-installed on the server, and the structure adjustment program can be called to adjust the model structure in the first prediction model, thereby obtaining the second prediction model. Optionally, the second prediction model can be the target prediction model in the aforementioned embodiment. After the model structure adjustment is performed, the target processing device can be used to perform a matrix multiplication operation on the pre-input matrix and the post-input matrix in the second prediction model to obtain the target output matrix.

[0145] Through this embodiment, the model structure of the prediction model is adjusted based on the operations performed on the detected model structure of the prediction model, which can improve the flexibility of the model configuration and at the same time improve the efficiency of the prediction model in performing target prediction.

[0146] As an optional implementation scheme, the above method further includes:

[0147] When it is detected that the model structure in the third prediction model is used to perform a column splitting operation on the post-input matrix, and to perform matrix multiplication operations on the pre-input matrix and each splitting matrix in the third group of splitting matrices to obtain a fourth group of splitting matrices, the model structure in the third prediction model is adjusted to obtain a fourth prediction model, wherein the model structure in the fourth prediction model is used to perform a matrix multiplication operation on the pre-input matrix and the post-input matrix to obtain a target output matrix, and to perform a column splitting operation on the target output matrix to obtain a fourth group of splitting matrices.

[0148] In this embodiment, if it is detected that the model structure in the third prediction model is used to perform a column splitting operation on the post-input matrix and to perform a matrix multiplication operation on the pre-input matrix and each splitting matrix in the third set of splitting matrices to obtain a fourth set of splitting matrices, the server may adjust the model structure in the third prediction model to obtain a fourth prediction model. The adjustment is to adjust the model structure in the third prediction model to perform a matrix multiplication operation on the pre-input matrix and the post-input matrix to obtain a target output matrix, and to perform a column splitting operation on the target output matrix to obtain the fourth set of splitting matrices.

[0149] The aforementioned adjustment can be achieved by adjusting the execution logic of the third prediction model. A structure adjustment program for the third prediction model can be pre-installed on the server, and the structure adjustment program can be called to adjust the model structure in the third prediction model, thereby obtaining the fourth prediction model. Optionally, the fourth prediction model can be the target prediction model in the aforementioned embodiment. After the model structure adjustment is performed, the target processing device can be configured to perform a matrix multiplication operation on the pre-input matrix and the post-input matrix in the fourth prediction model to obtain the target output matrix.

[0150] Through this embodiment, the model structure of the prediction model is adjusted based on the operations performed on the detected model structure of the prediction model, which can improve the flexibility of the model configuration and at the same time improve the efficiency of the prediction model in performing target prediction.

[0151] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all optional embodiments, and the actions and modules involved are not necessarily required by this application.

[0152] According to another aspect of the embodiments of the present application, an information processing device for implementing the above information processing method is also provided. Figure 13 As shown, the device includes:

[0153] An acquiring unit 1302 is configured to acquire a pre-input matrix and a post-input matrix;

[0154] a first execution unit 1304 configured to, upon detecting that a row splitting operation needs to be performed on a preceding input matrix and that a matrix multiplication operation needs to be performed on each splitting matrix in the first group of splitting matrices with a subsequent input matrix, perform a matrix multiplication operation on the preceding input matrix and the subsequent input matrix in a target processing device to obtain a target output matrix, wherein the first group of splitting matrices includes splitting matrices obtained by performing the row splitting operation on the preceding input matrix, the preceding input matrix is a first input in the matrix multiplication operation, and the subsequent input matrix is a second input in the matrix multiplication operation;

[0155] The second execution unit 1306 is configured to perform a row splitting operation on the target output matrix to obtain a second set of splitting matrices.

[0156] It should be noted that the acquisition unit 1302 in this embodiment can be used to execute the above step S202, the first execution unit 1304 in this embodiment can be used to execute the above step S204, and the second execution unit 1306 in this embodiment can be used to execute the above step S206.

[0157] Through the embodiments provided by the present application, a front input matrix and a rear input matrix are obtained; when it is detected that a row splitting operation needs to be performed on the front input matrix, and a matrix multiplication operation needs to be performed on each splitting matrix in the first group of splitting matrices and the rear input matrix respectively, a matrix multiplication operation is performed on the front input matrix and the rear input matrix in a target processing device to obtain a target output matrix, wherein the first group of splitting matrices includes the splitting matrices obtained by performing a row splitting operation on the front input matrix, the front input matrix is the first input in the matrix multiplication operation, and the rear input matrix is the second input in the matrix multiplication operation; a row splitting operation is performed on the target output matrix to obtain a second group of splitting matrices, thereby solving the technical problem of low utilization of computing resources due to too little computing performed on each resource call in the information processing method in the related art, thereby improving the utilization of computing resources.

[0158] As an optional implementation scheme, the first execution unit 1304 includes: a first execution module, and the second execution unit 1306 includes: a second execution module, wherein,

[0159] a first execution module, configured to, when a front input matrix is a matrix of dimension A×B and a rear input matrix is a matrix of dimension B×C, perform a matrix multiplication operation on the matrix of dimension A×B and the matrix of dimension B×C to obtain a target output matrix, wherein the target output matrix is a matrix of dimension A×C, A is a natural number greater than 1, and B and C are natural numbers;

[0160] The second execution module is used to perform a row splitting operation on a matrix of dimension A×C to obtain a first splitting matrix and a second splitting matrix, wherein the second group of splitting matrices includes the first splitting matrix and the second splitting matrix, the first splitting matrix is a matrix of dimension a1×C, the second splitting matrix is a matrix of dimension a2×C, and A=a1+a2.

[0161] Optional examples of this embodiment can refer to the examples shown in the above-mentioned information processing method, which will not be described in detail in this embodiment.

[0162] As an optional embodiment, the above device further includes:

[0163] a third execution unit, configured to, when detecting that a first preset operation needs to be performed on at least one splitting matrix in the first group of splitting matrices, perform a row splitting operation on the preceding input matrix to obtain the first group of splitting matrices;

[0164] The fourth execution unit is configured to execute a first preset operation on at least one splitting matrix in the first group of splitting matrices.

[0165] Optional examples of this embodiment can refer to the examples shown in the above-mentioned information processing method, which will not be described in detail in this embodiment.

[0166] As an optional implementation scheme, the third execution unit includes:

[0167] The third execution module is used to perform a row splitting operation on the matrix with a dimension of A×B when the previous input matrix is a matrix with a dimension of A×B, to obtain a third splitting matrix and a fourth splitting matrix, wherein the first group of splitting matrices includes the third splitting matrix and the fourth splitting matrix, the third splitting matrix is a matrix with a dimension of a1×B, the fourth splitting matrix is a matrix with a dimension of a2×B, and A=a1+a2.

[0168] Optional examples of this embodiment can refer to the examples shown in the above-mentioned information processing method, which will not be described in detail in this embodiment.

[0169] As an optional embodiment, the above device further includes:

[0170] a fifth execution unit configured to, upon detecting that a column splitting operation needs to be performed on the post-input matrix and that a matrix multiplication operation needs to be performed on the pre-input matrix and each splitting matrix in the third group of splitting matrices, perform a matrix multiplication operation on the pre-input matrix and the post-input matrix in a target processing device to obtain a target output matrix, wherein the third group of splitting matrices includes splitting matrices obtained by performing the column splitting operation on the post-input matrix;

[0171] The sixth execution unit is configured to perform a column splitting operation on the target output matrix to obtain a fourth set of split matrices.

[0172] Optional examples of this embodiment can refer to the examples shown in the above-mentioned information processing method, which will not be described in detail in this embodiment.

[0173] As an optional implementation scheme, the fifth execution unit includes: a fourth execution module, and the sixth execution unit includes: a fifth execution module, wherein,

[0174] a fourth execution module, configured to, when the preceding input matrix is a matrix of dimension A×B and the following input matrix is a matrix of dimension B×C, perform a matrix multiplication operation on the matrix of dimension A×B and the matrix of dimension B×C to obtain a target output matrix, wherein the target output matrix is a matrix of dimension A×C, C is a natural number greater than 1, and A and B are natural numbers;

[0175] The fifth execution module is used to perform a row splitting operation on a matrix of dimension A×C to obtain a fifth splitting matrix and a sixth splitting matrix, wherein the fourth group of splitting matrices includes the fifth splitting matrix and the sixth splitting matrix, the fifth splitting matrix is a matrix of dimension A×c1, the sixth splitting matrix is a matrix of dimension A×c2, and C=c1+c2.

[0176] Optional examples of this embodiment can refer to the examples shown in the above-mentioned information processing method, which will not be described in detail in this embodiment.

[0177] As an optional embodiment, the above device further includes:

[0178] a seventh execution unit, configured to, when detecting that a second preset operation needs to be performed on at least one splitting matrix in the third group of splitting matrices, perform a column splitting operation on the post-input matrix to obtain a third group of splitting matrices;

[0179] The eighth execution unit is configured to execute a second preset operation on at least one splitting matrix in the third group of splitting matrices.

[0180] Optional examples of this embodiment can refer to the examples shown in the above-mentioned information processing method, which will not be described in detail in this embodiment.

[0181] As an optional implementation scheme, the seventh execution unit includes:

[0182] The sixth execution module is used to perform a column splitting operation on the matrix with a dimension of B×C when the post-input matrix is a matrix with a dimension of B×C, to obtain a seventh splitting matrix and an eighth splitting matrix, wherein the third group of splitting matrices includes the seventh splitting matrix and the eighth splitting matrix, the seventh splitting matrix is a matrix with a dimension of B×c1, the eighth splitting matrix is a matrix with a dimension of B×c2, and C=c1+c2.

[0183] Optional examples of this embodiment can refer to the examples shown in the above-mentioned information processing method, which will not be described in detail in this embodiment.

[0184] As an optional implementation scheme, the first execution unit 1304 includes:

[0185] A seventh execution module is configured to perform a matrix multiplication operation on a front input matrix and a rear input matrix in a GPU to obtain a target output matrix, wherein the target processing device includes a GPU.

[0186] Optional examples of this embodiment can refer to the examples shown in the above-mentioned information processing method, which will not be described in detail in this embodiment.

[0187] As an optional implementation scheme, the obtaining unit 1302 includes:

[0188] An acquisition module is used to obtain a front input matrix in a first multidimensional matrix to be processed in a target prediction model, and to obtain a rear input matrix in a second multidimensional matrix to be processed in the target prediction model, wherein the target prediction model is used to determine a predicted target object based on the first multidimensional matrix and the second multidimensional matrix.

[0189] Optional examples of this embodiment can refer to the examples shown in the above-mentioned information processing method, which will not be described in detail in this embodiment.

[0190] As an optional implementation scheme, the acquisition module includes: an acquisition submodule, the first execution unit includes: an eighth execution module, wherein,

[0191] an acquisition submodule, configured to, when the first multidimensional matrix is a matrix of dimensions D×A×B and the second multidimensional matrix is a matrix of dimensions D×B×C, acquire D pre-input matrices of dimensions A×B from the first multidimensional matrix, and acquire D post-input matrices of dimensions B×C from the second multidimensional matrix, where D is a natural number greater than 1;

[0192] An eighth execution module is used to perform matrix multiplication operations on the D front input matrices and the D rear input matrices in sequence in the target processing device to obtain D target output matrices with dimensions A×C, wherein each target output matrix is a matrix obtained by performing matrix multiplication operations on a front input matrix and a rear input matrix.

[0193] Optional examples of this embodiment can refer to the examples shown in the above-mentioned information processing method, which will not be described in detail in this embodiment.

[0194] As an optional embodiment, the above device further includes:

[0195] a first adjustment unit configured to adjust the model structure in the first prediction model to obtain a second prediction model when it is detected that the model structure in the first prediction model is used to perform a row splitting operation on a front input matrix and to perform a matrix multiplication operation on each splitting matrix in the first group of splitting matrices with a rear input matrix to obtain a second group of splitting matrices, wherein the model structure in the second prediction model is used to perform a matrix multiplication operation on the front input matrix and the rear input matrix to obtain a target output matrix and to perform a row splitting operation on the target output matrix to obtain the second group of splitting matrices;

[0196] The target processing device is used to perform a matrix multiplication operation on the front input matrix and the rear input matrix in the second prediction model to obtain a target output matrix.

[0197] Optional examples of this embodiment can refer to the examples shown in the above-mentioned information processing method, which will not be described in detail in this embodiment.

[0198] As an optional embodiment, the above device further includes:

[0199] a second adjustment unit configured to adjust the model structure in the third prediction model to obtain a fourth prediction model when it is detected that the model structure in the third prediction model is used to perform a column splitting operation on the post-input matrix and to perform a matrix multiplication operation on the pre-input matrix and each splitting matrix in the third group of splitting matrices to obtain a fourth group of splitting matrices, wherein the model structure in the fourth prediction model is used to perform a matrix multiplication operation on the pre-input matrix and the post-input matrix to obtain a target output matrix, and to perform a column splitting operation on the target output matrix to obtain a fourth group of splitting matrices;

[0200] The target processing device is used to perform a matrix multiplication operation on the front input matrix and the rear input matrix in the fourth prediction model to obtain a target output matrix.

[0201] Optional examples of this embodiment can refer to the examples shown in the above-mentioned information processing method, which will not be described in detail in this embodiment.

[0202] According to another aspect of the embodiment of the present application, an electronic device for implementing the above information processing method is also provided. The electronic device may be Figure 1The terminal device or server shown in FIG. This embodiment is described by taking the electronic device as a server as an example. Figure 14 As shown, the electronic device includes a memory 1402 and a processor 1404. The memory 1402 stores a computer program, and the processor 1404 is configured to execute the steps in any of the above method embodiments through the computer program.

[0203] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.

[0204] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:

[0205] S1, obtain the front input matrix and the rear input matrix;

[0206] S2, when it is detected that a row splitting operation needs to be performed on the front input matrix and a matrix multiplication operation needs to be performed on each splitting matrix in the first group of splitting matrices with the rear input matrix, performing a matrix multiplication operation on the front input matrix and the rear input matrix in the target processing device to obtain a target output matrix, wherein the first group of splitting matrices includes the splitting matrices obtained by performing the row splitting operation on the front input matrix, the front input matrix is a first input in the matrix multiplication operation, and the rear input matrix is a second input in the matrix multiplication operation;

[0207] S3, perform a row splitting operation on the target output matrix to obtain a second set of split matrices.

[0208] Alternatively, those skilled in the art will appreciate that Figure 14 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID), a PAD, or other terminal devices. Figure 14 It does not limit the structure of the above electronic device. For example, the electronic device may also include Figure 14 More or fewer components (such as network interfaces, etc.) as shown in, or with Figure 14 Different configurations shown.

[0209] Among them, the memory 1402 can be used to store software programs and modules, such as those in the embodiments of the present application. The program instructions / modules corresponding to the information processing method and device, the processor 1404 executes various functional applications and data processing by running the software programs and modules stored in the memory 1402, that is, realizing the above-mentioned information processing method. The memory 1402 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1402 may further include a memory remotely located relative to the processor 1404, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include but are not limited to the Internet, corporate intranets, local area networks, mobile communication networks and combinations thereof. As an example, if Figure 14 As shown, the memory 1402 may include, but is not limited to, the acquisition unit 1302, the first execution unit 1304, and the second execution unit 1306 in the information processing device. In addition, it may also include, but is not limited to, other module units in the information processing device, which will not be repeated in this example.

[0210] Optionally, the transmission device 1406 is configured to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one embodiment, the transmission device 1406 includes a network interface controller (NIC), which can be connected to other network devices and a router via a network cable to communicate with the Internet or a local area network. In one embodiment, the transmission device 1406 is a radio frequency (RF) module, which is configured to communicate with the Internet wirelessly.

[0211] In addition, the electronic device further includes: a display 1408 for displaying an image to be recognized and a target recognition result; and a connection bus 1410 for connecting various module components in the electronic device.

[0212] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting multiple nodes through network communication. The nodes may form a peer-to-peer (P2P) network, and any computing device, such as a server, terminal, or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.

[0213] According to one aspect of the present application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations described above, wherein the computer program is configured to perform the steps of any of the above method embodiments when executed.

[0214] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0215] S1, obtain the front input matrix and the rear input matrix;

[0216] S2, when it is detected that a row splitting operation needs to be performed on the front input matrix and a matrix multiplication operation needs to be performed on each splitting matrix in the first group of splitting matrices with the rear input matrix, performing a matrix multiplication operation on the front input matrix and the rear input matrix in the target processing device to obtain a target output matrix, wherein the first group of splitting matrices includes the splitting matrices obtained by performing the row splitting operation on the front input matrix, the front input matrix is a first input in the matrix multiplication operation, and the rear input matrix is a second input in the matrix multiplication operation;

[0217] S3, perform a row splitting operation on the target output matrix to obtain a second set of split matrices.

[0218] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing the hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0219] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0220] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above-mentioned computer-readable storage medium. Based on this understanding, the technical solution of the present application, 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, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application.

[0221] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0222] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, and can be electrical or other forms.

[0223] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0224] In addition, the functional units in the various embodiments of the present application may be integrated into a processing unit, or each unit may exist physically separately, or at least two units may be integrated into a single unit. The above-mentioned integrated units may be implemented in the form of hardware or software functional units.

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

Claims

1. An information processing method, characterized in that: include: In the process of the neural network model processing the input image to be recognized, obtaining a front input matrix and a rear input matrix, wherein the number of columns of the front input matrix is the same as the number of rows of the rear input matrix; In a case where it is detected that a row splitting operation needs to be performed on the front input matrix and a matrix multiplication operation needs to be performed on each splitting matrix in the first group of splitting matrices and the rear input matrix respectively, a matrix multiplication operation is performed on the front input matrix and the rear input matrix in a target processing device to obtain a target output matrix, wherein the first group of splitting matrices includes splitting matrices obtained by performing the row splitting operation on the front input matrix, the front input matrix is a first input in the matrix multiplication operation, and the rear input matrix is a second input in the matrix multiplication operation; The row splitting operation is performed on the target output matrix to obtain a second set of splitting matrices.

2. The method according to claim 1, characterized in that The performing a matrix multiplication operation on the front input matrix and the rear input matrix to obtain a target output matrix includes: when the front input matrix is a matrix with a dimension of A×B and the rear input matrix is a matrix with a dimension of B×C, performing the matrix multiplication operation on the matrix with a dimension of A×B and the matrix with a dimension of B×C to obtain the target output matrix, wherein the target output matrix is a matrix with a dimension of A×C, A is a natural number greater than 1, and B and C are natural numbers; The step of performing the row splitting operation on the target output matrix to obtain a second group of split matrices includes: performing the row splitting operation on the matrix of dimension A×C to obtain a first splitting matrix and a second splitting matrix, wherein the second group of splitting matrices includes the first splitting matrix and the second splitting matrix, the first splitting matrix is a matrix of dimension a1×C, the second splitting matrix is a matrix of dimension a2×C, A= a1+ a2, and a1 and a2 are natural numbers.

3. The method according to claim 1, characterized in that The method further comprises: When it is detected that a first preset operation needs to be performed on at least one splitting matrix in the first group of splitting matrices, performing the row splitting operation on the front input matrix to obtain the first group of splitting matrices; The first preset operation is performed on at least one splitting matrix in the first group of splitting matrices.

4. The method according to claim 3, characterized in that The performing the row splitting operation on the front input matrix to obtain the first group of splitting matrices includes: When the front input matrix is a matrix with a dimension of A×B, the row splitting operation is performed on the matrix with a dimension of A×B to obtain a third splitting matrix and a fourth splitting matrix, wherein the first group of splitting matrices includes the third splitting matrix and the fourth splitting matrix, the third splitting matrix is a matrix with a dimension of a1×B, and the fourth splitting matrix is a matrix with a dimension of a2×B, A=a1+a2, A and B are natural numbers, and a1 and a2 are natural numbers.

5. The method according to claim 1, wherein The method further comprises: In a case where it is detected that a column splitting operation needs to be performed on the post-input matrix and the matrix multiplication operation needs to be performed on the pre-input matrix and each splitting matrix in the third group of splitting matrices respectively, performing the matrix multiplication operation on the pre-input matrix and the post-input matrix in the target processing device to obtain the target output matrix, wherein the third group of splitting matrices includes the splitting matrices obtained by performing the column splitting operation on the post-input matrix; The column splitting operation is performed on the target output matrix to obtain a fourth set of split matrices.

6. The method according to claim 5, characterized in that The performing a matrix multiplication operation on the front input matrix and the rear input matrix to obtain a target output matrix includes: when the front input matrix is a matrix with a dimension of A×B and the rear input matrix is a matrix with a dimension of B×C, performing the matrix multiplication operation on the matrix with a dimension of A×B and the matrix with a dimension of B×C to obtain the target output matrix, wherein the target output matrix is a matrix with a dimension of A×C, C is a natural number greater than 1, and A and B are natural numbers; The performing the column splitting operation on the target output matrix to obtain a fourth group of split matrices includes: performing the column splitting operation on the matrix of dimension A×C to obtain a fifth splitting matrix and a sixth splitting matrix, wherein the fourth group of splitting matrices includes the fifth splitting matrix and the sixth splitting matrix, the fifth splitting matrix is a matrix of dimension A×c1, the sixth splitting matrix is a matrix of dimension A×c2, C= c1+c2, c1 and c2 are natural numbers.

7. The method according to claim 5, characterized in that The method further comprises: When it is detected that a second preset operation needs to be performed on at least one splitting matrix in the third group of splitting matrices, performing the column splitting operation on the post-input matrix to obtain the third group of splitting matrices; The second preset operation is performed on at least one splitting matrix in the third group of splitting matrices.

8. The method according to claim 7, characterized in that The performing the column splitting operation on the post-input matrix to obtain the third group of split matrices includes: When the post-input matrix is a matrix of dimension B×C, the column splitting operation is performed on the matrix of dimension B×C to obtain a seventh splitting matrix and an eighth splitting matrix, wherein the third group of splitting matrices includes the seventh splitting matrix and the eighth splitting matrix, the seventh splitting matrix is a matrix of dimension B×c1, and the eighth splitting matrix is a matrix of dimension B×c2, C=c1+c2, B and C are natural numbers, and c1 and c2 are natural numbers.

9. The method according to any one of claims 1 to 8, characterized in that The performing the matrix multiplication operation on the front input matrix and the rear input matrix in the target processing device to obtain a target output matrix includes: The matrix multiplication operation is performed on the front input matrix and the rear input matrix in a graphics processing unit (GPU) to obtain a target output matrix, wherein the target processing device includes the GPU.

10. The method according to any one of claims 1 to 8, characterized in that The obtaining of the front input matrix and the rear input matrix includes: The front input matrix is obtained from a first multidimensional matrix to be processed in a target prediction model, and the rear input matrix is obtained from a second multidimensional matrix to be processed in the target prediction model, wherein the target prediction model is used to determine a predicted target object based on the first multidimensional matrix and the second multidimensional matrix.

11. The method according to claim 10, characterized in that The obtaining the pre-input matrix from a first multi-dimensional matrix to be processed in the target prediction model, and obtaining the post-input matrix from a second multi-dimensional matrix to be processed in the target prediction model, includes: when the first multi-dimensional matrix is a matrix with a dimension of D×A×B and the second multi-dimensional matrix is a matrix with a dimension of D×B×C, obtaining D pre-input matrices with a dimension of A×B from the first multi-dimensional matrix, and obtaining D post-input matrices with a dimension of B×C from the second multi-dimensional matrix, wherein D is a natural number greater than 1, and A, B, and C are natural numbers; The performing of the matrix multiplication operation on the front input matrix and the rear input matrix in the target processing device to obtain a target output matrix includes: performing the matrix multiplication operation on D front input matrices and D rear input matrices in sequence in the target processing device to obtain D target output matrices with dimensions of A×C, wherein each target output matrix is a matrix obtained by performing the matrix multiplication operation on one front input matrix and one rear input matrix.

12. The method according to any one of claims 1 to 4, characterized in that The method further comprises: In a case where it is detected that the model structure in the first prediction model is used to perform the row splitting operation on the front input matrix, and the matrix multiplication operation is performed on each splitting matrix in the first group of splitting matrices and the rear input matrix to obtain the second group of splitting matrices, the model structure in the first prediction model is adjusted to obtain a second prediction model, wherein the model structure in the second prediction model is used to perform the matrix multiplication operation on the front input matrix and the rear input matrix to obtain the target output matrix, and the row splitting operation is performed on the target output matrix to obtain the second group of splitting matrices; The target processing device is used to perform the matrix multiplication operation on the front input matrix and the rear input matrix in the second prediction model to obtain the target output matrix.

13. The method according to any one of claims 5 to 8, characterized in that The method further comprises: In a case where it is detected that the model structure in the third prediction model is used to perform the column splitting operation on the post-input matrix and to perform the matrix multiplication operation on the pre-input matrix and each splitting matrix in the third group of splitting matrices to obtain the fourth group of splitting matrices, the model structure in the third prediction model is adjusted to obtain a fourth prediction model, wherein the model structure in the fourth prediction model is used to perform the matrix multiplication operation on the pre-input matrix and the post-input matrix to obtain the target output matrix, and to perform the column splitting operation on the target output matrix to obtain the fourth group of splitting matrices; The target processing device is used to perform the matrix multiplication operation on the front input matrix and the rear input matrix in the fourth prediction model to obtain the target output matrix.

14. A computer-readable storage medium comprising a stored program, wherein: When the program is executed, the method described in any one of claims 1 to 13 is executed.

15. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 13 through the computer program.

Citation Information

Patent Citations

  • Information processing method and device, storage medium and electronic equipment

    CN115729518A