Data processing method and electronic device

The method securely transfers account login states between devices by using a cloud server to authenticate the second terminal device, addressing security risks and enhancing data replication completeness during device changes.

CN117641359BActive Publication Date: 2025-03-21HONOR DEVICE CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210988235.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-17
Publication Date
2025-03-21
Estimated Expiration
2042-08-17

AI Technical Summary

Technical Problem

Current technologies lack the ability to securely transfer and migrate account login states between devices, leading to incomplete data replication during device changes, as direct account data transfer poses high security risks.

Method used

A method involving a first terminal device obtaining the second terminal device's identification and network password information, requesting a token from a cloud server, and using this token to authenticate the second device, allowing secure login state transfer without direct data transmission.

Benefits of technology

Enhances data replication completeness and security during device changes by securely transferring account login states between devices through cloud server authentication, reducing user intervention and data risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117641359B_ABST
    Figure CN117641359B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a data processing method and an electronic device, which relate to the field of terminal technology, and the method includes: obtaining identification information of a second terminal device and password information of a local area network of the second terminal device. Sending a token acquisition request to a cloud server. Receive a first token sent by the cloud server. According to the password information, a first token is sent to the second terminal device, and the first token is used by the second terminal device to initiate a verification request to the cloud server to log in to a first account in a first application. In this implementation, with the assistance of the cloud server, the verification of the second terminal device logging in to the first account is completed, so that the login status of the account can be copied from the first terminal device to the second terminal device, so as to effectively enhance the comprehensiveness of data replication during the machine change process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a data processing method and an electronic device. Background Art

[0002] Under current technology, terminal devices are updated and replaced at a relatively fast speed. When a user replaces a terminal device, it is usually necessary to copy the data in the old terminal device to the new terminal device.

[0003] Currently, there are applications that support data replication between old and new devices. These applications can support the replication of most local data in the device, such as pictures, videos, text messages, applications, etc. However, as applications are gradually cloud-based, the data of many applications are currently stored in the corresponding cloud. After logging in to the user's account in the application, the corresponding data can be obtained from the cloud.

[0004] However, due to the high security of accounts, the risk of directly transmitting account data between devices is relatively high, so current technology does not support the migration of account data. Summary of the invention

[0005] The present application provides a data processing method and an electronic device, which can, with the assistance of a cloud server, complete the verification of a second terminal device logging into a first account, so that the login status of the account can be copied from the first terminal device to the second terminal device, so as to effectively enhance the comprehensiveness of data replication during the device change process.

[0006] In a first aspect, an embodiment of the present application provides a data processing method, which is applied to a first terminal device, and the method includes:

[0007] Acquire identification information of a second terminal device and password information of a local area network of the second terminal device, wherein a first account is logged in to a first application of the first terminal device;

[0008] Sending a token acquisition request to a cloud server, wherein the token acquisition request carries the identification information, and the token acquisition request is used to request the cloud server to generate a first token corresponding to the first account and establish a corresponding relationship between the first token and the identification information;

[0009] Receiving the first token sent by the cloud server;

[0010] The first token is sent to the second terminal device according to the password information, and the first token is used by the second terminal device to initiate a verification request to the cloud server for logging into the first account in the first application.

[0011] In this implementation, a token acquisition request is sent to the cloud server, so that the cloud server generates a first token corresponding to the first account logged in by the first terminal device, and creates a correspondence between the first token and the identification information of the second terminal device, thereby informing the cloud server that the second terminal device may log in to the first account later, and then sending the first token to the second terminal device, so that the second terminal device initiates a verification request to log in to the first application to the cloud server according to the first token, so that with the assistance of the cloud server, the verification of the second terminal device logging into the first account can be completed, so that the login status of the account can be copied from the first terminal device to the second terminal device, so as to effectively enhance the comprehensiveness of data replication during the device change process.

[0012] In one possible implementation, when the first terminal device sends the first token to the second terminal device according to the password information, it can generate a key according to the password information, encrypt the first token according to the key, and then send the encrypted first token to the second terminal device.

[0013] Because both the first terminal device and the second terminal device hold the password information, the encryption performed by the first terminal device can be effectively guaranteed, and the corresponding decryption can be achieved on the second terminal device side. At the same time, the first terminal device and the second terminal device no longer need to transmit keys, which can further improve the security of data transmission.

[0014] In a possible implementation, the method further includes:

[0015] Calling a data interface of the first terminal device to access a first application in the first terminal device;

[0016] In the first application, obtaining account data corresponding to the first account;

[0017] The account data is encrypted according to the key, and the encrypted account data is sent to the second terminal device.

[0018] By directly transmitting the account data to the second terminal device through the local area network between the first terminal device and the second terminal device, it is possible to avoid the need for the second terminal device to obtain the account data from the cloud later, thereby effectively improving the data replication integrity during the device replacement process.

[0019] In a possible implementation, before sending the first token to the second terminal device according to the password information, the method further includes:

[0020] Obtaining name information of the local area network of the second terminal device;

[0021] A local area network connection is established with the second terminal device according to the name information and the password information, and the local area network connection is used to transmit the first token and / or the account data.

[0022] In a possible implementation, the token acquisition request also carries an access token of the first terminal device, and the access token includes identification information of the first account; the access token is used by the cloud server to verify the first terminal device.

[0023] In this implementation, it can be effectively ensured that the cloud server can verify the first terminal device and can also determine for which account the first token is created.

[0024] In a possible implementation, the acquiring identification information of the second terminal device and password information of the local area network of the second terminal device includes:

[0025] capturing an image of the identification code displayed on the graphical user interface of the second terminal device;

[0026] The image of the identification code is parsed to obtain identification information of the second terminal device and password information of the local area network of the second terminal device.

[0027] In this process, there is no need to establish a data transmission channel, and synchronization of the identification information of the second terminal device and the password information of the local area network of the second terminal device is completed between the first terminal device and the second terminal device.

[0028] In a possible implementation, the method further includes:

[0029] After the login status of the first application in the second terminal device is updated to "logged in", login status update information sent by the second terminal device is received.

[0030] In this implementation, the login status of the first application in the second terminal device can be synchronized to the first terminal device quickly and effectively.

[0031] In a second aspect, an embodiment of the present application provides a data processing method, which is applied to a second terminal device, and the method includes:

[0032] Obtaining a first token sent by a first terminal device;

[0033] Sending a verification request to a cloud server, wherein the verification request includes the first token and the identification information of the second terminal device, and the verification request is used to request the cloud server to verify whether there is a corresponding relationship between the first token and the identification information of the second terminal device;

[0034] After the verification is passed, an access token sent by the cloud server is received, and according to the access token, a first application in the second terminal device is triggered to log in to the first account.

[0035] In this implementation, a verification request is sent to the cloud server based on the first token sent by the first terminal device, and the verification request also includes identification information of the second terminal device, so that the cloud server verifies whether the second terminal device can log in to the first account. After the verification is passed, the second terminal device logs in to the first account in the first application according to the access token sent by the cloud server. In this way, the account login status in the first terminal device can be effectively and securely copied to the second terminal device under the verification of the cloud server, thereby effectively improving the comprehensiveness of data replication during the machine replacement process.

[0036] In a possible implementation manner, the acquiring the first token sent by the first terminal device includes:

[0037] The encrypted first token sent by the first terminal device is received, and a key is generated according to the password information of the local area network of the second terminal device, and then the encrypted first token is decrypted according to the key to obtain the first token.

[0038] In a possible implementation, the method further includes:

[0039] Receiving the encrypted account data sent by the first terminal device;

[0040] The encrypted account data is decrypted according to the key to obtain the account data.

[0041] In a possible implementation, the access token includes identification information of the first account.

[0042] In a possible implementation manner, before obtaining the first token sent by the first terminal device, the method further includes:

[0043] A local area network connection is established with the first terminal device according to the name information of the local area network of the second terminal device and the password information, and the local area network connection is used to transmit the first token and / or the account data.

[0044] In a possible implementation manner, before obtaining the first token sent by the first terminal device, the method further includes:

[0045] generating an identification code according to the identification information of the second terminal device and the password information of the local area network of the second terminal device;

[0046] An image of the identification code is displayed on the graphical user interface of the second terminal device.

[0047] In a possible implementation, after triggering the first application in the second terminal device to log in to the first account according to the access token, the method further includes:

[0048] Login status update information is sent to the second terminal device, where the login status update information is used to indicate that the login status of the first application in the second terminal device is logged in.

