Device discovery methods, apparatus, equipment and storage media

By sending detection signals of multiple wireless connection protocols through the first device, receiving and processing response information from other devices, and generating a list of connectable devices, the problem of low device discovery efficiency caused by a single protocol is solved, and efficient device discovery and connection establishment are achieved.

CN119562242BActive Publication Date: 2026-01-06GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311129552.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-01
Publication Date
2026-01-06
Estimated Expiration
2043-09-01

AI Technical Summary

Technical Problem

In existing technologies, device discovery based on a single wireless connectivity protocol results in a slow and inefficient device discovery process.

Method used

The device sends detection signals for at least two wireless connection protocols, receives response information from other devices, and generates a list of connectable devices based on attribute information, supporting device discovery for multiple protocols.

Benefits of technology

It improves the efficiency of device discovery and the success rate of connection establishment, thus enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119562242B_ABST
    Figure CN119562242B_ABST
Patent Text Reader

Abstract

A device discovery method, device, apparatus and storage medium belong to the technical field of communication. The method comprises: sending detection signals corresponding to at least two wireless connection protocols respectively; receiving response information sent by other devices in the current network environment, the response information being sent by other devices after receiving any detection signal corresponding to a wireless connection protocol, and the response information including attribute information of other devices; and generating a connectable device list in the current network environment according to the attribute information of other devices included in the received response information, the connectable device list including identification information of connectable devices discovered based on the at least two wireless connection protocols. By sending detection signals of at least two wireless connection protocols, the problem of low efficiency caused by device discovery based on a single wireless connection protocol is solved, and the efficiency of discovering other devices is improved since device discovery can be performed based on multiple protocols simultaneously.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a device discovery method, apparatus, device, and storage medium. Background Technology

[0002] With the booming development of the Industrial Internet and the Internet of Things, communication sharing among multiple devices has been widely applied in fields such as industrial automation, smart healthcare, and intelligent transportation. Device discovery is crucial for achieving communication sharing among multiple devices.

[0003] In researching device discovery methods, during the device retrieval phase, a detection signal for a specific wireless connectivity protocol is sent to detect whether other devices can reach that protocol. For example, a first device sends a Bluetooth (BT) protocol detection signal to determine if other devices' Bluetooth functionality is accessible. Other devices supporting the Bluetooth protocol, upon receiving this detection signal, will send a response message to the first device in response. The first device can be any device that supports the Bluetooth protocol.

[0004] The device discovery methods provided by the aforementioned technologies are based on only one wireless connection protocol, which will result in a slow and inefficient device discovery process. Summary of the Invention

[0005] This application provides a method, apparatus, device, and storage medium for device discovery. The technical solutions provided by this application are as follows:

[0006] According to one aspect of the embodiments of this application, a device discovery method is provided, the method being performed by a first device, the first device supporting at least two wireless connection protocols; the method includes:

[0007] Send detection signals corresponding to the at least two wireless connection protocols respectively;

[0008] Receive response information sent by other devices in the current network environment. The response information is sent by the other devices after receiving a detection signal corresponding to any of the wireless connection protocols. The response information includes the attribute information of the other devices.

[0009] Based on the attribute information of the other devices included in the received response information, a list of connectable devices in the current network environment is generated. The list of connectable devices includes identification information of connectable devices discovered based on the at least two wireless connection protocols.

[0010] According to one aspect of the embodiments of this application, a device discovery apparatus is provided, the apparatus being disposed in a first device, the first device supporting at least two wireless connection protocols; the apparatus includes:

[0011] The transmitting module is used to transmit detection signals corresponding to the at least two wireless connection protocols respectively;

[0012] The receiving module is used to receive response information sent by other devices in the current network environment. The response information is sent by the other devices after receiving a detection signal corresponding to any of the wireless connection protocols. The response information includes the attribute information of the other devices.

[0013] The generation module generates a list of connectable devices in the current network environment based on the attribute information of the other devices included in the received response information. The list of connectable devices includes identification information of connectable devices discovered based on the at least two wireless connection protocols.

[0014] According to one aspect of the embodiments of this application, an electronic device is provided, the electronic device including a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the above-described device discovery method.

[0015] According to one aspect of the embodiments of this application, a computer-readable storage medium is provided, wherein a computer program is stored in the storage medium, the computer program being loaded and executed by a processor to implement the above-described device discovery method.

[0016] According to one aspect of the embodiments of this application, a computer program product is provided, the computer program product including a computer program stored in a computer-readable storage medium, and a processor reading from the computer-readable storage medium and executing the computer program to implement the above-described device discovery method.

[0017] The technical solutions provided in this application have at least the following beneficial effects:

[0018] The first device sends detection signals corresponding to at least two wireless connection protocols. Other devices, upon receiving a detection signal for any of these protocols, can send a response message to the first device if they support that protocol. This solves the inefficiency problem caused by device discovery based on only a single wireless connection protocol. Because device discovery can be performed simultaneously based on multiple protocols, the efficiency of discovering other devices is improved. Furthermore, the list of connectable devices includes identification information for connectable devices discovered based on multiple protocols. Users can select any connectable device to establish a connection with the first device, improving the success rate and reliability of connection establishment. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a schematic diagram of the implementation environment of a solution provided in one embodiment of this application;

