Data import method, electronic device, and computer-readable storage medium

The authentication method, which combines Bluetooth broadcasting and a visible light interface, simplifies the new device configuration process, solves the problem of cumbersome operations in the new device and cloning process, and improves the user experience.

WO2025260692A1PCT designated stage Publication Date: 2025-12-26HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/143063
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-20
Filing Date
2024-12-27
Publication Date
2025-12-26

AI Technical Summary

Technical Problem

In existing technologies, the process of configuring new machines and cloning them is cumbersome, lacks continuity, results in a poor user experience, and the QR code scanning experience is clunky.

Method used

This system enables authentication and data transmission between electronic devices via Bluetooth broadcast messages and a visible light interface, simplifying the new device configuration process. It combines the new device configuration and cloning process, and uses visible light images for connection code recognition and authentication.

Benefits of technology

The process of configuring new devices has been simplified, enhancing the user's seamless new device configuration experience and improving the interactive experience of connection code recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024143063_26122025_PF_FP_ABST
    Figure CN2024143063_26122025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a data import method, an electronic device, and a computer-readable storage medium. In the data import method, a first electronic device sends a Bluetooth broadcast message, then receives a visible light interface display request sent by a second electronic device by means of a Bluetooth connection, and displays a visible light interface. Next, the first electronic device receives an authorization request sent by the second electronic device by means of the Bluetooth connection, performs authorization authentication with the second electronic device on the basis of a connection code carried in the authorization request, establishes a data transmission channel with the second electronic device when the authorization authentication is successful, and imports data of the second electronic device into the first electronic device. Thus, the configuration process of a new device is simplified when the user has an old device, and the configuration process and the cloning process of the new device are integrated, enhancing the user's seamless new device configuration experience. In addition, performing authorization authentication by means of visible light can improve the user's connection code recognition interaction experience.
Need to check novelty before this filing date? Find Prior Art

Description

Data import method, electronic device and computer readable storage medium

[0001] The present application claims priority to the Chinese patent application No. 202410798033.9, filed on June 20, 2024, entitled "Data import method, electronic device and computer readable storage medium", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] Embodiments of the present application relate to the technical field of intelligent terminal, in particular to a data import method, an electronic device and a computer readable storage medium. BACKGROUND

[0003] With the popularity of electronic devices such as mobile phones, tablet computers, personal computers (PCs) and / or smart watches, one user can have at least two electronic devices, and the collaborative interaction between at least two electronic devices of the same user can bring a lot of convenience to personal entertainment and work. At the same time, how to quickly change the machine and complete the new device configuration has become a problem that users are concerned about.

[0004] In the prior art, when a new machine is started for the first time, a new machine configuration guide application guides the user to complete the new machine configuration; after the new machine configuration is completed, a cloning application copies the configuration, installed applications and application data of the "in-use device" to the new machine. However, in the above-mentioned solution provided by the prior art, the operation of the new machine configuration process and the cloning process is cumbersome, and the new machine configuration process and the cloning process have no relevance, lacking a coherent new machine configuration experience. SUMMARY

[0005] Embodiments of the present application provide a data import method, an electronic device and a computer readable storage medium to simplify the configuration process of the new machine when the user has an "in-use device", and to combine the configuration process of the new machine and the cloning process, thereby enhancing the user's coherent new machine configuration experience.

[0006] In a first aspect, the present application provides a data import method, comprising: a first electronic device sending a Bluetooth broadcast message, wherein the Bluetooth broadcast message carries an identity of the first electronic device and a first service requested by the first electronic device; receiving a request for displaying a visible light interface sent by a second electronic device through a Bluetooth connection; wherein the Bluetooth connection is established after the second electronic device determines that the second electronic device has the capability to provide the first service after receiving the Bluetooth broadcast message, and determines to establish the Bluetooth connection with the first electronic device; displaying the visible light interface, wherein the visible light interface includes a visible light image; wherein the visible light image is generated according to a connection code; receiving a trust request sent by the second electronic device through the Bluetooth connection; wherein the trust request is initiated after the second electronic device scans the visible light image in the visible light interface, decodes the visible light image, and obtains the connection code; the trust request carries the connection code obtained by the second electronic device; performing trust authentication with the second electronic device according to the connection code carried in the trust request; after the trust authentication succeeds, establishing a data transmission channel between the first electronic device and the second electronic device, and importing data of the second electronic device into the first electronic device through the data transmission channel.

[0007] In the above data import method, the first electronic device sends a Bluetooth broadcast message, wherein the Bluetooth broadcast message carries an identity of the first electronic device and a first service requested by the first electronic device, then the first electronic device receives a request for displaying a visible light interface sent by a second electronic device through a Bluetooth connection, and displays the visible light interface, wherein the visible light interface includes a visible light image. Next, the first electronic device receives a trust request sent by the second electronic device through the Bluetooth connection, performs trust authentication with the second electronic device according to the connection code carried in the trust request, and after the trust authentication succeeds, the first electronic device establishes a data transmission channel between the first electronic device and the second electronic device, and imports data of the second electronic device into the first electronic device, so that when a user has an old machine, the configuration process of a new machine can be simplified, and the configuration process and the cloning process of the new machine are combined, without the need for the user to find and open a cloning application in the new machine and the old machine, thereby enhancing the user's continuous new machine configuration experience. In addition, the present embodiment uses the visible light method with better experience to perform trust authentication, which can improve the user's connection code identification interaction experience.

[0008] In one possible implementation, the data of the second electronic device includes one or a combination of the following: user account data logged in by the second electronic device, configuration data of the second electronic device, applications installed in the second electronic device, and data of the above applications.

[0009] In one possible implementation, before the visible light interface is displayed, the first electronic device can further generate a connection code, and generate the visible light image according to the connection code.

[0010] In one possible implementation, the generating the visible light image according to the connection code includes: generating an initial image according to the connection code; dividing the initial image into at least two regions, and generating k information points in each region; where k is a positive integer, and k≥1; performing frequency error information coding on the k information points; and performing differential coding on the coded k information points to generate the visible light image.

[0011] In one possible implementation, the trust authentication with the second electronic device according to the connection code carried in the trust request can include: the first electronic device matching the connection code carried in the trust request with the connection code generated by the first electronic device; and the trust authentication success can include that the connection code carried in the trust request matches the connection code generated by the first electronic device successfully.

[0012] In one possible implementation, after the trust authentication is successful, the first electronic device can further receive a notification of closing the visible light interface sent by the second electronic device through the Bluetooth connection; and in response to receiving the notification, the first electronic device closes the visible light interface.

[0013] In one possible implementation, before the data transmission channel with the second electronic device is established, the first electronic device can further display a lock screen password checking interface after the trust authentication is successful; the lock screen password checking interface includes prompt information for inputting a lock screen password of the second electronic device; the first electronic device acquires a lock screen password input by a user using the first electronic device; the first electronic device sends the lock screen password input by the user to the second electronic device; and after the first electronic device receives a notification that the lock screen password input by the user is correct, the first electronic device sets the lock screen password input by the user as a lock screen password of the first electronic device.

[0014] In one possible implementation, the Bluetooth broadcast message can be a general broadcast indication message.

[0015] In a second aspect, the embodiments of the present application provide a data import method, comprising: receiving, by a second electronic device, a Bluetooth broadcast message sent by a first electronic device; the Bluetooth broadcast message carrying an identity of the first electronic device and a first service requested by the first electronic device; determining that the second electronic device has the capability to provide the first service, and establishing a Bluetooth connection with the first electronic device after determining that the Bluetooth connection is established; sending, by the second electronic device, a request for displaying a visible light interface to the first electronic device through the Bluetooth connection; scanning a visible light image in the visible light interface after the first electronic device displays the visible light interface; decoding the visible light image to obtain a connection code; sending, by the second electronic device, a trust request to the first electronic device through the Bluetooth connection, the trust request carrying the connection code, so that the first electronic device performs trust authentication on the second electronic device according to the connection code; and establishing a data transmission channel between the second electronic device and the first electronic device after the trust authentication is successful, and importing data of the second electronic device into the first electronic device through the data transmission channel.

[0016] In the above data import method, the second electronic device receives a Bluetooth broadcast message sent by the first electronic device, determines that the second electronic device has the capability to provide the first service, and establishes a Bluetooth connection with the first electronic device after determining that the Bluetooth connection is established. Then, the second electronic device sends a request for displaying a visible light interface to the first electronic device through the Bluetooth connection. After the first electronic device displays the visible light interface, the second electronic device scans a visible light image in the visible light interface, decodes the visible light image to obtain a connection code, and then sends a trust request to the first electronic device through the Bluetooth connection. After the trust authentication is successful, the second electronic device establishes a data transmission channel between the second electronic device and the first electronic device, and imports data of the second electronic device into the first electronic device through the data transmission channel. Thus, when the user has an old machine, the configuration process of the new machine can be simplified, and the configuration process and the cloning process of the new machine are combined, so that the user does not need to find and open the cloning application in the new machine and the old machine, and the user's continuous new machine configuration experience is enhanced. In addition, the visible light method with better experience is used for trust authentication, which can improve the user's connection code identification interaction experience.

[0017] In a possible implementation, the decoding of the visible light image to obtain the connection code can include: the second electronic device acquires at least two image frames including the visible light image; performs inter-frame difference operation on the at least two image frames, and performs local threshold binarization processing on a result obtained by the difference operation to obtain a binarization image; acquires positioning point information according to the binarization image; acquires serial numbers of at least two regions included in the visible light image and information points in each region according to the positioning point information; performs check and correction on the information points in each region, and decodes to obtain at least two connection codes and error correction bits corresponding to each connection code; and fuses the at least two connection codes and the error correction bits corresponding to each connection code to obtain the connection code after error correction.

