Data storage and data processing methods, devices, equipment and media for matrices

By performing nonlinear transformation and decomposition of the matrix, the problem of excessive storage space occupied by matrix data is solved, and efficient storage and storage space of matrix data are achieved.

CN118227947BActive Publication Date: 2024-11-26LYNXI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410636342.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-22
Publication Date
2024-11-26
Estimated Expiration
2044-05-22

AI Technical Summary

Technical Problem

When performing calculation tasks, the matrix data occupies too much storage space, resulting in low storage space utilization efficiency, and it is difficult for the prior art to effectively reduce the storage amount.

Method used

By performing nonlinear transformation processing on the stored matrix, it satisfies preset matrix decomposition conditions, such as low rank or symmetric positive definite conditions, and then decomposes it to obtain multiple submatrices with a storage amount smaller than the original matrix, and these submatrices are transferred. storage.

Benefits of technology

It effectively reduces the use of storage space, improves the efficiency of storage space, and realizes efficient storage of matrix data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118227947B_ABST
    Figure CN118227947B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data storage and data processing method, device, equipment, and medium for a matrix, the method comprising: performing nonlinear transformation processing on elements in a first matrix to be stored to obtain a second matrix corresponding to the first matrix; decomposing the second matrix to obtain multiple third matrices, the storage amount required for the multiple third matrices is less than the storage amount required for the first matrix; storing the multiple third matrices in a preset storage space. According to the embodiments of the present disclosure, the excessive occupation of storage space can be reduced and the utilization efficiency of storage space can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method, device, equipment, and medium for storing and processing matrix data. Background Art

[0002] With the continuous development of artificial intelligence technology, neural networks have been widely used in various fields, and neural networks with various complex structures continue to emerge.

[0003] Taking the execution of computing tasks by neural networks as an example, electronic devices usually need to involve a large amount of matrix reading and storage processing in the process of executing computing tasks. Therefore, how to reduce the storage space occupied by matrix data when executing computing tasks to improve the utilization efficiency of storage space has become a problem that needs to be solved urgently. Summary of the invention

[0004] The present invention provides a data storage and data processing method, device, equipment and medium for a matrix.

[0005] In a first aspect, the present disclosure provides a data storage method for a matrix, the data storage method for a matrix comprising:

[0006] Performing nonlinear transformation processing on elements in the first matrix to be stored to obtain a second matrix corresponding to the first matrix, wherein the second matrix satisfies a preset matrix decomposition condition, and the preset matrix decomposition condition includes that the matrix satisfies a low rank condition or the matrix satisfies a symmetric positive definite condition;

[0007] Decomposing the second matrix to obtain a plurality of third matrices, wherein a storage amount required by the plurality of third matrices is less than a storage amount required by the first matrix;

[0008] The plurality of third matrices are stored in a preset storage space.

[0009] In a second aspect, the present disclosure provides a data processing method, the data processing method comprising:

[0010] In the case where the third neural network performs the target processing task, for the first network layer of the third neural network, multiple third matrices corresponding to the first network layer are read from a preset storage space, wherein the multiple third matrices are obtained by processing the first matrix of the first network layer based on the data storage method of the first aspect, and the first matrix is ​​a weight matrix of the first network layer;

[0011] Performing restoration processing on the plurality of third matrices to obtain a second matrix; and performing nonlinear transformation processing on elements in the second matrix to obtain the first matrix;

[0012] According to the first matrix, the input data received by the first network layer and corresponding to the target processing task is processed to obtain the output data of the first network layer.

[0013] In a third aspect, the present disclosure provides a data storage device for a matrix, the data storage device for a matrix comprising:

[0014] A data transformation module, configured to perform nonlinear transformation processing on elements in a first matrix to be stored, to obtain a second matrix corresponding to the first matrix, wherein the second matrix satisfies a preset matrix decomposition condition, and the preset matrix decomposition condition includes that the matrix satisfies a low-rank condition or the matrix satisfies a symmetric positive definite condition;

[0015] A data decomposition module, used for decomposing the second matrix to obtain a plurality of third matrices, wherein the storage amount required by the plurality of third matrices is less than the storage amount required by the first matrix;

[0016] The data storage module is used for the user to store the plurality of third matrices in a preset storage space.

[0017] In a fourth aspect, the present disclosure provides a data processing device, the data processing device comprising:

[0018] A data reading module, used for reading, for a first network layer of the third neural network, a plurality of third matrices corresponding to the first network layer from a preset storage space when the third neural network performs a target processing task, wherein the plurality of third matrices are obtained by processing the first matrix of the first network layer based on the data storage method of the first aspect, and the first matrix is ​​a weight matrix of the first network layer;

[0019] A data restoration module, configured to restore the plurality of third matrices to obtain a second matrix; and perform nonlinear transformation on the elements in the second matrix to obtain the first matrix;

[0020] A data processing module is used to process the input data received by the first network layer and corresponding to the target processing task according to the first matrix to obtain output data of the first network layer.

[0021] In a fifth aspect, the present disclosure provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores one or more computer programs executable by the at least one processor, and one or more of the computer programs are executed by the at least one processor so that the at least one processor can execute the above-mentioned data storage method for a matrix of the first aspect or the data processing method of the second aspect.

[0022] In a sixth aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor / processing core, implements the above-mentioned data storage method for a matrix in the first aspect or the data processing method in the second aspect.