[0021] Figure 2 This is a flowchart of a device discovery method provided in one embodiment of this application;

[0022] Figure 3 This is a flowchart of transmitting a detection signal provided in one embodiment of this application;

[0023] Figure 4 This is a schematic diagram of a device discovery and connection module provided in one embodiment of this application;

[0024] Figure 5 This is a schematic diagram of the user interface for attribute parameters provided in one embodiment of this application;

[0025] Figure 6 This is a schematic diagram illustrating the angle calculation provided in one embodiment of this application;

[0026] Figure 7 This is a schematic diagram of the sensor orientation provided in one embodiment of this application;

[0027] Figure 8 This is a schematic diagram illustrating the calculation of connectivity scores according to an embodiment of this application;

[0028] Figure 9 This is a schematic diagram of an automatic connection module provided in one embodiment of this application;

[0029] Figure 10 This is a block diagram of a device discovery apparatus provided in one embodiment of this application;

[0030] Figure 11 This is a structural block diagram of an electronic device provided in one embodiment of this application. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0032] Please refer to Figure 1The diagram illustrates an implementation environment for a solution provided in one embodiment of this application. This implementation environment may include a first device 10 and at least one other device 20.

[0033] In this embodiment, the first device 10 can be any device used to discover other devices 20. During the device discovery process, the first device 10 sends a detection signal corresponding to the wireless connection protocol; after receiving the detection signal, the other device 20 sends a response message to the first device 10 that sent the detection signal.

[0034] In this embodiment, the first device 10 supports at least two wireless connection protocols. During device discovery, the first device 10 sends detection signals corresponding to each of the at least two wireless connection protocols to discover the device. Upon receiving a detection signal corresponding to any one of the wireless connection protocols sent by the first device 10, other devices 20 in the current network environment can send response information corresponding to that wireless connection protocol to the first device 10, indicating that the other device 20 can establish a connection with the first device 10 based on that wireless connection protocol. The aforementioned current network environment can be understood as the network environment in which the first device 10 is currently located.

[0035] The aforementioned first device 10 and other devices 20 may be electronic devices such as mobile phones, tablets, PCs (Personal Computers), in-vehicle terminals, smart home appliances, smart home devices, wearable devices, multimedia playback devices, etc.

[0036] In one possible application scenario, such as a smart home scenario, the first device 10 can be a mobile phone, and other devices 20 can include smart door locks, smart smoke detectors, smart curtains, smart lights, air conditioners, robot vacuum cleaners, smart TVs, etc.

[0037] In another possible application scenario, such as a smart campus scenario, the first device 10 can be the school's network center server, and other devices 20 can include students' mobile phones, tablets, e-textbooks, teachers' laptops, smart podiums, and smart air conditioners, security cameras, electronic access control, etc. connected to the campus network.

[0038] Please refer to Figure 2 The diagram illustrates a flowchart of a device discovery method provided in one embodiment of this application. The execution entity for each step of the method may be a first device 10. The method may include at least one of the following steps 210 to 230.

[0039] Step 210: Send detection signals corresponding to at least two wireless connection protocols respectively.

[0040] The first device supports at least two wireless connection protocols. A wireless connection protocol refers to a set of rules, standards, or procedures used for communication and connection between wireless devices. Exemplarily, wireless connection protocols include, but are not limited to, at least one of the following: BT, BLE (Bluetooth Low Energy), WLAN (Wireless Local Area Network) Direct, Wi-Fi (Wireless Fidelity), ZigBee, Z-Wave, NFC (Near Field Communication), Thread, DECT (Digitally Enhanced Cordless Telecommunications), NB-IoT (Narrow Band Internet of Things), etc. Optionally, the first device supports at least two or more wireless connection protocols; this application does not limit the types of wireless connection protocols supported by the first device. Exemplarily, the first device supports three wireless connection protocols: BT, BLE, and WLAN Direct.

[0041] For each wireless connectivity protocol, the corresponding detection signal is a specific signal constructed according to the protocol standard, used to detect the presence of devices supporting that protocol in the network environment. Different wireless connectivity protocols have different detection signals, differing in aspects such as signal format and the content contained in the signal.

[0042] In some embodiments, before sending a detection signal corresponding to a supported wireless connection protocol, the first device also needs to collect its own connection information related to that wireless connection protocol, which may include: address information, name information, operating parameters, etc. The address information may include a MAC (Media Access Control) address, an IP (Internet Protocol) address, etc., used to construct the detection signal; the name information may include the name of the first device, used by other devices to recognize the first device; the operating parameters may include the version, frequency band, channel, rate, security encryption, and other parameters supported by the wireless connection protocol, used to match version requirements, etc. This application does not limit the content of the connection information of the wireless connection protocol collected by the first device.

[0043] In some embodiments, before sending a detection signal, the first device sequentially detects the support status of various wireless connection protocols and sends the detection signal corresponding to the supported wireless connection protocol.

[0044] Before sending a detection signal, the first device first checks the availability of each of its supported wireless connectivity protocols, and then sends the detection signal corresponding to each supported wireless connectivity protocol. This sequential checking of the availability of multiple wireless connectivity protocols is to avoid channel interference that could occur if the first device supports multiple wireless connectivity protocols and sends detection signals for multiple protocols simultaneously. The transmitted detection signal may include the connectivity information collected above.

[0045] Please refer to Figure 3 This document illustrates a flowchart of a detection signal transmission process according to an embodiment of this application. Assuming the first device is evaluated for support of three wireless connection protocols—BT, BLE, and WLAN Direct—the process begins by determining whether it supports the WLAN Direct protocol. Regardless of support, the process proceeds to the BLE protocol evaluation stage. If WLAN Direct is supported, the device begins collecting its own WLAN Direct connection information. Once collected, it sends the corresponding WLAN Direct detection signal while waiting for responses from other devices. Next, the process checks whether it supports the BLE protocol. Again, regardless of support, the process proceeds to the BT evaluation stage. If BLE is supported, the device begins collecting its own BLE connection information. Once collected, it sends the corresponding BLE detection signal while waiting for responses from other devices. Finally, the process determines whether the first device supports the BT protocol. If not, the process ends; if it does, the device begins collecting its own BT connection information. Once collected, it sends the corresponding BT detection signal while waiting for responses from other devices.

[0046] By using the above method, the wireless connectivity capabilities of the first device are detected sequentially, and then the detection signals corresponding to the supported wireless connectivity protocols are sent. This method can avoid unnecessary channel interference, optimize the connection process, ensure high-quality and efficient establishment of wireless connections, and bring users a smoother experience.

[0047] Step 220: Receive response information sent by other devices in the current network environment. This response information is sent by other devices after receiving a detection signal corresponding to any wireless connection protocol. The response information includes the attribute information of other devices.

[0048] The current network environment refers to the network environment in which the first device is currently located. The response information is a segment of data actively transmitted back to the first device by other devices that have received the detection signal, used to respond to the first device's detection signal. The response information contains various attribute information of the device, such as device name, location, recent connection information, MAC address, etc., to inform this device. To obtain the attribute information contained in the response information, it is necessary to parse the response information. Specifically, by parsing the packet header and payload, attribute information such as device name, model, MAC address, device location, and recent connection time is extracted step by step according to the format specifications of the wireless connection protocol.

[0049] In some embodiments, the first device can also determine the specific wireless connection protocol type supported by other devices. Specifically, after the first device sends detection signals corresponding to different wireless connection protocols, other devices, if they support the corresponding wireless connection protocol, will respond to the detection signal using the format of the corresponding wireless connection protocol. Since the response information of different wireless connection protocols has different unique physical characteristics such as frequency and modulation method, the first device can identify which protocol the response information belongs to by detecting these physical characteristics. The first device can also analyze the data portion of the response information; the identifiers and message formats of different protocols are different, and this difference can be used to identify the specific wireless connection protocol type supported by other devices.

[0050] In one possible implementation, the attribute information included in the response information is customizable. The first device sends a detection signal corresponding to the wireless connection protocol. This detection signal may include a specific indication field to indicate which attribute information other devices need to transmit back. In other words, the detection signal indicates which attribute information needs to be acquired, and other devices then transmit the corresponding attribute information accordingly. This avoids transmitting useless additional information and improves detection efficiency. For example, the detection signal may indicate that only basic information such as device model and brand needs to be transmitted, or it may indicate that more attribute information, such as hardware version and software version, is needed. The detection signal may also request the transmission of all possible device attribute information; this application does not limit this.

[0051] Step 230: Based on the attribute information of other devices included in the received response information, generate a list of connectable devices in the current network environment. The list of connectable devices includes the identification information of connectable devices discovered based on at least two wireless connection protocols.

[0052] The identification information is used to indicate the display information of connectable devices in the connectable device list. Through the identification information, the first device can display the list of connectable devices in the current network environment in a reasonable form on the interface. Optionally, the identification information may include all or part of the attribute information received from the response information. For example, it may include the type of device, such as a smartphone or smart speaker, and may also include the wireless connection protocols supported by the device, such as WIFI or BT. This application does not limit the content and form of the identification information.

[0053] In some embodiments, connectable devices are displayed in a list by classifying and sorting the device attribute information. The connectable device list may include a primary list and a primary list sub-list. The primary list includes the wireless connection protocols supported by the connectable devices, and the primary list sub-list includes connectable devices that support the same wireless connection protocol.

[0054] In one possible implementation, a list of connectable devices is generated based on signal strength using device name information and supported protocol information. For example, the following devices are discovered via WLAN Direct and BT detection: Mobile Phone A (protocol: WLAN Direct / BT); Speaker B (protocol: WLAN Direct / BT); TV C (protocol: WLAN Direct); Headphones D (protocol: BT). Under the WLAN Direct protocol, the signal strength order is: Mobile Phone A > Speaker B > TV C; under the BT protocol, Mobile Phone A > Speaker B > Headphones D.