[0018] In a possible implementation, the Bluetooth broadcast message further carries ranging adaptation parameters; and before the determination that the second electronic device has the capability to provide the first service, the method further includes: determining, according to the ranging adaptation parameters in the Bluetooth broadcast message, that a distance between the first electronic device and the second electronic device is less than or equal to a predetermined distance threshold.

[0019] In a possible implementation, the determination of the Bluetooth connection with the first electronic device includes: acquiring a determination indication of the Bluetooth connection with the first electronic device; and the determination indication is input by a user of the second electronic device in a setting interface displayed by the second electronic device.

[0020] In a possible implementation, before the scanning of the visible light image in the visible light interface, the second electronic device can further receive a notification of successful display of the visible light interface sent by the first electronic device through the Bluetooth connection; and a code scanning interface is displayed, and the code scanning interface includes a code scanning box.

[0021] In a possible implementation, the determination that the second electronic device has the capability to provide the first service can include: the second electronic device determines that the second electronic device has an application for providing the first service; thus, after the successful trust authentication, the second electronic device can start the application for providing the first service in the second electronic device.

[0022] In a third aspect, an embodiment of the present application provides a first electronic device, including: one or more processors; a memory; a plurality of application programs; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the first electronic device, cause the first electronic device to perform the method in the first aspect.

[0023] In a fourth aspect, an embodiment of the present application provides a second electronic device, comprising: one or more processors; a memory; a plurality of application programs; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs comprise instructions which, when executed by the second electronic device, cause the second electronic device to perform the method of the second aspect.

[0024] It should be understood that the third aspect of the embodiments of the present application is consistent with the technical solutions of the first aspect of the embodiments of the present application, and the beneficial effects obtained by each aspect and the corresponding feasible implementation manners are similar, which will not be described herein again.

[0025] It should be understood that the fourth aspect of the embodiments of the present application is consistent with the technical solutions of the second aspect of the embodiments of the present application, and the beneficial effects obtained by each aspect and the corresponding feasible implementation manners are similar, which will not be described herein again.

[0026] In a fifth aspect, an embodiment of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and when the computer program is run on a computer, the computer program causes the computer to perform the method of the first aspect.

[0027] In a sixth aspect, an embodiment of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and when the computer program is run on a computer, the computer program causes the computer to perform the method of the second aspect.

[0028] In a seventh aspect, an embodiment of the present application provides a computer program, when the computer program is executed by a computer, for performing the method of the first aspect.

[0029] In an eighth aspect, an embodiment of the present application provides a computer program, when the computer program is executed by a computer, for performing the method of the second aspect.

[0030] In a possible design, the programs in the seventh aspect and the eighth aspect can be stored in a storage medium packaged together with the processor in whole or in part, or in a storage medium not packaged together with the processor in whole or in part. BRIEF DESCRIPTION OF DRAWINGS

[0031] FIG. 1 is a schematic diagram of a new machine configuration booting process;

[0032] FIG. 2 is a schematic diagram of a data cloning process;

[0033] FIG. 3 is a structural schematic diagram of an electronic device according to an embodiment of the present application;

[0034] FIG. 4 is a software architecture block diagram of an electronic device 100 according to an embodiment of the present application;

[0035] FIG. 5(a) is a schematic diagram of an interface of a new device configuration process according to an embodiment of the present application;

[0036] FIG. 5(b) is a schematic diagram of a user operation flow in a new device configuration process according to an embodiment of the present application;

[0037] FIG. 6 is a schematic diagram of an interaction between a new device and an old device in a new device configuration process according to an embodiment of the present application;

[0038] FIG. 7 is a flowchart of a data import method according to an embodiment of the present application;

[0039] FIG. 8 is a schematic diagram of broadcast reporting in a BLE protocol specification;

[0040] FIG. 9 is a schematic diagram of broadcast reporting according to an embodiment of the present application;

[0041] FIG. 10 is a flowchart of display and decoding of a visible light image according to an embodiment of the present application;

[0042] FIG. 11 is a schematic diagram of a decoding process of a visible light image according to an embodiment of the present application;

[0043] FIG. 12 is a flowchart of a data import method according to another embodiment of the present application;

[0044] FIG. 13 is a flowchart of a data import method according to another embodiment of the present application;

[0045] FIG. 14 is a schematic diagram of a structure of an electronic device according to another embodiment of the present application. DETAILED DESCRIPTION

[0046] The terms used in the embodiments section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.

[0047] In the prior related art, when a new electronic device (for example, a smart phone) is powered on for the first time, the new electronic device can guide a user to complete new device configuration by running a new device configuration boot application. FIG. 1 is a schematic diagram of a new device configuration boot process. As shown in FIG. 1, an existing new device configuration boot process includes configuration operations such as welcome, language, region, quick start, …, data import, and gesture navigation.

[0048] After the new machine configuration is completed, the user can find the cloned application in the new electronic device and open it. In response to the operation of the user opening the cloned application, the new electronic device can run the cloned application, as shown in FIG.2. After the new electronic device runs the cloned application, it first displays a "data cloning" interface, and then the user can select "this is a new device" in the "data cloning" interface. Next, the new electronic device displays a "select old device" interface, and the user can select an old device for data migration in the "select old device" interface, for example, "A's Nova 8 Pro". After that, the new electronic device displays a "connect old device" interface, and the "connect old device" interface displays a two-dimensional code. At this time, the user can find the cloned application in the "in-use device" and open it. The "in-use device" displays a "data cloning" interface, and then the user can select "this is an old device" in the "data cloning" interface displayed by the "in-use device". Next, the "in-use device" displays a scan code box, and the user scans the two-dimensional code displayed in the "connect old device" interface of the new electronic device using the "in-use device". Then, the "in-use device" starts to send data to the new electronic device, and the new electronic device receives the data, so as to realize copying of the configuration data, installed applications and application data of the "in-use device" to the new electronic device. FIG.2 is a schematic diagram of a data cloning process.

[0049] However, the manual operation of the above new machine configuration process is tedious, including more than ten configuration operations such as language, region, network, user account and password; and in the cloning process, the user needs to find and open the cloned applications of the new electronic device and the in-use device, and then perform more than 5 operations. Moreover, the new machine configuration process and the cloning process have no correlation, and lack a coherent new machine configuration experience; the experience of scanning the two-dimensional code is harsh, and cannot leave a deep sensory experience for the user.

[0050] Based on the above problems, the embodiments of the present application provide a data import method, which can simplify the configuration process of the new machine when the user has an "in-use device", and combine the configuration process of the new machine with the cloning process to enhance the user's coherent new machine configuration experience.

[0051] The data import method provided by the embodiments of the present application can be applied to an electronic device, wherein the electronic device can be a smart phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc. The embodiments of the present application do not make any limitation on the specific type of the electronic device.

[0052] For example, FIG. 3 is a structural schematic diagram of an electronic device according to an embodiment of the present application. As shown in FIG. 3, the electronic device 100 can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset jack 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0053] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than shown, or combine certain components, or split certain components, or different arrangement of components. The components shown can be implemented in hardware, software, or a combination of software and hardware.

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

[0055] The controller can generate operation control signals according to instruction operation codes and timing signals to complete the control of fetching and executing instructions.

[0056] The processor 110 can also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can hold instructions or data that the processor 110 has just used or is cycling through. If the processor 110 needs to use the instructions or data again, it can be called directly from the memory. This avoids repeated access and reduces the latency of the processor 110, thus improving the efficiency of the system.

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

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

[0059] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a structural limitation of the electronic device 100. In some other embodiments of the present application, the electronic device 100 can also use different interface connection methods or combinations of multiple interface connection methods in the above embodiments.

[0060] The charging management module 140 is configured to receive charging input from a charger. The charger can be a wireless charger or a wired charger. In some embodiments with wired charging, the charging management module 140 can receive charging input from a wired charger through the USB interface 130. In some embodiments with wireless charging, the charging management module 140 can receive wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 can charge the battery 142 and power the electronic device 100 through the power management module 141.

[0061] The power management module 141 is configured 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 to power the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be configured to monitor parameters such as battery capacity, battery cycle count, battery health (leakage, impedance), and the like. In some other embodiments, the power management module 141 can also be disposed in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 can also be disposed in the same device.

[0062] The wireless communication function of the electronic 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.

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

[0064] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, etc. applied to the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform filtering, amplification, etc. on the received electromagnetic waves, and transfer the same to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor, and radiate the same as electromagnetic waves through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be disposed in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be disposed in the same device as at least part of the modules of the processor 110.

[0065] The modem processor can include a modulator and a demodulator. The modulator is configured to modulate a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is configured to demodulate a 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 low-frequency baseband signal processed by the baseband processor is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the microphone 170B, etc.), or displays an image or a video through the display screen 194. In some embodiments, the modem processor can be a separate device. In other embodiments, the modem processor can be independent of the processor 110, and disposed in the same device as the mobile communication module 150 or other functional modules.

[0066] The wireless communication module 160 can provide a solution for wireless communication including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc. applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives an electromagnetic wave via the antenna 2, frequency-modulates and filters the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 160 can also receive a signal to be transmitted from the processor 110, frequency-modulate it, amplify it, and radiate it as an electromagnetic wave via the antenna 2.

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

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

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

[0070] The electronic device 100 can implement the photographing function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor.

[0071] The ISP is configured 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 photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing to convert it into an image visible to the naked eye. The ISP can also optimize the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature, and other parameters of the shooting scene. In some embodiments, the ISP can be disposed in the camera 193.

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