[0049] In a third aspect, an embodiment of the present application provides a data processing device, which may be a terminal device, or a chip or chip system in a terminal device. The data processing device may include a display unit and a processing unit. When the data processing device is a terminal device, the display unit may be a display screen. The display unit is used to perform the display step so that the terminal device implements a data processing method described in the first aspect or any possible implementation of the first aspect. When the data processing device is a terminal device, the processing unit may be a processor. The data processing device may also include a storage unit, which may be a memory. The storage unit is used to store instructions, and the processing unit executes the instructions stored in the storage unit so that the terminal device implements a mailing method described in the first aspect or any possible implementation of the first aspect. When the data processing device is a chip or chip system in a terminal device, the processing unit may be a processor. The processing unit executes the instructions stored in the storage unit so that the terminal device implements a mailing method described in the first aspect or any possible implementation of the first aspect. The storage unit may be a storage unit within the chip (eg, a register, a cache, etc.), or a storage unit within the terminal device that is located outside the chip (eg, a read-only memory, a random access memory, etc.).

[0050] Exemplarily, a processing unit is used to obtain identification information of a second terminal device and password information of a local area network of the second terminal device, where a first account is logged in to a first application of the first terminal device; send a token acquisition request to a cloud server, where the token acquisition request carries the identification information, and the token acquisition request is used to request the cloud server to generate a first token corresponding to the first account and establish a corresponding relationship between the first token and the identification information; receive the first token sent by the cloud server; and send the first token to the second terminal device based on the password information, where the first token is used by the second terminal device to initiate a verification request to the cloud server to log in to the first account in the first application.

[0051] In a possible implementation manner, the processing unit is specifically configured to:

[0052] Generate a key according to the password information;

[0053] encrypting the first token according to the key;

[0054] Send the encrypted first token to the second terminal device.

[0055] In a possible implementation manner, the processing unit is further configured to:

[0056] Calling a data interface of the first terminal device to access a first application in the first terminal device;

[0057] In the first application, obtaining account data corresponding to the first account;

[0058] The account data is encrypted according to the key, and the encrypted account data is sent to the second terminal device.

[0059] In a possible implementation manner, the processing unit is further configured to:

[0060] Before sending the first token to the second terminal device according to the password information, obtaining the name information of the local area network of the second terminal device;

[0061] A local area network connection is established with the second terminal device according to the name information and the password information, and the local area network connection is used to transmit the first token and / or the account data.

[0062] In a possible implementation, the token acquisition request also carries an access token of the first terminal device, and the access token includes identification information of the first account;

[0063] The access token is used by the cloud server to verify the first terminal device.

[0064] In a possible implementation manner, the processing unit is specifically configured to:

[0065] capturing an image of the identification code displayed on the graphical user interface of the second terminal device;

[0066] The image of the identification code is parsed to obtain identification information of the second terminal device and password information of the local area network of the second terminal device.

[0067] In a possible implementation manner, the processing unit is further configured to:

[0068] After the login status of the first application in the second terminal device is updated to "logged in", login status update information sent by the second terminal device is received.

[0069] In a fourth aspect, an embodiment of the present application provides a data processing device, which may be a terminal device, or a chip or chip system in a terminal device. The data processing device may include a display unit and a processing unit. When the data processing device is a terminal device, the display unit may be a display screen. The display unit is used to perform the display step so that the terminal device implements a mailing method described in the first aspect or any possible implementation of the first aspect. When the data processing device is a terminal device, the processing unit may be a processor. The data processing device may also include a storage unit, which may be a memory. The storage unit is used to store instructions, and the processing unit executes the instructions stored in the storage unit so that the terminal device implements a mailing method described in the first aspect or any possible implementation of the first aspect. When the data processing device is a chip or chip system in a terminal device, the processing unit may be a processor. The processing unit executes the instructions stored in the storage unit so that the terminal device implements a mailing method described in the first aspect or any possible implementation of the first aspect. The storage unit may be a storage unit within the chip (eg, a register, a cache, etc.), or a storage unit within the terminal device that is located outside the chip (eg, a read-only memory, a random access memory, etc.).

[0070] Exemplarily, a processing unit is used to obtain a first token sent by a first terminal device; send a verification request to a cloud server, the verification request including the first token and identification information of a second terminal device, the verification request being used to request the cloud server to verify whether there is a corresponding relationship between the first token and the identification information of the second terminal device; after the verification is passed, receive an access token sent by the cloud server, and based on the access token, trigger a first application in the second terminal device to log in to the first account.

[0071] In a possible implementation manner, the processing unit is specifically configured to:

[0072] Receiving the encrypted first token sent by the first terminal device;

[0073] Generate a key according to the password information of the local area network of the second terminal device;

[0074] The encrypted first token is decrypted according to the key to obtain the first token.

[0075] In a possible implementation manner, the processing unit is further configured to:

[0076] Receiving the encrypted account data sent by the first terminal device;

[0077] The encrypted account data is decrypted according to the key to obtain the account data.

[0078] In a possible implementation, the access token includes identification information of the first account.

[0079] In a possible implementation manner, the processing unit is further configured to:

[0080] Before obtaining the first token sent by the first terminal device, a local area network connection is established with the first terminal device according to the name information of the local area network of the second terminal device and the password information, and the local area network connection is used to transmit the first token and / or the account data.

[0081] In a possible implementation, the processing unit is further configured to: generate an identification code according to identification information of the second terminal device and password information of a local area network of the second terminal device before acquiring the first token sent by the first terminal device;

[0082] A display unit is used to display the image of the identification code on a graphical user interface of the second terminal device.

[0083] In one possible implementation, the processing unit is also used to: after triggering the first application in the second terminal device to log in to the first account according to the access token, send login status update information to the first terminal device, and the login status update information is used to indicate that the login status of the first application in the second terminal device is logged in.

[0084] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a display screen and an interface circuit, the interface circuit being used to communicate with other devices; the display screen being used to execute display steps; and the processor being used to run code instructions to implement any method in the first aspect or any possible implementation method of the first aspect.

[0085] In the sixth aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a display screen and an interface circuit, the interface circuit being used to communicate with other devices; the display screen being used to execute display steps; and the processor being used to run code instructions to implement any method in the second aspect or any possible implementation method of the second aspect.

[0086] In the seventh aspect, an embodiment of the present application provides a computer-readable storage medium, which stores instructions. When the instructions are executed, any method in the first aspect or any possible implementation of the first aspect, or the second aspect or any possible implementation of the second aspect is implemented.

[0087] It should be understood that the second to seventh aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0088] Figure 1 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application;

[0089] Figure 2 A schematic diagram of implementing data transmission between new and old devices provided in an embodiment of the present application;

[0090] Figure 3 The process of the data processing method provided in the embodiment of the present application Figure 1 ;

[0091] Figure 4 The process of the data processing method provided in the embodiment of the present application Figure 2 ;

[0092] Figure 5 A schematic diagram of the implementation of collecting identification code images provided in an embodiment of the present application;

[0093] Figure 6A schematic diagram of implementing a token acquisition request provided in an embodiment of the present application;

[0094] Figure 7 A schematic diagram of implementing the transmission of a first token provided in an embodiment of the present application;

[0095] Figure 8 The process of the data processing method provided in the embodiment of the present application Figure 3 ;

[0096] Fig. 9 The process of the data processing method provided in the embodiment of the present application Figure 4 ;

[0097] Fig.10 A system diagram of a data processing method provided in an embodiment of the present application;

[0098] Fig.11 A signaling interaction diagram of a data processing method provided in an embodiment of the present application;

[0099] Fig.12 A schematic diagram of implementing data replication provided in an embodiment of the present application;

[0100] Fig.13 A schematic diagram of implementing the replication of the first account login status provided in an embodiment of the present application;

[0101] Fig.14 A schematic diagram of the structure of the data processing device provided in the embodiment of the present application Figure 1 ;

[0102] Fig.15 A schematic diagram of the structure of the data processing device provided in the embodiment of the present application Figure 2 ;

[0103] Fig.16 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0104] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish between the same items or similar items with substantially the same functions and effects. For example, the interface of the first target function and the interface of the second target function are to distinguish between different response interfaces, and their order of precedence is not limited. Those skilled in the art can understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not necessarily limit them to be different.

[0105] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0106] Electronic devices include terminal devices, which may also be referred to as terminals, user equipment (UE), mobile stations (MS), mobile terminals (MT), etc. Terminal devices may be mobile phones, smart TVs, wearable devices, tablet computers (Pad), computers with wireless transceiver functions, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, etc. The embodiments of the present application do not limit the specific technology and specific device form used by the terminal devices.

[0107] In order to better understand the embodiment of the present application, the structure of the terminal device in the embodiment of the present application is introduced below:

[0108] Figure 1The structure diagram of the terminal device 100 is shown. The terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0109] It is understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0110] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0111] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0112] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0113] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuits sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0114] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the terminal device 100.

[0115] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.

