WO2021051986A1 - Method for establishing connection between apparatuses, and electronic device - Google Patents

Method for establishing connection between apparatuses, and electronic device Download PDF

Info

Publication number
WO2021051986A1
WO2021051986A1 PCT/CN2020/102530 CN2020102530W WO2021051986A1 WO 2021051986 A1 WO2021051986 A1 WO 2021051986A1 CN 2020102530 W CN2020102530 W CN 2020102530W WO 2021051986 A1 WO2021051986 A1 WO 2021051986A1
Authority
WO
WIPO (PCT)
Prior art keywords
mobile phone
connection
ssid
sending device
receiving device
Prior art date
Application number
PCT/CN2020/102530
Other languages
French (fr)
Chinese (zh)
Inventor
姜�远
郭菁睿
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021051986A1 publication Critical patent/WO2021051986A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B11/00Transmission systems employing sonic, ultrasonic or infrasonic waves
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/02Protecting privacy or anonymity, e.g. protecting personally identifiable information [PII]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/08Access security
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/60Context-dependent security
    • H04W12/69Identity-dependent

Definitions

  • This application relates to the field of electronic technology, and in particular to a method for establishing a connection between devices and an electronic device.
  • Transferring information between devices has become a very common application scenario in life. For example, when users replace electronic devices, they transfer data between the new and old devices through mobile phone backup, mobile phone cloning, etc. Before transmitting data between the new and old devices, it is generally necessary to establish a short-distance wireless connection between the new and old devices, such as wireless fidelity (WI-FI) connections.
  • WI-FI wireless fidelity
  • This application provides a method for establishing a connection between devices and an electronic device.
  • the method can enable the receiving device to turn on the WI-FI hotspot according to the WI-FI capability information of the sending device, and reduce the switch between the devices from 2.4GHz WI-FI connection to The interactive process of 5GHz WI-FI connection shortens the time for establishing WI-FI connection between devices and improves user experience.
  • a method for establishing a connection between devices including: a sending device obtains first hotspot information of a receiving device, the first hotspot information includes a first service set identifier SSID; the sending device sends to the receiving device Acoustic wave signal, the acoustic wave signal includes the wireless fidelity WI-FI capability information of the sending device that has been encoded and modulated, so that the receiving device sends the second hotspot information of the receiving device according to the WI-FI capability information of the sending device, the The second hotspot information includes a second SSID; the sending device sends a request for establishing a WI-FI connection with the receiving device according to the second hotspot information.
  • the first hotspot information includes the first SSID
  • the second hotspot information includes the second SSID
  • the first SSID is different from the second SSID.
  • the frequency band of the WI-FI network corresponding to the second SSID is adapted to the WI-FI capability information of the old mobile phone.
  • the working frequency band of the WI-FI network corresponding to the second SSID is 5GHz
  • the WI-FI corresponding to the first SSID The working frequency band of the network is 2.4GHz.
  • the working frequency band of 2.4GHz WI-FI connection may be in the frequency range of 2.4GHz-2.4835GHz, and the working frequency band of 5GHz WI-FI connection may be in the frequency range of 5.150GHz-5.850GHz.
  • the WI-FI capability information of the old mobile phone 20 indicates that the old mobile phone 20 can support 2.4 GHz WI-FI connection and 5 GHz WI-FI connection.
  • a user changes a mobile phone and uses a mobile phone clone to perform data transmission or data migration between the new and old mobile phones as an example to introduce a method for establishing a connection between devices.
  • the new mobile phone serves as a hotspot, which can also be called an access point, which provides WI-FI hotspots for the old mobile phones, which is the receiving device of this application; the old mobile phones are used as the site to connect to the hotspot, which is the sending device of this application.
  • the old mobile phone sends the WI-FI capability information of the old mobile phone to the new mobile phone through the acoustic wave communication technology.
  • the frequency band used by acoustic wave communication technology is a high frequency band above 10KHz, avoiding the 0 ⁇ 6KHz frequency band where human sounds are emitted. This can reduce in-band interference in application scenarios, ensure the success rate of acoustic wave transmission, and improve the old The reliability of the transmission between the mobile phone and the new mobile phone.
  • acoustic wave communication technology is more suitable for short-distance, small data transmission. In this application, during the transmission of acoustic signals, the operating distance between devices that meet the requirements of reliable transmission is 30cm.
  • the WI is transmitted through the acoustic wave communication technology.
  • -FI ability can resist attack.
  • the attacker cannot approach from too close a distance, the sonic signal cannot be decoded to obtain WI-FI information. Therefore, the application of sonic communication technology to the process of establishing a connection between devices can ensure the reliability of information transmission.
  • the sending device obtains the first hotspot information of the receiving device, including: the sending device scans the QR code displayed by the receiving device to obtain information from the QR code. Extract the first SSID and the corresponding first password.
  • the new mobile phone combines the first SSID and WI-FI password information into a QR code and displays it on the new mobile phone.
  • the old mobile phone obtains the first hot spot information of the new mobile phone by scanning the QR code.
  • the new mobile phone can also send the hotspot information of the new mobile phone to the old mobile phone through the acoustic wave communication technology.
  • the new mobile phone can also send the information of the first network hotspot to the old mobile phone by way of Bluetooth communication technology.
  • the old mobile phone obtains the first hotspot information of the new mobile phone sent by the new mobile phone by scanning the QR code, and then transmits the WI-FI capability information of the old mobile phone to the new mobile phone. After the old mobile phone scans the QR code of the new mobile phone, it can send a sound wave signal to the new mobile phone. In other words, the old mobile phone scans the QR code of the new mobile phone to trigger the old mobile phone to send a sound wave signal to the new mobile phone. WI-FI capability information.
  • the method before the sending device sends the acoustic wave signal to the receiving device, the method further includes: the sending device obtains the public key of the key pair; The device encrypts the WI-FI capability information by using the public key; the sound wave signal sent by the sending device to the receiving device includes the WI-FI capability information that has been encoded and modulated and encrypted by the public key.
  • WI-FI hotspot information Since the establishment of a WI-FI connection is usually used before data transmission between two mobile terminals, since the data is personal information, there is a high requirement for confidentiality. In the actual application process, if an attacker preemptively connects to WI-FI, the WI-FI hotspot information is directly transmitted through the sound wave signal, and the surrounding attackers can receive the sound wave signal to connect to the WI-FI hotspot, and the security cannot be obtained. Guaranteed.
  • the sound wave signal sent by the old mobile phone to the new mobile phone includes the WI-FI capability information that has been encoded and modulated and encrypted by the public key.
  • the old mobile phone encrypts the WI-FI capability information with a public key, then encodes and modulates the cipher text of the WI-FI capability information encrypted by the public key, and then transmits the encoded and modulated information using sound waves. Information.
  • the sonic signal is first demodulated and decoded, and then the WI-FI capability information is obtained by decrypting the private key corresponding to the public key.
  • the old mobile phone passes its own WI-FI capability information to the new mobile phone through the process of encrypting the WI-FI capability information, and then encoding and modulating, and transmitting through sound waves, which can increase the transmission process.
  • Security When an attacker appears nearby or connects to WI-FI first, the security of the data can also be ensured through the encryption of WI-FI capability information.
  • the new mobile phone can accurately obtain information such as the WI-FI frequency points supported by the old mobile phone, so that the new mobile phone directly opens the WI-FI hotspot for the old mobile phone according to the WI-FI frequency point supported by the old mobile phone 10, reducing the number of old mobile phones and
  • the interactive process of switching from 2.4GHz WI-FI connection to 5GHz WI-FI connection between new mobile phones speeds up the time for establishing WI-FI connection and improves user experience.
  • the WI-FI capability information includes the WI-FI standard number supported by the sending device, working frequency range, compatibility, bandwidth, and physical transmission At least one of rate and modulation method.
  • the frequency of the acoustic wave signal is greater than 10 kHz.
  • the frequency band used by the acoustic wave communication technology is a high frequency band above 10KHz, avoiding the frequency band of 0-6KHz where human sounds are emitted, which can reduce the in-band interference in the application scenario and ensure the sound wave transmission.
  • the success rate improves the reliability of transmission between old and new mobile phones.
  • the method further includes: when the sending device sends the sonic signal to the receiving device, the sending device displays a prompt interface indicating that the sonic signal is being sent.
  • the working frequency band of the WI-FI network corresponding to the second SSID is 5GHz; the request to establish a WI-FI connection with the receiving device carries the first aspect Two SSID and first password.
  • a method for establishing a connection between devices including: a receiving device transmits first hotspot information of the receiving device to a sending device, the first hotspot information includes a first service set identifier SSID; the receiving device receives The sound wave signal sent by the sending device, where the sound wave signal includes the wireless fidelity WI-FI capability information of the sending device that has undergone encoding and modulation processing; the receiving device sends second hotspot information according to the WI-FI capability information of the sending device, the The second hotspot information includes a second SSID; the receiving device receives a request for establishing a WI-FI connection sent by the sending device according to the second hotspot information; the receiving device establishes with the sending device according to the request for establishing a WI-FI connection WI-FI connection, the request to establish the WI-FI connection includes the second SSID.
  • the receiving device transmitting the first hotspot information of the receiving device to the sending device includes: the receiving device generates and displays a two-dimensional code, the two-dimensional code includes The first SSID and the corresponding first password; the receiving device transmits the first hotspot information to the sending device through the two-dimensional code.
  • the method before the receiving device receives the sound wave signal sent by the sending device, the method further includes: the receiving device sends a key pair to the sending device Public key; and after the receiving device receives the sound wave signal sent by the sending device, the method further includes: the receiving device demodulates and decodes the sound wave signal sent by the sending device to obtain the WI encrypted by the public key -FI capability information; the receiving device decrypts to obtain the WI-FI capability information through the private key corresponding to the public key.
  • the WI-FI capability information includes the WI-FI standard number supported by the sending device, working frequency range, compatibility, bandwidth, and physical transmission At least one of rate and modulation method.
  • the frequency of the acoustic signal is greater than 10 kHz.
  • the first SSID is different from the second SSID; the frequency band of the WI-FI network corresponding to the second SSID is adapted to the WI of the sending device -FI capability information.
  • the working frequency band of the WI-FI network corresponding to the second SSID is 5GHz; the sending device establishes WI-FI according to the second hotspot information sent The connection request carries the second SSID and the first password.
  • a sending device including: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory, and when the one or more programs When executed by the processor, the sending device is caused to perform the following steps: acquiring first hot spot information of the receiving device, the first hot spot information including the first service set identifier SSID; sending a sound wave signal to the receiving device, the sound wave signal including the encoded Modulate the processed wireless fidelity WI-FI capability information, so that the receiving device sends second hotspot information of the receiving device according to the WI-FI capability information, and the second hotspot information includes the second SSID; sends according to the second hotspot information A request to establish a WI-FI connection with the receiving device.
  • the sending device when the one or more programs are executed by the processor, the sending device is caused to perform the following steps: by scanning the two-dimensional code displayed by the receiving device, from the The first SSID and the corresponding first password are extracted from the two-dimensional code.
  • the sending device when the one or more programs are executed by the processor, the sending device is caused to perform the following steps: obtaining the public key of the key pair;
  • the WI-FI capability information is encrypted by the public key;
  • the sound wave signal sent to the receiving device includes the WI-FI capability information that has been encoded and modulated and encrypted by the public key.
  • the WI-FI capability information includes the WI-FI standard number, operating frequency range, compatibility, bandwidth, and physical transmission rate supported by the sending device , At least one of the modulation methods.
  • the frequency of the acoustic signal is greater than 10 kHz.
  • the sending device when the one or more programs are executed by the processor, the sending device is caused to perform the following steps: before sending a sound wave signal to the receiving device When, the prompt interface that the sound wave signal is being sent is displayed.
  • the first SSID is different from the second SSID; the frequency band of the WI-FI network corresponding to the second SSID is adapted to the WI of the sending device -FI capability information.
  • the working frequency band of the WI-FI network corresponding to the second SSID is 5GHz; the request to establish a WI-FI connection with the receiving device carries the first Two SSID and first password.
  • a receiving device including: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory, when the one or more programs When executed by the processor, the receiving device is caused to perform the following steps: transferring the first hotspot information of the receiving device to the sending device, the first hotspot information includes the first service set identifier SSID; receiving the sound wave signal sent by the sending device, The sound wave signal includes the wireless fidelity WI-FI capability information of the sending device that has been encoded and modulated; the second hot spot information is sent according to the WI-FI capability information of the sending device, and the second hot spot information includes the second SSID; The device sends a request to establish a WI-FI connection according to the second hotspot information; establishes a WI-FI connection with the sending device according to the request to establish a WI-FI connection, and the request to establish a WI-FI connection includes the second SSID .
  • the receiving device when the one or more programs are executed by the processor, the receiving device is caused to perform the following steps: generate and display a two-dimensional code, where the two-dimensional code is Including the first SSID and the corresponding first password; the receiving device transmits the first hotspot information to the sending device through the two-dimensional code.
  • the receiving device when the one or more programs are executed by the processor, the receiving device is caused to perform the following steps: Public key; demodulate and decode the sound wave signal sent by the sending device to obtain the WI-FI capability information encrypted by the public key; decrypt the WI-FI capability information through the private key corresponding to the public key .
  • the WI-FI capability information includes the WI-FI standard number supported by the sending device, working frequency range, compatibility, bandwidth, and physical transmission rate , At least one of the modulation methods.
  • the frequency of the acoustic signal is greater than 10 kHz.
  • the first SSID is different from the second SSID; the frequency band of the WI-FI network corresponding to the second SSID is adapted to the WI of the sending device -FI capability information.
  • the working frequency band of the WI-FI network corresponding to the second SSID is 5GHz; the sending device establishes WI-FI according to the second hotspot information sent The connection request carries the second SSID and the first password.
  • the present application provides an electronic device, including: a touch display screen, wherein the touch display screen includes a touch-sensitive surface and a display; a camera; one or more processors; a memory; a plurality of application programs; and one or Multiple computer programs.
  • one or more computer programs are stored in the memory, and the one or more computer programs include instructions.
  • the electronic device is caused to execute the method for establishing a connection between the devices in any one of the possible implementations of the foregoing aspects.
  • the present application provides an electronic device including one or more processors and one or more memories.
  • the one or more memories are coupled with one or more processors, and the one or more memories are used to store computer program codes.
  • the computer program codes include computer instructions.
  • the electronic device executes A method for establishing a connection between devices in any possible implementation of any one of the foregoing aspects.
  • the present application provides a computer storage medium, including computer instructions, which when the computer instructions run on an electronic device, cause the electronic device to perform any one of the foregoing methods for establishing a connection between devices.
  • this application provides a computer program product that, when the computer program product runs on an electronic device, causes the electronic device to execute any one of the foregoing methods for establishing a connection between devices.
  • FIG. 1 is a schematic diagram of an example of the structure of an electronic device provided by the present application.
  • Fig. 2 is a software structure block diagram of an electronic device according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of an example of a graphical user interface for establishing a connection between devices according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram of another example of a graphical user interface for establishing a connection between devices according to an embodiment of the present application.
  • Figure 5 is a schematic diagram of an interaction between a new mobile phone and an old mobile phone to establish a connection.
  • Fig. 6 is a schematic diagram of an example of signal coding and modulation processing provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a possible composition of an example of an electronic device provided by an embodiment of the present application.
  • first and second are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with “first” and “second” may explicitly or implicitly include one or more of these features, such as “first network”, “second network”, and “second network” in the embodiments of this application. "First channel set”, “Second channel set”, “Third channel set”, etc.
  • the embodiment of the present application provides a method for establishing a connection between two electronic devices, which can enable the two electronic devices to quickly establish a connection.
  • the electronic devices of this application can be mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR)/virtual reality (VR) devices, notebook computers, ultra-mobile personal computers (ultra-mobile personal computers).
  • AR augmented reality
  • VR virtual reality
  • notebook computers notebook computers
  • ultra-mobile personal computers ultra-mobile personal computers
  • ultra-mobile personal computers ultra-mobile personal computers
  • PDAs personal digital assistants
  • FIG. 1 is a schematic structural diagram of an example of electronic equipment provided in this application.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2.
  • Mobile communication module 150 wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195, etc.
  • SIM Subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light Sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100.
  • the electronic device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait.
  • AP application processor
  • modem processor modem processor
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • the different processing units may be independent devices or integrated in one or more processors.
  • the controller may be the nerve center and command center of the electronic device 100.
  • the controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 to store instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory can store instructions or data that the processor 110 has just used or used cyclically. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
  • the processor 110 may include one or more interfaces.
  • the interface can include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, and a universal asynchronous transmitter (universal asynchronous) interface.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • UART universal asynchronous transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB Universal Serial Bus
  • the I2C interface is a bidirectional synchronous serial bus, which includes a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may include multiple sets of I2C buses.
  • the processor 110 may couple the touch sensor 180K, the charger, the flash, the camera 193, etc., respectively through different I2C bus interfaces.
  • the processor 110 may couple the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through an I2C bus interface to implement the touch function of the electronic device 100.
  • the I2S interface can be used for audio communication.
  • the processor 110 may include multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170.
  • the audio module 170 may transmit audio signals to the wireless communication module 160 through an I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
  • the PCM interface can also be used for audio communication to sample, quantize and encode analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus can be a two-way communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • the UART interface is generally used to connect the processor 110 and the wireless communication module 160.
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function.
  • the audio module 170 may transmit audio signals to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with the display screen 194, the camera 193 and other peripheral devices.
  • the MIPI interface includes a camera serial interface (camera serial interface, CSI), a display serial interface (display serial interface, DSI), and so on.
  • the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the electronic device 100.
  • the processor 110 and the display screen 194 communicate through a DSI interface to realize the display function of the electronic device 100.
  • the GPIO interface can be configured through software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and so on.
  • the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that complies with the USB standard specification, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and so on.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect earphones and play audio through earphones. This interface can also be used to connect to other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in the embodiment of the present application is merely a schematic description, and does not constitute a structural limitation of the electronic device 100.
  • the electronic device 100 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
  • the charging management module 140 is used to receive charging input from the charger.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110.
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
  • the antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 150 can provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 100.
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
  • the mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform processing such as filtering, amplifying and transmitting the received electromagnetic waves to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic wave radiation via the antenna 1.
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110.
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor.
  • the application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 194.
  • the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (WI-FI) networks), bluetooth (BT), and global navigation satellites.
  • WLAN wireless local area networks
  • WI-FI wireless fidelity
  • BT bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication technology
  • infrared technology infrared, IR
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
  • the wireless communication module 160 may also receive the signal to be sent from the processor 110, perform frequency modulation, amplify it, and convert it into electromagnetic waves to radiate through the antenna 2.
  • the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite-based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite-based augmentation systems
  • the electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is a microprocessor for image processing, connected to the display 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, and the like.
  • the display screen 194 includes a display panel.
  • the display panel can use liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • active-matrix organic light-emitting diode active-matrix organic light-emitting diode
  • AMOLED flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc.
  • the electronic device 100 may include one or N display screens 194, and N is a positive integer greater than one.
  • the electronic device 100 can realize a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
  • the ISP is used to process the data fed back by the camera 193.
  • the camera 193 is used to capture still images or videos.
  • the object generates an optical image through the lens and is projected to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transfers the electrical signal to the ISP to convert it into a digital image signal.
  • ISP outputs digital image signals to DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the electronic device 100 may include one or N cameras 193, and N is a positive integer greater than one.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may 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, MPEG2, MPEG3, MPEG4, and so on.
  • MPEG moving picture experts group
  • MPEG2 MPEG2, MPEG3, MPEG4, and so on.
  • NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • applications such as intelligent cognition of the electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, and so on.
  • the external memory interface 120 may 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 the data storage function. For example, save music, video and other files in an external memory card.
  • the internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, at least one application program (such as a sound playback function, an image playback function, etc.) required by at least one function.
  • the data storage area can store data (such as audio data, phone book, etc.) created during the use of the electronic device 100.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
  • UFS universal flash storage
  • the electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal.
  • the audio module 170 can also be used to encode and decode audio signals.
  • the audio module 170 may be provided in the processor 110, or part of the functional modules of the audio module 170 may be provided in the processor 110.
  • the speaker 170A also called “speaker” is used to convert audio electrical signals into sound signals.
  • the electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the electronic device 100 answers a call or voice message, it can receive the voice by bringing the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone”, “microphone”, is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 170C through the human mouth, and input the sound signal into the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement noise reduction functions in addition to collecting sound signals. In other embodiments, the electronic device 100 may also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions.
  • the sending device can transmit the audio signal through the microphone and the loudspeaker, so as to transmit the audio signal to another electronic device located near the electronic device to realize the communication between the devices.
  • Transmission of sound waves the acoustic wave communication technology is more suitable for short-distance, small data transmission.
  • the operating distance between devices that meet the requirements of reliable transmission is 30cm.
  • the WI is transmitted through the acoustic wave communication technology.
  • -FI ability can resist attack. In other words, when the attacker cannot approach from too close a distance, the sonic signal cannot be decoded to obtain WI-FI information. Therefore, the application of sonic communication technology to the process of establishing a connection between devices can ensure the reliability of information transmission.
  • the earphone interface 170D is used to connect wired earphones.
  • the earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the electronic device 100 shown in FIG. 1 also includes a variety of sensors.
  • the pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals;
  • the gyroscope sensor 180B can be used to determine electronic The movement posture of the device 100;
  • the air pressure sensor 180C is used to measure air pressure.
  • the magnetic sensor 180D includes a Hall sensor; the acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (generally three axes); the distance sensor 180F is used to measure the distance, and the electronic device 100 can measure the distance by infrared or laser;
  • the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode; the ambient light sensor 180L is used to perceive the brightness of the ambient light, and the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived brightness of the ambient light; fingerprints
  • the sensor 180H is used to collect fingerprints; the temperature sensor 180J is used to detect temperature; the touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, and the touch sensor 180K is used to detect touches acting on or near it Operation;
  • the bone conduction sensor 180M can obtain the vibration signal, and the audio module 170 can parse the voice
  • the electronic device 100 also includes a button 190, such as a power-on button, a volume button, etc.
  • the button 190 may be a mechanical button or a touch button.
  • the electronic device 100 may receive key input, and generate key signal input related to user settings and function control of the electronic device 100.
  • the motor 191 can generate vibration prompts, and the motor 191 can be used for incoming call vibrating prompts, and can also be used for touch vibration feedback. For other components or modules that the electronic device 100 may include, this application will not repeat them.
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. It should be understood that the method for establishing a connection between devices provided in the embodiments of the present application may be applicable to systems such as Android and iOS, and the method has no dependency on the system platform of the device.
  • an Android system with a layered architecture will be taken as an example to illustrate a possible software structure of the electronic device 100.
  • FIG. 2 is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Communication between layers through software interface.
  • the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
  • the application layer can include a series of application packages.
  • the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, short message, gallery, call, and mobile phone clone provided in the embodiment of the application.
  • the acoustic wave communication function of the electronic device can be independently integrated into an application shared library.
  • the application shared library can be called to call the acoustic wave communication function.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • API application programming interface
  • any interface of the application framework layer can be called.
  • the arbitrary interface can be the native interface of the system or other newly added functional interfaces. The method for establishing a connection between devices provided in the embodiment is implemented.
  • the application framework layer can also include some predefined functions.
  • the application framework layer can include a window manager, a content provider, a view system, a phone manager, a resource manager, and a notification manager.
  • the window manager is used to manage window programs.
  • the window manager can obtain the size of the display, determine whether there is a status bar, lock the screen, take a screenshot, etc.
  • the content provider is used to store and retrieve data and make these data accessible to applications.
  • the data may include videos, images, audios, phone calls made and received, browsing history and bookmarks, phone book, etc.
  • the view system includes visual controls, such as controls that display text, controls that display pictures, and so on.
  • the view system can be used to build applications.
  • the display interface can be composed of one or more views.
  • a display interface that includes a short message notification icon may include a view that displays text and a view that displays pictures.
  • the phone manager is used to provide the communication function of the electronic device 100. For example, the management of the call status (including connecting, hanging up, etc.).
  • the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
  • the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and it can disappear automatically after a short stay without user interaction.
  • the notification manager is used to notify download completion, message reminders, and so on.
  • the notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or a scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, text messages are prompted in the status bar, prompt sounds, electronic devices vibrate, and indicator lights flash.
  • Android runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
  • the core library consists of two parts: one part is the function functions that the java language needs to call, and the other part is the core library of Android.
  • the application layer and the application framework layer run in a virtual machine.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • the system library can include multiple functional modules. For example: surface manager (surface manager), media library (media libraries), 3D graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc.
  • surface manager surface manager
  • media library media libraries
  • 3D graphics processing library for example: OpenGL ES
  • 2D graphics engine for example: SGL
  • the surface manager is used to manage the display subsystem and provides a combination of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to realize 3D graphics drawing, image rendering, synthesis, and layer processing.
  • the 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
  • the application shared library may further call any interface of the application framework layer.
  • the content provider can obtain WI-FI capability information and generate audio signals.
  • the shared library is used to obtain audio signals from the content manager.
  • the audio driver at the core layer is called to convert the audio
  • the signal is sent out in the form of sound waves, and this application does not limit the cooperative working mode between the application layer and any interface of the application framework layer.
  • the application of the application layer of the device can call the functions of other layers, borrow the capabilities of the device, implement the connection process, and transmit data.
  • any interface of the application framework layer is called to obtain data of the old mobile phone, such as data such as contacts, pictures, and video files, and transfer the obtained data to the new mobile phone.
  • FIG. 1 and FIG. 2 For ease of understanding, the following embodiments of the present application will take the electronic device with the structure shown in FIG. 1 and FIG. 2 as an example, combined with the accompanying drawings and application scenarios, taking data migration between a new mobile phone and an old mobile phone, and mobile phone cloning as an example.
  • the method for establishing a connection between devices provided in the embodiments of the present application is specifically described.
  • FIG. 3 is a schematic diagram of an example of a graphical user interface (GUI) for establishing a connection between devices provided by an embodiment of the present application.
  • GUI graphical user interface
  • Figure 3(a) shows that in the unlock mode of the mobile phone, the screen display system of the mobile phone displays the main interface 301 currently output, and the main interface 301 displays a variety of applications (application, App), for example Albums, music, settings, phone cloning, etc.
  • application App
  • the interface content 301 may also include other more application programs, which is not limited in this application.
  • FIG. 3 shows a schematic diagram of a graphical user interface of a new mobile phone in the process of establishing a connection between devices.
  • the user can click on the "mobile phone clone" on the main interface 301, and in response to the user's click operation, the mobile phone displays an interface 302 as shown in (b) in FIG.
  • the interface 302 can be used for the user to set the current mobile phone, for example, click the "This is a new mobile phone" option on the new mobile phone to set the current mobile phone as a mobile phone with a hotspot for receiving data.
  • FIG. 3 (b) after the user clicks on the "This is a new phone” option, the user enters the interface 303 shown in Figure 3 (c).
  • This interface 303 is used for the user to select the type of old mobile phone. For example, if the old mobile phone is a Huawei mobile phone, click the "Huawei” option, and the user can select the corresponding option according to the type of the old mobile phone.
  • the mobile phone In response to the user's click operation, the mobile phone enters the interface 304 shown in Figure 3 (d).
  • the interface 304 includes the QR code and connection password for the WI-FI connection provided by the new mobile phone for the old mobile phone.
  • the old mobile phone You can connect to the hotspot of the new mobile phone by scanning the QR code of the interface 304 and input the connection password, thereby establishing a WI-FI connection with the new mobile phone.
  • FIG. 304 you can also include more prompt messages, such as "Open the phone clone on the old phone, select this is the old phone, scan the QR code below to establish a connection", "If you cannot connect by scanning the QR code, please click At the bottom of the scan code interface of the old mobile phone, click manual connection", "If the old mobile phone does not have a mobile phone clone, please click here to install” and other prompt messages are used to guide the user's operation.
  • This application does not control the content and quantity of the prompt information included in the interface content. Make a limit.
  • Figure 4 shows a schematic diagram of the graphical user interface of the old mobile phone in the process of establishing a connection between the devices. As shown in (a) in FIG.
  • the user can click on "Mobile Clone" on the main interface 401 of the old mobile phone.
  • the mobile phone displays an interface 402 as shown in (b) in FIG. 4.
  • This interface 402 can be used for the user to set the current mobile phone. For example, click the "This is an old mobile phone” option on the old mobile phone interface 402 to set the current mobile phone as an old mobile phone connected to a hotspot for sending data.
  • the user enters the interface 404 shown in Figure 4 (c), which is used by the user to scan the interface 304 of the new mobile phone. QR code to connect to the hotspot of the new mobile phone to establish a WI-FI connection with the new mobile phone.
  • the display interface 404 of the old mobile phone includes prompt information for prompting the user of the current state of the old mobile phone, such as "connecting to a new mobile phone" or "connecting through sound waves".
  • the display interface 404 may also include animations for showing the connection process of the current new mobile phone and the old mobile phone, such as dynamic ripples of sound waves, etc.
  • the dynamic ripples may be presented on the display interface 404 in the form of flashing. This is not limited.
  • the new mobile phone can jump to the interface 305 shown in Figure 3 (e), which is used to prompt the user that the new mobile phone and the old mobile phone have established a connection.
  • the interface 405 shown in Figure 4 (e) can be jumped to display.
  • the interface 405 includes a list of data that can currently be transferred to the new mobile phone, such as contacts, information, call history, For different data types such as recordings and pictures, the user selects the data in the data list that needs to be transferred to the new mobile phone, and then clicks the "Start Migration" option. In response to the user's migration operation, the data from the old mobile phone is sent to the new mobile phone.
  • FIG. 5 is an example of interaction diagram of the new mobile phone and the old mobile phone to establish a WIFI connection.
  • the new mobile phone 10 is used as a hotspot, which can also be called an access point (access point, AP), and the old mobile phone 20 is used as a station to connect to the hotspot, as shown in FIG. 5, which includes the following steps:
  • the new mobile phone 10 transmits the first hotspot information of the new mobile phone 10 to the old mobile phone 20 by generating and displaying a two-dimensional code.
  • the old mobile phone 20 scans the two-dimensional code of the new mobile phone 10 to obtain the first hotspot information of the new mobile phone 10.
  • the hotspot information of the new mobile phone 10 may include service set identifier (SSID) information.
  • the SSID includes the extended service set identifier (ESSID) and the basic service set identifier (BSSID), which are used to distinguish different networks.
  • the SSID can be understood as the name of a local area network. There are 32 characters.
  • the old mobile phone 20 obtains the hotspot information of the new mobile phone 10 by scanning the two-dimensional code provided by the new mobile phone 10.
  • the first hotspot information of the new mobile phone 10 includes the first SSID.
  • step 501 the new mobile phone 10 synthesizes a two-dimensional code by combining the first SSID and WI-FI password information, and displays it on the new mobile phone 10 as shown in Figure 3 (d), and the old mobile phone 20 scans the QR code.
  • the two-dimensional code obtains the first hot spot information of the new mobile phone 10.
  • the new mobile phone 10 may also send the hotspot information of the new mobile phone 10 to the old mobile phone 20 through the acoustic wave communication technology.
  • the new mobile phone 10 may also send the information of the first network hotspot to the old mobile phone 20 by way of Bluetooth communication technology.
  • the old mobile phone 20 sends WI-FI capability information to the new mobile phone 10 through the acoustic wave communication technology.
  • the old mobile phone 20 obtains the first hotspot information of the new mobile phone 10 sent by the new mobile phone 10 by scanning the two-dimensional code, and then transmits the WI-FI capability information of the old mobile phone 20 itself to the new mobile phone 10.
  • the old mobile phone 20 scans the QR code of the new mobile phone 10, it can send a sound wave signal to the new mobile phone 10.
  • the old mobile phone 20 scans the QR code of the new mobile phone 10 to trigger the old mobile phone 20 to send the sound wave signal to the new mobile phone.
  • the sound wave signal includes WI-FI capability information of the old mobile phone 20.
  • the acoustic wave communication technology is more suitable for short-distance, small data transmission, and because it transmits relatively few data packets, it can achieve successful short-distance transmission within a short period of time (1s-2s).
  • the process of establishing a WI-FI connection between devices can be realized based on the low-cost, lightweight transmission, and short time-consuming characteristics of acoustic wave communication technology.
  • the operating distance that meets the requirement of reliable transmission is 30 cm. When the distance between the new mobile phone and the old mobile phone is greater than 50 cm, it is almost impossible to decode the acoustic signal.
  • the sound wave communication technology can naturally resist attacks. In other words, when the attacker cannot get too close, he cannot decode the sound wave signal to obtain WI-FI information. Therefore, applying the sound wave communication technology to the process of establishing a connection between devices can ensure the reliability of information transmission. For example, application It is used for data migration, phone cloning, etc. between new and old phones.
  • the WI-FI capability information may include at least one type of information such as WI-FI standard number, operating frequency range, compatibility, bandwidth, physical transmission rate, and modulation mode, which is not limited in this application.
  • Table 1 lists the content that the WI-FI capability information of the old mobile phone 20 may include.
  • the WI-FI standard number in Table 1 may be related standards of the Institute for Electrical and Electronic Engineers (IEEE), such as IEEE802.11n, IEEE802.11ac, etc.; the working frequency range may be 2.4 The frequency range of GHz-2.4835GHz, or the frequency range of 5.150GHz-5.850GHz; compatibility, that is, the WI-FI version that old mobile phones can be compatible with, so I won’t go into details here.
  • IEEE Institute for Electrical and Electronic Engineers
  • the working frequency band of 2.4GHz WI-FI connection may be in the frequency range of 2.4GHz-2.4835GHz, and the working frequency band of 5GHz WI-FI connection may be in the frequency range of 5.150GHz-5.850GHz.
  • the WI-FI capability information of the old mobile phone 20 indicates that the old mobile phone 20 can support 2.4 GHz WI-FI connection and 5 GHz WI-FI connection.
  • the first hotspot information includes the first SSID
  • the second hotspot information includes the second SSID
  • the first SSID is different from the second SSID
  • the frequency band of the Wi-Fi network corresponding to the second SSID is adapted to the Wi-Fi capability information of the old mobile phone 20.
  • the working frequency band of the Wi-Fi network corresponding to the second SSID is 5 GHz
  • the Wi-Fi network corresponding to the first SSID is 5 GHz
  • the working frequency band of FI network is 2.4GHz.
  • the old mobile phone 20 sends the working frequency range and bandwidth supported by itself to the new mobile phone 10 through sound wave communication.
  • the new mobile phone The working frequency range and bandwidth supported by the old mobile phone 20 can be obtained, so as to determine the set of available channels within the working frequency range.
  • the new mobile phone 10 can provide different working frequency bands for the old mobile phone 20.
  • the current common working frequency bands of WI-FI are 2.4 GHz frequency band and 5 GHz frequency band.
  • the 5GHz frequency band has less interference and a faster rate than the 2.4GHz frequency band.
  • the 5GHz frequency band saves power and has a good user experience.
  • the coverage rate of the current 5GHz frequency band is lower than that of the 2.4GHz frequency band.
  • the advantages and disadvantages of both the 2.4GHz frequency band and the 5GHz frequency band are shown in Table 2.
  • the bandwidth is wide enough to support higher transmission rates, but the coverage rate of the 5GHz frequency band is not high enough, and not all mobile phones can support the transmission of the 5GHz frequency band.
  • a 5GHz WI-FI connection is established with the new mobile phone 10 first, which can ensure a higher transmission rate.
  • the old mobile phone 20 subjects the WI-FI capability information to encoding and modulation processing, and transmits the encoded and modulated WI-FI capability information using sound waves.
  • Fig. 6 is a schematic diagram of an example of signal coding and modulation processing provided by an embodiment of the present application.
  • the old mobile phone 20 may perform coding and modulation processing on the WI-FI capability information containing itself.
  • the WI-FI capability information of the old mobile phone 20 can be sequentially encoded and modulated, time-frequency conversion, and other signal processing processes, and the processed information is sent to the new mobile phone 10 by means of sound waves.
  • the WI-FI capability information can undergo cyclic redundancy check (CRC) check, channel coding, modulation, time-frequency conversion, etc., and the processed information can be sent to the new mobile phone by means of sound waves 10 .
  • the channel coding can be in the form of convolutional codes.
  • the modulation process can be modulated by, for example, multi-ary differential phase shift keying (quadrature differential phase shift keying, QPSK).
  • Time-frequency transform can pass the modulated signal through fast Fourier. After an inverse fast Fourier transform (IFFT), an audio stream to be sent is generated and sent by the audio device of the old mobile phone 20 (such as the audio module 170 of the electronic device 100 in FIG. 1).
  • IFFT inverse fast Fourier transform
  • the inverse process of signal processing is performed. For example, time-frequency conversion is performed on the received audio signal, demodulation, channel decoding, and CRC check are performed to obtain the original bit information.
  • demodulation can be understood as the inverse process of modulation
  • channel decoding can be understood as the inverse process of channel coding.
  • the frequency of the acoustic wave signal is greater than 10 kHz.
  • the old mobile phone 20 when the old mobile phone 20 sends a sound wave signal to the new mobile phone 10, the old mobile phone 20 may display a prompt interface indicating that the sound wave signal is being sent.
  • the old mobile phone 20 may display a prompt interface as shown in (d) in FIG. 4.
  • the frequency band used by the acoustic wave communication technology is a high frequency band above 10KHz, which avoids the place where people make sounds. ⁇ 6KHz frequency band, which can reduce in-band interference in application scenarios, ensure the success rate of sound wave transmission, and improve the reliability of transmission between old and new mobile phones.
  • the new mobile phone 10 may monitor the audio signal of the old mobile phone 20 within a certain period of time.
  • the new mobile phone 10 monitors whether the old mobile phone 20 sends an audio signal within 5 seconds. After 5 seconds, the new mobile phone 10 may default to the old mobile phone 20 not sending an audio signal.
  • the new mobile phone 10 receives the sound wave signal sent by the old mobile phone 20, decodes and obtains the WI-FI capability information of the old mobile phone, and sends second hotspot information according to the WI-FI capability information of the old mobile phone 20.
  • the second hotspot information includes the second SSID.
  • the working frequency band of the Wi-Fi network corresponding to the second SSID is 5 GHz
  • the working frequency band of the Wi-Fi network corresponding to the first SSID is 2.4 GHz.
  • the new mobile phone 10 determines that the old mobile phone 20 supports a 5GHz WI-FI connection, and sends the 5GHz Wi-FI hotspot to the old mobile phone 20.
  • the old mobile phone 20 uses acoustic wave communication technology to transmit its own WI-FI capability information to the new mobile phone 10.
  • the new mobile phone can know the 5GHz WI-FI connection supported by the old mobile phone 20.
  • the new mobile phone 10 directly turns on the 5GHz WI-FI hotspot, and sends the 5GHz WI-FI hotspot information to the old mobile phone 20, that is, sends the SSID of the 5GHz WI-FI network.
  • the old mobile phone 20 scans the surrounding 5GHz WI-FI hotspot, scans the SSID of the 5GHz WI-FI hotspot sent by the new mobile phone 10, and sends a connection request to establish a 5GHz WI-FI connection with the new mobile phone 10.
  • the process of scanning the SSID and sending the connection request by the old mobile phone 20 can refer to the related implementation of establishing a WI-FI connection in the prior art, which is not limited in the embodiment of the present invention.
  • the 5GHz WI-FI connection can be accessed without a password or can be accessed only with a password.
  • the connection request sent by the old mobile phone carries the SSID of the 5GHz Wi-Fi hotspot and the password of the 2.4GHz Wi-Fi connection, and the new mobile phone can be connected based on the SSID of the 5GHz Wi-Fi network and the 2.4GHz Wi-Fi connection.
  • the password is verified.
  • the old mobile phone 20 and the new mobile phone 10 transmit data through a channel in the 5 GHz frequency band.
  • the new mobile phone 10 does not need to establish a 2.4GHz Wi-Fi connection with the old mobile phone 20 first, and can directly obtain the Wi-Fi capability information of the old mobile phone 20. After the new mobile phone 10 determines the capability information of the old mobile phone 20, The verification process of capability intersection information can be carried out.
  • the first communication channel set supported by the new mobile phone 10 the second communication channel set supported by the old mobile phone 20, and the intersection between the first communication channel set and the second communication channel set, we call it the "third communication channel” "If the third communication channel type includes a channel in the 5 GHz frequency band, the new mobile phone 10 and the old mobile phone 20 can determine that both parties can support Wi-Fi connections in the 5 GHz frequency band.
  • both the new mobile phone 10 and the old mobile phone 20 support WI-FI connections in the 5 GHz frequency band.
  • the new mobile phone 10 directly turns on the WI-FI hotspot of the 5GHz frequency band for the old mobile phone 20.
  • the new mobile phone 10 and the old mobile phone 20 can establish a WI-FI connection in the 5GHz frequency band and transmit data through the channel of the 5GHz frequency band.
  • the new mobile phone 10 turns on the 2.4GHz WI-FI hotspot for the old mobile phone 20, and the new mobile phone 10 and the old mobile phone 20 can establish WI-FI in the 2.4GHz frequency band.
  • FI connects and transmits data through the channel in the 2.4GHz frequency band.
  • the old mobile phone 20 scans the QR code of the new mobile phone 10 and obtains the hotspot information of the new mobile phone 10, it can establish a Wi-Fi connection in the 2.4 GHz frequency band with the new mobile phone.
  • the new mobile phone 10 and the old mobile phone 20 can exchange capability information. For example, a verification process of capability intersection information is performed between the new mobile phone 10 and the old mobile phone 20.
  • the new mobile phone 10 and the old mobile phone 20 currently communicate through the 2.4 GHz frequency band, the first communication channel set supported by the new mobile phone 10, the second communication channel set supported by the old mobile phone 20, the first communication channel set and the second communication
  • the intersection between the channel sets we call it the "third communication channel". If the third communication channel includes a channel in the 5GHz frequency band, the new mobile phone 10 and the old mobile phone 20 can determine that both parties can support WI-FI in the 5GHz frequency band. connection. Through the verification process of the capability intersection information between the devices, it can be determined that both the new mobile phone 10 and the old mobile phone 20 support WI-FI connections in the 5 GHz frequency band.
  • the old mobile phone 20 (site) can be switched from the 2.4 GHz frequency band to the 5 GHz frequency band.
  • the new mobile phone 10 and the old mobile phone 20 need to be reconnected. It can be seen that the existing WI-FI connection switching method takes a long time to realize the reconnection, which can be up to 10s, and the number of interactions is large and the time is prolonged, which affects the user experience.
  • the old mobile phone 20 transmits its own WI-FI capability information to the new mobile phone 10 through sound waves, and the new mobile phone 10 can obtain the information of the old mobile phone 10.
  • Supported WI-FI frequency points and other information so that the new mobile phone directly opens the WI-FI hotspot for the old mobile phone 20 according to the WI-FI frequency band supported by the old mobile phone 10, and the old mobile phone 20 can directly establish a WI-FI connection with the new mobile phone 10.
  • WI-FI capability information from the old mobile phone 20 to the new mobile phone 10 it can be transmitted through the WI-FI frequency channel supported by both the new mobile phone and the old mobile phone.
  • the mobile phone 10 and the old mobile phone 20 can acquire the ability of the bottom layer of the channel.
  • information can be directly transmitted through the determined channel, which improves the reliability of the transmission.
  • the implementation process of the above technical solution depends on less hardware, and only requires two devices to have audio devices (such as microphones and speakers).
  • the old mobile phone 20 can send sound wave signals through the audio device, and the new mobile phone 10 can receive audio through the audio device. signal.
  • WI-FI hotspot information Since the establishment of a WI-FI connection is usually used before data transmission between two mobile terminals, since the data is personal information, there is a high requirement for confidentiality. In the actual application process, if an attacker preemptively connects to WI-FI, the WI-FI hotspot information is directly transmitted through the sound wave signal, and the surrounding attackers can receive the sound wave signal to connect to the WI-FI hotspot, and the security cannot be obtained. Guaranteed.
  • the sound wave signal sent by the old mobile phone 20 to the new mobile phone 10 includes the WI-FI capability information that has been encoded and modulated and encrypted by the public key.
  • the old mobile phone 20 encrypts the WI-FI capability information with a public key, and then encodes and modulates the ciphertext of the WI-FI capability information encrypted by the public key, and then uses sound waves. Send the encoded and modulated information.
  • the sonic signal is first demodulated and decoded, and then the WI-FI capability information is obtained by decrypting the private key corresponding to the public key.
  • the encryption key is generally public, called the public key.
  • the public key can be derived by cloning itself, and the generated public key can be published and will not be stolen; the method of disclosure is not limited.
  • the public key can be sent directly to the receiving end via email, or it can be announced in other ways.
  • the decryption key cannot be made public and is called the private key.
  • the public key and the private key have a one-to-one correspondence.
  • a pair of public and private keys is collectively called a "key pair".
  • the ciphertext encrypted by the public key must be decrypted by the private key paired with the public key.
  • the two keys in the key pair have a very close relationship, so the public key and the private key cannot be generated separately.
  • the public key is sent to others, and the private key is reserved for your own use.
  • the new mobile phone 10 transmits the first hotspot information of the new mobile phone 10 to the old mobile phone 20 by generating a two-dimensional code.
  • the two-dimensional code may include SSID, WI-FI password and public key information.
  • step 502 the old mobile phone 20 scans the two-dimensional code to obtain the first hotspot information and public key information of the new mobile phone, and encrypts the WI-FI capability information with the public key, and then the cipher text is encoded and modulated.
  • the old mobile phone 20 transmits to the new mobile phone 10 the WI-FI capability information that has been coded and modulated and encrypted by the public key through the acoustic wave communication technology.
  • the new mobile phone 10 receives the sound wave signal sent by the old mobile phone 20, first demodulates and decodes the sound wave signal, and then decrypts the WI-FI capability information through the private key corresponding to the public key.
  • the new mobile phone 10 sends second hotspot information matching the WI-FI capability of the old mobile phone.
  • Steps 505-506 refer to the aforementioned process, which will not be repeated here.
  • the old mobile phone 20 transmits its own WI-FI capability information to the new mobile phone 10 by encrypting the WI-FI capability information, and then encoding and modulating, and transmitting through sound waves, which can increase the transmission.
  • the security of the process when an attacker appears nearby or connects to WI-FI first, the security of the data can also be ensured through the encryption of the WI-FI capability information.
  • it is ensured that the new mobile phone can accurately obtain the WI-FI frequency points supported by the old mobile phone 10, so that the new mobile phone directly opens the WI-FI hotspot for the old mobile phone 20 according to the WI-FI frequency point supported by the old mobile phone 10, reducing the number of old mobile phones.
  • the interaction process between the mobile phone 20 and the new mobile phone 10 is switched from a 2.4GHz WI-FI connection to a 5GHz WI-FI connection, which speeds up the time for establishing a WI-FI connection and improves the user experience.
  • an established network hot spot is taken as an example, such as the currently used 2.4 GHz frequency band and 5 GHz frequency band, which is not limited in this application.
  • an electronic device in order to implement the above-mentioned functions, includes hardware and/or software modules corresponding to each function.
  • 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 by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Those skilled in the art can use different methods for each specific application in combination with the embodiments to implement the described functions, but such implementation should not be considered as going beyond the scope of the present application.
  • the electronic device can be divided into functional modules according to the foregoing method examples.
  • each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
  • FIG. 7 is a schematic diagram of an example of possible composition of an electronic device provided by an embodiment of the present application.
  • the electronic device 700 may include: a processor 710, a memory 720, and Transceiver 730.
  • the processor 710 may be used to control and manage the actions of the electronic device, for example, it may be used to support the electronic device to execute the steps introduced in the above method 500.
  • the memory 720 may be used to support the electronic device to execute and store program codes and data.
  • the transceiver 730 in this application, may correspond to an audio device, such as a microphone or a speaker, and may be used to support sound wave communication between a new mobile phone and an old mobile phone.
  • the processor 710 may implement or execute various exemplary logical blocks, modules, and circuits described in conjunction with the disclosure of this application.
  • the processor 710 may also be a combination that implements computing functions, for example, it includes a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and so on.
  • the transceiver 730 may specifically be an audio device, a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, and other devices that interact with other electronic devices.
  • the electronic device involved in this embodiment may be a device having the structure shown in FIG. 1.
  • This embodiment also provides a computer storage medium.
  • the computer storage medium stores computer instructions.
  • the computer instructions run on an electronic device, the electronic device executes the steps of the above-mentioned related method to realize the inter-device establishment in the above-mentioned embodiment. Method of connection.
  • This embodiment also provides a computer program product, which when the computer program product runs on a computer, causes the computer to execute the above-mentioned related steps, so as to implement the method for establishing a connection between devices in the above-mentioned embodiment.
  • the embodiments of the present application also provide a device.
  • the device may specifically be a chip, component or module.
  • the device may include a processor and a memory connected to each other.
  • the memory is used to store computer execution instructions.
  • the processor can execute the computer-executable instructions stored in the memory, so that the chip executes the method for establishing a connection between the devices in the foregoing method embodiments.
  • the electronic device, computer storage medium, computer program product, or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the corresponding method provided above. The beneficial effects of the method will not be repeated here.
  • the disclosed device and method can be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of modules or units is only a logical function division.
  • there may be other division methods for example, multiple units or components may be combined or It can be integrated into another device, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate parts may or may not be physically separate.
  • the parts displayed as units may be one physical unit or multiple physical units, that is, they may be located in one place, or they may be distributed to multiple different places. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium.
  • the technical solutions of the embodiments of the present application are essentially or the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of a software product, and the software product is stored in a storage medium. It includes several instructions to make a device (may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all or part of the steps of the methods in the various embodiments of the present application.
  • the foregoing storage media include: U disk, mobile hard disk, read only memory (read only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)

Abstract

The present application provides a method for establishing a connection between apparatuses, and an electronic device. In the method, a transmitting apparatus transmits its own Wi-Fi capability information to a receiving apparatus by means of an acoustic wave communication technique with a working frequency band greater than 10 KHz, thereby avoiding the frequency band of 0-6 KHz where a sound produced by a person is located, reducing in-band interference, and improving the reliability of transmission between an old mobile phone and a new mobile phone. In addition, the transmitting apparatus further may perform encryption on the Wi-Fi capability information, perform coding modulation, and transmit the Wi-Fi capability information by means of an acoustic wave, thereby improving the safety of a transmission process. The method can make the receiving apparatus turn on a Wi-Fi hotspot according to the Wi-Fi capability information of the transmitting apparatus, reduces the interaction process of switching a 2.4GHz Wi-Fi connection to a 5GHz Wi-Fi connection between the apparatuses, and shortens the time length of establishing a Wi-Fi connection between the apparatuses, thereby improving user experience.

Description

设备之间建立连接的方法及电子设备Method for establishing connection between equipment and electronic equipment
本申请要求于2019年09月18日提交中国专利局、申请号为201910883033.8、申请名称为“设备之间建立连接的方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on September 18, 2019, the application number is 201910883033.8, and the application name is "Methods and Electronic Devices for Establishing Connections Between Devices", the entire contents of which are incorporated by reference in In this application.
技术领域Technical field
本申请涉及电子技术领域,尤其涉及一种设备之间建立连接的方法及电子设备。This application relates to the field of electronic technology, and in particular to a method for establishing a connection between devices and an electronic device.
背景技术Background technique
在设备之间互相传递信息,已经成为生活中非常常见的应用场景。例如,用户在更换电子设备时,通过新旧设备之间通过手机备份、手机克隆等互相传输数据。在新旧设备之间传输数据之前,一般需要先在新旧设备之间建立短距离的无线连接,例如无线保真(wireless fidelity,WI-FI)连接。Transferring information between devices has become a very common application scenario in life. For example, when users replace electronic devices, they transfer data between the new and old devices through mobile phone backup, mobile phone cloning, etc. Before transmitting data between the new and old devices, it is generally necessary to establish a short-distance wireless connection between the new and old devices, such as wireless fidelity (WI-FI) connections.
在传输数据的过程中,如果传输的是大量的数据,使用传输速率最高、最优的频点进行传输,用户体验最好。但是,由于新旧设备支持的WI-FI连接的能力不同,会影响新旧设备之间建立连接的方式。In the process of transmitting data, if a large amount of data is being transmitted, using the highest and optimal frequency for transmission will provide the best user experience. However, due to the different WI-FI connection capabilities supported by the new and old devices, it will affect the way in which connections are established between the new and old devices.
发明内容Summary of the invention
本申请提供一种设备之间建立连接的方法及电子设备,该方法可以使得接收设备根据发送设备的WI-FI能力信息开启WI-FI热点,减少设备之间由2.4GHz WI-FI连接切换到5GHz WI-FI连接的交互过程,缩短了设备之间建立WI-FI连接的时间,提升了用户体验。This application provides a method for establishing a connection between devices and an electronic device. The method can enable the receiving device to turn on the WI-FI hotspot according to the WI-FI capability information of the sending device, and reduce the switch between the devices from 2.4GHz WI-FI connection to The interactive process of 5GHz WI-FI connection shortens the time for establishing WI-FI connection between devices and improves user experience.
第一方面,提供了一种设备之间建立连接的方法,包括:发送设备获取接收设备的第一热点信息,该第一热点信息包括第一服务集标识SSID;该发送设备向该接收设备发送声波信号,该声波信号包括经过编码调制处理的该发送设备的无线保真WI-FI能力信息,以使得该接收设备根据该发送设备的WI-FI能力信息发送接收设备的第二热点信息,该第二热点信息包括第二SSID;该发送设备根据该第二热点信息发送与该接收设备建立WI-FI连接的请求。In a first aspect, a method for establishing a connection between devices is provided, including: a sending device obtains first hotspot information of a receiving device, the first hotspot information includes a first service set identifier SSID; the sending device sends to the receiving device Acoustic wave signal, the acoustic wave signal includes the wireless fidelity WI-FI capability information of the sending device that has been encoded and modulated, so that the receiving device sends the second hotspot information of the receiving device according to the WI-FI capability information of the sending device, the The second hotspot information includes a second SSID; the sending device sends a request for establishing a WI-FI connection with the receiving device according to the second hotspot information.
在本申请中,第一热点信息包括第一SSID,第二热点信息包括所述第二SSID,且第一SSID与第二SSID不同。可选地,第二SSID对应的WI-FI网络的频段适配旧手机的WI-FI能力信息,例如第二SSID对应的WI-FI网络的工作频段为5GHz,第一SSID对应的WI-FI网络的工作频段为2.4GHz。In this application, the first hotspot information includes the first SSID, the second hotspot information includes the second SSID, and the first SSID is different from the second SSID. Optionally, the frequency band of the WI-FI network corresponding to the second SSID is adapted to the WI-FI capability information of the old mobile phone. For example, the working frequency band of the WI-FI network corresponding to the second SSID is 5GHz, and the WI-FI corresponding to the first SSID The working frequency band of the network is 2.4GHz.
在本申请中,2.4GHz的WI-FI连接的工作频段可以是2.4GHz-2.4835GHz的频段范围,5GHz的WI-FI连接的工作频段可以是5.150GHz-5.850GHz等频段范围。例如,在本申请中,旧手机20的WI-FI能力信息指示旧手机20可以支持2.4GHz的WI-FI连接且支持5GHz的WI-FI连接。In this application, the working frequency band of 2.4GHz WI-FI connection may be in the frequency range of 2.4GHz-2.4835GHz, and the working frequency band of 5GHz WI-FI connection may be in the frequency range of 5.150GHz-5.850GHz. For example, in this application, the WI-FI capability information of the old mobile phone 20 indicates that the old mobile phone 20 can support 2.4 GHz WI-FI connection and 5 GHz WI-FI connection.
应理解,本申请实施例以用户更换手机,并借助手机克隆在新旧手机之间进行数据传输或数据迁移为例,介绍设备之间建立连接的方法。其中,新手机作为热点,也可以称为接入点,为旧手机提供WI-FI热点,即本申请的接收设备;旧手机作为连接热点的站点,即本申请的发送设备。It should be understood that, in the embodiment of the present application, a user changes a mobile phone and uses a mobile phone clone to perform data transmission or data migration between the new and old mobile phones as an example to introduce a method for establishing a connection between devices. Among them, the new mobile phone serves as a hotspot, which can also be called an access point, which provides WI-FI hotspots for the old mobile phones, which is the receiving device of this application; the old mobile phones are used as the site to connect to the hotspot, which is the sending device of this application.
通过上述技术方案,旧手机通过声波通信技术,向新手机发送旧手机的WI-FI能力信息。声波通信技术所使用的频段为10KHz以上的高频段,避开了人发出声音所处的0~6KHz的频段,这样可以减少了应用场景中的带内干扰,保证声波传输的成功率,提升旧手机和新手机之间传输的可靠性。此外,声波通信技术比较适合短距离、小数据量的传输。在本申请中,声波信号的传输过程中,满足可靠性传输要求的设备之间的作用距离为30cm,当设备之间的距离大于50cm时,几乎无法解码声波信号,因此通过声波通信技术传输WI-FI能力可以抗攻击。换言之,在攻击者无法以过近的距离靠近时,无法解码声波信号获取WI-FI信息,因此将声波通信技术应用于设备之间建立连接的过程,可以保证信息传输的可靠性。Through the above technical solution, the old mobile phone sends the WI-FI capability information of the old mobile phone to the new mobile phone through the acoustic wave communication technology. The frequency band used by acoustic wave communication technology is a high frequency band above 10KHz, avoiding the 0~6KHz frequency band where human sounds are emitted. This can reduce in-band interference in application scenarios, ensure the success rate of acoustic wave transmission, and improve the old The reliability of the transmission between the mobile phone and the new mobile phone. In addition, acoustic wave communication technology is more suitable for short-distance, small data transmission. In this application, during the transmission of acoustic signals, the operating distance between devices that meet the requirements of reliable transmission is 30cm. When the distance between the devices is greater than 50cm, it is almost impossible to decode the acoustic signal, so the WI is transmitted through the acoustic wave communication technology. -FI ability can resist attack. In other words, when the attacker cannot approach from too close a distance, the sonic signal cannot be decoded to obtain WI-FI information. Therefore, the application of sonic communication technology to the process of establishing a connection between devices can ensure the reliability of information transmission.
结合第一方面,在第一方面的某些实现方式中,该发送设备获取接收设备的第一热点信息,包括:该发送设备通过扫描该接收设备显示的二维码,从该二维码中提取该第一SSID和对应的第一密码。With reference to the first aspect, in some implementation manners of the first aspect, the sending device obtains the first hotspot information of the receiving device, including: the sending device scans the QR code displayed by the receiving device to obtain information from the QR code. Extract the first SSID and the corresponding first password.
新手机通过将第一SSID、WI-FI密码信息合成一个二维码,并显示在新手机上,旧手机通过扫描该二维码获取新手机的第一热点信息。此外,在一种可能的实现方式中,新手机还可以通过声波通信技术将新手机的热点信息发送给旧手机。或者,在另一种可能的实现方式中,新手机还可以通过蓝牙通信技术的方式将第一网络热点的信息发送给旧手机。The new mobile phone combines the first SSID and WI-FI password information into a QR code and displays it on the new mobile phone. The old mobile phone obtains the first hot spot information of the new mobile phone by scanning the QR code. In addition, in a possible implementation manner, the new mobile phone can also send the hotspot information of the new mobile phone to the old mobile phone through the acoustic wave communication technology. Or, in another possible implementation manner, the new mobile phone can also send the information of the first network hotspot to the old mobile phone by way of Bluetooth communication technology.
旧手机通过扫描二维码获取新手机发送的新手机的第一热点信息,然后将旧手机自身的WI-FI能力信息传递给新手机。当旧手机扫描新手机的二维码之后,可以向新手机发送声波信号,换言之,旧手机通过扫描新手机的二维码,触发旧手机向新手机发送声波信号,该声波信号包括旧手机的WI-FI能力信息。The old mobile phone obtains the first hotspot information of the new mobile phone sent by the new mobile phone by scanning the QR code, and then transmits the WI-FI capability information of the old mobile phone to the new mobile phone. After the old mobile phone scans the QR code of the new mobile phone, it can send a sound wave signal to the new mobile phone. In other words, the old mobile phone scans the QR code of the new mobile phone to trigger the old mobile phone to send a sound wave signal to the new mobile phone. WI-FI capability information.
结合第一方面和上述实现方式,在第一方面的某些实现方式中,该发送设备向该接收设备发送声波信号之前,该方法还包括:该发送设备获取密钥对的公钥;该发送设备通过该公钥加密该WI-FI能力信息;该发送设备向该接收设备发送的声波信号包括经过编码调制处理,并经过该公钥加密的该WI-FI能力信息。Combining the first aspect and the foregoing implementation manners, in some implementation manners of the first aspect, before the sending device sends the acoustic wave signal to the receiving device, the method further includes: the sending device obtains the public key of the key pair; The device encrypts the WI-FI capability information by using the public key; the sound wave signal sent by the sending device to the receiving device includes the WI-FI capability information that has been encoded and modulated and encrypted by the public key.
由于建立WI-FI连接通常是用于两个移动终端之间传输数据之前,由于数据为个人信息,对保密性要求较高。在实际应用过程中,如果出现攻击者抢先连上WI-FI时,直接通过声波信号传递WI-FI热点信息,周围的攻击者可以通过接收声波信号,连接该WI-FI热点,安全性不能得到保障。Since the establishment of a WI-FI connection is usually used before data transmission between two mobile terminals, since the data is personal information, there is a high requirement for confidentiality. In the actual application process, if an attacker preemptively connects to WI-FI, the WI-FI hotspot information is directly transmitted through the sound wave signal, and the surrounding attackers can receive the sound wave signal to connect to the WI-FI hotspot, and the security cannot be obtained. Guaranteed.
可选地,旧手机向新手机发送的声波信号包括经过编码调制处理,并经过所述公钥加密的所述WI-FI能力信息。在旧手机侧,旧手机将WI-FI能力信息通过公钥进行加密,再将经过所述公钥加密的WI-FI能力信息的密文进行编码调制处理,再利用声波发送该经过编码调制处理的信息。Optionally, the sound wave signal sent by the old mobile phone to the new mobile phone includes the WI-FI capability information that has been encoded and modulated and encrypted by the public key. On the old mobile phone side, the old mobile phone encrypts the WI-FI capability information with a public key, then encodes and modulates the cipher text of the WI-FI capability information encrypted by the public key, and then transmits the encoded and modulated information using sound waves. Information.
相应地,在新手机侧,接收到声波信号后,先对声波信号进行解调解码,然后通过与所述公钥相对应的私钥,解密得到所述WI-FI能力信息。Correspondingly, on the new mobile phone side, after receiving the sonic signal, the sonic signal is first demodulated and decoded, and then the WI-FI capability information is obtained by decrypting the private key corresponding to the public key.
通过上述技术方案,旧手机通过将自身的WI-FI能力信息传递给新手机的过程中,通 过对WI-FI能力信息进行加密处理,再经过编码调制处理,通过声波传输,可以增加传输过程的安全性,当周围近距离出现攻击者或者攻击者抢先连上WI-FI时,也可以通过WI-FI能力信息的加密保证数据的安全性。同时,保证新手机可以准确获取旧手机所支持的WI-FI频点等信息,从而新手机直接按照旧手机10所支持的WI-FI频点为旧手机开启WI-FI热点,减少旧手机和新手机之间由2.4GHz WI-FI连接切换到5GHz WI-FI连接的交互过程,加快缩短了建立WI-FI连接的时间,提升了用户体验。Through the above technical solution, the old mobile phone passes its own WI-FI capability information to the new mobile phone through the process of encrypting the WI-FI capability information, and then encoding and modulating, and transmitting through sound waves, which can increase the transmission process. Security. When an attacker appears nearby or connects to WI-FI first, the security of the data can also be ensured through the encryption of WI-FI capability information. At the same time, it is ensured that the new mobile phone can accurately obtain information such as the WI-FI frequency points supported by the old mobile phone, so that the new mobile phone directly opens the WI-FI hotspot for the old mobile phone according to the WI-FI frequency point supported by the old mobile phone 10, reducing the number of old mobile phones and The interactive process of switching from 2.4GHz WI-FI connection to 5GHz WI-FI connection between new mobile phones speeds up the time for establishing WI-FI connection and improves user experience.
结合第一方面和上述实现方式,在第一方面的某些实现方式中,该WI-FI能力信息包括该发送设备支持的WI-FI标准号、工作频率范围、兼容性、频宽、物理传输速率、调制方式中的至少一种信息。Combining the first aspect and the foregoing implementation manners, in some implementation manners of the first aspect, the WI-FI capability information includes the WI-FI standard number supported by the sending device, working frequency range, compatibility, bandwidth, and physical transmission At least one of rate and modulation method.
结合第一方面和上述实现方式,在第一方面的某些实现方式中,该声波信号的频率大于10kHz。Combining the first aspect and the foregoing implementation manners, in some implementation manners of the first aspect, the frequency of the acoustic wave signal is greater than 10 kHz.
通过上述技术方案,声波通信技术所使用的频段为10KHz以上的高频段,避开了人发出声音所处的0~6KHz的频段,这样可以减少了应用场景中的带内干扰,保证声波传输的成功率,提升旧手机和新手机之间传输的可靠性。Through the above technical solution, the frequency band used by the acoustic wave communication technology is a high frequency band above 10KHz, avoiding the frequency band of 0-6KHz where human sounds are emitted, which can reduce the in-band interference in the application scenario and ensure the sound wave transmission. The success rate improves the reliability of transmission between old and new mobile phones.
结合第一方面和上述实现方式,在第一方面的某些实现方式中,该方法还包括:在该发送设备向该接收设备发送声波信号时,该发送设备显示正在发送声波信号的提示界面。Combining the first aspect and the foregoing implementation manners, in some implementation manners of the first aspect, the method further includes: when the sending device sends the sonic signal to the receiving device, the sending device displays a prompt interface indicating that the sonic signal is being sent.
结合第一方面和上述实现方式,在第一方面的某些实现方式中,该第二SSID对应的WI-FI网络的工作频段为5GHz;与该接收设备建立WI-FI连接的请求携带该第二SSID和第一密码。Combining the first aspect and the foregoing implementation manners, in some implementation manners of the first aspect, the working frequency band of the WI-FI network corresponding to the second SSID is 5GHz; the request to establish a WI-FI connection with the receiving device carries the first aspect Two SSID and first password.
第二方面,提供了一种设备之间建立连接的方法,包括:接收设备向发送设备传递该接收设备的第一热点信息,该第一热点信息包括第一服务集标识SSID;该接收设备接收该发送设备发送的声波信号,该声波信号包括经过编码调制处理的该发送设备的无线保真WI-FI能力信息;该接收设备根据该发送设备的WI-FI能力信息发送第二热点信息,该第二热点信息包括第二SSID;该接收设备接收发送设备根据所述第二热点信息发送的建立WI-FI连接的请求;该接收设备根据该建立WI-FI连接的请求与所述发送设备建立WI-FI连接,该建立WI-FI连接的请求包括第二SSID。In a second aspect, a method for establishing a connection between devices is provided, including: a receiving device transmits first hotspot information of the receiving device to a sending device, the first hotspot information includes a first service set identifier SSID; the receiving device receives The sound wave signal sent by the sending device, where the sound wave signal includes the wireless fidelity WI-FI capability information of the sending device that has undergone encoding and modulation processing; the receiving device sends second hotspot information according to the WI-FI capability information of the sending device, the The second hotspot information includes a second SSID; the receiving device receives a request for establishing a WI-FI connection sent by the sending device according to the second hotspot information; the receiving device establishes with the sending device according to the request for establishing a WI-FI connection WI-FI connection, the request to establish the WI-FI connection includes the second SSID.
结合第二方面,在第二方面的某些实现方式中,该接收设备向发送设备传递该接收设备的第一热点信息,包括:该接收设备生成并显示二维码,该二维码中包括该第一SSID和对应的第一密码;该接收设备通过该二维码向该发送设备传递该第一热点信息。With reference to the second aspect, in some implementations of the second aspect, the receiving device transmitting the first hotspot information of the receiving device to the sending device includes: the receiving device generates and displays a two-dimensional code, the two-dimensional code includes The first SSID and the corresponding first password; the receiving device transmits the first hotspot information to the sending device through the two-dimensional code.
结合第二方面和上述实现方式,在第二方面的某些实现方式中,该接收设备接收该发送设备发送的声波信号之前,该方法还包括:该接收设备向该发送设备发送密钥对的公钥;以及该接收设备接收该发送设备发送的声波信号之后,该方法还包括:该接收设备对该发送设备发送的该声波信号进行解调译码处理,得到经过该公钥加密的该WI-FI能力信息;该接收设备通过与该公钥相对应的私钥,解密得到该WI-FI能力信息。Combining the second aspect and the foregoing implementation manners, in some implementation manners of the second aspect, before the receiving device receives the sound wave signal sent by the sending device, the method further includes: the receiving device sends a key pair to the sending device Public key; and after the receiving device receives the sound wave signal sent by the sending device, the method further includes: the receiving device demodulates and decodes the sound wave signal sent by the sending device to obtain the WI encrypted by the public key -FI capability information; the receiving device decrypts to obtain the WI-FI capability information through the private key corresponding to the public key.
结合第二方面和上述实现方式,在第二方面的某些实现方式中,该WI-FI能力信息包括该发送设备支持的WI-FI标准号、工作频率范围、兼容性、频宽、物理传输速率、调制方式中的至少一种信息。Combining the second aspect and the foregoing implementation manners, in some implementation manners of the second aspect, the WI-FI capability information includes the WI-FI standard number supported by the sending device, working frequency range, compatibility, bandwidth, and physical transmission At least one of rate and modulation method.
结合第二方面和上述实现方式,在第二方面的某些实现方式中,该声波信号的频率大于10kHz。In combination with the second aspect and the foregoing implementation manners, in some implementation manners of the second aspect, the frequency of the acoustic signal is greater than 10 kHz.
结合第二方面和上述实现方式,在第二方面的某些实现方式中,该第一SSID与该第二SSID不同;该第二SSID对应的WI-FI网络的频段适配该发送设备的WI-FI能力信息。Combining the second aspect and the foregoing implementation manners, in some implementation manners of the second aspect, the first SSID is different from the second SSID; the frequency band of the WI-FI network corresponding to the second SSID is adapted to the WI of the sending device -FI capability information.
结合第二方面和上述实现方式,在第二方面的某些实现方式中,该第二SSID对应的WI-FI网络的工作频段为5GHz;该发送设备根据第二热点信息发送的建立WI-FI连接的请求携带第二SSID和第一密码。Combining the second aspect and the foregoing implementation manners, in some implementation manners of the second aspect, the working frequency band of the WI-FI network corresponding to the second SSID is 5GHz; the sending device establishes WI-FI according to the second hotspot information sent The connection request carries the second SSID and the first password.
第三方面,提供了一种发送设备,包括:一个或多个处理器;存储器;以及一个或多个程序,其中该一个或多个程序被存储在该存储器中,当该一个或者多个程序被该处理器执行时,使得该发送设备执行以下步骤:获取接收设备的第一热点信息,该第一热点信息包括第一服务集标识SSID;向接收设备发送声波信号,该声波信号包括经过编码调制处理的无线保真WI-FI能力信息,以使得该接收设备根据该WI-FI能力信息发送接收设备的第二热点信息,该第二热点信息包括第二SSID;根据该第二热点信息发送与该接收设备建立WI-FI连接的请求。In a third aspect, a sending device is provided, including: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory, and when the one or more programs When executed by the processor, the sending device is caused to perform the following steps: acquiring first hot spot information of the receiving device, the first hot spot information including the first service set identifier SSID; sending a sound wave signal to the receiving device, the sound wave signal including the encoded Modulate the processed wireless fidelity WI-FI capability information, so that the receiving device sends second hotspot information of the receiving device according to the WI-FI capability information, and the second hotspot information includes the second SSID; sends according to the second hotspot information A request to establish a WI-FI connection with the receiving device.
结合第三方面,在第三方面的某些实现方式中,当该一个或者多个程序被该处理器执行时,使得该发送设备执行以下步骤:通过扫描接收设备显示的二维码,从该二维码中提取该第一SSID和对应的第一密码。With reference to the third aspect, in some implementations of the third aspect, when the one or more programs are executed by the processor, the sending device is caused to perform the following steps: by scanning the two-dimensional code displayed by the receiving device, from the The first SSID and the corresponding first password are extracted from the two-dimensional code.
结合第三方面和上述实现方式,在第三方面的某些实现方式中,当该一个或者多个程序被该处理器执行时,使得该发送设备执行以下步骤:获取密钥对的公钥;通过该公钥加密该WI-FI能力信息;向接收设备发送的声波信号包括经过编码调制处理,并经过该公钥加密的该WI-FI能力信息。Combining the third aspect and the foregoing implementation manners, in some implementation manners of the third aspect, when the one or more programs are executed by the processor, the sending device is caused to perform the following steps: obtaining the public key of the key pair; The WI-FI capability information is encrypted by the public key; the sound wave signal sent to the receiving device includes the WI-FI capability information that has been encoded and modulated and encrypted by the public key.
结合第三方面和上述实现方式,在第三方面的某些实现方式中,WI-FI能力信息包括该发送设备支持的WI-FI标准号、工作频率范围、兼容性、频宽、物理传输速率、调制方式中的至少一种信息。Combining the third aspect and the foregoing implementation manners, in some implementation manners of the third aspect, the WI-FI capability information includes the WI-FI standard number, operating frequency range, compatibility, bandwidth, and physical transmission rate supported by the sending device , At least one of the modulation methods.
结合第三方面和上述实现方式,在第三方面的某些实现方式中,声波信号的频率大于10kHz。In combination with the third aspect and the foregoing implementation manners, in some implementation manners of the third aspect, the frequency of the acoustic signal is greater than 10 kHz.
结合第三方面和上述实现方式,在第三方面的某些实现方式中,当该一个或者多个程序被该处理器执行时,使得该发送设备执行以下步骤:在向该接收设备发送声波信号时,显示正在发送声波信号的提示界面。Combining the third aspect and the foregoing implementation manners, in some implementation manners of the third aspect, when the one or more programs are executed by the processor, the sending device is caused to perform the following steps: before sending a sound wave signal to the receiving device When, the prompt interface that the sound wave signal is being sent is displayed.
结合第三方面和上述实现方式,在第三方面的某些实现方式中,该第一SSID与该第二SSID不同;该第二SSID对应的WI-FI网络的频段适配该发送设备的WI-FI能力信息。Combining the third aspect and the foregoing implementation manners, in some implementation manners of the third aspect, the first SSID is different from the second SSID; the frequency band of the WI-FI network corresponding to the second SSID is adapted to the WI of the sending device -FI capability information.
结合第三方面和上述实现方式,在第三方面的某些实现方式中,该第二SSID对应的WI-FI网络的工作频段为5GHz;与该接收设备建立WI-FI连接的请求携带该第二SSID和第一密码。Combining the third aspect and the foregoing implementation manners, in some implementation manners of the third aspect, the working frequency band of the WI-FI network corresponding to the second SSID is 5GHz; the request to establish a WI-FI connection with the receiving device carries the first Two SSID and first password.
第四方面,提供了一种接收设备,包括:一个或多个处理器;存储器;以及一个或多个程序,其中该一个或多个程序被存储在该存储器中,当该一个或者多个程序被该处理器执行时,使得该接收设备执行以下步骤:向发送设备传递该接收设备的第一热点信息,该第一热点信息包括第一服务集标识SSID;接收该发送设备发送的声波信号,该声波信号包括经过编码调制处理的该发送设备的无线保真WI-FI能力信息;根据该发送设备的WI-FI能力信息发送第二热点信息,该第二热点信息包括第二SSID;接收发送设备根据所述第二热点信息发送的建立WI-FI连接的请求;根据该建立WI-FI连接的请求与所述发送 设备建立WI-FI连接,该建立WI-FI连接的请求包括第二SSID。In a fourth aspect, a receiving device is provided, including: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory, when the one or more programs When executed by the processor, the receiving device is caused to perform the following steps: transferring the first hotspot information of the receiving device to the sending device, the first hotspot information includes the first service set identifier SSID; receiving the sound wave signal sent by the sending device, The sound wave signal includes the wireless fidelity WI-FI capability information of the sending device that has been encoded and modulated; the second hot spot information is sent according to the WI-FI capability information of the sending device, and the second hot spot information includes the second SSID; The device sends a request to establish a WI-FI connection according to the second hotspot information; establishes a WI-FI connection with the sending device according to the request to establish a WI-FI connection, and the request to establish a WI-FI connection includes the second SSID .
结合第四方面,在第四方面的某些实现方式中,当该一个或者多个程序被该处理器执行时,使得该接收设备执行以下步骤:生成并显示二维码,该二维码中包括该第一SSID和对应的第一密码;该接收设备通过该二维码向该发送设备传递该第一热点信息。With reference to the fourth aspect, in some implementation manners of the fourth aspect, when the one or more programs are executed by the processor, the receiving device is caused to perform the following steps: generate and display a two-dimensional code, where the two-dimensional code is Including the first SSID and the corresponding first password; the receiving device transmits the first hotspot information to the sending device through the two-dimensional code.
结合第四方面和上述实现方式,在第四方面的某些实现方式中,当该一个或者多个程序被该处理器执行时,使得该接收设备执行以下步骤:向发送设备发送密钥对的公钥;对发送设备发送的声波信号进行解调译码处理,得到经过该公钥加密的该WI-FI能力信息;通过与该公钥相对应的私钥,解密得到该WI-FI能力信息。Combining the fourth aspect and the foregoing implementation manners, in some implementation manners of the fourth aspect, when the one or more programs are executed by the processor, the receiving device is caused to perform the following steps: Public key; demodulate and decode the sound wave signal sent by the sending device to obtain the WI-FI capability information encrypted by the public key; decrypt the WI-FI capability information through the private key corresponding to the public key .
结合第四方面和上述实现方式,在第四方面的某些实现方式中,WI-FI能力信息包括该发送设备支持的WI-FI标准号、工作频率范围、兼容性、频宽、物理传输速率、调制方式中的至少一种信息。Combining the fourth aspect and the foregoing implementation manners, in some implementation manners of the fourth aspect, the WI-FI capability information includes the WI-FI standard number supported by the sending device, working frequency range, compatibility, bandwidth, and physical transmission rate , At least one of the modulation methods.
结合第四方面和上述实现方式,在第四方面的某些实现方式中,声波信号的频率大于10kHz。In combination with the fourth aspect and the foregoing implementation manners, in some implementation manners of the fourth aspect, the frequency of the acoustic signal is greater than 10 kHz.
结合第四方面和上述实现方式,在第四方面的某些实现方式中,该第一SSID与该第二SSID不同;该第二SSID对应的WI-FI网络的频段适配该发送设备的WI-FI能力信息。Combining the fourth aspect and the foregoing implementation manners, in some implementation manners of the fourth aspect, the first SSID is different from the second SSID; the frequency band of the WI-FI network corresponding to the second SSID is adapted to the WI of the sending device -FI capability information.
结合第四方面和上述实现方式,在第四方面的某些实现方式中,该第二SSID对应的WI-FI网络的工作频段为5GHz;该发送设备根据第二热点信息发送的建立WI-FI连接的请求携带第二SSID和第一密码。Combining the fourth aspect and the foregoing implementation manners, in some implementation manners of the fourth aspect, the working frequency band of the WI-FI network corresponding to the second SSID is 5GHz; the sending device establishes WI-FI according to the second hotspot information sent The connection request carries the second SSID and the first password.
第五方面,本申请提供了一种电子设备,包括:触摸显示屏,其中,触摸显示屏包括触敏表面和显示器;摄像头;一个或多个处理器;存储器;多个应用程序;以及一个或多个计算机程序。其中,一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令。当指令被电子设备执行时,使得电子设备执行上述任一方面任一项可能的实现中的设备之间建立连接的方法。In a fifth aspect, the present application provides an electronic device, including: a touch display screen, wherein the touch display screen includes a touch-sensitive surface and a display; a camera; one or more processors; a memory; a plurality of application programs; and one or Multiple computer programs. Among them, one or more computer programs are stored in the memory, and the one or more computer programs include instructions. When the instruction is executed by the electronic device, the electronic device is caused to execute the method for establishing a connection between the devices in any one of the possible implementations of the foregoing aspects.
第六方面,本申请提供了一种电子设备,包括一个或多个处理器和一个或多个存储器。该一个或多个存储器与一个或多个处理器耦合,一个或多个存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当一个或多个处理器执行计算机指令时,使得电子设备执行上述任一方面任一项可能的实现中的设备之间建立连接的方法。In a sixth aspect, the present application provides an electronic device including one or more processors and one or more memories. The one or more memories are coupled with one or more processors, and the one or more memories are used to store computer program codes. The computer program codes include computer instructions. When the one or more processors execute the computer instructions, the electronic device executes A method for establishing a connection between devices in any possible implementation of any one of the foregoing aspects.
第七方面,本申请提供了一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行上述任一方面任一项可能的设备之间建立连接的方法。In a seventh aspect, the present application provides a computer storage medium, including computer instructions, which when the computer instructions run on an electronic device, cause the electronic device to perform any one of the foregoing methods for establishing a connection between devices.
第八方面,本申请提供了一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行上述任一方面任一项可能的设备之间建立连接的方法。In an eighth aspect, this application provides a computer program product that, when the computer program product runs on an electronic device, causes the electronic device to execute any one of the foregoing methods for establishing a connection between devices.
附图说明Description of the drawings
图1是本申请提供的一例电子设备的结构示意图。FIG. 1 is a schematic diagram of an example of the structure of an electronic device provided by the present application.
图2是本申请实施例的电子设备的软件结构框图。Fig. 2 is a software structure block diagram of an electronic device according to an embodiment of the present application.
图3是本申请实施例提供的一例设备之间建立连接的图形用户界面示意图。FIG. 3 is a schematic diagram of an example of a graphical user interface for establishing a connection between devices according to an embodiment of the present application.
图4是本申请实施例提供的又一例设备之间建立连接的图形用户界面示意图。FIG. 4 is a schematic diagram of another example of a graphical user interface for establishing a connection between devices according to an embodiment of the present application.
图5是一例新手机和旧手机建立连接的交互示意图。Figure 5 is a schematic diagram of an interaction between a new mobile phone and an old mobile phone to establish a connection.
图6是本申请实施例提供的一例信号编码调制处理过程示意图。Fig. 6 is a schematic diagram of an example of signal coding and modulation processing provided by an embodiment of the present application.
图7是本申请实施例提供的一例电子设备可能的组成示意图。FIG. 7 is a schematic diagram of a possible composition of an example of an electronic device provided by an embodiment of the present application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本申请实施例的描述中,“多个”是指两个或多于两个。The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Among them, in the description of the embodiments of the present application, unless otherwise specified, "/" means or, for example, A/B can mean A or B; "and/or" in this document is only a description of related objects The association relationship of indicates that there can be three kinds of relationships, for example, A and/or B, which can indicate: A alone exists, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "plurality" refers to two or more than two.
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征,例如本申请实施例中的“第一网络”、“第二网络”、“第一信道集合”、“第二信道集合”和“第三信道集合”等。Hereinafter, the terms “first” and “second” are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with “first” and “second” may explicitly or implicitly include one or more of these features, such as “first network”, “second network”, and “second network” in the embodiments of this application. "First channel set", "Second channel set", "Third channel set", etc.
本申请实施例提供了一种在两个电子设备之间建立连接的方法,该方法可以使得两个电子设备快速的建立连接。本申请的电子设备可以是手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等电子设备上,本申请实施例对电子设备的具体类型不作任何限制。The embodiment of the present application provides a method for establishing a connection between two electronic devices, which can enable the two electronic devices to quickly establish a connection. The electronic devices of this application can be mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR)/virtual reality (VR) devices, notebook computers, ultra-mobile personal computers (ultra-mobile personal computers). On electronic devices such as computers, UMPCs), netbooks, and personal digital assistants (personal digital assistants, PDAs), the embodiments of the present application do not impose any restrictions on the specific types of electronic devices.
示例性的,图1是本申请提供的一例电子设备的结构示意图。电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。Exemplarily, FIG. 1 is a schematic structural diagram of an example of electronic equipment provided in this application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2. , Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light Sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in the embodiment 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 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Among them, the different processing units may be independent devices or integrated in one or more processors.
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作 码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 to store instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can store instructions or data that the processor 110 has just used or used cyclically. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface can include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, and a universal asynchronous transmitter (universal asynchronous) interface. receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / Or Universal Serial Bus (USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus, which includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple sets of I2C buses. The processor 110 may couple the touch sensor 180K, the charger, the flash, the camera 193, etc., respectively through different I2C bus interfaces. For example, the processor 110 may couple the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through an I2C bus interface to implement the touch function of the electronic device 100.
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit audio signals to the wireless communication module 160 through an I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus can be a two-way communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function. In some embodiments, the audio module 170 may transmit audio signals to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a Bluetooth headset.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。The MIPI interface can be used to connect the processor 110 with the display screen 194, the camera 193 and other peripheral devices. The MIPI interface includes a camera serial interface (camera serial interface, CSI), a display serial interface (display serial interface, DSI), and so on. In some embodiments, the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate through a DSI interface to realize the display function of the electronic device 100.
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured through software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and so on. The GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface that complies with the USB standard specification, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and so on. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect earphones and play audio through earphones. This interface can also be used to connect to other electronic devices, such as AR devices.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in the embodiment of the present application is merely a schematic description, and does not constitute a structural limitation of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
充电管理模块140用于从充电器接收充电输入。电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The charging management module 140 is used to receive charging input from the charger. The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example: Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna can be used in combination with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform processing such as filtering, amplifying and transmitting the received electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic wave radiation via the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,WI-FI)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器 件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (WI-FI) networks), bluetooth (BT), and global navigation satellites. System (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may also receive the signal to be sent from the processor 110, perform frequency modulation, amplify it, and convert it into electromagnetic waves to radiate through the antenna 2.
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite-based augmentation systems (SBAS).
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos, and the like. The display screen 194 includes a display panel. The display panel can use liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode). AMOLED, flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 194, and N is a positive integer greater than one.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 can realize a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
ISP用于处理摄像头193反馈的数据。摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。The ISP is used to process the data fed back by the camera 193. The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and is projected to the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transfers the electrical signal to the ISP to convert it into a digital image signal. ISP outputs digital image signals to DSP for processing. DSP converts digital image signals into standard RGB, YUV and other formats of image signals. In some embodiments, the electronic device 100 may include one or N cameras 193, and N is a positive integer greater than one.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device 100 may 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, MPEG2, MPEG3, MPEG4, and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, for example, the transfer mode between human brain neurons, it can quickly process input information, and it can also continuously self-learn. Through the NPU, applications such as intelligent cognition of the electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, and so on.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 may 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 the data storage function. For example, save music, video and other files in an external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。The internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. Among them, the storage program area can store an operating system, at least one application program (such as a sound playback function, an image playback function, etc.) required by at least one function. The data storage area can store data (such as audio data, phone book, etc.) created during the use of the electronic device 100. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110, or part of the functional modules of the audio module 170 may be provided in the processor 110.
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。The speaker 170A, also called "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also called "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a call or voice message, it can receive the voice by bringing the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also called "microphone", "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by approaching the microphone 170C through the human mouth, and input the sound signal into the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement noise reduction functions in addition to collecting sound signals. In other embodiments, the electronic device 100 may also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions.
示例性的,在本申请中,利用声波通信技术传输声波信号时,发送设备可以通过麦克风和喇叭传输音频信号,从而将音频信号传递到位于该电子设备附近的另一电子设备,实现设备之间的声波传输。应理解,声波通信技术比较适合短距离、小数据量的传输。在本申请中,声波信号的传输过程中,满足可靠性传输要求的设备之间的作用距离为30cm,当设备之间的距离大于50cm时,几乎无法解码声波信号,因此通过声波通信技术传输WI-FI能力可以抗攻击。换言之,在攻击者无法以过近的距离靠近时,无法解码声波信号获取WI-FI信息,因此将声波通信技术应用于设备之间建立连接的过程,可以保证信息传输的可靠性。Exemplarily, in this application, when the acoustic wave communication technology is used to transmit the acoustic wave signal, the sending device can transmit the audio signal through the microphone and the loudspeaker, so as to transmit the audio signal to another electronic device located near the electronic device to realize the communication between the devices. Transmission of sound waves. It should be understood that the acoustic wave communication technology is more suitable for short-distance, small data transmission. In this application, during the transmission of acoustic signals, the operating distance between devices that meet the requirements of reliable transmission is 30cm. When the distance between the devices is greater than 50cm, it is almost impossible to decode the acoustic signal, so the WI is transmitted through the acoustic wave communication technology. -FI ability can resist attack. In other words, when the attacker cannot approach from too close a distance, the sonic signal cannot be decoded to obtain WI-FI information. Therefore, the application of sonic communication technology to the process of establishing a connection between devices can ensure the reliability of information transmission.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone interface 170D is used to connect wired earphones. The earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
除此之外,在图1示出的电子设备100中,还包括多种传感器,例如压力传感器180A用于感受压力信号,可以将压力信号转换成电信号;陀螺仪传感器180B可以用于确定电子设备100的运动姿态;气压传感器180C用于测量气压。磁传感器180D包括霍尔传感器;加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小;距离传感器180F,用于测量距离,电子设备100可以通过红外或激光测量距离;接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管;环境光传感器180L用于感知环境光亮度,电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度;指纹传感器180H用于采集指纹;温度传感器180J用于检测温度;触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,触摸传感器180K用于检测作用于其上或附近的触摸操作;骨传导传感器180M可以获取振动信号,音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。除了多种传感器之外,电子设备100还包括按键190,例如开机键,音量键等,按键190可以是机械按键,也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。马达191可以产生振动提示,马达191可以用于来电振动提示,也可以用于触摸振动反馈。对于电子设备100可能包括的其他部件或者模块,本申请不再赘述。In addition, the electronic device 100 shown in FIG. 1 also includes a variety of sensors. For example, the pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals; the gyroscope sensor 180B can be used to determine electronic The movement posture of the device 100; the air pressure sensor 180C is used to measure air pressure. The magnetic sensor 180D includes a Hall sensor; the acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (generally three axes); the distance sensor 180F is used to measure the distance, and the electronic device 100 can measure the distance by infrared or laser; The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode; the ambient light sensor 180L is used to perceive the brightness of the ambient light, and the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived brightness of the ambient light; fingerprints The sensor 180H is used to collect fingerprints; the temperature sensor 180J is used to detect temperature; the touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, and the touch sensor 180K is used to detect touches acting on or near it Operation; the bone conduction sensor 180M can obtain the vibration signal, and the audio module 170 can parse the voice signal based on the vibration signal of the acoustic part vibrating bone mass obtained by the bone conduction sensor 180M to realize the voice function. In addition to various sensors, the electronic device 100 also includes a button 190, such as a power-on button, a volume button, etc. The button 190 may be a mechanical button or a touch button. The electronic device 100 may receive key input, and generate key signal input related to user settings and function control of the electronic device 100. The motor 191 can generate vibration prompts, and the motor 191 can be used for incoming call vibrating prompts, and can also be used for touch vibration feedback. For other components or modules that the electronic device 100 may include, this application will not repeat them.
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。应理解,本申请实施例提供的设备之间建立连接的方法可以适用于Android、iOS等系统,该方法与设备的系统平台无依赖关系。这里将以分层架构的Android系统为例,示例性说明电子设备100的一种可能的软件结构。The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. It should be understood that the method for establishing a connection between devices provided in the embodiments of the present application may be applicable to systems such as Android and iOS, and the method has no dependency on the system platform of the device. Here, an Android system with a layered architecture will be taken as an example to illustrate a possible software structure of the electronic device 100.
图2是本申请实施例的电子设备100的软件结构框图。分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。应用程序层可以包括一系列应用程序包。FIG. 2 is a software structure block diagram of the electronic device 100 according to an embodiment of the present application. The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Communication between layers through software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and system library, and the kernel layer. The application layer can include a series of application packages.
如图2所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,短信息、图库、通话以及本申请实施例提供的手机克隆等应用程序。As shown in FIG. 2, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, short message, gallery, call, and mobile phone clone provided in the embodiment of the application.
在本申请中,可以将电子设备的声波通信功能独立集成为一个应用共享库,当用户在应用程序层启动手机克隆的应用程序之后,可以调用该应用共享库,从而调用声波通信的功能。应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。具体地,在本申请的设备之间建立连接的过程中,调用应用共享库之后,可以调用应用程序框架层的任意接口,该任意接口可以是系统的原生接口或者新增的其他功能接口,以实现实施例提供的设备之间建立连接的方法。In this application, the acoustic wave communication function of the electronic device can be independently integrated into an application shared library. After the user starts the mobile phone cloned application at the application layer, the application shared library can be called to call the acoustic wave communication function. The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. Specifically, in the process of establishing a connection between the devices of the present application, after calling the application shared library, any interface of the application framework layer can be called. The arbitrary interface can be the native interface of the system or other newly added functional interfaces. The method for establishing a connection between devices provided in the embodiment is implemented.
应用程序框架层还可以包括一些预先定义的函数。The application framework layer can also include some predefined functions.
如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。As shown in Figure 2, the application framework layer can include a window manager, a content provider, a view system, a phone manager, a resource manager, and a notification manager.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。The window manager is used to manage window programs. The window manager can obtain the size of the display, determine whether there is a status bar, lock the screen, take a screenshot, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。The content provider is used to store and retrieve data and make these data accessible to applications. The data may include videos, images, audios, phone calls made and received, browsing history and bookmarks, phone book, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls that display text, controls that display pictures, and so on. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface that includes a short message notification icon may include a view that displays text and a view that displays pictures.
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide the communication function of the electronic device 100. For example, the management of the call status (including connecting, hanging up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and it can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, and so on. The notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or a scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, text messages are prompted in the status bar, prompt sounds, electronic devices vibrate, and indicator lights flash.
Android runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one part is the function functions that the java language needs to call, and the other part is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in a virtual machine. The virtual machine executes the java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(media libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。The system library can include multiple functional modules. For example: surface manager (surface manager), media library (media libraries), 3D graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provides a combination of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to realize 3D graphics drawing, image rendering, synthesis, and layer processing.
2D图形引擎是2D绘图的绘图引擎。The 2D graphics engine is a drawing engine for 2D drawing.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
示例性的,在本申请的设备之间建立连接的过程中,调用应用共享库之后,该应用共享库可以进一步调用应用程序框架层的任意接口。例如,内容提供器可以获取WI-FI能力信息,并生成音频信号,应用共享库从内容管理器获取音频信号,经过应用共享库内部集成的调制编码处理后,调用内核层的音频驱动,将音频信号以声波的方式发送出去,本申请对应用程序层和应用程序框架层的任意接口之间的协同工作方式不做限定。Exemplarily, in the process of establishing a connection between the devices of the present application, after the application shared library is called, the application shared library may further call any interface of the application framework layer. For example, the content provider can obtain WI-FI capability information and generate audio signals. The shared library is used to obtain audio signals from the content manager. After the modulation and coding process integrated in the shared library, the audio driver at the core layer is called to convert the audio The signal is sent out in the form of sound waves, and this application does not limit the cooperative working mode between the application layer and any interface of the application framework layer.
应理解,在本申请的设备之间建立连接的过程中,可以由设备的应用程序层的应用调用其他各层的功能,借用设备的能力,实现连接过程,并传输数据。It should be understood that in the process of establishing a connection between the devices of the present application, the application of the application layer of the device can call the functions of other layers, borrow the capabilities of the device, implement the connection process, and transmit data.
示例性的,在本申请的设备之间建立连接之后,调用应用程序框架层的任意接口,获取旧手机的数据,例如联系人、图片、视频文件等数据,将获取的数据传输给新手机。Exemplarily, after a connection is established between the devices of the present application, any interface of the application framework layer is called to obtain data of the old mobile phone, such as data such as contacts, pictures, and video files, and transfer the obtained data to the new mobile phone.
为了便于理解,本申请以下实施例将以具有图1和图2所示结构的电子设备为例,结合附图和应用场景,以新手机和旧手机之间的数据迁移、手机克隆为例,对本申请实施例提供的设备之间建立连接的方法进行具体阐述。For ease of understanding, the following embodiments of the present application will take the electronic device with the structure shown in FIG. 1 and FIG. 2 as an example, combined with the accompanying drawings and application scenarios, taking data migration between a new mobile phone and an old mobile phone, and mobile phone cloning as an example. The method for establishing a connection between devices provided in the embodiments of the present application is specifically described.
图3是本申请实施例提供的一例设备之间建立连接的图形用户界面(graphical user interface,GUI)的示意图,本申请将以手机作为电子设备,具体地,以用户更换手机并在两台手机之间进行数据传输为例,详细介绍本申请提供的设备之间的建立连接的方法Figure 3 is a schematic diagram of an example of a graphical user interface (GUI) for establishing a connection between devices provided by an embodiment of the present application. This application will use a mobile phone as an electronic device. Specifically, the user changes the mobile phone and connects two mobile phones. For example, the method for establishing a connection between the devices provided in this application is introduced in detail.
在新手机和旧手机传输数据的过程中,可以执行如图3中示出的操作。其中,图3中的(a)图示出了手机的解锁模式下,手机的屏幕显示系统显示了当前输出的主界面301,该主界面301显示了多款应用程序(application,App),例如相册、音乐、设置、手机克隆等。应理解,界面内容301还可以包括其他更多的应用程序,本申请对此不作限定。In the process of transferring data between the new mobile phone and the old mobile phone, operations as shown in FIG. 3 can be performed. Wherein, Figure 3(a) shows that in the unlock mode of the mobile phone, the screen display system of the mobile phone displays the main interface 301 currently output, and the main interface 301 displays a variety of applications (application, App), for example Albums, music, settings, phone cloning, etc. It should be understood that the interface content 301 may also include other more application programs, which is not limited in this application.
具体地,图3示出了在设备之间建立连接过程中新手机的图形用户界面示意图。如图3中的(a)图所示,用户可以点击主界面301的“手机克隆”,响应于用户的点击操作,手机显示如图3中的(b)图所示的界面302。该界面302可以用于用户对当前的手机进行设置,例如,在新手机上点击“这是新手机”选项,将当前手机设置为开启热点的手机,用于接收数据。如图3中的(b)图所示,用户点击“这是新手机”选项之后,进入图3中的(c)图所示的界面303,该界面303用于用户选择旧手机的类型,例如旧手机为华为手机,则点击“华为”选项,用户可以根据旧手机的类型选择相对应的选项。Specifically, FIG. 3 shows a schematic diagram of a graphical user interface of a new mobile phone in the process of establishing a connection between devices. As shown in (a) in FIG. 3, the user can click on the "mobile phone clone" on the main interface 301, and in response to the user's click operation, the mobile phone displays an interface 302 as shown in (b) in FIG. The interface 302 can be used for the user to set the current mobile phone, for example, click the "This is a new mobile phone" option on the new mobile phone to set the current mobile phone as a mobile phone with a hotspot for receiving data. As shown in Figure 3 (b), after the user clicks on the "This is a new phone" option, the user enters the interface 303 shown in Figure 3 (c). This interface 303 is used for the user to select the type of old mobile phone. For example, if the old mobile phone is a Huawei mobile phone, click the "Huawei" option, and the user can select the corresponding option according to the type of the old mobile phone.
响应于用户的点击操作,手机进入图3中的(d)图所示的界面304,该界面304包括新手机为旧手机提供的用于WI-FI连接的二维码和连接密码,旧手机可以通过扫描该界面304的二维码并输入连接密码,连接到新手机的热点,从而和新手机建立WI-FI连接。在该界面304上,还可以包括更多的提示信息,例如“在旧手机打开手机克隆,选择这是旧手机,扫描下方二维码建立连接”、“如扫描二维码无法连接,请在旧手机扫码界面下方点击手动连接”、“若旧手机未安装手机克隆,请点击此处安装”等提示信息,用于指导用户操作,本申请对界面内容包括的提示信息的内容和数量不做限定。图4示出了在设备之间建立连接过程中旧手机的图形用户界面示意图。如图4中的(a)图所示,用户可以点击旧手机主界面401的“手机克隆”,响应于用户的点击操作,手机显示如图4中的(b)图所示的界面402。该界面402可以用于用户对当前的手机进行设置,例如,在旧手机界面402上点击“这是旧手机”选项,将当前手机设置为连接热点的旧手机,用于发送数据。如图4中的(b)图所示,用户点击“这是旧手机”选项之后,进入图4中的(c)图所示的界面404,该界面404用于用户扫描新手机界面304的二维码,连接到新手机的热点,从而和新手机建立WI-FI连接。In response to the user's click operation, the mobile phone enters the interface 304 shown in Figure 3 (d). The interface 304 includes the QR code and connection password for the WI-FI connection provided by the new mobile phone for the old mobile phone. The old mobile phone You can connect to the hotspot of the new mobile phone by scanning the QR code of the interface 304 and input the connection password, thereby establishing a WI-FI connection with the new mobile phone. On this interface 304, you can also include more prompt messages, such as "Open the phone clone on the old phone, select this is the old phone, scan the QR code below to establish a connection", "If you cannot connect by scanning the QR code, please click At the bottom of the scan code interface of the old mobile phone, click manual connection", "If the old mobile phone does not have a mobile phone clone, please click here to install" and other prompt messages are used to guide the user's operation. This application does not control the content and quantity of the prompt information included in the interface content. Make a limit. Figure 4 shows a schematic diagram of the graphical user interface of the old mobile phone in the process of establishing a connection between the devices. As shown in (a) in FIG. 4, the user can click on "Mobile Clone" on the main interface 401 of the old mobile phone. In response to the user's click operation, the mobile phone displays an interface 402 as shown in (b) in FIG. 4. This interface 402 can be used for the user to set the current mobile phone. For example, click the "This is an old mobile phone" option on the old mobile phone interface 402 to set the current mobile phone as an old mobile phone connected to a hotspot for sending data. As shown in Figure 4 (b), after the user clicks the "This is an old phone" option, the user enters the interface 404 shown in Figure 4 (c), which is used by the user to scan the interface 304 of the new mobile phone. QR code to connect to the hotspot of the new mobile phone to establish a WI-FI connection with the new mobile phone.
如图4中的(d)图所示,旧手机扫描了图3中的(d)图示出的新手机的二维码之后,显示为新手机和旧手机建立连接的过程。在旧手机的显示界面404上,包括用于提示用户当前旧手机状态的提示信息,例如“正在连接新手机”或者“正在通过声波连接”等。此外,该显示界面404上还可以包括用于展示当前新手机和旧手机连接过程的动图,例如声波的动态波纹等,该动态波纹可以以闪烁的形式呈现在显示界面404上,本申请对此不做限定。As shown in (d) in FIG. 4, after the old mobile phone scans the QR code of the new mobile phone shown in (d) in FIG. 3, it shows the process of establishing a connection between the new mobile phone and the old mobile phone. The display interface 404 of the old mobile phone includes prompt information for prompting the user of the current state of the old mobile phone, such as "connecting to a new mobile phone" or "connecting through sound waves". In addition, the display interface 404 may also include animations for showing the connection process of the current new mobile phone and the old mobile phone, such as dynamic ripples of sound waves, etc. The dynamic ripples may be presented on the display interface 404 in the form of flashing. This is not limited.
当新手机和旧手机建立WI-FI连接之后,新手机可以跳转至图3中的(e)图所示的 界面305,该界面305用于提示用户新手机和旧手机已经建立连接。After the WI-FI connection between the new mobile phone and the old mobile phone is established, the new mobile phone can jump to the interface 305 shown in Figure 3 (e), which is used to prompt the user that the new mobile phone and the old mobile phone have established a connection.
相应地,在旧手机上,可以跳转显示如图4中的(e)图所示的界面405,该界面405包括当前可以传输到新手机的数据列表,例如联系人、信息、通话记录、录音、图片等不同数据类型,用户通过点击选中数据列表中需要传输到新手机的数据,再点击“开始迁移”选项,响应于用户的迁移操作,旧手机的数据发送到新手机。Correspondingly, on the old mobile phone, the interface 405 shown in Figure 4 (e) can be jumped to display. The interface 405 includes a list of data that can currently be transferred to the new mobile phone, such as contacts, information, call history, For different data types such as recordings and pictures, the user selects the data in the data list that needs to be transferred to the new mobile phone, and then clicks the "Start Migration" option. In response to the user's migration operation, the data from the old mobile phone is sent to the new mobile phone.
以上介绍了新手机和旧手机建立WI-FI连接时,用户的操作过程,图5是一例新手机和旧手机建立WIFI连接的交互示意图。其中,新手机10作为热点,也可以称为接入点(access point,AP),旧手机20作为连接热点的站点(station),如图5所示,包括以下步骤:The above introduces the user's operation process when the new mobile phone and the old mobile phone establish a Wi-Fi connection. Figure 5 is an example of interaction diagram of the new mobile phone and the old mobile phone to establish a WIFI connection. Among them, the new mobile phone 10 is used as a hotspot, which can also be called an access point (access point, AP), and the old mobile phone 20 is used as a station to connect to the hotspot, as shown in FIG. 5, which includes the following steps:
501,新手机10通过生成并显示二维码,向旧手机20传递新手机10的第一热点信息。501. The new mobile phone 10 transmits the first hotspot information of the new mobile phone 10 to the old mobile phone 20 by generating and displaying a two-dimensional code.
502,旧手机20扫描新手机10的二维码,获取新手机10的第一热点信息。502. The old mobile phone 20 scans the two-dimensional code of the new mobile phone 10 to obtain the first hotspot information of the new mobile phone 10.
可选地,该新手机10的热点信息可以包括服务集标识(service set identifier,SSID)信息。其中,SSID包含了服务区别标识(extended service set identifier,ESSID)和基础架构服务集标识(basic service set identifier,BSSID),用来区分不同的网络,SSID可以理解为就是一个局域网的名称,最多可以有32个字符,旧手机20通过扫描新手机10提供的二维码获取新手机10的热点信息。在本申请中,新手机10的第一热点信息包括第一SSID。Optionally, the hotspot information of the new mobile phone 10 may include service set identifier (SSID) information. Among them, the SSID includes the extended service set identifier (ESSID) and the basic service set identifier (BSSID), which are used to distinguish different networks. The SSID can be understood as the name of a local area network. There are 32 characters. The old mobile phone 20 obtains the hotspot information of the new mobile phone 10 by scanning the two-dimensional code provided by the new mobile phone 10. In this application, the first hotspot information of the new mobile phone 10 includes the first SSID.
在步骤501中,新手机10通过将第一SSID、WI-FI密码信息合成一个二维码,并如图3中的(d)图所示显示在新手机10上,旧手机20通过扫描该二维码获取新手机10的第一热点信息。In step 501, the new mobile phone 10 synthesizes a two-dimensional code by combining the first SSID and WI-FI password information, and displays it on the new mobile phone 10 as shown in Figure 3 (d), and the old mobile phone 20 scans the QR code. The two-dimensional code obtains the first hot spot information of the new mobile phone 10.
此外,在一种可能的实现方式中,新手机10还可以通过声波通信技术将新手机10的热点信息发送给旧手机20。In addition, in a possible implementation manner, the new mobile phone 10 may also send the hotspot information of the new mobile phone 10 to the old mobile phone 20 through the acoustic wave communication technology.
或者,在另一种可能的实现方式中,新手机10还可以通过蓝牙通信技术的方式将第一网络热点的信息发送给旧手机20。Or, in another possible implementation manner, the new mobile phone 10 may also send the information of the first network hotspot to the old mobile phone 20 by way of Bluetooth communication technology.
503,旧手机20通过声波通信技术,向新手机10发送WI-FI能力信息。503. The old mobile phone 20 sends WI-FI capability information to the new mobile phone 10 through the acoustic wave communication technology.
在步骤501-502中,旧手机20通过扫描二维码获取新手机10发送的新手机10的第一热点信息,然后将旧手机20自身的WI-FI能力信息传递给新手机10。当旧手机20扫描新手机10的二维码之后,可以向新手机10发送声波信号,换言之,旧手机20通过扫描新手机10的二维码,触发旧手机20向新手机发送声波信号,该声波信号包括旧手机20的WI-FI能力信息。In steps 501 to 502, the old mobile phone 20 obtains the first hotspot information of the new mobile phone 10 sent by the new mobile phone 10 by scanning the two-dimensional code, and then transmits the WI-FI capability information of the old mobile phone 20 itself to the new mobile phone 10. After the old mobile phone 20 scans the QR code of the new mobile phone 10, it can send a sound wave signal to the new mobile phone 10. In other words, the old mobile phone 20 scans the QR code of the new mobile phone 10 to trigger the old mobile phone 20 to send the sound wave signal to the new mobile phone. The sound wave signal includes WI-FI capability information of the old mobile phone 20.
应理解,声波通信技术比较适合短距离、小数据量的传输,由于其传送的数据包相对较少,可以实现短时间内(1s~2s)内近距离的成功传输。在本申请中,可以基于声波通信技术的低成本、轻量级传输、消耗时间短的特点,实现设备之间建立WI-FI连接的过程。此外,在本申请中声波信号的传输过程中,满足可靠性传输要求的作用距离为30cm,当新手机和旧手机之间的距离大于50cm时,几乎无法解码声波信号。由于声波信号的能量在空气中随着距离的增大而衰减,从而通过声波通信技术天然的可以抗攻击。换言之,在攻击者无法以过近的距离靠近时,无法解码声波信号获取WI-FI信息,因此将声波通信技术应用于设备之间建立连接的过程,可以保证信息传输的可靠性,例如,应用于新手机和旧手机之间的数据迁移、手机克隆等。It should be understood that the acoustic wave communication technology is more suitable for short-distance, small data transmission, and because it transmits relatively few data packets, it can achieve successful short-distance transmission within a short period of time (1s-2s). In this application, the process of establishing a WI-FI connection between devices can be realized based on the low-cost, lightweight transmission, and short time-consuming characteristics of acoustic wave communication technology. In addition, in the transmission process of the acoustic signal in this application, the operating distance that meets the requirement of reliable transmission is 30 cm. When the distance between the new mobile phone and the old mobile phone is greater than 50 cm, it is almost impossible to decode the acoustic signal. Since the energy of the sound wave signal is attenuated in the air as the distance increases, the sound wave communication technology can naturally resist attacks. In other words, when the attacker cannot get too close, he cannot decode the sound wave signal to obtain WI-FI information. Therefore, applying the sound wave communication technology to the process of establishing a connection between devices can ensure the reliability of information transmission. For example, application It is used for data migration, phone cloning, etc. between new and old phones.
可选地,WI-FI能力信息可以包括WI-FI标准号、工作频率范围、兼容性、频宽、物理传输速率、调制方式等至少一种信息,本申请对此不做限定。Optionally, the WI-FI capability information may include at least one type of information such as WI-FI standard number, operating frequency range, compatibility, bandwidth, physical transmission rate, and modulation mode, which is not limited in this application.
示例性的,表1列出了旧手机20的WI-FI能力信息可以包括的内容。Exemplarily, Table 1 lists the content that the WI-FI capability information of the old mobile phone 20 may include.
表1Table 1
Figure PCTCN2020102530-appb-000001
Figure PCTCN2020102530-appb-000001
具体地,表1中的WI-FI标准号,可以是电气和电子工程师学会(Institute for Electrical and Electronic Engineers,IEEE)的相关标准,例如IEEE802.11n,IEEE802.11ac等;工作频率范围可以是2.4GHz-2.4835GHz的频段范围,或者5.150GHz-5.850GHz等频段范围;兼容性,即旧手机可以兼容的WI-FI版本,这里不再赘述。Specifically, the WI-FI standard number in Table 1 may be related standards of the Institute for Electrical and Electronic Engineers (IEEE), such as IEEE802.11n, IEEE802.11ac, etc.; the working frequency range may be 2.4 The frequency range of GHz-2.4835GHz, or the frequency range of 5.150GHz-5.850GHz; compatibility, that is, the WI-FI version that old mobile phones can be compatible with, so I won’t go into details here.
在本申请中,2.4GHz的WI-FI连接的工作频段可以是2.4GHz-2.4835GHz的频段范围,5GHz的WI-FI连接的工作频段可以是5.150GHz-5.850GHz等频段范围。例如,在本申请中,旧手机20的WI-FI能力信息指示旧手机20可以支持2.4GHz的WI-FI连接且支持5GHz的WI-FI连接。In this application, the working frequency band of 2.4GHz WI-FI connection may be in the frequency range of 2.4GHz-2.4835GHz, and the working frequency band of 5GHz WI-FI connection may be in the frequency range of 5.150GHz-5.850GHz. For example, in this application, the WI-FI capability information of the old mobile phone 20 indicates that the old mobile phone 20 can support 2.4 GHz WI-FI connection and 5 GHz WI-FI connection.
在本申请中,第一热点信息包括第一SSID,第二热点信息包括所述第二SSID,且第一SSID与第二SSID不同。In this application, the first hotspot information includes the first SSID, the second hotspot information includes the second SSID, and the first SSID is different from the second SSID.
可选地,第二SSID对应的WI-FI网络的频段适配旧手机20的WI-FI能力信息,例如第二SSID对应的WI-FI网络的工作频段为5GHz,第一SSID对应的WI-FI网络的工作频段为2.4GHz。Optionally, the frequency band of the Wi-Fi network corresponding to the second SSID is adapted to the Wi-Fi capability information of the old mobile phone 20. For example, the working frequency band of the Wi-Fi network corresponding to the second SSID is 5 GHz, and the Wi-Fi network corresponding to the first SSID is 5 GHz. The working frequency band of FI network is 2.4GHz.
示例性的,以WI-FI能力信息包括WI-FI的工作频率范围和频宽为例,旧手机20将自身支持的工作频率范围和频宽通过声波通信的方式发送给新手机10,新手机就可以获取旧手机20支持的工作频率范围和频宽,从而确定该工作频率范围内的可用信道集合。Exemplarily, taking the WI-FI capability information including the working frequency range and bandwidth of WI-FI as an example, the old mobile phone 20 sends the working frequency range and bandwidth supported by itself to the new mobile phone 10 through sound wave communication. The new mobile phone The working frequency range and bandwidth supported by the old mobile phone 20 can be obtained, so as to determine the set of available channels within the working frequency range.
应理解,新手机10可以为旧手机20提供不同的工作频段,例如当前WI-FI的常用工作频段为2.4GHz频段和5GHz频段。其中,5GHz频段相比2.4GHz频段的干扰小,速率快,在传输同样多的数据时,5GHz频段省电,并且用户体验好。目前5GHz频段的覆盖 率比2.4GHz频段的覆盖率低,具体地,2.4GHz频段和5GHz频段两者的优缺点如表2所示。It should be understood that the new mobile phone 10 can provide different working frequency bands for the old mobile phone 20. For example, the current common working frequency bands of WI-FI are 2.4 GHz frequency band and 5 GHz frequency band. Among them, the 5GHz frequency band has less interference and a faster rate than the 2.4GHz frequency band. When the same amount of data is transmitted, the 5GHz frequency band saves power and has a good user experience. The coverage rate of the current 5GHz frequency band is lower than that of the 2.4GHz frequency band. Specifically, the advantages and disadvantages of both the 2.4GHz frequency band and the 5GHz frequency band are shown in Table 2.
表2Table 2
Figure PCTCN2020102530-appb-000002
Figure PCTCN2020102530-appb-000002
根据表2可知,由于5GHz频段的干扰小,带宽足够宽,可以支持更高的传输速率,但是5GHz频段的覆盖率还不够高,不是所有的手机都可以支持5GHz频段的传输。当旧手机20支持5GHz的WI-FI连接时,优先和新手机10建立5GHz的WI-FI连接,可以保证更高的传输速率。According to Table 2, due to the small interference in the 5GHz frequency band, the bandwidth is wide enough to support higher transmission rates, but the coverage rate of the 5GHz frequency band is not high enough, and not all mobile phones can support the transmission of the 5GHz frequency band. When the old mobile phone 20 supports a 5GHz WI-FI connection, a 5GHz WI-FI connection is established with the new mobile phone 10 first, which can ensure a higher transmission rate.
可选地,旧手机20将WI-FI能力信息经过编码调制处理,利用声波发送该经过编码调制处理的WI-FI能力信息。Optionally, the old mobile phone 20 subjects the WI-FI capability information to encoding and modulation processing, and transmits the encoded and modulated WI-FI capability information using sound waves.
图6是本申请实施例提供的一例信号编码调制处理过程示意图。示例性的,在旧手机20获取新手机10的第一热点信息之后,旧手机20可以将包含自身的WI-FI能力信息进行过编码调制处理。例如图6所示,旧手机20的WI-FI能力信息可以依次编码调制、时频转换等信号处理过程,将处理后的信息通过声波的方式发送到新手机10。Fig. 6 is a schematic diagram of an example of signal coding and modulation processing provided by an embodiment of the present application. Exemplarily, after the old mobile phone 20 obtains the first hotspot information of the new mobile phone 10, the old mobile phone 20 may perform coding and modulation processing on the WI-FI capability information containing itself. For example, as shown in FIG. 6, the WI-FI capability information of the old mobile phone 20 can be sequentially encoded and modulated, time-frequency conversion, and other signal processing processes, and the processed information is sent to the new mobile phone 10 by means of sound waves.
具体地,WI-FI能力信息可以经过循环冗余校验码(cyclic redundancy check,CRC)校验、信道编码、调制、时频变换等,将处理后的信息通过声波的方式发送到新手机10。其中,信道编码可以通过卷积码的形式,调制过程例如可以通过多进制差分相移键控(quadrature differential phase shift keying,QPSK)进行调制,时频变换可以将调制后的信号通过快速傅里叶逆变换(inverse fast Fourier transform,IFFT)后,生成待发送的音频流,由旧手机20的音频器件(如图1中电子设备100的音频模块170等)发出。Specifically, the WI-FI capability information can undergo cyclic redundancy check (CRC) check, channel coding, modulation, time-frequency conversion, etc., and the processed information can be sent to the new mobile phone by means of sound waves 10 . Among them, the channel coding can be in the form of convolutional codes. The modulation process can be modulated by, for example, multi-ary differential phase shift keying (quadrature differential phase shift keying, QPSK). Time-frequency transform can pass the modulated signal through fast Fourier. After an inverse fast Fourier transform (IFFT), an audio stream to be sent is generated and sent by the audio device of the old mobile phone 20 (such as the audio module 170 of the electronic device 100 in FIG. 1).
相应地,在热点侧,新手机10接收到旧手机20的音频器件发出音频信号后,进行信号处理的逆过程。例如,对接收的音频信号进行时频转换,再进行解调、信道译码、CRC校验后得到原始的比特信息。其中,解调可以理解为调制的逆过程,信道译码可以理解为信道编码的逆过程,换言之,在旧手机20端如何生成包含自身的WI-FI能力信息的音频信号,在新手机10端通过相应地逆过程解析音频信号,从而得到旧手机20的WI-FI能力信息。Correspondingly, on the hotspot side, after the new mobile phone 10 receives the audio signal from the audio device of the old mobile phone 20, the inverse process of signal processing is performed. For example, time-frequency conversion is performed on the received audio signal, demodulation, channel decoding, and CRC check are performed to obtain the original bit information. Among them, demodulation can be understood as the inverse process of modulation, and channel decoding can be understood as the inverse process of channel coding. In other words, how to generate an audio signal containing its own WI-FI capability information on the old mobile phone 20? The audio signal is analyzed through the corresponding reverse process, thereby obtaining the WI-FI capability information of the old mobile phone 20.
可选地,本申请通过声波通信技术发送WI-FI能力信息时,该声波信号的频率大于10kHz。Optionally, when the present application sends the WI-FI capability information through the acoustic wave communication technology, the frequency of the acoustic wave signal is greater than 10 kHz.
此外,在旧手机20向新手机10发送声波信号时,旧手机20可以显示正在发送声波信号的提示界面。示例性的,旧手机20可以显示如图4中的(d)图所示的提示界面。通过上述技术方案,旧手机20利用声波通信技术将自身的WI-FI能力信息传递给新手机10, 声波通信技术所使用的频段为10KHz以上的高频段,避开了人发出声音所处的0~6KHz的频段,这样可以减少了应用场景中的带内干扰,保证声波传输的成功率,提升旧手机和新手机之间传输的可靠性。In addition, when the old mobile phone 20 sends a sound wave signal to the new mobile phone 10, the old mobile phone 20 may display a prompt interface indicating that the sound wave signal is being sent. Exemplarily, the old mobile phone 20 may display a prompt interface as shown in (d) in FIG. 4. Through the above technical solution, the old mobile phone 20 uses the acoustic wave communication technology to transmit its own WI-FI capability information to the new mobile phone 10. The frequency band used by the acoustic wave communication technology is a high frequency band above 10KHz, which avoids the place where people make sounds. ~6KHz frequency band, which can reduce in-band interference in application scenarios, ensure the success rate of sound wave transmission, and improve the reliability of transmission between old and new mobile phones.
可选地,在旧手机20向新手机10发送自身的WI-FI能力信息的过程中,新手机10可以在一定时段内监听旧手机20的音频信号。Optionally, when the old mobile phone 20 sends its own WI-FI capability information to the new mobile phone 10, the new mobile phone 10 may monitor the audio signal of the old mobile phone 20 within a certain period of time.
示例性的,当旧手机20获取新手机10的热点信息之后,新手机10在5秒内监听旧手机20是否发送音频信号。当5秒之后,新手机10可以默认为旧手机20没有发送音频信号。Exemplarily, after the old mobile phone 20 obtains the hotspot information of the new mobile phone 10, the new mobile phone 10 monitors whether the old mobile phone 20 sends an audio signal within 5 seconds. After 5 seconds, the new mobile phone 10 may default to the old mobile phone 20 not sending an audio signal.
504,新手机10接收旧手机20发送的声波信号,解码获取旧手机的WI-FI能力信息,根据旧手机20的WI-FI能力信息发送第二热点信息,第二热点信息包括第二SSID。504. The new mobile phone 10 receives the sound wave signal sent by the old mobile phone 20, decodes and obtains the WI-FI capability information of the old mobile phone, and sends second hotspot information according to the WI-FI capability information of the old mobile phone 20. The second hotspot information includes the second SSID.
可选地,第二SSID对应的WI-FI网络的工作频段为5GHz,第一SSID对应的WI-FI网络的工作频段为2.4GHz。Optionally, the working frequency band of the Wi-Fi network corresponding to the second SSID is 5 GHz, and the working frequency band of the Wi-Fi network corresponding to the first SSID is 2.4 GHz.
示例性的,新手机10确定旧手机20支持5GHz的WI-FI连接,向旧手机20发送该5GHz的WI-FI热点。Exemplarily, the new mobile phone 10 determines that the old mobile phone 20 supports a 5GHz WI-FI connection, and sends the 5GHz Wi-FI hotspot to the old mobile phone 20.
在本申请中,通过步骤503-504,旧手机20利用声波通信技术将自身的WI-FI能力信息传递给新手机10,新手机可以知道旧手机20支持的5GHz的WI-FI连接,此时,新手机10直接开启5GHz的WI-FI热点,并向旧手机20发送5GHz的WI-FI热点信息,即发送5GHz的WI-FI网络的SSID。In this application, through steps 503-504, the old mobile phone 20 uses acoustic wave communication technology to transmit its own WI-FI capability information to the new mobile phone 10. The new mobile phone can know the 5GHz WI-FI connection supported by the old mobile phone 20. , The new mobile phone 10 directly turns on the 5GHz WI-FI hotspot, and sends the 5GHz WI-FI hotspot information to the old mobile phone 20, that is, sends the SSID of the 5GHz WI-FI network.
应理解,当新手机10开启5GHz的WI-FI热点之后,从用户角度,无需重新扫描二维码进行连接,只需要切换旧手机20和新手机10之间的通信信道即可。It should be understood that after the new mobile phone 10 turns on the 5GHz WI-FI hotspot, from the user's perspective, there is no need to rescan the QR code to connect, only the communication channel between the old mobile phone 20 and the new mobile phone 10 needs to be switched.
505,旧手机20扫描周边的5GHz的WI-FI热点,并扫描到新手机10发送的该5GHz的WI-FI热点的SSID,发送连接请求以新手机10建立5GHz的WI-FI连接。505, the old mobile phone 20 scans the surrounding 5GHz WI-FI hotspot, scans the SSID of the 5GHz WI-FI hotspot sent by the new mobile phone 10, and sends a connection request to establish a 5GHz WI-FI connection with the new mobile phone 10.
可以理解,旧手机20扫描SSID和发送连接请求的过程可以参考现有技术中建立WI-FI连接的相关实现,本发明实施例对此不做限定。该5GHz的WI-FI连接可以是不需要密码接入的,也可以是需要密码才能接入的。It can be understood that the process of scanning the SSID and sending the connection request by the old mobile phone 20 can refer to the related implementation of establishing a WI-FI connection in the prior art, which is not limited in the embodiment of the present invention. The 5GHz WI-FI connection can be accessed without a password or can be accessed only with a password.
对于需要使用密码的方式,可以使用获取的使用2.4GHz的WI-FI连接的密码。即,旧手机发送的连接请求中携带5GHz的WI-FI热点的SSID和2.4GHz的WI-FI连接的密码,新手机可基于5GHz的WI-FI网络的SSID和2.4GHz的WI-FI连接的密码通过验证。For methods that require a password, you can use the obtained password for the 2.4GHz WI-FI connection. That is, the connection request sent by the old mobile phone carries the SSID of the 5GHz Wi-Fi hotspot and the password of the 2.4GHz Wi-Fi connection, and the new mobile phone can be connected based on the SSID of the 5GHz Wi-Fi network and the 2.4GHz Wi-Fi connection. The password is verified.
506,旧手机20和新手机10通过5GHz频段的信道传输数据。506, the old mobile phone 20 and the new mobile phone 10 transmit data through a channel in the 5 GHz frequency band.
通过上述流程,新手机10不需要先和旧手机20建立2.4GHz频段的WI-Fi连接,就可以直接获取旧手机20的WI-FI能力信息,新手机10确定旧手机20的能力信息之后,可以进行能力交集信息的验证过程。Through the above process, the new mobile phone 10 does not need to establish a 2.4GHz Wi-Fi connection with the old mobile phone 20 first, and can directly obtain the Wi-Fi capability information of the old mobile phone 20. After the new mobile phone 10 determines the capability information of the old mobile phone 20, The verification process of capability intersection information can be carried out.
示例性的,新手机10支持的第一通信信道集合,旧手机20支持的第二通信信道集合,第一通信信道集合和第二通信信道集合之间的交集,我们称为“第三通信信道”,如果第三通信信道种包括的5GHz频段的信道,则新手机10和旧手机20可以确定双方都可以支持5GHz频段的WI-FI连接。Exemplarily, the first communication channel set supported by the new mobile phone 10, the second communication channel set supported by the old mobile phone 20, and the intersection between the first communication channel set and the second communication channel set, we call it the "third communication channel" "If the third communication channel type includes a channel in the 5 GHz frequency band, the new mobile phone 10 and the old mobile phone 20 can determine that both parties can support Wi-Fi connections in the 5 GHz frequency band.
通过以上介绍的设备之间能力交集信息的验证过程,可以确定新手机10和旧手机20都支持5GHz频段的WI-FI连接。新手机10直接为旧手机20开启5GHz频段的WI-FI热点,此时新手机10和旧手机20可以在5GHz频段建立WI-FI连接,并通过5GHz频段的 信道传输数据。Through the verification process of capability intersection information between the devices described above, it can be determined that both the new mobile phone 10 and the old mobile phone 20 support WI-FI connections in the 5 GHz frequency band. The new mobile phone 10 directly turns on the WI-FI hotspot of the 5GHz frequency band for the old mobile phone 20. At this time, the new mobile phone 10 and the old mobile phone 20 can establish a WI-FI connection in the 5GHz frequency band and transmit data through the channel of the 5GHz frequency band.
如果旧手机20的能力信息指示旧手机20不支持5GHz频段的传输,新手机10为旧手机20开启2.4GHz频段的WI-FI热点,新手机10和旧手机20可以在2.4GHz频段建立WI-FI连接,并通过2.4GHz频段的信道传输数据。If the capability information of the old mobile phone 20 indicates that the old mobile phone 20 does not support transmission in the 5GHz frequency band, the new mobile phone 10 turns on the 2.4GHz WI-FI hotspot for the old mobile phone 20, and the new mobile phone 10 and the old mobile phone 20 can establish WI-FI in the 2.4GHz frequency band. FI connects and transmits data through the channel in the 2.4GHz frequency band.
在现有的方案中,旧手机20扫描新手机10的二维码之后,获取新手机10的热点信息,就可以和新手机建立2.4GHz频段的WI-FI连接。新手机10和旧手机20建立2.4GHz WI-FI连接之后,新手机10和旧手机20之间可以交换能力信息。例如,新手机10和旧手机20之间进行能力交集信息的验证过程。示例性的,新手机10和旧手机20目前通过2.4GHz频段进行通信,新手机10支持的第一通信信道集合,旧手机20支持的第二通信信道集合,第一通信信道集合和第二通信信道集合之间的交集,我们称为“第三通信信道”,如果第三通信信道种包括的5GHz频段的信道,则新手机10和旧手机20可以确定双方都可以支持5GHz频段的WI-FI连接。通过设备之间能力交集信息的验证过程,可以确定新手机10和旧手机20都支持5GHz频段的WI-FI连接。之后,旧手机20(站点)可以由2.4GHz频段切换到5GHz频段,此时新手机10和旧手机20需要重新进行连接。可见,现有的WI-FI连接的切换方式,实现重新连接的耗时较长,最长可以达到10s,且交互次数多,时延长,影响用户体验。In the existing solution, after the old mobile phone 20 scans the QR code of the new mobile phone 10 and obtains the hotspot information of the new mobile phone 10, it can establish a Wi-Fi connection in the 2.4 GHz frequency band with the new mobile phone. After the new mobile phone 10 and the old mobile phone 20 establish a 2.4 GHz WI-FI connection, the new mobile phone 10 and the old mobile phone 20 can exchange capability information. For example, a verification process of capability intersection information is performed between the new mobile phone 10 and the old mobile phone 20. Exemplarily, the new mobile phone 10 and the old mobile phone 20 currently communicate through the 2.4 GHz frequency band, the first communication channel set supported by the new mobile phone 10, the second communication channel set supported by the old mobile phone 20, the first communication channel set and the second communication The intersection between the channel sets, we call it the "third communication channel". If the third communication channel includes a channel in the 5GHz frequency band, the new mobile phone 10 and the old mobile phone 20 can determine that both parties can support WI-FI in the 5GHz frequency band. connection. Through the verification process of the capability intersection information between the devices, it can be determined that both the new mobile phone 10 and the old mobile phone 20 support WI-FI connections in the 5 GHz frequency band. After that, the old mobile phone 20 (site) can be switched from the 2.4 GHz frequency band to the 5 GHz frequency band. At this time, the new mobile phone 10 and the old mobile phone 20 need to be reconnected. It can be seen that the existing WI-FI connection switching method takes a long time to realize the reconnection, which can be up to 10s, and the number of interactions is large and the time is prolonged, which affects the user experience.
通过本申请实施例的技术方案,新手机10在和旧手机20建立连接之前,旧手机20通过声波将自身的WI-FI能力信息传递给新手机10,新手机10就可以获取旧手机10所支持的WI-FI频点等信息,从而新手机直接按照旧手机10所支持的WI-FI频段为旧手机20开启WI-FI热点,旧手机20可以直接和新手机10建立WI-FI连接,减少旧手机20和新手机10之间由2.4GHz WI-FI连接切换到5GHz WI-FI连接的交互过程,加快缩短了设备之间切换WI-FI连接的时间,提升了用户体验。Through the technical solution of the embodiment of the present application, before the new mobile phone 10 establishes a connection with the old mobile phone 20, the old mobile phone 20 transmits its own WI-FI capability information to the new mobile phone 10 through sound waves, and the new mobile phone 10 can obtain the information of the old mobile phone 10. Supported WI-FI frequency points and other information, so that the new mobile phone directly opens the WI-FI hotspot for the old mobile phone 20 according to the WI-FI frequency band supported by the old mobile phone 10, and the old mobile phone 20 can directly establish a WI-FI connection with the new mobile phone 10. Reduce the interaction process between the old mobile phone 20 and the new mobile phone 10 from 2.4GHz WI-FI connection to 5GHz WI-FI connection, accelerate and shorten the time for switching WI-FI connections between devices, and improve user experience.
此外,在旧手机20向新手机10发送WI-FI能力信息的过程中,可以通过新手机和旧手机都支持的WI-FI频段的信道进行传输,通过一次建立WI-FI连接的过程,新手机10和旧手机20就可以获取信道底层的能力,在以后的建立WI-FI连接的过程中,直接可以通过已经确定的信道传输信息,提升了传输的可靠性。上述技术方案的实现过程依赖硬件较少,只需要两个设备具有音频器件(如麦克风及喇叭)即可,例如,旧手机20可以通过音频器件发送声波信号,新手机10可以通过音频器件接收音频信号。In addition, in the process of sending WI-FI capability information from the old mobile phone 20 to the new mobile phone 10, it can be transmitted through the WI-FI frequency channel supported by both the new mobile phone and the old mobile phone. The mobile phone 10 and the old mobile phone 20 can acquire the ability of the bottom layer of the channel. In the subsequent process of establishing a WI-FI connection, information can be directly transmitted through the determined channel, which improves the reliability of the transmission. The implementation process of the above technical solution depends on less hardware, and only requires two devices to have audio devices (such as microphones and speakers). For example, the old mobile phone 20 can send sound wave signals through the audio device, and the new mobile phone 10 can receive audio through the audio device. signal.
还应理解,上述技术方案可以适用于Android、iOS等系统,与设备的系统平台无依赖关系,适用性强。It should also be understood that the above technical solution can be applied to systems such as Android, iOS, etc., has no dependency relationship with the system platform of the device, and has strong applicability.
由于建立WI-FI连接通常是用于两个移动终端之间传输数据之前,由于数据为个人信息,对保密性要求较高。在实际应用过程中,如果出现攻击者抢先连上WI-FI时,直接通过声波信号传递WI-FI热点信息,周围的攻击者可以通过接收声波信号,连接该WI-FI热点,安全性不能得到保障。Since the establishment of a WI-FI connection is usually used before data transmission between two mobile terminals, since the data is personal information, there is a high requirement for confidentiality. In the actual application process, if an attacker preemptively connects to WI-FI, the WI-FI hotspot information is directly transmitted through the sound wave signal, and the surrounding attackers can receive the sound wave signal to connect to the WI-FI hotspot, and the security cannot be obtained. Guaranteed.
在一种可能的实现方式中,可选地,旧手机20向新手机10发送的声波信号包括经过编码调制处理,并经过所述公钥加密的所述WI-FI能力信息。In a possible implementation manner, optionally, the sound wave signal sent by the old mobile phone 20 to the new mobile phone 10 includes the WI-FI capability information that has been encoded and modulated and encrypted by the public key.
可选地,在旧手机20侧,旧手机20将WI-FI能力信息通过公钥进行加密,再将经过所述公钥加密的WI-FI能力信息的密文进行编码调制处理,再利用声波发送该经过编码调制处理的信息。Optionally, on the side of the old mobile phone 20, the old mobile phone 20 encrypts the WI-FI capability information with a public key, and then encodes and modulates the ciphertext of the WI-FI capability information encrypted by the public key, and then uses sound waves. Send the encoded and modulated information.
相应地,在新手机10侧,接收到声波信号后,先对声波信号进行解调解码,然后通过与所述公钥相对应的私钥,解密得到所述WI-FI能力信息。Correspondingly, on the side of the new mobile phone 10, after receiving the sonic signal, the sonic signal is first demodulated and decoded, and then the WI-FI capability information is obtained by decrypting the private key corresponding to the public key.
应理解,密钥分为加密密钥和解密密钥两种。发送端可以用加密密钥对信号进行加密,接收端用解密密钥对密文信号进行解密。其中,加密密钥一般是公开的,称为公钥,公钥可以通过克隆自己派生,生成的公钥可以公开,且不会被窃取;公开方式不限定。例如公钥可以通过邮件直接发送给接收端,也可以通过其他方式进行公告。It should be understood that there are two types of keys: encryption keys and decryption keys. The sender can use the encryption key to encrypt the signal, and the receiver uses the decryption key to decrypt the ciphertext signal. Among them, the encryption key is generally public, called the public key. The public key can be derived by cloning itself, and the generated public key can be published and will not be stolen; the method of disclosure is not limited. For example, the public key can be sent directly to the receiving end via email, or it can be announced in other ways.
相应地,解密密钥是不能被公开的,称为私钥。公钥和私钥是一一对应的,一对公钥和私钥统称为“密钥对”,由公钥进行加密的密文,必须使用与该公钥配对的私钥才能解密。密钥对中的两个密钥之间具有非常密切的关系,因此公钥和私钥是不能分别单独生成的。一般会将公钥发给别人,私钥留给自己使用,这是非对称的加密方式,例如RSA加密方式等,本申请对包含旧手机WI-FI能力信息的声波信号的加密方式不做限定。Correspondingly, the decryption key cannot be made public and is called the private key. The public key and the private key have a one-to-one correspondence. A pair of public and private keys is collectively called a "key pair". The ciphertext encrypted by the public key must be decrypted by the private key paired with the public key. The two keys in the key pair have a very close relationship, so the public key and the private key cannot be generated separately. Generally, the public key is sent to others, and the private key is reserved for your own use. This is an asymmetric encryption method, such as RSA encryption. This application does not limit the encryption method of the acoustic signal containing the WI-FI capability information of the old mobile phone.
具体地,在步骤501中,新手机10通过生成二维码,向旧手机20传递新手机10的第一热点信息。该二维码可以包括SSID、WI-FI密码和公钥信息。Specifically, in step 501, the new mobile phone 10 transmits the first hotspot information of the new mobile phone 10 to the old mobile phone 20 by generating a two-dimensional code. The two-dimensional code may include SSID, WI-FI password and public key information.
步骤502中,旧手机20扫描二维码,获取新手机的第一热点信息和公钥信息,并通过公钥对WI-FI能力信息进行加密,密文再经过编码调制处理。In step 502, the old mobile phone 20 scans the two-dimensional code to obtain the first hotspot information and public key information of the new mobile phone, and encrypts the WI-FI capability information with the public key, and then the cipher text is encoded and modulated.
步骤503中,旧手机20通过声波通信技术,向新手机10发送经过编码调制处理,并经过所述公钥加密的所述WI-FI能力信息。步骤504中,新手机10接收旧手机20发送的声波信号,先对声波信号进行解调解码,然后通过与所述公钥相对应的私钥,解密得到所述WI-FI能力信息。新手机10发送匹配旧手机的WI-FI能力的第二热点信息。In step 503, the old mobile phone 20 transmits to the new mobile phone 10 the WI-FI capability information that has been coded and modulated and encrypted by the public key through the acoustic wave communication technology. In step 504, the new mobile phone 10 receives the sound wave signal sent by the old mobile phone 20, first demodulates and decodes the sound wave signal, and then decrypts the WI-FI capability information through the private key corresponding to the public key. The new mobile phone 10 sends second hotspot information matching the WI-FI capability of the old mobile phone.
步骤505-506参照前述过程,这里不再赘述。Steps 505-506 refer to the aforementioned process, which will not be repeated here.
通过上述技术方案,旧手机20通过将自身的WI-FI能力信息传递给新手机10的过程中,通过对WI-FI能力信息进行加密处理,再经过编码调制处理,通过声波传输,可以增加传输过程的安全性,当周围近距离出现攻击者或者攻击者抢先连上WI-FI时,也可以通过WI-FI能力信息的加密保证数据的安全性。同时,保证新手机可以准确获取旧手机10所支持的WI-FI频点等信息,从而新手机直接按照旧手机10所支持的WI-FI频点为旧手机20开启WI-FI热点,减少旧手机20和新手机10之间由2.4GHz WI-FI连接切换到5GHz WI-FI连接的交互过程,加快缩短了建立WI-FI连接的时间,提升了用户体验。Through the above technical solution, the old mobile phone 20 transmits its own WI-FI capability information to the new mobile phone 10 by encrypting the WI-FI capability information, and then encoding and modulating, and transmitting through sound waves, which can increase the transmission. The security of the process, when an attacker appears nearby or connects to WI-FI first, the security of the data can also be ensured through the encryption of the WI-FI capability information. At the same time, it is ensured that the new mobile phone can accurately obtain the WI-FI frequency points supported by the old mobile phone 10, so that the new mobile phone directly opens the WI-FI hotspot for the old mobile phone 20 according to the WI-FI frequency point supported by the old mobile phone 10, reducing the number of old mobile phones. The interaction process between the mobile phone 20 and the new mobile phone 10 is switched from a 2.4GHz WI-FI connection to a 5GHz WI-FI connection, which speeds up the time for establishing a WI-FI connection and improves the user experience.
应理解,以上以用户更换手机过程并在两台手机之间进行数据传输为例,介绍了本申请提供的设备之间建立WI-FI连接的方法,该方法还可以应用于多种智能终端设备,例如智能眼镜、手环、手表等,本申请对此不做限定。It should be understood that the above takes the process of a user changing mobile phones and data transmission between two mobile phones as an example, and introduces the method for establishing a WI-FI connection between the devices provided in this application. This method can also be applied to a variety of smart terminal devices. , Such as smart glasses, bracelets, watches, etc., which are not limited in this application.
还应理解,以上介绍设备之间建立连接时,以已建立网络热点为例,例如当前采用的2.4GHz频段和5GHz频段,本申请对此不做限定。It should also be understood that, when establishing a connection between devices described above, an established network hot spot is taken as an example, such as the currently used 2.4 GHz frequency band and 5 GHz frequency band, which is not limited in this application.
可以理解的是,电子设备为了实现上述功能,其包含了执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。It can be understood that, in order to implement the above-mentioned functions, an electronic device includes hardware and/or software modules corresponding to each function. In combination with the algorithm steps of the examples described in the embodiments disclosed herein, 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 by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Those skilled in the art can use different methods for each specific application in combination with the embodiments to implement the described functions, but such implementation should not be considered as going beyond the scope of the present application.
本实施例可以根据上述方法示例对电子设备进行功能模块的划分,例如,可以对应各 个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In this embodiment, the electronic device can be divided into functional modules according to the foregoing method examples. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
在采用对应各个功能划分各个功能模块的情况下,图7是本申请实施例提供的一例电子设备可能的组成示意图,如图7所示,该电子设备700可以包括:处理器710、存储器720和收发器730。其中,处理器710可以用于对电子设备的动作进行控制管理,例如,可以用于支持电子设备执行上述方法500中介绍的步骤。存储器720可以用于支持电子设备执行存储程序代码和数据等。收发器730,在本申请中,可以对应音频器件,例如麦克风或喇叭,可以用于支持新手机和旧手机之间的声波通信。In the case of dividing each functional module corresponding to each function, FIG. 7 is a schematic diagram of an example of possible composition of an electronic device provided by an embodiment of the present application. As shown in FIG. 7, the electronic device 700 may include: a processor 710, a memory 720, and Transceiver 730. The processor 710 may be used to control and manage the actions of the electronic device, for example, it may be used to support the electronic device to execute the steps introduced in the above method 500. The memory 720 may be used to support the electronic device to execute and store program codes and data. The transceiver 730, in this application, may correspond to an audio device, such as a microphone or a speaker, and may be used to support sound wave communication between a new mobile phone and an old mobile phone.
其中,处理器710可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器710也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理(digital signal processing,DSP)和微处理器的组合等等。收发器730具体可以为音频器件、射频电路、蓝牙芯片、WI-FI芯片等与其他电子设备交互的设备。Among them, the processor 710 may implement or execute various exemplary logical blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor 710 may also be a combination that implements computing functions, for example, it includes a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and so on. The transceiver 730 may specifically be an audio device, a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, and other devices that interact with other electronic devices.
在一个实施例中,本实施例所涉及的电子设备可以为具有图1所示结构的设备。In an embodiment, the electronic device involved in this embodiment may be a device having the structure shown in FIG. 1.
本实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的设备之间建立连接的方法。This embodiment also provides a computer storage medium. The computer storage medium stores computer instructions. When the computer instructions run on an electronic device, the electronic device executes the steps of the above-mentioned related method to realize the inter-device establishment in the above-mentioned embodiment. Method of connection.
本实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的设备之间建立连接的方法。This embodiment also provides a computer program product, which when the computer program product runs on a computer, causes the computer to execute the above-mentioned related steps, so as to implement the method for establishing a connection between devices in the above-mentioned embodiment.
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的设备之间建立连接的方法。In addition, the embodiments of the present application also provide a device. The device may specifically be a chip, component or module. The device may include a processor and a memory connected to each other. The memory is used to store computer execution instructions. When the device is running, The processor can execute the computer-executable instructions stored in the memory, so that the chip executes the method for establishing a connection between the devices in the foregoing method embodiments.
其中,本实施例提供的电子设备、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Among them, the electronic device, computer storage medium, computer program product, or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the corresponding method provided above. The beneficial effects of the method will not be repeated here.
通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above embodiments, those skilled in the art can understand that for the convenience and conciseness of the description, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned function can be assigned to different functions according to needs. The function module is completed, that is, the internal structure of the device is divided into different function modules to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, for example, multiple units or components may be combined or It can be integrated into another device, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同 地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate parts may or may not be physically separate. The parts displayed as units may be one physical unit or multiple physical units, that is, they may be located in one place, or they may be distributed to multiple different places. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application are essentially or the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of a software product, and the software product is stored in a storage medium. It includes several instructions to make a device (may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all or part of the steps of the methods in the various embodiments of the present application. The foregoing storage media include: U disk, mobile hard disk, read only memory (read only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above content is only the specific implementation of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application. Covered in the scope of protection of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (18)

  1. 一种设备之间建立连接的方法,其特征在于,包括:A method for establishing a connection between devices, characterized in that it includes:
    发送设备获取接收设备的第一热点信息,所述第一热点信息包括第一服务集标识SSID;The sending device obtains first hotspot information of the receiving device, where the first hotspot information includes a first service set identifier SSID;
    所述发送设备向所述接收设备发送声波信号,所述声波信号包括经过编码调制处理的所述发送设备的无线保真WI-FI能力信息,以使得所述接收设备根据所述发送设备的WI-FI能力信息发送所述接收设备的第二热点信息,所述第二热点信息包括第二SSID;The sending device sends a sound wave signal to the receiving device, where the sound wave signal includes the wireless fidelity WI-FI capability information of the sending device that has undergone coding and modulation processing, so that the receiving device can be based on the WI-FI of the sending device. -FI capability information sends second hotspot information of the receiving device, where the second hotspot information includes a second SSID;
    所述发送设备根据所述第二热点信息发送与所述接收设备建立WI-FI连接的请求。The sending device sends a request for establishing a WI-FI connection with the receiving device according to the second hotspot information.
  2. 根据权利要求1所述的方法,其特征在于,所述发送设备获取接收设备的第一热点信息,包括:The method according to claim 1, wherein the acquiring, by the sending device, the first hotspot information of the receiving device comprises:
    所述发送设备通过扫描所述接收设备显示的二维码,从所述二维码中提取所述第一SSID和对应的第一密码。The sending device extracts the first SSID and the corresponding first password from the two-dimensional code by scanning the two-dimensional code displayed by the receiving device.
  3. 根据权利要求1或2所述的方法,其特征在于,所述发送设备向所述接收设备发送声波信号之前,所述方法还包括:The method according to claim 1 or 2, wherein before the sending device sends the acoustic signal to the receiving device, the method further comprises:
    所述发送设备获取密钥对的公钥;The sending device obtains the public key of the key pair;
    所述发送设备通过所述公钥加密所述WI-FI能力信息;The sending device encrypts the WI-FI capability information by using the public key;
    所述发送设备向所述接收设备发送的声波信号包括经过编码调制处理,并经过所述公钥加密的所述WI-FI能力信息。The sound wave signal sent by the sending device to the receiving device includes the WI-FI capability information that has undergone coding and modulation processing and has been encrypted by the public key.
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述WI-FI能力信息包括所述发送设备支持的WI-FI标准号、工作频率范围、兼容性、频宽、物理传输速率、调制方式中的至少一种信息。The method according to any one of claims 1 to 3, wherein the WI-FI capability information includes the WI-FI standard number supported by the sending device, working frequency range, compatibility, bandwidth, physical At least one of transmission rate and modulation method.
  5. 如权利要求1至4中任一项所述的方法,其特征在于,所述声波信号的频率大于10kHz。The method according to any one of claims 1 to 4, wherein the frequency of the acoustic signal is greater than 10 kHz.
  6. 如权利要求1至5中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 5, wherein the method further comprises:
    在所述发送设备向所述接收设备发送声波信号时,所述发送设备显示正在发送声波信号的提示界面。When the sending device sends a sound wave signal to the receiving device, the sending device displays a prompt interface indicating that the sound wave signal is being sent.
  7. 如权利要求1至6中任一项所述的方法,其特征在于,所述第一SSID与所述第二SSID不同;7. The method according to any one of claims 1 to 6, wherein the first SSID is different from the second SSID;
    所述第二SSID对应的WI-FI网络的工作频段适配所述发送设备的WI-FI能力信息。The working frequency band of the Wi-Fi network corresponding to the second SSID is adapted to the Wi-FI capability information of the sending device.
  8. 如权利要求7所述的方法,其特征在于,所述第二SSID对应的WI-FI网络的工作频段为5GHz;The method according to claim 7, wherein the working frequency band of the WI-FI network corresponding to the second SSID is 5 GHz;
    所述与所述接收设备建立WI-FI连接的请求携带所述第二SSID和所述第一密码。The request for establishing a WI-FI connection with the receiving device carries the second SSID and the first password.
  9. 一种设备之间建立连接的方法,其特征在于,包括:A method for establishing a connection between devices, characterized in that it includes:
    接收设备向发送设备传递所述接收设备的第一热点信息,所述第一热点信息包括第一服务集标识SSID;The receiving device transfers the first hotspot information of the receiving device to the sending device, where the first hotspot information includes a first service set identifier SSID;
    所述接收设备接收所述发送设备发送的声波信号,所述声波信号包括经过编码调制处理的所述发送设备的无线保真WI-FI能力信息;Receiving, by the receiving device, an acoustic wave signal sent by the sending device, where the acoustic wave signal includes the wireless fidelity WI-FI capability information of the sending device that has undergone coding and modulation processing;
    所述接收设备根据所述发送设备的WI-FI能力信息发送第二热点信息,所述第二热点信息包括第二SSID;Sending, by the receiving device, second hotspot information according to the WI-FI capability information of the sending device, where the second hotspot information includes a second SSID;
    所述接收设备接收所述发送设备根据所述第二热点信息发送的建立WI-FI连接的请求;所述接收设备根据所述建立WI-FI连接的请求与所述发送设备建立WI-FI连接,所述建立WI-FI连接的请求包括所述第二SSID。The receiving device receives a request for establishing a WI-FI connection sent by the sending device according to the second hotspot information; the receiving device establishes a WI-FI connection with the sending device according to the request for establishing a WI-FI connection , The request for establishing the WI-FI connection includes the second SSID.
  10. 根据权利要求9所述的方法,其特征在于,所述接收设备向发送设备传递所述接收设备的第一热点信息,包括:The method according to claim 9, wherein the transferring, by the receiving device to the sending device, the first hotspot information of the receiving device comprises:
    所述接收设备生成并显示二维码,所述二维码中包括所述第一SSID和对应的第一密码;The receiving device generates and displays a two-dimensional code, and the two-dimensional code includes the first SSID and the corresponding first password;
    所述接收设备通过所述二维码向所述发送设备传递所述第一热点信息。The receiving device transmits the first hotspot information to the sending device through the two-dimensional code.
  11. 根据权利要求9或10所述的方法,其特征在于,所述接收设备接收所述发送设备发送的声波信号之前,所述方法还包括:The method according to claim 9 or 10, wherein before the receiving device receives the acoustic wave signal sent by the sending device, the method further comprises:
    所述接收设备向所述发送设备发送密钥对的公钥;以及所述接收设备接收所述发送设备发送的声波信号之后,所述方法还包括:The receiving device sends the public key of the key pair to the sending device; and after the receiving device receives the sound wave signal sent by the sending device, the method further includes:
    所述接收设备对所述发送设备发送的所述声波信号进行解调译码处理,得到经过所述公钥加密的所述WI-FI能力信息;The receiving device demodulates and decodes the sound wave signal sent by the sending device to obtain the WI-FI capability information encrypted by the public key;
    所述接收设备通过与所述公钥相对应的私钥,解密得到所述WI-FI能力信息。The receiving device decrypts to obtain the WI-FI capability information through the private key corresponding to the public key.
  12. 根据权利要求9至11中任一项所述的方法,其特征在于,所述WI-FI能力信息包括所述发送设备支持的WI-FI标准号、工作频率范围、兼容性、频宽、物理传输速率、调制方式中的至少一种信息。The method according to any one of claims 9 to 11, wherein the WI-FI capability information includes the WI-FI standard number supported by the sending device, working frequency range, compatibility, bandwidth, physical At least one of transmission rate and modulation method.
  13. 如权利要求9至12中任一项所述的方法,其特征在于,所述声波信号的频率大于10kHz。The method according to any one of claims 9 to 12, wherein the frequency of the acoustic signal is greater than 10 kHz.
  14. 如权利要求9至13中任一项所述的方法,其特征在于,所述第一SSID与所述第二SSID不同;The method according to any one of claims 9 to 13, wherein the first SSID is different from the second SSID;
    所述第二SSID对应的WI-FI网络的频段适配所述发送设备的WI-FI能力信息。The frequency band of the Wi-Fi network corresponding to the second SSID is adapted to the Wi-FI capability information of the sending device.
  15. 如权利要求14所述的方法,其特征在于,所述第二SSID对应的WI-FI网络的工作频段为5GHz;所述发送设备根据所述第二热点信息发送的建立WI-FI连接的请求携带所述第二SSID和所述第一密码。The method according to claim 14, wherein the working frequency band of the WI-FI network corresponding to the second SSID is 5 GHz; and the request for establishing a WI-FI connection sent by the sending device according to the second hotspot information Carry the second SSID and the first password.
  16. 一种电子设备,其特征在于,包括:一个或多个处理器;存储器;以及一个或多个程序,其中所述一个或多个程序被存储在所述存储器中,当所述一个或者多个程序被所述处理器执行时,使得所述电子设备执行如权利要求1至15中任一项所述的设备之间建立连接的方法。An electronic device, characterized by comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory, when the one or more When the program is executed by the processor, the electronic device is caused to execute the method for establishing a connection between devices according to any one of claims 1 to 15.
  17. 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1至15中任一项所述的设备之间建立连接的方法。A computer storage medium, characterized by comprising computer instructions, when the computer instructions run on an electronic device, cause the electronic device to execute the connection between the devices according to any one of claims 1 to 15 Methods.
  18. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1至15中任一项所述的设备之间建立连接的方法。A computer program product, characterized in that, when the computer program product runs on a computer, the computer is caused to execute the method for establishing a connection between devices according to any one of claims 1 to 15.
PCT/CN2020/102530 2019-09-18 2020-07-17 Method for establishing connection between apparatuses, and electronic device WO2021051986A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910883033.8 2019-09-18
CN201910883033.8A CN110730448A (en) 2019-09-18 2019-09-18 Method for establishing connection between devices and electronic device

Publications (1)

Publication Number Publication Date
WO2021051986A1 true WO2021051986A1 (en) 2021-03-25

Family

ID=69219156

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/102530 WO2021051986A1 (en) 2019-09-18 2020-07-17 Method for establishing connection between apparatuses, and electronic device

Country Status (2)

Country Link
CN (1) CN110730448A (en)
WO (1) WO2021051986A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117130826A (en) * 2023-02-28 2023-11-28 荣耀终端有限公司 Data backup method, electronic equipment, data backup system and storage medium

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110730448A (en) * 2019-09-18 2020-01-24 华为技术有限公司 Method for establishing connection between devices and electronic device
WO2021221812A1 (en) * 2020-04-30 2021-11-04 Arris Enterprises Llc Wi-fi ssib broadcasting activation and deactivation based on client position and predicted movement
CN112291862A (en) * 2020-10-27 2021-01-29 中兴通讯股份有限公司 Method for establishing connection between terminal devices and terminal devices
CN112581658A (en) * 2020-12-02 2021-03-30 广州朗国电子科技有限公司 Intelligent door lock and network configuration method and network configuration device thereof
CN112747450A (en) * 2021-02-02 2021-05-04 杭州凯澜能源科技有限公司 Noise reduction system for centrally installed central air conditioner group
CN113015264A (en) * 2021-02-22 2021-06-22 斑马网络技术有限公司 Method for realizing connection establishment of double hotspots, electronic equipment and readable storage medium
CN115022872B (en) * 2021-11-05 2023-04-07 荣耀终端有限公司 Data transmission method, electronic equipment and readable storage medium
CN114157659B (en) * 2022-02-10 2022-06-21 荣耀终端有限公司 File sharing method and terminal equipment
CN114845290B (en) * 2022-06-30 2022-11-08 荣耀终端有限公司 Data migration method, electronic device and computer-readable storage medium
CN115119284A (en) * 2022-07-11 2022-09-27 珠海格力电器股份有限公司 Rapid network distribution method based on sound waves, mobile terminal and equipment to be distributed

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015101769A1 (en) * 2013-12-31 2015-07-09 British Telecommunications Public Limited Company Method and corresponding wireless access point for adjusting data rate of secondary users
CN105912421A (en) * 2016-04-06 2016-08-31 广东欧珀移动通信有限公司 Backup method and device for storing data in mobile terminals, mobile terminals and terminals
CN106454805A (en) * 2016-09-14 2017-02-22 广东欧珀移动通信有限公司 Data migration method and mobile terminal
CN106815649A (en) * 2017-01-25 2017-06-09 北京奇虎科技有限公司 A kind of terminal recovery method, device and mobile terminal
CN107222937A (en) * 2017-06-30 2017-09-29 广东欧珀移动通信有限公司 A kind of data transmission method, device and terminal
CN109640310A (en) * 2019-02-12 2019-04-16 Oppo广东移动通信有限公司 Data transfer control method and Related product
CN110730448A (en) * 2019-09-18 2020-01-24 华为技术有限公司 Method for establishing connection between devices and electronic device

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103796280A (en) * 2012-10-30 2014-05-14 中兴通讯股份有限公司 Method, device and system for discovering and selecting hotspot 2.0 access network
CN104158597B (en) * 2014-07-23 2016-07-06 深圳市揽胜科技有限公司 A kind of WIFI network product that configures is connected to the method and system of router
CN105636023B (en) * 2014-10-28 2019-03-19 福建天晴数码有限公司 The binding method and system of smart machine
KR101568314B1 (en) * 2015-05-26 2015-11-12 주식회사 단솔플러스 Apparatus and method for sound wave communication
CN105049129A (en) * 2015-07-21 2015-11-11 杭州创辉农业科技有限公司 Wi-Fi configuration system and method based on acoustic waves
KR102448170B1 (en) * 2015-11-19 2022-09-28 삼성전자 주식회사 Method and electronic device regarding wireless communication using wireless local area network
CN105790854B (en) * 2016-03-01 2018-11-20 济南中维世纪科技有限公司 A kind of short range data transmission method and device based on sound wave
CN105764024B (en) * 2016-05-09 2019-05-07 Oppo广东移动通信有限公司 A kind of test method and device of wireless device handling capacity
CN106230820A (en) * 2016-07-31 2016-12-14 许琴琴 A kind of sound wave safe transmission method
CN106453496B (en) * 2016-09-05 2019-05-14 北京小米移动软件有限公司 Document transmission method and device
CN108307529A (en) * 2016-09-26 2018-07-20 宇龙计算机通信科技(深圳)有限公司 A kind of hotspot connection method and its mobile terminal
CN107920353A (en) * 2016-10-08 2018-04-17 中兴通讯股份有限公司 A kind of method and hot spot access device of Wireless Fidelity connection switching hot spot
CN106973424A (en) * 2017-03-28 2017-07-21 维沃移动通信有限公司 The creation method and terminal of a kind of WAP
CN107396290A (en) * 2017-07-25 2017-11-24 上海小蚁科技有限公司 Establish the method and device, storage medium, terminal of WI FI connections
CN107426781B (en) * 2017-08-16 2021-04-13 高新兴物联科技有限公司 Dual-frequency WiFi automatic switching method and device and computer readable storage medium
CN108198296B (en) * 2017-12-27 2020-12-15 广东林盟科技有限公司 WIFI positioning-based access control method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015101769A1 (en) * 2013-12-31 2015-07-09 British Telecommunications Public Limited Company Method and corresponding wireless access point for adjusting data rate of secondary users
CN105912421A (en) * 2016-04-06 2016-08-31 广东欧珀移动通信有限公司 Backup method and device for storing data in mobile terminals, mobile terminals and terminals
CN106454805A (en) * 2016-09-14 2017-02-22 广东欧珀移动通信有限公司 Data migration method and mobile terminal
CN106815649A (en) * 2017-01-25 2017-06-09 北京奇虎科技有限公司 A kind of terminal recovery method, device and mobile terminal
CN107222937A (en) * 2017-06-30 2017-09-29 广东欧珀移动通信有限公司 A kind of data transmission method, device and terminal
CN109640310A (en) * 2019-02-12 2019-04-16 Oppo广东移动通信有限公司 Data transfer control method and Related product
CN110730448A (en) * 2019-09-18 2020-01-24 华为技术有限公司 Method for establishing connection between devices and electronic device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117130826A (en) * 2023-02-28 2023-11-28 荣耀终端有限公司 Data backup method, electronic equipment, data backup system and storage medium

Also Published As

Publication number Publication date
CN110730448A (en) 2020-01-24

Similar Documents

Publication Publication Date Title
WO2021051986A1 (en) Method for establishing connection between apparatuses, and electronic device
EP3926448A1 (en) Device control page display method, related apparatus and system
WO2021052178A1 (en) Wi-fi connection method and device
WO2020233538A1 (en) Method for accessing wireless local area network and terminal
US11483359B2 (en) Voice call method, electronic device, and system
US11979516B2 (en) Audio output method and terminal device
CN111373713B (en) Message transmission method and device
US20230069398A1 (en) Method for Implementing Wi-Fi Peer-To-Peer Service and Related Device
WO2021017894A1 (en) Method for using remote sim module, and electronic apparatus
US20230422154A1 (en) Method for using cellular communication function, and related apparatus and system
WO2022033296A1 (en) Bluetooth communication method, wearable device, and system
WO2021104114A1 (en) Method for providing wireless fidelity (wifi) network access service, and electronic device
EP4247031A1 (en) Access method and system and electronic device
WO2022062809A1 (en) Screen projection control method and apparatus
WO2020133006A1 (en) Communication method based on bluetooth low energy, and related apparatus
WO2023071540A1 (en) Recording synchronization method based on distributed call, and electronic device and readable storage medium
WO2022199673A1 (en) Login authentication method and electronic device
WO2021218544A1 (en) Wireless connection providing system, method, and electronic apparatus
CN117425227A (en) Method and device for establishing session based on WiFi direct connection
CN113950048A (en) Connection establishing method, electronic device and storage medium
WO2023051204A1 (en) Cross-device connection method, electronic device and storage medium
CN114845297B (en) Application program access method, electronic device and storage medium
CN115379043B (en) Cross-equipment text connection method and electronic equipment
WO2022267917A1 (en) Bluetooth communication method and system
WO2022188813A1 (en) Bluetooth communication method and system, and electronic device

Legal Events

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

Ref document number: 20866859

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20866859

Country of ref document: EP

Kind code of ref document: A1