An application interface migration system, wherein the application interface migration system comprises a first electronic device and a second electronic device, wherein the first electronic device is configured to: generate a migration instruction for a target application by using a first distributed service, wherein the migration instruction is used to indicate to migrate a user interface UI state of the target application to the second electronic device; in response to the migration instruction, select UI binding data from a shared data segment of the target application based on scenario information of the first electronic device, wherein data in the shared data segment is used for migration of the UI state, and the UI binding data is bound to a component of the target application; obtain page routing data of the target application, wherein the page routing data is used to record uniform resource identifier, URI, information of a page of the target application; process the UI binding data and the page routing data to obtain to-be-migrated data; and send, to the second electronic device by using the first distributed service, a recovery instruction that carries the to-be-migrated data; and the second electronic device is configured to: receive the recovery instruction by using a second distributed service, wherein the recovery instruction is used to indicate to recover the UI state of the target application on the second electronic device, the recovery instruction carries the to-be-migrated data, and the to-be-migrated data comprises the page routing data and the UI binding data; in response to the recovery instruction, generate a recovery routing stack based on the page routing data, and load a first page based on the recovery routing stack and a current page routing stack of the second electronic device; check compatibility of the UI binding data based on a declaration field corresponding to scenario information of the second electronic device, wherein the scenario information comprises a device type, a screen form, and/or any configuration information; store the UI binding data in the shared data segment of the target application if the compatibility of the UI binding data is successfully checked; and refresh a component view that is on the first page and that is related to the UI binding data. the first electronic device is configured to: generate a migration instruction for a target application by using a first distributed service, wherein the migration instruction is used to indicate to migrate a user interface UI state of the target application to the second electronic device; in response to the migration instruction, select UI binding data from a shared data segment of the target application based on scenario information of the first electronic device, wherein data in the shared data segment is used for migration of the UI state, and the UI binding data is bound to a component of the target application; obtain page routing data of the target application, wherein the page routing data is used to record uniform resource identifier, URI, information of a page of the target application; process the UI binding data and the page routing data to obtain to-be-migrated data; and send, to the second electronic device by using the first distributed service, a recovery instruction that carries the to-be-migrated data; and the second electronic device is configured to: receive the recovery instruction by using a second distributed service, wherein the recovery instruction is used to indicate to recover the UI state of the target application on the second electronic device, the recovery instruction carries the to-be-migrated data, and the to-be-migrated data comprises the page routing data and the UI binding data; in response to the recovery instruction, generate a recovery routing stack based on the page routing data, and load a first page based on the recovery routing stack and a current page routing stack of the second electronic device; check compatibility of the UI binding data based on a declaration field corresponding to scenario information of the second electronic device, wherein the scenario information comprises a device type, a screen form, and/or any configuration information; store the UI binding data in the shared data segment of the target application if the compatibility of the UI binding data is successfully checked; and refresh a component view that is on the first page and that is related to the UI binding data.