[0116] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to implement the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0117] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.

[0118] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the terminal device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the terminal device 100.

[0119] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0120] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the terminal device 100, and can also be used to transmit data between the terminal device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.

[0121] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is a schematic illustration and does not constitute a structural limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0122] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the terminal device 100. While the charging management module 140 is charging the battery 142, it may also power the terminal device through the power management module 141.

[0123] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0124] The wireless communication function of the terminal device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0125] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The antenna in terminal device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0126] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the terminal device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0127] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0128] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the terminal device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0129] In some embodiments, the antenna 1 of the terminal device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the terminal device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. GNSS may include the global positioning system (GPS), the global navigation satellite system (GLONASS), the Beidou navigation satellite system (BDS), the quasi-zenith satellite system (QZSS) and / or the satellite based augmentation system (SBAS).

[0130] The terminal device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.

[0131] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the terminal device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0132] The terminal device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0133] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0134] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the terminal device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0135] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the terminal device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0136] Video codecs are used to compress or decompress digital videos. The terminal device 100 may support one or more video codecs. Thus, the terminal device 100 may play or record videos in various coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0137] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of the terminal device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0138] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0139] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the terminal device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the terminal device 100 by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor.

[0140] The terminal device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0141] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0142] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The terminal device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0143] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the terminal device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the ear.

[0144] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The terminal device 100 can be provided with at least one microphone 170C. In other embodiments, the terminal device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the terminal device 100 can also be provided with three, four or more microphones 170C to realize the collection of sound signals, noise reduction, identification of sound sources, realization of directional recording function, etc.

[0145] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130, or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0146] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The terminal device 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 194, the terminal device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The terminal device 100 can also calculate the position of the touch based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions.

[0147] The gyroscope sensor 180B can be used to determine the motion posture of the terminal device 100. In some embodiments, the angular velocity of the terminal device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the terminal device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the terminal device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.

[0148] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.

[0149] The magnetic sensor 180D includes a Hall sensor. The terminal device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the terminal device 100 is a flip phone, the terminal device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover automatic unlocking and other features are set.

[0150] The acceleration sensor 180E can detect the magnitude of the acceleration of the terminal device 100 in all directions (generally three axes). When the terminal device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the terminal device and applied to applications such as horizontal and vertical screen switching and pedometers.

[0151] The distance sensor 180F is used to measure the distance. The terminal device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the terminal device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.

[0152] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The terminal device 100 emits infrared light outward through the light emitting diode. The terminal device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the terminal device 100. When insufficient reflected light is detected, the terminal device 100 can determine that there is no object near the terminal device 100. The terminal device 100 can use the proximity light sensor 180G to detect that the user holds the terminal device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode, and pocket mode automatically unlocks and locks the screen.

[0153] The ambient light sensor 180L is used to sense the ambient light brightness. The terminal device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the terminal device 100 is in a pocket to prevent accidental touch.

[0154] The fingerprint sensor 180H is used to collect fingerprints. The terminal device 100 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0155] The temperature sensor 180J is used to detect temperature. In some embodiments, the terminal device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the terminal device 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the terminal device 100 heats the battery 142 to avoid abnormal shutdown of the terminal device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the terminal device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.

[0156] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the terminal device 100, which is different from the position of the display screen 194.

[0157] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.

[0158] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The terminal device 100 may receive key input and generate key signal input related to user settings and function control of the terminal device 100.

[0159] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0160] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power changes, messages, missed calls, notifications, etc.

[0161] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the terminal device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The terminal device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The terminal device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the terminal device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100.

[0162] The software system of the terminal device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture, etc. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the terminal device 100.

[0163] The following is a further detailed introduction to the related technologies involved in this application:

[0164] With the continuous development of terminal equipment R&D technology, the current terminal equipment is updated and replaced very quickly, so users often replace terminal equipment. When users replace terminal equipment, because there is still a lot of data in the old terminal equipment, it is usually necessary to copy the data in the old terminal equipment to the new terminal equipment.

[0165] Currently, there are applications that support data replication between old terminal devices and new terminal devices. These applications are dedicated to fully, quickly and securely replicating data from old terminal devices to new terminal devices through simple operations.

[0166] For example, you can combine Figure 2 To understand, Figure 2 A schematic diagram of implementing data transmission between new and old devices provided in an embodiment of the present application.

[0167] like Figure 2 As shown, a data transmission channel can be established between the old terminal device and the new terminal device, and the data in the old terminal device can be transmitted to the new terminal device through the data transmission channel.

[0168] This type of application that copies data between new and old devices can currently support the copying of most local data in old terminal devices, such as pictures, videos, contacts, text messages, applications, etc.

[0169] It is understandable that as applications are gradually cloud-based, the data of many applications are currently stored in the corresponding cloud, and the application account can establish a data relationship between the user and the cloud. Therefore, the user's account can be logged in in the application to obtain the corresponding data from the cloud.

[0170] However, because the account is sensitive data, its security is relatively high. Therefore, if the account data (such as account number and password) is transmitted directly through the data transmission channel introduced above, the data risk is relatively high. Therefore, the current technology does not support the migration of account login status.

[0171] Furthermore, current related technologies usually require users to manually open an application and manually enter verification information such as an account, password, or verification code in the application to log in to the account in the application of the new terminal device. This will result in a lack of comprehensiveness in data replication during the switching of terminal devices, and will also require users to manually operate to complete the account login, thereby increasing the user's operating costs.

[0172] Based on the above introduction, the present application proposes the following technical concept: the identification information of the new terminal device is obtained through the old terminal device, and the old terminal device initiates a request to the cloud server to inform the cloud server that the old terminal device may perform an account login operation later. After that, the old terminal device initiates verification to the cloud server based on its identification information. If the cloud server verification is successful, the new terminal device is authorized to log in to the account. In this way, the account login status can be effectively copied between the new and old terminal devices while ensuring the security of the account login.

[0173] The data processing method provided by this application is introduced below in conjunction with specific embodiments. Figure 3 The process of the data processing method provided in the embodiment of the present application Figure 1 .

[0174] like Figure 3 As shown, the method includes:

[0175] S301. Acquire identification information of a second terminal device and password information of a local area network of the second terminal device. A first account is logged in to a first application of a first terminal device.

[0176] In this embodiment, the first terminal device can be understood as an old terminal device, and the second terminal device can be understood as a new terminal device. In other words, the first terminal device can be understood as a data provider of data migration, and the second terminal device can be understood as a data receiver of data migration.

[0177] In this embodiment, to achieve the transfer of the account login status, in fact, the account logged in by the application in the old terminal device is also logged in to the same application in the new terminal device. Therefore, it can be understood that the first account can be logged in to the first application in the first terminal device, and the first application can be any application in the first terminal device, and this embodiment does not limit this.

[0178] And in the actual implementation process, which specific application accounts' login statuses are to be transferred may be selected by the user or may be a system default, and this embodiment does not limit this.

[0179] Among them, the first terminal device can obtain the identification information of the second terminal device. It can be understood that each terminal device has its own unique identification information, which is used to uniquely identify the terminal device. In a possible implementation, the identification information can be, for example, UDID (Unique Device Identifier) ​​information, or the identification information can also be other implementation methods. This embodiment does not limit this, as long as the identification information can realize the unique identification of the terminal device.

[0180] Furthermore, in order to realize data migration between the first terminal device and the second terminal device, a network connection is required as support, so the second terminal device in this embodiment can create a local area network, where the local area network can be understood as a hotspot of the terminal device, for example. The local area network has password information, and the specific implementation of the password information can be set by the user, which is not limited in this embodiment.

[0181] In this embodiment, the first terminal device may also obtain the password information of the local area network of the second terminal device.

[0182] S302: Send a token acquisition request to the cloud server, where the token acquisition request carries identification information. The token acquisition request is used to request the cloud server to generate a first token corresponding to the first account and establish a corresponding relationship between the first token and the identification information.

[0183] It is understandable that after the first terminal device obtains the identification information of the second terminal device, it can determine that the second terminal device corresponding to the identification information wants to copy the login status of the account. However, considering the security of the account data, the first terminal device cannot directly send the account data to the second terminal device. Therefore, in this embodiment, the cloud server can be requested for verification.

[0184] Therefore, in this embodiment, the first terminal device can send a token acquisition request to the cloud server, and the token acquisition request can include the identification information of the second terminal device obtained above. The token acquisition request in this embodiment is used to request the cloud server to generate a first token corresponding to the first account, and establish a corresponding relationship between the first token and the identification information of the second terminal device.

