WO2023082966A1 - Neighbor discovery method and electronic device - Google Patents

Neighbor discovery method and electronic device Download PDF

Info

Publication number
WO2023082966A1
WO2023082966A1 PCT/CN2022/126526 CN2022126526W WO2023082966A1 WO 2023082966 A1 WO2023082966 A1 WO 2023082966A1 CN 2022126526 W CN2022126526 W CN 2022126526W WO 2023082966 A1 WO2023082966 A1 WO 2023082966A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
broadcast
electronic
group
channel
Prior art date
Application number
PCT/CN2022/126526
Other languages
French (fr)
Chinese (zh)
Inventor
曹倩
蒋钟寅
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023082966A1 publication Critical patent/WO2023082966A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management

Definitions

  • the present application relates to the technical field of communications, and in particular to a neighbor discovery method and electronic equipment.
  • neighbor discovery based on a neighbor discovery protocol (neighbor discovery protocol, NDP) is required to further establish a connection.
  • NDP neighbor discovery protocol
  • the Bluetooth-based device scanning process is the neighbor discovery process.
  • the point-to-point scanning process is as follows: an electronic device (referred to as electronic device #1 for convenience of distinction and description) can send broadcast messages through different broadcast channels in different broadcast periods, and another electronic device (for convenience of distinction and description, It is recorded as electronic device #2) randomly selects a broadcast channel to scan in the scanning period, and then scans another broadcast channel in the next scanning period. Only when electronic device #1 sends a broadcast message on a certain broadcast channel, the electronic Device #2 is also scanning the broadcast channel, and electronic device #1 can be found. Therefore, there is a probabilistic delay.
  • one electronic device needs to be scanned to find multiple electronic devices. For example, if a user's mobile phone needs to establish a connection with multiple other electronic devices at home, the mobile phone needs to scan the multiple electronic devices one by one in a point-to-point scanning manner to establish a connection with the multiple electronic devices. There is a probabilistic delay due to the discovery of each electronic device. When the number of electronic devices to be scanned increases, this probabilistic delay will also multiply, resulting in a longer time-consuming and higher delay in the entire discovery process, thereby affecting user experience.
  • the present application provides a neighbor discovery method and an electronic device, in order to reduce the probabilistic delay for the electronic device to discover surrounding electronic devices, shorten the duration of the entire discovery process, and improve user experience.
  • the present application provides a neighbor discovery method, which may be executed by the first electronic device, or may also be executed by a component configured in the first electronic device (such as a chip, a chip system, etc.), or , may also be realized by a logic module or software capable of realizing all or part of the functions of the first electronic device, which is not limited in this application.
  • the method includes: the first electronic device scans a first broadcast channel within a scanning period, the first broadcast channel is any one of a plurality of predefined broadcast channels, and in each broadcast period of at least one broadcast period Among them, broadcast messages are transmitted on at least two broadcast channels, and the broadcast messages are from electronic devices in the first device group; the first electronic device receives the first broadcast message sent by the second electronic device on the first broadcast channel message, establish a connection with the second electronic device, the second electronic device is an electronic device in the first device group; the first electronic device acquires the first neighbor description table from the second electronic device, and the first neighbor description table includes the first device group Device information for each electronic device in .
  • the first electronic device receives the first broadcast message sent by the second electronic device, indicating that at least one broadcast period overlaps the scanning period of the first electronic device in the time domain. In other words, only when at least one broadcast period overlaps with the scan period of the first electronic device in the time domain, the first electronic device may scan the first broadcast message sent by the second electronic device during the scan period.
  • the electronic devices in the same device group can send broadcast messages through different broadcast channels in the same broadcast period, so that the electronic devices to be added can scan any one of the broadcast channels, and can find one of the electronic devices in the device group. equipment.
  • the neighbor description table including the device information of all electronic devices in the device group is shared with each electronic device in the device group, so that the electronic device to be joined can discover the device group after discovering any electronic device in the device group All electronic equipment in. Therefore, the probability that the electronic device to be added successfully scans the surrounding electronic devices is improved, the probabilistic delay in finding the surrounding electronic devices is shortened, and the time for the electronic device to be added to perform a neighbor discovery process is shortened.
  • the greater the number of electronic devices in the device group the more significant the effect of the solution. Because the more electronic devices, the lower the probability of successful point-to-point single-device scanning, and the greater the probabilistic delay that may be caused. However, if the above solution is used, any node in the device group can be quickly discovered, which significantly reduces the neighbor discovery delay and improves user experience.
  • the number of electronic devices that send broadcast messages on multiple broadcast channels in each broadcast period is not greater than the number of multiple broadcast channels.
  • Multiple electronic devices in the first device group send broadcast messages by staggering, and the number of electronic devices that send broadcast messages on multiple broadcast channels in each broadcast period is not greater than the number of multiple broadcast channels. In other words, at the same time, multiple Each electronic device is distributed to send broadcast messages on different broadcast channels, which avoids resource collisions caused by multiple electronic devices sending broadcast messages on the same channel.
  • the method further includes: the first electronic device updates the first neighbor description table based on local device information to obtain a second neighbor description table; the second neighbor description table The table includes device information for each electronic device in the second device group, the second device group including the first electronic device and the electronic devices in the first device group.
  • the first electronic device After the first electronic device receives the first neighbor description table, it adds its own device information to the first neighbor description table to form the second neighbor description table.
  • the device information of the device also includes the device information of the first electronic device, so that other electronic devices in the device group can also obtain the device information of the first electronic device, realizing information sharing.
  • the first electronic device joins the first device group to form a second device group, and the second device group includes all electronic devices in the first device group and the first electronic device, so that the second device group
  • the electronic device in the device can establish a connection with any electronic device in the second device group based on the second neighbor description table, which speeds up the connection speed and improves user experience.
  • the device information includes: an identifier (identifier, ID) of the device, a broadcast channel of the device, and a broadcast time of the device, where the broadcast time of the device is used to indicate that the electronic device The time when the broadcast message was last sent.
  • the device information may include device information required to establish a connection between electronic devices, for example, device ID, device broadcast channel, and device broadcast time, so that the electronic devices in the device group do not need to perform the process of neighbor discovery again, and can Based on the above device information, fast connection is realized and user experience is improved.
  • the device information also includes one or more of the following: the ID of the device group, the number of electronic devices in the device group, link quality parameters, timestamps, and aging time, wherein the link quality parameters are used to indicate link quality.
  • the device information may also include relevant information for maintaining the neighbor description table, for example, the time stamp is used to indicate the update time of the device information of the electronic device; the aging time is used to determine whether the electronic device leaves the device group, which can be an absolute time, such as 9:15 may also be an interval time, such as 3 minutes, which is not limited in this application.
  • the neighbor description table it can be ensured that the electronic devices in the device group are all electronic devices that can be connected, avoiding that a certain electronic device has left the device group, but because another electronic device can query the electronic device based on the neighbor description table Device information, so connect to it, but fail to connect successfully.
  • the method further includes: the first electronic device establishes a connection with the third electronic device based on the device information of the third electronic device, and the third electronic device is the first The first electronic device in the device group wishes to establish a connection with the electronic device, and the third electronic device is any electronic device in the first device group.
  • the first electronic device After the first electronic device joins the first device group, it can establish a connection with any electronic device in the device group. If the first electronic device wishes to establish a connection with the third electronic device, the first electronic device can establish a connection based on the first neighbor description table , the device information of the third electronic device is queried, and a connection is established with the third electronic device based on the device information, without re-discovering the third electronic device, thereby shortening the time for establishing a connection and improving user experience.
  • the present application provides an electronic device that can implement the method in the foregoing first aspect and any possible implementation manner of the first aspect.
  • the electronic device comprises corresponding units for performing the method described above.
  • the units included in the device may be implemented by software and/or hardware.
  • the present application provides an electronic device, where the electronic device includes a processor.
  • the processor is coupled with the memory, and can be used to execute a computer program in the memory, so as to implement the first aspect and the neighbor discovery method in any possible implementation manner of the first aspect.
  • the electronic device further includes a memory.
  • the electronic device further includes a communication interface, and the processor is coupled to the communication interface.
  • the present application provides a computer-readable storage medium, in which a computer program or instruction is stored, and when the computer program or instruction is executed, the first aspect and any of the first aspect can be realized.
  • a neighbor discovery method in one possible implementation.
  • the present application provides a computer program product, where the computer program product includes an instruction, and when the instruction is executed, implement the neighbor discovery method in the first aspect and any possible implementation manner of the first aspect.
  • the present application provides a system-on-a-chip, where the system-on-a-chip includes a processor and may further include a memory, configured to implement the first aspect and the neighbor discovery method in any possible implementation manner of the first aspect.
  • the system-on-a-chip may consist of chips, or may include chips and other discrete devices.
  • FIG. 1 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a network architecture of a communication system applicable to an embodiment of the present application
  • Fig. 3 is a schematic diagram of the scanning process of the mobile phone scanning to find the smart speaker provided by the embodiment of the present application;
  • FIG. 4 is a schematic flowchart of a neighbor discovery method provided by an embodiment of the present application.
  • Fig. 5 is a schematic diagram of device information provided by the embodiment of the present application.
  • FIG. 6 is another schematic flowchart of a neighbor discovery method provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a first electronic device scanning and discovering a first device group provided by an embodiment of the present application.
  • words such as “first” and “second” are used to distinguish the same or similar items with basically the same function and effect.
  • the first electronic device and the second electronic device are used to distinguish different electronic devices, and their sequence is not limited.
  • words such as “first” and “second” do not limit the quantity and execution order, and words such as “first” and “second” do not necessarily limit the difference.
  • multiple means two or more.
  • “One or more of the following” or similar expressions refer to any combination of these items, including any combination of single or plural items.
  • one or more of a, b, or c may mean: a, b, c; a and b; a and c; b and c; or a and b and c.
  • the electronic device described in this application refers to an electronic device with a Bluetooth function.
  • the electronic device with bluetooth function in this application may be: a mobile phone, a tablet computer, a smart speaker, a bluetooth earphone, a wearable device, and the like.
  • wearable devices can also be called wearable smart devices, which is a general term for the application of wearable technology to intelligently design daily wear and develop wearable devices, such as smart watches and bracelets.
  • a wearable device is a portable device that is worn directly on the body or integrated into the user's clothing or accessories.
  • Wearable devices are not only a hardware device, but also achieve powerful functions through software support, data interaction, and cloud interaction.
  • Generalized wearable smart devices include full-featured, large-sized, complete or partial functions without relying on smart phones, such as smart watches or smart glasses, etc., and only focus on a certain type of application functions, and need to cooperate with other devices such as smart phones Use, such as various smart bracelets and smart jewelry for physical sign monitoring.
  • FIG. 1 shows a schematic structural diagram of an electronic device 100 .
  • the electronic device 100 may include a processor 110, a radio frequency unit 120, a power supply 130, a memory 140, an input unit 150, a display unit 160, a sensor 170, an audio circuit 180, and a wireless fidelity (Wi- F) module 190, and Bluetooth module 1100.
  • a processor 110 may include a processor 110, a radio frequency unit 120, a power supply 130, a memory 140, an input unit 150, a display unit 160, a sensor 170, an audio circuit 180, and a wireless fidelity (Wi- F) module 190, and Bluetooth module 1100.
  • Wi- F wireless fidelity
  • the processor 110 is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device, by running or executing software programs and/or modules stored in the memory 140, and calling data stored in the memory 140 , to perform various functions of the electronic equipment and process data, so as to monitor the electronic equipment as a whole.
  • Processor 110 may include one or more processing units.
  • the processor 110 can integrate an application processor and a modem processor.
  • the application processor mainly processes the operating system, user interface, application program, etc.
  • the modem processor mainly processes wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 110 .
  • the radio frequency unit 120 can be used for sending and receiving information or receiving and sending signals during a call. Specifically, after receiving the downlink information of the base station, it is processed by the processor 110; in addition, the uplink data is sent to the base station.
  • the radio frequency unit 120 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like.
  • the radio frequency unit 120 can also communicate with the network and other devices through wireless communication.
  • the above wireless communication can use any communication standard or protocol, including but not limited to global system of mobile communication (global system of mobile communication, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access 2000 (code division multiple access 2000, CDMA2000), wideband code division multiple access (WCDMA), time division synchronous code division multiple access (time division-synchronous code division multiple access, TD-SCDMA), frequency division duplex long-term evolution (frequency division duplexing-long term evolution, FDD-LTE) and time division duplex long-term evolution (time division duplexing-long term evolution, TDD-LTE), etc.
  • GSM global system of mobile communication
  • GPRS general packet radio service
  • code division multiple access 2000 code division multiple access 2000, CDMA2000
  • WCDMA wideband code division multiple access
  • time division synchronous code division multiple access time division-synchronous code division multiple access
  • TD-SCDMA time division-synchronous code division multiple access
  • frequency division duplex long-term evolution frequency division duplexing-long term evolution, FDD-
  • the power supply 130 (such as a battery) is used to supply power to various components.
  • the power supply 130 can be logically connected to the processor 110 through a power management system, so that functions such as charging, discharging, and power consumption management can be implemented through the power management system.
  • the memory 140 can be used to store software programs and modules, and the processor 110 executes various functional applications and data processing of the electronic device by running the software programs and modules stored in the memory 140 .
  • the memory 140 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playback function, an image playback function, etc.), a boot loader (boot loader) etc.; the storage data area can store data created according to the use of the electronic device (such as audio data, phone book, etc.) and the like.
  • the memory 140 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.
  • the input unit 150 may be used to receive input numbers or character information, and generate key signal input related to user settings and function control of the electronic device.
  • the input unit 150 may include a touch panel 1501 and other input devices 1502 .
  • the touch panel 1501 also referred to as a touch screen, can collect touch operations of the user on or near it (for example, the user uses any suitable object or accessory such as a finger and a stylus on the touch panel 1501 or near the touch panel 1501). operation), and drive the corresponding connection device according to the preset program.
  • the touch panel 1501 may include two parts, a touch detection device and a touch controller.
  • the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to the to the processor 110, and can receive and execute commands sent by the processor 110.
  • various types of touch panels such as resistive, capacitive, infrared, and surface acoustic wave, can be used to realize the touch panel.
  • the input unit 150 may also include other input devices 1502 .
  • other input devices 1502 may include, but are not limited to, one or more of physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, joysticks, and the like.
  • the display unit 160 may be used to display information input by or provided to the user and various menus of the electronic device.
  • the display unit 160 may include a display panel 1601.
  • the display panel 1601 may be configured in the form of a liquid crystal display (liquid crystal display, LCD) or an organic light-emitting diode (OLED).
  • the touch panel 1501 can cover the display panel 1601, and when the touch panel 1501 detects a touch operation on or near it, it sends it to the processor 110 to determine the type of the touch event, and then the processor 110 according to the touch event The type provides a corresponding visual output on the display panel 1601.
  • the touch panel 1501 and the display panel 1601 are used as two independent components to realize the input and input functions of the electronic device, in some embodiments, the touch panel 1501 and the display panel 1601 can be integrated. And realize the input and output function of electronic equipment.
  • the electronic device 100 may also include at least one sensor 170, such as a light sensor, a motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1601 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 1601 or backlight.
  • the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when it is stationary, and can be used to identify the posture of electronic equipment (such as horizontal and vertical screen switching, Related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tap), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors that can be configured for electronic devices, here No longer.
  • the audio circuit 180 can transmit the electrical signal converted from the received audio data to the speaker 1801, and the speaker 1801 converts it into an audio signal for output; After being received, it is converted into audio data, and then the audio data is output to the processor 110 for processing, and then sent to another electronic device through the radio frequency unit 120, or the audio data is output to the memory 140 for further processing.
  • Wi-Fi is a short-distance wireless transmission technology. Electronic devices can help users send and receive emails, browse web pages, and access streaming media through the Wi-Fi module 190, which provides users with wireless broadband Internet access.
  • Fig. 1 shows the Wi-Fi module 190, it can be understood that it is not a necessary component of the electronic device, and can be completely omitted as required without changing the essence of the invention.
  • the Bluetooth technology also belongs to the short-distance wireless transmission technology.
  • the electronic device can establish a Bluetooth connection with other electronic devices equipped with the Bluetooth module through the Bluetooth module 1100, so as to perform data transmission based on the Bluetooth communication link.
  • the bluetooth module 1100 can be a bluetooth low energy (bluetooth low energy, BLE) module according to actual needs. It can be understood that, in the embodiment of the present application, the electronic device includes a Bluetooth module.
  • the electronic devices discover each other through Bluetooth scanning, and then establish a connection with the other party to perform service transmission. Therefore, the electronic device involved in the embodiment of the present application has a Bluetooth function, in other words, the electronic device involved in the embodiment of the present application includes a Bluetooth module.
  • the structure illustrated in this application does not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or fewer components than shown, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • FIG. 2 is a schematic diagram of a network architecture of a communication system 200 applicable to an embodiment of the present application.
  • the communication system 200 includes: an electronic device 210 and a device group 220 , and the device group 220 includes electronic devices 2201 to 2203 .
  • the electronic devices 2201 to 2203 may be different types of electronic devices, including but not limited to, smart speakers, tablet computers, smart watches, and other electronic devices not shown in the figure, such as notebook computers, smart TVs, etc.
  • the electronic device 210 may discover any electronic device in the device group 220 based on the NDP scan, and then establish a connection with the electronic device to perform service transmission.
  • An electronic device outside the device group 220 such as the electronic device 210 shown in the figure, can discover any electronic device in the device group 220 by scanning, and then discover all electronic devices in the device group.
  • neighbor discovery can be realized through peer-to-peer scanning.
  • an electronic device 210 such as a mobile phone
  • the smart speaker sends broadcast messages on different broadcast channels sequentially during different broadcast periods, such as broadcast period #1, broadcast period #2, and broadcast period #3 shown in the figure, for example, Broadcast messages are sent on channel 37, channel 38, and channel 39 in sequence.
  • the multiple broadcast channels are predefined broadcast channels used to send broadcast messages during the neighbor discovery process, for example, they may be multiple broadcast channels predefined by a protocol.
  • the mobile phone scans on one of the broadcast channels, such as channel 37, during its scanning period, and scans another broadcast channel, such as channel 38, during the next scanning period. It can be seen from the figure that after the mobile phone scans on channel 37, the smart speaker does not send a broadcast message on this channel.
  • the mobile phone cannot scan the smart speaker and needs to wait for the next scanning period. Continue to scan. It is not difficult to find that this point-to-point scanning method requires that when the smart speaker sends a broadcast message on a certain broadcast channel, the mobile phone happens to scan on the same broadcast channel to find the other party. Therefore, the mobile phone scans the smart speaker within a scanning period. The probability of the speaker is low, and it may take several scanning periods to successfully scan the smart speaker, resulting in a longer scanning process. It is conceivable that if there are multiple electronic devices in the family, the mobile phone needs to scan and discover all the electronic devices in the family one by one, and display them on the interface of the mobile phone one by one, and the time spent on the scanning process will increase exponentially. , the user needs to wait for a long time to see all available electronic devices nearby on the mobile phone interface, which affects the user experience.
  • a device group may include multiple electronic devices, and each electronic device in the same device group shares its own device information, forming a neighbor description table including the device information of each electronic device in the same device group.
  • Electronic devices in the same device group can send broadcast messages through different broadcast channels within the same broadcast period. No matter which broadcast channel the electronic device to join can scan, it can find an electronic device in the device group.
  • Each electronic device in has the neighbor description table, so that the electronic device to be added can discover all electronic devices in the device group.
  • the electronic devices in the same device group send broadcast messages on different channels at the same time, which improves the probability of successful scanning of the electronic devices to be added, thereby reducing the time delay of the neighbor discovery process of the electronic devices to be added, and shortening the waiting time.
  • the added electronic device scans and discovers the time for surrounding electronic devices, which improves user experience.
  • device group #1 includes electronic device #1 and electronic device #2.
  • the number of the device group can be increased by one.
  • adding an electronic device to the device group #1, such as electronic device #3, can form the device group #2.
  • the corresponding neighbor description table is also updated accordingly.
  • the establishment process of the device group #1 will be described below first, and then the neighbor discovery method based on the established device group will be described in detail. It should be understood that the established device group mentioned here may be device group #1, or may be a new device group obtained by performing one or more updates on the basis of device group #1. This embodiment of the present application does not limit it.
  • FIG. 4 is a schematic flowchart of a neighbor discovery method 400 provided by an embodiment of the present application.
  • the method 400 shown in FIG. 4 may include S410 to S450. Firstly, the process of establishing a device group #1 by electronic device #1 and electronic device #2 will be described in detail below in conjunction with FIG. 4 .
  • the electronic device #1 sends broadcast messages through multiple broadcast channels within multiple broadcast periods.
  • each broadcast period may occupy a time slot, and within the broadcast period, the electronic device may send broadcast messages on multiple broadcast channels.
  • the multiple broadcast channels are predefined broadcast channels used to send broadcast messages during the neighbor discovery process, for example, they may be multiple broadcast channels predefined by a protocol.
  • the time interval between any two broadcast periods in the plurality of broadcast periods can be fixed, as shown in Figure 3, the time interval between broadcast period #1 and broadcast period #2 is the same as that between broadcast period #2 and broadcast period #2.
  • the time interval between period #3 is the same.
  • the time length of any two broadcast periods in multiple broadcast periods may be different.
  • the time length of each broadcast period is related to the length of the data part in the broadcast message.
  • the different lengths of the data part of different broadcast messages may cause the broadcast period to be different Different lengths. Therefore, after the time synchronization between the electronic devices, the start time of sending the broadcast message by the electronic device #1 can be fixed, that is to say, the time interval between any two broadcast periods is the same.
  • electronic device #1 sends broadcast messages on different broadcast channels at fixed intervals, that is, electronic device #1 can send broadcast messages on different broadcast channels during different broadcast periods, and different broadcast periods The time interval between any two broadcast periods in is the same.
  • electronic device #1 (such as the smart speaker in FIG. 3 ) sends a broadcast message on channel 37 during broadcast period #1, sends a broadcast message on channel 38 during broadcast period #2, and sends a broadcast message on channel 38 during broadcast period #2.
  • 3 Send a broadcast message on channel 39.
  • the electronic device #2 randomly selects a broadcast channel to scan within the scanning period.
  • electronic device #1 sends broadcast messages through multiple broadcast channels.
  • the broadcast message sent by electronic device #1 is recorded as a second broadcast message.
  • Electronic device #2 may randomly select a broadcast channel from multiple broadcast channels to scan. For example, in the broadcast channel shown in FIG. 3, electronic device #2 selects channel 37 to scan during the scanning period. It should be understood that FIG. 3 only shows a scanning period, but this embodiment should not be construed as any limitation. Multiple scanning periods may be included, and electronic device #2 may select channel 38 to scan in the next scanning period.
  • electronic device #1 sending a broadcast message and electronic device #2 scanning a broadcast channel
  • electronic device #2 sends a broadcast message. That is to say, when two electronic devices establish a device group, the electronic device that sends the broadcast message and the electronic device that scans the broadcast channel are random.
  • smart speaker #1 sends a broadcast message
  • smart speaker #2 scans the broadcast channel to discover the other party and establish a device group
  • smart speaker #1 scans the broadcast channel
  • smart speaker #2 sends a broadcast message. This is not limited.
  • the electronic device #2 receives the broadcast message from the electronic device #1.
  • Electronic device #2 randomly selects a broadcast channel to scan, and when electronic device #2 scans a broadcast message sent by electronic device #1 on a certain broadcast channel, it receives the broadcast message from electronic device #1, that is, the second broadcast message . After receiving the broadcast message, electronic device #2 identifies the broadcast message, and determines the electronic device sending the broadcast message based on the broadcast message. It can be understood that the electronic device corresponds to the address of the electronic device sending the broadcast message, the data part of the broadcast message carries the sending address of the electronic device, and the electronic device #2 obtains the address of the electronic device that sent the broadcast message based on the broadcast message, and can determine The electronic device that sent the broadcast message.
  • electronic device #2 discovers electronic device #1 based on BLE scanning.
  • the multiple broadcast channels are channel 37, channel 38, and channel 39.
  • Electronic device #1 sends broadcast messages on channel 37, channel 38, and channel 39 sequentially during different broadcast periods.
  • Channel 37 is selected for scanning, channel 38 is scanned in the next scanning period, and so on.
  • electronic device #1 is sending a broadcast message on channel 37
  • electronic device #2 happens to be in the scanning period and scanning channel 37, then electronic device # scans the broadcast message sent by electronic device #1, receives the broadcast message, And based on the broadcast message, it is determined that the electronic device #1 that sent the broadcast message, that is, the electronic device #2 discovers the electronic device #1.
  • the electronic device #1 establishes a connection with the electronic device #2.
  • electronic device #2 After electronic device #2 discovers electronic device #1, it sends a connection request message to electronic device #1, and accordingly, electronic device #1 sends a response message to electronic device #2, and the electronic device #1 establishes a connection with electronic device #2.
  • the electronic device #1 and the electronic device #2 form a device group #1.
  • device information can be exchanged, and each electronic device can form a third neighbor description table based on its own device information and received device information from the peer.
  • the above-mentioned third neighbor description table includes the device information of the electronic device #1 and the device information of the electronic device #2. After establishing a connection between electronic device #1 and electronic device #2, they exchange device information, that is, electronic device #1 sends its own device information to electronic device #2, and electronic device #2 forms a third neighbor description table after receiving it.
  • the third neighbor description table includes device information of electronic device #1 and device information of electronic device #2.
  • electronic device #2 may also receive the device information of electronic device #1 to form a third neighbor description table.
  • the electronic device #1 and the electronic device #2 in the device group #1 share the device information of each electronic device in the third neighbor description table. Any electronic device in the device group #1 can query the device information of each electronic device in the device group #1 through the third neighbor description table.
  • the device information exchanged between electronic device #1 and electronic device #2 includes: the ID of the electronic device, the broadcast channel of the electronic device, and the broadcast time of the electronic device.
  • the ID of the above-mentioned electronic device may correspond to a device address (device address), for example including but not limited to, a public device address (public device address), or a static device address (static device address), or a resolvable device address (resolvable device address) wait.
  • the broadcast channel of the electronic device is used to indicate the channel on which the electronic device sends the broadcast message
  • the broadcast time of the electronic device is used to indicate the time when the electronic device sends the broadcast message on the broadcast channel. For example, electronic device #1 needs to obtain the time and channel when electronic device #2 sends a broadcast message, so that electronic device #1 can communicate with electronic device #2 at the same time and on the same channel without performing the scanning discovery process again.
  • the device information exchanged between electronic device #1 and electronic device #2 also includes one or more of the following: ID of the device group, number of electronic devices in the device group, link quality parameters, time Stamp, and aging time.
  • the link quality parameter is used to indicate the link quality, such as received signal strength indication (received signal strength indication, RSSI); the timestamp is used to indicate the update time of the device information of the electronic device; the aging time is used to judge whether the electronic device is Leaving the device group may be an absolute time, such as 9:15, or an interval time, such as 3 minutes, which is not limited in this embodiment of the present application.
  • received signal strength indication received signal strength indication
  • RSSI received signal strength indication
  • the timestamp is used to indicate the update time of the device information of the electronic device
  • the aging time is used to judge whether the electronic device is Leaving the device group may be an absolute time, such as 9:15, or an interval time, such as 3 minutes, which is not limited in this embodiment of the present application.
  • the device information in the neighbor description table may include: the ID of the device group #1, the ID of the electronic device, the number of electronic devices in the device group #1, the link quality parameter, the ID of the electronic device Broadcast channel, broadcast time of the electronic device, timestamp, and aging time.
  • the time stamp indicates the time of joining the device group #1
  • the time stamp and the aging time can be used to maintain the neighbor description table
  • the aging time can be used to judge whether the electronic device leaves the device group.
  • the Bluetooth protocol stack framework includes, but is not limited to, a host (host) protocol stack, a host controller interface (host controller interface, HCI), and a controller (controller).
  • the host protocol stack defines a generic access profile (generic access profile, GAP), and the GAP stores related information (Profile) for device connection.
  • GAP generic access profile
  • the information in the neighbor description table is newly added to the Profile, that is, the device information of each electronic device in the device group, such as the ID of the electronic device, the broadcast channel of the electronic device, the broadcast time of the electronic device, and the device group ID, number of electronic devices in the device group, link quality parameters, time stamp, and aging time, etc.
  • the profile exchange in the device group can be through private profiles, and these profiles are all stored in the host protocol stack. In other words, the above-mentioned device information exchanged by the electronic devices in the device group can be identified by the other party.
  • time synchronization is performed.
  • time synchronization can be performed based on a precision time protocol (precision time protocol, PTP).
  • PTP precision time protocol
  • any electronic device outside the device group #1 can discover any electronic device in the device group #1 by scanning, and then discover all the electronic devices in the device group #1.
  • electronic device #3 may scan and discover any electronic device in device group #1 based on the flow shown in FIG. 4 to form device group #2.
  • Device group #2 includes electronic device #1 and electronic device #2.
  • electronic device #3 electronic device #3 can also form a neighbor description table of device group #2 by sending its own device information to other electronic devices and receiving neighbor description tables from other electronic devices.
  • electronic device #4 may discover any electronic device in device group #2 by scanning. The process of the electronic device #4 discovering the device group #2 and joining the device group #2 will be described in detail below with reference to FIG. 6 .
  • FIG. 6 is a schematic flowchart of a neighbor discovery method 600 provided by an embodiment of the present application.
  • the method 600 shown in FIG. 6 may include S610 to S640, and each step in FIG. 6 will be described in detail below.
  • channels used to send broadcast messages include a first broadcast channel, a second broadcast channel, and a third broadcast channel.
  • device group #2 is an example of the first device group
  • electronic device #4 is an example of the first electronic device.
  • the first device group may include more or fewer electronic devices, and this embodiment of the present application does not limit the number of electronic devices in the first device group.
  • the electronic device #4 scans the first broadcast channel among the predefined multiple broadcast channels within the scan period.
  • the electronic device #4 wants to join the device group #2, therefore, the electronic device #4 scans the broadcast message, and the electronic devices in the device group #2 send the broadcast message, in other words, the electronic device that wishes to join the device group scans the device group Broadcast messages sent by electronic devices.
  • broadcast messages from electronic devices in device group #2 are transmitted on at least two broadcast channels among the plurality of predefined broadcast channels.
  • the aforementioned multiple predefined broadcast channels are broadcast channels used to send broadcast messages during the neighbor discovery process, for example, they may be multiple predefined broadcast channels defined by the protocol.
  • each broadcast period occupies a time slot.
  • at least two electronic devices in the first device group send broadcast messages on different broadcast channels.
  • each electronic device in device group #2 After time synchronization, each electronic device in device group #2 sends broadcast messages on different broadcast channels in turn, for example, multiple broadcast channels include the first broadcast channel, the second broadcast channel, and the third broadcast channel, and device group # 2 includes electronic device #1, electronic device #2, and electronic device #3.
  • Electronic device #1 sends broadcast messages on the first broadcast channel, the second broadcast channel, and the third broadcast channel in sequence in different broadcast periods
  • electronic device #2 sends broadcast messages on the next channel of the broadcast channel on which electronic device #1 sends broadcast messages Broadcast messages, that is, send broadcast messages on the second broadcast channel, the third broadcast channel, and the first broadcast channel in sequence
  • electronic device #3 sends broadcast messages on the next channel of the broadcast channel that electronic device #2 sends broadcast messages, that is, sequentially Broadcast messages are sent on the third broadcast channel, the first broadcast channel, and the second broadcast channel. It can be known from the above that the electronic devices in the first device group have been time-synchronized.
  • electronic device #1, electronic device #2, and electronic device #2 are respectively transmitted on the three broadcast channels
  • electronic device #4 randomly selects a broadcast channel (such as the first broadcast channel) to scan, and can scan the broadcast message of one of the electronic devices.
  • broadcast messages sent by electronic device #3, electronic device #1, and electronic device #2 are respectively transmitted on the three broadcast channels, and then electronic device #4 randomly selects a broadcast channel to scan, Can scan the broadcast message of one of the electronic devices.
  • the electronic device #4 can scan the broadcast message of one of the electronic devices, for the sake of brevity, details will not be repeated here.
  • the first electronic device receives the first broadcast message sent by the second electronic device, indicating that at least one broadcast period overlaps the scanning period of the first electronic device in the time domain. In other words, only when at least one broadcast period overlaps with the scan period of the first electronic device in the time domain, the first electronic device may scan the first broadcast message sent by the second electronic device during the scan period.
  • Fig. 7 is an example of electronic device #4 scanning and discovering device group #2 provided by the embodiment of the present application.
  • the electronic devices in device group #2 include electronic device #1, electronic device #2, and electronic device #3
  • multiple broadcast channels include channel 37, channel 38, and Channel 39.
  • Electronic device #3 sends broadcast messages on channel 37, channel 38, and channel 39 in sequence
  • electronic device #2 sends broadcast messages on channel 38, channel 39, and channel 37 in sequence
  • electronic device #1 sends broadcast messages on channel 39, channel 37, and
  • the broadcast message is sent on the channel 38. It can be seen that in each broadcast period, any one of the multiple broadcast channels transmits a broadcast message.
  • the scanning period of electronic device #4 overlaps with the second broadcasting period and the third broadcasting period in the time domain, then electronic device #4 selects channel 37 to start scanning during the scanning period, and can scan to electronic device #1 to send broadcast message. It can be seen that if electronic device #4 selects channel 38 to start scanning during the scanning period, it can also scan the broadcast message sent by electronic device #3; if electronic device #4 selects channel 39 to start scanning during the scanning period, it can also scan to the electronic message
  • the broadcast message sent by device #2 in other words, no matter which broadcast channel electronic device #4 chooses to scan, the broadcast message can be scanned, which greatly improves the probability of successful scanning of electronic device #4 and reduces the scanning time .
  • a possible situation is that the number of electronic devices in device group #2 is greater than the number of broadcast channels, such as the number of electronic devices in device group #2 is N, and the number of broadcast channels is M, then the number of electronic devices from device group #2 M electronic devices are randomly selected from the N electronic devices, and the M electronic devices send broadcast messages on different broadcast channels at the same time.
  • N>M ⁇ 1 and M and N are integers.
  • the time interval for the electronic device to send a broadcast on a certain broadcast channel is longer than the time for sending a broadcast message. short, the electronic device needs to be woken up frequently, resulting in more power consumption; when the time interval between two broadcast messages sent by the electronic device on the broadcast channel is long, the broadcast channel may appear idle, When scanning, it cannot be scanned. Therefore, when the number of electronic devices in the device group is greater than the number of broadcast channels, the electronic devices in the device group can also use the following method to send broadcast messages.
  • a possible implementation is, for any electronic device in the device group, increase the time interval between two broadcast messages sent by the electronic device on the same channel, during which other devices in the device group can Broadcast messages are sent on this channel respectively.
  • the original electronic device #3 sends a broadcast message on channel 37 every 3 minutes.
  • the time interval for electronic device #3 to send broadcast messages on channel 37 twice can be increased. as long as 5 minutes, other devices in the device group can respectively send broadcast messages on the channel during this time period.
  • the broadcast message can be sent between the electronic device #3 and the electronic device #1, and the electronic device #6 can send the broadcast message after the electronic device #2, thereby increasing the probability that the electronic device #4 scans the broadcast message.
  • the number of electronic devices in device group #2 is less than the number of broadcast channels, such as the number of electronic devices in device group #2 is N, and the number of broadcast channels is M, then from M broadcast channels N broadcast channels are selected, and the electronic devices in the first device group send broadcast messages on the above N broadcast channels.
  • M-N broadcast channels among the M broadcast channels are idle.
  • at least two broadcast channels transmit broadcast messages. Compared with broadcast messages on only one broadcast channel, the probability of successful scanning of electronic device #4 is also improved, and the scanning time is shortened. .
  • the number of electronic devices sending broadcast messages on multiple broadcast channels in each broadcast period is not greater than the number of multiple broadcast channels.
  • Electronic device #4 establishes a connection with electronic device #1 based on the first broadcast message received from electronic device #1 on the first broadcast channel.
  • the electronic device #1 is an example of the second electronic device.
  • Electronic device #4 randomly selects a certain broadcast channel to scan within the scanning period, assuming that electronic device #4 scans the first broadcast message on the first broadcast channel, wherein the first broadcast channel is broadcast by any one of the multiple broadcast channels channel. After the electronic device #4 scans the first broadcast message, based on the first broadcast message, determine the electronic device that sends the first broadcast message, for example, as shown in FIG. 7, the electronic device #4 scans the channel 37 within the scanning period, receives For the broadcast message on the channel 37, the electronic device #4 determines that the electronic device sending the broadcast message is the electronic device #1 based on the broadcast message.
  • the electronic device corresponds to the address of the electronic device sending the broadcast message, and the data part of the broadcast message carries the sending address of the electronic device, and the electronic device #4 obtains the address of the electronic device that sent the broadcast message based on the broadcast message, and can determine The electronic device that sent the broadcast message.
  • electronic device #1 is an electronic device discovered by electronic device #4
  • electronic device #4 After electronic device #4 receives the first broadcast message sent by electronic device #1, it sends a message requesting connection to electronic device #1.
  • electronic device #1 #1 sends a response message to electronic device #4, and the two establish a connection.
  • the electronic device #4 obtains the first neighbor description table from the electronic device #1.
  • electronic device #4 After electronic device #4 establishes a connection with electronic device #1, electronic device #4 obtains a first neighbor description table from electronic device #1, and updates the first neighbor description table based on local device information to obtain a second neighbor description table. It can be understood that electronic device #4 is newly added to device group #2 to form a new device group, which is denoted as device group #3.
  • Device group #3 is an example of the second device group.
  • the second device group may include more or less electronic devices, which is not limited in this embodiment of the present application.
  • the second neighbor description table includes the device information of each electronic device in the device group #2 and the device information of the electronic device #4. In other words, compared with the first neighbor description table, the second neighbor description table adds electronic device
  • the device information of #4 that is, the second neighbor description table includes the device information of each electronic device in the device group #3.
  • a possible implementation is that after the electronic device #4 establishes a connection with the electronic device #1, the electronic device #1 sends the first neighbor description table to the electronic device #4, and the electronic device #4 obtains the first neighbor description table, Based on the local device information, the first neighbor description table is updated to obtain the second neighbor description table. It can be understood that after electronic device #4 receives the first neighbor description table, it can add its own device information to the first neighbor description table to form a second neighbor description table.
  • electronic device #1 updates the first neighbor description table.
  • electronic device #4 can send its own device information to electronic device #1, and electronic device #1 adds the device information of electronic device #4 to the first neighbor description table, and updates the first neighbor description table , get the second neighbor description table.
  • electronic device #4 can also directly send the second neighbor description table to electronic device 1, and electronic device #1 can obtain all electronic devices in device group #3 after receiving the second neighbor description table device information.
  • the electronic device #4 may notify all remaining electronic devices in the device group #2 of the local device information, and trigger the remaining electronic devices to update the first neighbor description table to form the second neighbor description table.
  • electronic device #4 may perform time synchronization based on PTP, and specific steps may refer to known technologies, which are not described in detail here for brevity.
  • the electronic device #4 establishes a connection with the electronic device #3 based on the device information of the electronic device #3.
  • Electronic device #3 is an example of the third electronic device.
  • Electronic device #4 can also select any electronic device in device group #3 that wishes to establish a connection based on the device information of each electronic device in the second neighbor description table, and based on the device information of the electronic device in the second neighbor description table, and The electronic device establishes a connection.
  • electronic device #4 can obtain the ID of the electronic device, the broadcast channel of the electronic device, and the broadcast time of the electronic device (that is, the time when the electronic device last sent a broadcast message) based on the second neighbor description table. Having performed time synchronization, electronic device #4 can calculate the broadcast channel and broadcast time of the electronic device (such as electronic device #3) wishing to establish a connection based on the above information.
  • Electronic device #4 establishes a connection with electronic device #3 at the same time and on the same channel after determining the next broadcasting or listening channel and time of electronic device #3 wishing to establish a connection. Wherein, whether the electronic device #3 broadcasts or listens is determined based on the state machine. For example, if the electronic device #3 is in the broadcasting state, the electronic device #4 will listen; if the electronic device #3 is in the listening state, then the electronic device #4 will broadcast.
  • each electronic device in device group #3 can share the device information in the second neighbor description table. Therefore, if any two electronic devices in device group #3 want to establish a connection, they can query the second neighbor description The device information in the table establishes a connection without the need to scan again, which speeds up the connection rate and improves the user experience.
  • electronic device #4 can know the time and broadcast channel when electronic device #3 sends a broadcast message based on local calculation, and Acquire the device information of electronic device #3 from the second neighbor description table. After the electronic device #4 disconnects from the electronic device #1, it sends a connection request to the electronic device #3 to establish a connection with the electronic device #3. Among them, electronic device #4 calculates the channel on which electronic device #3 will broadcast and the broadcast time according to the broadcast channel and broadcast time of electronic device #3 in the neighbor description table, and electronic device #4 can perform detection on this channel. Listen, establish connection with electronic device #3. Alternatively, if electronic device #3 is in the listening state, then electronic device #4 can broadcast at the same time and on the same channel.
  • the broadcast time of electronic device #3 in the neighbor description table is the time when electronic device #3 sent a broadcast message last time.
  • Electronic device #4 can query the number of electronic devices in device group #3 in the neighbor description table and the broadcast time of electronic device #3, and calculate the next broadcast time of electronic device #3 according to a predefined algorithm, and device group # 3 all use the same predefined algorithm.
  • the electronic devices in the device group #3 need to determine whether the other party leaves the device group #3, so as to update the information in the second neighbor description table. For example, electronic device #3 has left device group #3, but the device information of electronic device #3 still exists in the second neighbor description table, then electronic device #4 establishes a connection with electronic device #3 based on the device information, and a connection will be generated. In case of failure, it is therefore crucial to update the information in the second neighbor description table in a timely manner.
  • a possible design is to determine whether the other party leaves the device group #3 by receiving a heartbeat packet.
  • electronic device #4 Taking electronic device #4 as an example, if electronic device #4 receives the heartbeat packet sent by electronic device #1, then in the second Update the time when electronic device #1 joins the device group in the neighbor description table. For example, the original time stamp is 9:00, the aging time is 3 minutes, and the time when the heartbeat packet is received is 9:02, then update its time stamp is 9:02, no need to update the aging time. For another example, if the original timestamp is 9:00, the aging time is 9:03, and the time when the heartbeat packet is received is 9:02, then the timestamp is updated to 9:02 and the aging time is 9:05, which is understandable.
  • the aging time is calculated with the updated timestamp. Therefore, when the aging time is a specific time point, the aging time also needs to be updated. If the electronic device #1 reaches the aging time, but the electronic device #4 has not received the heartbeat packet, it is determined that the electronic device #1 leaves the device group #3, and sends the first message to the remaining electronic devices in the device group #3, the second A message for instructing electronic device #1 to leave device group #3.
  • Another possible design is to notify the other party to leave the device group #3 by directly sending information indicating to leave.
  • electronic device #4 Taking electronic device #4 as an example, if electronic device #4 wants to leave device group #3, it will directly send second information to other electronic devices in device group #3, and the second message is used to instruct electronic device #4 to leave device group# 3.
  • the electronic devices in the same device group can send broadcast messages through different broadcast channels in the same broadcast period, so that the electronic devices to be added can scan any one of the broadcast channels, and can find one of the electronic devices in the device group. equipment.
  • the neighbor description table including the device information of all electronic devices in the device group is shared with each electronic device in the device group, so that the electronic device to be joined can discover the device group after discovering any electronic device in the device group All electronic equipment in. Therefore, the probability that the electronic device to be added successfully scans the surrounding electronic devices is improved, the probabilistic delay in discovering the surrounding electronic devices is shortened, and the time for the electronic device to be added to perform the neighbor discovery process is reduced. The greater the number of electronic devices, the more significant the effect of this solution.
  • any node in the device group can be quickly discovered, which significantly reduces the neighbor discovery delay and improves user experience.
  • each step of the above method may be implemented by an integrated logic circuit of hardware in a processor or an instruction in the form of software.
  • the steps of the methods disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
  • the software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register.
  • the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware. To avoid repetition, no detailed description is given here.
  • the present application also provides an electronic device, which may include: a memory and a processor.
  • the memory may be used to store a computer program; the processor may be used to call the computer program in the memory, so that the electronic device executes the method described in any one of the embodiments shown in FIG. 4 and FIG. 6 .
  • the present application also provides a chip system, the chip system includes at least one processor, configured to implement the method described in any one of the above embodiments shown in Figure 4 and Figure 6, for example, receive or process the above method data and/or information referred to in .
  • the chip system further includes a memory, the memory is used to store program instructions and data, and the memory is located inside or outside the processor.
  • the system-on-a-chip may consist of chips, or may include chips and other discrete devices.
  • the present application also provides a computer program product, the computer program product including: a computer program (also referred to as code, or instruction), when the computer program is executed, the electronic device can realize the electronic device shown in Figure 4 or Figure 6.
  • a computer program also referred to as code, or instruction
  • the electronic device can realize the electronic device shown in Figure 4 or Figure 6.
  • the present application also provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program (also called a code, or an instruction).
  • a computer program also called a code, or an instruction.
  • the electronic device is made to implement the method described in any one of the embodiments shown in FIG. 4 or FIG. 6 .
  • the processor in the embodiment of the present application may be an integrated circuit chip that has a signal processing capability.
  • each step of the above-mentioned method embodiments may be completed by an integrated logic circuit of hardware in a processor or instructions in the form of software.
  • the above-mentioned processor can be a general-purpose processor, a digital signal processor (digital signal processor, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field programmable gate array, FPGA) or other possible Program logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA field programmable gate array
  • Program logic devices discrete gate or transistor logic devices, discrete hardware components.
  • a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
  • the steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register.
  • the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware.
  • the memory in the embodiments of the present application may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories.
  • the non-volatile memory can be read-only memory (read-only memory, ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically programmable Erases programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
  • Volatile memory can be random access memory (RAM), which acts as external cache memory.
  • RAM random access memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • SDRAM double data rate synchronous dynamic random access memory
  • ESDRAM enhanced synchronous dynamic random access memory
  • SLDRAM direct memory bus random access memory
  • direct rambus RAM direct rambus RAM
  • unit may be used to denote a computer-related entity, hardware, firmware, a combination of hardware and software, software, or software in execution.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • each functional unit may be fully or partially implemented by software, hardware, firmware or any combination thereof.
  • software When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product comprises one or more computer instructions (programs). When the computer program instructions (program) are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data center Transmission to another website site, computer, server or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.).
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media.
  • the available medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital versatile disc (digital video disc, DVD)), or a semiconductor medium (for example, a solid state disk (solid state disk, SSD) )wait.
  • a magnetic medium for example, a floppy disk, a hard disk, a magnetic tape
  • an optical medium for example, a digital versatile disc (digital video disc, DVD)
  • a semiconductor medium for example, a solid state disk (solid state disk, SSD)
  • the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: various media capable of storing program codes such as U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

