CN118338460A - Connection establishment method, device, apparatus, storage medium, and program product - Google Patents

Connection establishment method, device, apparatus, storage medium, and program product Download PDF

Info

Publication number
CN118338460A
CN118338460A CN202410592455.0A CN202410592455A CN118338460A CN 118338460 A CN118338460 A CN 118338460A CN 202410592455 A CN202410592455 A CN 202410592455A CN 118338460 A CN118338460 A CN 118338460A
Authority
CN
China
Prior art keywords
wireless communication
short
communication connection
query
distance wireless
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
CN202410592455.0A
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of CN118338460A publication Critical patent/CN118338460A/en
Pending legal-status Critical Current

Links

Abstract

The embodiment of the application discloses a connection establishment method, a device, equipment, a storage medium and a program product, belonging to the technical field of short-distance wireless communication. The method is performed by a first device, comprising: receiving query broadcast sent by second equipment, wherein the query broadcast comprises a visibility field; the visibility field is used to indicate a device visible to the second device; transmitting a query response to the second device if the value of the visibility field indicates that the first device is visible to the second device; the query response is for the second device to discover the first device; a short-range wireless communication connection is established with the second device. The scheme improves the privacy and the safety of the first equipment.

Description

Connection establishment method, device, apparatus, storage medium, and program product
Technical Field
The embodiment of the application relates to the technical field of short-distance wireless communication, in particular to a connection establishment method, a device, equipment, a storage medium and a program product.
Background
Bluetooth is a short-distance wireless communication technology, and Bluetooth connection can be established between devices such as mobile phones and wireless headphones with similar distances, and communication is performed based on the Bluetooth connection.
In the related art, in the process of establishing a connection, two bluetooth devices may send their own related information by one bluetooth device through broadcasting, and after receiving the broadcasting, the other bluetooth device may initiate the process of establishing a bluetooth connection.
Disclosure of Invention
The embodiment of the application provides a connection establishment method, a device, equipment, a storage medium and a program product. The technical scheme comprises the following steps:
In one aspect, an embodiment of the present application provides a connection establishment method, where the method is performed by a first device, and the method includes:
receiving query broadcast sent by second equipment, wherein the query broadcast comprises a visibility field; the visibility field is used to indicate a device visible to the second device;
transmitting a query response to the second device if the value of the visibility field indicates that the first device is visible to the second device; the query response is for the second device to discover the first device;
A short-range wireless communication connection is established with the second device.
In one aspect, an embodiment of the present application provides a connection establishment method, where the method is performed by a second device, and the method includes:
Sending a query broadcast, wherein the query broadcast comprises a visibility field; the visibility field is used to indicate a device visible to the second device;
Receiving a query response, the query response being sent by a first device receiving the query broadcast if a value of the visibility field indicates that the first device is visible to the second device; the query response is for the second device to discover the first device;
a short-range wireless communication connection is established with the first device.
In another aspect, an embodiment of the present application provides a connection establishment apparatus, including:
the broadcast receiving module is used for receiving query broadcast sent by the second equipment, wherein the query broadcast comprises a visibility field; the visibility field is used to indicate a device visible to the second device;
A response sending module, configured to send a query response to the second device if the value of the visibility field indicates that the first device is visible to the second device; the query response is for the second device to discover the first device;
And the connection establishment module is used for establishing short-distance wireless communication connection with the second equipment.
In another aspect, an embodiment of the present application provides a connection establishment apparatus, including:
the broadcast sending module is used for sending query broadcast, wherein the query broadcast comprises a visibility field; the visibility field is used to indicate a device visible to the second device;
A response receiving module configured to receive a query response, the query response being sent by a first device that receives the query broadcast if a value of the visibility field indicates that the first device is visible to the second device; the query response is for the second device to discover the first device;
And the connection establishment module is used for establishing short-distance wireless communication connection with the second equipment.
In another aspect, an embodiment of the present application provides a processing chip, where the processing chip is configured to perform the connection establishment method as described above.
On the other hand, the embodiment of the application provides a processing chip, wherein the processing chip is provided with the connection establishment device.
In another aspect, an embodiment of the present application provides a computer device, where the computer device includes a processor and a memory, where the processor and the memory are connected by a bus; the processor executes the computer instructions stored in the memory to cause the computer device to implement the connection establishment method as described above.
In yet another aspect, an embodiment of the present application further provides a computer readable storage medium, where computer instructions are stored, where the computer instructions are configured to be executed by a processor to implement the above-mentioned connection establishment method.
In yet another aspect, the present application provides a computer program product comprising computer instructions stored in a computer readable storage medium. The computer program product is for implementing the above-described connection establishment method.
In yet another aspect, the present application provides a computer program to be executed by a processor of a computer device to implement the above-described connection establishment method.
The technical scheme provided by the embodiment of the application at least comprises the following beneficial effects:
The second device may first send a broadcast including a visibility field, and after receiving the broadcast, the first device may determine whether the first device is a device visible to the second device according to the visibility field, and if so, may send a query response to the second device, so that the second device discovers the first device according to the query response, so that a short-distance wireless communication connection may be established between the first device and the second device; by the scheme, the first device does not need to broadcast own information to the surrounding, but only sends own information to the visible device, so that when the first device needs to establish short-distance wireless communication connection (such as Bluetooth connection), all devices around the first device can find the first device, and the privacy and the safety of the first device are improved.
Drawings
Fig. 1 is a system architecture diagram of a bluetooth network system according to an exemplary embodiment of the present application;
Fig. 2 is a schematic diagram of bluetooth connection establishment according to the present application;
fig. 3 is a flow chart of a connection establishment method provided by an exemplary embodiment of the present application;
fig. 4 is a flowchart of a connection establishment method provided by an exemplary embodiment of the present application;
Fig. 5 is a schematic diagram of interactions for establishing a bluetooth connection in accordance with the present application;
fig. 6 is a flowchart of a connection establishment method provided by an exemplary embodiment of the present application;
FIG. 7 is a schematic diagram of interactions for establishing a Bluetooth connection in accordance with the present application;
fig. 8 is a schematic structural view of a connection establishment apparatus according to an exemplary embodiment of the present application;
fig. 9 is a schematic structural view of a connection establishment apparatus according to an exemplary embodiment of the present application;
fig. 10 is a schematic structural view of a computer device according to an exemplary embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
References herein to "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
It should be understood that the "indication" mentioned in the embodiments of the present application may be a direct indication, an indirect indication, or an indication having an association relationship. For example, a indicates B, which may mean that a indicates B directly, e.g., B may be obtained by a; it may also indicate that a indicates B indirectly, e.g. a indicates C, B may be obtained by C; it may also be indicated that there is an association between a and B.
In the description of the embodiments of the present application, the term "corresponding" may indicate that there is a direct correspondence or an indirect correspondence between the two, or may indicate that there is an association between the two, or may indicate a relationship between the two and the indicated, configured, etc.
In the embodiment of the present application, the "predefining" may be implemented by pre-storing corresponding codes, tables or other manners that may be used to indicate relevant information in devices (including, for example, terminal devices and network devices), and the present application is not limited to the specific implementation manner thereof. Such as predefined may refer to what is defined in the protocol.
Due to development of short-distance wireless communication technologies such as Bluetooth (BT), more and more devices support Bluetooth connection functions, for example, audio devices such as a wireless headset and the like can establish connection with terminal devices such as a mobile phone and a personal computer which support Bluetooth in a Bluetooth manner, so that data transmission based on Bluetooth is performed between the audio devices and the terminal devices.
For example, when an audio device such as a wireless earphone is used, a wireless audio connection based on bluetooth needs to be established with a terminal device (i.e. an audio source device), and audio data pushed by the terminal device is played. In some service scenarios, the audio device may also feed back user operations, voice data of the user, and so on to the terminal device.
Taking an example of establishing a bluetooth connection between a mobile phone and a wireless headset, please refer to fig. 1, which illustrates a system architecture diagram of a bluetooth network system according to an exemplary embodiment of the present application. As shown in fig. 1, the system includes an audio device 110 and a terminal device 120.
The audio device 110 may be a bluetooth headset, or other audio playing device supporting bluetooth protocols, such as a bluetooth speaker, etc. The audio device 110 may also be a computer device supporting the bluetooth protocol, for example, a smart phone, a tablet computer, a smart television, a personal computer, and the like.
The audio device 110 has a function of playing audio, for example, a speaker assembly is provided in the audio device 110.
Optionally, the audio device 110 also has an audio collection function, an operation receiving function, and the like. For example, a pickup/microphone, operation keys, a touch sensor, and the like are also provided in the audio device 110.
The terminal device 120 may be a computer device supporting a bluetooth protocol, for example, the terminal device 120 may be a smart phone, a tablet computer, a smart television, a personal computer, and the like.
After the connection between the terminal device 120 and the audio device 110 is established through the bluetooth protocol, the terminal device 120 may push audio data to the audio device 110, and the audio device plays the audio data.
Alternatively, the audio device 110 may collect the voice of the user (e.g., in a call scenario or a voice control scenario), obtain the voice data of the user, and transmit the voice data back to the terminal device 120.
Alternatively, the audio device 110 may transmit an operation signal to the terminal device 120 when receiving an operation of an operation key or a touch sensor in the audio device 110, and the terminal device 120 performs a corresponding operation according to the operation signal.
For example, in some aspects, the audio device 110 may send control information to the terminal device 120 according to the received user operation, so as to control functions related to audio playing in the terminal device 120, such as switching to the previous one, switching to the next one, volume adjustment, answering/hanging up, and so on.
Referring to fig. 2, a schematic diagram of bluetooth connection establishment according to the present application is shown. As shown in fig. 2, taking an example of establishing a bluetooth connection between a mobile phone and a wireless headset, the procedure of establishing the bluetooth connection between the mobile phone and the wireless headset may be as follows:
s21, the wireless earphone sends a broadcast message.
For example, after the earphone box of the wireless earphone is opened, one or both of the earphone 1 and the earphone 2 may transmit a broadcast message. The broadcast message may include information about the wireless headset, such as the name, address, etc. of the wireless headset.
S22, after the Bluetooth scanning is started, the mobile phone scans the broadcast message sent by the wireless earphone.
S23, the user clicks the wireless earphone to be connected, and Bluetooth connection is established between the mobile phone and the wireless earphone.
In fig. 1 and fig. 2, only the bluetooth connection between the mobile phone and the wireless headset is taken as an example for illustration, alternatively, bluetooth connection may be established between other types of bluetooth devices, for example, bluetooth connection may be established between two bluetooth-enabled mobile phones, so as to perform file transfer.
However, in the above solution, the bluetooth device (such as the above wireless headset) needs to send its related information by broadcasting, which may cause other surrounding bluetooth-enabled devices to find the bluetooth device, on one hand, the privacy and security of the bluetooth device may be affected (for example, the user of the bluetooth device may not want other bluetooth devices to search for its own device), and on the other hand, when the user uses one bluetooth device to establish a connection with another bluetooth device in a scenario with more bluetooth devices, the user may scan for a larger number of other bluetooth devices through its own bluetooth device, which may require the user to accurately find the bluetooth device that he wants to connect with among numerous bluetooth devices, which affects the man-machine interaction efficiency of the user in the bluetooth connection process.
In this regard, the subsequent embodiments of the present application provide a new connection establishment scheme based on short-range wireless communication, which can improve the privacy and security of the short-range wireless communication device, and improve the man-machine interaction efficiency of the user in the short-range wireless communication connection process.
Referring to fig. 3, a flowchart of a connection establishment method according to an exemplary embodiment of the present application is shown. The method may be used in a first device; wherein the first device may be a computer device supporting short-range wireless communication functionality; for example, the audio device 110 or the terminal device 120 in the system shown in fig. 1; or the first device may be another short-range wireless communication device than the system shown in fig. 1. The method may include the following steps.
Step 301, receiving a query broadcast sent by a second device, where the query broadcast includes a visibility field; the visibility field is used to indicate a device that is visible to the second device.
Wherein the query broadcast may contain an identification of the second device and a visibility field.
One or more other devices for indicating that the second device is visible may be carried in the visibility field; for example, the information in the visibility field may indicate a single device that is visible to the second device, or the information in the visibility field may indicate a group/collection of devices that is visible to the second device.
The identifier of the second device may be a device name and a device address of the second device; or the identification of the second device may be an identification of the second device in the wireless network, such as a bluetooth identification, a wireless local area network (Wireless Local Area Network, WLAN) identification (e.g., service set identifier (SERVICE SET IDENTIFIER, SSID)), etc.
Step 302, in the case that the value of the visibility field indicates that the first device is visible to the second device, sending a query response to the second device; the query response is for the second device to discover the first device.
After the first device receives the query broadcast, the visibility field in the query broadcast can be extracted, and whether the first device is visible to the second device or not is detected according to the visibility field, or whether the second device has the authority of scanning the first device or not is detected according to the visibility field.
If the first device detects that the first device is visible to the second device, a query response may be sent to the second device, where the query response may include information related to the first device, where the related information may be information that establishes a short-range wireless communication connection with the first device, and for example, the related information may include information about a device identifier, an address, and so on of the first device.
Step 303 establishes a short-range wireless communication connection with the second device.
After the first device sends the query response, the second device can discover the first device, the subsequent second device can initiate the establishment flow of the short-distance wireless communication connection, and the first device can establish the short-distance wireless communication connection with the second device.
Wherein, the short-range wireless communication connection can be a Bluetooth connection.
Or the short-range wireless communication connection may be another type of connection than a bluetooth connection, such as a WLAN connection, an ultra-wideband connection, a ZigBee (ZigBee) connection, etc.
In summary, through the scheme shown in the embodiment of the present application, the second device may first send a broadcast including a visibility field, after receiving the broadcast, the first device may determine whether the second device is a device visible to the second device according to the visibility field, and if so, may send a query response to the second device, so that the second device discovers the first device according to the query response, thereby enabling the first device and the second device to establish a short-distance wireless communication connection; by the scheme, the first device does not need to broadcast own information to the surrounding, but only sends own information to the visible device, so that when the first device needs to establish short-distance wireless communication connection (such as Bluetooth connection), all devices around the first device can find the first device, and the privacy and the safety of the first device are improved.
In addition, through the scheme of the embodiment of the application, when the user uses the second device to discover the first device and establish connection in the scene that the devices supporting the short-distance wireless communication are more, the second device can independently trigger the first device to send the query response through the query broadcast, all surrounding devices capable of establishing the short-distance wireless communication connection do not need to be scanned, the number of the devices scanned by the second device side can be effectively reduced, the user can conveniently query the first device needing to establish the short-distance wireless communication, and therefore the man-machine interaction efficiency of the user in the short-distance wireless communication connection establishment process is improved.
Referring to fig. 4, a flowchart of a connection establishment method according to an exemplary embodiment of the present application is shown. The method may be used in a second device; wherein the second device may be a computer device supporting short-range wireless communication functionality; for example, the audio device 110 or the terminal device 120 in the system shown in fig. 1; or the second device may be another short-range wireless communication device than the system shown in fig. 1. The method may include the following steps.
Step 401, sending a query broadcast, wherein the query broadcast comprises a visibility field; the visibility field is used to indicate a device that is visible to the second device.
Step 402, receiving a query response, the query response being sent by the first device receiving the query broadcast if the value of the visibility field indicates that the first device is visible to the second device; the query response is for the second device to discover the first device.
Step 403, establishing a short-range wireless communication connection with the first device.
In summary, through the scheme shown in the embodiment of the present application, the second device may first send a broadcast including a visibility field, after receiving the broadcast, the first device may determine whether the second device is a device visible to the second device according to the visibility field, and if so, may send a query response to the second device, so that the second device discovers the first device according to the query response, thereby enabling the first device and the second device to establish a short-distance wireless communication connection; by the scheme, the first device does not need to broadcast own information to the surrounding, but only sends own information to the visible device, so that when the first device needs to establish short-distance wireless communication connection (such as Bluetooth connection), all devices around the first device can find the first device, and the privacy and the safety of the first device are improved.
In addition, through the scheme of the embodiment of the application, when the user uses the second device to discover the first device and establish connection in the scene that the devices supporting the short-distance wireless communication are more, the second device can independently trigger the first device to send the query response through the query broadcast, all surrounding devices capable of establishing the short-distance wireless communication connection do not need to be scanned, the number of the devices scanned by the second device side can be effectively reduced, the user can conveniently query the first device needing to establish the short-distance wireless communication, and therefore the man-machine interaction efficiency of the user in the short-distance wireless communication connection establishment process is improved.
In the solutions shown in fig. 3 and fig. 4, in a possible implementation manner, taking an example of establishing a bluetooth connection between two mobile phones, please refer to fig. 5, which shows an interaction diagram for establishing a bluetooth connection according to the present application. As shown in fig. 5, the interaction process for establishing a bluetooth connection may include the following steps.
In step 501, handset a and handset B turn on bluetooth functions.
Step 502, the user of handset B triggers handset B to discover the specified handset.
In step 503, the mobile phone B sends a query broadcast by bluetooth, where the query broadcast includes a visibility field, and the visibility field is used to indicate the mobile phone a.
In step 504, the mobile phone a receives the query broadcast and extracts the visibility field in the query broadcast.
In step 505, when the mobile phone a detects that the visibility field indicates mobile phone a, a query response is returned to mobile phone B.
Step 506, the mobile phone B receives the inquiry response, and displays the information of the mobile phone a in the bluetooth connection interface of the mobile phone B.
In step 507, after the user selects to connect with the mobile phone a in the bluetooth connection interface of the mobile phone B, the mobile phone B establishes bluetooth connection with the mobile phone a.
The scheme shown in fig. 5 is only described by taking the case of establishing bluetooth connection between two mobile phones as an example, and alternatively, the scheme may be applied to establishing bluetooth connection between other types of devices other than mobile phones, for example, the scheme may also be applied to establishing bluetooth connection between a mobile phone and a wireless earphone, or the scheme may also be applied to establishing bluetooth connection between a mobile phone and a bluetooth speaker.
Or the above scheme may also be applied to other short-range wireless connections between devices other than bluetooth, for example, the above scheme may also be applied to establishing WLAN connections between a handset and a handset/wireless headset/access point device, etc.
Referring to fig. 6, a flowchart of a connection establishment method according to an exemplary embodiment of the present application is shown. The method may be interactively performed by a first device and a second device; the first device and the second device may be the audio device 110 and the terminal device 120 in the system shown in fig. 1, or the first device and the second device may be two devices outside the system shown in fig. 1. The method may include the following steps.
Step 601, the second device sends a query broadcast, wherein the query broadcast comprises a visibility field; the visibility field is to indicate a device visible to the second device; the first device receives the query broadcast.
In the embodiment of the application, the second device can send query broadcast in a short-distance wireless communication mode to trigger surrounding devices to also support short-distance wireless communication, and other devices visible to the second device return responses to the second device.
For example, in a scenario where a bluetooth connection is established, the second device may send the inquiry broadcast via bluetooth.
For another example, in the scenario of establishing a WLAN connection, the second device may send the query broadcast through a WLAN.
For another example, in the scenario of establishing a bluetooth connection, the second device may send the inquiry broadcast through a WLAN manner; in this case, the first device and the second device need to support bluetooth and WLAN simultaneously.
For another example, in the scenario of establishing a WLAN connection, the second device may send the query broadcast through a bluetooth manner; in this case, the first device and the second device need to support bluetooth and WLAN simultaneously.
In the embodiment of the present application, the second device may send the query broadcast under the condition of being in a specified connection establishment mode (for example, may be referred to as a privacy mode).
Wherein the second device may be controlled by the user to enter the above-specified connection establishment mode.
For example, taking a scenario of establishing a bluetooth connection as an example, two different bluetooth connection mode options may be provided in the bluetooth connection interface of the second device, one being an option of a normal mode and one being an option of a privacy mode; when triggering the second device to turn on the Bluetooth function, if the option of the privacy mode is selected, the second device turns on the Bluetooth function and sends a query broadcast containing a visibility field.
Alternatively, when triggering the second device to turn on the bluetooth function, if the option of the normal mode is selected, the second device turns on the bluetooth function, but may not transmit the inquiry broadcast, but transmit the normal bluetooth broadcast (not including the visibility field described above), while receiving the normal bluetooth broadcast transmitted by the other device.
Optionally, the second device may display a bluetooth connection mode switching option in a bluetooth connection interface of the second device in the normal mode, and after the user triggers the bluetooth connection mode switching option, the second device may switch to the privacy mode and send the query broadcast including the visibility field.
Optionally, the second device is in the privacy mode, a bluetooth connection mode switching option may be displayed in a bluetooth connection interface of the second device, and when the user triggers the bluetooth connection mode switching option, the second device may switch to the normal mode.
Optionally, the second device may periodically send the inquiry broadcast in the privacy mode until the bluetooth function is turned off, or until the bluetooth connection mode of the second device is switched to the normal mode.
In the embodiment of the present application, the first device may receive the query broadcast and extract the visibility field in the query broadcast in a specified connection establishment mode (for example, may be referred to as a privacy mode).
Wherein the first device may be controlled by the user to enter the above-specified connection establishment mode.
For example, taking a scenario of establishing a bluetooth connection as an example, two different bluetooth connection mode options may be provided in the bluetooth connection interface of the first device, one being an option of a normal mode and one being an option of a privacy mode; when triggering the first device to turn on the bluetooth function, if the option of privacy mode is selected, the first device turns on the bluetooth function and waits to receive/detect a query broadcast containing a visibility field.
Optionally, when triggering the first device to turn on the bluetooth function, if the option of the normal mode is selected, the first device turns on the bluetooth function and transmits a normal bluetooth broadcast (not including the visibility field), and may receive normal bluetooth broadcasts transmitted by other devices.
Optionally, the first device may display a bluetooth connection mode switching option in a bluetooth connection interface of the first device in the normal mode, and after the user triggers the bluetooth connection mode switching option, the first device may switch to the privacy mode and wait to receive/detect the inquiry broadcast including the visibility field.
Optionally, when the first device is in the privacy mode, a bluetooth connection mode switching option may be displayed in a bluetooth connection interface of the first device, and when the user triggers the bluetooth connection mode switching option, the first device may switch to the normal mode.
In one possible implementation, the first device and the second device may switch to the normal mode when the short-range wireless communication connection between the first device and the second device is broken (e.g., after the service is completed).
Step 602, the first device sending a query response to the second device if the value of the visibility field indicates that the first device is visible to the second device; the query response is used for the second device to discover the first device; the second device receives the query response.
In one possible implementation, the value of the visibility field may contain device identifications of other devices visible to the second device, e.g., the value of the visibility field may contain device names, device group/device set identifications, device addresses, etc. of other devices visible to the second device.
Accordingly, after receiving the query broadcast, the first device may extract the device identifiers of the other devices visible to the second device in the visibility field, and compare the device identifiers of the other devices visible to the second device in the visibility field with the device identifier of the first device, and if the device identifier of the first device exists in the visibility field, it may be considered that the value of the visibility field indicates that the first device is visible to the second device, where the first device may send a query response to the second device.
In one possible implementation, the first device may send a query response to the second device if the first device is in a specified connection establishment mode and the value of the visibility field indicates that the first device is visible to the second device.
For example, taking the scenario of setting up a bluetooth connection as an example, when a user of the first device triggers the first device to turn on the bluetooth function, if the option of the privacy mode is selected, the first device turns on the bluetooth function and waits for receiving/detecting a query broadcast containing a visibility field, and when the query broadcast is received, the visibility field may be extracted from the query broadcast and whether the visibility field indicates that the first device is visible to the second device is detected.
In one possible implementation, the visibility field is a query access code IAC field; in the event that the value of the visibility field is a specified IAC, the value of the visibility field indicates that the first device is visible to the second device.
Correspondingly, the first device sends a query response to the second device when the value of the visibility field is a specified value, including: the first device sends a query response to the second device if the value of the visibility field is the specified IAC.
In the embodiment of the present application, the visibility field may indicate other devices visible to the second device by carrying the query access code IAC, where one device or one device group may correspond to one IAC, and after receiving the query broadcast, the first device may extract the IAC in the visibility field, and compare the IAC of the device group to which the first device/itself belongs with the IAC in the visibility field, and if the two are consistent, it is indicated that the value of the visibility field may be regarded as indicating that the first device is visible to the second device, where the first device may send a query response to the second device.
The query response may be unicast response information sent by the first device to the second device based on the short-distance wireless communication mode.
For example, the query broadcast may include an address of the second device in addition to the visibility field, and after the first device determines that the first device is visible to the second device, the first device may send unicast response information to the second device based on the short-distance wireless communication mode according to the address of the second device.
For example, in a scenario where a bluetooth connection is established, the second device may send the inquiry broadcast through a bluetooth manner, and the first device sends unicast response information to the second device through a bluetooth manner.
For another example, in the scenario of establishing the WLAN connection, the second device may send the query broadcast through a WLAN manner, and the first device may send unicast response information to the second device through the WLAN manner.
For another example, in the scenario of establishing a bluetooth connection, the second device may send the inquiry broadcast through a WLAN manner, and the first device sends unicast response information to the second device through a bluetooth manner; in this case, the first device and the second device need to support bluetooth and WLAN simultaneously.
For another example, in the scenario of establishing WLAN connection, the second device may send the query broadcast through a bluetooth manner, and the first device sends unicast response information to the second device through a WLAN manner; in this case, the first device and the second device need to support bluetooth and WLAN simultaneously.
In the embodiment of the present application, in the case that the visibility field is the query access code IAC field, the following information needs to be synchronized in advance between the first device and the second device: the IAC specified above is used to discover the first device.
In one possible implementation, the designated IAC entered in the first device may be received before the first device receives the query broadcast sent by the second device. Or the second device may receive the designated IAC entered in the second device before sending the query broadcast. Or the first device may receive the designated IAC entered in the first device before receiving the query broadcast transmitted by the second device, and the second device may receive the designated IAC entered in the second device before transmitting the query broadcast.
In the embodiment of the application, the user can set the specified IAC in at least one device of the first device and the second device in advance, so that the second device can discover the first device through the specified IAC later, and the first device can be visible to the second device through the specified IAC later alone.
For example, before the step 601, the second device may provide the specified IAC, for example, the specified IAC may be displayed through a screen of the second device, or the casing/nameplate/package of the second device may be printed with the specified IAC in advance, and the user of the first device may set the specified IAC in the first device, for example, the first device may display a first visibility setting interface for setting other devices that may find the first device alone, the user sets the specified IAC in the first visibility setting interface, and when the subsequent first device receives the query broadcast including the specified IAC, the first device may be considered visible to the sender of the query broadcast.
For another example, before the step 601, the first device may provide the specified IAC, for example, the specified IAC may be displayed through a screen of the first device, or the casing/nameplate/packing box of the first device may be printed with the specified IAC in advance, and the user of the second device may set the specified IAC in the first device, for example, the second device may display a second visibility setting interface for setting other devices that may be separately found by the second device, and the user sets the specified IAC in the second visibility setting interface, which indicates that the second device may separately find the first device; the subsequent second device may discover the first device by broadcasting a query carrying the specified IAC.
For another example, before the step 601, the user may set the same designated IAC in the first device and the second device; for example, the first device may display a first visibility setting interface in which the user sets the specified IAC, and the second device may display a second visibility setting interface in which the user sets the specified IAC, and the subsequent second device may discover the first device through a query broadcast carrying the specified IAC, and accordingly, when the first device receives the query broadcast containing the specified IAC, the first device may be considered visible to the sender of the query broadcast.
In another possible implementation, the first device may negotiate with the second device to determine the specified IAC before receiving the query broadcast sent by the second device, and correspondingly, the second device negotiates with the first device to determine the specified IAC before sending the query broadcast.
In the embodiment of the application, the designated IAC can be determined by the first equipment and the second equipment in a negotiation mode, manual setting of a user is not needed, and the determination efficiency of the designated IAC can be improved.
For example, a user of the first device and the second device may trigger the first device and the second device to negotiate to determine a specified IAC at the same time.
In one possible implementation, the first device sends a specified IAC to the second device upon receiving the first operation, and the second device receives the specified IAC sent by the first device upon receiving the second operation.
For example, the user of the first device may perform a first operation on the first device, where the first device sends a specified IAC by broadcasting (the specified IAC may be an IAC preset in the first device), for example, the first device sends the specified IAC by broadcasting in bluetooth or WLAN; meanwhile, the user of the second device may perform a second operation on the second device, at which time the second device may receive a broadcast message, for example, a broadcast message of bluetooth or WLAN, and extract the specified IAC from the broadcast message; the subsequent second device may discover the first device by carrying a query broadcast of the specified IAC, and accordingly, when the first device receives the query broadcast containing the specified IAC, the first device may be considered to be visible to the sender of the query broadcast.
In another possible implementation manner, the first device receives the designated IAC sent by the second device when receiving the first operation, and correspondingly, the second device sends the designated IAC to the first device when receiving the second operation.
For example, the user of the second device may perform a second operation on the second device, where the second device sends the specified IAC by broadcasting (the specified IAC may be an IAC preset in the second device), for example, the second device sends the specified IAC by broadcasting in bluetooth or WLAN; meanwhile, the user of the first device may perform a first operation on the first device, at which time the first device may receive a broadcast message, for example, a broadcast message of bluetooth or WLAN, and extract the specified IAC from the broadcast message; the subsequent second device may discover the first device by carrying a query broadcast of the specified IAC, and accordingly, when the first device receives the query broadcast containing the specified IAC, the first device may be considered to be visible to the sender of the query broadcast.
The first operation and the second operation may be the same operation or different operations.
For example, the first operation and the second operation may be both a panning operation, or the first operation and the second operation may be a collision operation of tapping the first device with the second device, or the like, or the first operation and the second operation may be the same touch operation or key operation.
For another example, the first operation may be a shaking operation, and the second operation may be a shaking operation; or the first operation and the second operation may be different touch operations or key operations.
In step 603, a short-range wireless communication connection is established between the first device and the second device.
The establishment of the short-distance wireless communication connection between the first device and the second device may refer to the establishment of a transmission channel, such as a bluetooth transmission channel or a WLAN transmission channel, between the first device and the second device, which is based on short-distance wireless communication.
For example, in the scenario of establishing a bluetooth connection, after the second device receives the inquiry response, an option of the first device may be displayed in the bluetooth connection interface, and after a user of the second device triggers the option of the first device, the second device initiates establishment of the bluetooth connection to the first device, where the bluetooth connection is established between the first device and the second device.
For another example, in the scenario of establishing the WLAN connection, after the second device receives the query response, an option of the first device may be displayed in the WLAN connection interface, and after the user of the second device triggers the option of the first device, the second device initiates establishment of the WLAN connection to the first device, where the WLAN connection is established between the first device and the second device.
Optionally, when the short-distance wireless communication connection is established between the first device and the second device, the first device may further include authentication information (for example, a matching authentication code of bluetooth or an access password of WLAN) required for establishing short-distance wireless communication with the first device in the inquiry response when the first device needs to perform permission authentication (for example, password authentication), and correspondingly, in the process of establishing short-distance wireless communication connection between the first device and the second device, the second device may extract the authentication information from the inquiry response, and when the establishment of short-distance wireless communication connection is initiated to the first device, a short-distance wireless communication connection establishment request may be sent to the first device, where the request includes the authentication information, after the first device receives the short-distance wireless communication connection establishment request, the authentication information included in the request may be checked, and if the check passes, the establishment of the short-distance wireless communication connection may be completed.
In one possible implementation manner, at least one device of the first device and the second device may also exit the above-specified connection establishment mode if the exit condition is satisfied; wherein the exit condition includes at least one of: the establishment of the short-distance wireless communication connection is completed, the time length of disconnection of the short-distance wireless communication connection reaches a preset time period, or the execution of the transmission service corresponding to the short-distance wireless communication connection is completed.
In the embodiment of the present application, in case that at least one of the first device and the second device is in a specified connection establishment mode to execute the above scheme, the at least one of the first device and the second device may also exit the specified connection establishment mode; specifically, for example, after the establishment of the short-range wireless communication connection is completed, the first device and the second device may respectively exit the specified connection establishment mode; or when the short-distance wireless communication connection is established and is disconnected subsequently and the duration in the disconnected state (i.e., the state in which no new short-distance wireless communication connection is established after the short-distance wireless communication connection is disconnected) reaches a certain duration (for example, 3 minutes), the first device and the second device may respectively exit from the specified connection establishment mode; or when the execution of the transmission service corresponding to the short-range wireless communication connection is completed (for example, after the establishment of the short-range wireless communication connection is completed, if data transmission does not occur for a period of time, the execution of the transmission service corresponding to the short-range wireless communication connection may be considered to be completed), the first device and the second device may respectively exit the designated connection establishment mode.
According to the scheme disclosed by the embodiment of the application, the first equipment and the second equipment can establish short-distance wireless communication connection by adopting the scheme of the application under the appointed connection establishment mode, and the appointed connection establishment mode is also provided with a corresponding exit mechanism, so that the establishment scheme of the short-distance wireless communication connection can be compatible with the establishment schemes of other short-distance wireless communication connections, and the application flexibility of the scheme is improved.
In step 604, the first device and the second device switch the transmission packet type according to the channel quality corresponding to the short-range wireless communication connection.
In one possible implementation, at least one of the first device and the second device may acquire channel quality information; the channel quality information is used for indicating the channel quality corresponding to the short-distance wireless communication connection; and switching the transmission packet type corresponding to the short-distance wireless communication connection according to the channel quality information.
For example, at least one device of the first device and the second device may improve the reliability of transmission by switching the type of the transmission packet under the condition of poor channel quality; or at least one device of the first device and the second device can increase the transmission rate by switching the type of the transmission packet under the condition of better channel quality.
Wherein, the above-mentioned channel quality information may include, but is not limited to, one or more of the following information:
Received signal strength Indication (RECEIVED SIGNAL STRENGTH Indication, RSSI), packet error rate (Packet Error Rate, PER).
In one possible implementation manner, at least one device of the first device and the second device may switch a transmission packet type corresponding to the short-distance wireless communication connection from the first transmission packet type to the second transmission packet type when a channel quality corresponding to the short-distance wireless communication connection is lower than a first quality threshold; the transmission reliability of the second transmission packet type is higher than that of the first transmission packet type;
At least one device of the first device and the second device may switch a transmission packet type corresponding to the short-range wireless communication connection from the first transmission packet type to a third transmission packet type when a channel quality corresponding to the short-range wireless communication connection is higher than a second quality threshold; the transmission rate of the third transmission packet type is higher than the transmission rate of the first transmission packet type;
wherein the first quality threshold is not higher than the second quality threshold.
The first quality threshold and the second quality threshold may be preset by a developer/user.
For example, when the channel quality information includes RSSI, the first quality threshold may include a first RSSI threshold, the second quality threshold may include a second RSSI threshold, and the first RSSI threshold is not higher than the second RSSI threshold.
For another example, when the channel quality information includes a PER, the first quality threshold may include a first PER threshold, the second quality threshold may include a second PER threshold, and the first PER threshold is not lower than the second PER threshold (wherein the higher the PER, the lower the channel quality).
The above-mentioned different transmission packet types may correspond to different transmission reliabilities/transmission rates, and generally, the higher the transmission rate of the transmission packet, the lower the transmission reliability, and conversely, the lower the transmission rate of the transmission packet, the higher the transmission reliability, under the condition that other conditions are unchanged.
Taking the example that the short-range wireless communication connection is a bluetooth connection, the transmission packets of the bluetooth connection may have three transmission packet types, namely, a 3M transmission packet (the maximum data amount of each transmission packet is 1000 bytes), a 2M transmission packet (the maximum data amount of each transmission packet is 660 bytes) and a 1M transmission packet (the maximum data amount of each transmission packet is 330 bytes), wherein the transmission rates of the three transmission packet types are respectively from high to low: 3M transmission packet > 2M transmission packet > 1M transmission packet; correspondingly, the order of the transmission reliability of the three transmission packet types from high to low is respectively as follows: 1M transmission packet > 2M transmission packet > 3M transmission packet.
For example, also taking the example that the short-range wireless communication connection is a bluetooth connection, the first device/second device may acquire the channel quality information; if the current transmission packet type of the Bluetooth connection is 2M transmission packets, if the first device detects that the channel quality indicated by the channel quality information is lower than a first quality threshold (for example, RSSI is less than or equal to-95 dB or PER is more than or equal to 20%), the current channel quality is poor, the transmission reliability needs to be preferentially ensured, and at the moment, the transmission packet type of the Bluetooth connection can be switched to 1M transmission packet; and if the first device detects that the channel quality indicated by the channel quality information is lower than a first quality threshold (for example, RSSI is less than or equal to-80 dB or PER is more than or equal to 10%), the current channel quality is poor, the transmission reliability needs to be preferentially ensured, and at the moment, the type of the transmission packet of the Bluetooth connection can be switched to a 2M transmission packet.
For another example, taking the example that the short-range wireless communication connection is a bluetooth connection, the first device/second device may acquire the channel quality information; if the current transmission packet type of the Bluetooth connection is 2M transmission packets, if the first device detects that the channel quality indicated by the channel quality information is higher than a second quality threshold (such as RSSI > -95dB or PER < 20%), the current channel quality is better, the transmission rate can be improved, and at the moment, the transmission packet type of the Bluetooth connection can be switched to 3M transmission packets; assuming that the current transmission packet type of the bluetooth connection is a 1M transmission packet, if the first device detects that the channel quality indicated by the channel quality information is higher than a second quality threshold (for example, RSSI > -80dB, or PER < 10%), it indicates that the current channel quality is better, and the transmission rate may be improved, and at this time, the transmission packet type of the bluetooth connection may be switched to the 1M transmission packet.
In one possible implementation manner, at least one device of the first device and the second device may determine a target transport packet type according to a range where the channel quality information is located, and switch a transport packet type corresponding to the short-distance wireless communication connection to the target transport packet type when the current transport packet type is different from the target transport packet type.
For example, also taking the example that the short-range wireless communication connection is a bluetooth connection, the first device/second device may acquire the channel quality information, determine a target transmission packet type according to a range in which the channel quality information is located, for example, determine that the target transmission packet type is a 3M transmission packet when RSSI > -80dB or PER < 10%, determine that the target transmission packet type is a 2M transmission packet when RSSI-95 dB < 80dB or PER < 20%, determine that the target transmission packet type is a 1M transmission packet when RSSI-95 dB or PER is 20%, and then determine the current transmission packet type by the first device/second device, and switch the transmission packet type of the bluetooth connection to the target transmission packet type if the current transmission packet type is different from the target transmission packet type; for example, if the current transport packet type is a 3M transport packet and the target transport packet type is a 1M transport packet, the first device/second device switches the transport packet type of the bluetooth connection to a 1M transport packet; otherwise, if the current transport packet type is the same as the target transport packet type, the handover operation is not performed.
By the scheme of the embodiment of the application, at least one device of the first device and the second device can combine the channel quality corresponding to the short-distance wireless communication connection to adaptively adjust the type of the transmission packet of the short-distance wireless communication connection, thereby considering the transmission reliability and the transmission rate of the short-distance wireless communication connection.
In step 605, the first device and the second device adjust the generated power according to the channel quality corresponding to the short-range wireless communication connection.
In one possible implementation, at least one of the first device and the second device may acquire channel quality information, and adjust a transmit power corresponding to the short-range wireless communication connection according to the channel quality information.
For example, at least one device of the first device and the second device may improve reliability of transmission by improving transmission power corresponding to the short-range wireless communication connection in a case where channel quality is poor; or at least one device of the first device and the second device can save the electric quantity of the device by reducing the transmitting power corresponding to the short-distance wireless communication connection under the condition of better channel quality.
In one possible implementation manner, at least one device of the first device and the second device may increase the transmission power corresponding to the short-distance wireless communication connection when the channel quality corresponding to the short-distance wireless communication connection is lower than the third quality threshold;
At least one device of the first device and the second device may reduce a transmit power corresponding to the short-range wireless communication connection if a channel quality corresponding to the short-range wireless communication connection is higher than a fourth quality threshold;
wherein the third quality threshold is not higher than the fourth quality threshold.
The third quality threshold and the fourth quality threshold described above may be preset by a developer/user.
For example, when the channel quality information includes RSSI, the third quality threshold may include a third RSSI threshold, the fourth quality threshold may include a fourth RSSI threshold, and the third RSSI threshold is not higher than the fourth RSSI threshold.
For another example, when the channel quality information includes a PER, the third quality threshold may include a third PER threshold, the fourth quality threshold may include a fourth PER threshold, and the third PER threshold is not lower than the fourth PER threshold.
Taking the example that the short-distance wireless communication connection is a bluetooth connection, the transmitting power of the bluetooth connection has three powers, namely transmitting power 1, transmitting power 2 and transmitting power 3, wherein the generating powers of the three transmission packet types are respectively from high to low: the transmission power 1> the transmission power 2> the transmission power 3.
For example, also taking the example that the short-range wireless communication connection is a bluetooth connection, the first device/second device may acquire the channel quality information; if the current transmitting power of the Bluetooth connection is assumed to be generating power 2, if the first device detects that the channel quality indicated by the channel quality information is lower than a third quality threshold (for example, RSSI is less than or equal to-95 dB or PER is more than or equal to 20%), the current channel quality is poor, the transmitting power needs to be improved, and at the moment, the generating power of the Bluetooth connection can be switched to generating power 1; and if the first device detects that the channel quality indicated by the channel quality information is lower than a first quality threshold (for example, RSSI is less than or equal to-80 dB or PER is more than or equal to 10%), the current transmission power of the Bluetooth connection is lower than or equal to 10%, and the transmission power needs to be increased, and at the moment, the generation power of the Bluetooth connection can be switched to the generation power 2.
For another example, taking the example that the short-range wireless communication connection is a bluetooth connection, the first device/second device may acquire the channel quality information; assuming that the current transmitting power of the bluetooth connection is generated power 2, if the first device detects that the channel quality indicated by the channel quality information is higher than a fourth quality threshold (for example, RSSI > -95dB, or PER < 20%), the current channel quality is better, the transmitting power may be reduced, and at this time, the generating power of the bluetooth connection may be switched to generated power 3; assuming that the current transmission power of the bluetooth connection is the generated power 1, if the first device detects that the channel quality indicated by the channel quality information is higher than a fourth quality threshold (for example, RSSI > -80dB, or PER < 10%), the current channel quality is better, the transmission power may be reduced, and at this time, the generated power of the bluetooth connection may be switched to the generated power 2.
In one possible implementation manner, at least one device of the first device and the second device may determine a target transmission power according to a range where the channel quality information is located, and when the current transmission power of the short-distance wireless communication connection is different from the target transmission power, switch the transmission power corresponding to the short-distance wireless communication connection to the target transmission power.
For example, taking the example that the short-range wireless communication connection is a bluetooth connection, the first device/second device may acquire the channel quality information, determine a target transmission power according to a range where the channel quality information is located, for example, determine the target transmission power as transmission power 1 when RSSI > -80dB or PER < 10%, determine the target transmission power as transmission power 2 when RSSI < 80dB or 10 < 20%, determine the target transmission power as transmission power 1 when RSSI < 95dB or PER < 20%, and then determine the current transmission power by the first device/second device, and switch the transmission power of the bluetooth connection to the target transmission power if the current transmission power is different from the target transmission power; for example, if the current transmit power is transmit power 1 and the target transmit power is transmit power 3, the first device/second device switches the transmit power of the bluetooth connection to transmit power 3; otherwise, if the current transmission power is the same as the target transmission power, the handover operation is not performed.
According to the scheme disclosed by the embodiment of the application, at least one device of the first device and the second device can combine the channel quality corresponding to the short-distance wireless communication connection to adaptively adjust the transmitting power of the short-distance wireless communication connection, so that the transmission reliability of the short-distance wireless communication connection and the energy consumption of the device are both considered.
At least one device of the first device and the second device may be implemented separately or may be executed simultaneously, in combination with channel quality corresponding to the short-range wireless communication connection, to adjust a transmission packet type and a transmission power of the short-range wireless communication connection.
In the solution shown in fig. 6, in a possible implementation manner, taking an example of establishing a bluetooth connection between two mobile phones, please refer to fig. 7, which shows an interaction diagram for establishing a bluetooth connection according to the present application. As shown in fig. 7, the interaction process for establishing a bluetooth connection may include the following steps.
In step 701, handset a and handset B enter a privacy mode with bluetooth function, respectively.
In step 702, the user of handset B triggers handset B to discover the specified handset.
In step 703, the mobile phone B sends a query broadcast by bluetooth, where the query broadcast includes a visibility field, and the visibility field includes an IAC.
In step 704, the mobile phone a receives the query broadcast and extracts the IAC in the query broadcast.
Step 705, if the mobile phone a detects that the IAC in the visibility field indicates mobile phone a, a query response is returned to mobile phone B.
Step 706, the mobile phone B receives the inquiry response, and displays the information of the mobile phone a in the bluetooth connection interface of the mobile phone B.
Step 707, after the user selects to connect with the mobile phone a in the bluetooth connection interface of the mobile phone B, the mobile phone B establishes bluetooth connection with the mobile phone a.
In step 708, handset a and handset B perform data transfer services over the bluetooth connection.
Step 709, when the mobile phone a or the mobile phone B detects that the communication quality of the bluetooth connection is low, the type of the transmission packet is switched, the throughput rate is reduced, the transmission reliability is improved, and the bluetooth transmitting power is improved.
In step 710, the mobile phone a or the mobile phone B detects that the communication quality of the bluetooth connection is high, switches the transmission packet type, increases the throughput rate, and reduces the bluetooth transmission power.
In step 711, the bluetooth communication service between the mobile phone a and the mobile phone B is ended, and the mode is switched to the normal mode.
The scheme shown in fig. 7 is only described by taking the case of establishing bluetooth connection between two mobile phones as an example, and alternatively, the scheme may be applied to establishing bluetooth connection between other types of devices other than mobile phones, for example, the scheme may also be applied to establishing bluetooth connection between a mobile phone and a wireless earphone, or the scheme may also be applied to establishing bluetooth connection between a mobile phone and a bluetooth speaker.
Or the above scheme may also be applied to other short-range wireless connections between devices other than bluetooth, for example, the above scheme may also be applied to establishing WLAN connections between a handset and a handset/wireless headset/access point device, etc.
Referring to fig. 8, a schematic structural diagram of a connection establishment apparatus according to an exemplary embodiment of the present application is shown. The connection establishment means 800 may be used to perform all or part of the steps performed by the first device in the embodiments as described above with reference to fig. 3 or 6; the device comprises:
A broadcast receiving module 801, configured to receive a query broadcast sent by a second device, where the query broadcast includes a visibility field; the visibility field is used to indicate a device visible to the second device;
A response sending module 802, configured to send a query response to the second device if the value of the visibility field indicates that the first device is visible to the second device; the query response is for the second device to discover the first device;
A connection establishment module 803 for establishing a short-range wireless communication connection with the second device.
In some embodiments, the visibility field is a query access code, IAC, field;
The response sending module is configured to send the query response to the second device if the value of the visibility field is a specified IAC.
In some embodiments, the apparatus further comprises: an IAC receiving module, or an IAC negotiating module;
The IAC receiving module is used for receiving the designated IAC input in the first device before the broadcast receiving module receives the query broadcast sent by the second device;
the IAC negotiation module is configured to negotiate with the second device to determine the specified IAC.
In some embodiments, the IAC negotiation module is configured to,
Transmitting the specified IAC to the second device upon receiving a first operation; or alternatively
And receiving the designated IAC sent by the second equipment under the condition of receiving the first operation.
In some embodiments, the apparatus further comprises: a first packet type switching module for switching the first packet type,
Switching a transmission packet type corresponding to the short-distance wireless communication connection from a first transmission packet type to a second transmission packet type under the condition that the channel quality corresponding to the short-distance wireless communication connection is lower than a first quality threshold; the transmission reliability of the second transmission packet type is higher than the transmission reliability of the first transmission packet type.
In some embodiments, the apparatus further comprises: a second packet type switching module for switching the packet type of the packet,
Switching a transmission packet type corresponding to the short-distance wireless communication connection from the first transmission packet type to a third transmission packet type under the condition that the channel quality corresponding to the short-distance wireless communication connection is higher than a second quality threshold; the transmission rate of the third transmission packet type is higher than the transmission rate of the first transmission packet type.
In some embodiments, the apparatus further comprises: a first transmit power setting module for setting, at least one of the first transmit power setting module,
And under the condition that the channel quality corresponding to the short-distance wireless communication connection is lower than a third quality threshold, improving the transmitting power corresponding to the short-distance wireless communication connection.
In some embodiments, the apparatus further comprises: a second transmit power setting module for setting, for,
And reducing the transmitting power corresponding to the short-distance wireless communication connection under the condition that the channel quality corresponding to the short-distance wireless communication connection is higher than a fourth quality threshold.
In some embodiments, the response sending module is configured to send a query response to the second device if the first device is in a specified connection establishment mode and the value of the visibility field indicates that the first device is visible to the second device;
The apparatus further comprises: the exit module is used for exiting the appointed connection establishment mode under the condition that the exit condition is met; wherein the exit condition includes: and the establishment of the short-distance wireless communication connection is completed, or the time length of disconnection of the short-distance wireless communication connection reaches a preset time period, or the execution of the transmission service corresponding to the short-distance wireless communication connection is completed.
Referring to fig. 9, a schematic structural diagram of a connection establishment apparatus according to an exemplary embodiment of the present application is shown. The connection establishment means 900 may be used to perform all or part of the steps performed by the second device in the embodiments as described above with reference to fig. 4 or 6; the device comprises:
a broadcast sending module 901, configured to send an inquiry broadcast, where the inquiry broadcast includes a visibility field; the visibility field is used to indicate a device visible to the second device;
A response receiving module 902 for receiving a query response, the query response being sent by a first device receiving the query broadcast if the value of the visibility field indicates that the first device is visible to the second device; the query response is for the second device to discover the first device;
a connection establishment module 903, configured to establish a short-distance wireless communication connection with the second device.
In some embodiments, the visibility field is a query access code, IAC, field; the value of the visibility field is the specified IAC.
In some embodiments, the apparatus further comprises: an IAC receiving module, or an IAC negotiating module;
The IAC receiving module is configured to receive the specified IAC input in the second device before the broadcast transmitting module transmits a query broadcast;
the IAC negotiation module is configured to negotiate with the first device to determine the designated IAC before the broadcast transmitting module transmits the query broadcast.
In some embodiments, the IAC negotiation module is configured to,
Receiving the designated IAC sent by the first device under the condition of receiving a second operation; or alternatively
Upon receiving a second operation, the specified IAC is sent to the first device.
In some embodiments, the apparatus further comprises: a first packet type switching module for switching the first packet type,
Switching a transmission packet type corresponding to the short-distance wireless communication connection from a first transmission packet type to a second transmission packet type under the condition that the channel quality corresponding to the short-distance wireless communication connection is lower than a first quality threshold; the transmission reliability of the second transmission packet type is higher than the transmission reliability of the first transmission packet type.
In some embodiments, the apparatus further comprises: a second packet type switching module for switching the packet type of the packet,
Switching a transmission packet type corresponding to the short-distance wireless communication connection from the first transmission packet type to a third transmission packet type under the condition that the channel quality corresponding to the short-distance wireless communication connection is higher than a second quality threshold; the transmission rate of the third transmission packet type is higher than the transmission rate of the first transmission packet type.
In some embodiments, the apparatus further comprises: a first transmit power setting module for setting, at least one of the first transmit power setting module,
And under the condition that the channel quality corresponding to the short-distance wireless communication connection is lower than a third quality threshold, improving the transmitting power corresponding to the short-distance wireless communication connection.
In some embodiments, the apparatus further comprises: a second transmit power setting module for setting, for,
And reducing the transmitting power corresponding to the short-distance wireless communication connection under the condition that the channel quality corresponding to the short-distance wireless communication connection is higher than a fourth quality threshold.
In some embodiments, the broadcast transmitting module is configured to transmit the query broadcast if the second device is in a specified connection establishment mode;
The apparatus further comprises: the exit module is used for exiting the appointed connection establishment mode under the condition that the exit condition is met; wherein the exit condition includes: and the establishment of the short-distance wireless communication connection is completed, or the time length of disconnection of the short-distance wireless communication connection reaches a preset time period, or the execution of the transmission service corresponding to the short-distance wireless communication connection is completed.
It should be noted that, when the apparatus provided in the foregoing embodiment performs the functions thereof, only the division of the respective functional modules is used as an example, in practical application, the foregoing functional allocation may be performed by different functional modules according to actual needs, that is, the content structure of the device is divided into different functional modules, so as to perform all or part of the functions described above.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Referring to fig. 10, a schematic structural diagram of a computer device 1000 according to an embodiment of the application is shown. The computer device 1000 may include: a processor 1001, a receiver 1002, a transmitter 1003, a memory 1004, and a bus 1005.
The processor 1001 includes one or more processing cores, and the processor 1001 executes various functional applications and information processing by running software programs and modules.
The receiver 1002 and the transmitter 1003 may be implemented as one communication component, which may be a communication chip. The communication chip may also be referred to as a transceiver.
The memory 1004 is connected to the processor 1001 through a bus 1005.
The memory 1004 may be used for storing a computer program for execution by the processor 1001 for carrying out the steps of the method embodiments described above.
Further, the memory 1004 may be implemented by any type of volatile or nonvolatile storage device or combination thereof, including but not limited to: magnetic or optical disks, electrically erasable programmable read-only memory, static random access memory, read-only memory, magnetic memory, flash memory, programmable read-only memory.
In an exemplary scenario, when the computer device 1000 is implemented as a first device, the processor 1001 may control the transceiver to receive a query broadcast sent by a second device, where the query broadcast includes a visibility field; the visibility field is used to indicate a device visible to the second device; transmitting a query response to the second device if the value of the visibility field indicates that the first device is visible to the second device; the query response is for the second device to discover the first device; a short-range wireless communication connection is established with the second device.
The processes performed by the processor 1001 and/or the transceiver in the computer device 1000 may refer to the steps performed by the first device in the method embodiments.
In one exemplary scenario, when the computer device 1000 is implemented as a second device, the processor 1001 may control the transceiver to send a query broadcast, the query broadcast including a visibility field therein; the visibility field is used to indicate a device visible to the second device; receiving a query response, the query response being sent by a first device receiving the query broadcast if a value of the visibility field indicates that the first device is visible to the second device; the query response is for the second device to discover the first device; a short-range wireless communication connection is established with the first device.
Wherein the processes performed by the processor 1001 and/or the transceiver in the computer device 1000 may refer to the steps performed by the second device in the method embodiments described above.
Embodiments of the present application also provide a computer readable storage medium having stored therein computer instructions that are loaded and executed by a processor to implement all or part of the steps performed by the first device or the second device in the above-described respective method embodiments.
The application also provides a chip for running in a computer device to cause the computer device to perform all or part of the steps performed by the first device or the second device in the above-described method embodiments.
The present application also provides a computer program product, or computer program, comprising computer instructions stored in a computer readable storage medium. The computer program product may be adapted to carry out all or part of the steps performed by the first device or the second device in the respective method embodiments described above.
The present application also provides a computer program product, or computer program, comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium and executes the computer instructions to cause the computer device to perform all or part of the steps performed by the first device or the second device in the various method embodiments described above.
The application also provides a computer program to be executed by a processor of a computer device to implement all or part of the steps performed by the first device or the second device in the above-described respective method embodiments.
Those skilled in the art will appreciate that in one or more of the examples described above, the functions described in the embodiments of the present application may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, these functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The foregoing description of the exemplary embodiments of the application is not intended to limit the application to the particular embodiments disclosed, but on the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the application.

Claims (23)

1. A method of connection establishment, the method performed by a first device, the method comprising:
receiving query broadcast sent by second equipment, wherein the query broadcast comprises a visibility field; the visibility field is used to indicate a device visible to the second device;
transmitting a query response to the second device if the value of the visibility field indicates that the first device is visible to the second device; the query response is for the second device to discover the first device;
A short-range wireless communication connection is established with the second device.
2. The method of claim 1, wherein the visibility field is a query access code, IAC, field; said sending a query response to the second device if the value of the visibility field is a specified value, comprising:
and in the case that the value of the visibility field is a specified IAC, sending the query response to the second device.
3. The method of claim 2, further comprising, prior to receiving the query broadcast sent by the second device:
receiving the specified IAC entered in the first device; or alternatively
Negotiating with the second device to determine the designated IAC.
4. The method of claim 3, wherein the negotiating with the second device to determine the designated IAC comprises:
Transmitting the specified IAC to the second device upon receiving a first operation; or alternatively
And receiving the designated IAC sent by the second equipment under the condition of receiving the first operation.
5. The method according to claim 1, wherein the method further comprises:
Switching a transmission packet type corresponding to the short-distance wireless communication connection from a first transmission packet type to a second transmission packet type under the condition that the channel quality corresponding to the short-distance wireless communication connection is lower than a first quality threshold; the transmission reliability of the second transmission packet type is higher than the transmission reliability of the first transmission packet type.
6. The method according to claim 1 or 5, characterized in that the method further comprises:
Switching a transmission packet type corresponding to the short-distance wireless communication connection from the first transmission packet type to a third transmission packet type under the condition that the channel quality corresponding to the short-distance wireless communication connection is higher than a second quality threshold; the transmission rate of the third transmission packet type is higher than the transmission rate of the first transmission packet type.
7. The method according to claim 1, wherein the method further comprises:
and under the condition that the channel quality corresponding to the short-distance wireless communication connection is lower than a third quality threshold, improving the transmitting power corresponding to the short-distance wireless communication connection.
8. The method according to claim 1 or 7, characterized in that the method further comprises:
And reducing the transmitting power corresponding to the short-distance wireless communication connection under the condition that the channel quality corresponding to the short-distance wireless communication connection is higher than a fourth quality threshold.
9. The method of claim 1, wherein the sending a query response to the second device if the value of the visibility field indicates that the first device is visible to the second device comprises:
transmitting a query response to the second device if the first device is in a specified connection setup mode and the value of the visibility field indicates that the first device is visible to the second device;
The method further comprises the steps of:
under the condition that the exit condition is met, exiting the designated connection establishment mode;
Wherein the exit condition includes:
and the establishment of the short-distance wireless communication connection is completed, or the time length of disconnection of the short-distance wireless communication connection reaches a preset time period, or the execution of the transmission service corresponding to the short-distance wireless communication connection is completed.
10. A method of connection establishment, the method performed by a second device, the method comprising:
Sending a query broadcast, wherein the query broadcast comprises a visibility field; the visibility field is used to indicate a device visible to the second device;
Receiving a query response, the query response being sent by a first device receiving the query broadcast if a value of the visibility field indicates that the first device is visible to the second device; the query response is for the second device to discover the first device;
a short-range wireless communication connection is established with the first device.
11. The method of claim 10, wherein the visibility field is a query access code, IAC, field; in the event that the value of the visibility field is a specified IAC, the value of the visibility field indicates that the first device is visible to the second device.
12. The method of claim 11, wherein prior to transmitting the query broadcast, further comprising:
receiving the specified IAC entered in the second device; or alternatively
Negotiating with the first device to determine the designated IAC.
13. The method of claim 12, wherein the negotiating with the first device to determine the designated IAC comprises:
receiving the designated IAC sent by the first device under the condition of receiving a second operation; or alternatively
Upon receiving a second operation, the specified IAC is sent to the first device.
14. The method according to claim 10, wherein the method further comprises:
Switching a transmission packet type corresponding to the short-distance wireless communication connection from a first transmission packet type to a second transmission packet type under the condition that the channel quality corresponding to the short-distance wireless communication connection is lower than a first quality threshold; the transmission reliability of the second transmission packet type is higher than the transmission reliability of the first transmission packet type.
15. The method according to claim 10 or 14, characterized in that the method further comprises:
Switching a transmission packet type corresponding to the short-distance wireless communication connection from the first transmission packet type to a third transmission packet type under the condition that the channel quality corresponding to the short-distance wireless communication connection is higher than a second quality threshold; the transmission rate of the third transmission packet type is higher than the transmission rate of the first transmission packet type.
16. The method according to claim 10, wherein the method further comprises:
and under the condition that the channel quality corresponding to the short-distance wireless communication connection is lower than a third quality threshold, improving the transmitting power corresponding to the short-distance wireless communication connection.
17. The method according to claim 10 or 16, characterized in that the method further comprises:
And reducing the transmitting power corresponding to the short-distance wireless communication connection under the condition that the channel quality corresponding to the short-distance wireless communication connection is higher than a fourth quality threshold.
18. The method of claim 10, wherein the sending a query broadcast comprises:
Transmitting the query broadcast in case the second device is in a designated connection establishment mode;
The method further comprises the steps of:
under the condition that the exit condition is met, exiting the designated connection establishment mode;
Wherein the exit condition includes:
and the establishment of the short-distance wireless communication connection is completed, or the time length of disconnection of the short-distance wireless communication connection reaches a preset time period, or the execution of the transmission service corresponding to the short-distance wireless communication connection is completed.
19. A connection establishment apparatus, the apparatus comprising:
the broadcast receiving module is used for receiving query broadcast sent by the second equipment, wherein the query broadcast comprises a visibility field; the visibility field is used to indicate a device visible to the second device;
A response sending module, configured to send a query response to the second device if the value of the visibility field indicates that the first device is visible to the second device; the query response is for the second device to discover the first device;
And the connection establishment module is used for establishing short-distance wireless communication connection with the second equipment.
20. A connection establishment apparatus, the apparatus comprising:
the broadcast sending module is used for sending query broadcast, wherein the query broadcast comprises a visibility field; the visibility field is used to indicate a device visible to the second device;
A response receiving module configured to receive a query response, the query response being sent by a first device that receives the query broadcast if a value of the visibility field indicates that the first device is visible to the second device; the query response is for the second device to discover the first device;
And the connection establishment module is used for establishing short-distance wireless communication connection with the second equipment.
21. A computer device comprising a processor, a memory, and a transceiver;
The memory has stored therein a computer program, which is executed by the processor to cause the computer device to implement the connection establishment method as claimed in any of the claims 1 to 18.
22. A computer readable storage medium having stored therein computer instructions for execution by a processor to implement the connection establishment method of any one of claims 1 to 18.
23. A chip for running in a computer device to cause the computer device to perform the connection establishment method of any of claims 1 to 18.
CN202410592455.0A 2024-05-13 Connection establishment method, device, apparatus, storage medium, and program product Pending CN118338460A (en)