[0055] Based on the above information, the list of connectable devices can be displayed as follows: WLAN Direct Connect devices: Mobile phone A, Speaker B, TV C; BT devices: Mobile phone A, Speaker B, Headphones D.

[0056] In some embodiments, the list of connectable devices may also include a primary list and a primary list sublist, wherein the primary list includes different connectable devices and the primary list sublist includes all wireless connectivity protocols supported by the same type of connectable device.

[0057] In one possible implementation, a list of connectable devices is generated based on response time, using device name information and supported protocol information. For example, the following devices are discovered via WLAN Direct and BT detection: Mobile Phone A (protocol: WLAN Direct / BT); Speaker B (protocol: WLAN Direct / BT); TV C (protocol: WLAN Direct); Headphones D (protocol: BT). Wherein, Mobile Phone A's response time is: WLAN Direct protocol < BT protocol; Speaker B's response time is: WLAN Direct protocol < BT protocol; TV C uses WLAN Direct protocol; Headphones D uses BT protocol.

[0058] Based on the above information, the list of connectable devices can be displayed as follows: Mobile Phone A: WLAN Direct protocol, BT protocol; Speaker B: WLAN Direct protocol, BT protocol; TV C: WLAN Direct protocol; Headphones D: BT protocol. Users can trigger the connection command as needed. Since a device may support more than one wireless connection protocol, users can choose one to connect according to their actual needs. For example, with Mobile Phone A, users can choose to connect using either the WLAN Direct protocol or the BT protocol.

[0059] Please refer to Figure 4 The diagram illustrates a device discovery and connection module provided in one embodiment of this application. In some embodiments, the device can be divided into a device detection module, a response processing module, an interaction processing module, a display module, and a connection establishment module.

[0060] The main functions of the device detection module are as follows: if the current device is a detection signal transmitter (such as the first device), it is mainly responsible for sending the detection signal corresponding to the wireless connection protocol to other devices and receiving the response information corresponding to the detection signal sent by other devices; if the current device is a detection signal receiver (such as other devices), it is mainly responsible for collecting its own connection information and responding to the response information corresponding to the wireless connection protocol detection signal. Figure 4 The current device refers to the first device.

[0061] The response processing module generates a list of connectable devices based on the response information received by the first device and the generation method of the connectable device list set by the first device, and then sends the connectable device list to the display module. For example, after the device detection module of the first device receives response information from other devices, it passes the response information to the response processing module, which processes the response information. This processing can be the parsing process described above. The subsequent generation of the connectable device list is as described above, and finally, the connectable device list is sent to the display module.

[0062] The display module is used to receive the list of connectable devices sent by the response processing module and provides a display window for user interaction. The displayed content may include the received list of connectable devices and may respond to user-triggered connection commands.

[0063] The connection establishment module is used to send a connection request to the target device according to the user's connection command, establish a connection, and simultaneously synchronize the current device connection status to the display module in real time.

[0064] In summary, the technical solution provided in this application, by having a first device send detection signals corresponding to at least two wireless connection protocols, allows other devices, upon receiving the detection signal of any of these protocols, to send response information to the first device if they support that protocol. This solves the problem of low efficiency caused by device discovery based on only a single wireless connection protocol. Since device discovery can be performed simultaneously based on multiple protocols, the efficiency of discovering other devices is improved. Furthermore, the list of connectable devices includes identification information of connectable devices discovered based on multiple protocols, allowing the user to select any connectable device to establish a connection with the first device, thus improving the success rate and reliability of connection establishment.

[0065] To accelerate the detection of high-priority critical devices and optimize the speed of connecting to important devices, the support status of various wireless connection protocols can be detected sequentially according to their priority, from highest to lowest. Optionally, the priority can be set by the user, by the first device, or by a combination of both.

[0066] If it is configured by the user, the user can set the priority order of various wireless connection protocols in the settings menu of the first device. This allows the user to specify the priority of each wireless connection protocol, such as setting Wi-Fi as the highest priority, followed by BT, ZigBee, etc. The first device will then check the support of each wireless connection protocol in this priority order.

[0067] If the priority is set by the first device, it can be automatically calculated. For example, the first device can determine the user's usage habits based on historical connection records, automatically calculate the priority, and then determine the support status of each wireless connection protocol according to this priority order. For example, the first device can automatically set the priority based on the protocol's transmission speed, stability, security, and other attributes; this application does not limit this.

[0068] If the setup is done collaboratively by the user and the first device, the first device can pre-set the priority order for different demand modes. The user then selects the current demand mode, and the corresponding priority order is executed. For example, the first device can pre-set the priority order for different demand modes based on factors such as usage scenario requirements, usage frequency, and power consumption.

[0069] Optionally, according to the requirements of the usage scenario, the priority is set based on the importance of the wireless connection protocol in the application environment, and the protocol that is most critical to the current scenario is sent first. Suppose device discovery needs to be performed in an environment containing smart home devices, involving three common protocols: Wi-Fi, ZigBee, and BT. It can be considered that for smart homes, the ZigBee protocol is used to connect various sensor devices and is the basis of home automation, with the highest priority. Wi-Fi is mainly used for large data transmission such as video and music of terminal devices, with the second highest priority. BT is mainly used to connect some audio accessories, with the lowest priority. Therefore, in this usage scenario, the priority order of ZigBee > Wi-Fi > BT can be determined.

[0070] Optionally, according to the usage frequency, the higher the usage frequency of the wireless connection protocol, the higher its priority. Suppose the following three protocols are used simultaneously in an environment: Wi-Fi for employee office work and Internet access, BT for connecting audio devices such as headphones and speakers, and ZigBee for connecting health sensors such as fitness trackers and blood pressure monitors. According to statistics, the usage frequency ratio in the past week is as follows: Wi-Fi: 80% of the data traffic, BT: 15% of the data traffic, ZigBee: 5% of the data traffic. It can be clearly seen that the usage frequency of Wi-Fi is much higher than the other two protocols. Therefore, the set priority order is: Wi-Fi > BT > ZigBee.

[0071] Optionally, according to the power consumption, for battery-powered devices, to save power to the maximum extent, signals with low power consumption should be sent first. Suppose the following three protocols are used simultaneously in a wireless device: BT: connecting headphones and speakers, with a working current of 10 mA; Wi-Fi: providing network connection, with a working current of 100 mA; NB-IoT: low-power wide-area network, with a working current of 300 mA. According to the working currents of each protocol, the power consumption order can be estimated as: BT < Wi-Fi < NB-IoT. Therefore, the order of sending detection signals can be BT > Wi-Fi > NB-IoT. The priority setting method can also follow other methods, such as according to network conditions, compatibility, security, etc. This application does not limit this.

[0072] In summary, the technical solution provided by the embodiment of this application can detect and set the priority for the support situations corresponding to various wireless connection protocols, so as to discover the devices supported by the protocol with higher priority first, and achieve fast discovery and connection for the device types that users are more concerned about.

[0073] Currently, the list of connectable devices is mainly generated based on the signal strength of the wireless connection protocols supported by the devices. To improve the flexibility of the system, this application proposes a more multi-dimensional consideration standard based on the current single signal strength sorting, thereby obtaining multiple ways to present the list of connectable devices.

[0074] Specifically, based on the attribute information of other devices included in the received response information, at least two attribute parameters corresponding to each other device can be determined, and then a list of connectable devices can be generated based on the at least two attribute parameters.

[0075] Attribute information typically indicates the overall condition of a device, while attribute parameters are more specific and detailed.

[0076] In some embodiments, at least two attribute parameters include at least two of the following parameters: a distance parameter, an orientation parameter, a name parameter, and a preference parameter. The distance parameter indicates the distance between the other device and the first device; the orientation parameter indicates the angle between the other device and the first device; the name parameter indicates the name of the other device; and the preference parameter indicates whether the other device is selected as the connection device. (Please refer to...) Figure 5 This diagram illustrates a user interface for attribute parameters provided in one embodiment of this application. This application does not limit the design style of the user interface for attribute parameters.

[0077] In one possible implementation, distance parameters can be obtained from location information. Location information can be obtained from the device's GPS (Global Positioning System) or location services, providing latitude, longitude, and altitude. This information can then be converted into a spatial coordinate system, which can be a Cartesian coordinate system: consisting of three mutually perpendicular coordinate axes X, Y, and Z. The position of a point can be represented by an ordered array (X, Y, Z). For GPS-based conversion to a spatial coordinate system, one can use WGS84 (World Geodetic System 1984) to ENU (East-North-Up), WGS8 to ECEF (Earth-Centered Earth-Fixed), or other methods. For example, latitude and longitude data from WGS8 can be converted to the Cartesian coordinate system in ECEF. The ECEF coordinate system is characterized as follows: the origin is located at the Earth's center of mass, the Z-axis points to the Earth's poles, the X-axis points to the intersection of the Prime Meridian and the equatorial plane, and the Y-axis lies on the equatorial plane, forming a right-handed coordinate system with the X and Z axes. The following is the program implementation code:

[0078]

[0079] After obtaining the spatial coordinate system, the spatial distance is calculated using the distance coordinate formula based on the position coordinates in the spatial coordinate system. Assume the spatial coordinates of the first device are (x1, y1, z1), and the coordinates of the other devices are (x2, y2, z2), where d represents the distance between the two devices. The calculation formula is:

[0080]

[0081] In one possible implementation, the distance parameter can also be obtained using the signal propagation time method. When the first device sends a detection signal, it records the transmission time. Other devices respond immediately after receiving the signal, and the first device records the reception time upon receiving the response information. Since the propagation speed of electromagnetic waves is known (i.e., the speed of light), the signal travel time can be calculated from the time difference between the transmission and reception times. Multiplying this time by the electromagnetic wave speed gives the propagation distance. This application does not limit the method for obtaining the distance parameter.