[0023] In the embodiments provided by the present disclosure, for the first matrix to be stored, it is considered that not only the correlation between the matrix elements can be transformed, but also the values ​​between the elements in the matrix can often be correlated. To this end, the present disclosure performs nonlinear transformation processing on the elements in the first matrix to adjust the correlation between the values ​​of the elements in the matrix, thereby obtaining a second matrix that can meet the preset matrix decomposition conditions. Thereafter, by decomposing the second matrix, a plurality of third matrices whose required storage amount is less than the storage amount required for the first matrix are obtained, and the plurality of third matrices are stored, thereby reducing the amount of data storage and improving the utilization efficiency of the storage space.

[0024] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. The above and other features and advantages will become more apparent to those skilled in the art by describing detailed example embodiments with reference to the accompanying drawings, in which:

[0026] Figure 1 A flowchart of a data storage method for a matrix provided in an embodiment of the present disclosure;

[0027] Figure 2 A flowchart of data transformation processing provided by an embodiment of the present disclosure;

[0028] Figure 3 A schematic diagram of data transformation processing provided by an embodiment of the present disclosure;

[0029] Figure 4 A flowchart of constructing a second matrix provided in an embodiment of the present disclosure;

[0030] Figure 5 A flowchart of a data processing method provided in an embodiment of the present disclosure

[0031] Figure 6 A block diagram of a data storage device for a matrix provided in an embodiment of the present disclosure;

[0032] Figure 7 A block diagram of a data processing device provided in an embodiment of the present disclosure;

[0033] Figure 8 A block diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0034] In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0035] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.

[0036] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0037] The terms used herein are only used to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a" and "the" are also intended to include plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "including" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded. "Connected" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.

[0038] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined as such herein.

[0039] Typically, when an electronic device performs a computing task, for example, a computing task based on a neural network, in order to reduce the problem of excessive storage space occupied when reading and storing matrix data, it is generally considered to decompose the matrix to be stored, for example, by decomposing the matrix to be stored by at least one of orthogonal triangular decomposition (QR, QR decomposition), LU decomposition (LU Decomposition), Cholesky decomposition (Cholesky factorization), eigenvalue decomposition (Eigenvalue Decomposition), singular value decomposition (SVD, Singular Value Decomposition) and non-negative matrix factorization (NMF, Non-negative Matrix Factorization) to reduce the problem of excessive storage space occupied by directly storing the matrix.

[0040] When decomposing a matrix to reduce the amount of storage required, thereby reducing the problem of excessive storage space occupation, it usually only involves linear operations on the matrix and only considers the correlation between the elements of the matrix. This usually requires that the elements in the matrix must satisfy certain characteristics. If the matrix does not satisfy this characteristic, even if it is decomposed, it often cannot achieve the purpose of data compression to save the required storage amount.

[0041] For example, with the continuous development of artificial intelligence technology, electronic devices can process a large number of computing tasks such as text mining, image processing, and signal processing based on neural networks. In the process of processing such computing tasks, it is generally necessary to rely on SVD decomposition to compress and store matrices corresponding to various texts, images, or signals, so as to maximize the computing efficiency under the condition of limited hardware resources. However, when using SVD decomposition to decompose the matrix, it is often expected that the matrix satisfies the low-rank condition, so that after the matrix is ​​decomposed, the obtained sub-matrix can be compressed to reduce the required storage amount, but most matrices may not often meet this characteristic. The low-rank condition means: if X represents a numerical matrix with m rows and n columns, rank(X) represents the rank of X, then if rank(X) is much smaller than m and n, then X can be said to satisfy the low-rank condition, and X can be called a low-rank matrix.

[0042] In view of this, in an embodiment of the present disclosure, in order to reduce the excessive occupation of storage space by the matrix, thereby improving the utilization efficiency of the storage space, it is considered that when decomposing the matrix to reduce the required storage amount, it is not only possible to consider decomposing it based on the correlation between the elements in the matrix, but also possible to consider transforming it based on the correlation of the element values, so that the matrix after the transformation operation can meet the preset matrix decomposition conditions, for example, so that the matrix satisfies the symmetric positive definite condition or the low rank condition. To this end, the present disclosure performs nonlinear transformation processing on the elements in the first matrix so that the obtained second matrix can meet the preset matrix decomposition conditions, so that by decomposing the second matrix, multiple third matrices with a required storage amount less than the storage amount required by the first matrix can be obtained, and then by storing the multiple third matrices, the effect of reducing the excessive occupation of storage space and improving the utilization efficiency of storage space is achieved.

[0043] According to the data storage method or data processing method for the matrix according to the embodiment of the present disclosure, it can be executed by an electronic device such as a terminal device or a server, and the terminal device can be a vehicle-mounted device, a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. The method can be implemented by a processor calling a computer-readable program instruction stored in a memory. Alternatively, the method can be executed by a server.

[0044] Figure 1 A flowchart of a data storage method for a matrix provided in an embodiment of the present disclosure. Figure 1 , the method comprising:

[0045] In step S11, a nonlinear transformation process is performed on the elements in the first matrix to be stored to obtain a second matrix corresponding to the first matrix, wherein the second matrix satisfies a preset matrix decomposition condition, and the preset matrix decomposition condition includes that the matrix satisfies a low rank condition or the matrix satisfies a symmetric positive definite condition;

[0046] In the embodiments of the present disclosure, the first matrix may be any matrix obtained during the electronic device's execution of a computing task. For example, it may be image feature data received during the electronic device's execution of an image processing task. Alternatively, the first matrix may be text feature data received during the electronic device's execution of a speech processing task. Alternatively, the first matrix may be a weight matrix of a third neural network during the electronic device's execution of a computing task based on the third neural network. The third neural network may be used to execute any computing task including image processing tasks, speech processing tasks, text processing tasks, and video processing tasks. The network structure of the third neural network may be set as needed, and no special limitation is made here.

[0047] In some possible implementations, the first matrix may be a matrix that does not satisfy a preset matrix decomposition condition. For example, when performing SVD decomposition on the first matrix, it is usually expected that the first matrix satisfies a low-rank condition. If it does not satisfy the low-rank condition, even if SVD decomposition can be performed on it, the multiple sub-matrices obtained by decomposition cannot be compressed, resulting in the data volume of the multiple sub-matrices not being less than the original data volume of the first matrix, thereby failing to achieve data compression and reducing the amount of storage required to store the first matrix; for another example, when performing Cholesky decomposition on the first matrix, it is usually required that the first matrix satisfy a symmetric positive definite condition. If the first matrix does not satisfy the symmetric positive definite condition, even if Cholesky decomposition is performed on it, data compression cannot be achieved and the amount of storage required to store the first matrix cannot be reduced.

[0048] The nonlinear transformation processing may be to transform a single or multiple elements in the first matrix using an exponential function, a logarithmic function or a curve function, so that the second matrix obtained after the transformation can meet a preset matrix decomposition condition.

[0049] In the embodiment of the present disclosure, the preset matrix decomposition condition may be that the matrix satisfies a low-rank condition, or that the matrix satisfies a symmetric positive definite condition, or it may be set as required, and no special limitation is made here.

[0050] In step S12, the second matrix is ​​decomposed to obtain a plurality of third matrices, wherein the storage amount required by the plurality of third matrices is less than the storage amount required by the first matrix;

[0051] In step S13, a plurality of third matrices are stored in a preset storage space.

[0052] In some possible implementations, in step S12, the storage capacity required for the third matrix may be the storage capacity of the third matrix directly stored without compression, and the storage capacity required for the first matrix is ​​the storage capacity of the first matrix directly stored without compression; in other possible implementations, the storage capacity required for the third matrix may be the storage capacity of the third matrix after compression, and the storage capacity required for the first matrix is ​​the storage capacity of the first matrix after compression in the same manner. The compression method of the third matrix or the first matrix may be a variety of different forms of compression, which is not limited here, and the purpose is to reduce storage occupancy.

[0053] In some possible implementations, the nonlinear transformation process may be a reversible nonlinear transformation process. Represents the reversible nonlinear transformation process, Denote the first matrix, represents the above-mentioned multiple third matrices, 1≤i≤n, represents the parameters of the reversible nonlinear transformation process, the decomposition process for the first matrix can be represented by the following formula 1:

[0054] Formula 1;

[0055] That is, when the above-mentioned nonlinear transformation processing is a reversible nonlinear transformation processing, we can analogize the generalized linear model and realize the decomposition of the first matrix based on the generalized linear matrix decomposition method shown in Formula 1, decomposing it into the multiplication of multiple third matrices, and obtain multiple third matrices whose required storage amount is smaller than that of the first matrix, and achieve the effect of reducing the excessive occupation of storage space by storing these multiple third matrices.

[0056] In some possible implementations, the above-mentioned nonlinear transformation processing may not be required to be reversible. In this case, the first matrix may not be decomposed into the multiplication of multiple third matrices. Instead, after performing nonlinear transformation processing on the first matrix, the second matrix obtained by the transformation may be decomposed using a generalized functional relationship to obtain multiple third matrices that can constitute the second matrix based on the generalized functional relationship.

[0057] That is, in this case, after obtaining the second matrix corresponding to the first matrix in step S11, in step S12, decomposing the second matrix to obtain multiple third matrices may include: decomposing the second matrix based on a preset transformation function to obtain multiple third matrices.

[0058] In this case, the multiple third matrices may not be in a multiplication relationship, but may be in a splicing relationship or other association relationship, which is not specifically limited here.

[0059] For example, based on the preset transformation function, the second matrix corresponding to the first matrix can be decomposed into multiple third matrices that can be spliced ​​through a certain functional relationship to construct the second matrix. Represents the preset transformation function, represents the nonlinear transformation process, Represents the parameters of the nonlinear transformation process, Denote the first matrix, represents the above-mentioned multiple third matrices, 1≤i≤n, represents the parameters of the preset transformation function, the decomposition process for the first matrix can be represented by the following formula 2:

[0060] Formula 2.

[0061] The multiple third matrices may be multiple matrices whose total data volume is smaller than the total data volume of the first matrix. In this case, the multiple third matrices may be directly stored to achieve the effect of reducing the excessive occupation of storage space; or, the multiple third matrices may be multiple matrices that can be compressed so that the required storage volume is smaller than the storage volume required for the first matrix. In this case, after obtaining the multiple third matrices, the multiple third matrices may be compressed and then stored to achieve the effect of reducing the excessive occupation of storage space.

[0062] That is, in step S11, when a second matrix satisfying a preset matrix decomposition condition is obtained by performing a nonlinear transformation on the elements in the first matrix, the second matrix can be decomposed to obtain multiple third matrices whose required storage amount is less than the storage amount required for the original first matrix. For example, if the first matrix does not satisfy the low rank condition, data compression cannot be achieved even if SVD decomposition is performed on it. Therefore, a second matrix satisfying the low rank condition can be obtained by performing a nonlinear transformation on the elements in the first matrix, and then a plurality of third matrices that can be compressed can be obtained by performing SVD decomposition on the second matrix, and then the plurality of third matrices that can be compressed can be stored by compressing the data, thereby reducing the excessive occupation of storage space.