Provided are a neighbor discovery method and an electronic device. The method comprises: a first electronic device scanning a first broadcast channel within a scanning time period, wherein the first broadcast channel is any one of a plurality of predefined broadcast channels, and in each broadcast time period, a broadcast message is transmitted on at least two broadcast channels; on the basis of a first broadcast message which is received on a first broadcast channel and comes from a second electronic device, establishing a connection with the second electronic device; and acquiring a first neighbor description table from the second electronic device, wherein the first neighbor description table comprises device information of each electronic device in a first device group. Therefore, a first electronic device can discover one electronic device within a device group when scanning any broadcast channel therein, and can then discover all electronic devices in the device group, thereby improving the probability of an electronic device, which is about to join, successfully scanning surrounding electronic devices, and shortening the delay for the probability of discovering the surrounding electronic devices, and thus improving the user experience.

Description

一种邻居发现方法和电子设备Neighbor discovery method and electronic device
本申请要求于2021年11月12日提交中国专利局、申请号为202111343116.1、申请名称为“一种邻居发现方法和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202111343116.1 and the application title "A Neighbor Discovery Method and Electronic Device" filed with the China Patent Office on November 12, 2021, the entire contents of which are incorporated by reference in this application middle.
技术领域technical field
本申请涉及通信技术领域,尤其涉及一种邻居发现方法和电子设备。The present application relates to the technical field of communications, and in particular to a neighbor discovery method and electronic equipment.
背景技术Background technique
随着互联网的高速发展,基于邻近位置的无线通信的应用被受关注。对于支持无线通信的电子设备来说,需要基于邻居发现协议(neighbor discovery protocol,NDP)进行邻居发现,才能进一步建立连接。比如,基于蓝牙的设备扫描过程就是邻居发现过程。With the rapid development of the Internet, the application of wireless communication based on proximity has attracted attention. For an electronic device supporting wireless communication, neighbor discovery based on a neighbor discovery protocol (neighbor discovery protocol, NDP) is required to further establish a connection. For example, the Bluetooth-based device scanning process is the neighbor discovery process.
目前,邻居发现可通过点到点的扫描来实现。点对点的扫描过程具体如下:电子设备(为方便区分和说明,记为电子设备#1)可以在不同的广播时段内通过不同的广播信道发送广播消息,另一电子设备(为方便区分和说明,记为电子设备#2)在扫描时段内随机选择一个广播信道进行扫描,然后在下一个扫描时段内,扫描另一个广播信道,只有电子设备#1在某一个广播信道上发送广播消息的同时,电子设备#2也在该广播信道扫描,电子设备#1才能被发现。因此,存在概率性的延迟。Currently, neighbor discovery can be achieved by point-to-point scanning. The point-to-point scanning process is as follows: an electronic device (referred to as electronic device #1 for convenience of distinction and description) can send broadcast messages through different broadcast channels in different broadcast periods, and another electronic device (for convenience of distinction and description, It is recorded as electronic device #2) randomly selects a broadcast channel to scan in the scanning period, and then scans another broadcast channel in the next scanning period. Only when electronic device #1 sends a broadcast message on a certain broadcast channel, the electronic Device #2 is also scanning the broadcast channel, and electronic device #1 can be found. Therefore, there is a probabilistic delay.
然而,在有些情况下,可能存在一个电子设备需要扫描发现多个电子设备的需求。比如,用户的手机需要与家中的其他的多个电子设备建立连接,则该手机需要采用点对点的扫描方式,逐个扫描多个电子设备,以与该多个电子设备建立连接。由于每个电子设备的发现存在概率性的延迟。在被扫描的电子设备数量增加时,这种概率性的延迟也会成倍增加,导致整个发现过程用时较长,时延较高,进而影响用户体验。However, in some cases, there may be a requirement that one electronic device needs to be scanned to find multiple electronic devices. For example, if a user's mobile phone needs to establish a connection with multiple other electronic devices at home, the mobile phone needs to scan the multiple electronic devices one by one in a point-to-point scanning manner to establish a connection with the multiple electronic devices. There is a probabilistic delay due to the discovery of each electronic device. When the number of electronic devices to be scanned increases, this probabilistic delay will also multiply, resulting in a longer time-consuming and higher delay in the entire discovery process, thereby affecting user experience.
发明内容Contents of the invention
本申请提供了一种邻居发现方法和电子设备,以期能够降低电子设备发现周围的电子设备的概率性的延迟,缩短整个发现过程的时长,进而提高用户体验。The present application provides a neighbor discovery method and an electronic device, in order to reduce the probabilistic delay for the electronic device to discover surrounding electronic devices, shorten the duration of the entire discovery process, and improve user experience.
第一方面,本申请提供了一种邻居发现方法,该方法可以由第一电子设备来执行,或者,也可以由配置在第一电子设备中的部件(如芯片、芯片系统等)执行,或者,还可以由能实现全部或部分第一电子设备功能的逻辑模块或软件实现,本申请对此不作限定。In a first aspect, the present application provides a neighbor discovery method, which may be executed by the first electronic device, or may also be executed by a component configured in the first electronic device (such as a chip, a chip system, etc.), or , may also be realized by a logic module or software capable of realizing all or part of the functions of the first electronic device, which is not limited in this application.
示例性地,该方法包括:第一电子设备在扫描时段内扫描第一广播信道,该第一广播信道是预定义的多个广播信道中的任意一个,在至少一个广播时段的每个广播时段中,至少有两个广播信道上传输有广播消息,该广播消息来自第一设备组中的电子设备;第一电子设备基于在第一广播信道上接收到的第二电子设备发送的第一广播消息,与第二电子设备建立连接,第二电子设备为第一设备组中的电子设备;第一电子设备从第二电子设备获取第一邻居描述表,第一邻居描述表包括第一设备组中每个电子设备的设备信息。Exemplarily, the method includes: the first electronic device scans a first broadcast channel within a scanning period, the first broadcast channel is any one of a plurality of predefined broadcast channels, and in each broadcast period of at least one broadcast period Among them, broadcast messages are transmitted on at least two broadcast channels, and the broadcast messages are from electronic devices in the first device group; the first electronic device receives the first broadcast message sent by the second electronic device on the first broadcast channel message, establish a connection with the second electronic device, the second electronic device is an electronic device in the first device group; the first electronic device acquires the first neighbor description table from the second electronic device, and the first neighbor description table includes the first device group Device information for each electronic device in .
可以理解,第一电子设备接收到第二电子设备发送的第一广播消息,表示至少一个广 播时段在时域上第一电子设备的扫描时段有重叠。换言之,在至少一个广播时段在时域上与第一电子设备的扫描时段有重叠的情况下,第一电子设备才有可能在扫描时段扫描到第二电子设备发送的第一广播消息。It can be understood that the first electronic device receives the first broadcast message sent by the second electronic device, indicating that at least one broadcast period overlaps the scanning period of the first electronic device in the time domain. In other words, only when at least one broadcast period overlaps with the scan period of the first electronic device in the time domain, the first electronic device may scan the first broadcast message sent by the second electronic device during the scan period.
基于上述技术方案,同一设备组内的电子设备可以在同一广播时段内通过不同的广播信道发送广播消息,使得待加入的电子设备扫描到其中任意一个广播信道,都可以发现设备组中其中一个电子设备。且将包括设备组中所有电子设备的设备信息的邻居描述表共享给设备组内各电子设备,使得待加入的电子设备在发现了设备组中的任意一个电子设备之后,便可以发现该设备组中的所有电子设备。因此,提升了待加入的电子设备对周围的电子设备扫描成功的概率,缩短了发现周围电子设备的概率性的延迟,减少了待加入的电子设备进行邻居发现过程的时长。并且,设备组内的电子设备数量越多,该方案所带来的效果越显著。因为电子设备越多,点对点单设备扫描成功的概率越低,可能带来的概率性的延迟越大。但若使用上述方案,可以快速发现设备组内的任意节点,明显降低邻居发现时延,提高用户体验。Based on the above technical solution, the electronic devices in the same device group can send broadcast messages through different broadcast channels in the same broadcast period, so that the electronic devices to be added can scan any one of the broadcast channels, and can find one of the electronic devices in the device group. equipment. And the neighbor description table including the device information of all electronic devices in the device group is shared with each electronic device in the device group, so that the electronic device to be joined can discover the device group after discovering any electronic device in the device group All electronic equipment in. Therefore, the probability that the electronic device to be added successfully scans the surrounding electronic devices is improved, the probabilistic delay in finding the surrounding electronic devices is shortened, and the time for the electronic device to be added to perform a neighbor discovery process is shortened. Moreover, the greater the number of electronic devices in the device group, the more significant the effect of the solution. Because the more electronic devices, the lower the probability of successful point-to-point single-device scanning, and the greater the probabilistic delay that may be caused. However, if the above solution is used, any node in the device group can be quickly discovered, which significantly reduces the neighbor discovery delay and improves user experience.
结合第一方面,在第一方面可能的实现方式中,每个广播时段内在多个广播信道上发送广播消息的电子设备的数量不大于多个广播信道的数量。With reference to the first aspect, in a possible implementation manner of the first aspect, the number of electronic devices that send broadcast messages on multiple broadcast channels in each broadcast period is not greater than the number of multiple broadcast channels.
第一设备组中的多个电子设备通过错开发送广播消息,每个广播时段内在多个广播信道上发送广播消息的电子设备的数量不大于多个广播信道的数量,换言之,在同一时间,多个电子设备分布在不同的广播信道上发送广播消息,避免了多个电子设备在同一信道上发送广播消息,产生资源碰撞。Multiple electronic devices in the first device group send broadcast messages by staggering, and the number of electronic devices that send broadcast messages on multiple broadcast channels in each broadcast period is not greater than the number of multiple broadcast channels. In other words, at the same time, multiple Each electronic device is distributed to send broadcast messages on different broadcast channels, which avoids resource collisions caused by multiple electronic devices sending broadcast messages on the same channel.
结合第一方面,在第一方面可能的实现方式中,所述方法还包括:第一电子设备基于本地的设备信息,更新第一邻居描述表,得到第二邻居描述表;该第二邻居描述表包括第二设备组中每个电子设备的设备信息,该第二设备组包括第一电子设备和第一设备组中的电子设备。With reference to the first aspect, in a possible implementation of the first aspect, the method further includes: the first electronic device updates the first neighbor description table based on local device information to obtain a second neighbor description table; the second neighbor description table The table includes device information for each electronic device in the second device group, the second device group including the first electronic device and the electronic devices in the first device group.
第一电子设备接收到第一邻居描述表之后,将自身的设备信息添加至第一邻居描述表中,形成第二邻居描述表,换言之,第二邻居描述表中除了第一设备组中的电子设备的设备信息,还包括第一电子设备的设备信息,使得设备组中的其他电子设备也可以得到第一电子设备的设备信息,实现信息共享。从设备组的角度来说,第一电子设备加入了第一设备组,形成了第二设备组,第二设备组包括第一设备组的所有电子设备和第一电子设备,从而第二设备组中的电子设备可以基于第二邻居描述表,与第二设备组中任意一个电子设备建立连接,加快了连接速度,提升了用户体验。After the first electronic device receives the first neighbor description table, it adds its own device information to the first neighbor description table to form the second neighbor description table. The device information of the device also includes the device information of the first electronic device, so that other electronic devices in the device group can also obtain the device information of the first electronic device, realizing information sharing. From the perspective of the device group, the first electronic device joins the first device group to form a second device group, and the second device group includes all electronic devices in the first device group and the first electronic device, so that the second device group The electronic device in the device can establish a connection with any electronic device in the second device group based on the second neighbor description table, which speeds up the connection speed and improves user experience.
结合第一方面,在第一方面可能的实现方式中,设备信息包括:设备的标识(identifier,ID)、设备的广播信道、以及设备的广播时间,其中,设备的广播时间用于指示电子设备最近一次发送广播消息的时间。With reference to the first aspect, in a possible implementation manner of the first aspect, the device information includes: an identifier (identifier, ID) of the device, a broadcast channel of the device, and a broadcast time of the device, where the broadcast time of the device is used to indicate that the electronic device The time when the broadcast message was last sent.
设备信息可以包括电子设备之间建立连接的所需要的设备信息,例如,设备的ID、设备的广播信道、以及设备的广播时间,从而设备组中的电子设备无需再次进行邻居发现的过程,可以基于上述设备信息,实现快速连接,提高了用户体验。The device information may include device information required to establish a connection between electronic devices, for example, device ID, device broadcast channel, and device broadcast time, so that the electronic devices in the device group do not need to perform the process of neighbor discovery again, and can Based on the above device information, fast connection is realized and user experience is improved.
可选地,设备信息还包括如下一项或多项:设备组的ID、设备组中的电子设备的数目、链路质量参数、时间戳、以及老化时间,其中,链路质量参数用于指示链路质量。Optionally, the device information also includes one or more of the following: the ID of the device group, the number of electronic devices in the device group, link quality parameters, timestamps, and aging time, wherein the link quality parameters are used to indicate link quality.
设备信息中还可以包括用于维护邻居描述表的相关信息,例如,时间戳用于指示电子 设备的设备信息的更新时间;老化时间用于判断电子设备是否离开设备组,可以是绝对时间,如9:15,也可以是间隔时间,如3分钟,本申请对此不作限定。通过维护邻居描述表,可以保证设备组中的电子设备均是可以连接的电子设备,避免出现某一电子设备已经离开设备组,但由于另一电子设备可以基于邻居描述表查询到该电子设备的设备信息,因此与其连接,却无法连接成功的情况。The device information may also include relevant information for maintaining the neighbor description table, for example, the time stamp is used to indicate the update time of the device information of the electronic device; the aging time is used to determine whether the electronic device leaves the device group, which can be an absolute time, such as 9:15 may also be an interval time, such as 3 minutes, which is not limited in this application. By maintaining the neighbor description table, it can be ensured that the electronic devices in the device group are all electronic devices that can be connected, avoiding that a certain electronic device has left the device group, but because another electronic device can query the electronic device based on the neighbor description table Device information, so connect to it, but fail to connect successfully.
结合第一方面,在第一方面可能的实现方式中,所述方法还包括:第一电子设备基于第三电子设备的设备信息,与第三电子设备建立连接,该第三电子设备为第一设备组中第一电子设备希望建立连接的电子设备,且第三电子设备为第一设备组内的任意一个电子设备。With reference to the first aspect, in a possible implementation manner of the first aspect, the method further includes: the first electronic device establishes a connection with the third electronic device based on the device information of the third electronic device, and the third electronic device is the first The first electronic device in the device group wishes to establish a connection with the electronic device, and the third electronic device is any electronic device in the first device group.
第一电子设备加入第一设备组后,可以与设备组中的任意一个电子设备建立连接,如第一电子设备希望与第三电子设备建立连接,则第一电子设备可以基于第一邻居描述表,查询到第三电子设备的设备信息,基于该设备信息与第三电子设备建立连接,无需再次进行发现第三电子设备的过程,进而缩短了建立连接所用的时间,提高了用户体验。After the first electronic device joins the first device group, it can establish a connection with any electronic device in the device group. If the first electronic device wishes to establish a connection with the third electronic device, the first electronic device can establish a connection based on the first neighbor description table , the device information of the third electronic device is queried, and a connection is established with the third electronic device based on the device information, without re-discovering the third electronic device, thereby shortening the time for establishing a connection and improving user experience.
第二方面,本申请提供了一种电子设备,可以实现上述第一方面以及第一方面任一种可能的实现方式中的方法。该电子设备包括用于执行上述方法的相应的单元。该装置包括的单元可以通过软件和/或硬件方式实现。In a second aspect, the present application provides an electronic device that can implement the method in the foregoing first aspect and any possible implementation manner of the first aspect. The electronic device comprises corresponding units for performing the method described above. The units included in the device may be implemented by software and/or hardware.
第三方面,本申请提供了一种电子设备,该电子设备包括处理器。该处理器与存储器耦合,可用于执行存储器中的计算机程序,以实现第一方面以及第一方面任一种可能实现方式中的邻居发现方法。In a third aspect, the present application provides an electronic device, where the electronic device includes a processor. The processor is coupled with the memory, and can be used to execute a computer program in the memory, so as to implement the first aspect and the neighbor discovery method in any possible implementation manner of the first aspect.
可选地,该电子设备还包括存储器。Optionally, the electronic device further includes a memory.
可选地,该电子设备还包括通信接口,处理器与通信接口耦合。Optionally, the electronic device further includes a communication interface, and the processor is coupled to the communication interface.
第四方面,本申请提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序或指令,当该计算机程序或指令被执行时,以实现第一方面以及第一方面任一种可能实现方式中的邻居发现方法。In a fourth aspect, the present application provides a computer-readable storage medium, in which a computer program or instruction is stored, and when the computer program or instruction is executed, the first aspect and any of the first aspect can be realized. A neighbor discovery method in one possible implementation.
第五方面,本申请提供了一种计算机程序产品,该计算机程序产品包括指令,当该指令被运行时,以实现第一方面以及第一方面任一种可能实现方式中的邻居发现方法。In a fifth aspect, the present application provides a computer program product, where the computer program product includes an instruction, and when the instruction is executed, implement the neighbor discovery method in the first aspect and any possible implementation manner of the first aspect.
第六方面,本申请提供了一种芯片系统,该芯片系统包括处理器,还可以包括存储器,用于实现第一方面以及第一方面任一种可能实现方式中的邻居发现方法。该芯片系统可以由芯片构成,也可以包含芯片和其他分立器件。In a sixth aspect, the present application provides a system-on-a-chip, where the system-on-a-chip includes a processor and may further include a memory, configured to implement the first aspect and the neighbor discovery method in any possible implementation manner of the first aspect. The system-on-a-chip may consist of chips, or may include chips and other discrete devices.
应当理解的是,本申请的第二方面至第六方面与本申请的第一方面的技术方案相对应,各方面及对应的可行实施方式所取得的有益效果相似,不再赘述。It should be understood that, the second aspect to the sixth aspect of the present application correspond to the technical solution of the first aspect of the present application, and the beneficial effects obtained by each aspect and the corresponding feasible implementation manners are similar, so details are not repeated here.
附图说明Description of drawings
图1是本申请实施例提供的电子设备的结构示意图;FIG. 1 is a schematic structural diagram of an electronic device provided by an embodiment of the present application;
图2是适用于本申请实施例的通信系统的网络架构示意图;FIG. 2 is a schematic diagram of a network architecture of a communication system applicable to an embodiment of the present application;
图3是本申请实施例提供的手机扫描发现智能音箱的扫描过程示意图;Fig. 3 is a schematic diagram of the scanning process of the mobile phone scanning to find the smart speaker provided by the embodiment of the present application;
图4是本申请实施例提供的一种邻居发现方法的示意性流程图;FIG. 4 is a schematic flowchart of a neighbor discovery method provided by an embodiment of the present application;
图5是本申请实施例提供的设备信息的示意图;Fig. 5 is a schematic diagram of device information provided by the embodiment of the present application;
图6是本申请实施例提供的一种邻居发现方法的又一示意性流程图;FIG. 6 is another schematic flowchart of a neighbor discovery method provided by an embodiment of the present application;
图7是本申请实施例提供的第一电子设备扫描发现第一设备组的示意图。FIG. 7 is a schematic diagram of a first electronic device scanning and discovering a first device group provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图,对本申请中的技术方案进行描述。The technical solution in this application will be described below with reference to the accompanying drawings.
为了便于清楚描述本申请实施例的技术方案,在本申请实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。例如,第一电子设备和第二电子设备是为了区分不同的电子设备,并不对其先后顺序进行限定。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with basically the same function and effect. For example, the first electronic device and the second electronic device are used to distinguish different electronic devices, and their sequence is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference.
此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or device comprising a sequence of steps or elements is not necessarily limited to the expressly listed instead, may include other steps or elements not explicitly listed or inherent to the process, method, product or apparatus.
在本申请实施例中,“多个”是指两个或两个以上。“以下一项或多项”或其类似表达,是指的这些项中的任意组合,包括单项或复数项的任意组合。例如,a,b,或c中的一项或多项,可以表示:a,b,c;a和b;a和c;b和c;或a和b和c。In the embodiments of this application, "multiple" means two or more. "One or more of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, one or more of a, b, or c may mean: a, b, c; a and b; a and c; b and c; or a and b and c.
应理解,本申请所述的电子设备是指具有蓝牙功能的电子设备。例如,本申请中的具有蓝牙功能的电子设备可以为:手机、平板电脑、智能音箱、蓝牙耳机、可穿戴设备等。It should be understood that the electronic device described in this application refers to an electronic device with a Bluetooth function. For example, the electronic device with bluetooth function in this application may be: a mobile phone, a tablet computer, a smart speaker, a bluetooth earphone, a wearable device, and the like.
其中,可穿戴设备也可以称为穿戴式智能设备,是应用穿戴式技术对日常穿戴进行智能化设计、开发出可以穿戴的设备的总称,如智能手表、手环等。可穿戴设备即直接穿在身上,或是整合到用户的衣服或配件的一种便携式设备。可穿戴设备不仅仅是一种硬件设备,更是通过软件支持以及数据交互、云端交互来实现强大的功能。广义穿戴式智能设备包括功能全、尺寸大、可不依赖智能手机实现完整或者部分的功能,例如:智能手表或智能眼镜等,以及只专注于某一类应用功能,需要和其它设备如智能手机配合使用,如各类进行体征监测的智能手环、智能首饰等。Among them, wearable devices can also be called wearable smart devices, which is a general term for the application of wearable technology to intelligently design daily wear and develop wearable devices, such as smart watches and bracelets. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothing or accessories. Wearable devices are not only a hardware device, but also achieve powerful functions through software support, data interaction, and cloud interaction. Generalized wearable smart devices include full-featured, large-sized, complete or partial functions without relying on smart phones, such as smart watches or smart glasses, etc., and only focus on a certain type of application functions, and need to cooperate with other devices such as smart phones Use, such as various smart bracelets and smart jewelry for physical sign monitoring.
示例性地,图1示出了电子设备100的结构示意图。如图1所示,该电子设备100可以包括处理器110,射频单元120,电源130,存储器140,输入单元150,显示单元160,传感器170,音频电路180,无线保真(wireless fidelity,Wi-Fi)模块190,以及蓝牙模块1100。Exemplarily, FIG. 1 shows a schematic structural diagram of an electronic device 100 . As shown in FIG. 1, the electronic device 100 may include a processor 110, a radio frequency unit 120, a power supply 130, a memory 140, an input unit 150, a display unit 160, a sensor 170, an audio circuit 180, and a wireless fidelity (Wi- F) module 190, and Bluetooth module 1100.
处理器110是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器140内的软件程序和/或模块,以及调用存储在存储器140内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。处理器110可包括一个或多个处理单元。优选地,处理器110可集成应用处理器和调制解调处理器。可选地,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器110中。The processor 110 is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device, by running or executing software programs and/or modules stored in the memory 140, and calling data stored in the memory 140 , to perform various functions of the electronic equipment and process data, so as to monitor the electronic equipment as a whole. Processor 110 may include one or more processing units. Preferably, the processor 110 can integrate an application processor and a modem processor. Optionally, the application processor mainly processes the operating system, user interface, application program, etc., and the modem processor mainly processes wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 110 .
射频单元120可用于收发信息或通话过程中,信号的接收和发送,具体的,将基站的下行信息接收后,给处理器110处理;另外,将上行的数据发送给基站。通常,射频单元120包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频单元120还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用 任一通信标准或协议,包括但不限于全球移动通讯系统(global system of mobile communication,GSM)、通用分组无线服务(general packet radio service,GPRS)、码分多址2000(code division multiple access 2000,CDMA2000)、宽带码分多址(wideband code division multiple access,WCDMA)、时分同步码分多址(time division-synchronous code division multiple access,TD-SCDMA)、频分双工长期演进(frequency division duplexing-long term evolution,FDD-LTE)和分时双工长期演进(time division duplexing-long term evolution,TDD-LTE)等。The radio frequency unit 120 can be used for sending and receiving information or receiving and sending signals during a call. Specifically, after receiving the downlink information of the base station, it is processed by the processor 110; in addition, the uplink data is sent to the base station. Generally, the radio frequency unit 120 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 120 can also communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to global system of mobile communication (global system of mobile communication, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access 2000 (code division multiple access 2000, CDMA2000), wideband code division multiple access (WCDMA), time division synchronous code division multiple access (time division-synchronous code division multiple access, TD-SCDMA), frequency division duplex long-term evolution (frequency division duplexing-long term evolution, FDD-LTE) and time division duplex long-term evolution (time division duplexing-long term evolution, TDD-LTE), etc.
电源130(比如电池)用于各个部件供电,优选地,电源130可以通过电源管理系统与处理器110逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The power supply 130 (such as a battery) is used to supply power to various components. Preferably, the power supply 130 can be logically connected to the processor 110 through a power management system, so that functions such as charging, discharging, and power consumption management can be implemented through the power management system.
存储器140可用于存储软件程序以及模块,处理器110通过运行存储在存储器140的软件程序以及模块,从而执行电子设备的各种功能应用以及数据处理。存储器140可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)、引导装载程序(boot loader)等;存储数据区可存储根据电子设备的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器140可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 140 can be used to store software programs and modules, and the processor 110 executes various functional applications and data processing of the electronic device by running the software programs and modules stored in the memory 140 . The memory 140 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playback function, an image playback function, etc.), a boot loader (boot loader) etc.; the storage data area can store data created according to the use of the electronic device (such as audio data, phone book, etc.) and the like. In addition, the memory 140 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.
输入单元150可用于接收输入的数字或字符信息,以及产生与电子设备的用户设置以及功能控制有关的键信号输入。具体地,输入单元150可包括触控面板1501以及其他输入设备1502。触控面板1501,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板1501上或在触控面板1501附近的操作),并根据预先设定的程式驱动相应的连接装置。可选地,触控面板1501可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器110,并能接收处理器110发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板。除了触控面板1501,输入单元150还可以包括其他输入设备1502。具体地,其他输入设备1502可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 150 may be used to receive input numbers or character information, and generate key signal input related to user settings and function control of the electronic device. Specifically, the input unit 150 may include a touch panel 1501 and other input devices 1502 . The touch panel 1501, also referred to as a touch screen, can collect touch operations of the user on or near it (for example, the user uses any suitable object or accessory such as a finger and a stylus on the touch panel 1501 or near the touch panel 1501). operation), and drive the corresponding connection device according to the preset program. Optionally, the touch panel 1501 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to the to the processor 110, and can receive and execute commands sent by the processor 110. In addition, various types of touch panels, such as resistive, capacitive, infrared, and surface acoustic wave, can be used to realize the touch panel. In addition to the touch panel 1501 , the input unit 150 may also include other input devices 1502 . Specifically, other input devices 1502 may include, but are not limited to, one or more of physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, joysticks, and the like.
显示单元160可用于显示由用户输入的信息或提供给用户的信息以及电子设备的各种菜单。显示单元160可包括显示面板1601,可选地,可以采用液晶显示器(liquid crystal display,LCD)、有机发光二极管(organic light-emitting diode,OLED)等形式来配置显示面板1601。进一步地,触控面板1501可覆盖显示面板1601,当触控面板1501检测到在其上或附近的触摸操作后,传送给处理器110以确定触摸事件的类型,随后处理器110根据触摸事件的类型在显示面板1601上提供相应的视觉输出。虽然在图1中,触控面板1501与显示面板1601是作为两个独立的部件来实现电子设备的输入和输入功能,但是在某些实施例中,可以将触控面板1501与显示面板1601集成而实现电子设备的输入和输出功能。The display unit 160 may be used to display information input by or provided to the user and various menus of the electronic device. The display unit 160 may include a display panel 1601. Optionally, the display panel 1601 may be configured in the form of a liquid crystal display (liquid crystal display, LCD) or an organic light-emitting diode (OLED). Furthermore, the touch panel 1501 can cover the display panel 1601, and when the touch panel 1501 detects a touch operation on or near it, it sends it to the processor 110 to determine the type of the touch event, and then the processor 110 according to the touch event The type provides a corresponding visual output on the display panel 1601. Although in FIG. 1, the touch panel 1501 and the display panel 1601 are used as two independent components to realize the input and input functions of the electronic device, in some embodiments, the touch panel 1501 and the display panel 1601 can be integrated. And realize the input and output function of electronic equipment.
电子设备100还可包括至少一种传感器170,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据 环境光线的明暗来调节显示面板1601的亮度,接近传感器可在电子设备移动到耳边时,关闭显示面板1601或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别电子设备姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于电子设备还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The electronic device 100 may also include at least one sensor 170, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1601 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 1601 or backlight. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when it is stationary, and can be used to identify the posture of electronic equipment (such as horizontal and vertical screen switching, Related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tap), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors that can be configured for electronic devices, here No longer.
音频电路180可将接收到的音频数据转换后的电信号,传输到扬声器1801,由扬声器1801转换为声音信号输出;另一方面,传声器1802将收集的声音信号转换为电信号,由音频电路180接收后转换为音频数据,再将音频数据输出处理器110处理后,经射频单元120以发送给比如另一电子设备,或者将音频数据输出至存储器140以便进一步处理。The audio circuit 180 can transmit the electrical signal converted from the received audio data to the speaker 1801, and the speaker 1801 converts it into an audio signal for output; After being received, it is converted into audio data, and then the audio data is output to the processor 110 for processing, and then sent to another electronic device through the radio frequency unit 120, or the audio data is output to the memory 140 for further processing.
Wi-Fi属于短距离无线传输技术,电子设备通过Wi-Fi模块190可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图1示出了Wi-Fi模块190,但是可以理解的是,其并不属于电子设备的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。Wi-Fi is a short-distance wireless transmission technology. Electronic devices can help users send and receive emails, browse web pages, and access streaming media through the Wi-Fi module 190, which provides users with wireless broadband Internet access. Although Fig. 1 shows the Wi-Fi module 190, it can be understood that it is not a necessary component of the electronic device, and can be completely omitted as required without changing the essence of the invention.
蓝牙技术也属于短距离无线传输技术,电子设备通过蓝牙模块1100可以与其他具备蓝牙模块的电子设备建立蓝牙连接,从而基于蓝牙通信链路进行数据传输。蓝牙模块1100根据实际需要,可以为低功耗蓝牙(bluetooth low energy,BLE)模块。可以理解的是,本申请实施例中电子设备包括蓝牙模块。The Bluetooth technology also belongs to the short-distance wireless transmission technology. The electronic device can establish a Bluetooth connection with other electronic devices equipped with the Bluetooth module through the Bluetooth module 1100, so as to perform data transmission based on the Bluetooth communication link. The bluetooth module 1100 can be a bluetooth low energy (bluetooth low energy, BLE) module according to actual needs. It can be understood that, in the embodiment of the present application, the electronic device includes a Bluetooth module.
在本申请实施例中,电子设备之间通过蓝牙扫描发现对方,进而与对方建立连接,进行业务传输。因此,本申请实施例中涉及的电子设备具有蓝牙功能,换言之,本申请实施例涉及的电子设备包括蓝牙模块。In the embodiment of the present application, the electronic devices discover each other through Bluetooth scanning, and then establish a connection with the other party to perform service transmission. Therefore, the electronic device involved in the embodiment of the present application has a Bluetooth function, in other words, the electronic device involved in the embodiment of the present application includes a Bluetooth module.
可以理解的是,本申请示意的结构并不构成对电子设备100的具体限定。在另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in this application does not constitute a specific limitation on the electronic device 100 . In other embodiments, the electronic device 100 may include more or fewer components than shown, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.
图2是适用于本申请实施例的通信系统200的网络架构示意图。如图2所示,该通信系统200包括:电子设备210和设备组220,设备组220包括电子设备2201至2203。其中,电子设备2201至2203可以是不同类型的电子设备,例如包括但不限于,智能音箱、平板电脑、智能手表、以及图中未示出的其他电子设备,如笔记本电脑、智能电视等。其中,电子设备210可以基于NDP扫描发现设备组220中的任意一个电子设备,进而与该电子设备建立连接,进行业务传输。设备组220外的电子设备,如图中所示的电子设备210,可以通过扫描发现设备组220中的任意一个电子设备,进而发现该设备组中的所有电子设备。FIG. 2 is a schematic diagram of a network architecture of a communication system 200 applicable to an embodiment of the present application. As shown in FIG. 2 , the communication system 200 includes: an electronic device 210 and a device group 220 , and the device group 220 includes electronic devices 2201 to 2203 . Among them, the electronic devices 2201 to 2203 may be different types of electronic devices, including but not limited to, smart speakers, tablet computers, smart watches, and other electronic devices not shown in the figure, such as notebook computers, smart TVs, etc. Wherein, the electronic device 210 may discover any electronic device in the device group 220 based on the NDP scan, and then establish a connection with the electronic device to perform service transmission. An electronic device outside the device group 220, such as the electronic device 210 shown in the figure, can discover any electronic device in the device group 220 by scanning, and then discover all electronic devices in the device group.
目前,邻居发现可以通过点对点的扫描来实现,例如,在家庭场景中,电子设备210(如手机)可以通过蓝牙扫描发现家庭中的其他电子设备,如智能音箱、电视、平板电脑,但需要手机逐个扫描发现这些电子设备,并逐个显示在手机界面上,再选择希望连接的电子设备进行连接。At present, neighbor discovery can be realized through peer-to-peer scanning. For example, in a home scene, an electronic device 210 (such as a mobile phone) can discover other electronic devices in the family through Bluetooth scanning, such as smart speakers, TVs, and tablets, but a mobile phone is required. Scan these electronic devices one by one, and display them on the mobile phone interface one by one, and then select the electronic device you want to connect to connect.
下面以手机通过BLE扫描发现智能音箱为例,结合图3详细描述其扫描过程。应理解,手机和智能音箱为电子设备的两个可能的示例。The following takes the mobile phone to find a smart speaker through BLE scanning as an example, and describes the scanning process in detail in conjunction with Figure 3. It should be understood that cell phones and smart speakers are two possible examples of electronic devices.
如图3所示,智能音箱在不同的广播时段内,如图中所示的广播时段#1、广播时段#2、 以及广播时段#3,依次在不同的广播信道上发送广播消息,例如,依次在信道37、信道38、以及信道39上发送广播消息。其中,该多个广播信道是预定义的在邻居发现过程中用于发送广播消息的广播信道,例如可以是协议预先定义好的多个广播信道。手机在其扫描时段内,在其中的一个广播信道上进行扫描,如信道37;在下一个扫描时段内扫描另一个广播信道,如信道38。从图中可以看出,手机启动扫描后,在信道37上进行扫描时,智能音箱并没有在此信道上发送广播消息,因此,手机无法扫描到该智能音箱,需要等待下一个扫描时段,继续进行扫描。不难发现,这种点对点的扫描方式,需要智能音箱在某一广播信道上发送广播消息时,手机恰巧在同一广播信道上进行扫描,才能发现对方,因此,手机在一个扫描时段内扫描到智能音箱的概率较低,可能经过多个扫描时段才能成功扫描到智能音箱,导致扫描过程用时较长。可想而知,若家庭中存在多个电子设备,则手机需要对家庭中的全部电子设备一一进行扫描发现过程,并逐个显示在手机的界面上,则扫描过程的用时将会成倍增加,用户需要等待较长时间才能在手机界面上看见附近所有可用的电子设备,影响用户体验。As shown in FIG. 3 , the smart speaker sends broadcast messages on different broadcast channels sequentially during different broadcast periods, such as broadcast period #1, broadcast period #2, and broadcast period #3 shown in the figure, for example, Broadcast messages are sent on channel 37, channel 38, and channel 39 in sequence. Wherein, the multiple broadcast channels are predefined broadcast channels used to send broadcast messages during the neighbor discovery process, for example, they may be multiple broadcast channels predefined by a protocol. The mobile phone scans on one of the broadcast channels, such as channel 37, during its scanning period, and scans another broadcast channel, such as channel 38, during the next scanning period. It can be seen from the figure that after the mobile phone scans on channel 37, the smart speaker does not send a broadcast message on this channel. Therefore, the mobile phone cannot scan the smart speaker and needs to wait for the next scanning period. Continue to scan. It is not difficult to find that this point-to-point scanning method requires that when the smart speaker sends a broadcast message on a certain broadcast channel, the mobile phone happens to scan on the same broadcast channel to find the other party. Therefore, the mobile phone scans the smart speaker within a scanning period. The probability of the speaker is low, and it may take several scanning periods to successfully scan the smart speaker, resulting in a longer scanning process. It is conceivable that if there are multiple electronic devices in the family, the mobile phone needs to scan and discover all the electronic devices in the family one by one, and display them on the interface of the mobile phone one by one, and the time spent on the scanning process will increase exponentially. , the user needs to wait for a long time to see all available electronic devices nearby on the mobile phone interface, which affects the user experience.
因此,本申请提供了一种邻居发现方法,引入了设备组的概念。一个设备组可以包括多个电子设备,且同一个设备组内的各电子设备之间共享了自身的设备信息,形成包括同一设备组内各电子设备的设备信息的邻居描述表。同一个设备组内的电子设备可以在同一广播时段内通过不同的广播信道发送广播消息,待加入的电子设备无论扫描哪一个广播信道,都可以发现设备组中的一个电子设备,由于设备组内的每个电子设备都具有该邻居描述表,使得待加入的电子设备可以发现该设备组中的所有电子设备。上述过程通过同一设备组内的电子设备同时在不同信道发送广播消息,提升了待加入的电子设备的扫描成功的概率,从而降低了待加入的电子设备进行邻居发现过程的时延,缩短了待加入的电子设备扫描发现周围电子设备的时间,提高了用户体验。Therefore, the present application provides a neighbor discovery method, which introduces the concept of a device group. A device group may include multiple electronic devices, and each electronic device in the same device group shares its own device information, forming a neighbor description table including the device information of each electronic device in the same device group. Electronic devices in the same device group can send broadcast messages through different broadcast channels within the same broadcast period. No matter which broadcast channel the electronic device to join can scan, it can find an electronic device in the device group. Each electronic device in has the neighbor description table, so that the electronic device to be added can discover all electronic devices in the device group. Through the above process, the electronic devices in the same device group send broadcast messages on different channels at the same time, which improves the probability of successful scanning of the electronic devices to be added, thereby reducing the time delay of the neighbor discovery process of the electronic devices to be added, and shortening the waiting time. The added electronic device scans and discovers the time for surrounding electronic devices, which improves user experience.
下面将结合附图,详细说明本申请实施例提供的一种邻居发现方法。A neighbor discovery method provided by an embodiment of the present application will be described in detail below with reference to the accompanying drawings.
应理解,为了便于区分不同情况下的设备组,下文将由两个电子设备形成的设备组记为设备组#1。例如设备组#1包括电子设备#1和电子设备#2。每新增一个设备至设备组中,设备组的编号可加一,例如,设备组#1中新增一个电子设备,如电子设备#3,可形成设备组#2。每新增一个设备至设备组,相应的邻居描述表也随之更新。It should be understood that, in order to facilitate the distinction of device groups in different situations, the device group formed by two electronic devices is denoted as device group #1 hereinafter. For example, device group #1 includes electronic device #1 and electronic device #2. Each time a device is added to the device group, the number of the device group can be increased by one. For example, adding an electronic device to the device group #1, such as electronic device #3, can form the device group #2. Every time a device is added to the device group, the corresponding neighbor description table is also updated accordingly.
为便于理解,下文首先说明设备组#1的建立过程,然后详细描述基于已建立的设备组的邻居发现方法。应理解,这里所述的已建立的设备组可以是设备组#1,也可以是在设备组#1的基础上又进行了一次或多次更新得到的新的设备组。本申请实施例对此不作限定。For ease of understanding, the establishment process of the device group #1 will be described below first, and then the neighbor discovery method based on the established device group will be described in detail. It should be understood that the established device group mentioned here may be device group #1, or may be a new device group obtained by performing one or more updates on the basis of device group #1. This embodiment of the present application does not limit it.
图4为本申请实施例提供的邻居发现方法400的示意性流程图。图4所示的方法400可以包括S410至S450,下面首先结合图4详细描述电子设备#1与电子设备#2建立设备组#1的过程。FIG. 4 is a schematic flowchart of a neighbor discovery method 400 provided by an embodiment of the present application. The method 400 shown in FIG. 4 may include S410 to S450. Firstly, the process of establishing a device group #1 by electronic device #1 and electronic device #2 will be described in detail below in conjunction with FIG. 4 .
S410、电子设备#1在多个广播时段内通过多个广播信道发送广播消息。S410. The electronic device #1 sends broadcast messages through multiple broadcast channels within multiple broadcast periods.
其中,每个广播时段可以占用一个时隙,在广播时段内,电子设备可以在多个广播信道上发送广播消息。该多个广播信道是预定义的在邻居发现过程中用于发送广播消息的广播信道,例如可以是协议预先定义好的多个广播信道。需要说明的是,多个广播时段中任意两个广播时段之间的时间间隔可以固定,如图3所示的广播时段#1和广播时段#2之间的时间间隔与广播时段#2和广播时段#3之间的时间间隔相同。多个广播时段中任意两个 广播时段的时间长度可以不同,例如,每个广播时段的时间长度与广播消息中数据部分的长度相关,不同的广播消息的数据部分的长度不同可能引起广播时段的长度不同。因此,电子设备之间时间同步之后,可以将电子设备#1发送广播消息的起始时间固定,也就是说任意两个广播时段之间的时间间隔相同。例如,电子设备#1间隔固定的时长,在不同的广播信道上发送广播消息,也即,电子设备#1可以在不同的广播时段,在不同的广播信道上发送广播消息,且不同的广播时段中任意两个广播时段之间的时间间隔相同。Wherein, each broadcast period may occupy a time slot, and within the broadcast period, the electronic device may send broadcast messages on multiple broadcast channels. The multiple broadcast channels are predefined broadcast channels used to send broadcast messages during the neighbor discovery process, for example, they may be multiple broadcast channels predefined by a protocol. It should be noted that the time interval between any two broadcast periods in the plurality of broadcast periods can be fixed, as shown in Figure 3, the time interval between broadcast period #1 and broadcast period #2 is the same as that between broadcast period #2 and broadcast period #2. The time interval between period #3 is the same. The time length of any two broadcast periods in multiple broadcast periods may be different. For example, the time length of each broadcast period is related to the length of the data part in the broadcast message. The different lengths of the data part of different broadcast messages may cause the broadcast period to be different Different lengths. Therefore, after the time synchronization between the electronic devices, the start time of sending the broadcast message by the electronic device #1 can be fixed, that is to say, the time interval between any two broadcast periods is the same. For example, electronic device #1 sends broadcast messages on different broadcast channels at fixed intervals, that is, electronic device #1 can send broadcast messages on different broadcast channels during different broadcast periods, and different broadcast periods The time interval between any two broadcast periods in is the same.
例如图3中所示,电子设备#1(如图3中的智能音箱)在广播时段#1在信道37上发送广播消息,在广播时段#2在信道38上发送广播消息,在广播时段#3在信道39上发送广播消息。For example, as shown in FIG. 3 , electronic device #1 (such as the smart speaker in FIG. 3 ) sends a broadcast message on channel 37 during broadcast period #1, sends a broadcast message on channel 38 during broadcast period #2, and sends a broadcast message on channel 38 during broadcast period #2. 3 Send a broadcast message on channel 39.
S420、电子设备#2在扫描时段内随机选择一个广播信道进行扫描。S420. The electronic device #2 randomly selects a broadcast channel to scan within the scanning period.
由S410可知,电子设备#1通过多个广播信道发送广播消息,在图4所示的实施例中,电子设备#1发送的广播消息记为第二广播消息。电子设备#2可以从多个广播信道中随机选择一个广播信道进行扫描。例如图3中所示的广播信道,电子设备#2在扫描时段内选择信道37进行扫描,应理解,图3仅示出了一个扫描时段,但不应对此实施例构成任何限定,图3还可以包括多个扫描时段,电子设备#2可以在下一个扫描时段内选择信道38进行扫描。It can be known from S410 that electronic device #1 sends broadcast messages through multiple broadcast channels. In the embodiment shown in FIG. 4 , the broadcast message sent by electronic device #1 is recorded as a second broadcast message. Electronic device #2 may randomly select a broadcast channel from multiple broadcast channels to scan. For example, in the broadcast channel shown in FIG. 3, electronic device #2 selects channel 37 to scan during the scanning period. It should be understood that FIG. 3 only shows a scanning period, but this embodiment should not be construed as any limitation. Multiple scanning periods may be included, and electronic device #2 may select channel 38 to scan in the next scanning period.
应理解,上面以电子设备#1发送广播消息,电子设备#2扫描广播信道为例进行了介绍,但不应对本申请实施例构成任何限定。例如,电子设备#1扫描广播信道,电子设备#2发送广播消息。也就是说,两个电子设备建立设备组的过程中,发送广播消息的电子设备和扫描广播信道的电子设备是随机的。一示例,智能音箱#1发送广播消息,智能音箱#2扫描广播信道,从而发现对方,并建立设备组,或者智能音箱#1扫描广播信道,智能音箱#2发送广播消息,本申请实施例对此不作限定。It should be understood that the above description is made by taking electronic device #1 sending a broadcast message and electronic device #2 scanning a broadcast channel as an example, but this embodiment of the present application should not be construed as any limitation. For example, electronic device #1 scans a broadcast channel, and electronic device #2 sends a broadcast message. That is to say, when two electronic devices establish a device group, the electronic device that sends the broadcast message and the electronic device that scans the broadcast channel are random. As an example, smart speaker #1 sends a broadcast message, and smart speaker #2 scans the broadcast channel to discover the other party and establish a device group, or smart speaker #1 scans the broadcast channel, and smart speaker #2 sends a broadcast message. This is not limited.
S430、电子设备#2接收来自电子设备#1的广播消息。S430. The electronic device #2 receives the broadcast message from the electronic device #1.
电子设备#2随机选择一个广播信道进行扫描,当电子设备#2在某一广播信道上扫描到电子设备#1发送的广播消息时,接收来自电子设备#1的广播消息,即第二广播消息。电子设备#2接收该广播消息后,识别该广播消息,基于该广播消息确定发送该广播消息的电子设备。可以理解,电子设备与电子设备发送广播消息的地址对应,广播消息的数据部分携带有电子设备的发送地址,电子设备#2基于广播消息获取到发送该广播消息的电子设备的地址,即可确定发送该广播消息的电子设备。Electronic device #2 randomly selects a broadcast channel to scan, and when electronic device #2 scans a broadcast message sent by electronic device #1 on a certain broadcast channel, it receives the broadcast message from electronic device #1, that is, the second broadcast message . After receiving the broadcast message, electronic device #2 identifies the broadcast message, and determines the electronic device sending the broadcast message based on the broadcast message. It can be understood that the electronic device corresponds to the address of the electronic device sending the broadcast message, the data part of the broadcast message carries the sending address of the electronic device, and the electronic device #2 obtains the address of the electronic device that sent the broadcast message based on the broadcast message, and can determine The electronic device that sent the broadcast message.
一示例,电子设备#2基于BLE扫描发现电子设备#1。具体地,多个广播信道为信道37、信道38以及信道39,电子设备#1在不同的广播时段内,依次在信道37、信道38以及信道39上发送广播消息,电子设备#2在扫描时段内选择信道37进行扫描,在下一个扫描时段内扫描信道38,如此下去。比如,电子设备#1在信道37发送广播消息的同时,电子设备#2恰巧处于扫描时段,且在扫描信道37,则电子设备#扫描到电子设备#1发送的广播消息,接收该广播消息,并基于该广播消息,确定发送该广播消息的电子设备#1,即电子设备#2发现电子设备#1。In one example, electronic device #2 discovers electronic device #1 based on BLE scanning. Specifically, the multiple broadcast channels are channel 37, channel 38, and channel 39. Electronic device #1 sends broadcast messages on channel 37, channel 38, and channel 39 sequentially during different broadcast periods. Channel 37 is selected for scanning, channel 38 is scanned in the next scanning period, and so on. For example, while electronic device #1 is sending a broadcast message on channel 37, electronic device #2 happens to be in the scanning period and scanning channel 37, then electronic device # scans the broadcast message sent by electronic device #1, receives the broadcast message, And based on the broadcast message, it is determined that the electronic device #1 that sent the broadcast message, that is, the electronic device #2 discovers the electronic device #1.
S440、电子设备#1与电子设备#2建立连接。S440. The electronic device #1 establishes a connection with the electronic device #2.
在一种可能的实现方式中,电子设备#2发现电子设备#1后,向电子设备#1发送请求连接的消息,相应地,电子设备#1向电子设备#2发送回应的消息,电子设备#1与电子设 备#2建立连接。In a possible implementation, after electronic device #2 discovers electronic device #1, it sends a connection request message to electronic device #1, and accordingly, electronic device #1 sends a response message to electronic device #2, and the electronic device #1 establishes a connection with electronic device #2.
S450、电子设备#1与电子设备#2形成设备组#1。S450. The electronic device #1 and the electronic device #2 form a device group #1.
电子设备#1与电子设备#2建立连接后,可以交换设备信息,各电子设备可以基于本身的设备信息和接收到的来自对端的设备信息形成第三邻居描述表。After establishing a connection between electronic device #1 and electronic device #2, device information can be exchanged, and each electronic device can form a third neighbor description table based on its own device information and received device information from the peer.
其中,上述第三邻居描述表中包括电子设备#1的设备信息和电子设备#2的设备信息。电子设备#1与电子设备#2建立连接后,交换设备信息,也就是,电子设备#1将自身的设备信息发送给电子设备#2,电子设备#2接收后,形成第三邻居描述表,该第三邻居描述表中包括电子设备#1的设备信息和电子设备#2的设备信息。同样地,电子设备#2也可以接收电子设备#1的设备信息,形成第三邻居描述表。换言之,处于设备组#1中的电子设备#1与电子设备#2共享第三邻居描述表中的各电子设备的设备信息。设备组#1中的任意一个电子设备都可以通过第三邻居描述表查询到设备组#1中每个电子设备的设备信息。Wherein, the above-mentioned third neighbor description table includes the device information of the electronic device #1 and the device information of the electronic device #2. After establishing a connection between electronic device #1 and electronic device #2, they exchange device information, that is, electronic device #1 sends its own device information to electronic device #2, and electronic device #2 forms a third neighbor description table after receiving it. The third neighbor description table includes device information of electronic device #1 and device information of electronic device #2. Similarly, electronic device #2 may also receive the device information of electronic device #1 to form a third neighbor description table. In other words, the electronic device #1 and the electronic device #2 in the device group #1 share the device information of each electronic device in the third neighbor description table. Any electronic device in the device group #1 can query the device information of each electronic device in the device group #1 through the third neighbor description table.
一种可能的设计是,电子设备#1和电子设备#2交换的设备信息包括:电子设备的ID、电子设备的广播信道、以及电子设备的广播时间。A possible design is that the device information exchanged between electronic device #1 and electronic device #2 includes: the ID of the electronic device, the broadcast channel of the electronic device, and the broadcast time of the electronic device.
上述电子设备的ID可以对应于设备地址(device address),例如包括但不限于,公用设备地址(public device address)、或静态设备地址(static device address)、或可分辨设备地址(resolvable device address)等。电子设备的广播信道用于指示该电子设备发送广播消息的信道,电子设备的广播时间用于指示电子设备在广播信道上发送广播消息的时间。例如,电子设备#1需要获取电子设备#2发送广播消息的时间以及信道,以便于电子设备#1在同一时间,同一信道与电子设备#2通信,无需再次执行扫描发现的过程。The ID of the above-mentioned electronic device may correspond to a device address (device address), for example including but not limited to, a public device address (public device address), or a static device address (static device address), or a resolvable device address (resolvable device address) wait. The broadcast channel of the electronic device is used to indicate the channel on which the electronic device sends the broadcast message, and the broadcast time of the electronic device is used to indicate the time when the electronic device sends the broadcast message on the broadcast channel. For example, electronic device #1 needs to obtain the time and channel when electronic device #2 sends a broadcast message, so that electronic device #1 can communicate with electronic device #2 at the same time and on the same channel without performing the scanning discovery process again.
另一种可能的设计是,电子设备#1和电子设备#2交换的设备信息还包括如下一项或多项:设备组的ID、设备组中的电子设备的数目、链路质量参数、时间戳、以及老化时间(aging time)。Another possible design is that the device information exchanged between electronic device #1 and electronic device #2 also includes one or more of the following: ID of the device group, number of electronic devices in the device group, link quality parameters, time Stamp, and aging time.
其中,链路质量参数用于指示链路质量,如接收的信号强度指示(received signal strength indication,RSSI);时间戳用于指示电子设备的设备信息的更新时间;老化时间用于判断电子设备是否离开设备组,可以是绝对时间,如9:15,也可以是间隔时间,如3分钟,本申请实施例对此不作限定。Among them, the link quality parameter is used to indicate the link quality, such as received signal strength indication (received signal strength indication, RSSI); the timestamp is used to indicate the update time of the device information of the electronic device; the aging time is used to judge whether the electronic device is Leaving the device group may be an absolute time, such as 9:15, or an interval time, such as 3 minutes, which is not limited in this embodiment of the present application.
一示例,如图5所示,邻居描述表中的设备信息可以包括:设备组#1的ID、电子设备的ID、设备组#1中的电子设备的数目、链路质量参数、电子设备的广播信道、电子设备的广播时间、时间戳、以及老化时间。其中,时间戳表示加入设备组#1的时间,时间戳和老化时间可以用于维护该邻居描述表,老化时间可以用于判断电子设备是否离开该设备组。As an example, as shown in FIG. 5, the device information in the neighbor description table may include: the ID of the device group #1, the ID of the electronic device, the number of electronic devices in the device group #1, the link quality parameter, the ID of the electronic device Broadcast channel, broadcast time of the electronic device, timestamp, and aging time. Wherein, the time stamp indicates the time of joining the device group #1, the time stamp and the aging time can be used to maintain the neighbor description table, and the aging time can be used to judge whether the electronic device leaves the device group.
应理解,蓝牙协议栈框架包括但不限于主机(host)协议栈、主机控制接口(host controller interface,HCI)、以及控制器(controller)。其中,主机协议栈定义了通用访问规范(generic access profile,GAP),GAP存放用于设备连接的相关的信息(Profile)。在本申请实施例中,在Profile中新增加邻居描述表中的信息,即设备组中各电子设备的设备信息,如电子设备的ID、电子设备的广播信道、电子设备的广播时间、设备组的ID、设备组中的电子设备的数目、链路质量参数、时间戳、以及老化时间等。其中,设备组内的Profile交换,可以通过私有的Profile,这些Profile都存在Host协议栈内。换言之,设备组内的电子设备交换的上述设备信息,对方可以识别。It should be understood that the Bluetooth protocol stack framework includes, but is not limited to, a host (host) protocol stack, a host controller interface (host controller interface, HCI), and a controller (controller). Among them, the host protocol stack defines a generic access profile (generic access profile, GAP), and the GAP stores related information (Profile) for device connection. In the embodiment of this application, the information in the neighbor description table is newly added to the Profile, that is, the device information of each electronic device in the device group, such as the ID of the electronic device, the broadcast channel of the electronic device, the broadcast time of the electronic device, and the device group ID, number of electronic devices in the device group, link quality parameters, time stamp, and aging time, etc. Among them, the profile exchange in the device group can be through private profiles, and these profiles are all stored in the host protocol stack. In other words, the above-mentioned device information exchanged by the electronic devices in the device group can be identified by the other party.
电子设备#1和电子设备#2形成第三邻居描述表后,进行时间同步。例如可以基于精确时间协议(precision time protocol,PTP)进行时间同步,具体的步骤的可参看已知的技术,为了简洁,此处不再详细描述。After the electronic device #1 and the electronic device #2 form the third neighbor description table, time synchronization is performed. For example, time synchronization can be performed based on a precision time protocol (precision time protocol, PTP). For specific steps, reference can be made to known technologies. For the sake of brevity, no detailed description is given here.
应理解,形成设备组#1后,任何一个设备组#1外的电子设备可以通过扫描发现设备组#1中的任意一个电子设备,进而发现设备组#1中的所有电子设备。例如,电子设备#3可以基于图4所示的流程,通过扫描发现设备组#1中的任意一个电子设备,形成设备组#2,设备组#2中包括电子设备#1、电子设备#2、以及电子设备#3,电子设备#3还可通过向其他电子设备发送自身的设备信息,和从其他电子设备接收邻居描述表,形成设备组#2的邻居描述表。又例如,电子设备#4可以通过扫描发现设备组#2中的任意一个电子设备。下面结合图6详细描述电子设备#4发现设备组#2及加入设备组#2的过程。It should be understood that after the device group #1 is formed, any electronic device outside the device group #1 can discover any electronic device in the device group #1 by scanning, and then discover all the electronic devices in the device group #1. For example, electronic device #3 may scan and discover any electronic device in device group #1 based on the flow shown in FIG. 4 to form device group #2. Device group #2 includes electronic device #1 and electronic device #2. , and electronic device #3, electronic device #3 can also form a neighbor description table of device group #2 by sending its own device information to other electronic devices and receiving neighbor description tables from other electronic devices. For another example, electronic device #4 may discover any electronic device in device group #2 by scanning. The process of the electronic device #4 discovering the device group #2 and joining the device group #2 will be described in detail below with reference to FIG. 6 .
图6为本申请实施例提供的一种邻居发现方法600的示意性流程图。图6所示的方法600可以包括S610至S640,下面对图6中的各个步骤做详细说明。FIG. 6 is a schematic flowchart of a neighbor discovery method 600 provided by an embodiment of the present application. The method 600 shown in FIG. 6 may include S610 to S640, and each step in FIG. 6 will be described in detail below.
需要说明的是,为便于理解,做出如下假设:用于发送广播消息的信道包括第一广播信道、第二广播信道和第三广播信道。在图6所示的流程中,设备组#2为第一设备组的一个示例,电子设备#4为第一电子设备的一个示例。第一设备组中可以包括更多或更少数量的电子设备,本申请实施例对第一设备组中的电子设备的数量不作限定。It should be noted that, for ease of understanding, the following assumption is made: channels used to send broadcast messages include a first broadcast channel, a second broadcast channel, and a third broadcast channel. In the process shown in FIG. 6 , device group #2 is an example of the first device group, and electronic device #4 is an example of the first electronic device. The first device group may include more or fewer electronic devices, and this embodiment of the present application does not limit the number of electronic devices in the first device group.
S610、电子设备#4在扫描时段内扫描预定义的多个广播信道中的第一广播信道。S610. The electronic device #4 scans the first broadcast channel among the predefined multiple broadcast channels within the scan period.
应理解,电子设备#4希望加入设备组#2,因此,电子设备#4扫描广播消息,设备组#2中的电子设备发送广播消息,换言之,希望加入设备组的电子设备扫描设备组中的电子设备发送的广播消息。It should be understood that the electronic device #4 wants to join the device group #2, therefore, the electronic device #4 scans the broadcast message, and the electronic devices in the device group #2 send the broadcast message, in other words, the electronic device that wishes to join the device group scans the device group Broadcast messages sent by electronic devices.
其中,在至少一个广播时段的每个广播时段中,上述预定义的多个广播信道中至少有两个广播信道上传输有来自设备组#2中的电子设备的广播消息。上述预定义的多个广播信道是在邻居发现过程中用于发送广播消息的广播信道,例如可以是协议预先定义好的多个广播信道。Wherein, in each broadcast period of at least one broadcast period, broadcast messages from electronic devices in device group #2 are transmitted on at least two broadcast channels among the plurality of predefined broadcast channels. The aforementioned multiple predefined broadcast channels are broadcast channels used to send broadcast messages during the neighbor discovery process, for example, they may be multiple predefined broadcast channels defined by the protocol.
在一种可能的设计中,每个广播时段占用一个时隙。同一时隙内第一设备组中至少有两个电子设备在不同的广播信道上发送广播消息。In one possible design, each broadcast period occupies a time slot. In the same time slot, at least two electronic devices in the first device group send broadcast messages on different broadcast channels.
设备组#2的多个电子设备在发送广播信息之前需要进行时间同步。应理解,设备组#2中的电子设备发送广播消息的起始时间相同,任意两次发送广播消息的时间间隔相同,也即多个广播时段中任意两个广播时段的时间间隔相同,避免了广播消息之间发生资源碰撞。Multiple electronic devices in device group #2 need to perform time synchronization before sending broadcast information. It should be understood that the electronic devices in device group #2 start to send broadcast messages at the same time, and the time intervals between any two broadcast messages are the same, that is, the time intervals between any two broadcast periods among the multiple broadcast periods are the same, avoiding A resource collision occurs between broadcast messages.
时间同步后,设备组#2中的每个电子设备依次在不同的广播信道上发送广播消息,例如多个广播信道包括第一广播信道、第二广播信道、以及第三广播信道,设备组#2包括电子设备#1、电子设备#2、以及电子设备#3。电子设备#1在不同的广播时段依次在第一广播信道、第二广播信道、第三广播信道上发送广播消息,电子设备#2在电子设备#1发送广播消息的广播信道的下一个信道发送广播消息,即依次在第二广播信道、第三广播信道、第一广播信道上发送广播消息,电子设备#3在电子设备#2发送广播消息的广播信道的下一个信道发送广播消息,即依次在第三广播信道、第一广播信道、第二广播信道上发送广播消息。由前可知,第一设备组中的各电子设备已经进行时间同步,可以看出,对于第一个广播时段来说,三个广播信道上分别传输有电子设备#1、电子设备#2、以及电子设备#3发送的广播消息,则电子设备#4随机选取一个广播信道(如第一广播信道)进行扫描,都 能扫描到其中一个电子设备的广播消息。对于第二个广播时段来说,三个广播信道上分别传输有电子设备#3、电子设备#1、以及电子设备#2发送的广播消息,则电子设备#4随机选取一个广播信道进行扫描,都能扫描到其中一个电子设备的广播消息。对于每一个广播时段,电子设备#4都能扫描到其中一个电子设备的广播消息,为了简洁,此处不再一一赘述。After time synchronization, each electronic device in device group #2 sends broadcast messages on different broadcast channels in turn, for example, multiple broadcast channels include the first broadcast channel, the second broadcast channel, and the third broadcast channel, and device group # 2 includes electronic device #1, electronic device #2, and electronic device #3. Electronic device #1 sends broadcast messages on the first broadcast channel, the second broadcast channel, and the third broadcast channel in sequence in different broadcast periods, and electronic device #2 sends broadcast messages on the next channel of the broadcast channel on which electronic device #1 sends broadcast messages Broadcast messages, that is, send broadcast messages on the second broadcast channel, the third broadcast channel, and the first broadcast channel in sequence, and electronic device #3 sends broadcast messages on the next channel of the broadcast channel that electronic device #2 sends broadcast messages, that is, sequentially Broadcast messages are sent on the third broadcast channel, the first broadcast channel, and the second broadcast channel. It can be known from the above that the electronic devices in the first device group have been time-synchronized. It can be seen that for the first broadcast period, electronic device #1, electronic device #2, and electronic device #2 are respectively transmitted on the three broadcast channels For broadcast messages sent by electronic device #3, electronic device #4 randomly selects a broadcast channel (such as the first broadcast channel) to scan, and can scan the broadcast message of one of the electronic devices. For the second broadcast period, broadcast messages sent by electronic device #3, electronic device #1, and electronic device #2 are respectively transmitted on the three broadcast channels, and then electronic device #4 randomly selects a broadcast channel to scan, Can scan the broadcast message of one of the electronic devices. For each broadcast period, the electronic device #4 can scan the broadcast message of one of the electronic devices, for the sake of brevity, details will not be repeated here.
可以理解,第一电子设备接收到第二电子设备发送的第一广播消息,表示至少一个广播时段在时域上第一电子设备的扫描时段有重叠。换言之,在至少一个广播时段在时域上与第一电子设备的扫描时段有重叠的情况下,第一电子设备才有可能在扫描时段扫描到第二电子设备发送的第一广播消息。It can be understood that the first electronic device receives the first broadcast message sent by the second electronic device, indicating that at least one broadcast period overlaps the scanning period of the first electronic device in the time domain. In other words, only when at least one broadcast period overlaps with the scan period of the first electronic device in the time domain, the first electronic device may scan the first broadcast message sent by the second electronic device during the scan period.
图7是本申请实施例提供的电子设备#4扫描发现设备组#2的一示例。如图7所示,以BLE场景为例,如设备组#2中的电子设备包括电子设备#1、电子设备#2、以及电子设备#3,多个广播信道包括信道37、信道38、以及信道39。电子设备#3依次在信道37、信道38、信道39上发送广播消息,电子设备#2依次在信道38、信道39、信道37上发送广播消息,电子设备#1依次在信道39、信道37、信道38上发送广播消息,可以看出,每个广播时段内,多个广播信道中的任意一个广播信道都传输有广播消息。电子设备#4的扫描时段与第二个广播时段与第三个广播时段在时域上存在重叠,则电子设备#4选取信道37在扫描时段开始扫描时,即可扫描到电子设备#1发送的广播消息。可以看出,若电子设备#4选取信道38在扫描时段开始扫描,也可扫描到电子设备#3发送的广播消息,若电子设备#4选取信道39在扫描时段开始扫描,也可扫描到电子设备#2发送的广播消息,换句话说,无论电子设备#4选择哪一个广播信道进行扫描,均可扫描到广播消息,大大提升了电子设备#4的扫描成功的概率,缩减了扫描的时长。Fig. 7 is an example of electronic device #4 scanning and discovering device group #2 provided by the embodiment of the present application. As shown in Figure 7, taking the BLE scene as an example, the electronic devices in device group #2 include electronic device #1, electronic device #2, and electronic device #3, and multiple broadcast channels include channel 37, channel 38, and Channel 39. Electronic device #3 sends broadcast messages on channel 37, channel 38, and channel 39 in sequence, electronic device #2 sends broadcast messages on channel 38, channel 39, and channel 37 in sequence, and electronic device #1 sends broadcast messages on channel 39, channel 37, and The broadcast message is sent on the channel 38. It can be seen that in each broadcast period, any one of the multiple broadcast channels transmits a broadcast message. The scanning period of electronic device #4 overlaps with the second broadcasting period and the third broadcasting period in the time domain, then electronic device #4 selects channel 37 to start scanning during the scanning period, and can scan to electronic device #1 to send broadcast message. It can be seen that if electronic device #4 selects channel 38 to start scanning during the scanning period, it can also scan the broadcast message sent by electronic device #3; if electronic device #4 selects channel 39 to start scanning during the scanning period, it can also scan to the electronic message The broadcast message sent by device #2, in other words, no matter which broadcast channel electronic device #4 chooses to scan, the broadcast message can be scanned, which greatly improves the probability of successful scanning of electronic device #4 and reduces the scanning time .
可以理解,上文中设备组#2中的电子设备的数量与广播信道的数量一致,但也可能存在如下两种情况。It can be understood that the number of electronic devices in the device group #2 above is consistent with the number of broadcast channels, but the following two situations may also exist.
一种可能的情况是,设备组#2中的电子设备的数量大于广播信道的数量,如设备组#2的电子设备的数量为N,广播信道的数量为M,则从设备组#2的N个电子设备中随机选取M个电子设备,该M个电子设备在同时在不同的广播信道上发送广播消息。其中,N>M≥1,且M、N为整数。A possible situation is that the number of electronic devices in device group #2 is greater than the number of broadcast channels, such as the number of electronic devices in device group #2 is N, and the number of broadcast channels is M, then the number of electronic devices from device group #2 M electronic devices are randomly selected from the N electronic devices, and the M electronic devices send broadcast messages on different broadcast channels at the same time. Wherein, N>M≥1, and M and N are integers.
基于上述处理方法,对于同一电子设备说,该电子设备在某一广播信道上发送广播的时间间隔大于广播消息发送的时间,当该电子设备在该广播信道上两次发送广播消息的时间间隔较短,则需要频繁唤醒该电子设备,导致电量消耗较多;当该电子设备在该广播信道上两次发送广播消息的时间间隔较长,则可能导致广播信道出现空闲状态,当另一电子设备进行扫描时,无法扫描到。因此,当设备组中的电子设备的数量大于广播信道的数量时,设备组中的电子设备还可以采用如下方法发送广播消息。Based on the above processing method, for the same electronic device, the time interval for the electronic device to send a broadcast on a certain broadcast channel is longer than the time for sending a broadcast message. short, the electronic device needs to be woken up frequently, resulting in more power consumption; when the time interval between two broadcast messages sent by the electronic device on the broadcast channel is long, the broadcast channel may appear idle, When scanning, it cannot be scanned. Therefore, when the number of electronic devices in the device group is greater than the number of broadcast channels, the electronic devices in the device group can also use the following method to send broadcast messages.
一种可能的实现方式是,对于设备组中的任意一个电子设备来说,增大该电子设备在同一信道上两次发送广播消息的时间间隔,在该时间段内设备组的其他设备可以在该信道上分别发送广播消息。A possible implementation is, for any electronic device in the device group, increase the time interval between two broadcast messages sent by the electronic device on the same channel, during which other devices in the device group can Broadcast messages are sent on this channel respectively.
例如,原来电子设备#3在信道37上每隔3分钟发一次广播消息,当设备组中设备的数量大于3时,可以将电子设备#3在信道37上两次发送广播消息的时间间隔增大至5分钟,则该时间段内设备组中的其他设备可以在该信道上分别发送广播消息,比如在图7中, 在信道37上,电子设备#3两次发送广播消息的时间间隔增大,也就是说,电子设备#3、电子设备#1以及电子设备#2发送广播消息的时间间隔内会有信道处于空闲状态的情况,则设备组中的其他电子设备,如电子设备#5可以在电子设备#3和电子设备#1之间发送广播消息,电子设备#6可以在电子设备#2后发送广播消息,从而增大了电子设备#4扫描到广播消息的概率。For example, the original electronic device #3 sends a broadcast message on channel 37 every 3 minutes. When the number of devices in the device group is greater than 3, the time interval for electronic device #3 to send broadcast messages on channel 37 twice can be increased. as long as 5 minutes, other devices in the device group can respectively send broadcast messages on the channel during this time period. For example, in Figure 7, on channel 37, the time interval between electronic device #3 sending broadcast messages twice That is to say, there will be a channel in the idle state during the time interval between electronic device #3, electronic device #1 and electronic device #2 sending broadcast messages, then other electronic devices in the device group, such as electronic device #5 The broadcast message can be sent between the electronic device #3 and the electronic device #1, and the electronic device #6 can send the broadcast message after the electronic device #2, thereby increasing the probability that the electronic device #4 scans the broadcast message.
另一种可能的情况是,设备组#2中的电子设备的数量小于广播信道的数量,如设备组#2的电子设备的数量为N,广播信道的数量为M,则从M个广播信道中选取N个广播信道,第一设备组中的电子设备在上述N个广播信道上发送广播消息,换言之,在同一时域内,M个广播信道中有M-N个广播信道处于空闲状态。但在同一时域内,至少有两个广播信道中传输有广播消息,相比与只有一个广播信道上有广播消息来说,也提升了电子设备#4的扫描成功的概率,缩短了扫描的时长。Another possible situation is that the number of electronic devices in device group #2 is less than the number of broadcast channels, such as the number of electronic devices in device group #2 is N, and the number of broadcast channels is M, then from M broadcast channels N broadcast channels are selected, and the electronic devices in the first device group send broadcast messages on the above N broadcast channels. In other words, in the same time domain, M-N broadcast channels among the M broadcast channels are idle. However, in the same time domain, at least two broadcast channels transmit broadcast messages. Compared with broadcast messages on only one broadcast channel, the probability of successful scanning of electronic device #4 is also improved, and the scanning time is shortened. .
综上可知,每个广播时段内在多个广播信道上发送广播消息的电子设备的数量不大于多个广播信道的数量。It can be seen from the above that the number of electronic devices sending broadcast messages on multiple broadcast channels in each broadcast period is not greater than the number of multiple broadcast channels.
S620、电子设备#4基于在第一广播信道上接收到的电子设备#1的第一广播消息,与电子设备#1建立连接。S620. Electronic device #4 establishes a connection with electronic device #1 based on the first broadcast message received from electronic device #1 on the first broadcast channel.
应理解,在图6所示的实施例中,电子设备#1为第二电子设备的一示例。It should be understood that, in the embodiment shown in FIG. 6 , the electronic device #1 is an example of the second electronic device.
电子设备#4在扫描时段内随机选择某一广播信道进行扫描,假设电子设备#4在第一广播信道上扫描到第一广播消息,其中,第一广播信道是多个广播信道中任意一个广播信道。电子设备#4扫描到第一广播消息后,基于第一广播消息,确定发送该第一广播消息的电子设备,例如图7中所示,电子设备#4在扫描时段内,扫描信道37,接收到该信道37上的广播消息,电子设备#4基于该广播消息,确定发送该广播消息的电子设备为电子设备#1。Electronic device #4 randomly selects a certain broadcast channel to scan within the scanning period, assuming that electronic device #4 scans the first broadcast message on the first broadcast channel, wherein the first broadcast channel is broadcast by any one of the multiple broadcast channels channel. After the electronic device #4 scans the first broadcast message, based on the first broadcast message, determine the electronic device that sends the first broadcast message, for example, as shown in FIG. 7, the electronic device #4 scans the channel 37 within the scanning period, receives For the broadcast message on the channel 37, the electronic device #4 determines that the electronic device sending the broadcast message is the electronic device #1 based on the broadcast message.
可以理解,电子设备与电子设备发送广播消息的地址对应,广播消息的数据部分携带有电子设备的发送地址,电子设备#4基于广播消息获取到发送该广播消息的电子设备的地址,即可确定发送该广播消息的电子设备。It can be understood that the electronic device corresponds to the address of the electronic device sending the broadcast message, and the data part of the broadcast message carries the sending address of the electronic device, and the electronic device #4 obtains the address of the electronic device that sent the broadcast message based on the broadcast message, and can determine The electronic device that sent the broadcast message.
假设电子设备#1是电子设备#4扫描发现的电子设备,电子设备#4接收到电子设备#1发送的第一广播消息后,向电子设备#1发送请求连接的消息,相应地,电子设备#1向电子设备#4发送回应的消息,二者建立连接。Assuming that electronic device #1 is an electronic device discovered by electronic device #4, after electronic device #4 receives the first broadcast message sent by electronic device #1, it sends a message requesting connection to electronic device #1. Correspondingly, electronic device #1 #1 sends a response message to electronic device #4, and the two establish a connection.
S630、电子设备#4从电子设备#1获取第一邻居描述表。S630. The electronic device #4 obtains the first neighbor description table from the electronic device #1.
电子设备#4与电子设备#1建立连接后,电子设备#4从电子设备#1获取第一邻居描述表,并基于本地的设备信息,更新第一邻居描述表,得到第二邻居描述表。可以理解,设备组#2中新加入了电子设备#4,形成新的设备组,记为设备组#3。设备组#3为第二设备组的一示例。第二设备组可以包括更多或更少数量的电子设备,本申请实施例对此不作限定。其中,第二邻居描述表中包括设备组#2中各电子设备的设备信息和电子设备#4的设备信息,换言之,与第一邻居描述表相比,第二邻居描述表中加入了电子设备#4的设备信息,即第二邻居描述表中包括设备组#3中各电子设备的设备信息。After electronic device #4 establishes a connection with electronic device #1, electronic device #4 obtains a first neighbor description table from electronic device #1, and updates the first neighbor description table based on local device information to obtain a second neighbor description table. It can be understood that electronic device #4 is newly added to device group #2 to form a new device group, which is denoted as device group #3. Device group #3 is an example of the second device group. The second device group may include more or less electronic devices, which is not limited in this embodiment of the present application. Wherein, the second neighbor description table includes the device information of each electronic device in the device group #2 and the device information of the electronic device #4. In other words, compared with the first neighbor description table, the second neighbor description table adds electronic device The device information of #4, that is, the second neighbor description table includes the device information of each electronic device in the device group #3.
一种可能的实现方式是,电子设备#4与电子设备#1建立连接后,电子设备#1将第一邻居描述表发送给电子设备#4,电子设备#4获取到第一邻居描述表,再基于本地的设备信息,更新第一邻居描述表,得到第二邻居描述表。可以理解,电子设备#4接收到第一邻居 描述表后,可以将自身的设备信息新增至第一邻居描述表中,形成第二邻居描述表。A possible implementation is that after the electronic device #4 establishes a connection with the electronic device #1, the electronic device #1 sends the first neighbor description table to the electronic device #4, and the electronic device #4 obtains the first neighbor description table, Based on the local device information, the first neighbor description table is updated to obtain the second neighbor description table. It can be understood that after electronic device #4 receives the first neighbor description table, it can add its own device information to the first neighbor description table to form a second neighbor description table.
相应地,电子设备#1更新第一邻居描述表。一种可能的设计是,电子设备#4可以将自身的设备信息发送给电子设备#1,电子设备#1将电子设备#4的设备信息增添至第一邻居描述表,更新第一邻居描述表,得到第二邻居描述表。另一种可能的设计是,电子设备#4也可以直接将第二邻居描述表发送给电子设备1,电子设备#1接收到第二邻居描述表,即可获取设备组#3中所有电子设备的设备信息。Correspondingly, electronic device #1 updates the first neighbor description table. One possible design is that electronic device #4 can send its own device information to electronic device #1, and electronic device #1 adds the device information of electronic device #4 to the first neighbor description table, and updates the first neighbor description table , get the second neighbor description table. Another possible design is that electronic device #4 can also directly send the second neighbor description table to electronic device 1, and electronic device #1 can obtain all electronic devices in device group #3 after receiving the second neighbor description table device information.
应理解,电子设备#4可以将本地的设备信息通知设备组#2中剩余的所有电子设备,触发其余电子设备更新第一邻居描述表,形成第二邻居描述表。It should be understood that the electronic device #4 may notify all remaining electronic devices in the device group #2 of the local device information, and trigger the remaining electronic devices to update the first neighbor description table to form the second neighbor description table.
还应理解,电子设备#4可以基于PTP进行时间同步,具体的步骤的可参看已知的技术,为了简洁,此处不再详细描述。It should also be understood that electronic device #4 may perform time synchronization based on PTP, and specific steps may refer to known technologies, which are not described in detail here for brevity.
S640、电子设备#4基于电子设备#3的设备信息,与电子设备#3建立连接。S640. The electronic device #4 establishes a connection with the electronic device #3 based on the device information of the electronic device #3.
应理解,电子设备#3为第三电子设备的一示例。电子设备#4还可以基于第二邻居描述表中各电子设备的设备信息,选择设备组#3中任意一个希望建立连接的电子设备,基于第二邻居描述表中该电子设备的设备信息,与该电子设备建立连接。具体地,电子设备#4可以基于第二邻居描述表,获取到电子设备的ID、电子设备的广播信道、以及电子设备的广播时间(即电子设备上一次发送广播消息的时间),换言之,由于已经进行时间同步,电子设备#4基于上述信息,可以计算出希望建立连接的电子设备(如电子设备#3)的广播信道、广播时间。电子设备#4确定出希望建立连接的电子设备#3下一次进行广播或侦听的信道和时间后,在同一时间、同一信道与该电子设备#3建立连接。其中,该电子设备#3是进行广播还是进行侦听,基于状态机确定。例如,电子设备#3处于广播状态,则电子设备#4进行侦听;若电子设备#3处于侦听状态,则电子设备#4进行广播。It should be understood that the electronic device #3 is an example of the third electronic device. Electronic device #4 can also select any electronic device in device group #3 that wishes to establish a connection based on the device information of each electronic device in the second neighbor description table, and based on the device information of the electronic device in the second neighbor description table, and The electronic device establishes a connection. Specifically, electronic device #4 can obtain the ID of the electronic device, the broadcast channel of the electronic device, and the broadcast time of the electronic device (that is, the time when the electronic device last sent a broadcast message) based on the second neighbor description table. Having performed time synchronization, electronic device #4 can calculate the broadcast channel and broadcast time of the electronic device (such as electronic device #3) wishing to establish a connection based on the above information. Electronic device #4 establishes a connection with electronic device #3 at the same time and on the same channel after determining the next broadcasting or listening channel and time of electronic device #3 wishing to establish a connection. Wherein, whether the electronic device #3 broadcasts or listens is determined based on the state machine. For example, if the electronic device #3 is in the broadcasting state, the electronic device #4 will listen; if the electronic device #3 is in the listening state, then the electronic device #4 will broadcast.
应理解,设备组#3中的各个电子设备能够共享第二邻居描述表中的设备信息,因此,若设备组#3中的任意两个电子设备想要建立连接,可以通过查询第二邻居描述表中的设备信息建立连接,无需再次进行扫描的过程,加快了连接速率,提高了用户体验。It should be understood that each electronic device in device group #3 can share the device information in the second neighbor description table. Therefore, if any two electronic devices in device group #3 want to establish a connection, they can query the second neighbor description The device information in the table establishes a connection without the need to scan again, which speeds up the connection rate and improves the user experience.
以电子设备#4为例,假设电子设备#4希望建立连接的电子设备为电子设备#3,则电子设备#4基于本地计算可以得知电子设备#3发送广播消息的时间与广播信道,并从第二邻居描述表中获取电子设备#3的设备信息。电子设备#4与电子设备#1解除连接后,向电子设备#3发送连接请求,与电子设备#3建立连接。其中,电子设备#4根据邻居描述表中电子设备#3的广播信道、广播时间计算出电子设备#3将在哪个信道上进行广播以及广播的时间,电子设备#4可以在该信道上进行侦听,与电子设备#3建立连接。或者,电子设备#3处于侦听状态,则电子设备#4可以在同一时间、同一信道上进行广播。Taking electronic device #4 as an example, assuming that the electronic device that electronic device #4 wants to establish a connection with is electronic device #3, then electronic device #4 can know the time and broadcast channel when electronic device #3 sends a broadcast message based on local calculation, and Acquire the device information of electronic device #3 from the second neighbor description table. After the electronic device #4 disconnects from the electronic device #1, it sends a connection request to the electronic device #3 to establish a connection with the electronic device #3. Among them, electronic device #4 calculates the channel on which electronic device #3 will broadcast and the broadcast time according to the broadcast channel and broadcast time of electronic device #3 in the neighbor description table, and electronic device #4 can perform detection on this channel. Listen, establish connection with electronic device #3. Alternatively, if electronic device #3 is in the listening state, then electronic device #4 can broadcast at the same time and on the same channel.
需要说明的是,邻居描述表中电子设备#3的广播时间是电子设备#3上一次发送广播消息的时间。电子设备#4可以查询邻居描述表中设备组#3中电子设备的数量和电子设备#3的广播时间,根据预定义的算法计算出电子设备#3下一次发送广播的时间,且设备组#3中都使用同一预定义的算法。It should be noted that the broadcast time of electronic device #3 in the neighbor description table is the time when electronic device #3 sent a broadcast message last time. Electronic device #4 can query the number of electronic devices in device group #3 in the neighbor description table and the broadcast time of electronic device #3, and calculate the next broadcast time of electronic device #3 according to a predefined algorithm, and device group # 3 all use the same predefined algorithm.
应理解,设备组#3中的电子设备之间需要判断对方是否离开设备组#3,从而更新第二邻居描述表的信息。例如,电子设备#3已经离开设备组#3,但第二邻居描述表中仍存在电子设备#3的设备信息,则电子设备#4基于该设备信息与电子设备#3建立连接,会产生连接失败的情况,因此,及时更新第二邻居描述表中的信息至关重要。It should be understood that the electronic devices in the device group #3 need to determine whether the other party leaves the device group #3, so as to update the information in the second neighbor description table. For example, electronic device #3 has left device group #3, but the device information of electronic device #3 still exists in the second neighbor description table, then electronic device #4 establishes a connection with electronic device #3 based on the device information, and a connection will be generated. In case of failure, it is therefore crucial to update the information in the second neighbor description table in a timely manner.
一种可能的设计是,通过是否接收到心跳包确定对方是否离开设备组#3,以电子设备#4为例,若电子设备#4接收到电子设备#1发送的心跳包,则在第二邻居描述表中更新电子设备#1的加入该设备组的时间,例如,原来的时间戳为9:00,老化时间为3分钟,接收到心跳包的时间为9:02,则更新其时间戳为9:02,无需更新老化时间。又例如,原来的时间戳为9:00,老化时间为9:03,接收到心跳包的时间为9:02,则更新其时间戳为9:02以及老化时间为9:05,可以理解,因为更新了时间戳,所以以更新后的时间戳计算老化时间,因此,当老化时间为具体的时间点时,也需要更新老化时间。若电子设备#1到达老化时间,但是电子设备#4仍未接收到心跳包,则确定电子设备#1离开设备组#3,并向设备组#3中的其余电子设备发送第一信息,第一信息用于指示电子设备#1离开设备组#3。A possible design is to determine whether the other party leaves the device group #3 by receiving a heartbeat packet. Taking electronic device #4 as an example, if electronic device #4 receives the heartbeat packet sent by electronic device #1, then in the second Update the time when electronic device #1 joins the device group in the neighbor description table. For example, the original time stamp is 9:00, the aging time is 3 minutes, and the time when the heartbeat packet is received is 9:02, then update its time stamp is 9:02, no need to update the aging time. For another example, if the original timestamp is 9:00, the aging time is 9:03, and the time when the heartbeat packet is received is 9:02, then the timestamp is updated to 9:02 and the aging time is 9:05, which is understandable. Because the timestamp is updated, the aging time is calculated with the updated timestamp. Therefore, when the aging time is a specific time point, the aging time also needs to be updated. If the electronic device #1 reaches the aging time, but the electronic device #4 has not received the heartbeat packet, it is determined that the electronic device #1 leaves the device group #3, and sends the first message to the remaining electronic devices in the device group #3, the second A message for instructing electronic device #1 to leave device group #3.
另一种可能的设计是,通过直接发送指示离开的信息通知对方离开设备组#3。以电子设备#4为例,若电子设备#4要离开设备组#3,则直接向设备组#3的其余电子设备发送第二信息,第二信息用于指示电子设备#4离开设备组#3。Another possible design is to notify the other party to leave the device group #3 by directly sending information indicating to leave. Taking electronic device #4 as an example, if electronic device #4 wants to leave device group #3, it will directly send second information to other electronic devices in device group #3, and the second message is used to instruct electronic device #4 to leave device group# 3.
基于上述技术方案,同一设备组内的电子设备可以在同一广播时段内通过不同的广播信道发送广播消息,使得待加入的电子设备扫描到其中任意一个广播信道,都可以发现设备组中其中一个电子设备。且将包括设备组中所有电子设备的设备信息的邻居描述表共享给设备组内各电子设备,使得待加入的电子设备在发现了设备组中的任意一个电子设备之后,便可以发现该设备组中的所有电子设备。因此,提升了待加入的电子设备对周围的电子设备扫描成功的概率,缩短了发现周围电子设备的概率性的延迟,减少了待加入的电子设备进行邻居发现过程的时长,并且,设备组内的电子设备数量越多,该方案所带来的效果越显著。因为电子设备越多,点对点单设备扫描成功的概率越低,可能带来的概率性的延迟越大。但若使用上述方案,可以快速发现设备组内的任意节点,明显降低邻居发现时延,提高用户体验。Based on the above technical solution, the electronic devices in the same device group can send broadcast messages through different broadcast channels in the same broadcast period, so that the electronic devices to be added can scan any one of the broadcast channels, and can find one of the electronic devices in the device group. equipment. And the neighbor description table including the device information of all electronic devices in the device group is shared with each electronic device in the device group, so that the electronic device to be joined can discover the device group after discovering any electronic device in the device group All electronic equipment in. Therefore, the probability that the electronic device to be added successfully scans the surrounding electronic devices is improved, the probabilistic delay in discovering the surrounding electronic devices is shortened, and the time for the electronic device to be added to perform the neighbor discovery process is reduced. The greater the number of electronic devices, the more significant the effect of this solution. Because the more electronic devices, the lower the probability of successful point-to-point single-device scanning, and the greater the probabilistic delay that may be caused. However, if the above solution is used, any node in the device group can be quickly discovered, which significantly reduces the neighbor discovery delay and improves user experience.
应理解,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。为避免重复,这里不再详细描述。It should be understood that each step of the above method may be implemented by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the methods disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register. The storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware. To avoid repetition, no detailed description is given here.
本申请还提供一种电子设备,该电子设备可以包括:存储器和处理器。其中,存储器可用于存储计算机程序;处理器可用于调用所述存储器中的计算机程序,以使得该电子设备执行图4和图6所示实施例中任意一个实施例所述的方法。The present application also provides an electronic device, which may include: a memory and a processor. Wherein, the memory may be used to store a computer program; the processor may be used to call the computer program in the memory, so that the electronic device executes the method described in any one of the embodiments shown in FIG. 4 and FIG. 6 .
本申请还提供了一种芯片系统,所述芯片系统包括至少一个处理器,用于实现上述图4和图6所示实施例中任意一个实施例所述的方法,例如,接收或处理上述方法中所涉及的数据和/或信息。The present application also provides a chip system, the chip system includes at least one processor, configured to implement the method described in any one of the above embodiments shown in Figure 4 and Figure 6, for example, receive or process the above method data and/or information referred to in .
在一种可能的设计中,所述芯片系统还包括存储器,所述存储器用于保存程序指令和数据,存储器位于处理器之内或处理器之外。In a possible design, the chip system further includes a memory, the memory is used to store program instructions and data, and the memory is located inside or outside the processor.
该芯片系统可以由芯片构成,也可以包含芯片和其他分立器件。The system-on-a-chip may consist of chips, or may include chips and other discrete devices.
本申请还提供一种计算机程序产品,所述计算机程序产品包括:计算机程序(也可以称为代码,或指令),当所述计算机程序被运行时,使得电子设备实现图4或图6所示实 施例中任意一个实施例所述的方法。The present application also provides a computer program product, the computer program product including: a computer program (also referred to as code, or instruction), when the computer program is executed, the electronic device can realize the electronic device shown in Figure 4 or Figure 6. The method described in any one of the embodiments.
本申请还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序(也可以称为代码,或指令)。当所述计算机程序被运行时,使得电子设备实现图4或图6所示实施例中任意一个实施例所述的方法。The present application also provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program (also called a code, or an instruction). When the computer program is executed, the electronic device is made to implement the method described in any one of the embodiments shown in FIG. 4 or FIG. 6 .
应理解,本申请实施例中的处理器可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。It should be understood that the processor in the embodiment of the present application may be an integrated circuit chip that has a signal processing capability. In the implementation process, each step of the above-mentioned method embodiments may be completed by an integrated logic circuit of hardware in a processor or instructions in the form of software. The above-mentioned processor can be a general-purpose processor, a digital signal processor (digital signal processor, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field programmable gate array, FPGA) or other possible Program logic devices, discrete gate or transistor logic devices, discrete hardware components. Various methods, steps, and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register. The storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware.
还应理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。It should also be understood that the memory in the embodiments of the present application may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the non-volatile memory can be read-only memory (read-only memory, ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically programmable Erases programmable read-only memory (electrically EPROM, EEPROM) or flash memory. Volatile memory can be random access memory (RAM), which acts as external cache memory. By way of illustration and not limitation, many forms of RAM are available such as static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory (synchlink DRAM, SLDRAM ) and direct memory bus random access memory (direct rambus RAM, DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but not be limited to, these and any other suitable types of memory.
本说明书中使用的术语“单元”、“模块”等,可用于表示计算机相关的实体、硬件、固件、硬件和软件的组合、软件、或执行中的软件。The terms "unit", "module" and the like used in this specification may be used to denote a computer-related entity, hardware, firmware, a combination of hardware and software, software, or software in execution.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各种说明性逻辑块(illustrative logical block)和步骤(step),能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。在本申请所提供的几个实施例中,应该理解到,所揭露的装置、设备和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信 连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。Those of ordinary skill in the art can appreciate that various illustrative logical blocks (illustrative logical blocks) and steps (steps) described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, or a combination of computer software and electronic hardware. accomplish. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application. In the several embodiments provided in this application, it should be understood that the disclosed devices, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
在上述实施例中,各功能单元的功能可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令(程序)。在计算机上加载和执行所述计算机程序指令(程序)时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,数字通用光盘(digital video disc,DVD))、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。In the above embodiments, the functions of each functional unit may be fully or partially implemented by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product comprises one or more computer instructions (programs). When the computer program instructions (program) are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data center Transmission to another website site, computer, server or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media. The available medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital versatile disc (digital video disc, DVD)), or a semiconductor medium (for example, a solid state disk (solid state disk, SSD) )wait.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。If the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: various media capable of storing program codes such as U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only a specific implementation of the application, but the scope of protection of the application is not limited thereto. Anyone familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the application. Should be covered within the protection scope of this application. Therefore, the protection scope of the present application should be determined by the protection scope of the claims.