[0082] Generally, if the first device is a handheld device, and the user wants to connect to other devices, they will tend to point the first device toward the other devices they want to connect to. Therefore, establishing the orientation parameter is essential.

[0083] In one possible implementation, position information can be obtained from the response information parsing, and then the included angle parameter can be calculated from the position information. For example, the spatial coordinates of the device can be obtained according to the above steps, without considering the device's spatial height, mapping the device coordinates from three-dimensional space to two-dimensional space. Please refer to... Figure 6 This diagram illustrates an embodiment of the angle calculation provided in this application. Specifically, the z-axis coordinates of the spatial coordinates of the first device and other devices are directly discarded. That is, the spatial coordinates of both the first device and other devices are projected onto the xoy plane. A new coordinate system is established with the center of the first device as the origin o, the top of the device as the y-axis, and the direction perpendicular to the y-axis as the x-axis. The establishment of this coordinate system depends on the calculation method for the orientation of the device sensors; please refer to [reference needed]. Figure 7 The diagram illustrates the sensor orientation provided in one embodiment of this application. Taking a mobile phone as an example, the angle is 0 degrees when the device is in its natural position; 90 degrees when the left side of the device is on top; 180 degrees when the device is upside down; and 270 degrees when the right side of the device is on top.

[0084] Next, calculate the included angle based on the relative positions of the first device and other devices. This included angle refers to the angle α between the point (x, y) of the other device and the positive y-axis of the first device. The calculation formula is as follows:

[0085]

[0086] The included angle α can be calculated using the inverse cosine function. For example, the spatial coordinates of the first device are (2, 3, 4), and the spatial coordinates of the other devices are (5, 6, 7). Following the steps above, we can obtain that the coordinates of the first device are the origin (0, 0), and the coordinates (x, y) of the other devices are (3, 3). According to the calculation formula, α is 45 degrees.

[0087] Since users are more familiar with device names, sorting by name may better suit their usage habits and cognitive patterns. In one possible implementation, users can sort by the first letter of the device name, or in other ways. This application does not limit this to any particular method.

[0088] In one possible implementation, the preference parameters can be obtained through recent connection information. Specifically, the preference parameters could be the time of the most recent connection to this device, the frequency of connections to this device over a past period, etc.

[0089] In some embodiments, a list of connectable devices in the current network environment is generated based on the connectivity scores of other devices. Please refer to [reference needed]. Figure 8 This illustration shows a schematic diagram of calculating a connectivity score according to an embodiment of this application. In one possible implementation, for each other device, the connectivity score of the other device is determined based on at least two attribute parameters corresponding to the other device. Specifically, based on the at least two attribute parameters corresponding to the other device, the individual scores corresponding to the at least two attribute parameters are determined respectively; based on the weights corresponding to the at least two attribute parameters respectively, the individual scores corresponding to the at least two attribute parameters are weighted and summed to obtain the connectivity score of the other device.

[0090] For setting the weight of each attribute parameter, one possible implementation involves obtaining user-defined preference settings information, which indicates the importance of each attribute parameter; and determining the weights corresponding to at least two attribute parameters based on the preference settings information. For example, the calculation method for the device connectivity score is described in detail below. The calculation formulas and specific values ​​used for each attribute parameter are for reference only and should be adjusted according to actual needs.

[0091] Weighting: Parameters selected by the user have a higher weight of 40%, while parameters not selected have a lower weight of 20%.

[0092] Calculation methods for each parameter: The formula for calculating the included angle parameter is:

[0093]

[0094] Where α is the included angle mentioned above, that is, if other devices are located in the same direction as the device, 100 points are awarded, and if other devices are located in the opposite direction, 0 points are awarded.

[0095] Distance parameter calculation method: Taking 20 meters as the limit, the calculation formula is as follows:

[0096]

[0097] Where dis represents the spatial distance calculated above, in meters. If the distance is less than or equal to 20 meters, the calculation is performed according to the above formula; if the distance exceeds 20 meters, all scores are 0.

[0098] Name parameter calculation method: Taking the letter A as the starting letter, the calculation formula is as follows:

[0099]

[0100] Where d is the distance from the first letter of the device name to the letter A, i.e., the distance to A is 0 and the distance to Z is 25. In addition, numbers, Chinese characters and other languages ​​are uniformly converted into English form for calculation.

[0101] Preference parameter calculation method: Taking 24 hours as the boundary, the calculation formula is as follows:

[0102]

[0103] Where h is the last connection time. If the last connection time is less than or equal to 24 hours, the above formula is used for calculation. If the last connection time exceeds 24 hours, 0 points are awarded.

[0104] Score Summary: The scores from the above items are then weighted to obtain the final device connection score, taking the following conditions as an example: orientation priority, 45-degree angle, 5-meter distance, name starting with the letter A, and last connection established 6 hours ago.

[0105] Connection score = 75 × 0.4 + 75 × 0.2 + 100 × 0.2 + 75 × 0.2 = 80

[0106] The same method can be used to calculate the connection score for each connectable device. After calculation, the devices are sorted from largest to smallest score and displayed in the list of connectable devices.

