A method for data processing, comprising: sending, by a terminal-side device (110, 740, 900, 1000, 1310), a request message to a cloud-side device (120, 710, 1100, 1200, 1320) under the following condition: a hardware resource required when a neural network model on the terminal-side device that is used to process a cognitive computing task runs exceeds an available hardware resource capability of the terminal-side device, wherein the request message is used to request a neural network model used to process the cognitive computing task and wherein the request message further carries indication information used to indicate the available hardware resource capability of the terminal-side device (110, 740, 900, 1000, 1310); receiving, by a cloud-side device (120, 710, 1100, 1200, 1320), the request message sent by a terminal-side device (110, 740, 900, 1000, 1310); determining, by the cloud-side device (120, 710, 1100, 1200, 1320) based on the request message, a first neural network model used to process the cognitive computing task; trimming, by the cloud-side device (120, 710, 1100, 1200, 1320), based on the available hardware resource capability of the terminal-side device, the first neural network model to obtain a second neural network model, so that the hardware resource required when the second neural network model runs is within the available hardware resource capability range of the terminal-side device (110, 740, 900, 1000, 1310); and sending, by the cloud-side device (120, 710, 1100, 1200, 1320), the second neural network model to the terminal-side device (110, 740, 900, 1000, 1310), so that the terminal-side device processes the cognitive computing task based on the second neural network model. receiving, by the terminal-side device (110, 740, 900, 1000, 1310), the second neural network model; and processing, by the terminal-side device (110, 740, 900, 1000, 1310), the cognitive computing task based on the second neural network model. a hardware resource required when a neural network model on the terminal-side device that is used to process a cognitive computing task runs exceeds an available hardware resource capability of the terminal-side device, wherein the request message is used to request a neural network model used to process the cognitive computing task and wherein the request message further carries indication information used to indicate the available hardware resource capability of the terminal-side device (110, 740, 900, 1000, 1310); receiving, by a cloud-side device (120, 710, 1100, 1200, 1320), the request message sent by a terminal-side device (110, 740, 900, 1000, 1310); determining, by the cloud-side device (120, 710, 1100, 1200, 1320) based on the request message, a first neural network model used to process the cognitive computing task; trimming, by the cloud-side device (120, 710, 1100, 1200, 1320), based on the available hardware resource capability of the terminal-side device, the first neural network model to obtain a second neural network model, so that the hardware resource required when the second neural network model runs is within the available hardware resource capability range of the terminal-side device (110, 740, 900, 1000, 1310); and sending, by the cloud-side device (120, 710, 1100, 1200, 1320), the second neural network model to the terminal-side device (110, 740, 900, 1000, 1310), so that the terminal-side device processes the cognitive computing task based on the second neural network model. receiving, by the terminal-side device (110, 740, 900, 1000, 1310), the second neural network model; and processing, by the terminal-side device (110, 740, 900, 1000, 1310), the cognitive computing task based on the second neural network model.