[0063] Compared with directly storing the original first matrix, the method of directly storing the plurality of third matrices in the preset storage space can reduce excessive occupation of the storage space and improve the utilization efficiency of the storage space.

[0064] In addition, after storing multiple third matrices corresponding to the first matrix in a preset storage space based on the data storage method for matrices provided in an embodiment of the present disclosure, when the first matrix needs to be used in a subsequent computing task, if the nonlinear transformation processing used is a reversible nonlinear transformation processing, for example, the first matrix is ​​decomposed into the multiple third matrices using the above formula 1, the electronic device can first read the multiple third matrices corresponding to the first matrix from the preset storage space, restore the multiple third matrices to the second matrix corresponding to the first matrix by multiplication, and then restore the first matrix by performing the corresponding inverse nonlinear transformation processing on the elements in the second matrix, so that the computing task can be performed based on the first matrix; or, if the first matrix is ​​decomposed into the second matrix using the above formula 2, and then the second matrix is ​​disassembled using the preset transformation function to obtain multiple third matrices, since the preset transformation function may not be a reversible function, the multiple third matrices can be constructed based on the preset transformation function after reading the third matrix from the preset storage space, for example, a second matrix approximately equal to the first matrix is ​​obtained by splicing, and the second matrix is ​​regarded as the first matrix to perform the computing task, and no special limitation is made here.

[0065] It can be seen that according to the embodiments of the present disclosure, for the first matrix to be stored, it is considered that not only the correlation between the matrix elements can be transformed, but also the values ​​between the elements in the matrix can often be correlated. To this end, the present disclosure performs nonlinear transformation processing on the elements in the first matrix to adjust the correlation between the values ​​of the elements in the matrix, thereby obtaining a second matrix that can meet the preset matrix decomposition conditions. Thereafter, by decomposing the second matrix, a plurality of third matrices whose required storage amount is less than the storage amount required for the first matrix are obtained, and the plurality of third matrices are stored, thereby reducing the amount of data storage and improving the utilization efficiency of the storage space.

[0066] In some possible implementations, in step S11, performing nonlinear transformation processing on the elements in the first matrix to be stored to obtain a second matrix corresponding to the first matrix may include: performing nonlinear transformation processing on any p elements in the first matrix to obtain second transformation elements corresponding to the p elements, where p≥1; and constructing a second matrix based on the second transformation elements.

[0067] In some possible implementations, p may be equal to 1. In this implementation, a second matrix having the same size as the first matrix may be constructed based on the obtained p second transformation elements by performing nonlinear transformation processing on each element in the first matrix one by one; or, in some possible implementations, p may be greater than 1. Of course, p is less than the total number of elements in the first matrix. In this implementation, the p elements in the first matrix may be nonlinearly transformed and mapped to at least one second transformation element to construct the second matrix.

[0068] In some possible implementations, in step S11, performing nonlinear transformation processing on the elements in the first matrix to be stored to obtain a second matrix corresponding to the first matrix may include: inputting the first matrix into a second neural network for processing to obtain the second matrix; wherein the second neural network is a pre-trained neural network for performing nonlinear transformation processing on any q elements in the input matrix to output an output matrix corresponding to the input matrix and satisfying a preset matrix compression condition, q≥1.

[0069] Specifically, the network structure of the second neural network can be set as needed. During the training of the second neural network, the parameters of the second neural network can be determined by optimizing a specific first objective function. For example, when the preset matrix decomposition condition is that the matrix satisfies the low rank condition, the first objective function corresponding to the second neural network can be set during the training of the second neural network, and the first objective function can be optimized during the training process to determine the parameters of the second neural network, so that the output matrix output by the second neural network can meet the preset matrix decomposition condition.

[0070] After the second neural network is trained, the electronic device can obtain the first matrix to be stored and then input the first matrix into the second neural network to obtain a second matrix corresponding to the first matrix that satisfies a preset matrix decomposition condition.

[0071] Figure 2 The flowchart of the data transformation process provided by the embodiment of the present disclosure. Figure 2 In some possible implementations, in step S11, nonlinear transformation processing is performed on the elements in the first matrix to be stored to obtain a second matrix corresponding to the first matrix, including:

[0072] In step S111, a target bit width corresponding to an element in the first matrix is ​​determined;

[0073] In step S112, for each element in the first matrix, the element is represented in binary according to the target bit width to obtain a binary array corresponding to the element and having an array length equal to the target bit width;

[0074] In step S113, the first matrix is ​​tensorized according to the binary array of each element in the first matrix to obtain a third-order tensor corresponding to the first matrix;

[0075] In step S114, a second matrix is ​​obtained based on the third-order tensor.

[0076] Bit width refers to the number of bits occupied by data. In the disclosed embodiment, the target bit width corresponding to the element in the first matrix can be determined according to the data type of the element, and the target bit width can be, for example, 8 bits, 16 bits, 32 bits, etc., which is not specifically limited here.

[0077] Figure 3 A schematic diagram of data transformation processing provided by an embodiment of the present disclosure. Figure 3 From the perspective of computer discrete representation, after determining the bit width of the matrix elements, each element in the matrix can be represented as a binary array of the bit width, that is, a multi-valued matrix, that is, a second-order tensor, can be represented as a binary third-order tensor. For example, Figure 3 In , for a 4×5 multi-valued second-order tensor, each element can be represented in binary to obtain a binary array of each element, thereby constructing a binary array corresponding to the 4×5 elements as shown in the following example: Figure 3 A binary third-rank tensor shown.