Claims (15)

  1. 一种邻居发现方法,其特征在于,包括:A neighbor discovery method is characterized in that, comprising:
    第一电子设备在扫描时段内扫描第一广播信道,所述第一广播信道是预定义的多个广播信道中的任意一个,在至少一个广播时段的每个广播时段中,所述多个广播信道中至少有两个广播信道上传输有广播消息,所述广播消息来自第一设备组中的电子设备;The first electronic device scans the first broadcast channel within the scanning period, the first broadcast channel is any one of a plurality of predefined broadcast channels, and in each broadcast period of at least one broadcast period, the plurality of broadcast channels Broadcast messages are transmitted on at least two broadcast channels among the channels, and the broadcast messages are from electronic devices in the first device group;
    所述第一电子设备基于在所述第一广播信道上接收到第二电子设备发送的第一广播消息,与所述第二电子设备建立连接,所述第二电子设备为所述第一设备组中的电子设备;The first electronic device establishes a connection with the second electronic device based on receiving a first broadcast message sent by the second electronic device on the first broadcast channel, and the second electronic device is the first device electronic equipment in the group;
    所述第一电子设备从所述第二电子设备获取第一邻居描述表,所述第一邻居描述表包括所述第一设备组中每个电子设备的设备信息。The first electronic device acquires a first neighbor description table from the second electronic device, and the first neighbor description table includes device information of each electronic device in the first device group.
  2. 如权利要求1所述的方法,其特征在于,所述每个广播时段内在所述多个广播信道上发送广播消息的电子设备的数量不大于所述多个广播信道的数量。The method according to claim 1, wherein the number of electronic devices sending broadcast messages on the plurality of broadcast channels in each broadcast period is not greater than the number of the plurality of broadcast channels.
  3. 如权利要求1或2所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 2, further comprising:
    所述第一电子设备基于本地的设备信息,更新所述第一邻居描述表,得到第二邻居描述表;所述第二邻居描述表包括第二设备组中每个电子设备的设备信息,所述第二设备组包括所述第一电子设备和所述第一设备组中的电子设备。The first electronic device updates the first neighbor description table based on local device information to obtain a second neighbor description table; the second neighbor description table includes device information of each electronic device in the second device group, so The second device group includes the first electronic device and electronic devices in the first device group.
  4. 如权利要求1至3中任一项所述的方法,其特征在于,所述设备信息包括:设备的标识ID、设备的广播信道、以及设备的广播时间,其中,所述设备的广播时间用于指示所述设备最近一次发送广播消息的时间。The method according to any one of claims 1 to 3, wherein the device information includes: an ID of the device, a broadcast channel of the device, and a broadcast time of the device, wherein the broadcast time of the device is represented by Indicates when the device last sent a broadcast message.
  5. 如权利要求4所述的方法,其特征在于,所述设备信息还包括如下一项或多项:The method according to claim 4, wherein the device information further includes one or more of the following:
    设备组的ID、所述设备组中的电子设备的数目、链路质量参数、时间戳、以及老化时间,其中,所述链路质量参数用于指示链路质量。The ID of the device group, the number of electronic devices in the device group, a link quality parameter, a time stamp, and an aging time, wherein the link quality parameter is used to indicate link quality.
  6. 如权利要求1至5中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 5, further comprising:
    所述第一电子设备基于第三电子设备的设备信息,与所述第三电子设备建立连接,所述第三电子设备为所述第一设备组中所述第一电子设备希望建立连接的电子设备,且所述第三电子设备为所述第一设备组内的任意一个电子设备。The first electronic device establishes a connection with the third electronic device based on the device information of the third electronic device, and the third electronic device is an electronic device in the first device group that the first electronic device wishes to establish a connection with. device, and the third electronic device is any electronic device in the first device group.
  7. 一种电子设备,其特征在于,包括至少一个处理器,所述至少一个处理器用于执行计算机程序,使得所述电子设备执行如下操作:An electronic device is characterized in that it includes at least one processor, and the at least one processor is configured to execute a computer program, so that the electronic device performs the following operations:
    在扫描时段内扫描第一广播信道,所述第一广播信道是预定义的多个广播信道中的任意一个,在至少一个广播时段的每个广播时段中,所述多个广播信道中至少有两个广播信道上传输有广播消息,所述广播消息来自第一设备组中的电子设备;Scan the first broadcast channel within the scanning period, the first broadcast channel is any one of a plurality of predefined broadcast channels, and in each broadcast period of at least one broadcast period, at least one of the plurality of broadcast channels broadcast messages are transmitted on the two broadcast channels, and the broadcast messages are from electronic devices in the first device group;
    基于在所述第一广播信道上接收到的第二电子设备发送的第一广播消息,与所述第二电子设备建立连接,所述第二电子设备为所述第一设备组中的电子设备;Establishing a connection with the second electronic device based on the first broadcast message sent by the second electronic device received on the first broadcast channel, where the second electronic device is an electronic device in the first device group ;
    从所述第二电子设备获取第一邻居描述表,所述第一邻居描述表包括所述第一设备组中每个电子设备的设备信息。Obtain a first neighbor description table from the second electronic device, where the first neighbor description table includes device information of each electronic device in the first device group.
  8. 如权利要求7所述的电子设备,其特征在于,所述每个广播时段内在所述多个广播信道上发送广播消息的电子设备的数量不大于所述多个广播信道的数量。The electronic device according to claim 7, wherein the number of electronic devices sending broadcast messages on the plurality of broadcast channels in each broadcast period is not greater than the number of the plurality of broadcast channels.
  9. 如权利要求7或8所述的电子设备,其特征在于,所述至少一个处理器用于执行计算机程序,使得所述电子设备执行如下操作:The electronic device according to claim 7 or 8, wherein the at least one processor is configured to execute a computer program, so that the electronic device performs the following operations:
    基于本地的设备信息,更新所述第一邻居描述表,得到第二邻居描述表;所述第二邻 居描述表包括第二设备组中每个电子设备的设备信息,所述第二设备组包括所述电子设备和所述第一设备组中的电子设备。Based on the local device information, the first neighbor description table is updated to obtain a second neighbor description table; the second neighbor description table includes device information of each electronic device in the second device group, and the second device group includes The electronic device and the electronic devices in the first device group.
  10. 如权利要求7至9中任一项所述的电子设备,其特征在于,所述设备信息包括:设备的标识ID、设备的广播信道、以及设备的广播时间,其中,所述设备的广播时间用于指示所述设备最近一次发送广播消息的时间。The electronic device according to any one of claims 7 to 9, wherein the device information includes: the identification ID of the device, the broadcast channel of the device, and the broadcast time of the device, wherein the broadcast time of the device It is used to indicate the last time when the device sent a broadcast message.
  11. 如权利要求10所述的方法,其特征在于,所述设备信息还包括如下一项或多项:The method according to claim 10, wherein the device information further includes one or more of the following:
    设备组的ID、所述设备组中的电子设备的数目、链路质量参数、时间戳、以及老化时间,其中,所述链路质量参数用于指示链路质量。The ID of the device group, the number of electronic devices in the device group, a link quality parameter, a time stamp, and an aging time, wherein the link quality parameter is used to indicate link quality.
  12. 如权利要求7至11中任一项所述的电子设备,其特征在于,所述至少一个处理器用于执行计算机程序,使得所述电子设备执行如下操作:The electronic device according to any one of claims 7 to 11, wherein the at least one processor is configured to execute a computer program, so that the electronic device performs the following operations:
    基于第三电子设备的设备信息,与所述第三电子设备建立连接,所述第三电子设备为所述第一设备组中所述电子设备希望建立连接的电子设备,且所述第三电子设备为所述第一设备组内的任意一个电子设备。Establish a connection with the third electronic device based on the device information of the third electronic device, the third electronic device is the electronic device with which the electronic device in the first device group wishes to establish a connection, and the third electronic device The device is any electronic device in the first device group.
  13. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时,使得电子设备执行如权利要求1至6中任一项所述的方法。A computer-readable storage medium, on which a computer program is stored, wherein, when the computer program is executed by a processor, the electronic device executes the method according to any one of claims 1 to 6.
  14. 一种计算机程序产品,其特征在于,包括计算机程序,当所述计算机程序被运行时,使得电子设备执行如权利要求1至6中任一项所述的方法。A computer program product, characterized by comprising a computer program, and when the computer program is executed, the electronic device is made to execute the method according to any one of claims 1 to 6.
  15. 一种程序产品,其特征在于,所述程序产品包括计算机程序,所述计算机程序存储在可读存储介质中,通信装置的至少一个处理器可以从所述可读存储介质读取所述计算机程序,所述至少一个处理器执行所述计算机程序使得通信装置实施如权利要求1-6任意一项所述的方法。A program product, characterized in that the program product includes a computer program, the computer program is stored in a readable storage medium, and at least one processor of a communication device can read the computer program from the readable storage medium , the at least one processor executes the computer program so that the communication device implements the method according to any one of claims 1-6.