Publications (1)

Publication Number Publication Date
CN118338460A true CN118338460A (en) 2024-07-12

Family

ID=

Similar Documents

Publication Publication Date Title
US11012551B2 (en) Walkie-talkie device, electronic apparatus, walkie-talkie information transmission method, and information transmission method
US11979251B2 (en) Home device control method and device
US9736691B2 (en) Method and system for providing Wi-Fi service by Wi-Fi device
JP3790186B2 (en) Device hiding
US7107010B2 (en) Short-range radio terminal adapted for data streaming and real time services
CN111615220B (en) Equipment connection method and equipment based on neighbor awareness network
KR101613170B1 (en) Apparatus and method for providing access point function in portable communication system
CN113660650B (en) Method and related device for device reconnection
KR102060434B1 (en) Apparatus and method for providing a wireless communication in a portable terminal
US20230032301A1 (en) Method and apparatus for indicating data transmission, communication device and storage medium
CN105451368B (en) Communication method and device
CN111083746A (en) Mode-switchable Bluetooth device, Bluetooth connection system and Bluetooth connection method
CN111757306B (en) External playing method and system based on earphone charging box and readable storage medium
CN113455026A (en) Access method and communication device
JP7173956B2 (en) COMMUNICATION METHOD, COMMUNICATION DEVICE, ELECTRONIC DEVICE, AND COMPUTER-READABLE STORAGE MEDIUM
US8521133B2 (en) System, method and terminal for communication between WAPI terminals
CN114844736B (en) Equipment and call control method
CN114844735B (en) Display equipment and voice forwarding method
CN114844983A (en) Display device, communication device and screen projection control method
CN116017379A (en) Communication method of Bluetooth device, prompting method of Bluetooth and Bluetooth system
CN118338460A (en) Connection establishment method, device, apparatus, storage medium, and program product
CN105682002A (en) Communication connection establishing method, data communication method and system
JP2003198672A (en) Portable communication terminal and its control method
US20230397253A1 (en) Data transmission method and apparatus, and communication device and storage medium
JP2002290604A (en) Mobile communication terminal device

Legal Events

Date Code Title Description
PB01 Publication