[0078] based on Figure 3 As shown, for the first matrix to be stored, it is possible to not only consider the correlation between the elements in the first matrix, but also to construct the first matrix as a third-order tensor by binary representation of its elements, so that the operation dimension of the matrix decomposition can be increased by operating on the values ​​of each element in the first matrix, thereby realizing the transformation of the first matrix to obtain a second matrix that meets the preset matrix decomposition conditions, and then decomposing it to obtain multiple third matrices whose required storage amount is less than the storage amount required for the first matrix.

[0079] Figure 4 A flowchart of constructing a second matrix provided by an embodiment of the present disclosure. Figure 4 In some possible implementations, in step S114, obtaining the second matrix based on the third-order tensor may include:

[0080] In step S1141, for any m elements in the first matrix, nonlinear transformation processing is performed on m binary arrays corresponding to the m elements in the third-order tensor to obtain transformed binary arrays corresponding to the m binary arrays, where m≥1;

[0081] In step S1142, the transformed binary array is represented in a multi-base manner to obtain a first transformed element corresponding to the m elements;

[0082] In step S1143, a second matrix is ​​constructed based on the first transformed elements.

[0083] In some possible implementations, m may be equal to 1. In this implementation, after obtaining the third-order tensor corresponding to the first matrix, the binary arrays corresponding to each element in the first matrix may be subjected to nonlinear transformation processing one by one; or, in some possible implementations, m may be greater than 1. Of course, m is less than the total number of elements in the first matrix. In this implementation, the m elements may be mapped to at least one transformed binary array through nonlinear transformation.

[0084] After obtaining the transformed binary array corresponding to m elements based on step S1141, a multi-base representation can be performed on the first matrix based on the multi-base representation originally used, for example, a decimal representation, to construct a second matrix corresponding to the first matrix and satisfying a preset matrix decomposition condition.

[0085] In some possible implementations, in step S114, obtaining the second matrix based on the third-order tensor may include: inputting the third-order tensor into a first neural network for processing to obtain the second matrix; wherein the first neural network is a pre-trained neural network for performing nonlinear transformation processing on any n binary arrays in the input tensor to output an output matrix corresponding to the input tensor and satisfying a preset matrix decomposition condition, and n≥1.

[0086] Specifically, the network structure of the first neural network can be set as needed. During the training of the first neural network, the parameters of the first neural network can be determined by optimizing a specific second objective function. For example, when the preset matrix decomposition condition is that the matrix satisfies a low-rank condition, the second objective function corresponding to the first neural network can be set during the training of the first neural network, and the second objective function can be optimized during the training process to determine the parameters of the first neural network, so that the output matrix output by the first neural network can meet the preset matrix decomposition condition.

[0087] After the first neural network is trained, the electronic device can obtain a first matrix to be stored and then input the first matrix into the first neural network to obtain a second matrix corresponding to the first matrix that satisfies a preset matrix decomposition condition.

[0088] In some possible implementations, in step S114, obtaining the second matrix based on the third-order tensor may include: performing tensor decomposition on the third-order tensor to obtain multiple decomposition results; and obtaining the second matrix based on the multiple decomposition results.

[0089] In this implementation, the tensor decomposition is performed on the third-order tensor to obtain a plurality of decomposition results, and the third-order tensor may be decomposed using a tensor decomposition algorithm to obtain the plurality of decomposition results.

[0090] For example, the third-order tensor may be subjected to CP decomposition (Canonical Polyadic Decomposition) to obtain three sub-matrices corresponding to the third-order tensor, and then the three sub-matrices are arranged according to certain rules to form the second matrix. Of course, this is only for illustrative purposes, and in actual implementation, other tensor decomposition algorithms may be used to decompose the third-order tensor, and the second matrix may be generated based on the multiple decomposition results obtained, which is not particularly limited here.

[0091] It should be noted that, in some possible implementations, after performing tensor decomposition on the third-order tensor to obtain multiple decomposition results, considering that the storage required for the multiple decomposition results may also be smaller than the storage required for the first matrix corresponding to the third-order tensor, it is also possible to consider no longer generating the second matrix based on the multiple decomposition results, but directly storing the multiple decomposition results in a preset storage space to reduce the storage required for directly storing the first matrix.

[0092] In some possible implementations, the above-mentioned preset matrix decomposition conditions may include that the matrix satisfies a low rank condition or that the matrix satisfies a symmetric positive definite condition; in step S12, decomposing the second matrix to obtain multiple third matrices may include: when the second matrix satisfies the low rank condition, performing a first preset decomposition on the second matrix to obtain multiple third matrices; when the second matrix satisfies the symmetric positive definite condition, performing a second preset decomposition on the second matrix to obtain the multiple third matrices.

[0093] The first preset decomposition may be, for example, SVD decomposition, and the second preset decomposition may be, for example, Cholesky decomposition, or they may be set as required, which is not particularly limited here.

[0094] That is, in the embodiments of the present disclosure, the preset matrix decomposition condition may be, for example, that the matrix satisfies a low-rank condition or satisfies a symmetric positive definite condition. In this embodiment, for example, a first neural network that can be pre-trained and can perform nonlinear transformation processing on any n binary arrays of the input tensor to output an output matrix corresponding to the input tensor and satisfying the low-rank condition or satisfying the symmetric positive definite condition can be output. The third-order tensor corresponding to the first matrix to be stored is input into the first neural network for nonlinear transformation processing to obtain a second matrix that satisfies the low-rank condition or satisfies the symmetric positive definite condition. After that, the second matrix can be subjected to SVD decomposition or Cholesky decomposition, and the multiple matrices obtained by the decomposition can be used as the third matrix corresponding to the first matrix. Since the storage capacity required for the multiple matrices obtained after SVD decomposition or Cholesky decomposition is much smaller than the storage capacity required for the original first matrix, the storage of the multiple matrices instead of the first matrix can reduce the excessive occupation of the storage space, thereby achieving the effect of improving the utilization efficiency of the storage space.