[0107] In some embodiments, see Figure 4 The response processing module generates a list of connectable devices based on the method set by the first device, and also generates a list based on the user's device list preferences; the interaction processing module also responds to user requests to set device list preferences; see Figure 5 The display module can also include device list preferences.

[0108] In some embodiments, in device connectivity scenarios, the commonly used method is still for users to manually select target devices to establish connections. To improve connection efficiency, a device discovery and automatic connection scheme is proposed here. Please refer to [reference needed]. Figure 9 The diagram shows an automatic connection module provided in one embodiment of this application. The automatic connection judgment module is used to determine whether the first device can automatically connect to other target devices.

[0109] Based on the connection score mentioned above, the automatic connection threshold can be set in advance by the user or by the first device; this application does not limit this. If there is another target device with a connection score greater than the threshold, a connection is automatically established with that other target device. If the set threshold is too high and there is currently no other target device that meets the conditions, a list of connectable devices is output, allowing the user to manually select another device to connect to.

[0110] In some embodiments, see Figure 9 The response processing module is also used to calculate the connection score of each connectable device; the interaction processing module is also used to respond to the user's request to set the automatic connection threshold and pass the threshold to the automatic connection judgment module.

[0111] In summary, the technical solutions provided in this application offer multiple preference settings for the presentation of the connectable device list, allowing users to choose according to their needs and better aligning with the usage preferences of different users. Finally, a device discovery and automatic connection scheme is also proposed, allowing users to set automatic connection thresholds. When the conditions are met, the connection is automatically completed without manual connection, making it more intelligent and convenient.

[0112] This solution comprehensively considers the performance, customizability, and intelligence of device discovery and connection. By sending detection signals corresponding to multiple wireless connection protocols, prioritizing control, presenting a customizable list of connectable devices, and automatically connecting, it can significantly optimize the user experience and provide a more personalized and intelligent device interconnection solution.

[0113] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.

[0114] Please refer to Figure 10 This diagram illustrates a block diagram of a device discovery apparatus according to an embodiment of this application. The apparatus has the function of implementing the aforementioned device discovery, which can be implemented in hardware or by hardware executing corresponding software. The apparatus is disposed in a first device that supports at least two wireless connection protocols. The apparatus 1000 may include: a transmitting module 1010, a receiving module 1020, and a generating module 1030.

[0115] The transmitting module 1010 is used to transmit detection signals corresponding to the at least two wireless connection protocols respectively.

[0116] The receiving module 1020 is used to receive response information sent by other devices in the current network environment. The response information is sent by the other devices after receiving a detection signal corresponding to any of the wireless connection protocols. The response information includes the attribute information of the other devices.

[0117] The generation module 1030 is used to generate a list of connectable devices in the current network environment based on the attribute information of the other devices included in the received response information. The list of connectable devices includes identification information of connectable devices discovered based on the at least two wireless connection protocols.

[0118] In some embodiments, the transmitting module 1010 includes: a detection unit and a transmitting unit ( Figure 10 (Not shown in the image).

[0119] The detection unit is used to sequentially detect the support status of various wireless connection protocols.

[0120] The transmitting unit is used to transmit detection signals corresponding to the supported wireless connection protocols.

[0121] In some embodiments, the detection unit is configured to detect the support status of each of the multiple wireless connection protocols in descending order of priority, according to the priority of the multiple wireless connection protocols.

[0122] In some embodiments, the generation module 1030 includes: a parameter determination unit, a score determination unit, and a generation unit. Figure 10 (Not shown in the image).

[0123] The parameter determination unit is used to determine at least two attribute parameters corresponding to each of the other devices based on the attribute information of the other devices included in the received response information.

[0124] The score determination unit is used to determine the connection score of each of the other devices based on at least two attribute parameters corresponding to the other device.

[0125] The generation unit is used to generate a list of connectable devices in the current network environment based on the connection scores of each of the other devices.

[0126] In some embodiments, the score determination unit is configured to:

[0127] Based on at least two attribute parameters corresponding to the other devices, determine the individual scores corresponding to each of the at least two attribute parameters;

[0128] Based on the weights corresponding to the at least two attribute parameters, the individual scores corresponding to the at least two attribute parameters are weighted and summed to obtain the connection scores of the other devices.

[0129] In some embodiments, the score determination unit is further configured to:

[0130] Obtain user-defined preference settings information, which is used to indicate the importance of each of the attribute parameters;

[0131] The weights corresponding to the at least two attribute parameters are determined based on the preference settings information.

[0132] In some embodiments, the at least two attribute parameters include at least two of the following parameters:

[0133] Orientation parameter, used to indicate the angle between the other device and the first device;

[0134] Distance parameter, used to indicate the distance between the other device and the first device;

[0135] The name parameter is used to indicate the name of the other device;

[0136] Preference parameters are used to indicate when the other devices are selected as connection devices.

[0137] In some embodiments, the device 1000 further includes a connection module ( Figure 10 (Not shown in the image), used to automatically establish a connection with other target devices if there is a target other device whose connection score is greater than the threshold.

[0138] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0139] Please refer to Figure 11 The diagram shows a structural block diagram of an electronic device 1100 provided in one embodiment of this application.

[0140] Typically, electronic device 1100 includes a processor 1101 and a memory 1102.

[0141] Processor 1101 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1101 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1101 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1101 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 1101 may also include an AI processor for handling computational operations related to machine learning.

[0142] The memory 1102 may include one or more computer-readable storage media, which may be non-transitory. The memory 1102 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1102 are used to store a computer program configured to be executed by one or more processors to implement the device discovery method described above.

[0143] Those skilled in the art will understand that Figure 11 The structure shown does not constitute a limitation on the electronic device 1100, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0144] In some embodiments, a computer-readable storage medium is also provided, wherein a computer program is stored therein, the computer program being loaded and executed by a processor to implement the device discovery method described above.