[0185] It is understandable that the role of the first token is to enable the cloud server to subsequently verify the second terminal device, and here the cloud server needs to establish a corresponding relationship between the first token corresponding to the first account and the identification information of the second terminal device, so that the cloud server can determine that the second terminal device may request to log in to the first account later. After that, the cloud server can determine whether the second terminal device can log in to the first account by verifying whether there is a corresponding relationship between the first token sent by the second terminal device and the identification information of the second terminal device.

[0186] S303: Receive a first token sent by the cloud server.

[0187] After the cloud server generates the first token in response to the request of the first terminal device, in addition to establishing the corresponding relationship described above, it also sends the first token to the first terminal device. Therefore, the first terminal device in this embodiment will receive the first token sent by the cloud server.

[0188] S304. Send a first token to the second terminal device according to the password information. The first token is used by the second terminal device to initiate a verification request to the cloud server for logging into the first account in the first application.

[0189] After obtaining the first token described above, in this embodiment, for example, the first token can be sent to the second terminal device according to the password information. For example, the first token can be encrypted according to the password information, and then the encrypted first token is sent. Alternatively, the first token can be processed by a corresponding function according to the password information, and then the processed first token is sent.

[0190] However, it is understandable that after receiving the first token, the second terminal device is still unable to log in to the account, and it still needs to verify with the cloud server. Therefore, the first token in this embodiment is used by the second terminal device to initiate a verification request to the cloud server, and the verification request is to request the cloud server to verify whether the second terminal device can log in to the first account in the first application.

[0191] The data processing method provided by the embodiment of the present application includes: obtaining identification information of a second terminal device and password information of a local area network of the second terminal device, and a first account is logged in to a first application of a first terminal device. Sending a token acquisition request to a cloud server, the token acquisition request carries identification information, and the token acquisition request is used to request the cloud server to generate a first token corresponding to the first account, and establish a corresponding relationship between the first token and the identification information. Receive the first token sent by the cloud server. According to the password information, send the first token to the second terminal device, and the first token is used by the second terminal device to initiate a verification request to the cloud server to log in to the first account in the first application. By sending a token acquisition request to the cloud server, the cloud server generates a first token corresponding to the first account logged in by the first terminal device, and creates a corresponding relationship between the first token and the identification information of the second terminal device, so that the cloud server can be informed that the second terminal device may log in to the first account later, and then the first token is sent to the second terminal device, so that the second terminal device initiates a verification request to the cloud server to log in to the first application according to the first token, so that with the assistance of the cloud server, the verification of the second terminal device logging in to the first account can be completed, so that the login status of the account can be copied from the first terminal device to the second terminal device, so as to effectively enhance the comprehensiveness of data replication during the device change process.

[0192] Based on the above introduction, the following Figures 4 to 7 The data processing method provided in this application is further introduced in detail. Figure 4 The process of the data processing method provided in the embodiment of the present application Figure 2 , Figure 5 A schematic diagram of the implementation of collecting identification code images provided in an embodiment of the present application, Figure 6 A schematic diagram of implementing a token acquisition request provided in an embodiment of the present application, Figure 7 A schematic diagram of an implementation of transmitting a first token provided in an embodiment of the present application.

[0193] like Figure 4 As shown, the method includes:

[0194] S401: Capture an image of an identification code displayed on a graphical user interface of a second terminal device.

[0195] In this embodiment, the first terminal device needs to obtain the identification information of the second terminal device and the password information of the local area network of the second terminal device. In a possible implementation, the second terminal device can, for example, generate an identification code based on its identification information and the password information of the local area network.

[0196] Afterwards, the second terminal device may display the generated identification code on its graphical user interface, and then the first terminal device may capture an image of the identification code displayed on the graphical user interface of the second terminal device.

[0197] For example, you can refer to Figure 5 To understand, such as Figure 5 As shown, an identification code is displayed on the graphical user interface of the second terminal device 502, and the first terminal device 501 can, for example, capture an image of the identification code displayed on the graphical user interface of the second terminal device by using a camera.

[0198] S402: Parse the image of the identification code to obtain identification information of the second terminal device and password information of the local area network of the second terminal device.

[0199] After acquiring the image of the identification code, the first terminal device may parse the image of the identification code to obtain the identification information of the second terminal device and the password information of the local area network of the second terminal device.

[0200] In one possible implementation, the current device switching operation between terminal devices can be completed through a device switching application. Therefore, the above-mentioned generation of the identification code and display of the identification code on the graphical user interface of the second terminal device can be implemented through the device switching application in the second terminal device.

[0201] Furthermore, the first terminal device may scan to obtain and analyze the image of the identification code, which may also be implemented by a device switching application in the first terminal device. Alternatively, the first terminal device may also be implemented by any application that can scan and analyze, which is not limited in this embodiment.

[0202] Alternatively, in other possible implementations, the first terminal device and the second terminal device may establish a preliminary connection channel through a connection method such as Bluetooth connection, and then transmit the identification information and password information of the second terminal device through the established connection channel. The specific implementation method of transmitting the identification information and password information can be selected and set according to actual needs, and this embodiment does not limit this.

[0203] S403: Send a token acquisition request to the cloud server, where the token acquisition request carries identification information. The token acquisition request is used to request the cloud server to generate a first token corresponding to the first account and establish a corresponding relationship between the first token and the identification information.

[0204] The implementation of S403 is similar to the implementation of S202 described above, and the specific implementation can refer to the introduction of the above embodiment.

[0205] In this embodiment, combined Figure 6 The implementation of token acquisition request is further described in detail. Figure 6 As shown, the first terminal device can send a token acquisition request to the cloud server, and the token acquisition request includes the identification information of the second terminal device. The implementation method is similar to that described above.

[0206] And in a possible implementation, the token acquisition request may also include an access token (AT) of the first terminal device. The access token is created by the cloud server when the device logs into the account, and it can be considered as a credential for accessing the system resources of the cloud server. For example, if the cloud server sends an access token to a device, then the device can subsequently initiate a verification to the cloud server through the access token. If the verification passes, the cloud server allows the device to access the corresponding data.

[0207] The access token may include a SID and a list of privileges assigned to a user account, wherein a SID (Security Identifier) ​​is a unique number used to identify a user, group, and computer account. It is understood that each user account corresponds to a unique SID, which is used to distinguish different user accounts. In this embodiment, the access token may correspond to the first account logged in by the first terminal device, and the SID of the first account may be included in the access token.

[0208] The token acquisition request includes the access token of the first terminal device, on the one hand, so that the cloud server can verify whether the first terminal device is an authorized device, and on the other hand, so that the cloud server can determine which account is currently being processed.

[0209] like Figure 6 As shown, after receiving the token acquisition request, the cloud server can verify the access token of the first terminal device. After the verification is passed, it can generate a first token corresponding to the first account and establish a corresponding relationship between the identification information of the second terminal device and the first token.

[0210] It should be noted that the cloud server in this embodiment can determine that the first token corresponding to the first account is generated because the access token includes the identification information of the first account. Alternatively, in other possible implementations, the first terminal device can also directly carry the identification information of the first account in the token acquisition request, so that the cloud server determines that the first token needs to be generated for the first account. This embodiment does not limit the specific implementation method of the cloud server determining the first account.

[0211] S404: Receive a first token sent by the cloud server.

[0212] Reference Figure 6 It can also be understood that after generating the first token, the cloud server will also send the first token to the first terminal device. Therefore, the first terminal device in this embodiment can also receive the first token sent by the cloud server.

[0213] And in a possible implementation, each application corresponds to its own cloud server, so the interaction with the cloud server needs to be completed through the first application in the first terminal device. Operations other than the interaction with the cloud server can be understood as being implemented by the machine switching application, where the machine switching application only needs to be able to perform a series of data processing and data transmission operations introduced in this application, and its specific implementation method can be selected according to actual needs.

[0214] For example, the device-changing application described above can pass the acquired identification information and password information of the second terminal device to the first application, and then the first application sends a token acquisition request to the cloud server according to the identification information, and receives the first token sent by the cloud server.

[0215] S405: Obtain the name information of the local area network of the second terminal device.

[0216] In this embodiment, the first terminal device needs to send the first token to the second terminal device. To achieve data transmission, a data transmission channel needs to be established between the first terminal device and the second terminal device.

[0217] Based on the above introduction, it can be determined that the second terminal device has established a local area network, and the first terminal device has obtained the password information of the local area network of the second terminal device. Then the first terminal device can obtain the name information of the local area network of the second terminal device and access the local area network of the second terminal device.

[0218] Therefore, the first terminal device in this embodiment can obtain the name information of the local area network of the second terminal device. In a possible implementation method, for example, the second terminal device can carry the name information of the local area network in the identification code introduced above, so the first terminal device can obtain the name information of the local area network of the second terminal device through the operation of parsing the image of the identification code introduced above.