[0095] Of course, in some embodiments, the preset matrix decomposition condition can also be set as needed, for example, the matrix can be a sparse matrix, or the matrix can be a non-negative matrix, so that in text mining, image processing, signal processing, and other settlement tasks, by transforming the first matrix into a second matrix with the characteristic of a non-negative matrix, and by performing NMF decomposition on the second matrix, a plurality of third matrices whose required storage amount is less than the storage amount required for the first matrix can be obtained, thereby reducing the excessive occupation of storage space by storing the plurality of third matrices, and no special limitation is made here.

[0096] Corresponding to the above-mentioned data storage method for a matrix provided in the embodiment of the present disclosure, the embodiment of the present disclosure also provides a data processing method, Figure 5 A flowchart of a data processing method provided by an embodiment of the present disclosure. Figure 5 , the method may include:

[0097] In step S51, when the third neural network performs the target processing task, for the first network layer of the third neural network, a plurality of third matrices corresponding to the first network layer are read from a preset storage space;

[0098] The plurality of third matrices are obtained by processing the first matrix of the first network layer based on the data storage method for the matrix according to the embodiment of the present disclosure, and the first matrix is ​​the weight matrix of the first network layer;

[0099] In step S52, a plurality of third matrices are restored to obtain a second matrix; and nonlinear transformation is performed on the elements in the second matrix to obtain a first matrix;

[0100] In step S53, the input data received by the first network layer and corresponding to the target processing task is processed according to the first matrix to obtain output data of the first network layer.

[0101] The target processing task may be any computing task, for example, an image processing task, a speech processing task, a text processing task, or a video processing task.

[0102] The third neural network can be a neural network with any network structure and including multiple network layers, and the electronic device can perform target processing tasks based on the third neural network.

[0103] That is, according to the embodiments of the present disclosure, when the electronic device performs a target processing task based on the third neural network, for the weight matrix of each network layer of the third neural network, the electronic device can decompose the weight matrix into multiple third matrices based on the data storage method for the matrix provided in the embodiments of the present disclosure and store them in a preset storage space; when performing a target processing task based on the second neural network, the electronic device can read the multiple third matrices from the preset storage space, and restore the weight matrices corresponding to each network layer in the third neural network based on the multiple third matrices, thereby performing the target processing task while making full use of the storage space and improving computing efficiency.

[0104] It can be understood that the above-mentioned various method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not repeat them. It can be understood by those skilled in the art that in the above-mentioned method of the specific implementation method, the specific execution order of each step should be determined according to its function and possible internal logic.

[0105] In addition, the present disclosure also provides a data storage device, a data processing device, an electronic device, and a computer-readable storage medium for a matrix, all of which can be used to implement any data storage method or data processing method for a matrix provided by the present disclosure. The corresponding technical solutions and descriptions are referred to the corresponding records in the method part and will not be repeated here.

[0106] Figure 6 A block diagram of a data storage device for a matrix provided in an embodiment of the present disclosure.

[0107] Reference Figure 6 The embodiment of the present disclosure provides a data storage device for a matrix, which includes: a data transformation module 61, a data decomposition module 62 and a data storage module 63.

[0108] The data transformation module 61 is used to perform nonlinear transformation processing on the elements in the first matrix to be stored to obtain a second matrix corresponding to the first matrix, wherein the second matrix satisfies a preset matrix decomposition condition, and the preset matrix decomposition condition includes that the matrix satisfies a low rank condition or the matrix satisfies a symmetric positive definite condition;

[0109] The data decomposition module 62 is used to decompose the second matrix to obtain a plurality of third matrices, wherein the storage amount required by the plurality of third matrices is less than the storage amount required by the first matrix;

[0110] The data storage module 63 is used to store a plurality of third matrices in a preset storage space.

[0111] In some possible implementations, when the data transformation module 61 performs nonlinear transformation processing on the elements in the first matrix to be stored to obtain a second matrix corresponding to the first matrix, it can be used to:

[0112] Determine the target bit width corresponding to the elements in the first matrix;

[0113] For each element in the first matrix, perform binary representation on the element according to the target bit width to obtain a binary array corresponding to the element and having an array length equal to the target bit width;

[0114] According to the binary array of each element in the first matrix, the first matrix is ​​tensorized to obtain a third-order tensor corresponding to the first matrix;

[0115] Based on the third-order tensor, a second matrix is ​​obtained.

[0116] In some possible implementations, when the data transformation module 61 obtains the second matrix based on the third-order tensor, it can be used to:

[0117] For any m elements in the first matrix, nonlinear transformation processing is performed on m binary arrays corresponding to the m elements in the third-order tensor to obtain transformed binary arrays corresponding to the m binary arrays;

[0118] Performing a multi-base representation on the transformed binary array to obtain a first transformed element corresponding to m elements, where m≥1;

[0119] A second matrix is ​​constructed based on the first transformed elements.

[0120] In some possible implementations, when the data transformation module 61 obtains the second matrix based on the third-order tensor, it can be used to:

[0121] Input the third-order tensor into the first neural network for processing to obtain a second matrix;

