A user interface switching method, wherein the method is used for a terminal, a client application, CA, runs on the terminal, a rich execution environment and a trusted execution environment are deployed on the terminal, and the method comprises: triggering a trusted user interface, TUI, display request of the CA according to a first operation on a CA interface of the CA by a user, wherein the CA interface is a user interface that is of the CA and that is in the rich execution environment; switching a display environment of the CA from the rich execution environment to the trusted execution environment according to the TUI display request; and displaying a trusted application, TA, interface that is of the CA and that is in the trusted execution environment, wherein the TA interface is used by the user of the terminal to input personal information. wherein the terminal comprises a display-related hardware device, the display-related hardware device is configured to display the CA interface and the TA interface, and the switching a display environment of the CA from the rich execution environment to the trusted execution environment according to the TUI display request comprises: controlling, according to the TUI display request of the CA by using a driver that is of the hardware device and that is in the rich execution environment, the hardware device to exit a current non-secure mode, wherein the non-secure mode is a running mode that corresponds to the hardware device and that is in the rich execution environment; and controlling, according to first switching information by using a driver that is of the hardware device and that is in the trusted execution environment, the hardware device to enter a secure mode, wherein the first switching information is used to indicate that the hardware device has exited the non-secure mode, and the secure mode is a running mode that corresponds to the hardware device and that is in the trusted execution environment. triggering a trusted user interface, TUI, display request of the CA according to a first operation on a CA interface of the CA by a user, wherein the CA interface is a user interface that is of the CA and that is in the rich execution environment; switching a display environment of the CA from the rich execution environment to the trusted execution environment according to the TUI display request; and displaying a trusted application, TA, interface that is of the CA and that is in the trusted execution environment, wherein the TA interface is used by the user of the terminal to input personal information. wherein the terminal comprises a display-related hardware device, the display-related hardware device is configured to display the CA interface and the TA interface, and the switching a display environment of the CA from the rich execution environment to the trusted execution environment according to the TUI display request comprises: controlling, according to the TUI display request of the CA by using a driver that is of the hardware device and that is in the rich execution environment, the hardware device to exit a current non-secure mode, wherein the non-secure mode is a running mode that corresponds to the hardware device and that is in the rich execution environment; and controlling, according to first switching information by using a driver that is of the hardware device and that is in the trusted execution environment, the hardware device to enter a secure mode, wherein the first switching information is used to indicate that the hardware device has exited the non-secure mode, and the secure mode is a running mode that corresponds to the hardware device and that is in the trusted execution environment. controlling, according to the TUI display request of the CA by using a driver that is of the hardware device and that is in the rich execution environment, the hardware device to exit a current non-secure mode, wherein the non-secure mode is a running mode that corresponds to the hardware device and that is in the rich execution environment; and controlling, according to first switching information by using a driver that is of the hardware device and that is in the trusted execution environment, the hardware device to enter a secure mode, wherein the first switching information is used to indicate that the hardware device has exited the non-secure mode, and the secure mode is a running mode that corresponds to the hardware device and that is in the trusted execution environment.