[0219] Alternatively, the first terminal device may also obtain the name information of the local area network of the second terminal device by searching for nearby local area networks. Alternatively, the first terminal device may also obtain the name information of the local area network of the second terminal device based on the hotspot information selected by the user. This embodiment does not limit the specific implementation method of obtaining the name information of the local area network, which can be selected and set according to actual needs.

[0220] It is also understandable that the current operation of obtaining the name information of the local area network is not limited to the current step sequence, and the execution time of the operation can be determined according to actual conditions.

[0221] S406. Establish a local area network connection with the second terminal device according to the name information and the password information, where the local area network connection is used to transmit the first token and / or account data.

[0222] After obtaining the name information and password information of the local area network of the second terminal device, the first terminal device can access the local area network of the second terminal device according to the name information and password information, thereby establishing a local area network connection with the second terminal device. The local area network connection in this embodiment can be used to transmit the first token. And / or, the local area network connection in this embodiment can also be used to transmit account data.

[0223] Among them, account data may include, for example, account ID, avatar information, user setting information, record information, etc. For example, for communication applications, the record information may be chat records, friend list information, etc.; for image processing applications, the record information may be image information, image processing information, etc. This embodiment does not limit the specific implementation method of the account information, and all information associated with the first account can be used as the account information in this embodiment.

[0224] It is understandable that if a first account is logged in to the first application of the first terminal device, then the account data of the first account is stored in the first terminal device, but the account data of the first account is stored in the first application, or in the storage space corresponding to the first application.

[0225] Therefore, for example, the data interface of the first terminal device can be called by the switching application to access the first application in the first terminal device, and the account data corresponding to the first account can be obtained in the first application. The data interface here can be, for example, a CP (Content Provider) interface, where the CP interface provides a unified interface for storing and obtaining data, and data can be shared between different applications.

[0226] It is understandable that because the first application in the first terminal device is logged in to the first account, the account information is stored locally on the first terminal device. Then, by directly transmitting the account data to the second terminal device through the local area network between the first terminal device and the second terminal device, it is possible to avoid the second terminal device having to obtain the account data from the cloud later, thereby effectively improving the data replication integrity during the device change process.

[0227] S407: Generate a key based on the password information.

[0228] In this embodiment, the first terminal device needs to send the first token and account data to the second terminal device. In order to ensure the security of data transmission, the first terminal device may, for example, encrypt the first token and account data before transmitting them.

[0229] It is understandable that the first terminal device can encrypt and transmit the first token and account data, and it is also necessary to ensure that the second terminal device can achieve corresponding decryption, so that the data transmission is effective.

[0230] In this embodiment, the second terminal device has established a local area network, so the second terminal device itself can determine the password information of the local area network, and the first terminal device in this embodiment also obtains the password information of the local area network, that is, the password information is information held by both the first terminal device and the second terminal device.

[0231] Therefore, in a possible implementation, the present embodiment can generate a key according to the password information of the local area network. For example, a symmetric key can be generated. In the actual implementation process, the key can be generated by any data encryption algorithm, and the present embodiment does not limit this, as long as it is generated according to the password information of the local area network.

[0232] S408: Encrypt the first token according to the key.

[0233] After obtaining the key, the first token can be encrypted according to the key. Similarly, if the account data of the first account is obtained, the account data can also be encrypted according to the key.

[0234] S409: Send the encrypted first token to the second terminal device.

[0235] After encryption, the first terminal device can send the encrypted first token to the second terminal device. Figure 7 To understand, such as Figure 7 As shown, the first terminal device can encrypt the first token according to the password information of the local area network, and then the second terminal device receives the encrypted first token and decrypts it according to the password information of the local area network, so that the transmission of the first token can be completed safely. The transmission method for account data is similar to the description of the transmission method of the first token above, and will not be repeated here.

[0236] The first token and the account data are encrypted before being sent, which can effectively ensure the security of the first token and the account data transmission process. At the same time, the account data in this embodiment is encrypted according to the key generated by the password information. Because the password information is held by both the first terminal device and the second terminal device, there is no need to transmit the key information additionally, so that the transmission security of the first token and the account data can be more effectively guaranteed.

[0237] After the second terminal device receives the first token, it can initiate verification to the cloud server based on the first token to request to log in to the first account. Because the first terminal device has previously requested the cloud server to create a corresponding relationship between the identification information of the second terminal device and the first token, the second terminal device can complete the login of the first account in the first application, thereby effectively realizing the replication of the account login status.

[0238] The data processing method provided by the embodiment of the present application displays the image of the identification code on the graphical user interface of the second terminal device, and then the first terminal device collects and analyzes the image of the identification code, so that the identification information of the second terminal device and the password information of the local area network of the second terminal device can be simply and effectively synchronized to the first terminal device, and the synchronization of information is completed without establishing a data transmission channel in this process. And the first terminal device and the second terminal device establish a local area network connection, so that the transmission of the first token and / or account data can be effectively realized. At the same time, in the process of transmitting the first token and / or account data, a key will be used for encryption processing, and then the transmission operation will be performed, so that the security of data transmission can be effectively guaranteed. And the key in this embodiment is generated according to the password information of the local area network of the second terminal device. Because the first terminal device and the second terminal device both hold the password information, the encryption performed by the first terminal device can be effectively guaranteed, and the corresponding decryption can be realized on the second terminal device side. At the same time, the first terminal device and the second terminal device do not need to transmit the key again, so that the security of data transmission can be further improved.

[0239] The above embodiments describe operations on the first terminal device side. The following describes related implementations on the second terminal device side in conjunction with specific embodiments. Figure 8 Make an introduction, Figure 8 The process of the data processing method provided in the embodiment of the present application Figure 3 .

[0240] like Figure 8 As shown, the method includes:

[0241] S801. Obtain a first token sent by a first terminal device.

[0242] Based on the above embodiment, it can be determined that the first terminal device will send the first token to the second terminal device, so the second terminal device in this embodiment can obtain the first token sent by the first terminal device.

[0243] S802. Send a verification request to the cloud server, where the verification request includes identification information of the first token and the second terminal device, and the verification request is used to request the cloud server to verify whether there is a corresponding relationship between the first token and the identification information of the second terminal device.

[0244] Among them, the first token is allocated by the first terminal device in requesting the cloud server. The cloud server can verify whether the terminal device can log in to the corresponding account based on the first token. Therefore, after the second terminal device obtains the first token, it can send a verification request to the cloud server. The verification request can include the first token, and the verification request can also include the identification information of the second terminal device.

[0245] Based on the above introduction, it can be determined that the cloud server not only generates the first token corresponding to the first account according to the request of the first terminal device, but also establishes a corresponding relationship between the first token and the identification information of the second terminal device. The establishment of the corresponding relationship here is equivalent to the cloud server being able to determine that the second terminal device may log in to the first account, that is, the cloud server can determine that the second terminal device is a credible account.

[0246] Therefore, in this embodiment, the verification request sent by the second terminal device can request the cloud server to verify whether there is a corresponding relationship between the first token and the identification information of the second terminal device.

[0247] In a possible implementation, the cloud server can also set a validity period for the first token and / or the corresponding relationship, that is, the cloud server will determine that the verification is successful only if the second terminal device sends a verification request to the cloud server within the validity period. When the second terminal device does not send a verification request to the cloud server within the validity period, it can be determined that the verification fails. The validity period can be set to 7 days, 3 days, etc., for example, to limit the second terminal device to perform verification within a certain period of time to ensure the security and effectiveness of the verification, thereby improving the security of the cloud server's login verification of the first account.

[0248] S803: After the verification is passed, receive the access token sent by the cloud server, and trigger the first application in the second terminal device to log in to the first account according to the access token.

[0249] In a possible implementation, if there is no corresponding relationship between the first token and the identification information of the second terminal device, the cloud server can determine that the first terminal device has not previously informed the second terminal device that it may log in to the first account, that is, the cloud server can determine that the second terminal device is an untrusted device, and therefore the cloud server can determine that the verification fails. In the case of a failed verification, the cloud server can determine that the second terminal device is not allowed to log in to the first account.

[0250] Alternatively, in another possible implementation, if there is a corresponding relationship between the first token and the identification information of the second terminal device, the cloud server can determine that the second terminal device is the device previously notified by the first terminal device that may log in to the first account, that is, the cloud server can determine that the second terminal device is a trustworthy device, and therefore can determine that the verification is successful. If the verification is successful, the cloud server can determine that the second terminal device is allowed to log in to the first account.

[0251] It is understandable that when the cloud server authorizes the terminal device to log in to the corresponding account, the cloud server usually sends an access token corresponding to the account to the terminal device to instruct the terminal device to log in to the corresponding account.