PCT/CN2022/126526 2021-11-12 2022-10-20 Neighbor discovery method and electronic device WO2023082966A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111343116.1 2021-11-12
CN202111343116.1A CN116132963A (en) 2021-11-12 2021-11-12 Neighbor discovery method and electronic device

Publications (1)

Publication Number Publication Date
WO2023082966A1 true WO2023082966A1 (en) 2023-05-19

Family

ID=86301442

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/126526 WO2023082966A1 (en) 2021-11-12 2022-10-20 Neighbor discovery method and electronic device

Country Status (2)

Country Link
CN (1) CN116132963A (en)
WO (1) WO2023082966A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070268856A1 (en) * 2006-05-16 2007-11-22 Nokia Corporation Beacon broadcaster methods and systems for wireless networks
CN104010289A (en) * 2014-05-21 2014-08-27 广东工业大学 Communication method for mutual finding of neighbor nodes in wireless ad hoc network
US20150282063A1 (en) * 2014-03-31 2015-10-01 Qualcomm Incorporated Dedicated channel for fast initial link setup in a wireless network
US20200068486A1 (en) * 2018-08-24 2020-02-27 Qualcomm Incorporated Scanning enhancements for next generation wi-fi channels
CN113473427A (en) * 2021-06-11 2021-10-01 苏州集萃智造大数据科技有限公司 Bluetooth Mesh network flooding redundancy optimization method based on neighbor information

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070268856A1 (en) * 2006-05-16 2007-11-22 Nokia Corporation Beacon broadcaster methods and systems for wireless networks
US20150282063A1 (en) * 2014-03-31 2015-10-01 Qualcomm Incorporated Dedicated channel for fast initial link setup in a wireless network
CN104010289A (en) * 2014-05-21 2014-08-27 广东工业大学 Communication method for mutual finding of neighbor nodes in wireless ad hoc network
US20200068486A1 (en) * 2018-08-24 2020-02-27 Qualcomm Incorporated Scanning enhancements for next generation wi-fi channels
CN113473427A (en) * 2021-06-11 2021-10-01 苏州集萃智造大数据科技有限公司 Bluetooth Mesh network flooding redundancy optimization method based on neighbor information