[0122] Among them, the first neural network is a pre-trained neural network used to perform nonlinear transformation processing on any n binary arrays in the input tensor to output an output matrix corresponding to the input tensor and satisfying a preset matrix decomposition condition, n≥1.

[0123] In some possible implementations, when the data transformation module 61 obtains the second matrix based on the third-order tensor, it can be used to:

[0124] Perform tensor decomposition on the third-order tensor to obtain multiple decomposition results;

[0125] Based on the multiple decomposition results, a second matrix is ​​obtained.

[0126] In some possible implementations, when the data transformation module 61 performs nonlinear transformation processing on the elements in the first matrix to be stored to obtain a second matrix corresponding to the first matrix, it can be used to:

[0127] Performing nonlinear transformation processing on any p elements in the first matrix to obtain second transformed elements corresponding to the p elements, where p≥1;

[0128] A second matrix is ​​constructed based on the second transformed elements.

[0129] In some possible implementations, when the data transformation module 61 performs nonlinear transformation processing on the elements in the first matrix to be stored to obtain a second matrix corresponding to the first matrix, it can be used to:

[0130] Input the first matrix into the second neural network for processing to obtain a second matrix;

[0131] The second neural network is a pre-trained neural network used to perform nonlinear transformation processing on any q elements in the input matrix to output an output matrix corresponding to the input matrix and satisfying a preset matrix compression condition, q≥1.

[0132] In some possible implementations, when the data decomposition module 62 decomposes the second matrix to obtain multiple third matrices, it can be used to:

[0133] When the second matrix satisfies the low-rank condition, performing a first preset decomposition on the second matrix to obtain a plurality of third matrices; or,

[0134] When the second matrix satisfies a symmetric positive definite condition, a second preset decomposition is performed on the second matrix to obtain a plurality of third matrices.

[0135] In some possible implementations, the data decomposition module 62 decomposes the second matrix to obtain a plurality of third matrices, including: disassembling the second matrix based on a preset transformation function to obtain a plurality of third matrices.

[0136] It can be seen that based on the data storage device for matrices provided in the embodiment of the present disclosure, a nonlinear transformation process is performed on the elements in the first matrix to adjust the correlation between the values ​​of the elements in the matrix, thereby obtaining a second matrix that can meet the preset matrix decomposition conditions. Thereafter, by decomposing the second matrix, a plurality of third matrices whose required storage amount is less than the storage amount required for the first matrix are obtained, and the plurality of third matrices are stored, thereby achieving the effect of reducing the data storage amount and improving the utilization efficiency of the storage space.

[0137] Figure 7 A block diagram of a data processing device provided in an embodiment of the present disclosure.

[0138] Reference Figure 7 The embodiment of the present disclosure provides a data processing device, which includes: a data reading module 71, a data restoration module 72 and a data processing module 73.

[0139] A data reading module 71 is used for reading, for a first network layer of the third neural network, a plurality of third matrices corresponding to the first network layer from a preset storage space when the third neural network performs a target processing task, wherein the plurality of third matrices are obtained by processing the first matrix of the first network layer based on the data storage method of the first aspect, and the first matrix is ​​a weight matrix of the first network layer;

[0140] The data restoration module 72 is used to restore the plurality of third matrices to obtain a second matrix; and perform nonlinear transformation on the elements in the second matrix to obtain a first matrix;

[0141] The data processing module 73 is used to process the input data corresponding to the target processing task received by the first network layer according to the first matrix to obtain the output data of the first network layer.

[0142] Figure 8 A block diagram of an electronic device provided in an embodiment of the present disclosure.

[0143] Reference Figure 8 An embodiment of the present disclosure provides an electronic device, which includes: at least one processor 801; at least one memory 802, and one or more I / O interfaces 803, connected between the processor 801 and the memory 802; wherein the memory 802 stores one or more computer programs that can be executed by the at least one processor 801, and the one or more computer programs are executed by the at least one processor 801, so that the at least one processor 801 can execute the above-mentioned data storage method or data processing method for the matrix.

[0144] In some embodiments, the electronic device may be a brain-like chip, and since the brain-like chip can use vectorized computing and needs to load the weight information and other parameters of the neural network model through an external memory such as a double data rate (DDR) synchronous dynamic random access memory, the batch processing in the disclosed embodiment has a higher computing efficiency.

[0145] The present disclosure also provides a computer-readable storage medium on which a computer program is stored, wherein the computer program implements the above-mentioned data storage method or data processing method for a matrix when executed by a processor / processing core. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.

[0146] The embodiment of the present disclosure also provides a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above-mentioned data storage method or data processing method for the matrix.

[0147] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable storage medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a transient medium).

[0148] As is known to those of ordinary skill in the art, the term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable program instructions, data structures, program modules or other data. Computer storage media include, but are not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technology, portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, as is known to those of ordinary skill in the art, communication media typically contain computer readable program instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0149] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0150] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect through the Internet). In some embodiments, by using the state information of the computer-readable program instructions to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit may execute the computer-readable program instructions, thereby implementing various aspects of the present disclosure.

[0151] The computer program product described herein may be implemented in hardware, software, or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK), etc.

[0152] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of boxes in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0153] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0154] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0155] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0156] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly noted, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Claims