[0252] Therefore, in this embodiment, after the verification is passed, the second terminal device can receive the access token sent by the cloud server. The access token here is actually the access token corresponding to the first account, indicating that the second terminal device can log in to the first account.

[0253] Afterwards, the second terminal device can trigger the first application in the second terminal device to log in to the first account according to the access token.

[0254] It should be noted here that, under normal circumstances, when an application in a terminal device logs in to an account, it usually uses an account and password, or an account and verification code, to initiate verification to the cloud server, so that the cloud server determines whether the current terminal device can log in to the account. If the cloud server verifies the account and password (or verification code) successfully, the cloud server will also send an access token to the terminal device to instruct the first application in the terminal device to log in to the account.

[0255] In this embodiment, no password or verification code is used, because if the password or verification code is transmitted directly between the first terminal device and the second terminal device, the data risk is relatively large. Therefore, in this embodiment, the method of initiating verification to the cloud server based on the identification information of the first token and the second terminal device is adopted. Compared with the verification method of the account password (or verification code), this implementation method is more secure and can also effectively obtain the access token of the login account, so that on the basis of ensuring the security of verification, the account login status of the first application in the first terminal device can be effectively copied to the second terminal device.

[0256] The data processing method provided by the embodiment of the present application includes: obtaining a first token sent by a first terminal device. Sending a verification request to a cloud server, the verification request includes the first token and the identification information of the second terminal device, and the verification request is used to request the cloud server to verify whether there is a corresponding relationship between the first token and the identification information of the second terminal device. After the verification is passed, receiving the access token sent by the cloud server, and triggering the first application in the second terminal device to log in to the first account according to the access token. By sending a verification request to the cloud server according to the first token sent by the first terminal device, the verification request also includes the identification information of the second terminal device, so that the cloud server verifies whether the second terminal device can log in to the first account. After the verification is passed, the second terminal device logs in to the first account in the first application according to the access token sent by the cloud server, so that the account login status in the first terminal device can be effectively and safely copied to the second terminal device under the verification of the cloud server, thereby effectively improving the comprehensiveness of data replication during the machine replacement process.

[0257] Based on the above introduction, the following Fig. 9 The relevant operations on the second terminal device side in the data processing method provided by the present application are further introduced in detail. Fig. 9 The process of the data processing method provided in the embodiment of the present application Figure 4 .

[0258] like Fig. 9 As shown, the method includes:

[0259] S901. Establish a local area network connection with the first terminal device according to the name information and password information of the local area network of the second terminal device, where the local area network connection is used to transmit the first token and / or account data.

[0260] In this embodiment, the second terminal device has established a local area network, and the second terminal device needs to transmit data with the first terminal device, so the second terminal device can establish a local area network connection with the first terminal device based on the name information and password information of the local area network it established.

[0261] After the LAN connection is established, the first terminal device and the second terminal device can transmit data based on the connected LAN, wherein the transmitted data may include the first token and / or account data.

[0262] S902: Receive an encrypted first token sent by a first terminal device.

[0263] After establishing the LAN connection introduced above, the first terminal device and the second terminal device can perform data transmission. Based on the above introduction, it can be determined that the first terminal device will encrypt the first token and send it to the second terminal device, so the second terminal device can receive the encrypted first token sent by the first terminal device.

[0264] S903: Generate a key according to the password information of the local area network of the second terminal device.

[0265] Because the first token received by the second terminal device is encrypted, the second terminal device also needs to decrypt the data. In this embodiment, because both the first terminal device and the second terminal device hold the password information of the local area network of the second terminal device, the key is generated according to the password information of the local area network in this embodiment.

[0266] Therefore, the second terminal device can generate a key according to the password information of its local area network. It can be understood that generating a key according to the password information of the local area network can effectively ensure that the first terminal device and the second terminal device can generate the same key, so that the encryption and decryption processing of the transmitted data can be effectively realized without exchanging keys.

[0267] It should also be noted that the reason why the first terminal device and the second terminal device can both hold the password information of the local area network of the second terminal device is because the first terminal device obtains the password information of the second terminal device.

[0268] In a possible implementation, before establishing a connection between the local area networks of the two devices, the second terminal device generates an identification code based on the password information of its local area network, and displays an image of the identification code on the graphical user interface of the second terminal device. The first terminal device can then scan and parse the identification code, thereby effectively synchronizing the password information of the local area network of the second terminal device to the first terminal device.

[0269] The above processing can also be performed on the identification information of the second terminal device, that is, the identification information of the second terminal device can be included in the generated identification code. For more detailed implementation methods, please refer to the introduction of the above embodiments, which will not be repeated here.

[0270] S904. Decrypt the encrypted first token according to the key to obtain the first token.

[0271] After generating the key, the second terminal device can decrypt the received encrypted first token according to the key, thereby obtaining the first token.

[0272] Furthermore, based on the above introduction, it can be determined that the first terminal device can also transmit the account data to the second terminal device. Therefore, the second terminal device in this embodiment can also receive the encrypted account data sent by the first terminal device. After that, the second terminal device can decrypt the encrypted account data according to the key to obtain the account data. The specific implementation method can refer to the description of the above embodiment, which will not be repeated here.

[0273] S905. Send a verification request to the cloud server, where the verification request includes the first token and identification information of the second terminal device, and the verification request is used to request the cloud server to verify whether there is a corresponding relationship between the first token and the identification information of the second terminal device.

[0274] S906: After the verification is passed, receive the access token sent by the cloud server, and trigger the first application in the second terminal device to log in to the first account according to the access token.

[0275] Among them, the implementation method of S905 and S906 is similar to the implementation method of the above-mentioned S802 and S803, and the specific implementation method will not be repeated here.

[0276] It should be noted that in this embodiment, after the cloud server passes the verification of the second terminal device, it will issue an access token to the second terminal device, and the access token is used to log in to the account of the first application in the second terminal device. It is also important for the first application to determine which account is logged in. The access token in this embodiment includes the identification information of the first account to ensure that the first account is logged in in the first application of the second terminal device, so that the first account logged in by the first application in the first terminal device can be effectively copied to the first application in the second terminal device for logging in.

[0277] The data processing method provided by the embodiment of the present application displays the image of the identification code on the graphical user interface of the second terminal device, and then the first terminal device collects and analyzes the image of the identification code, so that the identification information of the second terminal device and the password information of the local area network of the second terminal device can be simply and effectively synchronized to the first terminal device, and the synchronization of information is completed without establishing a data transmission channel in this process. And the first terminal device and the second terminal device establish a local area network connection, so that the transmission of the first token and / or account data can be effectively realized. At the same time, in the process of transmitting the first token and / or account data, a key will be used for encryption processing, and then the transmission operation will be performed, so that the security of data transmission can be effectively guaranteed. And the key in this embodiment is generated according to the password information of the local area network of the second terminal device. Because the first terminal device and the second terminal device both hold the password information, the encryption performed by the first terminal device can be effectively guaranteed, and the corresponding decryption can be realized on the second terminal device side. At the same time, the first terminal device and the second terminal device do not need to transmit the key again, so that the security of data transmission can be further improved.

[0278] The above is a description of the implementation methods of the first terminal device and the second terminal device respectively. Fig.10 and Fig.11 The overall flow chart of the data processing method provided by this application is described in detail. Fig.10 A system diagram of a data processing method provided in an embodiment of the present application, Fig.11 A signaling interaction diagram of the data processing method provided in an embodiment of the present application.

[0279] like Fig.11 As shown, in each signaling interaction in this embodiment, the execution device may include a second terminal device (old terminal device), a first terminal device and a cloud server.

[0280] The second terminal device and the first terminal device each include a switching application and a first application. The switching application is used to perform a series of data interaction processing between the first terminal device and the second terminal device, and the first application is an application for copying the account login status between the first terminal device and the second terminal device. The specific implementation can be selected according to actual needs. The first application is used to interact with the cloud server to complete the corresponding request, verification, etc. The data transmission protocol in this embodiment can be, for example, the FTP (File Transfer Protocol) protocol, or it can also be any other possible protocol.

[0281] The functions of each subject are further explained below:

[0282] The switching application and the first application in the first terminal device participate together, mainly completing key negotiation and data packaging encryption, and interacting with the cloud server to complete the registration of the first token, so as to verify the first token on the second terminal device.

[0283] And, the switching application and the first application in the second terminal device participate together, mainly completing the data decryption and cloud server authentication process.

[0284] And, the cloud server mainly completes the account login authentication and the authorization of the first token. And after the authentication of the second terminal device is completed, the access token is issued.

[0285] The transmission channel is used for data transmission between the first terminal device and the second terminal device, thereby ensuring the security of the data during the transmission process.

[0286] In the above Fig.10 Based on the introduction, the following Fig.11 , the implementation process in this embodiment is explained with specific steps.

