WO2024037040A1 - 数据处理方法及电子设备 - Google Patents

数据处理方法及电子设备 Download PDF

Info

Publication number
WO2024037040A1
WO2024037040A1 PCT/CN2023/091416 CN2023091416W WO2024037040A1 WO 2024037040 A1 WO2024037040 A1 WO 2024037040A1 CN 2023091416 W CN2023091416 W CN 2023091416W WO 2024037040 A1 WO2024037040 A1 WO 2024037040A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal device
token
account
cloud server
information
Prior art date
Application number
PCT/CN2023/091416
Other languages
English (en)
French (fr)
Inventor
张飞雨
王永昕
Original Assignee
荣耀终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Publication of WO2024037040A1 publication Critical patent/WO2024037040A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/03Protecting confidentiality, e.g. by encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • H04W12/041Key generation or derivation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/08Access security
    • H04W12/084Access security using delegated authorisation, e.g. open authorisation [OAuth] protocol

Definitions

  • the present application relates to the field of terminal technology, and in particular, to a data processing method and electronic equipment.
  • terminal equipment is updated relatively quickly.
  • it is usually necessary to copy the data in the old terminal equipment to the new terminal equipment.
  • This application provides a data processing method and electronic device, which can complete the verification of the second terminal device logging into the first account with the assistance of the cloud server, so that the login status of the account can be copied from the first terminal device to the second terminal device. , to effectively enhance the comprehensiveness of data replication during machine replacement.
  • embodiments of the present application provide a data processing method, which is applied to a first terminal device.
  • the method includes:
  • the first token is sent to the second terminal device, and the first token is used by the second terminal device to initiate logging in to the first application program in the cloud server. Account verification request.
  • a token acquisition request is sent to the cloud server, so that the cloud server generates the first token corresponding to the first account logged in by the first terminal device, and creates the first token and the second terminal device.
  • the corresponding relationship between the identification information so that the cloud server can be informed that the second terminal device may log in with the first account, and then send the first token to the second terminal device, so that the second terminal device can log in according to the
  • the first token initiates a verification request for logging in to the first application to the cloud server, so that with the assistance of the cloud server, verification of the second terminal device's login to the first account can be completed, so that the login status of the account can be changed from the first terminal
  • the device is copied to the second terminal device to effectively enhance the comprehensiveness of data copying during the device replacement process.
  • the terminal device when the terminal device sends the first token to the second terminal device according to the password information, the terminal device can generate a key according to the password information, and generate a key according to the password information. key, encrypt the first token, and then send the encrypted first token to the second terminal device.
  • 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.
  • the first terminal device and the second terminal device The device no longer needs to transmit keys, which can further improve the security of data transmission.
  • the method further includes:
  • the account data is encrypted according to the key, and the encrypted account data is sent to the second terminal device.
  • the method before sending the first token to the second terminal device according to the password information, the method further includes:
  • a local area network connection is established with the second terminal device, and the local area network connection is used to transmit the first token and/or the account data.
  • 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 The card is used by the cloud server to verify the first terminal device.
  • the cloud server can implement verification for the first terminal device, and can also determine which account to create the first token for.
  • the obtaining the identification information of the second terminal device and the password information of the local area network of the second terminal device includes:
  • the image of the identification code is analyzed to obtain the identification information of the second terminal device and the password information of the local area network of the second terminal device.
  • the method further includes:
  • the login status update information sent by the second terminal device is received.
  • the login status of the first application in the second terminal device can be synchronized to the first terminal device quickly and effectively.
  • embodiments of the present application provide a data processing method applied to a second terminal device.
  • the method includes:
  • 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 the first token. Whether there is a corresponding relationship between the token and the identification information of the second terminal device;
  • the access token sent by the cloud server is received, and the first application in the second terminal device is triggered to log in to the first account based on the access token.
  • 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 the identification information of the second terminal device, so that the cloud server verifies the second terminal.
  • the second terminal device can log in to the first account in the first application based on the access token sent by the cloud server, so that it can be effectively verified by the cloud server, safely and effectively
  • the account login status in the first terminal device is copied to the second terminal device, thereby effectively improving the comprehensiveness of data copying during the machine replacement process.
  • the obtaining the first token sent by the first terminal device may be by receiving the encrypted first token sent by the first terminal device, and according to the second terminal device The password information of the local area network and generate the key. Then, the encrypted first token is decrypted according to the key to obtain the first token.
  • the method further includes:
  • the access token includes identification information of the first account.
  • the method before obtaining the first token sent by the first terminal device, the method further includes:
  • the method before obtaining the first token sent by the first terminal device, the method further includes:
  • an image of the identification code is displayed.
  • the method further includes:
  • the data processing device may be a terminal device, or may be a chip or chip system in the terminal device.
  • the data processing device may include a display unit and a processing unit.
  • the display unit may be a display screen.
  • the display unit is used to perform the step of displaying, so that the terminal device realizes the first aspect or any possible method of the first aspect. A sending method described in Implementation.
  • the processing unit may be a processor.
  • the data processing device may further 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 sending method described in the first aspect or any possible implementation of the first aspect.
  • the processing unit may be a processor.
  • the processing unit executes instructions stored in the storage unit, so that the terminal device implements a sending method described in the first aspect or any possible implementation manner of the first aspect.
  • the storage unit may be a storage unit within the chip (eg, register, cache, etc.), or may be a storage unit in the terminal device located outside the chip (eg, read-only memory, random access memory, etc.).
  • the processing unit is configured to obtain the identification information of the second terminal device and the password information of the local area network of the second terminal device, and the first account is logged in the first application of the first terminal device;
  • the cloud server sends a token acquisition request, which carries the identification information.
  • the token acquisition request is used to request the cloud server to generate a first token corresponding to the first account, and Establishing a correspondence between the first token and the identification information; receiving the first token sent by the cloud server; and sending the first token to the second terminal device according to the password information.
  • Token the first token is used by the second terminal device to initiate a verification request to the cloud server for logging in to the first account in the first application.
  • the processing unit is specifically used to:
  • processing unit is also used to:
  • the account data is encrypted according to the key, and the encrypted account data is sent to the second terminal device.
  • processing unit is also used to:
  • a local area network connection is established with the second terminal device, and the local area network connection is used to transmit the first token and/or the account data.
  • 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.
  • the processing unit is specifically used to:
  • the image of the identification code is analyzed to obtain the identification information of the second terminal device and the password information of the local area network of the second terminal device.
  • processing unit is also used to:
  • the data processing device may be a terminal device, or may be a chip or chip system in the terminal device.
  • the data processing device may include a display unit and a processing unit.
  • the display unit may be a display screen.
  • the display unit is used to perform a display step, so that the terminal device implements a sending method described in the first aspect or any possible implementation manner of the first aspect.
  • the processing unit may be a processor.
  • the data processing device may further 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 sending method described in the first aspect or any possible implementation of the first aspect.
  • the processing unit may be a processor.
  • the processing unit executes instructions stored in the storage unit, so that the terminal device implements a sending method described in the first aspect or any possible implementation manner of the first aspect.
  • the storage unit may be a storage unit within the chip (eg, register, cache, etc.), or may be a storage unit in the terminal device located outside the chip (eg, read-only memory, random access memory, etc.).
  • the processing unit is configured to obtain the first token sent by the first terminal device; and send a verification request to the cloud server, where the verification request includes the first token and the second terminal device.
  • Identification information the verification request is used to request the cloud server to verify whether there is a corresponding relationship between the identification information of the first token and the second terminal device; after the verification passes, receive all
  • the access token sent by the cloud server is used to trigger the first application program in the second terminal device to log in to the first account based on the access token.
  • the processing unit is specifically used to:
  • processing unit is also used to:
  • the access token includes identification information of the first account.
  • processing unit is also used to:
  • 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 Used to transmit the first token and/or the account data.
  • the processing unit is further configured to: before obtaining the first token sent by the first terminal device, according to the identification information of the second terminal device and the second terminal device Password information of the local area network and generate an identification code;
  • a display unit configured to display the image of the identification code on the graphical user interface of the second terminal device.
  • the processing unit is further configured to: after triggering the first application program in the second terminal device to perform a login operation based on the access token, send a message to the first application program.
  • the terminal device sends login status update information, where the login status update information is used to indicate that the login status of the first application in the first terminal device is logged in.
  • embodiments of the present application provide an electronic device, including: a processor, a display screen, and an interface circuit.
  • the interface circuit is used to communicate with other devices; the display screen is used to perform display steps; the processor is used to run code instructions, To implement the first aspect or any method in any possible implementation manner of the first aspect.
  • embodiments of the present application provide an electronic device, including: a processor, a display screen, and an interface circuit.
  • the interface circuit is used to communicate with other devices; the display screen is used to perform display steps; the processor is used to run code instructions, To implement the second aspect or any method in any possible implementation manner of the second aspect.
  • embodiments of the present application provide a computer-readable storage medium that stores instructions. When the instructions are executed, to implement the first aspect or any possible implementation of the first aspect, or Any method of the second aspect or any possible implementation of the second aspect.
  • Figure 1 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
  • Figure 2 is a schematic diagram of the implementation of data transmission between new and old equipment provided by the embodiment of the present application;
  • FIG. 3 is a flow chart of the data processing method provided by the embodiment of the present application.
  • Figure 4 is a flow chart 2 of the data processing method provided by the embodiment of the present application.
  • Figure 5 is a schematic diagram of the implementation of collecting identification code images provided by the embodiment of the present application.
  • FIG. 6 is a schematic diagram of the implementation of a token acquisition request provided by an embodiment of this application.
  • Figure 7 is a schematic diagram of the implementation of transmitting the first token provided by the embodiment of the present application.
  • FIG. 8 is a flowchart three of the data processing method provided by the embodiment of the present application.
  • Figure 9 is a flow chart 4 of the data processing method provided by the embodiment of the present application.
  • Figure 10 is a system schematic diagram of the data processing method provided by the embodiment of the present application.
  • Figure 11 is a signaling interaction diagram of the data processing method provided by the embodiment of the present application.
  • Figure 12 is a schematic diagram of the implementation of data replication provided by the embodiment of the present application.
  • Figure 13 is a schematic diagram of the implementation of copying the login status of the first account provided by the embodiment of the present application.
  • Figure 14 is a schematic structural diagram of a data processing device provided by an embodiment of the present application.
  • Figure 15 is a schematic second structural diagram of a data processing device provided by an embodiment of the present application.
  • Figure 16 is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application.
  • words such as “first” and “second” are used to distinguish the same or similar items with basically the same functions and effects.
  • the interface of the first target function and the interface of the second target function are used to distinguish different response interfaces, and their order is not limited.
  • words such as “first” and “second” do not limit the number and execution order, and words such as “first” and “second” do not limit the number and execution order.
  • Terminal equipment includes terminal equipment, which can also be called terminal, user equipment (UE), mobile station (MS), mobile terminal (MT), etc.
  • Terminal devices can be mobile phones, smart TVs, wearable devices, tablets (Pads), computers with wireless transceiver functions, virtual reality (VR) terminal devices, augmented reality (AR) terminals Equipment, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grid, transportation Wireless terminals in transportation safety, wireless terminals in smart city, wireless terminals in smart home, etc.
  • the embodiments of this application do not limit the specific technology and specific equipment form used by the terminal equipment.
  • FIG. 1 shows a schematic structural diagram of a terminal device 100.
  • 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 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriberidentification module, SIM) card interface 195, etc.
  • SIM Subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyro 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, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal device 100.
  • the terminal device 100 may include more or less components than shown in the figures, or combine some components, or split some components, or arrange different components.
  • the components illustrated may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (GPU), an image signal processor ( image signal processor (ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • DSP digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit
  • the controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 110 . If the processor 110 needs to use the instructions or data again, it can be recalled from memory. Repeated access is avoided and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
  • processor 110 may include one or more interfaces.
  • Interfaces may include integrated circuits (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuitsound, I2S) interface, pulse code modulation (pulse code modulation, PCM) interface, universal asynchronous receiver/transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and/or universal serial bus ( universal serial bus, USB) interface, etc.
  • I2C integrated circuits
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • UART universal asynchronous receiver/transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (derail clock line, SCL).
  • processor 110 may include multiple sets of I2C buses.
  • the processor 110 can separately couple the touch sensor 180K, charger, flash, camera 193, etc. through different I2C bus interfaces.
  • the processor 110 can be coupled to the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to implement the touch function of the terminal device 100 .
  • the I2S interface can be used for audio communication.
  • processor 110 may include multiple sets of I2S buses.
  • the processor 110 can be coupled with the audio module 170 through the I2S bus to implement communication between the processor 110 and the audio module 170 .
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface to implement the function of answering calls through a Bluetooth headset.
  • the PCM interface can also be used for audio communications to sample, quantize and encode analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface to implement the function of answering calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • a UART interface is generally used to connect the processor 110 and the wireless communication module 160 .
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
  • MIPI interfaces include camera serial interface (CSI), display serial interface (displayserial interface, DSI), etc.
  • the processor 110 and the camera 193 communicate through the CSI interface to implement the shooting function of the terminal device 100.
  • the processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the terminal device 100.
  • the GPIO interface can be configured through software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the processor 110 with the camera 193, display screen 194, wireless communication module 160, audio module 170, sensor module 180, etc.
  • the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that complies with USB standard specifications, and may specifically 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 them. This interface can also be used to connect other electronic devices, such as AR devices, etc.
  • the interface connection relationships between the modules illustrated in the embodiments of the present application are schematic illustrations and do not constitute a structural limitation on the terminal device 100 .
  • the terminal device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the charging management module 140 may receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive wireless charging input through the wireless charging coil of the terminal device 100 . While charging the battery 142, the charging management module 140 can also provide power to the terminal device through the power management module 141.
  • 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, the wireless communication module 160, and the like.
  • the power management module 141 can also be used to monitor battery capacity, battery cycle times, battery health status (leakage, impedance) and other parameters.
  • the power management module 141 may also be provided in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • 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.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • the antennas in the terminal device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example: Antenna 1 can be reused as a diversity antenna for a wireless LAN. In other embodiments, antennas may be used in conjunction with tuning switches.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied to the terminal device 100.
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, perform filtering, amplification and other processing on the received electromagnetic waves, and transmit them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves through the antenna 1 for radiation.
  • at least part of the functional modules of the mobile communication module 150 may be disposed in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
  • a modem processor may include a modulator and a demodulator.
  • 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.
  • the application processor outputs sound signals through audio devices (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194.
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent of the processor 110 and may be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide information including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), and global navigation satellite systems applied on the terminal device 100 (global navigation satellite system, GNSS), frequency modulation (FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication technology
  • infrared technology infrared, IR
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • 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.
  • Wireless communication technologies can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (codedivision multiple access, CDMA), broadband code division multiple access address (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and /or IR technology, etc.
  • GNSS can include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou satellite navigation system (beidounavigation satellite system, BDS), quasi-zenith satellite system (quasi-zenith satellite system) , QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • Beidou satellite navigation system beidounavigation satellite system, BDS
  • quasi-zenith satellite system quasi-zenith satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the terminal device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is an image processing microprocessor and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • the display screen 194 is used to display images, videos, etc.
  • Display 194 includes a display panel.
  • the display panel can use 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 (active-matrix organic light emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • active-matrix organic light emitting diode active-matrix organic light emitting diode
  • AMOLED organic light-emitting diodes
  • FLED flexible light-emitting diodes
  • Miniled MicroLed, Micro-oLed, quantum dot light-emitting diodes (QLED), etc.
  • the terminal device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • the terminal device 100 can implement the shooting function through the ISP, camera 193, video codec, GPU, display screen 194, application processor, etc.
  • the ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, the light is transmitted to the camera sensor through the lens, the light signal is converted into an electrical signal, and the camera sensor passes the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided in the camera 193.
  • Camera 193 is used to capture still images or video.
  • the object passes through the lens to produce an optical image that is projected onto the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to convert it into a digital image signal.
  • ISP outputs digital image signals to DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats image signal.
  • the terminal device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the terminal device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
  • Video codecs are used to compress or decompress digital video.
  • the terminal device 100 may support one or more video codecs. In this way, the terminal device 100 can play or record videos in multiple encoding formats, such as moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
  • MPEG moving picture experts group
  • MPEG2 MPEG2, MPEG3, MPEG4, etc.
  • NPU is a neural network (NN) computing processor.
  • NN neural network
  • the NPU can realize intelligent cognitive applications of the terminal device 100, such as image recognition, face recognition, speech recognition, text understanding, etc.
  • 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 the data storage function. Such as saving music, videos, etc. files in external memory card.
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the internal memory 121 may include a program storage area and a data storage area.
  • the stored program area can store an operating system, at least one application program required for a function (such as a sound playback function, an image playback function, etc.).
  • the storage data area may store data created during use of the terminal device 100 (such as audio data, phone book, etc.).
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
  • the processor 110 executes various functional applications and data processing of the terminal device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the terminal device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playback, recording, etc.
  • 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. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
  • Speaker 170A also called “speaker” is used to convert audio electrical signals into sound signals.
  • the terminal device 100 can listen to music through the speaker 170A, or listen to hands-free calls.
  • Receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the terminal device 100 answers a call or a voice message, the voice can be heard by bringing the receiver 170B close to the human ear.
  • 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 close to the microphone 170C with the human mouth and input the sound signal to the microphone 170C.
  • the terminal device 100 may be provided with at least one microphone 170C. In other embodiments, the terminal device 100 may be provided with two microphones 170C, which in addition to collecting sound signals, may also implement a noise reduction function. In other embodiments, the terminal device 100 can also be equipped with three, four or more microphones 170C to achieve collection Sound signal, noise reduction, can also identify the sound source, realize directional recording function, etc.
  • the headphone interface 170D is used to connect wired headphones.
  • the headphone interface 170D may be a USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, or a Cellular Telecommunications Industry Association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA Cellular Telecommunications Industry Association of the USA
  • the pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals.
  • pressure sensor 180A may be disposed on display screen 194 .
  • pressure sensors 180A there are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc.
  • a capacitive pressure sensor may include at least two parallel plates of conductive material.
  • the terminal device 100 determines the intensity of the pressure based on the change in capacitance.
  • the terminal device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the terminal device 100 may also calculate the touched position based on the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch location but with different touch operation intensities may correspond to different operation instructions.
  • the gyro sensor 180B may be used to determine the motion posture of the terminal device 100 .
  • the angular velocity of the terminal device 100 about three axes may be determined by the gyro sensor 180B.
  • the gyro sensor 180B can be used for image stabilization. For example, when the shutter is pressed, the gyro sensor 180B detects the angle at which the terminal device 100 shakes, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shake of the terminal device 100 through reverse movement to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • 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.
  • Magnetic sensor 180D includes a Hall sensor.
  • the terminal device 100 can detect the opening and closing of the flip leather case using the magnetic sensor 180D.
  • the terminal device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. Then, based on the detected opening and closing status of the leather case or the opening and closing status of the flip cover, features such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the acceleration of the terminal device 100 in various 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 terminal devices and be used in applications such as horizontal and vertical screen switching, pedometers, etc.
  • the terminal device 100 can measure distance through infrared or laser. In some embodiments, when shooting a scene, the terminal device 100 can use the distance sensor 180F to measure distance to achieve fast focusing.
  • 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 through a light emitting diode.
  • the terminal device 100 detects infrared reflected light from nearby objects using photodiodes. 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 may determine that there is no object near the terminal device 100 .
  • the terminal device 100 can use the proximity light sensor 180G to detect when the user holds the terminal device 100 close to the ear for talking, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180G can also be used in holster mode, and pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 180L is used to sense ambient light brightness.
  • the terminal device 100 can adjust the brightness according to the perceived ambient light. Adaptively adjust the brightness of the display screen to 194 degrees.
  • 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 the pocket to prevent accidental touching.
  • Fingerprint sensor 180H is used to collect fingerprints.
  • the terminal device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, access application lock, fingerprint photography, fingerprint answering incoming calls, etc.
  • Temperature sensor 180J is used to detect temperature.
  • the terminal device 100 uses the temperature detected by the temperature sensor 180J to execute the temperature processing policy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the terminal device 100 reduces the performance of a processor located near the temperature sensor 180J in order 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 the low temperature causing the terminal device 100 to shut down abnormally. In some other embodiments, when the temperature is lower than another threshold, the terminal device 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also known as "touch device”.
  • the touch sensor 180K can be disposed on the display screen 194.
  • the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near the touch sensor 180K.
  • the touch sensor can pass the detected touch operation to the application processor to determine the touch event type.
  • Visual output related to the touch operation may be provided through display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the terminal device 100 in a position different from that of the display screen 194 .
  • Bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human body's vocal part.
  • the bone conduction sensor 180M can also contact the human body's pulse and receive blood pressure beating signals.
  • the bone conduction sensor 180M can also be provided in an earphone and combined into a bone conduction earphone.
  • the audio module 170 can analyze the voice signal based on the vibration signal of the vocal vibrating bone obtained by the bone conduction sensor 180M to implement the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to implement the heart rate detection function.
  • the buttons 190 include a power button, a volume button, etc.
  • Key 190 may be a mechanical key. It can also be a touch button.
  • 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 .
  • the motor 191 can generate vibration prompts.
  • the motor 191 can be used for vibration prompts for incoming calls and can also be used for touch vibration feedback.
  • touch operations acting on different applications can correspond to different vibration feedback effects.
  • the motor 191 can also respond to different vibration feedback effects for touch operations in different areas of the display screen 194 .
  • Different application scenarios such as time reminders, receiving information, alarm clocks, games, etc.
  • the touch vibration feedback effect can also be customized.
  • the indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, or may be used to indicate messages, missed calls, notifications, etc.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be connected to or 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.
  • SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card, etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. Multiple cards can be of the same type or different types.
  • the SIM card interface 195 is also compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • the terminal device 100 interacts with the network through the SIM card to realize calls and data communications. Letter and other functions.
  • the terminal device 100 adopts eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100 .
  • the software system of the terminal device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture, etc.
  • the embodiment of this application takes the Android system with a layered architecture as an example to illustrate the software structure of the terminal device 100 .
  • Figure 2 is a schematic diagram of the implementation of data transmission between old and new devices provided by an embodiment of the present application.
  • a data transmission channel can be established between the old terminal equipment and the new terminal equipment, and the data in the old terminal equipment can be transmitted to the new terminal equipment through the data transmission channel.
  • the data of many applications are currently stored in the corresponding cloud, and the account of the application can establish the data relationship between the user and the cloud, so the user can be logged in in the application account to obtain the corresponding data from the cloud.
  • account numbers are sensitive data and their security is relatively high
  • account data such as account number and password
  • the data risk is relatively high, so the current technology is still Migration of account login status is not supported.
  • this application proposes the following technical concept: Obtain the identification information of the new terminal device through the old terminal device, and the old terminal device initiates a request to the cloud server to inform the cloud server of the old terminal device
  • the account login operation may be performed later, and then the old terminal device initiates verification to the cloud server based on its identification information.
  • the cloud server passes the verification, the new terminal device is authorized to log in to the account, thereby ensuring the security of account login.
  • Figure 3 is a flow chart of the data processing method provided by the embodiment of the present application.
  • the method includes:
  • 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.
  • the first terminal device can be understood as the data provider of data migration, and the second terminal device can be understood as the data recipient of data migration.
  • the first account can be logged into the first application program of the first terminal device, and the first application program can be any application program in the first terminal device. This embodiment does not do this. limit.
  • the account login status of the specific applications to be transferred may be selected by the user, or may be the system default, which is not limited in this embodiment.
  • 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.
  • 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 The information can uniquely identify the terminal device.
  • the second terminal device in this embodiment can create a local area network.
  • the local area network here can be understood, for example.
  • password information in the local area network and the implementation of the specific password information can be set by the user. This embodiment does not limit this.
  • the first terminal device can also obtain the password information of the local area network of the second terminal device.
  • the token acquisition request carries identification information.
  • the token acquisition request is used to request the cloud server to generate the first token corresponding to the first account and establish the first token and identification information. correspondence between them.
  • the first terminal device After the first terminal device obtains the identification information of the second terminal device, it can already 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 problem is that the first terminal device cannot directly send the account data to the second terminal device, so in this embodiment, the cloud server can be requested for verification.
  • the first terminal device may send a token acquisition request to the cloud server, and the token acquisition request may include the above-obtained identification information of the second terminal device.
  • 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 to establish a corresponding relationship between the first token and the identification information of the second terminal device.
  • the function of the first token is for the subsequent cloud server to verify the second terminal device, and here the cloud server needs to establish a relationship between the first token corresponding to the first account and the identification information of the second terminal device.
  • the corresponding relationship is also for the cloud server to determine that the second terminal device may subsequently request to log in to the first account.
  • the cloud server can then determine whether the second terminal device can log in to the first account by verifying whether there is a correspondence between the first token sent by the second terminal device and the identification information of the second terminal device.
  • the cloud server 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 introduced above, the cloud server 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.
  • S304 Send the 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 in to the first account in the first application.
  • the first token can be sent to the second terminal device based on the password information.
  • the first token can be encrypted based on the password information, and then the encrypted first token can be sent. Or you can also perform corresponding function processing on the first token according to the password information, and then send the processed first token.
  • the second terminal device after receiving the first token, the second terminal device cannot log in to the account. It also needs to verify with the cloud server. Therefore, the first token in this embodiment is used for the second token.
  • the terminal device initiates a verification request to the cloud server. 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.
  • the data processing method provided by the embodiment of the present application includes: obtaining the identification information of the second terminal device and the password information of the local area network of the second terminal device, and the first account is logged in the first application program of the first terminal device.
  • the token acquisition request carries identification information.
  • the token acquisition request is used to request the cloud server to generate the first token corresponding to the first account and establish a relationship between the first token and the identification information. correspondence between.
  • a first token is sent to the second terminal device.
  • the first token is used by the second terminal device to initiate a verification request to the cloud server for logging in to the first account in the first application.
  • the cloud server 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 link between the first token and the identification information of the second terminal device. Correspondence, so that the cloud server can be informed that the second terminal device may log in to the first account in the future, and then send the first token to the second terminal device, so that the second terminal device can send the first token to the cloud server based on the first token.
  • Figure 4 is a flow chart 2 of the data processing method provided by the embodiment of the present application.
  • Figure 5 is a flow chart of the data processing method provided by the present application.
  • the embodiment provides a schematic diagram of the implementation of collecting the identification code image.
  • Figure 6 is a schematic diagram of the implementation of the token acquisition request provided by the embodiment of the present application.
  • Figure 7 is a schematic diagram of the implementation of transmitting the first token provided by the embodiment of the present application.
  • the method includes:
  • the first terminal device wants to obtain the identification information of the second terminal device and the password information of the local area network of the second terminal device.
  • the second terminal device can, for example, obtain the identification information according to its identification information. information and password information of the local area network to generate an identification code.
  • the second terminal device can display the generated identification code on its graphical user interface, and then the first terminal device can collect an image of the identification code displayed on the graphical user interface of the second terminal device.
  • 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 the graphics of the second terminal device through a camera device. An image of the identifier displayed on the user interface.
  • S402. Analyze 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.
  • the first terminal device After acquiring the image of the identification code, the first terminal device can analyze the image of the identification code, thereby obtaining the identification information of the second terminal device and the password information of the local area network of the second terminal device.
  • the current switching operation between terminal devices can be completed through a switching application. Therefore, the identification code is generated as described above, and the identification code is displayed on the graphical user interface of the second terminal device.
  • the code can be implemented, for example, through a switching application in the second terminal device.
  • the first terminal device scans to obtain and parse the image of the identification code, which can also be implemented through the switching application program in the first terminal device. Or the first terminal device can also be implemented through any application program that can scan and parse, and this embodiment does not limit this.
  • the first terminal device and the second terminal device can, for example, establish a preliminary connection channel through a Bluetooth connection or other connection methods, and then transmit the identification information of the second terminal device and the identification information of the second terminal device through the established connection channel.
  • Password information The specific implementation method of transmitting identification information and password information can be selected and set according to actual needs, and this embodiment does not limit this.
  • the token acquisition request carries identification information.
  • the token acquisition request is used to request the cloud server to generate the first token corresponding to the first account and establish the first token and identification. Correspondence between information.
  • S403 is similar to the implementation of S202 introduced above.
  • the relevant implementation of the token acquisition request will be further introduced in detail in conjunction with Figure 6 .
  • 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 the above introduction.
  • the token acquisition request may also include the access token (access token, AT) of the first terminal device.
  • the access token is created by the cloud server when the device logs in to 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 use the access token to initiate verification to the cloud server. If the verification passes, the cloud server will allow the device to access the corresponding data. .
  • the access token can include SID and a list of privileges assigned to the user account, where SID (Security Identifiers) is a unique number used to identify users, groups and computer accounts. It is understandable that each Each user account corresponds to a unique SID, which is used to distinguish different user accounts.
  • the access token may correspond to the first account logged in by the first terminal device, and the access token may include the SID of the first account.
  • the access token of the first terminal device is included in the token acquisition request. On the one hand, it is to allow the cloud server to verify whether the first terminal device is an authorized device. On the other hand, it is to allow the cloud server to determine which account it is currently targeting. for processing.
  • the cloud server can verify the access token of the first terminal device. After passing the verification, it can generate the first token corresponding to the first account and establish Correspondence between the identification information of the second terminal device and the first token.
  • the reason why the cloud server can determine that the first token corresponding to the first account is generated is because the access token includes the identification information of the first account.
  • 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 it is currently necessary to generate the first token for the first account. This embodiment does not limit the specific implementation method of the cloud server determining the first account.
  • 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. First token.
  • each application program corresponds to its own cloud server, so the interaction with the cloud server needs to be completed through the first application program in the first terminal device.
  • Operations other than interaction with the cloud server can be understood as being implemented by the switching application.
  • the switching application can perform a series of data processing and data transmission operations introduced in this application, its specific implementation method You can choose according to actual needs.
  • the switching application introduced above can pass the obtained 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 based on the identification information, and receives The first token sent by the cloud server.
  • the first terminal device needs to send the first token to the second terminal device.
  • a data transmission channel needs to be established between the first terminal device and the second terminal device.
  • the second terminal device has established a LAN, and the first terminal device has obtained the password information of the LAN of the second terminal device, then the second terminal device then obtains the password information of the LAN of the second terminal device. Name information, you can access the LAN of the second terminal device.
  • the first terminal device in this embodiment can obtain the name information of the local area network of the second terminal device.
  • the second terminal device can carry the name information of the local area network in the above-mentioned Therefore, the first terminal device can obtain the name information of the local area network of the second terminal device through the above-described operation of parsing the image of the identification code.
  • the first terminal device can also obtain the name information of the local area network of the second terminal device by searching nearby local area networks.
  • the first terminal device can also obtain the name information of the local area network of the second terminal device according to 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. It can be based on the actual situation. Select and set as required.
  • the current operation of obtaining the name information of the local area network is not limited to the current sequence of steps, and the execution time of the operation can be determined according to the actual situation.
  • the local area network connection is used to transmit the first token and/or account data.
  • the first terminal device After obtaining the name information and password information of the LAN of the second terminal device, the first terminal device can access the LAN of the second terminal device based on the name information and password information, thereby establishing a LAN 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.
  • the account data can include, for example, account ID, avatar information, user setting information, record information, etc.
  • the record information can be chat records, friend list information, etc.; for another example, for image processing Class application, the recorded information can be image information, image processing information, etc.
  • the embodiment does not limit the specific implementation method of the account information. Any information associated with the first account can be used as the account information in this embodiment.
  • 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 program, or stored in the storage space corresponding to the first application program.
  • the data interface of the first terminal device can be called through the switching application program, the first application program in the first terminal device can be accessed, and the account data corresponding to the first account can be obtained in the first application program.
  • 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 can share data between different applications.
  • the account information is stored locally on the first terminal device, so through the first terminal device and the second terminal
  • the LAN between devices directly transmits the account data to the second terminal device, which can avoid the need for the second terminal device to obtain the account data from the cloud, which can effectively improve the integrity of data replication during the replacement process.
  • the first terminal device wants to send the first token and account data to the second terminal device.
  • the first terminal device can, for example, process the first token and account data. Encrypted before transmission.
  • 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 implement corresponding decryption, so that the data transmission is effective.
  • the second terminal device has established a local area network, then 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, also That is to say, the password information is information held by both the first terminal device and the second terminal device.
  • the key can be generated based on the password information of the local area network.
  • a symmetric key can be generated.
  • any data encryption algorithm can be used to generate the key. This embodiment does not limit this, as long as it is generated based on the password information of the local area network.
  • the first token can be encrypted according to the key.
  • the account data of the first account can also be encrypted based on the key.
  • the first terminal device can send the encrypted first token to the second terminal device.
  • the first terminal device can encrypt the first token according to the password information of the LAN, and then the second terminal device receives the encrypted first token, and then according to By decrypting the password information of the LAN, the transmission of the first token can be completed safely.
  • the method of transmitting account data is similar and will not be described again here.
  • Encrypting the first token and account data before sending them can effectively ensure the security of the transmission process of the first token and account data.
  • the account data in this embodiment is encrypted based on 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 additional key information. This can more effectively ensure the transmission security of the first token and account data. Completeness.
  • the second terminal device 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 requested the cloud server in advance to create a corresponding relationship between the identification information of the second terminal device and the first token, the second terminal device can complete logging in to the first account in the first application, thereby effectively Implement the duplication of account login status.
  • 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 third terminal device can be simply and effectively processed.
  • the identification information of the second terminal device and the password information of the local area network of the second terminal device are synchronized to the first terminal device. In this process, there is no need to establish a data transmission channel, and the information synchronization is completed. And the first terminal device and the second terminal device establish a local area network connection, thereby effectively realizing the transmission of the first token and/or account data.
  • the key will be used for encryption before the transmission operation is performed, thus effectively ensuring the security of data transmission.
  • the key in this embodiment is generated based on the password information of the local area network of the second terminal device. Because both the first terminal device and the second terminal device hold the password information, it can effectively ensure that the first terminal device performs Encryption and corresponding decryption can be implemented 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, thereby further improving the security of data transmission.
  • the method includes:
  • the second terminal device in this embodiment can obtain the first token sent by the first terminal device.
  • the verification request includes the identification information of the first token and the second terminal device.
  • the verification request is used to request the cloud server to verify the identification information of the first token and the second terminal device. Is there any correspondence between them?
  • the first token is allocated by the first terminal device to 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, A verification request may be sent to the cloud server, and the verification request may include the first token, and the verification request may also include identification information of the second terminal device.
  • the cloud server not only generated the first token corresponding to the first account according to the request of the first terminal device, but also established the relationship between the first token and the identification information of the second terminal device.
  • Establishing a corresponding relationship means that the cloud server can determine that the second terminal device may log in to the first account, which means that the cloud server can determine that the second terminal device is a trusted account.
  • the verification request sent by the second terminal device may 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.
  • the cloud server can also set a validity period for the first token and/or the corresponding relationship. That is to say, the second terminal device only sends a verification request to the cloud server within the validity period, and the cloud server Only then will the verification pass. Otherwise, it can be determined that the verification fails.
  • the validity period can be, for example, Set to 7 days, 3 days, etc., its function is to limit the second terminal device to verify 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. sex.
  • the cloud server may determine that the first terminal device has not previously notified the second terminal device that it may log in to the third terminal device.
  • the cloud server can determine that the second terminal device is an untrusted device, so the cloud server can determine that the verification fails. If the verification fails, the cloud server may determine that the second terminal device is not allowed to log in to the first account.
  • the cloud server can determine that the second terminal device is the one previously informed by the first terminal device.
  • the device that may log in to the first account means that the cloud server can determine that the second terminal device is a trusted device, so it can be sure that the verification has passed. If the verification passes, the cloud server may determine to allow the second terminal device to log in to the first account.
  • the cloud server when the cloud server authorizes the terminal device to log in to the corresponding account, the cloud server usually sends the access token corresponding to the account to the terminal device to instruct the terminal device to log in to the corresponding account.
  • 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 your first account.
  • the second terminal device can trigger the first application program in the second terminal device to log in to the first account based on the access token.
  • the application in the terminal device logs in to the account, it usually uses the account number and password, or uses the account number and verification code to initiate verification to the cloud server, so that the cloud server The server determines whether the current terminal device can log in to the account.
  • the cloud server passes the verification of the account and password (or verification code)
  • 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.
  • the method adopted in this embodiment is to initiate verification to the cloud server based on the identification information of the first token and the second terminal device.
  • this implementation method is more secure. is higher, and can also effectively obtain the access token of the login account, so that on the basis of ensuring the verification security, the account login status of the first application in the first terminal device can be effectively copied. to the second terminal device.
  • the data processing method provided by the embodiment of the present application includes: obtaining the first token sent by the first terminal device. Send a verification request to the cloud server.
  • the verification request includes the identification information of the first token and the second terminal device.
  • the verification request is used to request the cloud server to verify the relationship between the first token and the identification information of the second terminal device. Whether there is a corresponding relationship.
  • the access token sent by the cloud server is received, and based on the access token, the first application in the second terminal device is triggered to log in to the first account.
  • the verification request By sending a verification request to the cloud server based on 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 terminal device.
  • the second The 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 safely and effectively copied to the third application under the verification of the cloud server. In the second terminal device, this can effectively improve the comprehensiveness of data replication during the replacement process.
  • Figure 9 is the flow of the data processing method provided by the embodiment of the present application.
  • the method includes:
  • the second terminal device has established a local area network, and the second terminal device wants to perform data transmission with the first terminal device. Therefore, the second terminal device can communicate with the first terminal device based on the name information and password information of the local area network it has established. The first terminal device establishes a local area network connection.
  • the first terminal device and the second terminal device can transmit data based on the connected local area network, where the transmitted data may include the first token and/or account data.
  • the first terminal device and the second terminal device can transmit data. 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.
  • the second terminal device Because the first token received by the second terminal device has been 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 based on the password information of the local area network in this embodiment.
  • 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 based on 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 key can be effectively implemented without exchanging keys. Encryption and decryption of transmitted data.
  • both the first terminal device and the second terminal device can 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.
  • the second terminal device 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 the identification code on the graphical user interface of the second terminal device. Image showing identification code.
  • 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.
  • the above-mentioned processing can also be performed for the identification information of the second terminal device, that is to say, the identification information of the second terminal device can be included in the generated identification code.
  • the identification information of the second terminal device can be included in the generated identification code.
  • the second terminal device After generating the key, the second terminal device can decrypt the received encrypted first token according to the key, thereby obtaining the first token.
  • 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 data sent by the first terminal device. The account data is obtained, and then the second terminal device can decrypt the encrypted account data according to the key, thereby obtaining the account data.
  • the specific implementation method please refer to the description of the above embodiment, which will not be described again here.
  • the verification request includes the identification information of the first token and the second terminal device.
  • the verification request is used to request the cloud server to verify the identification information of the first token and the second terminal device. Is there any correspondence between them?
  • the access token is used for the third terminal device in the second terminal device.
  • An application login account It is also important for the first application to determine which account to log in to.
  • the access token in this embodiment includes the identification information of the first account to ensure that the first application on the second terminal device logs in to the third account.
  • An account is provided, so that the first account logged in by the first application program in the first terminal device can be effectively copied to the first application program in the second terminal device to also log in.
  • 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 third terminal device can be simply and effectively processed.
  • the identification information of the second terminal device and the password information of the local area network of the second terminal device are synchronized to the first terminal device. In this process, there is no need to establish a data transmission channel, and the information synchronization is completed. And the first terminal device and the second terminal device establish a local area network connection, thereby effectively realizing the transmission of the first token and/or account data.
  • the key will be used for encryption before the transmission operation is performed, thus effectively ensuring the security of data transmission.
  • the key in this embodiment is generated based on the password information of the local area network of the second terminal device. Because both the first terminal device and the second terminal device hold the password information, it can effectively ensure that the first terminal device performs Encryption and corresponding decryption can be implemented 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, thereby further improving the security of data transmission.
  • Figure 10 is a detailed description of the data processing method provided by the present application.
  • Figure 11 is a signaling interaction diagram of the data processing method provided by the embodiment of the present application.
  • the execution device may include a second terminal device (old terminal device), a first terminal device, and a cloud server.
  • both the second terminal device and the first terminal device include a switching application program and a first application program respectively.
  • the switching application is used to perform a series of data interaction processes between the first terminal device and the second terminal device, and the first application is to copy the account login status between the first terminal device and the second terminal device.
  • the specific implementation of the application can be selected according to actual needs.
  • the first application is used for and cloud Interact with the end server to complete corresponding requests, verification, etc.
  • the data transfer protocol in this embodiment can be, for example, FTP (File Transfer Protocol) protocol, or it can also be any other possible protocol.
  • the switching application program in the first terminal device and the first application program participate together to mainly complete key negotiation and data packaging and encryption. and interacts with the cloud server to complete the registration of the first token for verification on the second terminal device.
  • the switching application in the second terminal device and the first application participate together to mainly complete the data decryption and cloud server authentication process.
  • the cloud server mainly completes the login authentication of the account and the authorization of the first token. And after the authentication of the second terminal device is completed, the access token is issued.
  • 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.
  • the switching application in the second terminal device sends query information to the first application in the second terminal device.
  • the query information is used to query whether the account logged in by the first application supports cloning.
  • the switching 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.
  • the switching application can be opened in the second terminal device.
  • the second terminal device can respond to the user opening the switching application. operation to send query information.
  • a trigger control can be set in the switching application, and after detecting the user's click operation on the trigger control, the query information is sent to the first application.
  • the first application program in the second terminal device sends return information to the switch application program in the second terminal device.
  • the return information is used to indicate whether the account logged in by the first application program supports cloning.
  • the first application program in the second terminal device can query whether the account logged in by the first application program supports cloning. For example, the first application stores a tag for the account it logs in to determine whether the account it logs in supports cloning. Or the first application can send query information to the cloud server to determine whether the account it is logged in to 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.
  • the first application After determining whether the first account supports cloning, the first application will send return information to the device switching application. Subsequent operations will be performed in this embodiment only when the returned information indicates that the first account logged in by the first application supports cloning.
  • the switching application in the second terminal device obtains the identification information of the second terminal device.
  • the switching application can query the identification information of the second terminal device by itself, or it can also Therefore, the switching application program requests the first application program to query the identification information of the second terminal device.
  • the switching application program of the second terminal device generates an identification code based on 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.
  • the switching application of the first terminal device collects the 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 local area network of the second terminal device. password information.
  • the switching application program of the first terminal device sends the identification information and password information of the second terminal device to the first application program.
  • the first application program of the first terminal device sends a token acquisition request to the cloud server.
  • 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.
  • the cloud server In response to the token acquisition request, the cloud server generates a first token corresponding to the first account, and establishes a corresponding relationship between the first token and the identification information of the second terminal device.
  • the cloud server can, for example, verify the access token of the first terminal device, and if the verification passes, then perform the operation of generating the first token and proposing a corresponding relationship. At the same time, by verifying the access token, the cloud server can also determine that the first token is currently being generated for the first account.
  • the cloud server sends the first token to the first application of the first terminal device.
  • the first application program 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.
  • the first application program of the first terminal device sends the encrypted first token and the encrypted account data to the switching application program of the first terminal device.
  • the switching application program of the first terminal device establishes a LAN connection with the second terminal device based on the name information and password information of the LAN of the second terminal device.
  • the device switching application of the first terminal device sends the encrypted first token and the encrypted account data to the device switching application of the second terminal device through the connection established above.
  • the switching application program of the second terminal device sends the encrypted first token, the encrypted account data, and the password information to the first application program of the second terminal device.
  • the first application program 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.
  • the first application program of the second terminal device sends a verification request to the cloud server, and the verification request includes the first token and the identification information of the second terminal device.
  • the cloud server verifies whether there is a corresponding relationship between the first token and the identification information of the second terminal device.
  • the cloud server sends the access token of the first account to the first application of the second terminal device.
  • the first application of the second terminal device logs in to the first account based on the access token, and performs data recovery based on the received account data.
  • the data recovery here can, for example, display the user's avatar, restore the user's settings, etc., depending on the specific Implementation of account data.
  • the second terminal device can also send the login information update status 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 first terminal device is logged in. That is to say, the first terminal device is informed that the login of its first account has been completed.
  • the transmission operation of updating the login information status can be completed by interaction between the switching applications through the LAN, for example.
  • the second terminal device can also send a login information update status to a trusted device that has the email address, mobile phone number, etc. reserved for account registration, to inform it that it has successfully logged in to the first account.
  • the data interaction 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 program 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 required data interaction operations.
  • the first account logged in by the first application program in the first terminal device can also be logged in by the second application program in the second terminal device, so that it can be effectively completed automatically. Transfer of account login status.
  • Figure 12 is a schematic diagram of the implementation of data replication provided by the embodiment of the present application.
  • the first terminal device includes a user interface (User Interface, UI) process and a service process
  • the second terminal device also includes a UI process and a service process.
  • UI User Interface
  • 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.
  • 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.
  • the first terminal device and the second terminal device can establish a local area network connection through the connection unit, and transmit the socket (socket) message of the session service signaling through the session management unit, for example, what data should be transmitted after synchronizing with each other, etc. .
  • the transmission client unit and the transmission server unit are used to perform formal data transmission, which may include, for example, the account data introduced above, the first token, etc.
  • 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, Android interface definition language). And, after receiving the data, the transmission server 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 program.
  • AIDL Android Interface Definition Language, Android interface definition language
  • the underlying implementations may include, for example, the media library and basic data DB shown in Figure 12. base, database), PMS (Power Manager Service, power management service), file backup (FileBackup) unit, driver, etc.
  • Figure 13 is a schematic diagram of the implementation of copying the login status of the first account provided by the embodiment of the present application.
  • the first account in the second terminal device 1302 can be safely and effectively logged in.
  • 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.
  • Figure 14 is a schematic structural diagram of a data processing device provided by an embodiment of the present application. As shown in Figure 14, the device 140 includes: a display unit 1401 and a processing unit 1402.
  • Processing unit 1402 used for:
  • the first token is sent to the second terminal device, and the first token is used by the second terminal device to initiate logging in to the first application program in the cloud server. Account verification request.
  • processing unit 1402 is specifically used to:
  • processing unit 1402 is also used to:
  • the account data is encrypted according to the key, and the encrypted account data is sent to the second terminal device.
  • processing unit 1402 is also used to:
  • a local area network connection is established with the second terminal device, and the local area network connection is used to transmit the first token and/or the account data.
  • 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.
  • processing unit 1402 is specifically used to:
  • the image of the identification code is analyzed to obtain the identification information of the second terminal device and the password information of the local area network of the second terminal device.
  • processing unit 1402 is also used to:
  • the login status update information sent by the second terminal device is received.
  • the device provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principles and technical effects are similar, and will not be described again in this embodiment.
  • Figure 15 is a schematic second structural diagram of a data processing device provided by an embodiment of the present application. As shown in Figure 15, the device 150 includes: a display unit 1501 and a processing unit 1502.
  • Processing unit 1502 used for:
  • the first terminal device sends a verification request to the cloud server, where the verification request includes the first token and the identification information of the second terminal device, and the verification request is Requesting 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 passes, receiving the access token sent by the cloud server, And trigger the first application program in the second terminal device to log in to the first account according to the access token.
  • processing unit 1502 is specifically used to:
  • processing unit 1502 is also used to:
  • the access token includes identification information of the first account.
  • processing unit 1502 is also used to:
  • 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 Used to transmit the first token and/or the account data.
  • the processing unit 1502 is further configured to: before obtaining the first token sent by the first terminal device, according to the identification information of the second terminal device and the second terminal Password information of the device's local area network to generate an identification code;
  • the display unit 1501 is configured to display the image of the identification code on the graphical user interface of the second terminal device.
  • the processing unit 1502 is further configured to: after triggering the first application program in the second terminal device to perform a login operation based on the access token, send a message to the third terminal device.
  • a terminal device sends login status update information, and the login status update information is used to indicate that the login status of the first application in the first terminal device is logged in.
  • FIG. 16 is a schematic diagram of the hardware structure of the electronic device provided by an embodiment of the present application.
  • the computer-executed instructions in the embodiments of the present application may also be called application codes, which are not specifically limited in the embodiments of the present application.
  • the interface circuit 1103 may also include a transmitter and/or a receiver.
  • the above-mentioned processor 1102 may include one or more CPUs, or other general-purpose processors, digital signal processors (digital signal processors, DSPs), application specific integrated circuits (application specific integrated circuits, ASICs), etc.
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
  • the steps of the disclosed method can be directly embodied as executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
  • An embodiment of the present application also provides a computer-readable storage medium.
  • the methods described in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the functionality may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
  • Computer-readable media may include computer storage media and communication media and may include any medium that can transfer a computer program from one place to another.
  • the storage media can be any target media that can be accessed by the computer.
  • the computer-readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, or may be targeted to carry any other medium or medium that stores the required program code in the form of instructions or data structures and accessible by a computer.
  • any connection is properly termed a computer-readable medium.
  • coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave
  • coaxial Cables, fiber optic cables, twisted pairs, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of medium.
  • Disk and optical disc includes optical disc, laser disc, optical disc, Digital Versatile Disc (DVD), floppy disk, and Blu-ray disc, where disks typically reproduce data magnetically, while optical discs reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.
  • Embodiments of the present application are described with reference to flowcharts and/or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present application. It will be understood that each process and/or block in the flowchart illustrations and/or block diagrams, and combinations of processes and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processing unit of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine, such that the instructions executed by the processing unit of the computer or other programmable data processing device produce a A device for realizing the functions specified in one process or multiple processes of the flowchart and/or one block or multiple blocks of the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • Telephonic Communication Services (AREA)

Abstract

本申请实施例提供了一种数据处理方法及电子设备,涉及终端技术领域,方法包括:获取第二终端设备的标识信息和第二终端设备的局域网络的密码信息。向云端服务器发送令牌获取请求。接收云端服务器发送的第一令牌。根据密码信息,向第二终端设备发送第一令牌,第一令牌用于第二终端设备向云端服务器发起在第一应用程序中登录第一账号的校验请求。这种实施方式中,在云端服务器的协助下,完成第二终端设备登录第一账号的验证,从而可以将账号的登录状态从第一终端设备复制到第二终端设备,以有效的增强换机过程中数据复制的全面性。

Description

数据处理方法及电子设备
本申请要求于2022年08月17日提交中国国家知识产权局、申请号为202210988235.0、申请名称为“数据处理方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端技术领域,尤其涉及一种数据处理方法及电子设备。
背景技术
当前技术下,终端设备更新换代的速度比较快,在用户更换终端设备时,通常需要将旧的终端设备中的数据复制到新的终端设备中。
目前存在支持在新旧设备之间进行数据复制的应用程序,这些应用程序可以支持设备中大部分本地数据的复制,比如说图片、视频、短信、应用等等。然而,随着应用程序逐步的云化,目前很多应用程序的数据都存储在对应的云端,当在应用程序中登录用户的账号之后,就可以从云端获取相应的数据。
但是,因为账号的安全性较高,直接在设备间进行账号数据的传输风险比较高,因此目前的技术尚不支持进行账号数据的迁移。
发明内容
本申请提供一种数据处理方法及电子设备,可以在云端服务器的协助下,完成第二终端设备登录第一账号的验证,从而可以将账号的登录状态从第一终端设备复制到第二终端设备,以有效的增强换机过程中数据复制的全面性。
第一方面,本申请实施例提供一种数据处理方法,应用于第一终端设备,所述方法包括:
获取第二终端设备的标识信息和所述第二终端设备的局域网络的密码信息,所述第一终端设备的第一应用程序中登录有第一账号;
向云端服务器发送令牌获取请求,所述令牌获取请求中携带有所述标识信息,所述令牌获取请求用于请求所述云端服务器,生成所述第一账号对应的第一令牌,并建立所述第一令牌和所述标识信息之间的对应关系;
接收所述云端服务器发送的所述第一令牌;
根据所述密码信息,向所述第二终端设备发送所述第一令牌,所述第一令牌用于所述第二终端设备向云端服务器发起在第一应用程序中登录所述第一账号的校验请求。
这种实施方式中,通过向云端服务器发送令牌获取请求,以使得云端服务器生成第一终端设备所登录的第一账号所对应的第一令牌,并且创建第一令牌和第二终端设备的标识信息之间的对应关系,从而可以告知云端服务器第二终端设备之后可能会进行第一账号的登录,之后再将第一令牌发送给第二终端设备,以使得第二终端设备根据 第一令牌向云端服务器发起登录第一应用程序的校验请求,从而可以在云端服务器的协助下,完成第二终端设备登录第一账号的验证,从而可以将账号的登录状态从第一终端设备复制到第二终端设备,以有效的增强换机过程中数据复制的全面性。
在一种可能的实现方式中,终端设备在根据所述密码信息,向所述第二终端设备发送所述第一令牌时,可以根据所述密码信息,生成密钥,并且根据所述密钥,对所述第一令牌进行加密,之后向所述第二终端设备发送加密后的所述第一令牌。
因为第一终端设备和第二终端设备都持有该密码信息,因此可以有效保证第一终端设备进行的加密,在第二终端设备侧可以实现相应的解密,同时第一终端设备和第二终端设备也不需要再进行密钥的传输,从而可以进一步的提升数据传输的安全性。
在一种可能的实现方式中,所述方法还包括:
调用所述第一终端设备的数据接口,以访问所述第一终端设备中的第一应用程序;
在所述第一应用程序中,获取所述第一账号对应的账号数据;
根据所述密钥对所述账号数据进行加密,并向所述第二终端设备发送加密后的所述账号数据。
通过第一终端设备和第二终端设备之间的局域网,直接将账号数据传输给第二终端设备,就可以避免第二终端设备之后还需要再从云端获取账号数据,进而可以有效的提升换机过程中的数据复制完整性。
在一种可能的实现方式中,所述根据所述密码信息,向所述第二终端设备发送所述第一令牌之前,所述方法还包括:
获取所述第二终端设备的局域网络的名称信息;
根据所述名称信息和所述密码信息,与所述第二终端设备建立局域网连接,所述局域网连接用于传输所述第一令牌和/或所述账号数据。
在一种可能的实现方式中,所述令牌获取请求中还携带有所述第一终端设备的访问令牌,所述访问令牌中包括所述第一账号的标识信息;所述访问令牌用于所述云端服务器对所述第一终端设备进行校验。
这种实施方式中,可以有效保证云端服务器可以实现针对第一终端设备的验证,同时还可以确定针对哪个账号创建第一令牌。
在一种可能的实现方式中,所述获取第二终端设备的标识信息和所述第二终端设备的局域网络的密码信息,包括:
采集所述第二终端设备的图形用户界面上展示的识别码的图像;
对所述识别码的图像进行解析,得到所述第二终端设备的标识信息和所述第二终端设备的局域网络的密码信息。
在此过程中无需建立数据传输通道,就在第一终端设备和第二终端设备之间,完成了第二终端设备的标识信息和第二终端设备的局域网络的密码信息的同步。
在一种可能的实现方式中,所述方法还包括:
在所述第二终端设备中的第一应用程序的登录状态更新为已登录之后,接收所述第二终端设备发送的登录状态更新信息。
这种实施方式中,可以快速有效的将第二终端设备中的第一应用程序的登录状态同步给第一终端设备。
第二方面,本申请实施例提供一种数据处理方法,应用于第二终端设备,所述方法包括:
获取第一终端设备发送的第一令牌;
向云端服务器发送校验请求,所述校验请求中包括所述第一令牌以及所述第二终端设备的标识信息,所述校验请求用于请求所述云端服务器校验所述第一令牌和所述第二终端设备的标识信息之间是否存在对应关系;
在所述校验通过之后,接收所述云端服务器发送的访问令牌,并根据所述访问令牌,触发所述第二终端设备中的第一应用程序登录第一账号。
这种实施方式中,通过根据第一终端设备发送的第一令牌,向云端服务器发送校验请求,在校验请求中还包括第二终端设备的标识信息,以使得云端服务器验证第二终端设备是否可以登录第一账号,在验证通过之后,第二终端设备根据云端服务器发送的访问令牌,在第一应用程序中登录第一账号,从而可以有效的在云端服务器的验证下,安全有效的将第一终端设备中的账号登录状态,复制到第二终端设备中,从而可以有效的提升换机处理过程中数据复制的全面性。
在一种可能的实现方式中,所述获取第一终端设备发送的第一令牌,可以通过接收所述第一终端设备发送的加密后的第一令牌,并且根据所述第二终端设备的局域网络的密码信息,生成密钥。之后再根据所述密钥,对所述加密后的第一令牌进行解密,得到所述第一令牌。
在一种可能的实现方式中,所述方法还包括:
接收所述第一终端设备发送的加密后的账号数据;
根据所述密钥对所述加密后的账号数据进行解密,得到所述账号数据。
在一种可能的实现方式中,所述访问令牌中包括所述第一账号的标识信息。
在一种可能的实现方式中,所述获取第一终端设备发送的第一令牌之前,所述方法还包括:
根据所述第二终端设备的局域网络的名称信息和所述密码信息,与所述第一终端设备建立局域网连接,所述局域网连接用于传输所述第一令牌和/或所述账号数据。
在一种可能的实现方式中,所述获取第一终端设备发送的第一令牌之前,所述方法还包括:
根据所述第二终端设备的标识信息和所述第二终端设备的局域网络的密码信息,生成识别码;
在所述第二终端设备的图形用户界面上,展示所述识别码的图像。
在一种可能的实现方式中,所述根据所述访问令牌,触发所述第二终端设备中的第一应用程序执行登录操作之后,所述方法还包括:
向所述第一终端设备发送登录状态更新信息,所述登录状态更新信息用于指示所述第一终端设备中的第一应用程序的登录状态为已登录。
第三方面,本申请实施例提供一种数据处理装置,该数据处理装置可以是终端设备,也可以是终端设备内的芯片或者芯片系统。该数据处理装置可以包括显示单元和处理单元。当该数据处理装置是终端设备时,该处显示单元可以是显示屏。该显示单元用于执行显示的步骤,以使该终端设备实现第一方面或第一方面的任意一种可能的 实现方式中描述的一种寄件方法。当该数据处理装置是终端设备时,该处理单元可以是处理器。该数据处理装置还可以包括存储单元,该存储单元可以是存储器。该存储单元用于存储指令,该处理单元执行该存储单元所存储的指令,以使该终端设备实现第一方面或第一方面的任意一种可能的实现方式中描述的一种寄件方法。当该数据处理装置是终端设备内的芯片或者芯片系统时,该处理单元可以是处理器。该处理单元执行存储单元所存储的指令,以使该终端设备实现第一方面或第一方面的任意一种可能的实现方式中描述的一种寄件方法。该存储单元可以是该芯片内的存储单元(例如,寄存器、缓存等),也可以是该终端设备内的位于该芯片外部的存储单元(例如,只读存储器、随机存取存储器等)。
示例性的,处理单元,用于获取第二终端设备的标识信息和所述第二终端设备的局域网络的密码信息,所述第一终端设备的第一应用程序中登录有第一账号;向云端服务器发送令牌获取请求,所述令牌获取请求中携带有所述标识信息,所述令牌获取请求用于请求所述云端服务器,生成所述第一账号对应的第一令牌,并建立所述第一令牌和所述标识信息之间的对应关系;接收所述云端服务器发送的所述第一令牌;根据所述密码信息,向所述第二终端设备发送所述第一令牌,所述第一令牌用于所述第二终端设备向云端服务器发起在第一应用程序中登录所述第一账号的校验请求。
在一种可能的实现方式中,所述处理单元具体用于:
根据所述密码信息,生成密钥;
根据所述密钥,对所述第一令牌进行加密;
向所述第二终端设备发送加密后的所述第一令牌。
在一种可能的实现方式中,所述处理单元还用于:
调用所述第一终端设备的数据接口,以访问所述第一终端设备中的第一应用程序;
在所述第一应用程序中,获取所述第一账号对应的账号数据;
根据所述密钥对所述账号数据进行加密,并向所述第二终端设备发送加密后的所述账号数据。
在一种可能的实现方式中,所述处理单元还用于:
在所述根据所述密码信息,向所述第二终端设备发送所述第一令牌之前,获取所述第二终端设备的局域网络的名称信息;
根据所述名称信息和所述密码信息,与所述第二终端设备建立局域网连接,所述局域网连接用于传输所述第一令牌和/或所述账号数据。
在一种可能的实现方式中,所述令牌获取请求中还携带有所述第一终端设备的访问令牌,所述访问令牌中包括所述第一账号的标识信息;
所述访问令牌用于所述云端服务器对所述第一终端设备进行校验。
在一种可能的实现方式中,所述处理单元具体用于:
采集所述第二终端设备的图形用户界面上展示的识别码的图像;
对所述识别码的图像进行解析,得到所述第二终端设备的标识信息和所述第二终端设备的局域网络的密码信息。
在一种可能的实现方式中,所述处理单元还用于:
在所述第二终端设备中的第一应用程序的登录状态更新为已登录之后,接收所述 第二终端设备发送的登录状态更新信息。
第四方面,本申请实施例提供一种数据处理装置,该数据处理装置可以是终端设备,也可以是终端设备内的芯片或者芯片系统。该数据处理装置可以包括显示单元和处理单元。当该数据处理装置是终端设备时,该处显示单元可以是显示屏。该显示单元用于执行显示的步骤,以使该终端设备实现第一方面或第一方面的任意一种可能的实现方式中描述的一种寄件方法。当该数据处理装置是终端设备时,该处理单元可以是处理器。该数据处理装置还可以包括存储单元,该存储单元可以是存储器。该存储单元用于存储指令,该处理单元执行该存储单元所存储的指令,以使该终端设备实现第一方面或第一方面的任意一种可能的实现方式中描述的一种寄件方法。当该数据处理装置是终端设备内的芯片或者芯片系统时,该处理单元可以是处理器。该处理单元执行存储单元所存储的指令,以使该终端设备实现第一方面或第一方面的任意一种可能的实现方式中描述的一种寄件方法。该存储单元可以是该芯片内的存储单元(例如,寄存器、缓存等),也可以是该终端设备内的位于该芯片外部的存储单元(例如,只读存储器、随机存取存储器等)。
示例性的,处理单元,用于获取第一终端设备发送的第一令牌;向云端服务器发送校验请求,所述校验请求中包括所述第一令牌以及所述第二终端设备的标识信息,所述校验请求用于请求所述云端服务器校验所述第一令牌和所述第二终端设备的标识信息之间是否存在对应关系;在所述校验通过之后,接收所述云端服务器发送的访问令牌,并根据所述访问令牌,触发所述第二终端设备中的第一应用程序登录第一账号。
在一种可能的实现方式中,所述处理单元具体用于:
接收所述第一终端设备发送的加密后的第一令牌;
根据所述第二终端设备的局域网络的密码信息,生成密钥;
根据所述密钥,对所述加密后的第一令牌进行解密,得到所述第一令牌。
在一种可能的实现方式中,所述处理单元还用于:
接收所述第一终端设备发送的加密后的账号数据;
根据所述密钥对所述加密后的账号数据进行解密,得到所述账号数据。
在一种可能的实现方式中,所述访问令牌中包括所述第一账号的标识信息。
在一种可能的实现方式中,所述处理单元还用于:
在所述获取第一终端设备发送的第一令牌之前,根据所述第二终端设备的局域网络的名称信息和所述密码信息,与所述第一终端设备建立局域网连接,所述局域网连接用于传输所述第一令牌和/或所述账号数据。
在一种可能的实现方式中,所述处理单元还用于:在所述获取第一终端设备发送的第一令牌之前,根据所述第二终端设备的标识信息和所述第二终端设备的局域网络的密码信息,生成识别码;
显示单元,用于在所述第二终端设备的图形用户界面上,展示所述识别码的图像。
在一种可能的实现方式中,所述处理单元还用于:在所述根据所述访问令牌,触发所述第二终端设备中的第一应用程序执行登录操作之后,向所述第一终端设备发送登录状态更新信息,所述登录状态更新信息用于指示所述第一终端设备中的第一应用程序的登录状态为已登录。
第五方面,本申请实施例提供一种电子设备,包括:处理器、显示屏和接口电路,接口电路用于与其它装置通信;显示屏用于执行显示的步骤;处理器用于运行代码指令,以实现第一方面或第一方面任意可能的实现方式中的任一方法。
第六方面,本申请实施例提供一种电子设备,包括:处理器、显示屏和接口电路,接口电路用于与其它装置通信;显示屏用于执行显示的步骤;处理器用于运行代码指令,以实现第二方面或第二方面任意可能的实现方式中的任一方法。
第七方面,本申请实施例提供一种计算机可读存储介质,该计算机可读存储介质存储有指令,当指令被执行时,以实现第一方面或第一方面任意可能的实现方式中、或者第二方面或第二方面任意可能的实现方式中的任一方法。
应当理解的是,本申请的第二方面至第六方面与本申请的第一方面的技术方案相对应,各方面及对应的可行实施方式所取得的有益效果相似,不再赘述。
附图说明
图1为本申请实施例提供的终端设备的结构示意图;
图2为本申请实施例提供的新旧设备间数据传输的实现示意图;
图3为本申请实施例提供的数据处理方法的流程图;
图4为本申请实施例提供的数据处理方法的流程图二;
图5为本申请实施例提供的采集识别码图像的实现示意图;
图6为本申请实施例提供的令牌获取请求的实现示意图;
图7为本申请实施例提供的传输第一令牌的实现示意图;
图8为本申请实施例提供的数据处理方法的流程图三;
图9为本申请实施例提供的数据处理方法的流程图四;
图10为本申请实施例提供的数据处理方法的系统示意图;
图11为本申请实施例提供的数据处理方法的信令交互图;
图12为本申请实施例提供的数据复制的实现示意图;
图13为本申请实施例提供的第一账号登录状态复制的实现示意图;
图14为本申请实施例提供的数据处理装置的结构示意图一;
图15为本申请实施例提供的数据处理装置的结构示意图二;
图16为本申请实施例提供的电子设备的硬件结构示意图。
具体实施方式
为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。例如,第一目标功能的界面和第二目标功能的界面是为了区分不同的响应界面,并不对其先后顺序进行限定。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。
需要说明的是,本申请中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如” 等词旨在以具体方式呈现相关概念。
电子设备包括终端设备,终端设备也可以称为终端(terminal)、用户设备(user equipment,UE)、移动台(mobile station,MS)、移动终端(mobile terminal,MT)等。终端设备可以是手机(mobile phone)、智能电视、穿戴式设备、平板电脑(Pad)、带无线收发功能的电脑、虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、工业控制(industrial control)中的无线终端、无人驾驶(self-driving)中的无线终端、远程手术(remote medical surgery)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端等等。本申请的实施例对终端设备所采用的具体技术和具体设备形态不做限定。
为了能够更好地理解本申请实施例,下面对本申请实施例的终端设备的结构进行介绍:
图1示出了终端设备100的结构示意图。终端设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriberidentification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本申请实施例示意的结构并不构成对终端设备100的具体限定。在本申请另一些实施例中,终端设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从存储器中调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路 (inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuitsound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purposeinput/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现终端设备100的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。I2S接口和PCM接口都可以用于音频通信。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(displayserial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现终端设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现终端设备100的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为终端设备100充电,也可以用于终端设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,是示意性说明,并不构成对终端设备100的结构限定。在本申请另一些实施例中,终端设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过终端设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为终端设备供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
终端设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。终端设备100中的天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在终端设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在终端设备100上的包括无线局域网(wirelesslocal area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication, NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,终端设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得终端设备100可以通过无线通信技术与网络以及其他设备通信。无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(codedivision multiple access,CDMA),宽带码分多址(wideband code division multipleaccess,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidounavigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellitesystem,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
终端设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emittingdiode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrixorganic light emitting diode的,AMOLED),柔性发光二极管(flex light-emittingdiode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot lightemitting diodes,QLED)等。在一些实施例中,终端设备100可以包括1个或N个显示屏194,N为大于1的正整数。
终端设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式 的图像信号。在一些实施例中,终端设备100可以包括1个或N个摄像头193,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当终端设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。终端设备100可以支持一种或多种视频编解码器。这样,终端设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现终端设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展终端设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储终端设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行终端设备100的各种功能应用以及数据处理。
终端设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。终端设备100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当终端设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。终端设备100可以设置至少一个麦克风170C。在另一些实施例中,终端设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,终端设备100还可以设置三个,四个或更多麦克风170C,实现采集 声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。终端设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,终端设备100根据压力传感器180A检测触摸操作强度。终端设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。
陀螺仪传感器180B可以用于确定终端设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定终端设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测终端设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消终端设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。
气压传感器180C用于测量气压。在一些实施例中,终端设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。
磁传感器180D包括霍尔传感器。终端设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当终端设备100是翻盖机时,终端设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。
加速度传感器180E可检测终端设备100在各个方向上(一般为三轴)加速度的大小。当终端设备100静止时可检测出重力的大小及方向。还可以用于识别终端设备姿态,应用于横竖屏切换,计步器等应用程序。
距离传感器180F,用于测量距离。终端设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,终端设备100可以利用距离传感器180F测距以实现快速对焦。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。终端设备100通过发光二极管向外发射红外光。终端设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定终端设备100附近有物体。当检测到不充分的反射光时,终端设备100可以确定终端设备100附近没有物体。终端设备100可以利用接近光传感器180G检测用户手持终端设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L用于感知环境光亮度。终端设备100可以根据感知的环境光亮 度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测终端设备100是否在口袋里,以防误触。
指纹传感器180H用于采集指纹。终端设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器180J用于检测温度。在一些实施例中,终端设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,终端设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,终端设备100对电池142加热,以避免低温导致终端设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,终端设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于终端设备100的表面,与显示屏194所处的位置不同。
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。终端设备100可以接收按键输入,产生与终端设备100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用程序(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和终端设备100的接触和分离。终端设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。终端设备100通过SIM卡和网络交互,实现通话以及数据通 信等功能。在一些实施例中,终端设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在终端设备100中,不能和终端设备100分离。
终端设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构,等。本申请实施例以分层架构的Android系统为例,示例性说明终端设备100的软件结构。
下面对本申请所涉及的相关技术进行进一步的详细介绍:
随着终端设备研发技术的不断发展,目前的终端设备更新换代的速度是非常快的,因此经常会存在用户更换终端设备的情况。在用户更换终端设备的时候,因为在旧的终端设备中还存在着诸多的数据,因此通常需要将旧的终端设备中的数据复制到新的终端设备中。
目前存在支持在旧的终端设备和新的终端设备之间进行数据复制的应用程序,这些应用程序致力于通过简单的操作,全面快速并且安全的将数据从旧的终端设备复制到新的终端设备中。
比如说可以结合图2进行理解,图2为本申请实施例提供的新旧设备间数据传输的实现示意图。
如图2所示,可以在旧的终端设备和新的终端设备之间建立数据传输的通道,并通过该数据传输通道将旧的终端设备中的数据传输至新的终端设备中。
这类在新旧设备之间进行数据复制的应用程序,目前可以支持旧的终端设备中大部分的本地数据的复制,比如说图片、视频、联系人、短信、应用程序等等。
可以理解的是,随着应用程序的逐步云化,目前很多应用程序的数据都存储在对应的云端,而应用程序的账号可以建立起用户和云端的数据关系,因此可以在应用程序中登录用户的账号,从而从云端获取相应的数据。
但是因为账号是敏感数据,其安全性比较高,因此如果直接通过上述介绍的数据传输通道来进行账号数据(比如说账号、密码)的传输的话,数据风险是比较高的,因此目前的技术尚且不支持账号登录状态的迁移。
更进一步的,目前相关技术中通常都是需要用户手动的打开应用程序,并且在应用程序中手动的输入账号、密码或者验证码等验证信息,从而在新的终端设备的应用程序中登录账号,这样会导致在终端设备的切换过程中,数据的复制缺乏全面性,同时也会导致用户需要手动操作才能完成账号登录,进而增加了用户的操作成本。
在上述介绍内容的基础上,本申请提出了如下技术构思:通过旧的终端设备获取新的终端设备的标识信息,并由旧的终端设备向云端服务器发起请求,以告知云端服务器旧的终端设备可能之后会进行账号的登录操作,之后旧的终端设备根据其标识信息向云端服务器发起验证,在云端服务器验证通过的情况下,授权新的终端设备进行账号的登录,从而可以在保证账号登录安全的前提下,有效的实现了账号登录状态在新旧终端设备之间的复制。
下面结合具体的实施例对本申请所提供的数据处理方法进行介绍,图3为本申请实施例提供的数据处理方法的流程图。
如图3所示,该方法包括:
S301、获取第二终端设备的标识信息和第二终端设备的局域网络的密码信息,第一终端设备的第一应用程序中登录有第一账号。
在本实施例中,第一终端设备可以理解为旧的终端设备,第二终端设备可以理解为新的终端设备。换言之,第一终端设备可以理解为数据迁移的数据提供方,第二终端设备可以理解为数据迁移的数据接收方。
本实施例中要实现账号登录状态的转移,实际上就是要将旧的终端设备中的应用程序所登录的账号,在新的终端设备中的相同应用程序中也进行登录。因此可以理解的是,在第一终端设备的第一应用程序中可以登录有第一账号,其中的第一应用程序可以是第一终端设备中的任意一个应用程序,本实施例对此不做限制。
以及在实际实现过程中,具体要进行哪些应用程序的账号登录状态的转移,其可以是用户选择的,或者还可以是系统默认的,本实施例对此不做限定。
其中,第一终端设备可以获取第二终端设备的标识信息,可以理解的是,每个终端设备都有自身特有的标识信息,用于对终端设备进行唯一性的标识。在一种可能的实现方式中,标识信息比如说可以是UDID(唯一设备标识符,Unique Device Identifier)信息,或者标识信息还可以为其余的实现方式,本实施例对此不做限制,只要标识信息可以实现对终端设备的唯一标识即可。
以及,为了实现第一终端设备和第二终端设备之间的数据迁移,需要有网络连接作为支撑,因此本实施例中的第二终端设备可以创建局域网络,此处的局域网络比如说可以理解为终端设备的热点。其中局域网络存在密码信息,具体的密码信息的实现可以由用户自行设置,本实施例对此不做限制。
在本实施例中,第一终端设备还可以获取第二终端设备的局域网络的密码信息。
S302、向云端服务器发送令牌获取请求,令牌获取请求中携带有标识信息,令牌获取请求用于请求云端服务器生成第一账号对应的第一令牌,并建立第一令牌和标识信息之间的对应关系。
可以理解的是,第一终端设备在获取到第二终端设备的标识信息之后,就已经可以确定是标识信息对应的第二终端设备要复制账号的登录状态了,但是考虑到账号数据的安全性问题,第一终端设备不能直接将账号数据发送给第二终端设备,因此本实施例中可以请求云端服务器来进行验证。
因此本实施例中,第一终端设备可以向云端服务器发送令牌获取请求,在令牌获取请求中可以包括上述获取的第二终端设备的标识信息。本实施例中的令牌获取请求用于请求云端服务器生成第一账号所对应的第一令牌,并且建立第一令牌和第二终端设备的标识信息之间的对应关系。
可以理解的是,第一令牌的作用是为了后续云端服务器对第二终端设备进行验证,而此处需要云端服务器建立第一账号对应的第一令牌和第二终端设备的标识信息之间的对应关系,也是为了让云端服务器确定,后续第二终端设备可能会请求登录第一账号。之后云端服务器就可以通过验证第二终端设备发送的第一令牌和第二终端设备的标识信息是否存在对应关系,从而确定第二终端设备是否可以登录第一账号。
S303、接收云端服务器发送的第一令牌。
云端服务器在响应第一终端设备的请求生成第一令牌之后,除了建立上述介绍的对应关系,还会将第一令牌发送给第一终端设备。因此本实施例中的第一终端设备会接收云端服务器发送的第一令牌。
S304、根据密码信息,向第二终端设备发送第一令牌,第一令牌用于第二终端设备向云端服务器发起在第一应用程序中登录第一账号的校验请求。
在获取到上述介绍的第一令牌之后,本实施例中比如说可以根据密码信息,向第二终端设备发送第一令牌。比如说可以根据密码信息对第一令牌进行加密,之后发送加密后的第一令牌。或者还可以根据密码信息对第一令牌进行相应的函数处理,之后发送处理后的第一令牌。
但是可以理解的是,第二终端设备在接收到第一令牌之后,还无法进行账号的登录,其还需要向云端服务器进行验证,因此本实施例中的第一令牌就是用于第二终端设备向云端服务器发起校验请求,该校验请求就是请求云端服务器验证第二终端设备是否可以在第一应用程序中登录第一账号。
本申请实施例提供的数据处理方法,包括:获取第二终端设备的标识信息和第二终端设备的局域网络的密码信息,第一终端设备的第一应用程序中登录有第一账号。向云端服务器发送令牌获取请求,令牌获取请求中携带有标识信息,令牌获取请求用于请求云端服务器,生成第一账号对应的第一令牌,并建立第一令牌和标识信息之间的对应关系。接收云端服务器发送的第一令牌。根据密码信息,向第二终端设备发送第一令牌,第一令牌用于第二终端设备向云端服务器发起在第一应用程序中登录第一账号的校验请求。通过向云端服务器发送令牌获取请求,以使得云端服务器生成第一终端设备所登录的第一账号所对应的第一令牌,并且创建第一令牌和第二终端设备的标识信息之间的对应关系,从而可以告知云端服务器第二终端设备之后可能会进行第一账号的登录,之后再将第一令牌发送给第二终端设备,以使得第二终端设备根据第一令牌向云端服务器发起登录第一应用程序的校验请求,从而可以在云端服务器的协助下,完成第二终端设备登录第一账号的验证,从而可以将账号的登录状态从第一终端设备复制到第二终端设备,以有效的增强换机过程中数据复制的全面性。
在上述介绍内容的基础上,下面结合图4至图7对本申请提供的数据处理方法进行进一步的详细介绍,图4为本申请实施例提供的数据处理方法的流程图二,图5为本申请实施例提供的采集识别码图像的实现示意图,图6为本申请实施例提供的令牌获取请求的实现示意图,图7为本申请实施例提供的传输第一令牌的实现示意图。
如图4所示,该方法包括:
S401、采集第二终端设备的图形用户界面上展示的识别码的图像。
在本实施例中,第一终端设备要获取第二终端设备的标识信息以及第二终端设备的局域网络的密码信息,在一种可能的实现方式中,第二终端设备比如说可以根据其标识信息和局域网络的密码信息,生成识别码。
之后,第二终端设备可以在其图形用户界面上展示生成的识别码,然后第一终端设备可以采集第二终端设备的图形用户界面上展示的识别码的图像。
比如说可以参照图5进行理解,如图5所示,在第二终端设备502的图形用户界面上展示有识别码,以及第一终端设备501比如说可以通过摄像装置拍摄第二终端设备的图形用户界面上所展示的识别码的图像。
S402、对识别码的图像进行解析,得到第二终端设备的标识信息和第二终端设备的局域网络的密码信息。
第一终端设备在获取到识别码的图像之后,可以对识别码的图像进行解析,从而得到第二终端设备的标识信息和第二终端设备的局域网络的密码信息。
在一种可能的实现方式中,目前的终端设备之间的换机操作可以是通过换机应用程序完成的,因此上述介绍的生成识别码,并在第二终端设备的图形用户界面上展示识别码,比如说可以是通过第二终端设备中的换机应用程序实现的。
以及,第一终端设备在扫描以获取并解析识别码的图像,同样可以是通过第一终端设备中的换机应用程序实现的。或者第一终端设备还可以通过任意的可以扫描并解析的应用程序来实现,本实施例对此不做限制。
或者在其余可能的实现方式中,第一终端设备和第二终端设备还比如说可以通过蓝牙连接等连接方式建立初步的连接通道,之后通过建立的连接通道来传输第二终端设备的标识信息以及密码信息。传输标识信息以及密码信息的具体实现方式可以根据实际需求进行选择和设置,本实施例对此不做限定。
S403、向云端服务器发送令牌获取请求,令牌获取请求中携带有标识信息,令牌获取请求用于请求云端服务器,生成第一账号对应的第一令牌,并建立第一令牌和标识信息之间的对应关系。
其中,S403的实现方式与上述介绍的S202的实现方式类似,具体的实现可以参照上述实施例的介绍。
本实施例中再结合图6对令牌获取请求的相关实现进行进一步的详细介绍。如图6所示,第一终端设备可以向云端服务器发送令牌获取请求,在令牌获取请求中包括第二终端设备的标识信息,其实现方式与上述介绍的类似。
以及在一种可能的实现方式中,在令牌获取请求中还可以包括第一终端设备的访问令牌(access token,AT)。其中,访问令牌是在设备登录账号的时候云端服务器所创建的,其可以认为是访问云端服务器的系统资源的凭证。比如说云端服务器向某一个设备发送了访问令牌,那么后续这个设备就可以通过该访问令牌向云端服务器发起校验,在校验通过的情况下,云端服务器就允许该设备访问相应的数据。
其中,在访问令牌中可以包括SID以及分配给用户账号的特权列表,其中SID(安全标识符,Security Identifiers)是用于标识用户、组和计算机账户的唯一的号码,可以理解的是,每一个用户账号都对应有一个唯一的SID,用于对各个不同的用户账号进行区分。那么在本实施例中,访问令牌就可以对应第一终端设备所登录的第一账号,在访问令牌中就可以包括第一账号的SID。
在令牌获取请求中包括第一终端设备的访问令牌,一方面是为了让云端服务器验证第一终端设备是否是被授权的设备,另一方面是为了让云端服务器确定当前是针对哪一个账号进行处理。
如图6所示,云端服务器在接收到令牌获取请求之后,可以对第一终端设备的访问令牌进行验证,在验证通过之后,就可以生成第一账号对应的第一令牌,并且建立第二终端设备的标识信息和第一令牌的对应关系。
需要说明的是,本实施例中云端服务器之所以可以确定生成的是第一账号对应的第一令牌,是因为访问令牌中包括了第一账号的标识信息。或者在其余可能的实现方式中,第一终端设备还可以将第一账号的标识信息直接携带在令牌获取请求中,以使 得云端服务器确定当前是需要针对第一账号生成第一令牌,本实施例对云端服务器确定第一账号的具体实现方式不做限制。
S404、接收云端服务器发送的第一令牌。
参照图6还可以理解的是,云端服务器在生成第一令牌之后,还会将第一令牌发送给第一终端设备,因此本实施例中的第一终端设备还可以接收云端服务器发送的第一令牌。
以及在一种可能的实现方式中,每个应用程序都对应有各自的云端服务器,因此和云端服务器的交互需要通过第一终端设备中的第一应用程序来完成。和云端服务器的交互之外的操作,可以理解为是换机应用程序实现的,其中换机应用程序只要可以执行本申请中介绍的一系列数据处理和数据传输操作即可,其具体的实现方式可以根据实际需求进行选择。
比如说上述介绍的换机应用程序可以将获取到的第二终端设备的标识信息和密码信息传递给第一应用程序,之后第一应用程序根据标识信息向云端服务器发送令牌获取请求,并且接收云端服务器发送的第一令牌。
S405、获取第二终端设备的局域网络的名称信息。
在本实施例中,第一终端设备需要将第一令牌发送给第二终端设备,要实现数据的传输,就需要在第一终端设备和第二终端设备之间建立数据传输通道。
基于上述介绍可以确定的是,第二终端设备建立有局域网,以及第一终端设备已经获取了第二终端设备的局域网络的密码信息,那么第二终端设备再获取第二终端设备的局域网络的名称信息,就可以接入第二终端设备的局域网了。
因此本实施例中的第一终端设备可以获取第二终端设备的局域网络的名称信息,在一种可能的实现方式中,比如说第二终端设备可以将局域网络的名称信息携带在上述介绍的识别码中,因此第一终端设备可以通过上述介绍的解析识别码的图像的操作,来获取第二终端设备的局域网络的名称信息。
或者第一终端设备还可以通过搜索附近的局域网络的方式,来获取第二终端设备的局域网络的名称信息。再或者第一终端设备还可以根据用户选择的热点信息,来获取第二终端设备的局域网络的名称信息,本实施例对获取局域网络的名称信息的具体实现方式不做限制,其可以根据实际需求进行选择和设置。
以及可以理解的是,当前的获取局域网络的名称信息的操作,并不限定于在当前的步骤顺序中,可以根据实际情况确定该操作的执行时间。
S406、根据名称信息和密码信息,与第二终端设备建立局域网连接,局域网连接用于传输第一令牌和/或账号数据。
第一终端设备在获取到第二终端设备的局域网络的名称信息和密码信息之后,就可以根据名称信息和密码信息,接入第二终端设备的局域网络,从而和第二终端设备建立局域网连接,本实施例中的局域网连接可以用于传输第一令牌。和/或,本实施例中的局域网连接还可以用于传输账号数据。
其中,账号数据比如说可以包括账号ID、头像信息、用户设置信息、记录信息等等,比如说针对通讯类应用程序,记录信息可以是聊天记录、好友列表信息等等;再比如说针对图像处理类应用程序,记录信息可以是图像信息、图像处理信息等等,本 实施例对账号信息的具体实现方式不做限制,凡是与第一账号存在关联的信息,均可以作为本实施例中的账号信息。
可以理解的是,第一终端设备的第一应用程序中登录有第一账号,那么在第一终端设备中就存储有第一账号的账号数据,但是第一账号的账号数据存储在第一应用程序中,或者说存储在第一应用程序对应的存储空间中。
因此比如说可以通过换机应用程序调用第一终端设备的数据接口,访问第一终端设备中的第一应用程序,并且在第一应用程序中,获取第一账号所对应的账号数据。此处的数据接口例如可以为CP(Content Provider,内容提供)接口,其中CP接口为存储和获取数据提供统一的接口,可以在不同的应用程序之间共享数据。
可以理解的是,因为第一终端设备中的第一应用程序是登录了第一账号的,因此在第一终端设备的本地是存储有这些账号信息的,那么通过第一终端设备和第二终端设备之间的局域网,直接将账号数据传输给第二终端设备,就可以避免第二终端设备之后还需要再从云端获取账号数据,进而可以有效的提升换机过程中的数据复制完整性。
S407、根据密码信息,生成密钥。
本实施例中的第一终端设备要将第一令牌以及账号数据发送给第二终端设备,那么为了保证数据传输的安全性,第一终端设备比如说可以对第一令牌和账号数据进行加密,之后再进行传输。
可以理解的是,第一终端设备可以对第一令牌和账号数据进行加密并传输,还需要保证第二终端设备可以实现相应的解密,这样数据传输才是有效的。
在本实施例中,第二终端设备建立有局域网,那么第二终端设备自己是可以确定该局域网的密码信息的,以及本实施例中的第一终端设备也获取了该局域网的密码信息,也就是说密码信息是第一终端设备和第二终端设备都持有的信息。
因此在一种可能的实现方式中,本实施例中可以根据局域网的密码信息生成密钥。比如说可以是生成对称密钥,在实际实现过程中,生成密钥的方式可以采用任意的数据加密算法,本实施例对此不做限制,只要是根据局域网的密码信息生成的即可。
S408、根据密钥,对第一令牌进行加密。
在得到密钥之后,就可以根据密钥对第一令牌进行加密了。同样的,若获取了第一账号的账号数据的话,可以根据密钥对账号数据也进行加密。
S409、向第二终端设备发送加密后的第一令牌。
在加密之后,第一终端设备就可以向第二终端设备发送加密后的第一令牌了。比如说可以参照图7进行理解,如图7所示,第一终端设备可以根据局域网的密码信息对第一令牌进行加密,之后第二终端设备接收到加密后的第一令牌,再根据局域网的密码信息进行解密,就可以安全的完成第一令牌的传输。针对账号数据的传输方式类似,此处不再赘述。
对第一令牌以及账号数据进行加密之后再进行发送,可以有效的保证第一令牌以及账号数据传输过程的安全性。同时本实施例中的账号数据是根据密码信息所生成的密钥进行的加密处理,因为密码信息是第一终端设备和第二终端设备都持有的,因此无需再额外的传输密钥信息,从而可以更加有效的保证第一令牌和账号数据的传输安 全性。
在第二终端设备接收到第一令牌之后,就可以根据第一令牌向云端服务器发起校验了,以请求登录第一账号。因为第一终端设备已经预先请求云端服务器创建了第二终端设备的标识信息和第一令牌的对应关系,因此第二终端设备可以完成在第一应用程序中登录第一账号,从而可以有效的实现账号登录状态的复制。
本申请实施例提供的数据处理方法,通过在第二终端设备的图形用户界面上展示识别码的图像,之后第一终端设备对识别码的图像进行采集并解析,从而可以简单并有效的将第二终端设备的标识信息以及第二终端设备的局域网络的密码信息同步给第一终端设备,在此过程中无需建立数据传输通道,就完成了信息的同步。以及第一终端设备和第二终端设备建立局域网连接,从而可以有效的实现第一令牌和/或账号数据的传输。同时,在传输第一令牌和/或账号数据的过程中,会采用密钥进行加密处理,之后才会进行传输操作,从而可以有效的保证数据传输的安全性。以及本实施例中的密钥是根据第二终端设备的局域网络的密码信息生成的,因为第一终端设备和第二终端设备都持有该密码信息,因此可以有效保证第一终端设备进行的加密,在第二终端设备侧可以实现相应的解密,同时第一终端设备和第二终端设备也不需要再进行密钥的传输,从而可以进一步的提升数据传输的安全性。
上述实施例介绍的都是第一终端设备一侧的操作,下面再结合具体的实施例对第二终端设备一侧的相关实现进行说明,首先结合图8进行介绍,图8为本申请实施例提供的数据处理方法的流程图三。
如图8所示,该方法包括:
S801、获取第一终端设备发送的第一令牌。
基于上述实施例可以确定的是,第一终端设备会向第二终端设备发送第一令牌,因此本实施例中的第二终端设备可以获取第一终端设备发送的第一令牌。
S802、向云端服务器发送校验请求,校验请求中包括第一令牌以及第二终端设备的标识信息,校验请求用于请求云端服务器校验第一令牌和第二终端设备的标识信息之间是否存在对应关系。
其中,第一令牌是第一终端设备向云端服务器请求分配的,云端服务器可以根据第一令牌验证终端设备是否可以登录相应的账号,因此在第二终端设备获取到第一令牌之后,可以向云端服务器发送校验请求,在校验请求中就可以包括第一令牌,以及在校验请求中还可以包括第二终端设备的标识信息。
基于上述介绍可以确定的是,云端服务器根据第一终端设备的请求,不仅仅生成了第一账号对应的第一令牌,还建立了第一令牌和第二终端设备的标识信息之间的对应关系。此处建立对应关系,相当于云端服务器可以确定第二终端设备可能会登录第一账号,也就是说云端服务器可以确定第二终端设备是一个可信的账号。
因此在本实施例中,第二终端设备所发送的校验请求,可以请求云端服务器校验第一令牌和第二终端设备的标识信息之间是否存在对应关系。
在一种可能的实现方式中,云端服务器还可以针对第一令牌和/或所述对应关系设置有效期,也就是说第二终端设备只有在有效期内,向云端服务器发送校验请求,云端服务器才会确定校验通过。否则的话可以确定校验不通过。其中有效期比如是可以 设置为7天、3天等等,其作用是限制第二终端设备在一定的时间内进行验证,以保证验证的安全性和有效性,进而提升了云端服务器对第一账号的登录验证的安全性。
S803、在校验通过之后,接收云端服务器发送的访问令牌,并根据访问令牌,触发第二终端设备中的第一应用程序登录第一账号。
在一种可能的实现方式中,若第一令牌和第二终端设备的标识信息之间不存在对应关系,则云端服务器可以确定第一终端设备之前并没有告知第二终端设备可能会登录第一账号,也就是云端服务器可以确定第二终端设备是不可信的设备,因此云端服务器可以确定校验不通过。在校验不通过的情况下,云端服务器可以确定不允许第二终端设备登录第一账号。
或者,在另一种可能的实现方式中,若第一令牌和第二终端设备的标识信息之间存在对应关系,则云端服务器可以确定,第二终端设备就是第一终端设备之前告知的,可能登陆第一账号的设备,也就是说云端服务器可以确定第二终端设备是可信的设备,因此可以确定校验通过。在校验通过的情况下,云端服务器可以确定允许第二终端设备登录第一账号。
可以理解的是,在云端服务器授权终端设备登录相应账号的时候,云端服务器通常会向终端设备发送该账号对应的访问令牌,以指示该终端设备登录相应账号。
因此本实施例中在校验通过之后,第二终端设备可以接收云端服务器发送的访问令牌,此处的访问令牌实际上就是第一账号所对应的访问令牌,指示第二终端设备可以登录第一账号。
之后,第二终端设备就可以根据访问令牌,触发第二终端设备中的第一应用程序登录第一账号。
此处需要说明的是,通常情况下,终端设备中的应用程序在登录账号的时候,通常是采用账号和密码的方式,或者采用账号和验证码的方式,向云端服务器发起验证,以使得云端服务器确定当前终端设备是否可以登录该账号。在云端服务器对账号和密码(或者验证码)的验证通过的情况下,云端服务器同样是会向终端设备发送访问令牌,以指示终端设备中的第一应用程序登录该账号。
在本实施例中并没有借助密码或者验证码,因为如果直接在第一终端设备和第二终端设备之间传输密码或者验证码的话,数据风险是比较大的。因此本实施例中采取的时候根据第一令牌和第二终端设备的标识信息向云端服务器发起验证的方式,这种实现方式相较于账号密码(或者验证码)的验证方式,其安全性是更高的,并且也可以有效的获取到登录账号的访问令牌,从而可以在保障验证安全性的基础上,有效的实现将第一终端设备中的第一应用程序的账号登录状态,复制到第二终端设备中。
本申请实施例提供的数据处理方法,包括:获取第一终端设备发送的第一令牌。向云端服务器发送校验请求,校验请求中包括第一令牌以及第二终端设备的标识信息,校验请求用于请求云端服务器校验第一令牌和第二终端设备的标识信息之间是否存在对应关系。在校验通过之后,接收云端服务器发送的访问令牌,并根据访问令牌,触发第二终端设备中的第一应用程序登录第一账号。通过根据第一终端设备发送的第一令牌,向云端服务器发送校验请求,在校验请求中还包括第二终端设备的标识信息,以使得云端服务器验证第二终端设备是否可以登录第一账号,在验证通过之后,第二 终端设备根据云端服务器发送的访问令牌,在第一应用程序中登录第一账号,从而可以有效的在云端服务器的验证下,安全有效的将第一终端设备中的账号登录状态,复制到第二终端设备中,从而可以有效的提升换机处理过程中数据复制的全面性。
在上述介绍内容的基础上,下面结合图9对本申请提供的数据处理方法中,第二终端设备一侧的相关操作进行进一步的详细介绍,图9为本申请实施例提供的数据处理方法的流程图四。
如图9所示,该方法包括:
S901、根据第二终端设备的局域网络的名称信息和密码信息,与第一终端设备建立局域网连接,局域网连接用于传输第一令牌和/或账号数据。
在本实施例中,第二终端设备建立有局域网络,并且第二终端设备要和第一终端设备进行数据传输,因此第二终端设备可以根据其建立的局域网络的名称信息和密码信息,与第一终端设备建立局域网连接。
在建立局域网连接之后,第一终端设备和第二终端设备就可以基于连接的局域网络进行数据的传输,其中传输的数据可以包括第一令牌和/或账号数据。
S902、接收第一终端设备发送的加密后的第一令牌。
在建立上述介绍的局域网连接之后,第一终端设备和第二终端设备就可以进行数据传输了,基于上述介绍可以确定的是,第一终端设备会将第一令牌加密之后发送给第二终端设备,因此第二终端设备可以接收第一终端设备发送的加密后的第一令牌。
S903、根据第二终端设备的局域网络的密码信息,生成密钥。
因为第二终端设备接收到的第一令牌是经过了加密处理的,因此第二终端设备还需要针对该数据进行解密处理。在本实施例中,因为第一终端设备和第二终端设备都持有第二终端设备的局域网络的密码信息,因此本实施例中是根据局域网络的密码信息生成的密钥。
因此第二终端设备可以根据其局域网络的密码信息,生成密钥。可以理解的是,根据局域网络的密码信息来生成密钥,可以有效的保证第一终端设备和第二终端设备可以生成相同的密钥,从而可以在无需交换密钥的情况下,有效的实现对传输数据的加密和解密处理。
以及还需要说明的是,第一终端设备和第二终端设备之所以可以都持有第二终端设备的局域网络的密码信息,是因为第一终端设备获取了第二终端设备的密码信息。
在一种可能的实现方式中,可以是在建立两个设备的局域网络的连接之前,第二终端设备根据其局域网络的密码信息,生成识别码,并且在第二终端设备的图形用户界面上展示识别码的图像。之后第一终端设备可以扫描并解析该识别码,从而可以有效的将第二终端设备的局域网络的密码信息同步给第一终端设备。
以及针对第二终端设备的标识信息也可以进行上述的处理,也就是说在生成的识别码中可以一起包括第二终端设备的标识信息,更为详细的实现方式可以参照上述实施例的介绍,此处对此不再赘述。
S904、根据密钥,对加密后的第一令牌进行解密,得到第一令牌。
第二终端设备在生成密钥之后,就可以根据密钥,对接收到的加密后的第一令牌进行解密,从而得到第一令牌。
进一步的,基于上述介绍可以确定的是,第一终端设备还可以将账号数据传输给第二终端设备,因此本实施例中的第二终端设备比如说还可以接收第一终端设备发送的加密后的账号数据,之后第二终端设备可以根据密钥,对加密后的账号数据进行解密,从而得到账号数据,其具体的实现方式可以参照上述实施例的说明,此处对此不再赘述。
S905、向云端服务器发送校验请求,校验请求中包括第一令牌以及第二终端设备的标识信息,校验请求用于请求云端服务器校验第一令牌和第二终端设备的标识信息之间是否存在对应关系。
S906、在校验通过之后,接收云端服务器发送的访问令牌,并根据访问令牌,触发第二终端设备中的第一应用程序登录第一账号。
其中,S905、S906的实现方式与上述S802、S803的实现方式类似,此处对具体的实现方式不再进行赘述。
本实施例中需要额外说明的是,云端服务器在对第二终端设备的校验通过之后,会向第二终端设备下发访问令牌,该访问令牌是用于第二终端设备中的第一应用程序登录账号的。那么第一应用程序确定具体是登录哪个账号也是比较重要的,本实施例中的访问令牌中包括第一账号的标识信息,以保证在第二终端设备的第一应用程序中登录的是第一账号,从而可以有效实现将第一终端设备中的第一应用程序所登录的第一账号,复制在第二终端设备中的第一应用程序也进行登录。
本申请实施例提供的数据处理方法,通过在第二终端设备的图形用户界面上展示识别码的图像,之后第一终端设备对识别码的图像进行采集并解析,从而可以简单并有效的将第二终端设备的标识信息以及第二终端设备的局域网络的密码信息同步给第一终端设备,在此过程中无需建立数据传输通道,就完成了信息的同步。以及第一终端设备和第二终端设备建立局域网连接,从而可以有效的实现第一令牌和/或账号数据的传输。同时,在传输第一令牌和/或账号数据的过程中,会采用密钥进行加密处理,之后才会进行传输操作,从而可以有效的保证数据传输的安全性。以及本实施例中的密钥是根据第二终端设备的局域网络的密码信息生成的,因为第一终端设备和第二终端设备都持有该密码信息,因此可以有效保证第一终端设备进行的加密,在第二终端设备侧可以实现相应的解密,同时第一终端设备和第二终端设备也不需要再进行密钥的传输,从而可以进一步的提升数据传输的安全性。
上述是针对第一终端设备和第二终端设备两侧的实现方式分别进行的说明,下面再结合图10和图11对本申请提供的数据处理方法的整体流程图进行详细介绍,图10为本申请实施例提供的数据处理方法的系统示意图,图11为本申请实施例提供的数据处理方法的信令交互图。
如图11所示,本实施例中的各项信令交互中,执行设备可以包括第二终端设备(旧的终端设备)、第一终端设备以及云端服务器。
其中,在第二终端设备和第一终端设备中都分别包括换机应用程序以及第一应用程序。其中换机应用程序用于在第一终端设备和第二终端设备之间执行一系列的数据交互处理,而第一应用程序就是在第一终端设备和第二终端设备之间进行账号登录状态复制的应用程序,其具体实现可以根据实际需求进行选择,第一应用程序用于和云 端服务器进行交互,从而完成相应的请求、验证等等。本实施例中的数据传输协议比如说可以是FTP(File Transfer Protocol,文件传输协议)协议,或者还可以为其余任意可能的协议。
下面对各个主体的功能再进行进一步说明:
其中,第一终端设备中的换机应用程序和第一应用程序共同参与,主要完成密钥协商和数据打包加密。并与云端服务器交互以完成第一令牌的注册,以便在第二终端设备上进行验证。
以及,第二终端设备中的换机应用程序和第一应用程序共同参与,主要完成数据解密和云端服务器的认证流程。
以及,云端服务器主要完成账号的登录认证,和第一令牌的授权。并且在第二终端设备的认证完成后,下发访问令牌。
其中的传输通道用于在第一终端设备和第二终端设备之间进行数据传输,从而保证数据在传输过程中的安全性。
在上述图10介绍内容的基础上,下面结合图11,以具体的步骤对本实施例中的实现过程进行说明。
1、第二终端设备中的换机应用程序向第二终端设备中的第一应用程序发送查询信息,该查询信息用于查询第一应用程序所登录的账号是否支持克隆。
可以理解的是,可能因为系统数据的迭代、更新等等情况,部分账号不支持克隆处理,也就是说无法将该账号的登录状态从一个设备直接复制到另一个设备,在这种情况下,就无法执行本实施例中的后续操作,只能由用户手动的在新的终端设备中进行账号的登录操作。
因此本实施例中的换机应用程序可以向第一应用程序发送查询信息,以查询第一应用程序所登录的账号是否支持克隆。
以及在一种可能的实现方式中,在用户需要进行换机操作的时候,可以在第二终端设备中打开换机应用程序,比如说第二终端设备可以响应于用户对换机应用程序的打开操作,从而发送查询信息。或者在换机应用程序中可以设置触发控件,在检测到用户针对该触发控件的点击操作之后,再向第一应用程序发送查询信息。
2、第二终端设备中的第一应用程序向第二终端设备中的换机应用程序发送返回信息,返回信息用于指示第一应用程序所登录的账号是否支持克隆。
第二终端设备中的第一应用程序在接收到该查询信息之后,可以查询第一应用程序所登录的账号是否支持克隆。比如说第一应用程序的中存储有针对其登录的账号的标记,从而确定其登录的账号是否支持克隆。或者第一应用程序可以向云端服务器发送询问信息,从而确定其登录的账号是否支持克隆。可以理解的是,本实施例中的第一应用程序所登录的账号实际上就是上述实施例介绍的第一账号。
第一应用程序在确定第一账号是否支持克隆之后,会向换机应用程序发送返回信息。在返回信息指示第一应用程序所登录的第一账号支持克隆的时候,本实施例中才会执行后续操作。
3、第二终端设备中的换机应用程序获取第二终端设备的标识信息。
其中,比如说可以是换机应用程序自行查询第二终端设备的标识信息,或者还可 以是换机应用程序向第一应用程序请求查询第二终端设备的标识信息。
4、第二终端设备的换机应用程序根据第二终端设备的标识信息以及第二终端设备的局域网络的密码信息,生成识别码,并在第二终端设备的图形用户界面上展示识别码。
5、第一终端设备的换机应用程序采集第二终端设备的图形用户界面上展示的识别码的图像,并解析识别码,以得到第二终端设备的标识信息和第二终端设备的局域网络的密码信息。
6、第一终端设备的换机应用程序将第二终端设备的标识信息和密码信息发送给第一应用程序。
7、第一终端设备的第一应用程序向云端服务器发送令牌获取请求。
在令牌获取请求中可以包括第二终端设备的标识信息,以及还可以包括第一终端设备的访问令牌。
8、云端服务器响应于令牌获取请求,生成第一账号对应的第一令牌,并建立第一令牌和第二终端设备的标识信息的对应关系。
在一种可能的实现方式中,云端服务器比如说可以对第一终端设备的访问令牌进行验证,在验证通过的情况下,再执行生成第一令牌并建议对应关系的操作。同时,云端服务器通过验证访问令牌,还可以确定当前是针对第一账号生成第一令牌。
9、云端服务器将第一令牌发送给第一终端设备的第一应用程序。
10、第一终端设备的第一应用程序根据密码信息生成密钥,并且根据密钥对第一令牌和账号数据进行加密。
11、第一终端设备的第一应用程序将加密后的第一令牌以及加密后的账号数据发送给第一终端设备的换机应用程序。
12、第一终端设备的换机应用程序,根据第二终端设备的局域网络的名称信息和密码信息,和第二终端设备建立局域网连接。
13、第一终端设备的换机应用程序通过上述建立的连接,将加密后的第一令牌和加密后的账号数据发送给第二终端设备的换机应用程序。
14、第二终端设备的换机应用程序将加密后的第一令牌和加密后的账号数据、以及密码信息发送给第二终端设备的第一应用程序。
15、第二终端设备的第一应用程序根据密码信息生成密钥,并且根据密钥对加密后的第一令牌和账号数据进行解密,得到第一令牌和账号数据。
16、第二终端设备的第一应用程序向云端服务器发送校验请求,在校验请求中包括第一令牌和第二终端设备的标识信息。
17、云端服务器响应于校验请求,校验是否存在第一令牌和第二终端设备的标识信息的对应关系。
18、在校验通过的情况下,云端服务器向第二终端设备的第一应用程序发送第一账号的访问令牌。
19、第二终端设备的第一应用程序根据访问令牌,登录第一账号,并且根据接收的账号数据进行数据恢复。
此处的数据恢复比如说可以显示用户的头像、恢复用户的设置等等,其具体取决 于账号数据的实现。
以及在一种可能的实现方式中,在第二终端设备中的第一应用程序登录第一账号之后,第二终端设备还可以向第一终端设备发送登录信息更新状态,登录状态更新信息用于指示第一终端设备中的第一应用程序的登录状态为已登录。也就是说告知第一终端设备其第一账号已经登录完成。其中登录信息更新状态的传输操作,比如说可以是换机应用程序之间通过局域网交互完成的。
或者,第二终端设备还可以向登录有账号注册时的预留邮箱、手机号码等等的可信设备,发送登录信息更新状态,以告知其已经成功登录了第一账号。
基于上述介绍的流程,需要说明的是,第一终端设备和第二终端设备之间的换机应用程序的数据交互,是通过局域网连接完成的。而第一终端设备和第二终端设备中的第一应用程序和云端服务器的数据交互,则是通过公网连接完成的。因此无论是第一终端设备还是第二终端设备,都需要依照其所需要进行的数据交互操作,进行连接网络的切换。
通过上述各步骤的实现,可以有效的实现将第一终端设备中的第一应用程序所登录的第一账号,在第二终端设备中的第二应用程序也进行登录,从而可以有效的自动完成账号登录状态的转移。
在上述各实施例介绍的内容的基础上,下面可以结合图12对两个设备之间的数据交互进行进一步的详细介绍。图12为本申请实施例提供的数据复制的实现示意图。
如图12所示,在第一终端设备中包括用户界面(User Interface,UI)进程和服务进程,以及在第二终端设备中也包括UI进程和服务进程。
在第一终端设备中的UI进程中,可以包括连接单元、会话管理单元、传输客户端单元、数据备份单元。以及在第二终端设备中的UI进程中,可以包括连接单元、会话管理单元、传输服务端单元、数据恢复单元。
其中,第一终端设备和第二终端设备可以通过连接单元建立局域网连接,以及通过会话管理单元传递会话业务信令的socket(套接字)消息,比如说可以互相同步之后要传递什么数据等等。
以及,传输客户端单元和传输服务端单元就用于执行正式的数据传输,比如说可以包括上述介绍的账号数据、第一令牌等等。
在一种可能的实现方式中,第一终端设备中的传输客户端单元所传输的数据,就可以是数据备份单元通过AIDL(Android Interface Definition Language,Android接口定义语言)调用服务进程而获取的。以及,第二终端设备中的传输服务端单元在接收到数据之后,可以通过数据恢复单元通过AIDL调用服务进程,从而将账号数据恢复至相应的应用程序中。
以及,无论是第一终端设备,还是第二终端设备,其实现上述的操作,都是依赖于一些底层实现的,底层实现比如说可以包括图12中所示的媒体库、基础数据DB(data base,数据库)、PMS(Power Manager Service,电源管理服务)、文件备份(FileBackup)单元、驱动等等。
以及参照图13进行理解,图13为本申请实施例提供的第一账号登录状态复制的实现示意图。
如图13所示,假设原本在第一终端设备1301中的第一应用程序中登录有第一账号,经过本申请提供的方法处理之后,可以安全有效的在第二终端设备1302中的第一应用程序中登录第一账号,从而可以实现自动将第一应用程序的账号登录状态从第一终端设备复制到第二终端设备,进而可以有效的减少用户操作,提升用户体验。
图14为本申请实施例提供的数据处理装置的结构示意图一。如图14所示,该装置140包括:显示单元1401、处理单元1402。
处理单元1402,用于:
获取第二终端设备的标识信息和所述第二终端设备的局域网络的密码信息,所述第一终端设备的第一应用程序中登录有第一账号;
向云端服务器发送令牌获取请求,所述令牌获取请求中携带有所述标识信息,所述令牌获取请求用于请求所述云端服务器,生成所述第一账号对应的第一令牌,并建立所述第一令牌和所述标识信息之间的对应关系;
接收所述云端服务器发送的所述第一令牌;
根据所述密码信息,向所述第二终端设备发送所述第一令牌,所述第一令牌用于所述第二终端设备向云端服务器发起在第一应用程序中登录所述第一账号的校验请求。
在一种可能的实现方式中,所述处理单元1402具体用于:
根据所述密码信息,生成密钥;
根据所述密钥,对所述第一令牌进行加密;
向所述第二终端设备发送加密后的所述第一令牌。
在一种可能的实现方式中,所述处理单元1402还用于:
调用所述第一终端设备的数据接口,以访问所述第一终端设备中的第一应用程序;
在所述第一应用程序中,获取所述第一账号对应的账号数据;
根据所述密钥对所述账号数据进行加密,并向所述第二终端设备发送加密后的所述账号数据。
在一种可能的实现方式中,所述处理单元1402还用于:
在所述根据所述密码信息,向所述第二终端设备发送所述第一令牌之前,获取所述第二终端设备的局域网络的名称信息;
根据所述名称信息和所述密码信息,与所述第二终端设备建立局域网连接,所述局域网连接用于传输所述第一令牌和/或所述账号数据。
在一种可能的实现方式中,所述令牌获取请求中还携带有所述第一终端设备的访问令牌,所述访问令牌中包括所述第一账号的标识信息;
所述访问令牌用于所述云端服务器对所述第一终端设备进行校验。
在一种可能的实现方式中,所述处理单元1402具体用于:
采集所述第二终端设备的图形用户界面上展示的识别码的图像;
对所述识别码的图像进行解析,得到所述第二终端设备的标识信息和所述第二终端设备的局域网络的密码信息。
在一种可能的实现方式中,所述处理单元1402还用于:
在所述第二终端设备中的第一应用程序的登录状态更新为已登录之后,接收所述第二终端设备发送的登录状态更新信息。
本实施例提供的装置,可用于执行上述方法实施例的技术方案,其实现原理和技术效果类似,本实施例此处不再赘述。
图15为本申请实施例提供的数据处理装置的结构示意图二。如图15所示,该装置150包括:显示单元1501、处理单元1502。
处理单元1502,用于:
获取第一终端设备发送的第一令牌;向云端服务器发送校验请求,所述校验请求中包括所述第一令牌以及所述第二终端设备的标识信息,所述校验请求用于请求所述云端服务器校验所述第一令牌和所述第二终端设备的标识信息之间是否存在对应关系;在所述校验通过之后,接收所述云端服务器发送的访问令牌,并根据所述访问令牌,触发所述第二终端设备中的第一应用程序登录第一账号。
在一种可能的实现方式中,所述处理单元1502具体用于:
接收所述第一终端设备发送的加密后的第一令牌;
根据所述第二终端设备的局域网络的密码信息,生成密钥;
根据所述密钥,对所述加密后的第一令牌进行解密,得到所述第一令牌。
在一种可能的实现方式中,所述处理单元1502还用于:
接收所述第一终端设备发送的加密后的账号数据;
根据所述密钥对所述加密后的账号数据进行解密,得到所述账号数据。
在一种可能的实现方式中,所述访问令牌中包括所述第一账号的标识信息。
在一种可能的实现方式中,所述处理单元1502还用于:
在所述获取第一终端设备发送的第一令牌之前,根据所述第二终端设备的局域网络的名称信息和所述密码信息,与所述第一终端设备建立局域网连接,所述局域网连接用于传输所述第一令牌和/或所述账号数据。
在一种可能的实现方式中,所述处理单元1502还用于:在所述获取第一终端设备发送的第一令牌之前,根据所述第二终端设备的标识信息和所述第二终端设备的局域网络的密码信息,生成识别码;
显示单元1501,用于在所述第二终端设备的图形用户界面上,展示所述识别码的图像。
在一种可能的实现方式中,所述处理单元1502还用于:在所述根据所述访问令牌,触发所述第二终端设备中的第一应用程序执行登录操作之后,向所述第一终端设备发送登录状态更新信息,所述登录状态更新信息用于指示所述第一终端设备中的第一应用程序的登录状态为已登录。
以及可以参照图16对电子设备进行理解,图16为本申请实施例提供的电子设备的硬件结构示意图。
在可能的实现方式中,本申请实施例中的计算机执行指令也可以称之为应用程序代码,本申请实施例对此不作具体限定。
可选的,接口电路1103还可以包括发送器和/或接收器。可选的,上述处理器1102可以包括一个或多个CPU,还可以是其他通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请 所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
本申请实施例还提供了一种计算机可读存储介质。上述实施例中描述的方法可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。如果在软件中实现,则功能可以作为一个或多个指令或代码存储在计算机可读介质上或者在计算机可读介质上传输。计算机可读介质可以包括计算机存储介质和通信介质,还可以包括任何可以将计算机程序从一个地方传送到另一个地方的介质。存储介质可以是可由计算机访问的任何目标介质。
一种可能的实现方式中,计算机可读介质可以包括RAM,ROM,只读光盘(compact disc read-only memory,CD-ROM)或其它光盘存储器,磁盘存储器或其它磁存储设备,或目标于承载的任何其它介质或以指令或数据结构的形式存储所需的程序代码,并且可由计算机访问。而且,任何连接被适当地称为计算机可读介质。例如,如果使用同轴电缆,光纤电缆,双绞线,数字用户线(Digital Subscriber Line,DSL)或无线技术(如红外,无线电和微波)从网站,服务器或其它远程源传输软件,则同轴电缆,光纤电缆,双绞线,DSL或诸如红外,无线电和微波之类的无线技术包括在介质的定义中。如本文所使用的磁盘和光盘包括光盘,激光盘,光盘,数字通用光盘(Digital Versatile Disc,DVD),软盘和蓝光盘,其中磁盘通常以磁性方式再现数据,而光盘利用激光光学地再现数据。上述的组合也应包括在计算机可读介质的范围内。
本申请实施例是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理单元以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理单元执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
以上的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的技术方案的基础之上,所做的任何修改、等同替换、改进等,均应包括在本发明的保护范围之内。

Claims (17)

  1. 一种数据处理方法,应用于第一终端设备,所述方法包括:
    获取第二终端设备的标识信息和所述第二终端设备的局域网络的密码信息,所述第一终端设备的第一应用程序中登录有第一账号;
    向云端服务器发送令牌获取请求,所述令牌获取请求中携带有所述标识信息,所述令牌获取请求用于请求所述云端服务器,生成所述第一账号对应的第一令牌,并建立所述第一令牌和所述标识信息之间的对应关系;
    接收所述云端服务器发送的所述第一令牌;
    根据所述密码信息,向所述第二终端设备发送所述第一令牌,所述第一令牌用于所述第二终端设备向云端服务器发起在第一应用程序中登录所述第一账号的校验请求。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述密码信息,向所述第二终端设备发送所述第一令牌,包括:
    根据所述密码信息,生成密钥;
    根据所述密钥,对所述第一令牌进行加密;
    向所述第二终端设备发送加密后的所述第一令牌。
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:
    调用所述第一终端设备的数据接口,以访问所述第一终端设备中的第一应用程序;
    在所述第一应用程序中,获取所述第一账号对应的账号数据;
    根据所述密钥对所述账号数据进行加密,并向所述第二终端设备发送加密后的所述账号数据。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述根据所述密码信息,向所述第二终端设备发送所述第一令牌之前,所述方法还包括:
    获取所述第二终端设备的局域网络的名称信息;
    根据所述名称信息和所述密码信息,与所述第二终端设备建立局域网连接,所述局域网连接用于传输所述第一令牌和/或所述账号数据。
  5. 根据权利要求1所述的方法,其特征在于,所述令牌获取请求中还携带有所述第一终端设备的访问令牌,所述访问令牌中包括所述第一账号的标识信息;
    所述访问令牌用于所述云端服务器对所述第一终端设备进行校验。
  6. 根据权利要求1所述的方法,其特征在于,所述获取第二终端设备的标识信息和所述第二终端设备的局域网络的密码信息,包括:
    采集所述第二终端设备的图形用户界面上展示的识别码的图像;
    对所述识别码的图像进行解析,得到所述第二终端设备的标识信息和所述第二终端设备的局域网络的密码信息。
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述方法还包括:
    在所述第二终端设备中的第一应用程序的登录状态更新为已登录之后,接收所述第二终端设备发送的登录状态更新信息。
  8. 一种数据处理方法,应用于第二终端设备,所述方法包括:
    获取第一终端设备发送的第一令牌;
    向云端服务器发送校验请求,所述校验请求中包括所述第一令牌以及所述第二终 端设备的标识信息,所述校验请求用于请求所述云端服务器校验所述第一令牌和所述第二终端设备的标识信息之间是否存在对应关系;
    在所述校验通过之后,接收所述云端服务器发送的访问令牌,并根据所述访问令牌,触发所述第二终端设备中的第一应用程序登录第一账号。
  9. 根据权利要求8所述的方法,其特征在于,所述获取第一终端设备发送的第一令牌,包括:
    接收所述第一终端设备发送的加密后的第一令牌;
    根据所述第二终端设备的局域网络的密码信息,生成密钥;
    根据所述密钥,对所述加密后的第一令牌进行解密,得到所述第一令牌。
  10. 根据权利要求9所述的方法,其特征在于,所述方法还包括:
    接收所述第一终端设备发送的加密后的账号数据;
    根据所述密钥对所述加密后的账号数据进行解密,得到所述账号数据。
  11. 根据权利要求8所述的方法,其特征在于,所述访问令牌中包括所述第一账号的标识信息。
  12. 根据权利要求8-11任一项所述的方法,其特征在于,所述获取第一终端设备发送的第一令牌之前,所述方法还包括:
    根据所述第二终端设备的局域网络的名称信息和所述密码信息,与所述第一终端设备建立局域网连接,所述局域网连接用于传输所述第一令牌和/或所述账号数据。
  13. 根据权利要求8所述的方法,其特征在于,所述获取第一终端设备发送的第一令牌之前,所述方法还包括:
    根据所述第二终端设备的标识信息和所述第二终端设备的局域网络的密码信息,生成识别码;
    在所述第二终端设备的图形用户界面上,展示所述识别码的图像。
  14. 根据权利要求8-13任一项所述的方法,其特征在于,所述根据所述访问令牌,触发所述第二终端设备中的第一应用程序执行登录操作之后,所述方法还包括:
    向所述第一终端设备发送登录状态更新信息,所述登录状态更新信息用于指示所述第一终端设备中的第一应用程序的登录状态为已登录。
  15. 一种电子设备,其特征在于,包括:处理器和显示屏,所述处理器用于调用存储器中的程序以执行权利要求1-14任一项所述的方法中处理的步骤,所述显示屏用于执行权利要求1-14任一项所述的方法中显示的步骤。
  16. 一种电子设备,其特征在于,包括:处理器、显示屏和接口电路,所述接口电路用于与其它装置通信,所述处理器用于执行权利要求1-14任一项所述的方法中处理的步骤,所述显示屏用于执行权利要求1-14任一项所述的方法中显示的步骤。
  17. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有指令,当所述指令被执行时,使得计算机执行如权利要求1-14任一项所述的方法。
PCT/CN2023/091416 2022-08-17 2023-04-28 数据处理方法及电子设备 WO2024037040A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210988235.0A CN117641359A (zh) 2022-08-17 2022-08-17 数据处理方法及电子设备
CN202210988235.0 2022-08-17

Publications (1)

Publication Number Publication Date
WO2024037040A1 true WO2024037040A1 (zh) 2024-02-22

Family

ID=89940580

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/091416 WO2024037040A1 (zh) 2022-08-17 2023-04-28 数据处理方法及电子设备

Country Status (2)

Country Link
CN (1) CN117641359A (zh)
WO (1) WO2024037040A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105245541A (zh) * 2015-10-28 2016-01-13 腾讯科技(深圳)有限公司 鉴权方法、设备及系统
US9323916B1 (en) * 2013-02-14 2016-04-26 Google Inc. Secure authorization for accessing content on a shareable device
CN110324276A (zh) * 2018-03-28 2019-10-11 腾讯科技(深圳)有限公司 一种登录应用的方法、系统、终端和电子设备
CN110798795A (zh) * 2019-09-20 2020-02-14 广汽蔚来新能源汽车科技有限公司 基于蓝牙的虚拟钥匙车控系统、方法、装置和计算机设备
WO2022135269A1 (zh) * 2020-12-22 2022-06-30 华为技术有限公司 一种利用其它设备授权的方法、电子设备和系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9323916B1 (en) * 2013-02-14 2016-04-26 Google Inc. Secure authorization for accessing content on a shareable device
CN105245541A (zh) * 2015-10-28 2016-01-13 腾讯科技(深圳)有限公司 鉴权方法、设备及系统
CN110324276A (zh) * 2018-03-28 2019-10-11 腾讯科技(深圳)有限公司 一种登录应用的方法、系统、终端和电子设备
CN110798795A (zh) * 2019-09-20 2020-02-14 广汽蔚来新能源汽车科技有限公司 基于蓝牙的虚拟钥匙车控系统、方法、装置和计算机设备
WO2022135269A1 (zh) * 2020-12-22 2022-06-30 华为技术有限公司 一种利用其它设备授权的方法、电子设备和系统

Also Published As

Publication number Publication date
CN117641359A (zh) 2024-03-01

Similar Documents

Publication Publication Date Title
CN111466099B (zh) 一种登录方法、令牌发送方法、设备及存储介质
JP7317242B2 (ja) ブルートゥース接続方法、システム、および電子デバイス
WO2020041952A1 (zh) 一种基于快递消息控制快递柜的方法及电子设备
WO2021052178A1 (zh) 一种Wi-Fi连接方法及设备
CN111373713B (zh) 一种消息传输方法及设备
WO2021043045A1 (zh) 一种网络配置信息的配置方法及设备
US20230129780A1 (en) Wi-Fi Aware Link Establishment Method and System, Electronic Device, and Storage Medium
WO2021043198A1 (zh) 一种蓝牙配对方法及相关装置
WO2021093855A1 (zh) 一种移动设备管理方法及设备
WO2020216098A1 (zh) 一种跨电子设备转接服务的方法、设备以及系统
WO2021017909A1 (zh) 一种通过nfc标签实现功能的方法、电子设备及系统
WO2021175266A1 (zh) 身份验证方法、装置和电子设备
CN113408016B (zh) 保存密文的方法和装置
WO2022143156A1 (zh) 一种加密通话方法、装置、终端及存储介质
WO2021184264A1 (zh) 数据保存方法、数据访问方法及相关装置、设备
EP4336356A1 (en) Screen projection method and related apparatus
WO2024037040A1 (zh) 数据处理方法及电子设备
CN117425227A (zh) 建立基于WiFi直接连接的会话的方法和装置
CN113676440A (zh) 通信过程中的权限协商方法、装置和电子设备
CN114157412A (zh) 信息验证的方法、电子设备及计算机可读存储介质
WO2023246695A1 (zh) 设备授权方法及电子设备、系统
US20230214532A1 (en) Permission negotiation method and apparatus during communication, and electronic device
WO2024002137A1 (zh) 通信方法、通信系统及电子设备
WO2024037500A1 (zh) 通信方法及相关装置
WO2022042273A1 (zh) 密钥使用方法及相关产品

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23853947

Country of ref document: EP

Kind code of ref document: A1