[0145] Optionally, the computer-readable storage medium may include: ROM (Read-Only Memory), RAM (Random-Access Memory), SSD (Solid State Drives), or optical disc, etc. The random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).

[0146] In some embodiments, a computer program product is also provided, the computer program product including a computer program stored in a computer-readable storage medium, wherein a processor reads from the computer-readable storage medium and executes the computer program to implement the device discovery method described above.

[0147] It should be understood that "multiple" as used herein refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. Furthermore, the step numbers described herein are merely illustrative of one possible execution order. In some other embodiments, the steps may not be executed in numerical order, such as two steps with different numbers being executed simultaneously, or two steps with different numbers being executed in the reverse order of the illustration. This application does not limit this.

[0148] The above description is merely an exemplary embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A device discovery method, characterized by, The method is performed by a first device supporting at least two wireless connection protocols; the method comprises: sending detection signals corresponding to the at least two wireless connection protocols respectively; receiving response information sent by other devices in a current network environment, the response information being sent by the other devices after receiving any detection signal corresponding to the wireless connection protocols, and the response information including attribute information of the other devices; determining at least two attribute parameters corresponding to each of the other devices according to the attribute information of the other devices included in the received response information; for each of the other devices, determining a connection score of the other device according to the at least two attribute parameters corresponding to the other device; generating a connectable device list in the current network environment according to the connection scores of the other devices, the connectable device list including identification information of connectable devices discovered based on the at least two wireless connection protocols.

2. The method of claim 1, wherein, The sending of the detection signals corresponding to the at least two wireless connection protocols comprises: sequentially detecting support situations corresponding to the wireless connection protocols respectively; sending detection signals corresponding to the supported wireless connection protocols.

3. The method of claim 2, wherein, The sequential detection of the support situations corresponding to the wireless connection protocols respectively comprises: sequentially detecting the support situations corresponding to the wireless connection protocols respectively according to priorities of the wireless connection protocols in descending order.

4. The method of claim 1, wherein, The determination of the connection score of the other device according to the at least two attribute parameters corresponding to the other device comprises: determining individual scores corresponding to the at least two attribute parameters according to the at least two attribute parameters; weighting and summing the individual scores corresponding to the at least two attribute parameters to obtain the connection score of the other device according to weights corresponding to the at least two attribute parameters.

5. The method of claim 4, wherein, The method further comprises: obtaining preference setting information set by a user, the preference setting information being used to indicate importance of each of the attribute parameters; determining the weights corresponding to the at least two attribute parameters according to the preference setting information.

6. The method of claim 1, wherein, The at least two attribute parameters comprise at least two of the following parameters: an orientation parameter used to indicate an included angle between the other device and the first device; a distance parameter used to indicate a distance between the other device and the first device; a name parameter used to indicate a name of the other device; a preference parameter used to indicate a case where the other device is selected as a connection device.

7. The method of claim 1, wherein, The method further comprises: if there is a target other device with a connection score greater than a threshold value, automatically establishing a connection with the target other device.

8. An apparatus discovery device, comprising: The apparatus is arranged in a first device supporting at least two wireless connection protocols; the apparatus comprises: a sending module configured to send detection signals corresponding to the at least two wireless connection protocols respectively; The receiving module is configured to receive response information sent by other devices in a current network environment, the response information being sent by the other devices after receiving a detection signal corresponding to any one of the wireless connection protocols, and the response information including attribute information of the other devices; The generating module is configured to determine at least two attribute parameters corresponding to each of the other devices according to the attribute information of the other devices included in the received response information, determine a connection score of each of the other devices according to the at least two attribute parameters corresponding to the other device, and generate a connectable device list in the current network environment according to the connection scores of the other devices, the connectable device list including identification information of connectable devices discovered based on the at least two wireless connection protocols.

9. An electronic device, comprising: The electronic device includes a processor and a memory, the memory storing a computer program, and the computer program being loaded and executed by the processor to implement the method of any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is loaded and executed by the processor to implement the method of any one of claims 1 to 7.

11. A computer program product, characterised in that, The computer program product includes a computer program stored in a computer readable storage medium, and the processor reads and executes the computer program from the computer readable storage medium to implement the method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method for discovering and connecting electronic equipment and electronic equipment

    CN115150789A