Also Published As

Publication number Publication date
CN116132963A (en) 2023-05-16

Similar Documents

Publication Publication Date Title
CN110622123B (en) Display method and device
WO2018000134A1 (en) Bluetooth connection method and terminal
KR101871424B1 (en) Method and apparatus for bluetooth connection
JP5020322B2 (en) Synchronization between wireless devices while saving power
EP3624404B1 (en) Method and device for establishing wireless communication connection
WO2021190483A1 (en) Multicast and broadcast service transmission method, multicast and broadcast service transmission control method, and related device
JP7270753B2 (en) Measurement processing method, parameter setting method, terminal and network equipment
KR101883960B1 (en) Bluetooth connection method and apparatus
WO2017080378A1 (en) Method implementing licensed-assisted access, network equipment, and terminal equipment
WO2018103380A1 (en) Method for accessing wireless network, and mobile terminal
EP3476109B1 (en) Wireless audio source switching
WO2021218451A1 (en) Method and device for device connection on basis of neighborhood aware network
JP2021530914A (en) Paging instruction method, equipment and system
EP3451719B1 (en) Device discovery using neighbour awareness network (nan) functions
KR101869292B1 (en) Method for setting communication channel of device, method for setting communication channel between a plurality of devices, and device
EP4274293A1 (en) Wifi scan control method and related device
JP7377366B2 (en) Multicast service transmission method, transmission processing method, and related equipment
WO2019001188A1 (en) Data processing method, terminal and base station
WO2020063229A1 (en) Resource pool configuration method, resource pool use method, configuration device and terminal
WO2018027821A1 (en) Communication method, related device, and system
WO2023061127A1 (en) Communication method and apparatus, earphone set, and computer readable medium
KR20210008415A (en) Access control method, message broadcast method, and related devices
CN113225169A (en) BWP switching method, terminal and network side equipment
WO2024082906A1 (en) Information acquisition method and apparatus, bluetooth device, terminal device, and storage medium
JPWO2020140725A5 (en)

Legal Events

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

Ref document number: 22891763

Country of ref document: EP

Kind code of ref document: A1