CN113556715A - Device connection method and apparatus, computer readable medium, and electronic device - Google Patents

Device connection method and apparatus, computer readable medium, and electronic device Download PDF

Info

Publication number
CN113556715A
CN113556715A CN202110753573.1A CN202110753573A CN113556715A CN 113556715 A CN113556715 A CN 113556715A CN 202110753573 A CN202110753573 A CN 202110753573A CN 113556715 A CN113556715 A CN 113556715A
Authority
CN
China
Prior art keywords
priority
connectable
connection
equipment
information
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.)
Granted
Application number
CN202110753573.1A
Other languages
Chinese (zh)
Other versions
CN113556715B (en
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202110753573.1A priority Critical patent/CN113556715B/en
Publication of CN113556715A publication Critical patent/CN113556715A/en
Priority to PCT/CN2022/092781 priority patent/WO2023273639A1/en
Application granted granted Critical
Publication of CN113556715B publication Critical patent/CN113556715B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup

Abstract

The disclosure provides a device connection method, a device connection device, a computer readable medium and an electronic device, and relates to the technical field of wireless connection. The method comprises the following steps: reading the connection state of the connectable device in response to receiving the connection request sent by the first device; when the connection state is the connected state, reading second equipment information of second equipment and first equipment information of first equipment which are connected with the connectable equipment at present; and determining the priority order of the first device and the second device for the connectable devices based on the first device information and the second device information so as to determine the connection of the connectable devices and the devices to be connected. The present disclosure may enable automated connection between devices and connectable devices; meanwhile, the connection between the connectable device and the device to be connected can be determined according to the priority, so that the problem of possible conflict when the connectable device has a plurality of devices capable of establishing connection at the same time is avoided.

Description

Device connection method and apparatus, computer readable medium, and electronic device
Technical Field
The present disclosure relates to the field of wireless connection technologies, and in particular, to a device connection method, a device connection apparatus, a computer-readable medium, and an electronic device.
Background
With the continuous development of science and technology, more and more connectable devices can be connected with the terminal device in a wireless manner. For example, when the mobile phone is a connectable device, the connection between the mobile phone and the computer may be established through a wireless network, bluetooth, or the like, and the connection between the mobile phone and the mobile phone may be established through a wireless network, bluetooth, Near Field Communication (NFC), or the like.
Taking a bluetooth headset as an example, in the related art, when a terminal device is connected to a bluetooth device, a user is usually required to actively open a bluetooth setting interface, and manually select a target bluetooth device from a bluetooth pairing list displayed in the bluetooth setting interface for pairing. However, this connection method mainly depends on the means of the user for connection, and the operation is cumbersome.
Disclosure of Invention
The purpose of the present disclosure is to provide a device connection method, a device connection apparatus, a computer-readable medium, and an electronic device, so as to at least improve the degree of automation of connection of connectable devices to a certain extent, and avoid a collision problem that may occur when a connectable device has multiple devices that can establish connection at the same time.
According to a first aspect of the present disclosure, there is provided a device connection method applied to a connectable device, including: reading the connection state of the connectable device in response to receiving the connection request sent by the first device; when the connection state is the connected state, reading second equipment information of second equipment and first equipment information of first equipment which are connected with the connectable equipment at present; and determining the priority order of the first device and the second device for the connectable devices based on the first device information and the second device information so as to determine the connection of the connectable devices and the devices to be connected.
According to a second aspect of the present disclosure, there is provided a device connecting apparatus including: the state reading module is used for responding to the received connection request sent by the first equipment and reading the connection state of the connectable equipment; the device reading module is used for reading second device information of a second device and first device information of a first device which are connected with the connectable device at present when the connection state is the connected state; the connection adjusting module is used for determining the priority of the first equipment and the second equipment aiming at the connectable equipment based on the first equipment information and the second equipment information so as to determine the connection between the connectable equipment and the equipment to be connected. .
According to a third aspect of the present disclosure, a computer-readable medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, is adapted to carry out the above-mentioned method.
According to a fourth aspect of the present disclosure, there is provided an electronic apparatus, comprising: a processor; and memory storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the above-described method.
According to the device connection method provided by one embodiment of the disclosure, when a connectable device receives a connection request sent by a first device, the connection state of the connectable device is read, and if the connectable device is already connected with a second device, that is, when the connectable device is in the connected state, the priority order of the first device and the second device for the connectable device can be determined through first device information of the first device and second device information of the second device, so as to determine the connection between the connectable device and a device to be connected. Through the priority order of the first equipment and the second equipment for the connectable equipment, the automatic connection between the equipment and the connectable equipment can be realized; meanwhile, the connection between the connectable device and the device to be connected can be determined according to the priority, so that the problem of possible conflict when the connectable device has a plurality of devices capable of establishing connection at the same time is avoided.
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. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty. In the drawings:
FIG. 1 illustrates a schematic diagram of an exemplary system architecture to which embodiments of the present disclosure may be applied;
FIG. 2 shows a schematic diagram of an electronic device to which embodiments of the present disclosure may be applied;
FIG. 3 schematically illustrates a flow chart of a device connection method in an exemplary embodiment of the disclosure;
FIG. 4 is a schematic diagram schematically illustrating a device connection method in an exemplary embodiment of the present disclosure;
FIG. 5 schematically illustrates an interaction diagram for configuring a first priority device in an exemplary embodiment of the disclosure;
FIG. 6 schematically illustrates an interaction diagram for configuring a second priority device in an exemplary embodiment of the disclosure;
fig. 7 schematically illustrates a schematic diagram of another device connection method in an exemplary embodiment of the present disclosure;
FIG. 8 schematically illustrates a component schematic of an apparatus connection device in an exemplary embodiment of the disclosure;
fig. 9 schematically shows a composition diagram of another device connecting apparatus in an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
Fig. 1 is a schematic diagram illustrating a system architecture of an exemplary application environment to which a device connection method and apparatus according to an embodiment of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104 and one or more of a connectable device 105, a connectable device 106, a connectable device 107. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the connectable devices 105, 106, 107. The network 104 may include various wireless connection types, such as wifi, bluetooth, NFC, and so forth. The terminal devices 101, 102, 103 may be various electronic devices having a wireless connection function, including but not limited to desktop computers, portable computers, smart phones, tablet computers, and the like; the connectable devices 105, 106, 107 may include various connectable devices that may be connected to the electronic device through a wireless connection function, such as a bluetooth headset, a wireless mouse, a wireless keyboard, and the like. It should be understood that the number of terminal devices, networks, and connectable devices in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and connectable devices, as desired for implementation.
The device connection method provided by the embodiment of the present disclosure is generally performed by the connectable device 105, the connectable device 106, and the connectable device 107, and accordingly, the device connection apparatus is generally provided in the connectable device 105, the connectable device 106, and the connectable device 107. However, as will be readily understood by those skilled in the art, since the terminal devices 101, 102, and 103 have a wireless connection function, in some embodiments, the terminal devices 101, 102, and 103 may also be connectable devices for performing the device connection method, and accordingly, the device connection apparatus may also be disposed in the terminal devices 101, 102, and 103, which is not particularly limited in this exemplary embodiment.
The exemplary embodiments of the present disclosure provide an electronic device for implementing a device connection method, which may be the terminal devices 101, 102, 103 or the connectable device 105, the connectable device 106, the connectable device 107 in fig. 1. The electronic device comprises at least a processor and a memory for storing executable instructions of the processor, the processor being configured to perform the device connection method via execution of the executable instructions.
The following takes the mobile terminal 200 in fig. 2 as an example, and exemplifies the configuration of the electronic device. It will be appreciated by those skilled in the art that the configuration of figure 2 can also be applied to fixed type devices, in addition to components specifically intended for mobile purposes. In other embodiments, mobile terminal 200 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. The interfacing relationship between the components is only schematically illustrated and does not constitute a structural limitation of the mobile terminal 200. In other embodiments, the mobile terminal 200 may also interface differently than shown in fig. 2, or a combination of multiple interfaces.
As shown in fig. 2, the mobile terminal 200 may specifically include: a processor 210, an internal memory 221, an external memory interface 222, a Universal Serial Bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 271, a microphone 272, a microphone 273, an earphone interface 274, a sensor module 280, a display 290, a camera module 291, an indicator 292, a motor 293, a button 294, and a Subscriber Identity Module (SIM) card interface 295. Wherein the sensor module 280 may include a depth sensor 2801, a pressure sensor 2802, a gyroscope sensor 2803, and the like.
Processor 210 may include one or more processing units, such as: the Processor 210 may include an Application Processor (AP), a modem Processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband Processor, and/or a Neural-Network Processing Unit (NPU), and the like. The different processing units may be separate devices or may be integrated into one or more processors.
A memory is provided in the processor 210. The memory may store instructions for implementing six modular functions: detection instructions, connection instructions, information management instructions, analysis instructions, data transmission instructions, and notification instructions, and execution is controlled by processor 210.
The wireless communication function of the mobile terminal 200 may be implemented by the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, a modem processor, a baseband processor, and the like. Wherein, the antenna 1 and the antenna 2 are used for transmitting and receiving electromagnetic wave signals; the mobile communication module 250 may provide a solution including wireless communication of 2G/3G/4G/5G, etc. applied to the mobile terminal 200; the modem processor may include a modulator and a demodulator; the Wireless communication module 260 may provide a solution for Wireless communication including a Wireless Local Area Network (WLAN) (e.g., a Wireless Fidelity (Wi-Fi) network), Bluetooth (BT), and the like, applied to the mobile terminal 200. In some embodiments, antenna 1 of the mobile terminal 200 is coupled to the mobile communication module 250 and antenna 2 is coupled to the wireless communication module 260, such that the mobile terminal 200 may communicate with networks and other devices through wireless communication techniques; in addition, in some embodiments, the mobile terminal 200 may also communicate with other devices via a wireless communication network, such as a wireless local area network, bluetooth, or the like.
The mobile terminal 200 implements a display function through the GPU, the display screen 290, the application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 290 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 210 may include one or more GPUs that execute program instructions to generate or alter display information. In some embodiments, the second priority device and the third priority device may be displayed in the first priority device to adjust the second priority device.
The external memory interface 222 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the mobile terminal 200. The external memory card communicates with the processor 210 through the external memory interface 222 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
Internal memory 221 may be used to store computer-executable program code, which includes instructions. The internal memory 221 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (e.g., audio data, a phonebook, etc.) created during use of the mobile terminal 200, and the like. In addition, the internal memory 221 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk Storage device, a Flash memory device, a Universal Flash Storage (UFS), and the like. The processor 210 executes various functional applications of the mobile terminal 200 and data processing by executing instructions stored in the internal memory 221 and/or instructions stored in a memory provided in the processor.
The mobile terminal 200 may implement an audio function through the audio module 270, the speaker 271, the receiver 272, the microphone 273, the earphone interface 274, the application processor, and the like. Such as music playing, recording, etc.
The depth sensor 2801 is used to acquire depth information of a scene. The pressure sensor 2802 is used to sense a pressure signal and convert the pressure signal into an electrical signal. The gyro sensor 2803 may be used to determine a motion gesture of the mobile terminal 200. In addition, other functional sensors, such as an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc., may be provided in the sensor module 280 according to actual needs.
Other devices for providing auxiliary functions may also be included in mobile terminal 200. For example, the keys 294 include a power-on key, a volume key, and the like, and a user can generate key signal inputs related to user settings and function control of the mobile terminal 200 through key inputs. Further examples include indicator 292, motor 293, SIM card interface 295, etc.
In the technology related to wireless connection, there are two main research directions: one is the intellectualization of the connection and disconnection of the equipment. For example, the time consumption of the Bluetooth device during connection and disconnection is reduced, and the experience of the user in using the Bluetooth device is ensured; the other is the security of the device connection. For example, the safety in the data interaction process of the Bluetooth device ensures the safety and reliability of data transmission of the Bluetooth device.
However, neither of these two directions of study takes into account the following: taking a bluetooth device as an example of a connectable device, assuming that a bluetooth device (e.g., a bluetooth headset) used by a user is connected to the terminal device a, the bluetooth device will be preferentially connected to the terminal device a when being turned on next time; however, if the terminal device B wants to connect to the bluetooth device, it may be found that the bluetooth device is already connected to the terminal device a, and the terminal device B cannot connect; assuming that the bluetooth device and the terminal device B are in our hands, there are only two ways to connect the two devices: (1) and finding the terminal equipment A connected with the Bluetooth equipment, disconnecting the connection (2) with the Bluetooth equipment, taking the terminal equipment B and the Bluetooth equipment to a place far away from the terminal equipment A, and then connecting. However, both of the above methods rely on manual operation by a user, and the operation is complicated and time-consuming.
In view of one or more of the above problems, the present example embodiment provides a device connection method. The device connection method may be applied to one or more of the connectable devices 105, 106, and 107, and may also be applied to one or more of the terminal devices 101, 102, and 103, which is not particularly limited in this exemplary embodiment. Referring to fig. 3, the device connection method may include the following steps S310 to S330:
in step S310, in response to receiving the connection request transmitted by the first device, the connection state of the connectable device is read.
The connectable device includes a device that can be connected to another device through any wireless connection method. For example, the bluetooth headset may be connected to a mobile phone, a tablet computer, a computer, etc. through a wireless connection manner such as bluetooth.
The first device includes a device that can establish a connection with the connectable device in a wireless connection manner corresponding to the connectable device, for example, the connectable device is a device that can be connected in a wifi manner, and then the first device is a device that can establish a connection with the connectable device in a wifi manner.
The connection request comprises a connection request which is sent by the first equipment and is consistent with the wireless connection mode corresponding to the connectable equipment. For example, if the wireless connection mode corresponding to the connectable device is bluetooth, the connection request sent by the first device is a bluetooth connection request.
The connection state of the connectable device includes a state of whether the wireless connection mode corresponding to the connectable device is connected with the device when the first device sends the connection request. For example, in the above example, when the first device sends the bluetooth connection request at the current time, the connection state corresponding to the connectable device is whether the connectable device establishes connection in the bluetooth mode at the current time.
Further, the mode of connection between connectable devices and devices may be a one-to-one, one-to-many, many-to-many, etc. mode. The one-to-many and many-to-many modes mean that the same connectable device can have a plurality of optional devices to connect, and the same device can also be connected with a plurality of connectable devices.
In step S320, when the connection state is the connected state, second device information of a second device currently connected to the connectable device and first device information of the first device are read.
The second device includes a device that can establish a connection with the connectable device in a wireless connection manner corresponding to the connectable device, for example, the connectable device is a device that can be connected in a wifi manner, and then the second device is a device that can establish a connection with the connectable device in a wifi manner. When the connectable device can be connected in multiple ways, if the first device transmits a connection request corresponding to connection method 1 and the corresponding connection state is also the connection state of connection method 1, then the acquired second device is also the second device connected to the connectable device by connection method 1 when transmitting the connection request. For example, a certain connectable device may establish a connection with another device through bluetooth and wifi, and if the connection request sent by the first device is a connection request corresponding to the bluetooth, the second device is a device currently establishing a connection with the connectable device through bluetooth.
The first device information and the second device information may include information that can accurately determine the first device, that is, the connectable device may accurately determine a unique device through the device information.
In step S330, a priority order of the first device and the second device with respect to the connectable device is determined based on the first device information and the second device information to determine connection of the connectable device with the device to be connected.
The device to be connected may include the first device or the second device, that is, after the priority order is determined, it may be determined that the connectable device is connected to the first device or the second device.
In an exemplary embodiment, after determining the second device that has currently established a connection with the connectable device, the priority order of the first device and the second device for the connectable device may be determined according to the first device information of the first device and the second device information of the second device, and then the connection between the connectable device and the device to be connected may be determined. For example, a corresponding priority order may be set for each historical device that establishes a connection with a connectable device, and when a connection request sent by a first device exists, the priority order of the first device and a second device may be determined according to first device information corresponding to the first device and second device information of a currently connected second device carried in the connection request, and then the connection between the connectable device and the first device or the second device may be determined according to the priority order.
It should be noted that, when determining the connection between the connectable device and the first device or the second device, if the priority order is the higher the first device or the second device, the connectable device can be ensured to always establish a connection with the device with the higher priority order by determining the connection between the connectable device and the device to be connected. Specifically, assuming that the priority order of the first device is before the second device, the connection between the first device and the connectable device may be disconnected, and the connection between the first device and the second device may be established; the connection between the connectable device and the second device may be maintained, provided that the first device has a priority order after the second device.
In an exemplary embodiment, in addition to the priority order set for each device described above, a preset number of priorities may be set, each priority corresponds to at least one priority device corresponding to the priority, and the priority order of the priority devices is determined according to the order of the priorities. For example, assuming that 3 priorities, priority a, priority B and priority C, respectively, may be set, each priority may correspond to at least one priority device. For example, when the priority order is priority a, priority B, and priority C, the priority order of the priority devices is priority a, priority B, and priority C.
In an exemplary embodiment, when determining the priority order of the first device and the second device for the connectable device based on the first device information and the second device information to determine the connection between the connectable device and the device to be connected, if the second device is the first priority device (the priority order of the first priority device is the highest priority among all priority devices), since the second device is the first priority device, the priority of all other devices is lower than that of the second device, at this time, the connection request corresponding to the first device may be rejected, and the connection between the connectable device and the second device may be maintained.
It should be noted that, since the first priority device is a device with the highest priority, that is, the first priority device corresponding to the connectable device has an absolute connection right to the connectable device, when a certain device can only connect N connectable devices through a certain connection method at the same time, the number of the first priority devices is usually equal to N in order to avoid a collision between the absolute connection rights. For example, assuming that a certain mobile phone can be connected with only one bluetooth device (connectable device) at the same time by means of bluetooth, the number of first priority devices is only 1 in general; for another example, assuming that the wireless router is a connectable device, in the framework of the internet of things, the wireless router may be simultaneously connected to 3 household appliances through wifi, and therefore, the number of the first priority devices corresponding to the wireless router may be set to be 3. It should be noted that, in some embodiments, when there are multiple first priority devices corresponding to the connectable devices, the multiple connectable devices may be devices of the same type, for example, the wireless router may connect 3 air conditioners simultaneously in the above example; different types of equipment are also possible, such as an air conditioner, a television, and an intelligent door lock, which are not limited by the present disclosure.
In an exemplary embodiment, when determining the priority order of the first device and the second device for the connectable device based on the first device information and the second device information to determine the connection between the connectable device and the device to be connected, if the second device is a second priority device (the priority order of the second priority device is lower than that of the first priority device), there may be a device with a higher priority order than the second device. At this time, when the first device is the first priority device, the connection between the connectable device and the second device may be disconnected, and the connection between the first device and the connectable device may be established; and when the first device is lower in priority order than the second priority device, or the first device is also the second priority device, the connection request may be denied and the connection between the connectable device and the second device may be maintained.
In an exemplary embodiment, when determining the priority order of the first device and the second device for the connectable device based on the first device information and the second device information to determine the connection between the connectable device and the device to be connected, if the second device is a third-priority device (the priority order of the third-priority device is lower than that of the first-priority device and the second-priority device, and the priority order of the second-priority device is lower than that of the first-priority device), if the first device is the first-priority device or the second-priority device, the connection between the connectable device and the second device may be disconnected, and the connection between the first device and the connectable device may be established; if the first device is a third-priority device, the connection request may be denied and the connection between the connectable device and the second device may be maintained.
It should be noted that the device with the lowest priority is generally all devices except the device with the prior priority. For example, in the above embodiment, a device information list corresponding to a first priority device and a device information list corresponding to a second priority device may be established in the connectable device. At this time, if the device information carried in the connection request sent by a certain device does not belong to the device list data corresponding to the first priority device or the device list data corresponding to the second priority device, the device may be divided into third priority devices. Further, according to the number of divisions of the priority order, the lowest-priority level may be always set to all devices except the device preceding the priority order.
In addition, since the highest priority level usually has a limited number, and the lowest priority level usually is all the devices except the device with the prior priority level, if the priority level with more than three levels needs to be set, the priority level can be further classified by the second priority device. For example, if 4 priority levels need to be set, the priority order may be a first priority device, a second priority device 1 group, a second priority device 2 group, and a third priority device. In this case, different groups can be managed by configuring different verification methods to the second priority devices of different groups, and when determining that the connectable device is connected to the device to be connected, the rules are still followed that the device with the higher priority can preempt the connection right of the device with the lower priority, and the device connected later cannot preempt the connection right of the device connected first when the priority is the same.
In an exemplary embodiment, prior to determining the priority order of the first device and the second device with respect to the connectable devices, the priority order of the devices may be set when each device historically connects the connectable device.
Specifically, when the third device establishes a connection with the connectable device and the third device passes the first priority verification corresponding to the connectable device, the third device information corresponding to the third device is stored as the first priority device corresponding to the connectable device. The first priority authentication may include multiple password authentications, or may include other authentication manners, for example, the authentication may be performed by instructing the third device to perform a corresponding operation, which is not limited in this disclosure.
In addition, after the first priority device corresponding to the connectable device is determined, the second priority device may be adjusted, that is, the second priority device may be increased or decreased, in a manner that the first priority device transmits the authorization data. Wherein the authorisation data may comprise device information to be a second priority device. Specifically, when the connectable device receives the authorization data, the device information may be stored in a list corresponding to the second priority device or deleted in the list corresponding to the second priority device, so as to adjust the second priority device.
In another exemplary embodiment, when adding the second priority device, it may also be implemented by way of verifying data. Specifically, when a user needs to set the fourth device as the second priority device, the fourth device may be connected to the first priority device first, the first priority device may construct verification data conforming to the fourth device according to the fourth device and send the verification data to the fourth device, then after the fourth device is connected to the connectable device, the fourth device information and the verification data are sent to the connectable device together, the connectable device performs second priority verification on the verification data, and when the verification passes, the fourth device information corresponding to the fourth device may be stored in a list corresponding to the second priority device of the connectable device, that is, the fourth device becomes the second priority device. The verification data is authorization data that the fourth device is authorized to send as the second priority device when the first priority device establishes connection with the fourth device.
In an exemplary embodiment, if the connectable device does not establish a connection with another device when the first device sends a connection request, the connection with the connectable device may be established directly regardless of the priority order of the first device.
The following describes the technical solution of the embodiment of the present disclosure in detail by using a bluetooth headset as a connectable device and a mobile phone as a device that needs to establish a connection with the bluetooth headset.
It is assumed that a bluetooth headset, which is a connectable device, can be connected to different handsets at different times, respectively, but only one handset can be connected at the same time. Referring to fig. 4, the bluetooth headset may divide the handset into three priority levels, where the priority level is a first priority level device, a second priority level device, and a third priority level device. Wherein the number of the first priority devices is only 1, and the first priority devices have absolute control power; the second priority device can be multiple and has relative control right; the third priority device may have a plurality of devices without control.
In the case where there are only 1 first priority device, the absolute control right includes: no matter whether the bluetooth headset is currently connected with other mobile phones or not, the connection can be established as long as the first priority device sends a connection request. Meanwhile, the first priority device may also authorize the third priority device to become the second priority device, or downgrade the second priority device to the third priority device; in addition, the device can be in interactive connection with the Bluetooth device to acquire related data information of the Bluetooth device.
The relative control of the second priority device includes: this equipment is normal to be connected with bluetooth headset, if bluetooth headset has been connected with the equipment that priority is less than second priority equipment, this equipment can be through carrying out key communication with bluetooth headset, obtains bluetooth headset's control right to accomplish being connected with bluetooth equipment.
The third priority equipment has no control right, that is, the equipment is normally connected with the Bluetooth equipment, and if the Bluetooth equipment is connected with other terminal equipment, the equipment cannot be connected with the Bluetooth equipment.
In addition, the bluetooth headset also has the function of communicating with the mobile phone and simultaneously storing the list of the priority devices, so that when the connection request is received, the priority corresponding to the device can be determined according to the device information carried in the connection request.
Referring to fig. 5, the interaction of the handset 1 as the first priority device when determining that it is the first priority device is as follows:
step S501, the Bluetooth headset sends broadcast to the outside in equal time;
step S503, the mobile phone 1 sends a connection request after receiving the broadcast so as to establish connection with the Bluetooth headset;
step S505, the user carries out first priority verification on the mobile phone 1 and sends a first priority device application to the Bluetooth headset after the verification is passed;
step S507, the Bluetooth headset receives first equipment information corresponding to the mobile phone 1 and stores the first equipment information into a first priority equipment list in a JSON format;
in step S509, the bluetooth headset sends the information to the mobile phone 1 in JSON format, so that the mobile phone 1 stores the information.
Referring to fig. 6, the interaction of the handset 2 as the second priority device when determining that it is the second priority device is as follows:
step S601, the mobile phone 2 establishes communication connection with the mobile phone 1;
step S603, the mobile phone 1 sends an authorization application to the mobile phone 2 (the mobile phone 2 determines whether to become a second priority device);
step S605, after the mobile phone 2 agrees, the second device information of the mobile phone 2 is sent to the mobile phone 1;
step S607, the mobile phone 1 constructs a corresponding key according to the second device information of the mobile phone 2 and transmits the key to the mobile phone 2;
step S609, the mobile phone 2 sends a connection request to the Bluetooth headset to establish connection with the Bluetooth headset;
step S611, the mobile phone 2 sends the key and the second device information to the bluetooth headset;
in step S613, the bluetooth headset performs second priority verification after receiving the key, and stores the second device information of the mobile phone 2 in the second priority device list after passing the verification.
The device information of the mobile phone may include related hardware information such as a MAC address, an IMEI, version information, a serial number, and the like. It should be noted that, before the above interaction, the bluetooth headset is in an unconnected state; the third priority device is the device with the lowest priority in this embodiment, that is, the devices except the first priority device and the second priority device are the third priority devices.
After the above process is completed, the bluetooth headset stores a first priority device list and a second priority device list, and it is assumed that the mobile phone 3 is a third priority device.
Referring to fig. 7, when the mobile phone 3 sends a connection request to the bluetooth headset, if the bluetooth headset is in an unconnected state, the mobile phone 3 may normally establish a connection relationship with the bluetooth headset; if the Bluetooth headset is connected with other equipment, the mobile phone can only wait for the Bluetooth headset to be idle.
If the mobile phone 3 has established connection with the bluetooth headset, when the mobile phone 2 needs to be connected, the mobile phone 2 sends a connection request to the bluetooth headset, and after receiving the connection request, the bluetooth headset determines the priority of the mobile phone 2 according to the second device information carried in the connection request. If the second device information of the mobile phone 2 is not in the list stored in the bluetooth headset, directly rejecting the connection request of the mobile phone 2; if the second device information is found (whether the priority is in the first priority device list or the second priority device list, the priority is higher than the third priority device corresponding to the mobile phone 3), sending a prompt message to the mobile phone 3, disconnecting the connection with the mobile phone 3, and preparing to establish the connection with the slave terminal device; thus, the slave terminal device robs the control right of the bluetooth headset from the slave terminal device.
It should be noted that, if a certain second priority device or third priority device wants to be upgraded to a first priority device, after the device establishes a connection with the bluetooth headset, the first priority verification may be performed in the manner shown in fig. 4, and after the verification is passed, the bluetooth headset may update the first priority device stored in the first priority device.
Specifically, in the present exemplary embodiment, since there are only 1 first priority device, it is necessary to directly delete the device information of the original first priority device, and then store the device information of the current device in the first priority device list. In addition, if there may be a plurality of first priority devices, when the first priority device list is not full, new device information may be directly added thereto, or the device information of any one of the first priority devices may be replaced based on the selection of the user.
To sum up, in the exemplary embodiment, for the connection of a single connectable device, in the case that multiple candidate devices coexist, the user equipment may be configured as a first priority device, thereby ensuring that the user equipment can be accurately connected to the connectable device without being preempted; when other users want to connect the connectable device, the user device of the user can be configured as a second priority device, which is convenient for other users, meanwhile, the absolute control right of the user to the connectable device is reserved, and the flexibility of the user to control the connectable device is enhanced.
It is noted that the above-mentioned figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Further, referring to fig. 8, a device connection apparatus 800 is further provided in the present exemplary embodiment, and includes a status reading module 810, a device reading module 820, and a connection control module 830. Wherein:
the status reading module 810 may be configured to read a connection status of a connectable device in response to receiving a connection request sent by a first device.
The device reading module 820 may be configured to read second device information of a second device currently connected to the connectable device and first device information of the first device when the connection state is the connected state.
The connection control module 830 may be configured to determine a priority order of the first device and the second device with respect to the connectable device based on the first device information and the second device information to determine connection of the connectable device with the device to be connected.
In an exemplary embodiment, when the second device is a first priority device corresponding to the connectable device and the priority order of the first priority device is the highest priority, the connection control module 830 may be configured to reject the connection request and maintain the connection between the connectable device and the second device.
In an exemplary embodiment, when the second device is a second priority device corresponding to the connectable device and the priority order of the second priority device is lower than that of the first priority device, the connection control module 830 may be configured to disconnect the connectable device and the second device and establish a connection between the first device and the connectable device when the first device is the first priority device; when the first device is lower in priority order than the second priority device or the first device is also the second priority device, the connection request is rejected and the connection between the connectable device and the second device is maintained.
In an exemplary embodiment, when the second device is a third priority device corresponding to the connectable device, and the priority order is the first priority device, the second priority device, and the third priority device, the connection control module 830 may be configured to disconnect the connectable device from the second device and establish a connection between the first device and the connectable device when the first device is the first priority device or the second priority device; and when the first device is a third-priority device, rejecting the connection request and maintaining the connection between the connectable device and the second device.
In an exemplary embodiment, referring to fig. 9, the device connection apparatus 900 may further include a device adjustment module 910, which is configured to store third device information corresponding to the third device as a first priority device corresponding to the connectable device when the third device establishes a connection with the connectable device and the third device passes verification of the first priority corresponding to the connectable device.
In an exemplary embodiment, the device adjustment module 910 may be configured to, in response to receiving the authorization data sent by the first priority device, adjust a second priority device corresponding to the connectable device according to the authorization data.
In an exemplary embodiment, the device adjustment module 910 may be configured to receive fourth device information and verification data sent by a fourth device; when the verification data passes the second priority verification corresponding to the connectable device, storing fourth device information corresponding to the fourth device as the second priority device corresponding to the connectable device; the verification data is obtained by the first priority device authorizing the connectable device to the fourth device.
In an exemplary embodiment, the connection control module 830 may be configured to establish a connection between the first device and the connectable device when the connection status is unconnected.
The specific details of each module in the above apparatus have been described in detail in the method section, and details that are not disclosed may refer to the method section, and thus are not described again.
As will be appreciated by one skilled in the art, aspects of the present disclosure may be embodied as a system, method or program product. Accordingly, various aspects of the present disclosure may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
Exemplary embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, various aspects of the present disclosure may also be implemented in a form of a program product including program code for causing a terminal device to perform the steps according to various exemplary embodiments of the present disclosure described in the above section "exemplary method" of this specification, when the program product is run on the terminal device, for example, any one or more of the steps in fig. 3, fig. 5, and fig. 6 may be performed.
It should be noted that the computer readable media shown in the present disclosure may be computer readable signal media or computer readable storage media or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Furthermore, program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
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 application 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 to be limited only by the terms of the appended claims.

Claims (11)

1. A device connection method applied to a connectable device, comprising:
reading the connection state of the connectable device in response to receiving a connection request sent by a first device;
when the connection state is the connected state, reading second device information of second devices currently connected with the connectable device and first device information of the first devices;
determining a priority order of the first device and the second device for the connectable device based on the first device information and the second device information to determine connection of the connectable device with a device to be connected.
2. The method according to claim 1, wherein the second device is a first priority device corresponding to the connectable device; the priority order of the first priority equipment is the highest priority;
the determining a priority order of the first device and the second device for the connectable device based on the first device information and the second device information to determine connection of the connectable device with a device to be connected includes:
rejecting the connection request and maintaining a connection between the connectable device and the second device.
3. The method according to claim 1, wherein the second device is a second priority device corresponding to the connectable device; the second priority device has a lower priority than the first priority device;
the determining a priority order of the first device and the second device for the connectable device based on the first device information and the second device information to determine connection of the connectable device with a device to be connected includes:
when the first equipment is first priority equipment, disconnecting the connectable equipment from the second equipment and establishing connection between the first equipment and the connectable equipment;
rejecting the connection request and maintaining the connection between the connectable device and the second device when the first device is lower in priority order than the second priority device or the first device is also the second priority device.
4. The method of claim 1, wherein the second device is a third-priority device corresponding to the connectable device; the priority order is a first priority device, a second priority device and a third priority device;
the determining a priority order of the first device and the second device for the connectable device based on the first device information and the second device information to determine connection of the connectable device with a device to be connected includes:
when the first equipment is first priority equipment or second priority equipment, disconnecting the connectable equipment from the second equipment and establishing connection between the first equipment and the connectable equipment;
rejecting the connection request and maintaining a connection between the connectable device and the second device when the first device is a third-priority device.
5. The method according to any one of claims 2 to 4, further comprising:
when a third device establishes connection with the connectable device and the third device passes the first priority verification corresponding to the connectable device, saving third device information corresponding to the third device as the first priority device corresponding to the connectable device.
6. The method of claims 3 to 4, further comprising:
and responding to the received authorization data sent by the first priority equipment, and adjusting second priority equipment corresponding to the connectable equipment according to the authorization data.
7. The method according to any one of claims 3 to 4, further comprising:
receiving fourth device information and verification data sent by fourth devices;
when the verification data passes the second priority verification corresponding to the connectable device, storing fourth device information corresponding to the fourth device as second priority device corresponding to the connectable device;
the verification data is obtained by the first priority device authorizing the connectable device to the fourth device.
8. The method of claim 1, further comprising:
and when the connection state is not connected, establishing connection between the first equipment and the connectable equipment.
9. A device connecting apparatus applied to a connectable device, comprising:
the state reading module is used for responding to a connection request sent by first equipment and reading the connection state of the connectable equipment;
the device reading module is used for reading second device information of a second device which is currently connected with the connectable device and first device information of the first device when the connection state is the connected state;
a connection control module, configured to determine, based on the first device information and the second device information, a priority order of the first device and the second device for the connectable device, so as to determine connection between the connectable device and a device to be connected.
10. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 8.
11. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of any of claims 1 to 8 via execution of the executable instructions.
CN202110753573.1A 2021-07-02 2021-07-02 Device connection method and apparatus, computer readable medium and electronic device Active CN113556715B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110753573.1A CN113556715B (en) 2021-07-02 2021-07-02 Device connection method and apparatus, computer readable medium and electronic device
PCT/CN2022/092781 WO2023273639A1 (en) 2021-07-02 2022-05-13 Device connection method and apparatus, and computer-readable medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110753573.1A CN113556715B (en) 2021-07-02 2021-07-02 Device connection method and apparatus, computer readable medium and electronic device

Publications (2)

Publication Number Publication Date
CN113556715A true CN113556715A (en) 2021-10-26
CN113556715B CN113556715B (en) 2023-10-03

Family

ID=78131258

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110753573.1A Active CN113556715B (en) 2021-07-02 2021-07-02 Device connection method and apparatus, computer readable medium and electronic device

Country Status (2)

Country Link
CN (1) CN113556715B (en)
WO (1) WO2023273639A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114040465A (en) * 2021-11-30 2022-02-11 Oppo广东移动通信有限公司 Device connection switching method and device, electronic device and computer readable storage medium
CN114666779A (en) * 2022-04-08 2022-06-24 深圳市欧瑞博科技股份有限公司 Device connection method and device, computer device and storage medium
CN115086920A (en) * 2022-06-07 2022-09-20 Oppo广东移动通信有限公司 Wireless communication connection method, device, electronic equipment and storage medium
WO2023273639A1 (en) * 2021-07-02 2023-01-05 Oppo广东移动通信有限公司 Device connection method and apparatus, and computer-readable medium and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104093216A (en) * 2014-06-16 2014-10-08 小米科技有限责任公司 Method and device for wireless data transmission
US20170156166A1 (en) * 2015-11-27 2017-06-01 Xiaomi Inc. Method and Apparatus for Connecting With Controlled Smart Device, and Storage Medium
CN108650667A (en) * 2018-05-15 2018-10-12 北京字节跳动网络技术有限公司 Terminal scheduling method and apparatus
CN111866640A (en) * 2020-06-08 2020-10-30 歌尔科技有限公司 Wireless earphone connection method, wireless earphone and computer storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105472771B (en) * 2014-09-12 2020-06-19 北京小米移动软件有限公司 Wireless connection method and device
CN109274563B (en) * 2018-10-10 2021-12-31 耘申信息科技(上海)有限公司 Equipment connection method and device
CN112822663B (en) * 2019-10-31 2022-06-14 华为技术有限公司 Bluetooth connection method and related device
CN113556715B (en) * 2021-07-02 2023-10-03 Oppo广东移动通信有限公司 Device connection method and apparatus, computer readable medium and electronic device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104093216A (en) * 2014-06-16 2014-10-08 小米科技有限责任公司 Method and device for wireless data transmission
US20170156166A1 (en) * 2015-11-27 2017-06-01 Xiaomi Inc. Method and Apparatus for Connecting With Controlled Smart Device, and Storage Medium
CN108650667A (en) * 2018-05-15 2018-10-12 北京字节跳动网络技术有限公司 Terminal scheduling method and apparatus
CN111866640A (en) * 2020-06-08 2020-10-30 歌尔科技有限公司 Wireless earphone connection method, wireless earphone and computer storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023273639A1 (en) * 2021-07-02 2023-01-05 Oppo广东移动通信有限公司 Device connection method and apparatus, and computer-readable medium and electronic device
CN114040465A (en) * 2021-11-30 2022-02-11 Oppo广东移动通信有限公司 Device connection switching method and device, electronic device and computer readable storage medium
CN114666779A (en) * 2022-04-08 2022-06-24 深圳市欧瑞博科技股份有限公司 Device connection method and device, computer device and storage medium
CN114666779B (en) * 2022-04-08 2024-02-20 深圳市欧瑞博科技股份有限公司 Device connection method, device, computer device, and storage medium
CN115086920A (en) * 2022-06-07 2022-09-20 Oppo广东移动通信有限公司 Wireless communication connection method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113556715B (en) 2023-10-03
WO2023273639A1 (en) 2023-01-05

Similar Documents

Publication Publication Date Title
CN113556715B (en) Device connection method and apparatus, computer readable medium and electronic device
KR102657527B1 (en) Method for setting of a device based on information associated with account and electronic device thereof
KR101793443B1 (en) Method, apparatus, program and recording medium for setting smart device management account
KR100594127B1 (en) Bonding process method and device in a Bluetooth device
KR102061913B1 (en) Method and apparatus for controlling operations of electronic device
US10389717B2 (en) Method, apparatus and computer program
CN103813472B (en) The system and method for connecting equipment by Wi-Fi network
KR102125856B1 (en) Method and system for sharing output device between multimedia devices to send and receive data
JP2017528928A (en) Usage authority acquisition method and apparatus
US10863559B2 (en) Method and apparatus for communicating in a wireless communication network
US11930542B2 (en) Source device switching method and device through Bluetooth connection information sharing
EP3718292B1 (en) Electronic device for managing embedded subscriber identification module and method for same
KR20190110393A (en) Method for setting communication network of appliance and server for processing the method
CN105338529A (en) Wireless network connecting method and system
KR102373548B1 (en) Electronic device and method for connecting local communication
CN114629932A (en) Electronic equipment and cooperation method between electronic equipment
CN105682071A (en) Wireless local area network information configuring method, device and system
CN115915492A (en) Communication method and system among distributed devices and related devices
KR20210004809A (en) Method for transferring subscription and electronic device for supporting the same
CN104618987A (en) Method and device for accessing network
KR102472405B1 (en) Method for sequential mirroring between avn and user unit
CN113242550A (en) Network distribution method, device, equipment and storage medium
CN106162612A (en) Control the method and device of Root authority
US20220122515A1 (en) Display apparatus, electronic apparatus and methods thereof
US11785569B2 (en) Device and method for enrolling a wireless access point into a map wireless network

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
GR01 Patent grant
GR01 Patent grant