[0073] The digital signal processor is used to process digital signals, in addition to being able to process digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.

[0074] The video codec is used to compress or decompress digital video. The electronic device 100 can support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.

[0075] The NPU is a neural-network (NN) calculation processor, which can quickly process input information by drawing on the structure of a biological neural network, such as drawing on the transmission mode between human brain neurons, and can also constantly self-learn. Through the NPU, the electronic device 100 can realize intelligent cognition applications such as image recognition, face recognition, voice recognition, text understanding, etc.

[0076] 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 electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to realize data storage functions. For example, music, video, etc. Files are saved in the external memory card.

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

[0078] The electronic device 100 can realize audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor, etc. For example, music playing, recording, etc.

[0079] The audio module 170 is configured to convert digital audio information into an analog audio signal output, and to convert an analog audio input into a digital audio signal. The audio module 170 can also be configured to encode and decode audio signals. In some embodiments, the audio module 170 can be disposed in the processor 110, or some of the functions of the audio module 170 can be disposed in the processor 110.

[0080] The speaker 170A, also referred to as a "loudspeaker", is configured to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0081] The receiver 170B, also referred to as a "earpiece", is configured to convert an audio electrical signal into a sound signal. When the electronic device 100 receives a call or a voice message, the user can listen to the voice through the receiver 170B by placing the receiver 170B close to the ear.

[0082] The microphone 170C, also referred to as a "microphone", "transducer", is configured to convert a sound signal into an electrical signal. When making a call or sending a voice message, the user can make a sound through the mouth close to the microphone 170C, and input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, in addition to collecting sound signals, noise reduction functions can also be realized. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C, in addition to collecting sound signals, noise reduction, and can also identify the source of the sound, realize the function of directional recording, etc.

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

[0084] The keys 190 include a power-on key, a volume key, etc. The keys 190 can be mechanical keys. They can also be touch keys. The electronic device 100 can receive key inputs, and generate key signal inputs related to user settings and function control of the electronic device 100.

[0085] The motor 191 can generate a vibration prompt. The motor 191 can be used for incoming call vibration prompt, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, playing audio, etc.) can correspond to different vibration feedback effects. Touch operations acting on different regions of the display screen 194 can also correspond to different vibration feedback effects of the motor 191. Different application scenarios (such as time reminders, received messages, alarms, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.

[0086] The indicator 192 can be an indicator light, which can be used to indicate the charging state, the power change, and can also be used to indicate messages, missed calls, notifications, etc.

[0087] The SIM card interface 195 is used to connect the SIM card. The SIM card can be inserted into or pulled out of the SIM card interface 195 to realize contact and separation with the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, and N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. The same SIM card interface 195 can simultaneously insert multiple cards. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external storage cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as calling and data communication. In some embodiments, the electronic device 100 uses an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0088] In the embodiments of the present application, the software system architecture of the electronic device 100 can be as shown in FIG. 4, which is a software architecture block diagram of the electronic device 100 provided by an embodiment of the present application.

[0089] As shown in FIG. 4, the software system of the electronic device 100 can be divided into four layers, from top to bottom in turn: business layer, service discovery, interconnection foundation and short distance, and the layers communicate through software interfaces.

[0090] Among them, the business layer includes out of box experience (OOBE), cloning and user account, etc. Among them, OOBE can guide the user to perform a new machine configuration process after the new electronic device is powered on for the first time; cloning can realize copying of data of a “device in use” of the user to a new electronic device; and the user account can enable the user to log in to his own user account.

[0091] The service discovery includes an application programming interface (API) layer and a service layer. The API layer includes a touchscreen object controller (ToC) interaction control, which includes a trust control and a unified pop-up control. The trust control is used for trust authentication between a new electronic device and an in-use device. The unified pop-up control can provide modal interaction for confirming an operation, displaying a warning, or providing more options.

[0092] The service layer includes service distribution, a pop-up service, service publishing, and service discovery. The pop-up service is used to implement related services of a pop-up, including device trust, lifecycle management, a pop-up framework, and pop-up conflict management. The service publishing includes bluetooth low energy (BLE) broadcast publishing, which can send a BLE broadcast message. The service discovery includes proximity discovery, which can receive a BLE broadcast message and determine whether a distance between an electronic device sending the BLE broadcast message and the electronic device itself meets a proximity distance.

[0093] The interconnection foundation layer includes a soft bus, a device manager (DM), a security trust module, and a multicast source discovery protocol (MSDP).

[0094] The short-distance layer includes a basic rate (BR) / BLE and Wi-Fi. The BR / BLE can support the electronic device 100 to perform Bluetooth communication, and the Wi-Fi can support the electronic device 100 to perform wireless network communication.

[0095] For ease of understanding, the following embodiments of the present application will take the electronic device with the structure shown in FIGS. 3 and 4 as an example, and the data import method provided by the embodiments of the present application will be specifically described in combination with the drawings and application scenarios.

[0096] The data import method provided by the embodiments of the present application can use BLE broadcast and broadcast-based ranging to complete notification of a proximity device, use visible light and scanning identification of a connection code to complete trust authentication of a new electronic device and an in-use device, and integrate a new device configuration process and a cloning process to complete a coherent new device configuration. In the following description of the embodiments, for the convenience of description, the new electronic device is referred to as a "new device", a "new mobile phone", or a "new device", and the in-use device is referred to as an "old device" or an "old mobile phone". It can be understood that whether the new device or the old device can be implemented by using the structure shown in FIGS. 3 and 4.

[0097] Fig. 5(a) is a schematic diagram of an interface of a new machine configuration process according to an embodiment of the present application. As shown in Fig. 5(a), after the new machine is started for the first time, the new machine displays the interface shown in 51. The user can select a language in the interface shown in 51. In this embodiment, the user selects "Simplified Chinese". After the new machine is started, if the Bluetooth of the old machine currently used by the user is turned on and the old machine receives the Bluetooth broadcast message of the new machine, the old machine displays a pop-up interface on the interface currently displayed by the old machine, as shown in 512. In the interface shown in 512, the interface currently displayed by the old machine is a lock screen interface. The pop-up interface is displayed on the lock screen interface. The pop-up interface displays a prompt information "Use your user account '123@huawei.com' to set up this device" and a button "Unlock and set up". After the user clicks the button "Unlock and set up", it indicates that the user confirms to establish a Bluetooth connection with the new machine.

[0098] After the user selects the language, the new machine displays the interface shown in 52. Then, the user can select a region in the interface shown in 52. In this embodiment, the user selects "China". After the user selects the region, the new machine displays the "Quick Start" interface shown in 53. In the interface shown in 53, a prompt information "Bring the electronic device currently used close to this device and make sure that the Bluetooth is turned on to easily complete the setup" is displayed. Then, the new machine displays the "Connection Verification" interface shown in 54. In the interface shown in 54, a visible light image is displayed and a prompt information "Place the following pattern in the viewfinder of another device being used" is displayed. The visible light image is generated according to a connection code. The connection code can be used for trust authentication between the new machine and the old machine. As can be seen from Fig. 5(a), the visible light image in the interface shown in 54 is ring-shaped. In a specific implementation, the visible light image can also be displayed with dynamic effects by adjusting the color gamut and / or brightness, etc.

[0099] After the new machine displays the interface shown in 54, the old machine can display the interface shown in 513. In the interface shown in 513, the interface currently displayed by the old machine is a lock screen interface. A "Scan to Verify" interface is displayed in a pop-up window on the lock screen interface. In the "Scan to Verify" interface displayed in the pop-up window, a viewfinder is displayed and a prompt information "Align the viewfinder to the pattern on the new device" is displayed. At this time, the user can align the viewfinder displayed by the old machine to the visible light image displayed in the interface 54 of the new machine for scanning.

[0100] After the old machine scans the above visible light image, the new machine can display the "check lock screen password" interface shown as 55, the interface shown as 55 displays "please enter the lock screen password of 'A's Nova 8 Pro' for security verification", and the prompt information "the password you enter will be used as the password of the new device". Then, the user can enter the lock screen password of 'A's Nova 8 Pro' in the interface shown as 55, so not only can the identity of the user be further confirmed to improve the security of data import, but also the lock screen password of the old machine currently used by the user can be directly set as the lock screen password of the new machine, so that during the configuration process of the new machine, the user does not need to perform the operation of setting the lock screen password on the new machine, and in the subsequent process of using the new machine, the user is also more familiar with the operation, and there is no sense of fragmentation. Moreover, in the present embodiment, after the lock screen password is checked, the new machine logs in the user account logged in by the old machine, so that during the configuration process of the new machine, the user does not need to perform the operation of logging in the account on the new machine, and thereafter, if the user selects to import data from the cloud backup, the new machine can directly import the cloud backup data under the user account to the new machine.

[0101] After the new machine displays the "check lock screen password" interface shown as 55, the old machine can display the interface shown as 514, in the interface shown as 514, the interface currently displayed by the old machine is also a lock screen interface, and a pop-up box is displayed on the lock screen interface, and the interface displayed by the pop-up box displays "operation on the new device", and the prompt information "please keep this device close to the new device during the new device setup".

[0102] After the new machine displays the interface shown in 55, the new machine can display the "data import" interface shown in 56, the interface shown in 56 displays the prompt information "select data transmission method, directly import from 'A's Nova8 Pro' or download from cloud backup", and also displays two icons, "directly import from the device in use" and "download from cloud backup". If in the interface shown in 56, the user selects the icon "directly import from the device in use", then the new machine displays the "data import" interface shown in 57, the interface shown in 57 displays the prompt information "accounted for 'A's Nova8 Pro', ready for all the following contents", and also displays three icons "basic data", "application data" and "system settings", the user clicks the three icons respectively to view the detailed information of each type of data; in addition, the interface shown in 57 also displays the "start import" icon, after the user clicks the "start import" icon, the data import process starts, and the new machine displays the "data importing" interface shown in 58. In the interface shown in 58, the new machine displays the prompt information "importing data from 'A's Nova8 Pro', and will automatically complete the recovery after the import is completed", and "importing data, please wait for a moment to complete the recovery, please insert the power supply and keep the network connection", and the interface shown in 58 also displays the data import progress bar. Finally, after the data import is completed, the new machine displays the interface shown in 59, which indicates that the new machine configuration process has been completed, and the interface shown in 59 displays the "experience immediately" icon, after the user clicks the "experience immediately" icon, the new machine displays the main interface. After the new machine displays the interface shown in 57, the old machine can display the interface shown in 515, in the interface shown in 515, the interface currently displayed by the old machine is the lock screen interface, and the interface "data importing" is displayed in a pop-up window on the lock screen interface, and the prompt information "please keep this device close to the new device during data import" is displayed in the "data importing" interface displayed in the pop-up window. After the data import is completed, the old machine can display the interface shown in 516, in the interface shown in 516, the interface currently displayed by the old machine is the lock screen interface, and the interface "enjoy your new phone" is displayed in a pop-up window on the lock screen interface, and the prompt information "all data has been imported to the new phone" is displayed in the interface "enjoy your new phone" displayed in the pop-up window.

[0103] If the user selects the icon of "download from cloud backup" in the interface shown in 56, the new machine displays the "data import" interface shown in 510, the interface shown in 510 displays the prompt information of "accounted for the cloud backup data of 'A's Nova 8 Pro', ready for all the following contents", and the three icons of "basic data", "application data" and "system settings", the user clicks the three icons respectively to view the detailed information of each type of data; in addition, the interface shown in 510 also displays the "start import" icon, after the user clicks the "start import" icon, the data import process starts, and the new machine displays the "data importing" interface shown in 511. In the interface shown in 511, the new machine displays the prompt information of "downloading and restoring data from the cloud backup of 'A's Nova 8 Pro', and your data is being downloaded to the new machine through WLAN, please wait for a moment to complete the restoration, please insert the power and keep the network connection", and the interface shown in 511 also displays the progress bar of data import. Finally, after the data import is completed, the new machine displays the interface shown in 59, which indicates that the new machine configuration process is completed, and the interface shown in 59 displays the "experience immediately" icon, after the user clicks the "experience immediately" icon, the new machine displays the main interface. After the new machine displays the interface shown in 510, the old machine can display the interface shown in 517, in the interface shown in 517, the interface currently displayed by the old machine is the lock screen interface, and the interface of "enjoy your new phone" is displayed in a pop-up window on the lock screen interface, and the prompt information of "your data is being downloaded to the new phone through WLAN, please wait for a moment to complete the setting" is displayed in the "enjoy your new phone" interface displayed in the pop-up window.

[0104] From the above process, it can be seen that in the new machine configuration process of the embodiment of the present application, the user operation flow can be as shown in FIG. 5(b), which is a schematic diagram of the user operation flow in the new machine configuration process provided by an embodiment of the present application. As can be seen from FIG. 5(b), the new machine configuration process is divided into a discovery stage, a pairing / setup stage and a data import stage. In the discovery stage, the user selects the language and the region on the new machine, and then the new machine displays the "quick start" interface as shown in 53 in FIG. 5(a); the user clicks the "unlock and set" button on the interface 512 displayed by the old machine, and then the old machine enters the connection and establishes a Bluetooth connection with the new machine. After that, in the pairing / setup stage, the new machine displays the visible light image, verifies the lock screen password, and creates the lock screen password, and then the new machine connects to the network and enters the process of being set up; the old machine scans the visible light image displayed by the new machine to obtain the connection code carried by the visible light image, and then can perform trust authentication with the new machine according to the connection code. Finally, in the data import stage, the user selects the data import mode on the new machine, and views / selects the data, and then the new machine performs the data import operation, and in this stage, the old machine no longer performs the operation, and all the operations are performed on the new machine.

[0105] As can be seen from FIG. 5(a) and FIG. 5(b), in the embodiment of the present application, in the new machine configuration process, the user only needs to perform the following four operations on the new machine: selecting a language, selecting a region, inputting a lock screen password, and selecting a data import method, and performs the following two operations on the old machine: confirming the pop-up box and scanning the visible light image, so as to complete the new machine configuration process and import the data in the old machine or the cloud backup into the new machine, thereby realizing the integration of the new machine configuration process and the cloning process and completing the coherent new machine configuration.

[0106] FIG. 6 is a schematic diagram of the interaction between the new machine and the old machine in the new machine configuration process according to an embodiment of the present application. As shown in FIG. 6, the new machine configuration process can include the following steps:

[0107] In step 601, the new machine enters the new machine configuration application and triggers the Bluetooth broadcast.

[0108] In this step, after the new machine is started for the first time, the new machine can run the new machine configuration application OOBE and trigger the Bluetooth broadcast. At this time, the new machine can display the interface shown in 51.

[0109] In step 602, the new machine sends a BLE broadcast message.

[0110] In step 603, after the old machine receives the BLE broadcast message sent by the new machine, the old machine performs Bluetooth ranging and displays a pop-up box interface.

[0111] In this step, the old machine can display the interface shown in 512. The pop-up box interface shown in 512 includes an "unlock and set" button.

[0112] In step 604, the "set" button of the pop-up box is clicked.

[0113] In this step, after the old machine displays the interface shown in 512, the user clicks the "unlock and set" button in the pop-up box interface shown in 512, which means that the user confirms to establish a Bluetooth connection with the new machine.

[0114] In step 605, the old machine establishes a BLE connection with the new machine.

[0115] In step 606, the old machine requests the new machine to display a visible light image.

[0116] In step 607, the new machine displays a visible light interface, and the visible light interface includes a visible light image.

[0117] In this step, the visible light interface displayed by the new machine can be as shown in 54. The interface shown in 54 includes a ring-shaped visible light image.

[0118] In step 608, the new machine notifies the old machine that the visible light interface has been displayed.

[0119] Step 609, the old machine pulls up the camera and displays the viewfinder.

[0120] In this step, the old machine can display the interface shown in 513. In the interface shown in 513, the old machine displays the interface of "scan verification" in a pop-up window, and displays the viewfinder and the prompt information "align the viewfinder with the pattern on the new device". At this time, the user can align the viewfinder displayed by the old machine with the visible light image displayed in the interface of the new machine 54 according to the prompt information and perform scanning.

[0121] Step 610, the old machine completes the scanning of the visible light image.

[0122] In this step, after the old machine scans the visible light image, a connection code can be obtained, which can be used for subsequent trust authentication.

[0123] Step 611, the old machine initiates trust authentication to the new machine.

[0124] Step 612, the new machine notifies the old machine that the trust authentication is completed through BLE broadcast interaction.

[0125] Step 613, the trust authentication is completed, and the old machine enters the business interface.

[0126] In this step, after the trust authentication is completed, the old machine enters the business interface, which can be as shown in 514.

[0127] Step 614, the old machine requests the new machine to close the visible light interface.

[0128] Step 615, the new machine stops displaying the visible light image.

[0129] Step 616, the cloned application in the old machine initiates business interaction.

[0130] Step 617, the old machine and the new machine establish a WiFi-P2P connection.

[0131] In this embodiment, after the new machine stops displaying the visible light image, the new machine can display the interface shown in 56. If the user clicks the icon "directly import from the device in use" in the interface shown in 56, the cloned application in the old machine is woken up, the cloned application in the old machine initiates business interaction, and the old machine and the new machine can establish a high-speed data transmission channel through the WiFi-P2P protocol. Of course, when the old machine and the new machine establish the data transmission channel, not only the above-mentioned WiFi-P2P protocol can be used, but also other protocols can be used, for example, HTML or other types of markup languages, etc. The protocol used when the old machine and the new machine establish the data transmission channel is not limited in this embodiment.

[0132] Step 618, the new machine and the old machine perform multiple rounds of data interaction.

[0133] In this embodiment, after the data transmission channel is established between the old machine and the new machine, the old machine and the new machine can perform multiple rounds of data interaction, and in this process, the data exchanged between the old machine and the new machine is all data encrypted by the secret key.

[0134] In the process of data interaction between the new machine and the old machine, the new machine can display the interfaces shown in 57 and 58, and the old machine displays the interface shown in 515.

[0135] Step 619, the service is completed.

[0136] After the data import is completed, the new machine can display the interface shown in 59, and the old machine displays the interface shown in 517.

[0137] Next, the data import method provided by the embodiments of the present application will be described in combination with a specific scenario.

[0138] FIG. 7 is a flowchart of the data import method provided by an embodiment of the present application. In this embodiment, the user has two in-use devices (i.e., old machines), which are old machine B and old machine C, and the user's newly purchased electronic device is new machine A. Next, the configuration process of the new machine A will be introduced.

[0139] As shown in FIG. 7, the above data import method can include the following steps.

[0140] Step 701, the cloned application in the old machine B registers the service capability to the package management application.

[0141] Specifically, the cloned application in the old machine B registering the service capability to the package management application can be that the cloned application sends a service identity (service ID), a service name (serviceName), a device type of the new machine, and a user interface ability name (uiAbilityName) to the package management application.

[0142] Step 702, the service discovery module in the old machine B initializes the query of the possessed service capability to the package management application.

