A data swapping method, applied to a host, wherein an operating system and a target application are installed on the host, the operating system comprises user space, a user interface of the target application is disposed in the user space, the user interface corresponds to one storage device, and the method comprises: obtaining a swap request of the target application, wherein the swap request is a swap-in request or a swap-out request, the swap-out request is used to request to write data of the target application from a memory of the host to the storage device, and the swap-in request is used to request to write data in the storage device to the memory; and calling, based on the swap request, the user interface to perform an operation on the storage device; characterized in that: before the obtaining a swap request of the target application, the data swapping method further comprises: after the target application is started, establishing a swap-out thread and a swap-in thread, wherein the swap-out thread is used to perform a swap-out operation of the first data, and the swap-in thread is used to perform a swap-in operation of the second data; and in that: the establishing a swap-out thread and a swap-in thread comprises: when the target application is comprised in a pre-stored trustlist, establishing the swap-out thread and the swap-in thread, wherein the trustlist comprises at least one application that supports memory swapping. obtaining a swap request of the target application, wherein the swap request is a swap-in request or a swap-out request, the swap-out request is used to request to write data of the target application from a memory of the host to the storage device, and the swap-in request is used to request to write data in the storage device to the memory; and calling, based on the swap request, the user interface to perform an operation on the storage device; characterized in that: before the obtaining a swap request of the target application, the data swapping method further comprises: after the target application is started, establishing a swap-out thread and a swap-in thread, wherein the swap-out thread is used to perform a swap-out operation of the first data, and the swap-in thread is used to perform a swap-in operation of the second data; and in that: the establishing a swap-out thread and a swap-in thread comprises: when the target application is comprised in a pre-stored trustlist, establishing the swap-out thread and the swap-in thread, wherein the trustlist comprises at least one application that supports memory swapping. before the obtaining a swap request of the target application, the data swapping method further comprises: after the target application is started, establishing a swap-out thread and a swap-in thread, wherein the swap-out thread is used to perform a swap-out operation of the first data, and the swap-in thread is used to perform a swap-in operation of the second data; and in that: the establishing a swap-out thread and a swap-in thread comprises: when the target application is comprised in a pre-stored trustlist, establishing the swap-out thread and the swap-in thread, wherein the trustlist comprises at least one application that supports memory swapping.