[0287] 1. The device switching application in the second terminal device sends query information to the first application in the second terminal device, where the query information is used to query whether the account logged in by the first application supports cloning.

[0288] It is understandable that due to the iteration and update of system data, some accounts do not support cloning, that is, the login status of the account cannot be directly copied from one device to another. In this case, the subsequent operations in this embodiment cannot be performed, and the user can only manually perform the account login operation in the new terminal device.

[0289] Therefore, the device-changing application in this embodiment can send query information to the first application to query whether the account logged in by the first application supports cloning.

[0290] And in a possible implementation, when the user needs to switch devices, the device switching application can be opened in the second terminal device, for example, the second terminal device can send query information in response to the user's opening operation of the device switching application. Or a trigger control can be set in the device switching application, and after detecting the user's click operation on the trigger control, the query information is sent to the first application.

[0291] 2. The first application in the second terminal device sends return information to the device switching application in the second terminal device, where the return information is used to indicate whether the account logged in by the first application supports cloning.

[0292] After receiving the query information, the first application in the second terminal device can query whether the account logged in by the first application supports cloning. For example, the first application stores a tag for the account logged in by it, so as to determine whether the account logged in by it supports cloning. Or the first application can send a query information to the cloud server to determine whether the account logged in by it supports cloning. It can be understood that the account logged in by the first application in this embodiment is actually the first account introduced in the above embodiment.

[0293] After determining whether the first account supports cloning, the first application will send a return message to the device switching application. In this embodiment, subsequent operations will be performed only when the return message indicates that the first account logged in by the first application supports cloning.

[0294] 3. The device switching application in the second terminal device obtains identification information of the second terminal device.

[0295] For example, the device switching application may query the identification information of the second terminal device by itself, or the device switching application may request the first application to query the identification information of the second terminal device.

[0296] 4. The switching application of the second terminal device generates an identification code according to the identification information of the second terminal device and the password information of the local area network of the second terminal device, and displays the identification code on the graphical user interface of the second terminal device.

[0297] 5. The device switching application of the first terminal device collects an image of the identification code displayed on the graphical user interface of the second terminal device, and parses the identification code to obtain the identification information of the second terminal device and the password information of the local area network of the second terminal device.

[0298] 6. The device switching application of the first terminal device sends the identification information and password information of the second terminal device to the first application.

[0299] 7. The first application of the first terminal device sends a token acquisition request to the cloud server.

[0300] The token acquisition request may include identification information of the second terminal device and may also include an access token of the first terminal device.

[0301] 8. In response to the token acquisition request, the cloud server generates a first token corresponding to the first account, and establishes a correspondence between the first token and the identification information of the second terminal device.

[0302] In a possible implementation, the cloud server can, for example, verify the access token of the first terminal device, and if the verification is successful, then generate the first token and establish a corresponding relationship. At the same time, by verifying the access token, the cloud server can also determine that the first token is currently generated for the first account.

[0303] 9. The cloud server sends the first token to the first application of the first terminal device.

[0304] 10. The first application of the first terminal device generates a key according to the password information, and encrypts the first token and account data according to the key.

[0305] 11. The first application of the first terminal device sends the encrypted first token and the encrypted account data to the device switching application of the first terminal device.

[0306] 12. The device switching application of the first terminal device establishes a local area network connection with the second terminal device according to the name information and password information of the local area network of the second terminal device.

[0307] 13. The device-changing application of the first terminal device sends the encrypted first token and the encrypted account data to the device-changing application of the second terminal device through the connection established above.

[0308] 14. The device-changing application of the second terminal device sends the encrypted first token, the encrypted account data, and the password information to the first application of the second terminal device.

[0309] 15. The first application of the second terminal device generates a key according to the password information, and decrypts the encrypted first token and account data according to the key to obtain the first token and account data.

[0310] 16. The first application of the second terminal device sends a verification request to the cloud server, where the verification request includes the first token and identification information of the second terminal device.

[0311] 17. In response to the verification request, the cloud server verifies whether there is a corresponding relationship between the first token and the identification information of the second terminal device.

[0312] 18. If the verification is successful, the cloud server sends an access token of the first account to the first application of the second terminal device.

[0313] 19. The first application of the second terminal device logs into the first account according to the access token, and performs data recovery according to the received account data.

[0314] The data recovery here can, for example, display the user's avatar, restore the user's settings, etc., which depends on the implementation of the account data.

[0315] And in a possible implementation, after the first application in the second terminal device logs in to the first account, the second terminal device may also send login status update information to the first terminal device, where the login status update information is used to indicate that the login status of the first application in the second terminal device is logged in. That is to say, the first terminal device is informed that the first account has been logged in. The transmission operation of the login status update information may be completed, for example, by interaction between the switching applications through a local area network.

[0316] Alternatively, the second terminal device may also send login status update information to a trusted device such as a reserved email address, mobile phone number, etc. when registering the account to inform it that it has successfully logged into the first account.

[0317] Based on the above-described process, it should be noted that the data interaction of the switching application between the first terminal device and the second terminal device is completed through the local area network connection. The data interaction between the first application in the first terminal device and the second terminal device and the cloud server is completed through the public network connection. Therefore, both the first terminal device and the second terminal device need to switch the connection network according to the data interaction operation they need to perform.

[0318] By implementing the above steps, the first account logged in by the first application in the first terminal device can be effectively logged in by the first application in the second terminal device, thereby effectively and automatically completing the transfer of the account login status.

[0319] Based on the contents of the above embodiments, the following can be combined with Fig.12 The data interaction between the two devices is further introduced in detail. Fig.12 A schematic diagram of implementing data replication provided in an embodiment of the present application.

[0320] like Fig.12 As shown, the first terminal device includes a user interface (UI) process and a service process, and the second terminal device also includes a UI process and a service process.

[0321] The UI process in the first terminal device may include a connection unit, a session management unit, a transmission client unit, and a data backup unit. And the UI process in the second terminal device may include a connection unit, a session management unit, a transmission server unit, and a data recovery unit.

[0322] The first terminal device and the second terminal device can establish a LAN connection through the connection unit, and transmit the socket message of the session service signaling through the session management unit, for example, what data to transmit after mutual synchronization.

[0323] And, the transmission client unit and the transmission server unit are used to perform formal data transmission, for example, it may include the account data, the first token, etc. introduced above.

[0324] In a possible implementation, the data transmitted by the transmission client unit in the first terminal device can be obtained by the data backup unit calling the service process through AIDL (Android Interface Definition Language). And after receiving the data, the transmission service unit in the second terminal device can call the service process through AIDL through the data recovery unit, thereby restoring the account data to the corresponding application.

[0325] Furthermore, whether it is the first terminal device or the second terminal device, the implementation of the above operations depends on some underlying implementations, which may include Fig.12 The media library, basic data DB (data base), PMS (Power Manager Service), file backup (FileBackup) unit, driver, etc. shown in the figure.

[0326] And reference Fig.13 To understand, Fig.13 A schematic diagram of implementing the replication of the first account login status provided in an embodiment of the present application.

[0327] like Fig.13As shown, assuming that a first account was originally logged in to the first application in the first terminal device 1301, after being processed by the method provided in this application, the first account can be safely and effectively logged in to the first application in the second terminal device 1302, so that the account login status of the first application can be automatically copied from the first terminal device to the second terminal device, thereby effectively reducing user operations and improving user experience.

[0328] Fig.14 A schematic diagram of the structure of the data processing device provided in the embodiment of the present application Figure 1 .like Fig.14 As shown, the device 140 includes: a display unit 1401 and a processing unit 1402 .

[0329] The processing unit 1402 is configured to:

[0330] Acquire identification information of a second terminal device and password information of a local area network of the second terminal device, wherein a first account is logged in to a first application of the first terminal device;

[0331] Sending a token acquisition request to a cloud server, wherein the token acquisition request carries the identification information, and the token acquisition request is used to request the cloud server to generate a first token corresponding to the first account and establish a corresponding relationship between the first token and the identification information;

[0332] Receiving the first token sent by the cloud server;

[0333] The first token is sent to the second terminal device according to the password information, and the first token is used by the second terminal device to initiate a verification request to the cloud server for logging into the first account in the first application.

[0334] In a possible implementation, the processing unit 1402 is specifically configured to:

[0335] Generate a key according to the password information;

[0336] encrypting the first token according to the key;

[0337] Send the encrypted first token to the second terminal device.

[0338] In a possible implementation, the processing unit 1402 is further configured to:

[0339] Calling a data interface of the first terminal device to access a first application in the first terminal device;

[0340] In the first application, obtaining account data corresponding to the first account;

