CN114980187A - Device connection method and apparatus, electronic device, and storage medium - Google Patents

Device connection method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
CN114980187A
CN114980187A CN202110204543.5A CN202110204543A CN114980187A CN 114980187 A CN114980187 A CN 114980187A CN 202110204543 A CN202110204543 A CN 202110204543A CN 114980187 A CN114980187 A CN 114980187A
Authority
CN
China
Prior art keywords
connection
communication connection
wireless signal
information
signal
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202110204543.5A
Other languages
Chinese (zh)
Inventor
周隆龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202110204543.5A priority Critical patent/CN114980187A/en
Publication of CN114980187A publication Critical patent/CN114980187A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/30Monitoring; Testing of propagation channels
    • H04B17/309Measuring or estimating channel quality parameters
    • H04B17/318Received signal strength
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/30Monitoring; Testing of propagation channels
    • H04B17/382Monitoring; Testing of propagation channels for resource allocation, admission control or handover
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Quality & Reliability (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

The disclosure relates to a device connection method and apparatus, an electronic device, and a storage medium. The device connection method comprises the following steps: in response to detecting the first event, establishing a first communication connection with the second device based on the first wireless signal; transmitting connection information of a second wireless signal to the second device based on the first communication connection; and responding to a connection request initiated by the second equipment based on the connection information, and establishing a second communication connection with the second equipment. The method and the device can enable the equipment to establish the second communication connection more quickly, improve the convenience of establishing the communication connection of the equipment and improve the use experience of a user.

Description

Device connection method and apparatus, electronic device, and storage medium
Technical Field
The present disclosure relates to connection technologies between electronic devices, and in particular, to a device connection method and apparatus, an electronic device, and a storage medium.
Background
The existing electronic devices support wireless connection of bluetooth and wireless hotspots, and as typical applications, for example, connection between a bluetooth headset and an electronic device such as a mobile phone, WIFI connection between the electronic device such as a notebook and the like and the mobile phone through the hotspots are established, and the like. However, at present, the connection between the devices almost needs to be realized only by manual setting, which undoubtedly increases the inconvenience of connection and the complexity of use.
Disclosure of Invention
The disclosure provides a device connection method and apparatus, an electronic device, and a storage medium.
According to a first aspect of the embodiments of the present disclosure, there is provided a device connection method, applied to a first device, the method including:
in response to detecting the first event, establishing a first communication connection with the second device based on the first wireless signal;
transmitting connection information of a second wireless signal to the second device based on the first communication connection;
and responding to a connection request initiated by the second equipment based on the connection information, and establishing a second communication connection with the second equipment.
Optionally, the detecting the first event includes:
detecting that a signal strength of the received first wireless signal exceeds a first threshold; or
A first physical parameter is detected.
Optionally, the detecting that the signal strength of the received first wireless signal exceeds a first threshold includes:
detecting that the power of the received first wireless signal exceeds a first set threshold; or
Detecting that the amplitude of the received first wireless signal exceeds a second set threshold.
Optionally, the connection information includes at least one of:
the identification information of the first device, the channel information of the second wireless signal currently used by the first device, the history information of the second communication connection, the account information of the second communication connection provided by the first device, and the access password of the connection account.
Optionally, when the connection information includes channel information, the establishing a second communication connection with the second device includes:
and performing channel synchronization with the second device on a channel corresponding to the channel information, receiving a connection request initiated by the second device, and establishing the second communication connection.
Optionally, the method further includes:
acquiring identification information of the second device based on the first communication connection; or
Transmitting identification information of the first device to the second device based on the first communication connection.
Optionally, the first wireless signal comprises an ultrasonic signal;
the second wireless signal comprises a Bluetooth signal or a WIFI signal.
Optionally, the establishing a first communication connection with a second device based on the first wireless signal includes:
the method comprises the steps of receiving an ultrasonic signal sent by the second equipment through a microphone or a microphone accessory of the first equipment, carrying out synchronization based on the received ultrasonic signal, sending the ultrasonic signal through an audio processing component or an ultrasonic emitter of the first equipment, and establishing the first communication connection with the second equipment.
Optionally, the first device is further provided with a magnetic field sensor; the detecting a first physical parameter includes:
detecting, by the magnetic field sensor, a magnetic field strength exceeding a third set threshold;
correspondingly, the method further comprises:
sending an ultrasonic signal by an audio processing component or an ultrasonic transmitter of the first device; or
And when the magnetic field intensity detected by the magnetic field sensor is lower than the third set threshold value, stopping sending the ultrasonic signal.
According to a second aspect of the embodiments of the present disclosure, there is provided a device connecting apparatus applied to a first device, the apparatus including:
a detection unit for detecting a first event;
a first establishing unit, configured to establish a first communication connection with a second device based on a first wireless signal in response to detecting a first event;
a transmission unit configured to transmit connection information of a second wireless signal to the second device based on the first communication connection;
a second establishing unit, configured to establish a second communication connection with the second device in response to a connection request initiated by the second device based on the connection information.
Optionally, the detection unit is further configured to:
detecting that a signal strength of the received first wireless signal exceeds a first threshold; or
A first physical parameter is detected.
Optionally, the detection unit is further configured to:
detecting that the power of the received first wireless signal exceeds a first set threshold, and the signal strength of the first wireless signal exceeds a first threshold; or
Detecting that the amplitude of the received first wireless signal exceeds a second set threshold, wherein the signal strength of the first wireless signal exceeds a first threshold.
Optionally, the connection information includes at least one of:
the identification information of the first device, the channel information of the second wireless signal currently used by the first device, the history information of the second communication connection, the account information of the second communication connection provided by the first device, and the access password of the connection account.
Optionally, when the connection information includes channel information, the second establishing unit is further configured to:
and performing channel synchronization with the second device on a channel corresponding to the channel information, receiving a connection request initiated by the second device, and establishing the second communication connection.
Optionally, the apparatus further comprises:
an acquisition unit configured to acquire identification information of the second device based on the first communication connection.
Optionally, the sending unit is further configured to:
transmitting identification information of the first device to the second device based on the first communication connection.
Optionally, the first wireless signal comprises an ultrasonic signal;
the second wireless signal comprises a Bluetooth signal or a WIFI signal.
Optionally, the first establishing unit is further configured to:
the method comprises the steps of receiving an ultrasonic signal sent by the second equipment through a microphone or a microphone accessory of the first equipment, carrying out synchronization based on the received ultrasonic signal, sending the ultrasonic signal through an audio processing component or an ultrasonic emitter of the first equipment, and establishing the first communication connection with the second equipment.
Optionally, the detection unit includes a magnetic field sensor, detects a magnetic field intensity exceeding a third set threshold, and determines that the first physical parameter is detected;
correspondingly, when the first physical parameter is detected, an audio processing component or an ultrasonic transmitter of the first device is triggered to send an ultrasonic signal; or when the magnetic field intensity is detected to be lower than the third set threshold value, triggering the audio processing component or the ultrasonic transmitter of the first equipment to stop sending the ultrasonic signal.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: a processor and a memory for storing processor-executable instructions, wherein the processor is configured to perform the steps of the device connection method described above upon invoking the executable instructions in the memory.
According to a fourth aspect of embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium having instructions thereon which, when executed by a processor of an electronic device, enable the electronic device to perform the steps of the device connection method described above.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in the embodiment of the disclosure, by setting the transmitting unit capable of transceiving the first wireless signal for the devices to be connected, before establishing the second communication connection between the devices based on the second wireless signal, the first communication connection is established based on the first wireless signal, and then the interaction of the identification information and the channel information of the devices to be connected is performed based on the first communication connection, so that the second communication connection can be quickly established based on the identification and the channel information, and thus the corresponding information interaction can be performed based on the second communication connection. The embodiment of the disclosure enables the device to establish the second communication connection more quickly, improves the convenience of establishing the communication connection of the device, and improves the use experience of a user.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a schematic flow chart illustrating a device connection method according to an embodiment of the present disclosure;
fig. 2 is a flowchart illustrating a bluetooth connection establishment process with a hall sensor according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a device connecting apparatus according to an embodiment of the present disclosure;
fig. 4 is a block diagram of an electronic device shown in an embodiment of the disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a schematic flowchart of an apparatus connection method shown in an embodiment of the present disclosure, and as shown in fig. 1, the apparatus connection method of the embodiment of the present disclosure is applied to a first apparatus, and specifically includes the following steps:
s11, in response to detecting the first event, establishing a first communication connection with the second device based on the first wireless signal.
In an embodiment of the present disclosure, the first device may be a mobile phone, a notebook, a game console, a wearable device, a virtual reality device, a personal digital assistant, a notebook, a tablet, a television terminal, an audio device, an AI human interaction device, a bluetooth device, or the like. The bluetooth device here includes a bluetooth headset and the like.
Correspondingly, the second device may be a mobile phone, a notebook, a game console, a wearable device, a virtual reality device, a personal digital assistant, a notebook, a tablet, a television terminal, an audio device, an AI human machine interaction device, a bluetooth device, or the like.
In the embodiment of the disclosure, the first device and the second device both have the capability of transceiving the first wireless signal, the first wireless signal may be an ultrasonic signal, and the frequency of the first wireless signal is usually between 2MHz and 10 MHz. In the embodiment of the present disclosure, existing components of the first device and the second device may be used as the ultrasonic signal transmitter, for example, the audio processing component of the first device and the second device may be used as the ultrasonic signal transmitter, where the audio processing component includes an earphone/speaker/earphone, etc. It should be understood by those skilled in the art that by modifying the circuits of the earphones, the speakers, and the earphones of the first and second devices, the earphones, the speakers, and the like can be modified into the ultrasonic signal transmitter, for example, by controlling the power supply modes of the above components, the transmission of the ultrasonic signal can be realized. As another implementation manner, the first wireless signal may be transmitted and received by directly mounting ultrasonic signal transceivers on the first device and the second device. In addition, in the embodiment of the present disclosure, a Microphone (MIC)/peripheral device such as an earphone MIC of the first device and the second device may be used as an ultrasonic signal receiver, and the ultrasonic signal communication of the embodiment of the present disclosure may be implemented by receiving an ultrasonic signal transmitted by another device. Taking the device as a bluetooth headset as an example, because the left and right sound channels of the headset are also equivalent to a small loudspeaker, and many headsets are also provided with MIC, the receiving function of the ultrasonic signals can be realized only by adding a small processor on the headset and running related algorithms, and the interaction of bluetooth connection related parameters can be performed through a wireless channel established by the ultrasonic signals.
In the embodiment of the present disclosure, the ultrasonic signal transmitter and the ultrasonic signal receiver may be replaced by a Near Field Communication (NFC) reader without considering the cost and the volume of the first device and the second device, and the first device and the second device communicate with each other by NFC. The disclosed embodiment preferably realizes the establishment of the first communication connection through the ultrasonic signal transceiver, and realizes the interaction of the related information of the second communication connection based on the first communication connection, so as to establish the second communication connection more quickly.
At present, an ultrasonic signal transceiver is not used in an electronic device due to the reasons that the frequency is low, the transmission distance is short, the transmission angle is wide, the reliability is reduced along with the increase of the transmission distance, the power consumption is increased, and the like. In the embodiment of the disclosure, through slightly modifying circuits such as a receiver, a loudspeaker, an earphone and the like of the electronic equipment, the components can be modified into an ultrasonic signal transceiver, and the equipment receives ultrasonic signals through an MIC/earphone MIC, so that the ultrasonic signals are transmitted and received, and the communication between the equipment is realized.
In an embodiment of the present disclosure, the establishing a first communication connection with a second device based on a first wireless signal includes: the method comprises the steps of receiving an ultrasonic signal sent by the second device through a microphone or microphone accessory of the first device, such as an earphone MIC, synchronizing based on the received ultrasonic signal, sending the ultrasonic signal through an audio processing component of the first device, such as an earphone/loudspeaker/earphone or the like or an ultrasonic emitter, and establishing the first communication connection with the second device.
In an embodiment of the present disclosure, detecting a first event includes:
detecting that a signal strength of the received first wireless signal exceeds a first threshold; specifically, the signal strength of the first wireless signal exceeding a first threshold includes: detecting that the power of the received first wireless signal exceeds a first set threshold; when the device detects that the receiving power of a first wireless signal sent by other devices exceeds a first threshold value, the other devices are determined to be close to each other, Bluetooth or WIFI connection can be established, at the moment, first communication connection is established between the devices based on the first wireless signal, and Bluetooth or WIFI connection preparation is carried out. Of course, as another implementation manner, the detection of the first event may also be the detection of the amplitude of the received first wireless signal exceeding a second set threshold. In the embodiment of the disclosure, when the amplitude of the signal is large, the received power is also large, and the proximity of other devices can be determined through the amplitude, so as to determine whether to open the bluetooth or WIFI connection.
In the embodiment of the disclosure, when the first wireless signal is an ultrasonic signal, the detection distance of the ultrasonic signal needs to be controlled within 1 to 5cm, so that the reliability of ultrasonic signal detection can be increased, and when the distance between two devices is kept within 1 to 5cm, a first communication connection is established between the two devices based on the ultrasonic signal. As an implementation manner, the ultrasonic signal transceiver transmits a detection signal once in 1 second in a default condition, receives the detection signal transmitted by other equipment in real time, wakes up the system if the amplitude of the detected detection signal exceeds a second threshold value, and increases the transmission interval of the ultrasonic signal transceiver so as to enable the two equipment to perform channel matching and establish a first communication connection, thereby realizing information interaction.
In the embodiment of the present disclosure, detecting the first event may further include detecting a first physical parameter. Here, the first physical parameter may be a magnetic field strength. The detecting a first physical parameter includes: detecting, by the magnetic field sensor, a magnetic field strength exceeding a third set threshold; correspondingly, sending an ultrasonic signal by an audio processing component or an ultrasonic transmitter of the first device; or when the magnetic field intensity detected by the magnetic field sensor is lower than the third set threshold value, the ultrasonic signal is stopped being sent.
Specifically, in the embodiment of the present disclosure, when determining whether two devices are close to each other and establishing the second communication connection by detecting the ultrasonic signal, the ultrasonic signal transceiver needs to be always turned on, which may increase power consumption of the electronic device. Specifically, the ultrasonic signal transmitters all include magnets, but after two devices, such as a first device and a second device, approach, the hall sensor can detect changes of an external magnetic field, for example, the magnetic field strength exceeds a set threshold, or after a magnetic field signal changes from 1 to 0 or from 0 to 1, it is determined that other devices approach, so as to wake up an operating system of the device itself, the operating system turns on the ultrasonic signal transmitter again to transmit an ultrasonic signal, and receives the ultrasonic signal through MIC or earphone MIC, and after synchronization is completed based on the ultrasonic signal, a first communication connection is established, so that interaction of related information of a second communication connection can be achieved, and quick establishment of the second communication connection is achieved. In the embodiment of the disclosure, although the hall sensor also needs to detect the magnetic field intensity in real time, the power consumption of the hall sensor is very low, the overall power consumption is about 0.1mA, the overall power consumption of the device is hardly increased, and the electric quantity of the device can be saved compared with the case that the ultrasonic signal transmitter is always turned on. In addition, the cost of the Hall sensor is very low, and the overall cost of the device is not increased.
S12, sending connection information of a second wireless signal to the second device based on the first communication connection.
In the embodiment of the disclosure, after the first device establishes the first communication connection with the second device, the interaction between the identification information and the second wireless signal channel synchronization information may be performed based on the first communication connection, so as to establish the second communication connection between the first device and the second device.
As one implementation, the connection information includes at least one of:
the identification information of the first device, the channel information of the second wireless signal currently used by the first device, the history information of the second communication connection, the account information of the second communication connection provided by the first device, and the access password of the connection account.
In the embodiment of the present disclosure, by sending the connection information to the second device, the fast connection between the first device and the second device may be implemented.
In the embodiment of the present disclosure, after the first communication connection is established, the identification information of the second device may also be acquired based on the first communication connection; or, the identification information of the first device is sent to the second device based on the first communication connection. The first device or the second device determines whether the device which is connected in the Bluetooth or WIFI connection history list is the device which is connected in advance or not based on the identification information of the other side, and if yes, the second communication connection can be directly established based on the previous connection history.
S13, responding to the connection request initiated by the second device based on the connection information, and establishing a second communication connection with the second device.
In this embodiment of the present disclosure, after the first device and the second device send the connection information, the first device performs channel synchronization with the second device on a channel corresponding to the channel information, receives a connection request initiated by the second device, and establishes the second communication connection.
In the embodiment of the disclosure, after the first communication connection is established by using the ultrasonic signal, the bluetooth or WIFI connection later is facilitated, taking the second communication connection as the bluetooth connection as an example, if the second communication connection is established between the first device and the second device, the two devices can directly establish the bluetooth connection after interaction based on the connection information, and do not need to manually open the bluetooth and pair. Bluetooth has an automatic connection function, for example, when two devices have connection Bluetooth for the last time, the two devices can be automatically connected only by turning on the devices at the same time, but if the devices which are connected most recently in the connection history list are other devices, Bluetooth cannot be connected automatically, but the information of the devices exists in the Bluetooth list.
Traditional bluetooth channel has 72, and bluetooth equipment needs different switching channels to carry out equipment search in the in-process of establishing connection, leads to the establishment process of bluetooth connection very slow, and this disclosed embodiment is synchronous the connection information of bluetooth to the second equipment through ultrasonic signal, and the second equipment only needs to search for specific channel just can establish bluetooth with first equipment and be connected, can promote the connection efficiency of bluetooth connection so greatly.
In the embodiment of the present disclosure, besides the bluetooth connection, the second communication connection may also be a WIFI hotspot connection or other connection. For example, when the first device is set to default connection to bluetooth or default establishment of a WIFI hotspot, the first device may select to use the last connection mode as a reference for establishing a connection with the second device.
For example, after the first device and the second device approach each other, if a WIFI connection is established between the first device and the other devices last time and serves as a WIFI hotspot, the first device automatically sets itself as the WIFI hotspot after detecting an ultrasonic signal of the second device, sends information of an account number and a connection password of the WIFI hotspot to the second device through the first communication connection established through the ultrasonic signal, and the second device establishes a WIFI connection with the first device based on the account number and the connection password of the WIFI hotspot.
After the first device and the second device approach each other and the first device detects an ultrasonic signal of the second device number, the connection mode of the two devices in the history record at the last time is Bluetooth connection, and the first device is connected with the second device in a Bluetooth connection mode in a default mode; as an implementation manner, the connection manner of the first device may also be set to be bluetooth connection or WIFI connection through a voice control manner; the first device and the second device can complete Bluetooth connection or WIFI connection through negotiation between the first device and the second device.
In the embodiment of the present disclosure, as an implementation manner, the ultrasonic signals of the first device and the second device may also be encrypted, and the first device and the second device establish the first communication connection based on the encrypted first wireless signal. Of course, since the connection distance of the ultrasonic signal is short, the first communication connection between the first device and the second device may be established directly based on the first wireless signal without encrypting the first wireless signal.
Fig. 2 is a flowchart illustrating a bluetooth connection establishment process with a hall sensor according to an embodiment of the present disclosure, and as shown in fig. 2, the bluetooth connection establishment process according to the embodiment of the present disclosure includes:
the Hall sensor wakes up the system after detecting the change of the magnetic field, then starts the ultrasonic signal transceiver to transmit the ultrasonic signal, and carries out real-time ultrasonic signal transmission, after detecting the ultrasonic signal of the second equipment, a first communication connection of the ultrasonic signal is established, and the first equipment sends connection information to the second equipment, so that the second equipment establishes a second communication connection such as Bluetooth connection with the first equipment based on the connection information. The first device and the second device simultaneously open a Bluetooth function and transmit Bluetooth device information and channel information, and if the first device and the second device are connected for the first time, the first device is required to transmit Bluetooth pairing information to the second device so as to realize automatic pairing between the first device and the second device and establish Bluetooth connection. And if the first equipment and the second equipment are not connected for the first time, the fast Bluetooth connection between the first equipment and the second equipment is realized through the channel information in the connection information.
Fig. 3 is a schematic structural diagram of a device connection apparatus shown in an embodiment of the present disclosure, and as shown in fig. 3, the device connection apparatus according to the embodiment of the present disclosure is applied to a first device, and the apparatus includes:
a detection unit 30 for detecting a first event;
a first establishing unit 31, configured to establish a first communication connection with a second device based on a first wireless signal in response to detecting a first event;
a transmitting unit 32 configured to transmit connection information of a second wireless signal to the second device based on the first communication connection;
a second establishing unit 33, configured to establish a second communication connection with the second device in response to a connection request initiated by the second device based on the connection information.
In an embodiment of the present disclosure, the first device may be a mobile phone, a notebook, a game console, a wearable device, a virtual reality device, a personal digital assistant, a notebook, a tablet, a television terminal, an audio device, an AI human interaction device, a bluetooth device, or the like. The bluetooth device here includes a bluetooth headset or the like.
Correspondingly, the second device may be a mobile phone, a notebook, a game console, a wearable device, a virtual reality device, a personal digital assistant, a notebook, a tablet, a television terminal, an audio device, an AI human machine interaction device, a bluetooth device, or the like.
The first communication connection may be an ultrasonic signal connection or an NFC connection or the like, and the second communication connection may include a bluetooth connection, a WIFI connection or the like.
As an implementation manner, the detecting unit 30 is further configured to:
detecting that a signal strength of the received first wireless signal exceeds a first threshold; or
A first physical parameter is detected.
As an implementation manner, the detecting unit 30 is further configured to:
detecting that the power of the received first wireless signal exceeds a first set threshold, and the signal strength of the first wireless signal exceeds a first threshold; or
Detecting that the amplitude of the received first wireless signal exceeds a second set threshold, wherein the signal strength of the first wireless signal exceeds a first threshold.
As one implementation, the connection information includes at least one of:
the identification information of the first device, the channel information of the second wireless signal currently used by the first device, the history information of the second communication connection, the account information of the second communication connection provided by the first device, and the access password of the connection account.
As an implementation manner, when the connection information includes channel information, the second establishing unit 33 is further configured to:
and performing channel synchronization with the second device on a channel corresponding to the channel information, receiving a connection request initiated by the second device, and establishing the second communication connection.
As an implementation manner, on the basis of the device connection apparatus shown in fig. 3, the device connection apparatus according to the embodiment of the present disclosure further includes:
an obtaining unit (not shown in fig. 3) configured to obtain identification information of the second device based on the first communication connection.
As an implementation manner, the sending unit 32 is further configured to:
transmitting identification information of the first device to the second device based on the first communication connection.
As one implementation, the first wireless signal comprises an ultrasonic signal;
the second wireless signal comprises a Bluetooth signal or a WIFI signal.
As an implementation manner, the first establishing unit 31 is further configured to:
the method comprises the steps of receiving an ultrasonic signal sent by the second equipment through a microphone or a microphone accessory of the first equipment, carrying out synchronization based on the received ultrasonic signal, sending the ultrasonic signal through an audio processing component or an ultrasonic emitter of the first equipment, and establishing the first communication connection with the second equipment.
As an implementation manner, the detecting unit 30 includes a magnetic field sensor, detects the magnetic field intensity exceeding a third set threshold, and determines that the first physical parameter is detected;
correspondingly, when the first physical parameter is detected, an audio processing component or an ultrasonic transmitter of the first device is triggered to send an ultrasonic signal; or when the magnetic field intensity is detected to be lower than the third set threshold value, triggering the audio processing component or the ultrasonic transmitter of the first equipment to stop sending the ultrasonic signal.
In an exemplary embodiment, the detection Unit 30, the first establishing Unit 31, the sending Unit 32, the second establishing Unit 33, the obtaining Unit, and the like may be implemented by one or more Central Processing Units (CPUs), Graphics Processing Units (GPUs), Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, Micro Controllers (MCUs), microprocessors (microprocessors), or other electronic elements.
With regard to the apparatus in the above embodiments, the specific manner in which each module and unit performs operations has been described in detail in the embodiments related to the method, and will not be described in detail here.
FIG. 4 is a block diagram illustrating an electronic device 800 according to an example embodiment, where, as shown in FIG. 4, the electronic device 800 supports multiple screen outputs, and the electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communications component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. Power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as Wi-Fi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the steps of the device connection methods of the above-described embodiments.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the electronic device 800 to perform the steps of the device connection method of the above-described embodiment is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
The disclosed embodiments also recite a non-transitory computer-readable storage medium, wherein instructions, when executed by a processor of an electronic device, enable the electronic device to perform the device connection method of the preceding embodiments, the method comprising:
in response to detecting the first event, establishing a first communication connection with the second device based on the first wireless signal;
transmitting connection information of a second wireless signal to the second device based on the first communication connection;
and responding to a connection request initiated by the second equipment based on the connection information, and establishing a second communication connection with the second equipment.
Optionally, the detecting the first event includes:
detecting that a signal strength of the received first wireless signal exceeds a first threshold; or
A first physical parameter is detected.
Optionally, the detecting that the signal strength of the received first wireless signal exceeds a first threshold includes:
detecting that the power of the received first wireless signal exceeds a first set threshold; or
Detecting that the amplitude of the received first wireless signal exceeds a second set threshold.
Optionally, the connection information includes at least one of:
the identification information of the first device, the channel information of the second wireless signal currently used by the first device, the history information of the second communication connection, the account information of the second communication connection provided by the first device, and the access password of the connection account.
Optionally, when the connection information includes channel information, the establishing a second communication connection with the second device includes:
and performing channel synchronization with the second device on a channel corresponding to the channel information, receiving a connection request initiated by the second device, and establishing the second communication connection.
Optionally, the method further includes:
acquiring identification information of the second device based on the first communication connection; or
Transmitting identification information of the first device to the second device based on the first communication connection.
Optionally, the first wireless signal comprises an ultrasonic signal;
the second wireless signal comprises a Bluetooth signal or a WIFI signal.
Optionally, the establishing a first communication connection with a second device based on the first wireless signal includes:
and receiving the ultrasonic signal sent by the second equipment through a microphone or a microphone accessory of the first equipment, synchronizing based on the received ultrasonic signal, sending the ultrasonic signal through an audio processing component or an ultrasonic transmitter of the first equipment, and establishing the first communication connection with the second equipment.
Optionally, the first device is further provided with a magnetic field sensor; the detecting a first physical parameter includes:
detecting, by the magnetic field sensor, a magnetic field strength exceeding a third set threshold;
correspondingly, the method further comprises:
sending an ultrasonic signal by an audio processing component or an ultrasonic transmitter of the first device; or
And when the magnetic field intensity detected by the magnetic field sensor is lower than the third set threshold value, stopping sending the ultrasonic signal.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (21)

1. A device connection method is applied to a first device, and is characterized by comprising the following steps:
in response to detecting the first event, establishing a first communication connection with the second device based on the first wireless signal;
transmitting connection information of a second wireless signal to the second device based on the first communication connection;
and responding to a connection request initiated by the second equipment based on the connection information, and establishing a second communication connection with the second equipment.
2. The method of claim 1, wherein the detecting the first event comprises:
detecting that a signal strength of the received first wireless signal exceeds a first threshold; or
A first physical parameter is detected.
3. The method of claim 2, wherein the detecting that the signal strength of the received first wireless signal exceeds a first threshold comprises:
detecting that the power of the received first wireless signal exceeds a first set threshold; or
Detecting that the amplitude of the received first wireless signal exceeds a second set threshold.
4. The method of claim 1, wherein the connection information comprises at least one of:
the identification information of the first device, the channel information of the second wireless signal currently used by the first device, the history information of the second communication connection, the account information of the second communication connection provided by the first device, and the access password of the connection account.
5. The method of claim 4, wherein when the connection information includes channel information, the establishing a second communication connection with the second device includes:
and performing channel synchronization with the second device on a channel corresponding to the channel information, receiving a connection request initiated by the second device, and establishing the second communication connection.
6. The method of claim 1, further comprising:
acquiring identification information of the second device based on the first communication connection; or
Transmitting identification information of the first device to the second device based on the first communication connection.
7. The method of any of claims 1 to 6, wherein the first wireless signal comprises an ultrasonic signal;
the second wireless signal comprises a bluetooth signal or a WIFI signal.
8. The method of claim 7, wherein establishing the first communication connection with the second device based on the first wireless signal comprises:
the method comprises the steps of receiving an ultrasonic signal sent by the second equipment through a microphone or a microphone accessory of the first equipment, carrying out synchronization based on the received ultrasonic signal, sending the ultrasonic signal through an audio processing component or an ultrasonic emitter of the first equipment, and establishing the first communication connection with the second equipment.
9. The method according to claim 2, characterized in that the first device is further provided with a magnetic field sensor; the detecting a first physical parameter includes:
detecting, by the magnetic field sensor, a magnetic field strength exceeding a third set threshold;
correspondingly, the method further comprises:
sending an ultrasonic signal by an audio processing component or an ultrasonic transmitter of the first device; or
And when the magnetic field intensity detected by the magnetic field sensor is lower than the third set threshold value, stopping sending the ultrasonic signal.
10. An apparatus for connecting devices, applied to a first device, the apparatus comprising:
a detection unit for detecting a first event;
a first establishing unit, configured to establish a first communication connection with a second device based on a first wireless signal in response to detecting a first event;
a transmission unit configured to transmit connection information of a second wireless signal to the second device based on the first communication connection;
a second establishing unit, configured to establish a second communication connection with the second device in response to a connection request initiated by the second device based on the connection information.
11. The apparatus of claim 10, wherein the detection unit is further configured to:
detecting that a signal strength of the received first wireless signal exceeds a first threshold; or
A first physical parameter is detected.
12. The apparatus of claim 11, wherein the detection unit is further configured to:
detecting that the power of the received first wireless signal exceeds a first set threshold, and the signal strength of the first wireless signal exceeds a first threshold; or
Detecting that the amplitude of the received first wireless signal exceeds a second set threshold, wherein the signal strength of the first wireless signal exceeds a first threshold.
13. The apparatus of claim 10, wherein the connection information comprises at least one of:
the identification information of the first device, the channel information of the second wireless signal currently used by the first device, the history information of the second communication connection, the account information of the second communication connection provided by the first device, and the access password of the connection account.
14. The apparatus of claim 13, wherein when the connection information includes channel information, the second establishing unit is further configured to:
and performing channel synchronization with the second device on a channel corresponding to the channel information, receiving a connection request initiated by the second device, and establishing the second communication connection.
15. The apparatus of claim 10, further comprising:
an acquisition unit configured to acquire identification information of the second device based on the first communication connection.
16. The apparatus of claim 10, wherein the sending unit is further configured to:
transmitting identification information of the first device to the second device based on the first communication connection.
17. The apparatus of any one of claims 10 to 16, wherein the first wireless signal comprises an ultrasonic signal;
the second wireless signal comprises a Bluetooth signal or a WIFI signal.
18. The apparatus of claim 17, wherein the first establishing unit is further configured to:
the method comprises the steps of receiving an ultrasonic signal sent by the second equipment through a microphone or a microphone accessory of the first equipment, carrying out synchronization based on the received ultrasonic signal, sending the ultrasonic signal through an audio processing component or an ultrasonic emitter of the first equipment, and establishing the first communication connection with the second equipment.
19. The device according to claim 11, wherein the detection unit comprises a magnetic field sensor detecting a magnetic field strength exceeding a third set threshold, determining that the first physical parameter is detected;
correspondingly, when the first physical parameter is detected, an audio processing component or an ultrasonic transmitter of the first device is triggered to send an ultrasonic signal; or when the magnetic field intensity is detected to be lower than the third set threshold value, triggering the audio processing component or the ultrasonic transmitter of the first equipment to stop sending the ultrasonic signal.
20. An electronic device, characterized in that the electronic device comprises: a processor and a memory for storing processor-executable instructions, wherein the processor is configured to be able to perform the steps of the device connection method of any one of claims 1 to 9 when the executable instructions in the memory are called.
21. A non-transitory computer readable storage medium having instructions therein which, when executed by a processor of an electronic device, enable the electronic device to perform the steps of the device connection method of any one of claims 1 to 9.
CN202110204543.5A 2021-02-23 2021-02-23 Device connection method and apparatus, electronic device, and storage medium Pending CN114980187A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110204543.5A CN114980187A (en) 2021-02-23 2021-02-23 Device connection method and apparatus, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110204543.5A CN114980187A (en) 2021-02-23 2021-02-23 Device connection method and apparatus, electronic device, and storage medium

Publications (1)

Publication Number Publication Date
CN114980187A true CN114980187A (en) 2022-08-30

Family

ID=82972581

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110204543.5A Pending CN114980187A (en) 2021-02-23 2021-02-23 Device connection method and apparatus, electronic device, and storage medium

Country Status (1)

Country Link
CN (1) CN114980187A (en)

Similar Documents

Publication Publication Date Title
US10237901B2 (en) Method and apparatus for connecting with controlled smart device, and storage medium
EP3133851B1 (en) Method and device for acquiring using authority
EP3260362B1 (en) Transferring control authorization for a controlled terminal
CN105516183B (en) Equipment connection method and device
CN104580401A (en) Connecting method and device
EP3322167B1 (en) Method and device for adjusting frequencies of intercom apparatuses
CN109451877B (en) Unmanned aerial vehicle control method and device, unmanned aerial vehicle and remote control equipment
CN106657585B (en) The frequency adjustment method and device of intercom
CN105578391B (en) Information processing method, device and system and terminal equipment
EP3893594A1 (en) User device pairing method and apparatus
US20210307104A1 (en) Method and apparatus for controlling intelligent voice control device and storage medium
CN114513571A (en) Device connection method and device, electronic device and readable storage medium
CN111541922B (en) Method, device and storage medium for displaying interface input information
CN107371222B (en) Virtual card disabling method and device
CN106550482B (en) Communication connection establishing method and device and electronic equipment
CN113329389A (en) Service providing method, device, equipment and storage medium based on Bluetooth connection
CN112882622A (en) Data processing method and device, terminal and storage medium
CN106254402A (en) The synchronous method of intelligent terminal's configuration information and device
CN107105005B (en) Method and device for synchronizing data
CN107277422B (en) Video call method, device and system
CN105472006A (en) File transfer method, device and system
CN111800836B (en) Communication method, device, electronic equipment and storage medium
CN114615647A (en) Call control method, device and storage medium
CN114980187A (en) Device connection method and apparatus, electronic device, and storage medium
CN106531163A (en) Method and device for controlling terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination