Bluetooth list display method and device, storage medium, and electronic device

By calculating the frequency information of the Bluetooth device broadcasting discovery signal, and displaying the Bluetooth device according to the frequency sorting, the problem of the Bluetooth device discovering new devices is solved, and the connection efficiency and human-computer interaction efficiency are improved.

CN115484581BActive Publication Date: 2025-09-05SHENZHEN COOCAA NETWORK TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211041196.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-29
Publication Date
2025-09-05
Estimated Expiration
2042-08-29

AI Technical Summary

Technical Problem

In the prior art, Bluetooth devices have lag when discovering new devices, which cannot be identified and sorted in time, resulting in insufficiency of connection.

Method used

By calculating the frequency information of the Bluetooth device broadcast discovery signal, displaying the Bluetooth device in the Bluetooth interface to be connected to the scanning device according to the descending order of the frequency information, the activity of the device is characterized by using the frequency information, and then sorting and prompting the user in the interface.

Benefits of technology

It enables timely discovery of new devices with high activity, simplifies the process of connecting new Bluetooth devices, improves the efficiency of human-computer interaction, and avoids the lag in identifying new devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115484581B_ABST
    Figure CN115484581B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for displaying a Bluetooth list, a storage medium, and an electronic device. The method comprises: receiving discovery signals broadcast by multiple Bluetooth devices; calculating the frequency information of each Bluetooth device broadcasting the discovery signal, wherein the frequency information is used to represent the activity of the corresponding Bluetooth device; and displaying the multiple Bluetooth devices in a pending Bluetooth interface of a scanning device in descending order of the frequency information. The present invention solves the technical problem of delays in discovering new Bluetooth devices in related technologies, avoids the delay in identifying new devices, and improves the efficiency of human-computer interaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and in particular to a method and device for displaying a Bluetooth list, a storage medium, and an electronic device. Background Art

[0002] In related technologies, as the Bluetooth function of electronic terminals, especially televisions, computers and mobile phones, becomes more and more popular and the technology becomes more and more mature, Bluetooth-related functions are becoming more and more abundant.

[0003] In related technologies, a Bluetooth device can use device queries to discover other Bluetooth devices within its communication range. One method for sorting the list of discovered devices is to maintain a cache list, placing previously connected devices first to facilitate subsequent connections. However, sorting based on the user's connection history is time-consuming and requires a single connection to take effect, making it difficult to identify new devices.

[0004] Currently, no effective solution has been found for the above-mentioned problems existing in the related technologies. Summary of the Invention

[0005] Embodiments of the present invention provide a method and device for displaying a Bluetooth list, a storage medium, and an electronic device.

[0006] According to one aspect of an embodiment of the present invention, a method for displaying a Bluetooth list is provided, comprising: receiving discovery signals broadcast by a number of Bluetooth devices; calculating frequency information of each Bluetooth device broadcasting the discovery signal, wherein the frequency information is used to characterize the activity of the corresponding Bluetooth device; and displaying the several Bluetooth devices in a to-be-connected Bluetooth interface of a scanning device in descending order of the frequency information.

[0007] Optionally, calculating the frequency information of each Bluetooth device broadcasting a discovery signal includes: reading a cache list in the memory of the scanning device, wherein the cache list is used to record the broadcast time and broadcast number of the discovery signals broadcast by the several Bluetooth devices; for each Bluetooth device, using the corresponding broadcast time and broadcast number to calculate the frequency information of the broadcast discovery signal.

[0008] Optionally, the frequency information of broadcasting discovery signals is calculated using the corresponding broadcast time and broadcast number, including: obtaining the first broadcast time and the last broadcast time of the target Bluetooth device broadcasting the discovery signal within the scanning period from the cache list, and obtaining the number of broadcasts of the target Bluetooth device broadcasting the discovery signal within the scanning period from the cache list; calculating the broadcast duration based on the time difference between the last broadcast time and the first broadcast time; and dividing the broadcast duration by the broadcast number to obtain the frequency information of the target Bluetooth device broadcasting the discovery signal within the scanning period.

[0009] Optionally, before calculating the frequency information of each Bluetooth device broadcasting the discovery signal, the method also includes: after receiving the first discovery signal, parsing the first device identifier carried by the discovery signal from the discovery signal, and recording the reception time, wherein the first device identifier is used to identify the first Bluetooth device; determining whether the first device identifier exists in the cache table of the current scanning cycle; if the first device identifier exists in the cache table of the current scanning cycle, using the reception time to update the last broadcast time of the first Bluetooth device, and the number of broadcasts is accumulated once; if the first device identifier does not exist in the cache table of the current scanning cycle, inserting the first device identifier in the cache table, and recording the reception time as the first broadcast time of the first Bluetooth device in the current scanning cycle, and the number of broadcasts is accumulated once.

[0010] Optionally, displaying the several Bluetooth devices in the Bluetooth interface to be connected of the scanning device in descending order of the frequency information includes: sorting the device identifiers of the several Bluetooth devices in descending order according to the frequency information to obtain a device sequence; and displaying the device sequence in the Bluetooth interface to be connected of the scanning device.

[0011] Optionally, after displaying the several Bluetooth devices in the Bluetooth interface to be connected of the scanning device in descending order of the frequency information, the method further includes: detecting whether there are historical connection records for the several Bluetooth devices; if there are historical connection records for the second Bluetooth device; adding a record identifier to the associated position of the second Bluetooth device in the Bluetooth interface to be connected, wherein the record identifier is used to indicate that the second Bluetooth device has been connected to the scanning device before.

[0012] Optionally, after displaying the several Bluetooth devices in the Bluetooth interface to be connected of the scanning device in descending order of the frequency information, the method further includes: parsing the capability information and / or custom data of the several Bluetooth devices from the discovery signal respectively; and adding the capability information and / or the custom data to the corresponding associated position of each Bluetooth device in the Bluetooth interface to be connected.

[0013] According to another aspect of an embodiment of the present invention, a device for displaying a Bluetooth list is provided, comprising: a receiving module for receiving discovery signals broadcast by a number of Bluetooth devices; a calculating module for calculating frequency information of each Bluetooth device broadcasting the discovery signal, wherein the frequency information is used to characterize the activity of the corresponding Bluetooth device; and a display module for displaying the several Bluetooth devices in a to-be-connected Bluetooth interface of a scanning device in descending order of the frequency information.

[0014] Optionally, the calculation module includes: a reading unit, used to read a cache list in the memory of the scanning device, wherein the cache list is used to record the broadcast time and broadcast number of the discovery signals broadcast by the several Bluetooth devices; a calculation unit, used to calculate the frequency information of the broadcast discovery signal for each Bluetooth device using the corresponding broadcast time and broadcast number.

[0015] Optionally, the calculation unit includes: an acquisition subunit, used to obtain the first broadcast time and the last broadcast time of the target Bluetooth device broadcasting the discovery signal within the scanning period from the cache list, and obtain the number of broadcasts of the discovery signal by the target Bluetooth device within the scanning period from the cache list; a first calculation subunit, used to calculate the broadcast duration based on the time difference between the last broadcast time and the first broadcast time; and a second calculation subunit, used to divide the broadcast duration by the number of broadcasts to obtain the frequency information of the target Bluetooth device broadcasting the discovery signal within the scanning period.

[0016] Optionally, the device also includes: a first parsing module, used to parse the first device identifier carried by the discovery signal from the discovery signal and record the reception time after receiving the first discovery signal before the calculation module calculates the frequency information of the discovery signal broadcast by each Bluetooth device, wherein the first device identifier is used to identify the first Bluetooth device; a judgment module, used to judge whether the first device identifier exists in the cache table of the current scanning cycle; a processing module, used to update the last broadcast time of the first Bluetooth device using the reception time if the first device identifier exists in the cache table of the current scanning cycle, and the number of broadcasts is accumulated once; if the first device identifier does not exist in the cache table of the current scanning cycle, insert the first device identifier in the cache table, and record the reception time as the first broadcast time of the first Bluetooth device in the current scanning cycle, and the number of broadcasts is accumulated once.

[0017] Optionally, the display module includes: a sorting unit, used to sort the device identifiers of the multiple Bluetooth devices in descending order according to the frequency information to obtain a device sequence; and a display unit, used to display the device sequence in the Bluetooth interface to be connected of the scanning device.

[0018] Optionally, the device also includes: a detection module, used to detect whether there are historical connection records for the several Bluetooth devices after the display module displays the several Bluetooth devices in the Bluetooth interface to be connected of the scanning device in descending order of the frequency information; a first adding module, used to add a record identifier to the associated position of the second Bluetooth device in the Bluetooth interface to be connected if there is a historical connection record for the second Bluetooth device, wherein the record identifier is used to indicate that the second Bluetooth device has been connected to the scanning device before.

[0019] Optionally, the device also includes: a second parsing module, used to parse the capability information and / or custom data of the several Bluetooth devices from the discovery signal after the display module displays the several Bluetooth devices in the Bluetooth interface to be connected of the scanning device in descending order of the frequency information; a second adding module, used to add the capability information and / or the custom data to the corresponding associated position of each Bluetooth device in the Bluetooth interface to be connected.

[0020] According to another aspect of an embodiment of the present invention, a storage medium is further provided. The storage medium includes a stored program, and the above steps are executed when the program is run.

[0021] According to another aspect of an embodiment of the present invention, an electronic device is also provided, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; wherein: the memory is used to store computer programs; and the processor is used to execute the steps in the above method by running the program stored in the memory.

[0022] An embodiment of the present invention further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the steps in the above method.

[0023] Through the present invention, discovery signals broadcast by several Bluetooth devices are received; the frequency information of the discovery signal broadcast by each Bluetooth device is calculated, wherein the frequency information is used to characterize the activity of the corresponding Bluetooth device, and several Bluetooth devices are displayed in the Bluetooth interface to be connected of the scanning device in descending order of the frequency information. By calculating the frequency information of the received discovery signal, the activity of each Bluetooth device to be connected can be determined, and then the user can be displayed and prompted on the Bluetooth interface to be connected of the scanning device. New devices with high activity can be discovered in time, which simplifies the process of connecting new Bluetooth devices, solves the technical problem of the related technology of lagging in discovering new Bluetooth devices, avoids the lag in identifying new devices, and improves the efficiency of human-computer interaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0025] Figure 1 This is a hardware structure block diagram of a television set according to an embodiment of the present invention;

[0026] Figure 2 is a flowchart of a method for displaying a Bluetooth list according to an embodiment of the present invention;

[0027] Figure 3 is a logical structure diagram of a scanning device according to an embodiment of the present invention;

[0028] Figure 4 This is a workflow diagram of a scanning device according to an embodiment of the present invention;

[0029] Figure 5 is a structural block diagram of a device for displaying a Bluetooth list according to an embodiment of the present invention;

[0030] Figure 6 It is a structural block diagram of an electronic device implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0031] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present invention. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other in the absence of conflict.

[0032] It should be noted that the terms "first," "second," and the like in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the numbers used in this manner are interchangeable where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or apparatus.

[0033] Example 1

[0034] The method embodiment provided in the first embodiment of the present invention can be executed in a television, a mobile phone, a computer or a similar computing device. Taking running on a television as an example, Figure 1 FIG. 1 is a hardware structure diagram of a television set according to an embodiment of the present invention. Figure 1 As shown, the television may include one or more ( Figure 1Only one is shown) a processor 61 (the processor 61 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 63 for storing data. Optionally, the television set may further include a transmission device 116 for communication functions and an input / output device 108. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned television. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0035] The memory 63 can be used to store television programs, for example, software programs and modules of application software, such as a television program corresponding to a method for displaying a Bluetooth list in an embodiment of the present invention. The processor 61 executes various functional applications and data processing by running the television program stored in the memory 63, thereby realizing the above-mentioned method. The memory 63 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 63 may further include a memory remotely arranged relative to the processor 61, and these remote memories can be connected to the television via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.

[0036] Transmission device 116 is used to receive or transmit data via a network. A specific example of such a network may include a wireless network provided by the television's telecommunications provider. In one embodiment, transmission device 116 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, transmission device 116 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0037] In this embodiment, a method for displaying a Bluetooth list is provided. Figure 2 is a flow chart of a method for displaying a Bluetooth list according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0038] Step S202: receiving discovery signals broadcast by several Bluetooth devices;

[0039] The solution of this embodiment can be applied to network terminals such as televisions, mobile phones, and computers. A television is used as an example for illustration. After a scanning device receives a discovery signal broadcast by any Bluetooth device, it can detect and confirm the existence of the Bluetooth device and can continue to initiate a Bluetooth communication connection with the Bluetooth device.

[0040] Step S204: Calculate the frequency information of each Bluetooth device broadcasting a discovery signal, wherein the frequency information is used to represent the activity of the corresponding Bluetooth device;

[0041] When a Bluetooth device is broadcasting a discovery signal, the more times a scanning device receives the discovery signal within a fixed time, the more active the Bluetooth device is. This is because the farther the Bluetooth device is from the scanning device, or the more unstable the Bluetooth device is (device location, communication quality, etc.), the scanning device will fail to receive the discovery signal, which will lead to a decrease in the number of discovery signals received within a fixed time and a lower frequency.

[0042] Step S206: Displaying a plurality of Bluetooth devices in the Bluetooth interface of the scanning device in descending order of frequency information;

[0043] In the Bluetooth interface to be connected in this embodiment, multiple unconnected Bluetooth devices can be displayed, and the frequency information is used to sort and display them. The user can find the most active Bluetooth device in time and trigger the connection.

[0044] Through the above steps, the discovery signals broadcast by several Bluetooth devices are received; the frequency information of the discovery signals broadcast by each Bluetooth device is calculated, wherein the frequency information is used to characterize the activity of the corresponding Bluetooth device, and several Bluetooth devices are displayed in the Bluetooth interface to be connected of the scanning device in descending order of the frequency information. By calculating the frequency information of the received discovery signals, the activity of each Bluetooth device to be connected can be determined, and then the user can be displayed and prompted in the Bluetooth interface to be connected of the scanning device. New devices with high activity can be discovered in time, which simplifies the process of connecting new Bluetooth devices, solves the technical problem of the related technology of lagging in discovering new Bluetooth devices, avoids the lag in identifying new devices, and improves the efficiency of human-computer interaction.

[0045] In one implementation of this embodiment, calculating the frequency information of each Bluetooth device broadcasting a discovery signal includes:

[0046] S11, reading a cache list in the memory of the scanning device, wherein the cache list is used to record the broadcast time and broadcast frequency of discovery signals broadcast by several Bluetooth devices;

[0047] Optionally, the broadcast time of this embodiment includes two situations. One is that the broadcast time includes: the first broadcast time and the last broadcast time; the other is that the broadcast time includes the time each time a Bluetooth device broadcasts a discovery signal, and the number of broadcasts is the same as the number of times the scanning device receives the discovery signal.

[0048] S12: For each Bluetooth device, calculate the frequency information of the broadcast discovery signal using the corresponding broadcast time and broadcast times.

[0049] In some examples, the target Bluetooth device is any Bluetooth device among several Bluetooth devices, and the frequency information of broadcasting discovery signals is calculated using the corresponding broadcast time and broadcast number, including: obtaining the first broadcast time and the last broadcast time of the target Bluetooth device broadcasting the discovery signal within the scanning period from the cache list, and obtaining the number of broadcasts of the target Bluetooth device broadcasting the discovery signal within the scanning period from the cache list; calculating the broadcast duration based on the time difference between the last broadcast time and the first broadcast time; dividing the broadcast duration by the broadcast number to obtain the frequency information of the target Bluetooth device broadcasting the discovery signal within the scanning period.

[0050] For example, the cache list includes multiple columns, each column corresponds to a Bluetooth device, and is identified by the name of the Bluetooth device. Each column includes three data items: first broadcast time, last broadcast time, and number of broadcasts. The last broadcast time and number of broadcasts are dynamically updated and updated once each time a discovery signal is received during a scanning cycle. If only one discovery signal is received during a scanning cycle, the end time of the scanning cycle is configured as the last broadcast time.

[0051] In another example, the frequency information of broadcast discovery signals is calculated using the corresponding broadcast time and broadcast number, including: obtaining the time series of the target Bluetooth device broadcasting the discovery signal during the scanning period from the cache list, and determining the number of elements of the time series as the broadcast number; reading the last broadcast time and the first broadcast time from the time series, and calculating the broadcast duration based on the time difference between the last broadcast time and the first broadcast time; dividing the broadcast duration by the broadcast number to obtain the frequency information of the target Bluetooth device broadcasting the discovery signal during the scanning period.

[0052] The time sequence of this embodiment is used to store the timestamp of each time the target Bluetooth device broadcasts a discovery signal, and can be arranged in a chronological order, such as [time 1, time 2, time 3]. The time sequence includes 3 elements, so the number of broadcasts is 3, and the last broadcast time and the first broadcast time are time 3 and time 1 respectively.

[0053] By performing the same process as above on each Bluetooth device, the frequency information of each Bluetooth device can be calculated.

[0054] In one implementation of this embodiment, before calculating the frequency information of each Bluetooth device broadcasting the discovery signal, it also includes: after receiving the first discovery signal, parsing the first device identifier carried by it from the discovery signal, and recording the reception time, wherein the first device identifier is used to identify the first Bluetooth device; judging whether the first device identifier exists in the cache table of the current scanning cycle; if the first device identifier exists in the cache table of the current scanning cycle, using the reception time to update the last broadcast time of the first Bluetooth device, and the number of broadcasts is accumulated once; if the first device identifier does not exist in the cache table of the current scanning cycle, inserting the first device identifier in the cache table, and recording the reception time as the first broadcast time of the first Bluetooth device in the current scanning cycle, and the number of broadcasts is accumulated once.

[0055] In another implementation of this embodiment, the cache list is recorded through multiple time series, each time series corresponds to a Bluetooth device, and can be named using the device identifier of the Bluetooth device. Before calculating the frequency information of each Bluetooth device broadcasting the discovery signal, it also includes: after receiving the first discovery signal, parsing the first device identifier carried by it from the discovery signal, and recording the reception time, wherein the first device identifier is used to identify the first Bluetooth device; using the first device identifier to search for a matching first time series, and inserting the reception time at an adjacent position of the last element of the first time series to update the first time series.

[0056] For example, before receiving, the first time sequence is [time 1, time 2]. The first discovery signal is received at time 3. By parsing the device identifier "device 1", the first time sequence is matched, and time 3 is inserted after time 2 to update [time 1, time 2, time 3].

[0057] In one implementation of this embodiment, displaying several Bluetooth devices in the Bluetooth interface to be connected of the scanning device in descending order of frequency information includes: sorting the device identifiers of the several Bluetooth devices in descending order according to the frequency information to obtain a device sequence; and displaying the device sequence in the Bluetooth interface to be connected of the scanning device.

[0058] In an example, the current environment includes three Bluetooth devices, namely device 1, device 2, and device 3. The corresponding frequency information is 3 times / 10 seconds, 7 times / 10 seconds, and 12 times / 10 seconds, respectively. After sorting in descending order, the device sequence is [device 3, device 2, device 1]. The display order in the Bluetooth connection interface of the scanning device is device 3, device 2, and device 1. The user can select the most active device 3, followed by device 2 and device 1.

[0059] In some examples, after displaying several Bluetooth devices in the Bluetooth interface to be connected of the scanning device in descending order of frequency information, it also includes: detecting whether there are historical connection records for the several Bluetooth devices; if there are historical connection records for the second Bluetooth device; adding a record identifier to the associated position of the second Bluetooth device in the Bluetooth interface to be connected, wherein the record identifier is used to indicate that the second Bluetooth device has been connected to the scanning device before.

[0060] Optionally, the record identifier can be "historically connected device" or "familiar device". In addition, if there is no historical connection record for the third Bluetooth device, a reminder identifier is added to the associated position of the third Bluetooth device in the Bluetooth interface to be connected. The reminder identifier can be "unfamiliar device" or "new device", etc., to prompt the user to select the most appropriate and correct Bluetooth device from multiple Bluetooth devices to be connected.

[0061] In some examples, after displaying several Bluetooth devices in the Bluetooth interface to be connected of the scanning device in descending order of frequency information, it also includes: parsing the capability information and / or custom data of several Bluetooth devices from the discovery signal respectively; and adding the capability information and / or custom data to the associated position of each Bluetooth device in the Bluetooth interface to be connected.

[0062] Optionally, a device can be discovered by others. A device that doesn't broadcast its presence is invisible to surrounding devices. Therefore, to be discoverable, it must broadcast. This broadcast can include rich data, such as device capabilities, device name, and other custom data. This creates a second possibility. Broadcasting data to applications that don't require a connection. For example, a BLE thermometer can broadcast its temperature without accepting any connections. A detector can simply listen for the broadcast to obtain the current temperature.

[0063] The capability information of this embodiment can be used to characterize the network capability of the Bluetooth device (broadcasting the discovery signal), such as transmission distance, storage capacity, network quality (signal-to-noise ratio, bit error rate, etc.), motion status (moving, fixed, etc.), etc. The custom data is user-defined information of the Bluetooth device, such as "I am Zhang San", which can simultaneously identify the Bluetooth device with the device identifier, or it can be the battery level, device type (such as headphones, mobile phones, TVs). By adopting the method of this embodiment, while displaying the Bluetooth device, the recognition rate of the Bluetooth device is improved to prompt the user to select the most appropriate and correct Bluetooth device among multiple Bluetooth devices to be connected.

[0064] Figure 3 is a logical structure diagram of a scanning device according to an embodiment of the present invention. Figure 41 is a flowchart of a scanning device according to an embodiment of the present invention. The scanning device in this embodiment is a Bluetooth device 100, and the Bluetooth devices to be connected include other Bluetooth devices 104 to 106. The workflow includes:

[0065] S31, Bluetooth device A (Bluetooth device 100) turns on the device search function;

[0066] S32, continuously receiving broadcast information from other Bluetooth devices;

[0067] S33, Bluetooth device A maintains a cache list in memory, inserts or updates other Bluetooth devices found into the cache list, and records the insertion time, update time, and update count;

[0068] S34, subtract the insertion time from the update time, and divide the result by the number of updates to obtain the number of Bluetooth broadcasts received per unit time;

[0069] S35, sorting the cache list according to the number of Bluetooth broadcasts received per unit time;

[0070] S36, displaying the sorted column list through the display module;

[0071] The solution of this embodiment is adopted, and the devices are sorted according to the number of Bluetooth broadcasts received per unit time. The more broadcasts received, the more active the device is. No manual intervention is required, and there is no lag. The most active Bluetooth device can be displayed at the front every time.

[0072] Through the description of the above embodiments, those skilled in the art will clearly understand that the methods according to the above embodiments can be implemented using software plus the necessary general-purpose hardware platform. Of course, hardware can also be used, but in many cases the former is a more preferred embodiment. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, or optical disk) and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present invention.

[0073] Example 2

[0074] In this embodiment, a device for displaying a Bluetooth list is also provided to implement the above-mentioned embodiments and preferred embodiments, which have been described and will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.

[0075] Figure 5 is a structural block diagram of a device for displaying a Bluetooth list according to an embodiment of the present invention. Figure 5 As shown, the device includes: a receiving module 50, a calculating module 52, and a display module 54, wherein:

[0076] A receiving module 50 is configured to receive discovery signals broadcast by a plurality of Bluetooth devices;

[0077] a calculation module 52, configured to calculate frequency information of each Bluetooth device broadcasting a discovery signal, wherein the frequency information is used to represent the activity of the corresponding Bluetooth device;

[0078] The display module 54 is configured to display the plurality of Bluetooth devices in the Bluetooth interface to be connected of the scanning device in descending order of the frequency information.

[0079] Optionally, the calculation module includes: a reading unit, used to read a cache list in the memory of the scanning device, wherein the cache list is used to record the broadcast time and broadcast number of the discovery signals broadcast by the several Bluetooth devices; a calculation unit, used to calculate the frequency information of the broadcast discovery signal for each Bluetooth device using the corresponding broadcast time and broadcast number.

[0080] Optionally, the calculation unit includes: an acquisition subunit, used to obtain the first broadcast time and the last broadcast time of the target Bluetooth device broadcasting the discovery signal within the scanning period from the cache list, and obtain the number of broadcasts of the discovery signal by the target Bluetooth device within the scanning period from the cache list; a first calculation subunit, used to calculate the broadcast duration based on the time difference between the last broadcast time and the first broadcast time; and a second calculation subunit, used to divide the broadcast duration by the number of broadcasts to obtain the frequency information of the target Bluetooth device broadcasting the discovery signal within the scanning period.

[0081] Optionally, the device also includes: a first parsing module, used to parse the first device identifier carried by the discovery signal from the discovery signal and record the reception time after receiving the first discovery signal before the calculation module calculates the frequency information of the discovery signal broadcast by each Bluetooth device, wherein the first device identifier is used to identify the first Bluetooth device; a judgment module, used to judge whether the first device identifier exists in the cache table of the current scanning cycle; a processing module, used to update the last broadcast time of the first Bluetooth device using the reception time if the first device identifier exists in the cache table of the current scanning cycle, and the number of broadcasts is accumulated once; if the first device identifier does not exist in the cache table of the current scanning cycle, insert the first device identifier in the cache table, and record the reception time as the first broadcast time of the first Bluetooth device in the current scanning cycle, and the number of broadcasts is accumulated once.

[0082] Optionally, the display module includes: a sorting unit, used to sort the device identifiers of the multiple Bluetooth devices in descending order according to the frequency information to obtain a device sequence; and a display unit, used to display the device sequence in the Bluetooth interface to be connected of the scanning device.

[0083] Optionally, the device also includes: a detection module, used to detect whether there are historical connection records for the several Bluetooth devices after the display module displays the several Bluetooth devices in the Bluetooth interface to be connected of the scanning device in descending order of the frequency information; a first adding module, used to add a record identifier to the associated position of the second Bluetooth device in the Bluetooth interface to be connected if there is a historical connection record for the second Bluetooth device, wherein the record identifier is used to indicate that the second Bluetooth device has been connected to the scanning device before.

[0084] Optionally, the device also includes: a second parsing module, used to parse the capability information and / or custom data of the several Bluetooth devices from the discovery signal after the display module displays the several Bluetooth devices in the Bluetooth interface to be connected of the scanning device in descending order of the frequency information; a second adding module, used to add the capability information and / or the custom data to the corresponding associated position of each Bluetooth device in the Bluetooth interface to be connected.

[0085] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0086] Example 3

[0087] The embodiment of the present application also provides an electronic device, Figure 6is a structural diagram of an electronic device according to an embodiment of the present invention, such as Figure 6 As shown, it includes a processor 61, a communication interface 62, a memory 63 and a communication bus 64, wherein the processor 61, the communication interface 62 and the memory 63 communicate with each other through the communication bus 64, and the memory 63 is used to store computer programs; the processor 61 is used to implement the following steps when executing the program stored in the memory 63: receiving discovery signals broadcast by several Bluetooth devices; calculating the frequency information of each Bluetooth device broadcasting the discovery signal, wherein the frequency information is used to characterize the activity of the corresponding Bluetooth device; and displaying the several Bluetooth devices in the Bluetooth interface to be connected of the scanning device in descending order of the frequency information.

[0088] The communication bus mentioned in the terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.

[0089] The communication interface is used for communication between the above terminal and other devices.

[0090] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.

[0091] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0092] In another embodiment provided in the present application, a computer-readable storage medium is further provided, in which instructions are stored. When the computer-readable storage medium is executed on a computer, the computer executes the method for displaying a Bluetooth list described in any of the above embodiments.

[0093] In another embodiment provided by the present application, a computer program product including instructions is further provided, which, when executed on a computer, enables the computer to execute the method for displaying a Bluetooth list described in any one of the above embodiments.

[0094] In the above embodiments, all or part of the embodiments can be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, hard disk, tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0095] The above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the scope of protection of the present application.

[0096] The foregoing is merely a list of specific embodiments of the present application, intended to enable those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the broadest scope consistent with the principles and novel features of the present application.

Claims

1. A method for displaying a Bluetooth list, characterized in that: include: Receive discovery signals broadcast by several Bluetooth devices; Calculate the frequency information of each Bluetooth device broadcasting a discovery signal, wherein the frequency information is used to represent the activity of the corresponding Bluetooth device; Displaying the plurality of Bluetooth devices in a Bluetooth interface to be connected of a scanning device in descending order of the frequency information; Calculating the frequency information of each Bluetooth device broadcasting a discovery signal includes: Reading a cache list in the memory of the scanning device, wherein the cache list is used to record the broadcast time and the number of broadcasts of the discovery signals broadcast by the plurality of Bluetooth devices; For each Bluetooth device, calculate the frequency information of broadcasting discovery signals using the corresponding broadcast time and broadcast number; Calculating the frequency information of the broadcast discovery signal using the corresponding broadcast time and broadcast number includes: Obtaining from the cache list the first broadcast time and the last broadcast time of a discovery signal broadcast by the target Bluetooth device within a scanning period, and obtaining from the cache list the number of times the discovery signal is broadcast by the target Bluetooth device within the scanning period; Calculating the broadcast duration based on the time difference between the last broadcast time and the first broadcast time; The frequency information of the target Bluetooth device broadcasting the discovery signal within the scanning period is obtained by dividing the broadcast duration by the number of broadcasts.

2. The method according to claim 1, characterized in that Before calculating the frequency information of each Bluetooth device broadcasting a discovery signal, the method further includes: After receiving the first discovery signal, parsing the first device identifier carried in the discovery signal and recording the reception time, wherein the first device identifier is used to identify the first Bluetooth device; Determine whether the first device identifier exists in the cache table of the current scanning cycle; If the first device identifier exists in the cache table of the current scanning cycle, the last broadcast time of the first Bluetooth device is updated using the receiving time, and the number of broadcasts is accumulated once; if the first device identifier does not exist in the cache table of the current scanning cycle, the first device identifier is inserted in the cache table, and the receiving time is recorded as the first broadcast time of the first Bluetooth device in the current scanning cycle, and the number of broadcasts is accumulated once.

3. The method according to claim 1, characterized in that Displaying the plurality of Bluetooth devices in the Bluetooth interface to be connected of the scanning device in descending order of the frequency information includes: Sort the device identifiers of the plurality of Bluetooth devices in descending order according to the frequency information to obtain a device sequence; The device sequence is displayed in the Bluetooth interface of the scanning device to be connected.

4. The method according to claim 1, wherein After displaying the plurality of Bluetooth devices in a Bluetooth interface to be connected of the scanning device in descending order of the frequency information, the method further includes: Detecting whether there are historical connection records for the multiple Bluetooth devices; If there is a historical connection record for the second Bluetooth device; A record identifier is added to an associated position of the second Bluetooth device in the Bluetooth interface to be connected, wherein the record identifier is used to indicate that the second Bluetooth device has been connected to the scanning device before.

5. The method according to claim 1, characterized in that After displaying the plurality of Bluetooth devices in a Bluetooth interface to be connected of the scanning device in descending order of the frequency information, the method further includes: parsing capability information and / or custom data of the plurality of Bluetooth devices from the discovery signal respectively; The capability information and / or the custom data are added to the associated position of each Bluetooth device in the Bluetooth interface to be connected.

6. A device for displaying a Bluetooth list, characterized in that: include: A receiving module, configured to receive discovery signals broadcast by several Bluetooth devices; A calculation module, configured to calculate frequency information of each Bluetooth device broadcasting a discovery signal, wherein the frequency information is used to represent the activity of the corresponding Bluetooth device; A display module, configured to display the plurality of Bluetooth devices in a waiting-to-connect Bluetooth interface of a scanning device in descending order of the frequency information; Calculating the frequency information of each Bluetooth device broadcasting a discovery signal includes: Reading a cache list in the memory of the scanning device, wherein the cache list is used to record the broadcast time and the number of broadcasts of the discovery signals broadcast by the plurality of Bluetooth devices; For each Bluetooth device, calculate the frequency information of broadcasting discovery signals using the corresponding broadcast time and broadcast number; Calculating the frequency information of the broadcast discovery signal using the corresponding broadcast time and broadcast number includes: Obtaining from the cache list the first broadcast time and the last broadcast time of a discovery signal broadcast by the target Bluetooth device within a scanning period, and obtaining from the cache list the number of times the discovery signal is broadcast by the target Bluetooth device within the scanning period; Calculating the broadcast duration based on the time difference between the last broadcast time and the first broadcast time; The frequency information of the target Bluetooth device broadcasting the discovery signal within the scanning period is obtained by dividing the broadcast duration by the number of broadcasts.

7. A storage medium, characterized in that: The storage medium includes a stored computer program, wherein the computer program executes the method steps of any one of claims 1 to 5 when executed.

8. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein: The processor, communication interface, and memory communicate with each other via a communication bus; wherein: Memory for storing computer programs; A processor, configured to execute the method steps according to any one of claims 1 to 5 by running a program stored in a memory.

Citation Information

Patent Citations

  • Method for controlling Bluetooth device and electronic device

    CN108401247A

  • Equipment discovery and Bluetooth broadcasting method and device, electronic equipment and storage medium

    CN112105009A

  • Accelerated interaction method and system of intelligent equipment and intelligent terminal

    CN113315685A