A method for pre-processing data, comprising: obtaining an available storage capacity of a primary memory, an available storage capacity of a secondary memory, and a target operation to be performed by a processor, determining target input data corresponding to the target operation according to the available storage capacity of the primary memory, the available storage capacity of the secondary memory, and the target operation, wherein the target input data is part or all of input data corresponding to the target operation; determining target output data corresponding to the target operation according to the target operation and the target input data; and storing, if the target output data of the target operation is input data of another operation after the target operation, the target output data of the target operation into the primary memory; wherein the target operation includes multiple sub-target operations, and each sub-target operation corresponds to sub-target input data; and the determining the target input data corresponding to the target operation according to the available storage capacity of the primary memory and the target operation includes: determining a count of operations that can be fused and obtaining a threshold of a count of fusion according to the available storage capacities of the memories and a fusion attribute of each operation to be processed, wherein, the fusion attribute of each operation includes the data dependency relationship between the input data and/or the output data involved in each operation; taking a certain count of combinations of the operations that can be fused as the target operation, where the certain count is less than or equal to the threshold of the count of fusion; and taking sub-target input data corresponding to the certain count of operations that can be fused as the target input data corresponding to the target operation. obtaining an available storage capacity of a primary memory, an available storage capacity of a secondary memory, and a target operation to be performed by a processor, determining target input data corresponding to the target operation according to the available storage capacity of the primary memory, the available storage capacity of the secondary memory, and the target operation, wherein the target input data is part or all of input data corresponding to the target operation; determining target output data corresponding to the target operation according to the target operation and the target input data; and storing, if the target output data of the target operation is input data of another operation after the target operation, the target output data of the target operation into the primary memory; wherein the target operation includes multiple sub-target operations, and each sub-target operation corresponds to sub-target input data; and the determining the target input data corresponding to the target operation according to the available storage capacity of the primary memory and the target operation includes: determining a count of operations that can be fused and obtaining a threshold of a count of fusion according to the available storage capacities of the memories and a fusion attribute of each operation to be processed, wherein, the fusion attribute of each operation includes the data dependency relationship between the input data and/or the output data involved in each operation; taking a certain count of combinations of the operations that can be fused as the target operation, where the certain count is less than or equal to the threshold of the count of fusion; and taking sub-target input data corresponding to the certain count of operations that can be fused as the target input data corresponding to the target operation. determining a count of operations that can be fused and obtaining a threshold of a count of fusion according to the available storage capacities of the memories and a fusion attribute of each operation to be processed, wherein, the fusion attribute of each operation includes the data dependency relationship between the input data and/or the output data involved in each operation; taking a certain count of combinations of the operations that can be fused as the target operation, where the certain count is less than or equal to the threshold of the count of fusion; and taking sub-target input data corresponding to the certain count of operations that can be fused as the target input data corresponding to the target operation.