[0143] Step 703, the service discovery module in the old machine B subscribes to the BLE broadcast of the Bluetooth module in the old machine B.

[0144] Step 704, the new machine A is powered on for the first time and enters the new machine configuration boot.

[0145] Step 705, the new machine configuration application in the new machine A requests the cloned service from the service discovery module.

[0146] At step 706, the service discovery module in the new machine A organizes a BLE broadcast message of the service request.

[0147] In the BLE broadcast message, the identity of the new machine A and the service requested by the new machine A are carried, and in this example, the service requested by the new machine A is the cloning service.

[0148] In this embodiment, the BLE broadcast message can be an advertising indication (ADV_IND) message, and the field information carried in the BLE broadcast message can be as shown in Table 1.

[0149] Table 1

[0150] In Table 1, the 0x12 field is a new model ID (newModelID) of the new machine A. If the new machine A is a PC, the value of the 0x12 field can be "T***"; if the new machine A is a tablet computer, the value of the 0x12 field can be "R0**-RW**"; and if the new machine A is a mobile phone, the value of the 0x12 field can be "P***".

[0151] 0x04: subModelID, which can be used to identify the color of the new machine A.

[0152] 0x11: advPower, which is the value of the adaptation parameter for ranging.

[0153] 0xFF: separator.

[0154] T: 0x91, where T is a type value, and 0xF0 is a specific type defined by the service itself. In this example, the type value is a client service identifier.

[0155] V: 7B, where V is an abbreviation of value. V includes three pieces of information, which are:

[0156] (1) udid_Hash: udid is the identity of the new machine A, for example, the international mobile equipment identity (IMEI) of the new machine A; and udid_Hash is the hash value of the identity of the new machine A.

[0157] (2) client service identifier: indicating the service requested by the new machine A; in this example, the value of the client service identifier is 2, indicating that the service requested by the new machine A is the cloning service.

[0158] (3) Sequence (seq): value range is 0-255.

[0159] Step 707, the service discovery module in the new machine A sends the BLE broadcast message to the Bluetooth module in the new machine A.

[0160] Step 708, the Bluetooth module in the new machine A sends the BLE broadcast message, and the Bluetooth modules in the old machine B and the old machine C respectively receive the BLE broadcast message.

[0161] Step 709, the Bluetooth module in the old machine C reports the received BLE broadcast message to the service discovery module in the old machine C.

[0162] Step 710, the service discovery module in the old machine C determines the distance between the new machine A and the old machine C according to the ranging adaptation parameter in the BLE broadcast message.

[0163] Specifically, if the distance between the new machine A and the old machine C is less than or equal to a predetermined distance threshold, the old machine C can determine that the distance between the new machine A and the old machine C is close distance. The size of the predetermined distance threshold can be set by itself in specific implementation, and the embodiment does not limit the size of the predetermined distance threshold.

[0164] In this embodiment, the ranging adaptation parameter in the BLE broadcast message is the value of the 0x11 field in Table 1.

[0165] Step 711, the service discovery module in the old machine C parses the BLE broadcast message and determines that there is an application in the package management application of the old machine C that can provide a cloning service.

[0166] Specifically, after the service discovery module in the old machine C determines that the distance between the new machine A and the old machine C is close distance, the service discovery module in the old machine C determines that there is an application in the package management application of the old machine C that can provide a cloning service.

[0167] Step 712, the old machine C pops up a confirmation box.

[0168] In this step, the interface displayed by the old machine C can be as shown in 512 in FIG. 5(a).

[0169] Step 713, the Bluetooth module in the old machine B reports the received BLE broadcast message to the service discovery module in the old machine B.

[0170] Step 714, the service discovery module in the old machine B determines the distance between the new machine A and the old machine B according to the ranging adaptation parameter in the BLE broadcast message.

[0171] Specifically, if the distance between the new machine A and the old machine B is less than or equal to a predetermined distance threshold, the old machine B can determine that the distance between the new machine A and the old machine B is a close distance.

[0172] At step 715, the service discovery module in the old machine B parses the BLE broadcast packet to determine that there is an application in the package management application of the old machine B that can provide a cloned service.

[0173] Specifically, after the service discovery module in the old machine B determines that the distance between the new machine A and the old machine B is a close distance, the service discovery module in the old machine B determines that there is an application in the package management application of the old machine B that can provide a cloned service.

[0174] At step 716, the old machine B pops up a confirmation box.

[0175] In this step, the interface displayed by the old machine B can be as shown in 512 in FIG. 5(a).

[0176] In actual implementation, steps 709-712 and steps 713-716 can be executed in sequence or in parallel, and the execution order of steps 709-712 and steps 713-716 is not limited in the embodiment.

[0177] At step 717, the service discovery module in the old machine B receives a user confirmation indication.

[0178] In the embodiment, the user can click the “Unlock and Set” button in the 512 interface displayed by the old machine B, and in response to the operation of the user clicking the “Unlock and Set” button, the service discovery module in the old machine B determines to establish a Bluetooth connection with the new machine A.

[0179] At step 718, the service discovery module in the old machine B requests the trusted module in the old machine B to display a visible light interface.

[0180] At step 719, the trusted module in the old machine B performs BLE chain building with the trusted module in the new machine A to establish a Bluetooth connection between the old machine B and the new machine A, and sends a request to display a visible light interface to the trusted module in the new machine A through the Bluetooth connection.

[0181] At step 720, the trusted module in the new machine A generates a connection code.

[0182] At step 721, the trusted module in the new machine A sends a request to display a visible light interface to the service discovery module in the new machine A, wherein the request to display a visible light interface carries the connection code.

[0183] At step 722, the service discovery module in the new machine A notifies the visible light display module in the new machine A to display a visible light interface, wherein the notification carries the connection code.

[0184] Step 723, the visible light display module in the new machine A generates a visible light image according to the connection code.

[0185] Step 724, the visible light display module in the new machine A displays a visible light interface, which includes the visible light image.

[0186] Step 725, the visible light display module in the new machine A notifies the service discovery module of the display success.

[0187] Step 726, the service discovery module in the new machine A notifies the new machine configuration application that the old machine B has confirmed that it can provide the cloning service.

[0188] Step 727, the new machine configuration application in the new machine A cancels the cloning service request to the service discovery module.

[0189] Step 728, the service discovery module in the new machine A notifies the Bluetooth module to stop the pop-up box broadcast.

[0190] Step 729, the Bluetooth module in the new machine A sends a stop pop-up box broadcast, and the service discovery module in the old machine B and the old machine C receives the stop pop-up box broadcast.

[0191] Step 730, the service discovery module in the old machine B ignores the stop pop-up box broadcast because the user has clicked the confirmation in the pop-up box interface displayed by the old machine B.

[0192] Step 731, the service discovery module in the old machine C cancels the display of the pop-up box interface.

[0193] Step 732, the service discovery module in the new machine A requests the trusted module in the new machine A to notify the opposite end to display the visible light interface successfully.

[0194] Step 733, the trusted module in the new machine A sends a BLE message to the trusted module in the old machine B to notify the old machine B of the successful display of the visible light interface.

[0195] Step 734, the trusted module in the old machine B notifies the service discovery module in the old machine B that the new machine A has displayed the visible light interface.

[0196] Step 735, the service discovery module in the old machine B notifies the visible light scanning module in the old machine B to pull up the scanning code box.

[0197] Step 736, the visible light scanning module in the old machine B displays a scanning code interface.

[0198] In this step, the scanning code interface displayed by the old machine B can be as shown in 513 of FIG. 5(a).

[0199] Step 737, the visible light scanning module in the old machine B scans the visible light image displayed by the new machine A, and decodes the visible light image to obtain the connection code.

[0200] Step 738, the visible light scanning module in the old machine B sends the connection code to the service discovery module in the old machine B.

[0201] Step 739, the service discovery module in the old machine B initiates a trust request to the trust module in the old machine B, wherein the trust request carries the connection code.

[0202] Step 740, the trust module in the old machine B sends a binding request to the trust module in the new machine A, wherein the binding request carries the connection code.

[0203] Specifically, when the trust module in the old machine B sends a binding request to the trust module in the new machine A, the Bluetooth connection established in step 719 can be reused.

[0204] Step 741, after the trust module in the new machine A binds the old machine B and the new machine A, it sends a binding completion response to the trust module in the old machine B through the Bluetooth connection.

[0205] Step 742, the trust module in the old machine B sends a binding success response to the service discovery module.

[0206] Step 743, the service discovery module in the old machine B notifies the visible light scanning module to close the code scanning frame.

[0207] Step 744, the service discovery module in the old machine B sends a trust success notification to the trust module in the new machine A through the trust module in the old machine B, and requests to close the visible light interface.

[0208] Step 745, the trust module in the new machine A notifies the service discovery module in the new machine A that the trust has been successful, and requests to close the visible light interface.

[0209] Step 746, the service discovery module in the new machine A notifies the visible light display module in the new machine A to close the visible light interface.

[0210] Step 747, the visible light display module in the new machine A closes the visible light interface.

[0211] Step 748, the service discovery module in the old machine B starts the cloned application in the old machine B.

[0212] In this embodiment, the service discovery module in the old machine B starts the cloned application, so the user does not need to find and start the cloned application in the old machine B, simplifying the user's operation in the new machine configuration process.

[0213] Step 749, the clone application in the old machine B establishes a data transmission channel with the new machine configuration application in the new machine A, and the new machine A imports the data of the old machine B into the new machine A through the data transmission channel.