1. A data storage method for a matrix, characterized in that: include: Performing nonlinear transformation processing on elements in the first matrix to be stored to obtain a second matrix corresponding to the first matrix, wherein the second matrix satisfies a preset matrix decomposition condition, and the preset matrix decomposition condition includes that the matrix satisfies a low rank condition or the matrix satisfies a symmetric positive definite condition; Decomposing the second matrix to obtain a plurality of third matrices, wherein a storage amount required by the plurality of third matrices is less than a storage amount required by the first matrix; Storing the plurality of third matrices in a preset storage space; The performing nonlinear transformation processing on the elements in the first matrix to be stored to obtain a second matrix corresponding to the first matrix includes: Performing nonlinear transformation processing on any p elements in the first matrix to obtain second transformed elements corresponding to the p elements, where p≥1; constructing the second matrix based on the second transformed elements; The first matrix to be stored is a matrix required for processing a text mining task, an image processing task or a signal processing task; The step of performing nonlinear transformation on the elements in the first matrix to be stored to obtain a second matrix corresponding to the first matrix includes: Determine a target bit width corresponding to an element in the first matrix; For each element in the first matrix, perform binary representation on the element according to the target bit width to obtain a binary array corresponding to the element and having an array length equal to the target bit width; According to the binary array of each element in the first matrix, the first matrix is ​​tensorized to obtain a third-order tensor corresponding to the first matrix; Based on the third-order tensor, the second matrix is ​​obtained.

2. The method according to claim 1, characterized in that The step of obtaining the second matrix based on the third-order tensor includes: For any m elements in the first matrix, perform nonlinear transformation processing on m binary arrays corresponding to the m elements in the third-order tensor to obtain transformed binary arrays corresponding to the m binary arrays, where m≥1; Performing a multi-base representation on the transformed binary array to obtain a first transformed element corresponding to the m elements; The second matrix is ​​constructed based on the first transformed elements.

3. The method according to claim 1, characterized in that: The step of obtaining the second matrix based on the third-order tensor includes: Performing tensor decomposition on the third-order tensor to obtain multiple decomposition results; Based on the multiple decomposition results, the second matrix is ​​obtained.

4. The method according to claim 1, characterized in that: The step of obtaining the second matrix based on the third-order tensor includes: Inputting the third-order tensor into the first neural network for processing to obtain the second matrix; Among them, the first neural network is a pre-trained neural network used to perform nonlinear transformation processing on any n binary arrays in the input tensor to output an output matrix corresponding to the input tensor and satisfying the preset matrix decomposition condition, n≥1.

5. The method according to claim 1, characterized in that The performing nonlinear transformation processing on the elements in the first matrix to be stored to obtain a second matrix corresponding to the first matrix includes: Inputting the first matrix into a second neural network for processing to obtain the second matrix; The second neural network is a pre-trained neural network used to perform nonlinear transformation processing on any q elements in the input matrix to output an output matrix corresponding to the input matrix and satisfying the preset matrix compression condition, q≥1.

6. The method according to claim 1, characterized in that The step of decomposing the second matrix to obtain a plurality of third matrices includes: When the second matrix satisfies the low-rank condition, performing a first preset decomposition on the second matrix to obtain the multiple third matrices; or, When the second matrix satisfies a symmetric positive definite condition, a second preset decomposition is performed on the second matrix to obtain the multiple third matrices.

7. The method according to claim 1, characterized in that The step of decomposing the second matrix to obtain a plurality of third matrices includes: The second matrix is ​​decomposed based on a preset transformation function to obtain the plurality of third matrices.

8. The method according to any one of claims 1 to 7, characterized in that The first matrix includes a weight matrix of a third neural network.

9. A data processing method, characterized in that: include: In the case where the third neural network performs the target processing task, for the first network layer of the third neural network, multiple third matrices corresponding to the first network layer are read from a preset storage space, wherein the multiple third matrices are obtained by processing the first matrix of the first network layer based on the method according to any one of claims 1 to 8, and the first matrix is ​​a weight matrix of the first network layer; Performing restoration processing on the plurality of third matrices to obtain a second matrix; and performing nonlinear transformation processing on elements in the second matrix to obtain the first matrix; Processing, according to the first matrix, input data received by the first network layer and corresponding to the target processing task to obtain output data of the first network layer; Wherein, the target processing task is a text mining task, an image processing task or a signal processing task.

10. A data storage device for a matrix, characterized in that: include: A data transformation module, configured to perform nonlinear transformation processing on elements in a first matrix to be stored, to obtain a second matrix corresponding to the first matrix, wherein the second matrix satisfies a preset matrix decomposition condition, and the preset matrix decomposition condition includes that the matrix satisfies a low-rank condition or the matrix satisfies a symmetric positive definite condition; A data decomposition module, used for decomposing the second matrix to obtain a plurality of third matrices, wherein the storage amount required by the plurality of third matrices is less than the storage amount required by the first matrix; A data storage module, used for storing the plurality of third matrices in a preset storage space; The data transformation module is specifically used to perform nonlinear transformation processing on any p elements in the first matrix to obtain second transformation elements corresponding to the p elements, wherein p≥1; and construct the second matrix based on the second transformation elements; The first matrix to be stored is a matrix required for processing a text mining task, an image processing task or a signal processing task; The step of performing nonlinear transformation on the elements in the first matrix to be stored to obtain a second matrix corresponding to the first matrix includes: Determine a target bit width corresponding to an element in the first matrix; For each element in the first matrix, perform binary representation on the element according to the target bit width to obtain a binary array corresponding to the element and having an array length equal to the target bit width; According to the binary array of each element in the first matrix, the first matrix is ​​tensorized to obtain a third-order tensor corresponding to the first matrix; Based on the third-order tensor, the second matrix is ​​obtained.

11. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs executable by the at least one processor, and the one or more computer programs are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.

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