[0341] The account data is encrypted according to the key, and the encrypted account data is sent to the second terminal device.

[0342] In a possible implementation, the processing unit 1402 is further configured to:

[0343] Before sending the first token to the second terminal device according to the password information, obtaining the name information of the local area network of the second terminal device;

[0344] A local area network connection is established with the second terminal device according to the name information and the password information, and the local area network connection is used to transmit the first token and / or the account data.

[0345] In a possible implementation, the token acquisition request also carries an access token of the first terminal device, and the access token includes identification information of the first account;

[0346] The access token is used by the cloud server to verify the first terminal device.

[0347] In a possible implementation, the processing unit 1402 is specifically configured to:

[0348] capturing an image of the identification code displayed on the graphical user interface of the second terminal device;

[0349] The image of the identification code is parsed to obtain identification information of the second terminal device and password information of the local area network of the second terminal device.

[0350] In a possible implementation, the processing unit 1402 is further configured to:

[0351] After the login status of the first application in the second terminal device is updated to "logged in", login status update information sent by the second terminal device is received.

[0352] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be repeated here.

[0353] Fig.15 A schematic diagram of the structure of the data processing device provided in the embodiment of the present application Figure 2 .like Fig.15 As shown, the device 150 includes: a display unit 1501 and a processing unit 1502.

[0354] The processing unit 1502 is configured to:

[0355] Obtain a first token sent by a first terminal device; send a verification request to a cloud server, wherein the verification request includes identification information of the first token and a second terminal device, and the verification request is used to request the cloud server to verify whether there is a corresponding relationship between the first token and the identification information of the second terminal device; after the verification is passed, receive an access token sent by the cloud server, and based on the access token, trigger the first application in the second terminal device to log in to the first account.

[0356] In a possible implementation, the processing unit 1502 is specifically configured to:

[0357] Receiving the encrypted first token sent by the first terminal device;

[0358] Generate a key according to the password information of the local area network of the second terminal device;

[0359] The encrypted first token is decrypted according to the key to obtain the first token.

[0360] In a possible implementation, the processing unit 1502 is further configured to:

[0361] Receiving the encrypted account data sent by the first terminal device;

[0362] The encrypted account data is decrypted according to the key to obtain the account data.

[0363] In a possible implementation, the access token includes identification information of the first account.

[0364] In a possible implementation, the processing unit 1502 is further configured to:

[0365] Before obtaining the first token sent by the first terminal device, a local area network connection is established with the first terminal device according to the name information of the local area network of the second terminal device and the password information, and the local area network connection is used to transmit the first token and / or the account data.

[0366] In a possible implementation, the processing unit 1502 is further configured to: before acquiring the first token sent by the first terminal device, generate an identification code according to the identification information of the second terminal device and the password information of the local area network of the second terminal device;

[0367] The display unit 1501 is used to display the image of the identification code on the graphical user interface of the second terminal device.

[0368] In one possible implementation, the processing unit 1502 is also used to: after triggering the first application in the second terminal device to log in to the first account according to the access token, send login status update information to the second terminal device, and the login status update information is used to indicate that the login status of the first application in the second terminal device is logged in.

[0369] And you can refer to Fig.16 Understand electronic devices, Fig.16 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.

[0370] In a possible implementation, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, which is not specifically limited in the embodiments of the present application.

[0371] Optionally, the interface circuit 1603 may also include a transmitter and / or a receiver. Optionally, the processor 1602 may include one or more CPUs, or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The steps of the method disclosed in the present application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0372] The present application embodiment also provides a computer-readable storage medium. The method described in the above embodiment can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the function can be stored as one or more instructions or codes on a computer-readable medium or transmitted on a computer-readable medium. Computer-readable media may include computer storage media and communication media, and may also include any medium that can transfer a computer program from one place to another. The storage medium may be any target medium that can be accessed by a computer.

[0373] In one possible implementation, a computer-readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disk storage, disk storage or other magnetic storage devices, or any other medium that is intended to carry or store the required program code in the form of instructions or data structures and can be accessed by a computer. Moreover, any connection is appropriately referred to as a computer-readable medium. For example, if a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technology (such as infrared, radio and microwave) is used to transmit software from a website, server or other remote source, the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave are included in the definition of medium. Disks and optical disks as used herein include optical disks, laser disks, optical disks, digital versatile disks (DVD), floppy disks and Blu-ray disks, where disks usually reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included in the scope of computer-readable media.

[0374] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0375] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present invention should be included in the scope of protection of the present invention.

Claims

1. A data processing method, applied to a first terminal device, the method comprising: Acquire identification information of a second terminal device and password information of a local area network of the second terminal device, wherein a first account is logged in to a first application of the first terminal device; Sending a token acquisition request to a cloud server, wherein the token acquisition request carries the identification information, and the token acquisition request is used to request the cloud server to generate a first token corresponding to the first account and establish a corresponding relationship between the first token and the identification information; Receiving the first token sent by the cloud server; Generate a key according to the password information; The first token is encrypted according to the key, and the encrypted first token is sent to the second terminal device, where the first token is used by the second terminal device to initiate a verification request to the cloud server for logging into the first account in the first application.

2. The method according to claim 1, characterized in that The method further comprises: Calling a data interface of the first terminal device to access a first application in the first terminal device; In the first application, obtaining account data corresponding to the first account; The account data is encrypted according to the key, and the encrypted account data is sent to the second terminal device.

3. The method according to claim 2, characterized in that Before sending the first token to the second terminal device according to the password information, the method further includes: Obtaining name information of the local area network of the second terminal device; A local area network connection is established with the second terminal device according to the name information and the password information, and the local area network connection is used to transmit the first token and / or the account data.

4. The method according to claim 1, characterized in that: The token acquisition request also carries an access token of the first terminal device, wherein the access token includes identification information of the first account; The access token is used by the cloud server to verify the first terminal device.

5. The method according to claim 1, characterized in that The acquiring the identification information of the second terminal device and the password information of the local area network of the second terminal device includes: capturing an image of the identification code displayed on the graphical user interface of the second terminal device; The image of the identification code is parsed to obtain identification information of the second terminal device and password information of the local area network of the second terminal device.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: After the login status of the first application in the second terminal device is updated to logged in, login status update information sent by the second terminal device is received.

7. A data processing method, applied to a second terminal device, the method comprising: Obtaining a first token sent by a first terminal device; Sending a verification request to a cloud server, wherein the verification request includes the first token and the identification information of the second terminal device, and the verification request is used to request the cloud server to verify whether there is a corresponding relationship between the first token and the identification information of the second terminal device; After the verification is passed, receiving the access token sent by the cloud server, and triggering the first application in the second terminal device to log in to the first account according to the access token; The obtaining of the first token sent by the first terminal device includes: Receiving the encrypted first token sent by the first terminal device; Generate a key according to the password information of the local area network of the second terminal device; The encrypted first token is decrypted according to the key to obtain the first token.

8. The method according to claim 7, characterized in that The method further comprises: Receiving the encrypted account data sent by the first terminal device; The encrypted account data is decrypted according to the key to obtain the account data.

9. The method according to claim 7, characterized in that: The access token includes identification information of the first account.

10. The method according to claim 8, characterized in that Before obtaining the first token sent by the first terminal device, the method further includes: A local area network connection is established with the first terminal device according to the name information of the local area network of the second terminal device and the password information, and the local area network connection is used to transmit the first token and / or the account data.

11. The method according to claim 7, characterized in that Before obtaining the first token sent by the first terminal device, the method further includes: generating an identification code according to the identification information of the second terminal device and the password information of the local area network of the second terminal device; An image of the identification code is displayed on the graphical user interface of the second terminal device.

12. The method according to any one of claims 7 to 11, characterized in that: After triggering the first application in the second terminal device to log in to the first account according to the access token, the method further includes: Login status update information is sent to the first terminal device, where the login status update information is used to indicate that the login status of the first application in the second terminal device is logged in.

13. An electronic device, characterized in that: include: A processor and a display screen, wherein the processor is used to call a program in a memory to execute the processing steps in the method described in any one of claims 1 to 12, and the display screen is used to execute the display steps in the method described in any one of claims 1 to 12.

14. An electronic device, characterized in that: include: A processor, a display screen and an interface circuit, wherein the interface circuit is used to communicate with other devices, the processor is used to execute the processing steps in the method described in any one of claims 1 to 12, and the display screen is used to execute the display steps in the method described in any one of claims 1 to 12.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed, the computer executes the method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Login method, token sending method, and device

    CN111466099A

  • Equipment authentication method, device and system, terminal equipment and storage medium

    CN112417425A

  • Account data sharing method and electronic equipment

    CN113259301A

  • Secure authorization for accessing content on a shareable device

    US9323916B1