[0214] As described above, the clone application in the old machine B and the new machine configuration application in the new machine A can establish a high-speed data transmission channel through the WiFi-P2P protocol. Of course, when establishing the data transmission channel, not only the WiFi-P2P protocol can be used, but also other protocols can be used, such as HTML or other types of markup languages, etc. The embodiment does not limit the protocol used when establishing the data transmission channel.

[0215] In the embodiment, the data of the old machine B can include one or a combination of the following: user account data logged in by the old machine B, configuration data of the old machine B, applications installed in the old machine B, and data of the applications.

[0216] The data import method provided by the embodiment simplifies the configuration process of the new machine when the user has an old machine, and the user no longer needs to perform the operations of selecting a network, setting a lock screen password, and logging in a user account. In addition, the configuration process of the new machine and the cloning process are combined, and the user does not need to find and open the cloning application in the new machine and the old machine, thereby enhancing the user's continuous new machine configuration experience. In addition, the embodiment uses the visible light mode with better experience to perform trust authentication, which can improve the user's connection code recognition interaction experience.

[0217] The process in which the Bluetooth module in the new machine A sends a BLE broadcast message and the Bluetooth module in the old machine C reports the received BLE broadcast message to the service discovery module in the old machine C in steps 708-709 of the embodiment shown in FIG. 7 will be described in detail below.

[0218] In the BLE protocol specification, as shown in FIG. 8, the scanning end (for example, the old machine C) needs to receive the ADV_IND message and the scan response (SCAN_RSP) message before reporting the message. When the duty cycle of BLE scanning is 10% (60 / 600 ms) or even lower, the SCAN_RSP message is often lost, which affects the pop-up success rate and pop-up delay, and other indicators. FIG. 8 is a schematic diagram of broadcast reporting in the BLE protocol specification.

[0219] Fig. 9 is a schematic diagram of broadcast reporting provided by one embodiment of the present application. As shown in Fig. 9, in the embodiment of the present application, the BLE protocol is modified, the scanning end (for example, the old machine C) starts scanning, and after receiving the ADV IND packet, the scanning end reports the ADV IND packet to the service discovery. Then, after receiving the SCAN RSP packet, the scanning end reports the SCAN RSP packet to the service discovery. That is, in the embodiment, the scanning end performs twice broadcast reporting, once after receiving the ADV IND packet, and once after receiving the SCAN RSP packet. In addition, in the specific implementation, the scan request packet and the SCAN RSP packet can be ignored, that is, after receiving the ADV IND packet, the scanning end reports the ADV IND packet to the service discovery, and then the service discovery establishes a Bluetooth connection with the broadcasting end according to the ADV IND packet.

[0220] For the broadcast scene in which the SCAN RSP does not carry key data, the ADV IND packet can trigger the pop-up box in the embodiment of the present application, so as to reduce the latency of close discovery and improve the success rate of Bluetooth connection. For the broadcast scene in which the SCAN RSP carries key data, the ADV IND broadcast can be used as a "heartbeat packet" to avoid the pop-up box ping-pong problem caused by the loss of the SCAN RSP packet.

[0221] The process in which the visible light display module in the new machine A generates a visible light image according to the connection code in step 723 of the embodiment shown in Fig. 7 of the present application, and the process in which the visible light scanning module in the old machine B decodes the visible light image displayed by the new machine A in step 737, are described below.

[0222] Fig. 10 is a flowchart of the display and decoding of the visible light image provided by one embodiment of the present application. As shown in Fig. 10, the display flow of the visible light image can include the following steps.

[0223] In step 1001, an initial image is generated according to the connection code.

[0224] In the embodiment, the initial image can be annular, and the initial image can also be in other shapes, and the shape of the initial image is not limited in the embodiment.

[0225] In step 1002, the initial image is divided into at least two regions, and k information points are generated in each region, where k is a positive integer and k≥1.

[0226] In the embodiment, the initial image after partitioning can be as shown in 10a.

[0227] Step 1003, the k information points are encoded with parts per million (PPM) information.

[0228] Step 1004, the k information points after encoding are differentially encoded to generate the visible light image.

[0229] In a specific implementation, the k information points after encoding can be differentially encoded based on frequency shift keying (FSK) modulation of a random phase to generate the visible light image.

[0230] In addition, in the embodiment, after the visible light image is generated, the visible light image can be displayed with dynamic effects by color gamut complementation and / or adjustment of brightness, and the generated visible light image can be as shown in 10b.

[0231] Step 1005, the visible light image is displayed.

[0232] Specifically, the visible light interface displayed by the new machine A can be as shown in 54 in FIG. 5(a), and the ring-shaped image in the interface shown in 54 is the visible light image.

[0233] As shown in FIG. 10, the decoding process of the visible light image can include:

[0234] Step 1006, at least two image frames including the visible light image are obtained.

[0235] For example, after the visible light scanning module in the old machine B scans the visible light image displayed by the new machine A, three image frames including the visible light image can be obtained.

[0236] Step 1007, inter-frame differential operation is performed on the at least two image frames, and local threshold binarization processing is performed on a result obtained by the differential operation to obtain a binarization image.

[0237] Step 1008, positioning point information is obtained according to the binarization image.

[0238] Step 1009, at least two regions included in the visible light image and information points in each region are obtained according to the positioning point information.

[0239] Step 1010, the information points in each region are checked and decoded to obtain at least two connection codes and error correction bits corresponding to each connection code.

[0240] Specifically, the information points in each region can be checked and decoded by using a frequency error algorithm to obtain at least two connection codes and error correction bits corresponding to each connection code.

[0241] At step 1011, the at least two connection codes and the error correction bits corresponding to each connection code are fused to obtain the connection codes after error correction.

[0242] The decoding process of the visible light image is described below through a specific example.

[0243] FIG. 11 is a schematic diagram of a decoding process of a visible light image according to an embodiment of the present application. As shown in FIG. 11, the visible light image displayed by the new machine A can be as shown in 1101. After scanning the visible light image 1101 displayed by the new machine A, the visible light scanning module in the old machine B can obtain three image frames including the visible light image. Then, the visible light scanning module in the old machine B performs inter-frame difference operation on the three image frames, and performs local threshold binarization processing on the result obtained by the difference operation to obtain a binarization image and an ellipse center, as shown in 1102.

[0244] Next, the visible light scanning module in the old machine B obtains positioning point information according to the binarization image and the ellipse center, as shown in 1103. The positioning point information can include data point coordinates, outer circle positioning point serial numbers, inner circle positioning point serial numbers, and an updated ellipse center. Then, the visible light scanning module in the old machine B obtains serial numbers of at least two regions included in the visible light image and information points in each region according to the positioning point information, as shown in 1104. In this example, the visible light image includes 12 regions, and the information points of the 12 regions are a 12x12 two-dimensional array.

[0245] Finally, the information points in the 12 regions are checked and decoded to obtain at least two connection codes and error correction bits corresponding to each connection code, as shown in 1105. In 1105, PINcode is the connection code, and n_Error_final is the error correction bit corresponding to the connection code. Both the connection code and the error correction bit corresponding to the connection code are one-dimensional arrays, and both have a length of 6. Then, the connection code and the error correction bit corresponding to each connection code shown in 1105 are fused to obtain the connection code after error correction, as shown in 1106. As can be seen from 1106, the correct connection code is [1, 4, 8, 2, 5, 8], which is a one-dimensional array and has a length of 6.

[0246] As described above, the data import method provided by the embodiments of the present application can simplify the configuration process of the new machine when the user has the old machine, and combines the configuration process of the new machine with the cloning process, without the need for the user to find and open the cloning application in the new machine and the old machine, thereby enhancing the user's continuous new machine configuration experience. In addition, the visible light method with better experience is used for trust authentication, which can improve the user's connection code identification interaction experience.

[0247] FIG. 12 is a flowchart of a data import method according to an embodiment of the present application. As shown in FIG. 12, the data import method can include the following steps.

[0248] In step 1201, the first electronic device sends a Bluetooth broadcast message, wherein the Bluetooth broadcast message carries an identity of the first electronic device and a first service requested by the first electronic device.

[0249] In this embodiment, the first electronic device can be a new machine, for example, the new machine A in the embodiment shown in FIG. 11.

[0250] The Bluetooth broadcast message can be a general broadcast indication message, and the identity of the first electronic device can be an IMEI of the first electronic device. Of course, the identity of the first electronic device can also be in other forms as long as it can uniquely identify the first electronic device, and the specific form of the identity of the first electronic device is not limited in this embodiment. In addition, the Bluetooth broadcast message can carry an original value of the identity of the first electronic device or a hash value of the identity of the first electronic device, which is not limited in this embodiment. In specific implementation, the field information carried in the Bluetooth broadcast message can be as shown in Table 1.

[0251] In step 1202, the first electronic device receives a request for displaying a visible light interface sent by the second electronic device through a Bluetooth connection.

[0252] The Bluetooth connection is established after the second electronic device determines that the second electronic device has the capability to provide the first service after receiving the Bluetooth broadcast message and determines to establish the Bluetooth connection with the first electronic device.

[0253] In this embodiment, the second electronic device can be an old machine used by a user, for example, the old machine B in the embodiment shown in FIG. 11.

[0254] In step 1203, the first electronic device displays a visible light interface, wherein the visible light interface includes a visible light image.

[0255] The visible light image is generated according to a connection code.

[0256] In this embodiment, the visible light interface displayed by the first electronic device can be as shown in 54 in FIG. 5(a).

[0257] In some examples, the first electronic device can generate a connection code before displaying the visible light interface, and generate the visible light image according to the connection code. Specifically, the process of generating the visible light image according to the connection code can refer to the description of steps 1001-1004 in the embodiment shown in FIG. 10, which will not be repeated here.

[0258] At step 1204, the first electronic device receives a trust request sent by the second electronic device through the Bluetooth connection.

[0259] The trust request is initiated after the second electronic device scans a visible light image in the visible light interface, decodes the visible light image, and obtains a connection code. The trust request carries the connection code obtained by the second electronic device.

[0260] At step 1205, the first electronic device performs trust authentication with the second electronic device according to the connection code carried in the trust request.

[0261] Specifically, the trust authentication with the second electronic device according to the connection code carried in the trust request can be that the first electronic device matches the connection code carried in the trust request with a connection code generated by the first electronic device. In this way, the trust authentication success can be that the connection code carried in the trust request matches the connection code generated by the first electronic device successfully, and the trust authentication failure can be that the connection code carried in the trust request does not match the connection code generated by the first electronic device.

[0262] At step 1206, after the trust authentication is successful, the first electronic device establishes a data transmission channel with the second electronic device and imports data of the second electronic device into the first electronic device through the data transmission channel.

[0263] The data of the second electronic device can include one or a combination of the following: a user account data logged in by the second electronic device, configuration data of the second electronic device, an application installed in the second electronic device, and data of the application.

[0264] Specifically, after the trust authentication is successful, the first electronic device and the second electronic device determine each other as trusted devices. The first electronic device can log in to the user account logged in by the second electronic device, so that in the new machine configuration process, the user does not need to perform an account login operation on the first electronic device.

[0265] In some examples, after the trust authentication is successful, the first electronic device can also receive a notification sent by the second electronic device through the Bluetooth connection to close the visible light interface. In response to receiving the notification, the first electronic device closes the visible light interface.

[0266] In some examples, after the successful trust authentication, the first electronic device can further display an interface for checking the lock screen password before establishing the data transmission channel with the second electronic device, where the interface for checking the lock screen password includes prompt information for inputting the lock screen password of the second electronic device, as shown by 55 in FIG. 5(a). Then, the first electronic device can obtain the lock screen password input by the user using the first electronic device, send the lock screen password input by the user to the second electronic device, and after receiving a notification from the second electronic device that the lock screen password input by the user is correct, set the lock screen password input by the user as the lock screen password of the first electronic device, so that the user does not need to perform the operation of setting the lock screen password on the first electronic device.

[0267] In the data import method, the first electronic device sends a Bluetooth broadcast message, where the Bluetooth broadcast message carries an identity of the first electronic device and a first service requested by the first electronic device. Then, the first electronic device receives a request for displaying a visible light interface sent by the second electronic device through a Bluetooth connection, displays the visible light interface, and the visible light interface includes a visible light image. Next, the first electronic device receives a trust request sent by the second electronic device through the Bluetooth connection, performs trust authentication with the second electronic device according to a connection code carried in the trust request, and after the successful trust authentication, the first electronic device establishes a data transmission channel with the second electronic device, and imports the data of the second electronic device into the first electronic device through the data transmission channel. Thus, when the user has an old machine, the configuration process of the new machine can be simplified, and the configuration process and the cloning process of the new machine are combined, so that the user does not need to find and open the cloning application in the new machine and the old machine, and the user's experience of configuring the new machine continuously is enhanced. In addition, the trust authentication is performed using the visible light method with better experience, which can improve the user's experience of identifying the connection code.

[0268] FIG. 13 is a flowchart of a data import method according to another embodiment of the present application. As shown in FIG. 13, the data import method can include the following steps.

[0269] In step 1301, the second electronic device receives a Bluetooth broadcast message sent by the first electronic device.

[0270] In the Bluetooth broadcast message, the identity of the first electronic device and the first service requested by the first electronic device are carried.

[0271] In this embodiment, the second electronic device can be an old machine used by the user, for example, the old machine B in the embodiment shown in FIG. 11, and the first electronic device can be a new machine of the user, for example, the new machine A in the embodiment shown in FIG. 11.

[0272] Step 1302, the second electronic device determines that the second electronic device has the capability of providing the first service, and determines to establish the Bluetooth connection with the first electronic device after establishing the Bluetooth connection with the first electronic device.

[0273] In some examples, the Bluetooth broadcast message further carries ranging adaptation parameters; before determining that the second electronic device has the capability of providing the first service, the second electronic device can further determine, according to the ranging adaptation parameters in the Bluetooth broadcast message, that the distance between the first electronic device and the second electronic device is less than or equal to a predetermined distance threshold, where the size of the predetermined distance threshold can be set by itself in specific implementation, and the embodiment does not limit the size of the predetermined distance threshold.

[0274] In some examples, the second electronic device determining to establish the Bluetooth connection with the first electronic device can be that the second electronic device obtains a determination indication of establishing the Bluetooth connection with the first electronic device; where the determination indication is input by a user of the second electronic device in a setting interface displayed by the second electronic device. Specifically, after the second electronic device determines that the distance between the first electronic device and the second electronic device is less than or equal to the predetermined distance threshold, the second electronic device can display the interface 512 shown in FIG. 5(a), which includes an “unlock and set” button, and the user clicks the button to indicate the determination to establish the Bluetooth connection with the first electronic device. Therefore, in response to the user clicking the “unlock and set” button in the interface 512, the second electronic device obtains the determination indication of establishing the Bluetooth connection with the first electronic device.

[0275] Step 1303, the second electronic device sends a request for displaying a visible light interface to the first electronic device through the Bluetooth connection.

[0276] Step 1304, after the first electronic device displays the visible light interface, the second electronic device scans the visible light image in the visible light interface.

[0277] In some examples, before scanning the visible light image in the visible light interface, the second electronic device can further receive a notification of successful display of the visible light interface sent by the first electronic device through the Bluetooth connection, and then the second electronic device displays a code scanning interface, which includes a code scanning box. In the embodiment, the code scanning interface displayed by the second electronic device can be as shown in 513 in FIG. 5(a). Then the user can align the code scanning box displayed by the second electronic device with the visible light image displayed by the first electronic device for scanning.

[0278] Step 1305, the second electronic device decodes the visible light image to obtain a connection code.

[0279] Specifically, the second electronic device decodes the visible light image to obtain the connection code, which can refer to the description of steps 1006-1011 in the embodiment shown in FIG. 10, and will not be described here again.

[0280] In step 1306, the second electronic device sends a trust request to the first electronic device through the Bluetooth connection.

[0281] The trust request carries the connection code, so that the first electronic device can authenticate the second electronic device according to the connection code.

[0282] In step 1307, after the authentication is successful, the second electronic device establishes a data transmission channel with the first electronic device, and imports data of the second electronic device into the first electronic device through the data transmission channel.

[0283] In this embodiment, determining that the second electronic device has the capability to provide the first service can be that the second electronic device determines that the second electronic device has an application that provides the first service. Thus, after the authentication is successful, the second electronic device can start the application in the second electronic device that provides the first service. For example, the first service can be a cloning service. Thus, after the authentication is successful, the second electronic device can start the cloning application in the second electronic device, so that the user does not need to find and open the cloning application in the old machine, and the user's experience of configuring the new machine continuously is enhanced.

[0284] In the data importing method, the second electronic device receives the Bluetooth broadcast message sent by the first electronic device, determines that the second electronic device has the capability to provide the first service, and determines to establish a Bluetooth connection with the first electronic device. Then, the second electronic device establishes the Bluetooth connection with the first electronic device, sends a request to display a visible light interface to the first electronic device through the Bluetooth connection, scans the visible light image in the visible light interface after the first electronic device displays the visible light interface, decodes the visible light image to obtain the connection code, and sends a trust request to the first electronic device through the Bluetooth connection. After the authentication is successful, the second electronic device establishes a data transmission channel with the first electronic device, and imports data of the second electronic device into the first electronic device through the data transmission channel. Thus, when the user has an old machine, the configuration process of the new machine can be simplified, the configuration process and the cloning process of the new machine are combined, the user does not need to find and open the cloning application in the new machine and the old machine, and the user's experience of configuring the new machine continuously is enhanced. In addition, the visible light method is used to perform the authentication, which can improve the user's experience of identifying the connection code.

[0285] It can be understood that part or all of the steps or operations in the above embodiments are only examples, and the embodiments of the present application can also perform other operations or variations of various operations. In addition, various steps can be performed in different orders from the above embodiments, and it is possible that not all operations in the above embodiments are performed.

[0286] It can be understood that the electronic device includes hardware and / or software modules corresponding to the execution of each function in order to implement the above functions. The algorithm steps of each example described in combination with the embodiments disclosed in the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered beyond the scope of the present application.

[0287] The present embodiment can divide the functional modules of the electronic device according to the above method embodiments. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one module. The integrated module can be implemented in the form of hardware. It should be noted that the division of modules in the present embodiment is illustrative and is only a logical functional division. Actual implementation can have another division manner.

[0288] FIG. 14 is a structural schematic diagram of an electronic device provided by another embodiment of the present application. In the case of dividing each functional module according to each function, FIG. 14 shows a possible composition schematic diagram of the electronic device 1400 involved in the above embodiments. As shown in FIG. 14, the electronic device 1400 can include a receiving unit 1401, a processing unit 1402, and a sending unit 1403.

[0289] The receiving unit 1401 can be configured to support the electronic device 1400 to perform steps 1202, 1204, and 1206, etc., or to support the electronic device 1400 to perform steps 1301 and 1307, etc.

[0290] The processing unit 1402 can be configured to support the electronic device 1400 to perform steps 1203 and 1205, etc., or to support the electronic device 1400 to perform steps 1302, 1304, and 1305, etc.

[0291] The sending unit 1403 can be configured to support the electronic device 1400 to perform steps 1201 and 1206, etc., or to support the electronic device 1400 to perform steps 1303, 1306, and 1307, etc.

[0292] It should be noted that all relevant content of each step involved in the above method embodiments can be cited from the function description of the corresponding function module, and will not be repeated here.

[0293] The electronic device 1400 provided in this embodiment is used to execute the above data import method, and thus the same effects as the above method can be achieved.

[0294] It should be understood that the electronic device 1400 can correspond to the electronic device 100 shown in FIG. 3. Among them, the functions of the receiving unit 1401 and the sending unit 1403 can be implemented by the processor 110, the antenna 1 and the mobile communication module 150 in the electronic device 100 shown in FIG. 3, and / or by the processor 110, the antenna 2 and the wireless communication module 160; the function of the processing unit 1402 can be implemented by the processor 110, the touch sensor 180K, the camera 193 and the display screen 194 in the electronic device 100 shown in FIG. 3.

[0295] In the case of using integrated units, the electronic device 1400 can include a processing module, a storage module and a communication module.

[0296] Among them, the processing module can be used to control and manage the actions of the electronic device 1400, for example, it can be used to support the electronic device 1400 to execute the steps executed by the receiving unit 1401, the processing unit 1402 and the sending unit 1403. The storage module can be used to support the electronic device 1400 to store program codes and data, etc. The communication module can be used to support the communication between the electronic device 1400 and other devices.

[0297] Among them, the processing module can be a processor or a controller, which can realize or execute various exemplary logic blocks, modules and circuits described in combination with the disclosure of the present application. The processor can also be a combination of implementation functions, such as one or more microprocessor combinations, digital signal processing (digital signal processing, DSP) and microprocessor combinations, etc. The storage module can be a memory. The communication module can be a device for interacting with other electronic devices, such as radio frequency circuit, Bluetooth chip and / or Wi-Fi chip, etc.

[0298] In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device 1400 involved in the embodiment can be a device with the structure shown in FIG. 3.

[0299] The embodiment of the present application also provides a computer readable storage medium, which stores a computer program, and when the computer program runs on a computer, the computer executes the method provided in the embodiments shown in FIGS. 12-13.

[0300] The embodiment of the present application further provides a computer program product, which comprises a computer program, and when the computer program runs on a computer, the computer program enables the computer to execute the method provided by the embodiment shown in FIG. 12 and FIG. 13.

[0301] In the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. The "and / or" describes the association relationship of the associated objects, which means that there can be three kinds of relationships, for example, A and / or B, which can represent the cases of A alone, A and B together, and B alone. Wherein A and B can be singular or plural. The character " / " generally represents an "or" relationship between the front and rear associated objects. "At least one of the following" and similar expressions mean any combination of these items, including any combination of single or multiple items. For example, at least one of a, b and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, wherein a, b, and c can be single or multiple.

[0302] Those skilled in the art can realize that the units and algorithm steps described in the embodiments disclosed in the present application can be realized by electronic hardware, computer software and combination of electronic hardware and computer software. Whether the functions are realized by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0303] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be described here.

[0304] In several embodiments provided by the present application, any function realized in the form of a software function unit and sold or used as an independent product can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts of the technical solutions that make contributions to the prior art or the parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0305] The above description is only the specific implementation of the present application. Any person skilled in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered in the protection range of the present application. The protection range of the present application should be subject to the protection range of the claims.

Claims

A data import method, characterized in that, include: The first electronic device sends a Bluetooth broadcast message, the Bluetooth broadcast message carrying the identity of the first electronic device and the first service requested by the first electronic device; The device receives a request from a second electronic device to display a visible light interface via a Bluetooth connection; wherein the Bluetooth connection is established after the second electronic device receives the Bluetooth broadcast message, determines that the second electronic device has the capability to provide the first service, and determines that a Bluetooth connection has been established with the first electronic device. A visible light interface is displayed, which includes a visible light image; wherein the visible light image is generated based on a connection code; The system receives a trust request sent by the second electronic device via the Bluetooth connection; wherein the trust request is initiated by the second electronic device after scanning the visible light image in the visible light interface, decoding the visible light image, and obtaining the connection code; the trust request carries the connection code obtained by the second electronic device. Based on the connection code carried in the trust request, perform trust authentication with the second electronic device; After successful authentication, a data transmission channel is established between the first electronic device and the second electronic device, and the data from the second electronic device is imported into the first electronic device through the data transmission channel. The method according to claim 1, characterized in that, The data of the second electronic device includes one or a combination of the following: user account data logged into the second electronic device, configuration data of the second electronic device, applications installed in the second electronic device, and data of the applications. The method according to claim 1, characterized in that, Before displaying the visible light interface, the following is also included: Generate connection code; A visible light image is generated based on the connection code. The method according to claim 3, characterized in that, The step of generating a visible light image based on the connection code includes: Generate an initial image based on the connection code; The initial image is divided into at least two regions, and k information points are generated in each region; where k is a positive integer, k≥1; Frequency error information is encoded for the k information points; Differential encoding is performed on the k encoded information points to generate the visible light image. The method according to claim 1, characterized in that, The step of performing trust authentication with the second electronic device based on the connection code carried in the trust request includes: The connection code carried in the authorization request is matched with the connection code generated by the first electronic device; The successful authentication includes: the connection code carried in the authorization request successfully matches the connection code generated by the first electronic device. The method according to claim 1, characterized in that, Also includes: After successful authentication, the device receives a notification from the second electronic device via the Bluetooth connection to turn off the visible light interface. In response to receiving the notification, the visible light interface is turned off. The method according to claim 1, characterized in that, Before establishing the data transmission channel with the second electronic device, the method further includes: After successful authentication, an interface for verifying the lock screen password is displayed; the interface for verifying the lock screen password includes a prompt message for entering the lock screen password of the second electronic device. Obtain the lock screen password entered by the user using the first electronic device; Send the user-inputted lock screen password to the second electronic device; After receiving a notification from the second electronic device that the user-inputted lock screen password is correct, the user-inputted lock screen password is set as the lock screen password of the first electronic device. The method according to any one of claims 1-7, characterized in that, The Bluetooth broadcast message includes a general broadcast instruction message. A data import method, characterized in that, include: The second electronic device receives the Bluetooth broadcast message sent by the first electronic device; The Bluetooth broadcast message carries the identity identifier of the first electronic device and the first service requested by the first electronic device. After determining that the second electronic device has the capability to provide the first service, and after determining that a Bluetooth connection has been established with the first electronic device, a Bluetooth connection is established between the second electronic device and the first electronic device. The request to display a visible light interface is sent to the first electronic device via the Bluetooth connection. After the first electronic device displays a visible light interface, the visible light image in the visible light interface is scanned. The visible light image is decoded to obtain the connection code; The first electronic device sends a trust request via the Bluetooth connection, the trust request carrying the connection code, so that the first electronic device can perform trust authentication on the second electronic device based on the connection code; After successful authentication, a data transmission channel is established between the first electronic device and the second electronic device, and the data from the second electronic device is imported into the first electronic device through the data transmission channel. The method according to claim 9, characterized in that, Decoding the visible light image to obtain the connection code includes: Acquire at least two image frames including the visible light image; Perform inter-frame difference operation on the at least two image frames, and perform local threshold binarization on the result of the difference operation to obtain a binarized image; Based on the binarized image, obtain the location point information; Based on the positioning point information, obtain the sequence numbers of at least two regions included in the visible light image and the information points in each region; The information points in each region are checked, corrected, and decoded to obtain at least two connection codes and the corresponding error correction bits for each connection code. The at least two link codes and the error correction bits corresponding to each link code are fused to obtain the error-corrected link codes. The method according to claim 9, characterized in that, The Bluetooth broadcast message also carries ranging adaptation parameters; before determining that the second electronic device has the ability to provide the first service, the method further includes: Based on the ranging adaptation parameters in the Bluetooth broadcast message, it is determined that the distance between the first electronic device and the second electronic device is less than or equal to a predetermined distance threshold. The method according to claim 9, characterized in that, The step of determining to establish a Bluetooth connection with the first electronic device includes: Obtain a confirmation instruction to establish a Bluetooth connection with the first electronic device; wherein the confirmation instruction is entered by the user of the second electronic device in the settings interface displayed on the second electronic device. The method according to claim 9, characterized in that, Before scanning the visible light image in the visible light interface, the method further includes: Receive a notification from the first electronic device that the visible light interface display was successful, sent via the Bluetooth connection. The interface for scanning a QR code is displayed, and the interface includes a QR code scanning frame. The method according to claim 9, characterized in that, Determining that the second electronic device has the capability to provide the first service includes: It is determined that the second electronic device contains an application that provides the first service; The method further includes: After successful authentication, the application providing the first service is launched in the second electronic device. A first electronic device, characterized in that, include: One or more processors; Memory; Multiple applications; And one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs including instructions that, when executed by the first electronic device, cause the first electronic device to perform the method as described in any one of claims 1-8. A second electronic device, characterized in that, include: One or more processors; Memory; Multiple applications; And one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs including instructions that, when executed by the second electronic device, cause the second electronic device to perform the method as described in any one of claims 9-14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1-8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to perform the method as described in any one of claims 9-14.

Citation Information

Patent Citations

  • Data import method, electronic equipment and computer readable storage medium

    CN121194156A

  • Data migration method, related device and computer storage medium

    CN112764678A

  • Data migration method, electronic equipment and computer readable storage medium

    CN114845290A

  • Bluetooth connection method and electronic equipment

    CN115802326A